## START: Set by rpmautospec ## (rpmautospec version 0.7.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_without check # prevent library files from being installed %global cargo_install_lib 0 %global crate sudo-rs Name: sudo-rs Version: 0.2.3 Release: %autorelease 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 BuildRequires: cargo-rpm-macros >= 26 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 %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %install %cargo_install # 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 requires "/var/log/wtmp" to be present: secure_open_is_predictable # * skip tests that rely on "daemon" having UID 1: test_unix_group, test_unix_user, test_get_user_and_group_by_id: # https://github.com/memorysafety/sudo-rs/issues/708 %cargo_test -- -- --exact --skip system::audit::test::secure_open_is_predictable --skip system::interface::test::test_unix_user --skip system::interface::test::test_unix_group --skip system::tests::test_get_user_and_group_by_id %endif %files %license COPYRIGHT %license LICENSE-APACHE %license LICENSE-MIT %license LICENSE.dependencies %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 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