@ -1,27 +1,25 @@
Name: mdevctl
Version: 1.1.0
Release: 4%{?dist}
Summary: Mediated device management and persistence utility
%bcond_without check
Group: System Environment/Kernel
License: LGPLv2
URL: https://github.com/mdevctl/mdevctl
%global crate mdevctl
Source0: https://github.com/mdevctl/mdevctl/archive/%{version}/%{name}-%{version}.tar.gz
Source1: https://github.com/mdevctl/mdevctl/archive/%{version}/%{name}-%{version}-vendor.tar.gz
Name: mdevctl
Version: 1.3.0
Release: 5%{?dist}
Summary: A mediated device management utility for Linux
ExclusiveArch: %{rust_arches}
License: LGPL-2.1-only
URL: https://crates.io/crates/mdevctl
Source: %{crates_source}
Source1: https://github.com/mdevctl/mdevctl/releases/download/v%{version}/mdevctl-%{version}-vendor.tar.gz
BuildRequires: bash
BuildRequires: git
BuildRequires: make
BuildRequires: systemd
BuildRequires: make systemd python3-docutils
%if 0%{?rhel}
BuildRequires: rust-toolset
%else
BuildRequires: rust-packaging >= 21
%endif
Requires(post,postun): %{_sbindir}/udevadm
Patch0: 0001-Report-root-error-when-a-callout-can-t-be-executed.patch
Patch1: 0002-tests-read-stdin-in-callout-test-scripts.patch
%description
mdevctl is a utility for managing and persisting devices in the
mediated device device framework of the Linux kernel. Mediated
@ -30,59 +28,108 @@ can be dynamically created and potentially used by drivers like
vfio-mdev for assignment to virtual machines.
%prep
%autosetup -S git_am -n %{name}-%{version}
%cargo_prep -V 1
%autosetup -n %{crate}-%{version_no_tilde} -p1 %{?rhel:-a1}
%if 0%{?rhel}
%cargo_prep -v vendor
%else
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
%endif
%build
%cargo_build
%cargo_license_summary
%{cargo_license} > LICENSE.dependencies
%if 0%{?rhel}
%cargo_vendor_manifest
%endif
%install
%make_install
%if %{with check}
%check
export MDEVCTL_LOG=debug RUST_BACKTRACE=full
%cargo_test
%endif
%files
%license COPYING
%license LICENSE.dependencies
%if 0%{?rhel}
%license cargo-vendor.txt
%endif
%doc README.md
%{_sbindir}/mdevctl
%{_sbindir}/lsmdev
%{_udevrulesdir}/60-mdevctl.rules
%dir %{_sysconfdir}/mdevctl.d
%dir %{_sysconfdir}/mdevctl.d /scripts.d/callouts
%dir %{_sysconfdir}/mdevctl.d /scripts.d/notifiers
%dir %{_prefix}/lib/mdevctl /scripts.d/callouts
%dir %{_prefix}/lib/mdevctl /scripts.d/notifiers
%{_mandir}/man8/mdevctl.8*
%{_mandir}/man8/lsmdev.8*
%{_datadir}/bash-completion/completions/mdevctl
%{_datadir}/bash-completion/completions/lsmdev
%changelog
* Thu Jan 20 2022 Jonathon Jongsma <jjongsma@redhat.com> - 1.1.0-4
- fix gating.yaml indentation and rebuild
* Tue Nov 26 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 1.3.0-5
- Rebuilt for MSVSphere 10
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1.3.0-5
- Bump release for June 2024 mass rebuild
* Fri Feb 02 2024 Yaakov Selkowitz <yselkowi@redhat.com> - 1.3.0-4
- Update Rust macro usage
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Jan 11 2024 Alex Williamson <alex.williamson@redhat.com> - 1.3.0-1
- New upstream release: https://github.com/mdevctl/mdevctl/releases/tag/v1.3.0
- Note upstream moved default script location from /etc/mdevctl.d/scripts.d
to /usr/lib/mdevctl/scripts.d. Both locations are currently supported, the
new locations is recommended.
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Sun Feb 05 2023 Fabio Valentini <decathorpe@gmail.com> - 1.2.0-3
- Rebuild for fixed frame pointer compiler flags in Rust RPM macros.
- Slightly modernize Rust packaging (drop ExclusiveArch, __cargo_skip_build).
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Aug 05 2022 Alex Williamson <alex.williamson@redhat.com> - 1.2.0-1
- New upstream release: https://github.com/mdevctl/mdevctl/releases/tag/v1.2.0
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Thu Jan 13 2022 Jonathon Jongsma <jjongsma@redhat.com> - 1.1.0-3
- add gating.yml and rpminspect.yml and rebuild
Related: rhbz#1999686
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Wed Dec 01 2021 Eduardo Lima (Etrunko) <etrunko@redhat.com> - 1.1.0-2
- Create additonal directories required by installation.
Related: rhbz#1999686
* Fri Sep 10 2021 Alex Williamson <alex.williamson@redhat.com> - 1.1.0-2
- Correct bogus changelog date in -1
* Thu Nov 18 2021 Eduardo Lima (Etrunko) <etrunko@redhat.com> - 1.1.0-1
- Rebase mdevctl to 1.1.0
Resolves: rhbz#1999686
* Fri Sep 10 2021 Alex Williamson <alex.williamson@redhat.com> - 1.1.0-1
- New upstream release: https://github.com/mdevctl/mdevctl/releases/tag/v1.1.0
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 0.78-4
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 0.78-3
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.78-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Jul 12 2021 Alex Williamson <alex.williamson@redhat.com> - 1.0.0-1
- Upstream rewrite in rust
* Thu Jun 10 2021 Alex Williamson <alex.williamson@redhat.com> - 0.81-1
- c077ee72b286 ("Automatic version commit for tag 0.81")
- 4aad72d7a921 ("Merge pull request #37 from fiuczy/fix-define-jsonfile")
- e6cf620b4b04 ("Fix define from jsonfile")
* Tue Nov 24 2020 Alex Williamson <alex.williamson@redhat.com> - 0.78-1
- e029640033d3 ("Automatic version commit for tag 0.78")