add: run0-sudo-shim (#6786) (#6817)

This commit is contained in:
Raboneko
2025-10-21 20:43:27 -07:00
committed by GitHub
parent 6177b13e9d
commit d0a955ad42
3 changed files with 41 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
project pkg {
rpm {
spec = "run0-sudo-shim.spec"
}
}
@@ -0,0 +1,35 @@
Name: run0-sudo-shim
Version: 1.2.0
Release: 1%?dist
Summary: An imitation of sudo, using run0 internally
SourceLicense: BSD-3-Clause
License: (Apache-2.0 OR MIT) AND BSD-3-Clause AND MIT
URL: https://github.com/LordGrimmauld/run0-sudo-shim
Source0: %url/archive/refs/tags/%version.tar.gz
BuildRequires: rpm_macro(cargo_install) rust-packaging
Conflicts: sudo
%description
run0-sudo-shim attempts to imitate sudo as close as possible, while actually using run0 in the back.
run0 does not rely on SUID binaries, which makes it a more secure option. It is also included in any systemd-based linux installation.
However, many programs just expect sudo to exist, so a shim is necessary to make those programs work.
%prep
%autosetup
%cargo_prep_online
%build
%cargo_license_summary_online
%{cargo_license_online} > LICENSE.dependencies
%install
%cargo_install
ln -s %_bindir/run0-sudo-shim %buildroot%_bindir/sudo
%files
%doc README.md
%license LICENSE.dependencies
%_bindir/run0-sudo-shim
%_bindir/sudo
@@ -0,0 +1 @@
rpm.version(gh("LordGrimmauld/run0-sudo-shim"));