%define _trivial .0 %define _buildid .1 ## START: Set by rpmautospec ## (rpmautospec version 0.8.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Generated by rust2rpm 26 %bcond_with check # prevent library files from being installed %global cargo_install_lib 0 %global crate sudo-rs Name: sudo-rs Version: 0.2.10 Release: 1%{dist}%{?_trivial}%{?_buildid} Summary: Memory safe implementation of sudo and su #SourceLicense: Apache-2.0 OR MIT # Apache-2.0 OR MIT # MIT OR Apache-2.0 License: Apache-2.0 OR MIT # LICENSE.dependencies contains a full license breakdown URL: https://github.com/trifectatechfoundation/sudo-rs Source: %{url}/archive/v%{version}/sudo-rs-%{version}.tar.gz Source1: vendor.tar.gz BuildRequires: rust-toolset BuildRequires: pam-devel %if %{with check} BuildRequires: /usr/bin/pkill %endif %global _description %{expand: A memory safe implementation of sudo and su.} %description %{_description} %prep %autosetup -n %{crate}-%{version} -p1 -a1 %cargo_prep -v vendor %build %cargo_build -f pam-login %{cargo_license_summary -f pam-login} %{cargo_license -f pam-login} > LICENSE.dependencies %{cargo_vendor_manifest} %install %cargo_install -f pam-login # rename binaries so they do not conflict with sudo mv %{buildroot}/%{_bindir}/su %{buildroot}/%{_bindir}/su-rs mv %{buildroot}/%{_bindir}/sudo %{buildroot}/%{_bindir}/sudo-rs mv %{buildroot}/%{_bindir}/visudo %{buildroot}/%{_bindir}/visudo-rs %if %{with check} %check # * skip a test that fails due to inconsistency between mockbuild user / mock group: # https://github.com/trifectatechfoundation/sudo-rs/issues/1293 # https://github.com/rpm-software-management/mock/issues/1643 %cargo_test -f pam-login -- -- --exact --skip common::context::tests::test_build_run_context %endif %files %license COPYRIGHT %license LICENSE-APACHE %license LICENSE-MIT %license LICENSE.dependencies %license cargo-vendor.txt %doc CHANGELOG.md %doc CODE_OF_CONDUCT.md %doc CONTRIBUTING.md %doc README.md %doc SECURITY.md %attr(4755, root, root) %{_bindir}/su-rs %attr(4111, root, root) %{_bindir}/sudo-rs %attr(0755, root, root) %{_bindir}/visudo-rs %changelog ## START: Generated by rpmautospec * Mon Nov 17 2025 Fabio Valentini - 0.2.10-1 - Update to version 0.2.10; Fixes RHBZ#2413768 * Fri Oct 17 2025 Fabio Valentini - 0.2.9-1 - Update to version 0.2.9; Fixes RHBZ#2395769 * Fri Jul 25 2025 Fedora Release Engineering - 0.2.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild * Tue May 13 2025 Fabio Valentini - 0.2.6-1 - Update to version 0.2.6; Fixes RHBZ#2356685 * Mon Mar 17 2025 Fabio Valentini - 0.2.4-1 - Update to version 0.2.4; Fixes RHBZ#2347522 * Sun Jan 19 2025 Fedora Release Engineering - 0.2.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild * Mon Jul 22 2024 Fabio Valentini - 0.2.3-1 - Update to version 0.2.3; Fixes RHBZ#2298066 * Sat Jul 20 2024 Fedora Release Engineering - 0.2.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Thu May 23 2024 Fabio Valentini - 0.2.2-3 - Rebuild with Rust 1.78 to fix incomplete debuginfo and backtraces * Tue Mar 19 2024 Fabio Valentini - 0.2.2-2 - Regenerate with rust2rpm v26 * Sat Feb 24 2024 Fabio Valentini - 0.2.2-1 - Initial import (#2264457) ## END: Generated by rpmautospec