diff --git a/security/sudo-rs/Makefile b/security/sudo-rs/Makefile index e609dff6e60f..1f27827c26f6 100644 --- a/security/sudo-rs/Makefile +++ b/security/sudo-rs/Makefile @@ -1,74 +1,67 @@ PORTNAME= sudo-rs -PORTVERSION= 0.2.7 DISTVERSIONPREFIX= v -PORTREVISION= 1 +DISTVERSION= 0.2.8 CATEGORIES= security MAINTAINER= marc@trifectatech.org COMMENT= Allow others to run commands as root WWW= https://trifectatech.org/initiatives/privilege-boundary/ LICENSE= APACHE20 MIT LICENSE_COMB= dual LICENSE_FILE_APACHE20= ${WRKSRC}/LICENSE-APACHE LICENSE_FILE_MIT= ${WRKSRC}/LICENSE-MIT -FLAVORS= default coexist -FLAVOR?= ${FLAVORS:[1]} -coexist_PKGNAMESUFFIX= -coexist -coexist_DESCR= pkg-descr-coexist - USES= cargo - USE_GITHUB= yes GH_ACCOUNT= trifectatechfoundation -CARGO_CRATES= diff-0.1.13 \ - glob-0.3.2 \ - libc-0.2.174 \ - log-0.4.27 \ - pretty_assertions-1.4.1 \ - yansi-1.0.1 +FLAVORS= default coexist +FLAVOR?= ${FLAVORS:[1]} + +coexist_PKGNAMESUFFIX= -coexist +coexist_DESCR= pkg-descr-coexist .if !defined(USER) || ${USER} == root CARGO_TEST= no .endif .if ${FLAVOR} == default CONFLICTS_INSTALL= sudo RS_SUFFIX= PLIST_SUB+= NO_COEXIST="" .else RS_SUFFIX= -rs PLIST_SUB+= NO_COEXIST="@comment " .endif -PLIST_SUB+= RS_SUFFIX=${RS_SUFFIX} -PORTDOCS= CHANGELOG.md CONTRIBUTING.md COPYRIGHT LICENSE-* README.md \ - SECURITY.md +PLIST_SUB+= RS_SUFFIX=${RS_SUFFIX} +PORTDOCS= CHANGELOG.md CONTRIBUTING.md COPYRIGHT LICENSE-* README.md SECURITY.md OPTIONS_DEFINE= DOCS post-install: ${MV} ${STAGEDIR}${PREFIX}/bin/visudo ${STAGEDIR}${PREFIX}/sbin/visudo${RS_SUFFIX} ${INSTALL_MAN} ${WRKSRC}/docs/man/sudo.8.man ${STAGEDIR}${PREFIX}/share/man/man8/sudo${RS_SUFFIX}.8 ${INSTALL_MAN} ${WRKSRC}/docs/man/visudo.8.man ${STAGEDIR}${PREFIX}/share/man/man8/visudo${RS_SUFFIX}.8 ${INSTALL_MAN} ${WRKSRC}/docs/man/sudoers.5.man ${STAGEDIR}${PREFIX}/share/man/man5/sudoers${RS_SUFFIX}.5 + ${LN} -s sudo${RS_SUFFIX} ${STAGEDIR}${PREFIX}/bin/sudoedit${RS_SUFFIX} + ${LN} -s sudo${RS_SUFFIX}.8 ${STAGEDIR}${PREFIX}/share/man/man8/sudoedit${RS_SUFFIX}.8 ${MKDIR} ${STAGEDIR}${PREFIX}/etc/sudoers.d ${MKDIR} ${STAGEDIR}${PREFIX}/etc/pam.d ${MKDIR} ${STAGEDIR}/var/run/sudo ${MKDIR} ${STAGEDIR}/var/db/sudo # we are not going to try to replace 'su', since that is part of FreeBSD itself ${RM} ${STAGEDIR}${PREFIX}/bin/su .if ${FLAVOR} == default ${INSTALL_DATA} ${FILESDIR}/pam.conf ${STAGEDIR}${PREFIX}/etc/pam.d/sudo.default ${INSTALL_DATA} ${FILESDIR}/sudoers ${STAGEDIR}${PREFIX}/etc/sudoers.dist .else ${MV} ${STAGEDIR}${PREFIX}/bin/sudo ${STAGEDIR}${PREFIX}/bin/sudo${RS_SUFFIX} .endif post-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR} .include diff --git a/security/sudo-rs/Makefile.crates b/security/sudo-rs/Makefile.crates new file mode 100644 index 000000000000..7f1984c2311d --- /dev/null +++ b/security/sudo-rs/Makefile.crates @@ -0,0 +1,6 @@ +CARGO_CRATES= diff-0.1.13 \ + glob-0.3.2 \ + libc-0.2.174 \ + log-0.4.27 \ + pretty_assertions-1.4.1 \ + yansi-1.0.1 diff --git a/security/sudo-rs/distinfo b/security/sudo-rs/distinfo index 8861ccd86ae0..639594b21790 100644 --- a/security/sudo-rs/distinfo +++ b/security/sudo-rs/distinfo @@ -1,15 +1,15 @@ -TIMESTAMP = 1752137205 +TIMESTAMP = 1754301726 SHA256 (rust/crates/diff-0.1.13.crate) = 56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8 SIZE (rust/crates/diff-0.1.13.crate) = 46216 SHA256 (rust/crates/glob-0.3.2.crate) = a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2 SIZE (rust/crates/glob-0.3.2.crate) = 22359 SHA256 (rust/crates/libc-0.2.174.crate) = 1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776 SIZE (rust/crates/libc-0.2.174.crate) = 779933 SHA256 (rust/crates/log-0.4.27.crate) = 13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94 SIZE (rust/crates/log-0.4.27.crate) = 48120 SHA256 (rust/crates/pretty_assertions-1.4.1.crate) = 3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d SIZE (rust/crates/pretty_assertions-1.4.1.crate) = 78952 SHA256 (rust/crates/yansi-1.0.1.crate) = cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049 SIZE (rust/crates/yansi-1.0.1.crate) = 75497 -SHA256 (trifectatechfoundation-sudo-rs-v0.2.7_GH0.tar.gz) = d4e7b49634bf9c8a897a26afe85118ef941ff0914765b8720798821d2fe8c402 -SIZE (trifectatechfoundation-sudo-rs-v0.2.7_GH0.tar.gz) = 736981 +SHA256 (trifectatechfoundation-sudo-rs-v0.2.8_GH0.tar.gz) = 5b3823cc60abc5d90dbf0ae3a37d92445215e2697e6997c56148f5d0ac371ece +SIZE (trifectatechfoundation-sudo-rs-v0.2.8_GH0.tar.gz) = 751775 diff --git a/security/sudo-rs/files/patch-src_system_mod.rs b/security/sudo-rs/files/patch-src_system_mod.rs deleted file mode 100644 index 9474860f4b51..000000000000 --- a/security/sudo-rs/files/patch-src_system_mod.rs +++ /dev/null @@ -1,13 +0,0 @@ ---- src/system/mod.rs.orig 2025-07-01 09:04:15 UTC -+++ src/system/mod.rs -@@ -802,8 +802,8 @@ impl Process { - - let ki_start = ki_proc[0].ki_start; - Ok(ProcessCreateTime::new( -- ki_start.tv_sec, -- ki_start.tv_usec * 1000, -+ (ki_start.tv_sec).into(), -+ (ki_start.tv_usec * 1000).into(), - )) - } - } diff --git a/security/sudo-rs/pkg-descr b/security/sudo-rs/pkg-descr index e02b45a024ad..01c68080864e 100644 --- a/security/sudo-rs/pkg-descr +++ b/security/sudo-rs/pkg-descr @@ -1,6 +1,6 @@ -Sudo-rs is a memory safe re-implementation of the sudo utility. +Sudo-rs is a memory-safe re-implementation of the sudo utility. Sudo is a program designed to allow a sysadmin to give limited root privileges to users and log root activity. The basic philosophy is to give as few privileges as possible but still allow people to get their work done. diff --git a/security/sudo-rs/pkg-descr-coexist b/security/sudo-rs/pkg-descr-coexist index b77a949d55db..0187dcb5320c 100644 --- a/security/sudo-rs/pkg-descr-coexist +++ b/security/sudo-rs/pkg-descr-coexist @@ -1,4 +1,4 @@ -Sudo-rs is a memory safe re-implementation of the sudo utility. +Sudo-rs is a memory-safe re-implementation of the sudo utility. Use this package to try out sudo-rs safely alongside security/sudo, using the commands "sudo-rs" and "visudo-rs". diff --git a/security/sudo-rs/pkg-plist b/security/sudo-rs/pkg-plist index e8bdee449e15..389d20676dd9 100644 --- a/security/sudo-rs/pkg-plist +++ b/security/sudo-rs/pkg-plist @@ -1,10 +1,12 @@ @(,,4755) bin/sudo%%RS_SUFFIX%% +bin/sudoedit%%RS_SUFFIX%% sbin/visudo%%RS_SUFFIX%% share/man/man5/sudoers%%RS_SUFFIX%%.5.gz share/man/man8/sudo%%RS_SUFFIX%%.8.gz +share/man/man8/sudoedit%%RS_SUFFIX%%.8.gz share/man/man8/visudo%%RS_SUFFIX%%.8.gz %%NO_COEXIST%%@sample etc/pam.d/sudo.default etc/pam.d/sudo %%NO_COEXIST%%@sample etc/sudoers.dist etc/sudoers @dir etc/sudoers.d @dir /var/db/sudo @dir /var/run/sudo