summaryrefslogtreecommitdiff
path: root/app-admin/sudo
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-02-02 01:39:05 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-02-02 01:39:05 +0000
commitfcc5224904648a8e6eb528d7603154160a20022f (patch)
tree3bfce096b38a9cea8eed13fc70c1526c456e9abd /app-admin/sudo
parent2fd57282f0262ca084e05b0f2c63fbada395d02b (diff)
gentoo resync : 02.02.2022
Diffstat (limited to 'app-admin/sudo')
-rw-r--r--app-admin/sudo/Manifest4
-rw-r--r--app-admin/sudo/sudo-1.9.9.ebuild255
-rw-r--r--app-admin/sudo/sudo-9999.ebuild6
3 files changed, 261 insertions, 4 deletions
diff --git a/app-admin/sudo/Manifest b/app-admin/sudo/Manifest
index 71dfdddde0ba..ad79657c9ad2 100644
--- a/app-admin/sudo/Manifest
+++ b/app-admin/sudo/Manifest
@@ -1,6 +1,8 @@
DIST sudo-1.9.6p1.tar.gz 4119888 BLAKE2B 02bdb551c46cff11ac56e64937c64e6a29ccd8e0af34ea2f6b33c223bee8f7ad958d0fc3d7ef8ef12bf5bc82565769b923ff112a3f3d6bf6999fa4f6ea55e38e SHA512 632dfe72f04ce9a7a5a7236fcd5c09ce4535e695ced49d24dd848e3a7b1bea7380df44188b9e475af4271069539b5a5816948a98fbb0649ebebaba8b4c4b7745
DIST sudo-1.9.8p2.tar.gz 4302256 BLAKE2B ba40df539b3466bebe0d876ef4f1809867125e83983609eae0447f933fbd499b2eda88d2f6c475779654e68af9580a2998eca3c3f7953129ff73c923e1c88ad9 SHA512 899b252e8c219226f658dff3dd34c97b07d42004998b45175b4c0c4de42a6bf9f909598e99b4056fa1171e63378e203854b0f8608b0f5c1b00e9d3677818f6d3
+DIST sudo-1.9.9.tar.gz 4456969 BLAKE2B 1a661a24e9891c705ca1ff0ff0881be30888ac850d18478031379de6cfa10a581ee4b256fda7d8882e17c661bcaa03b1055ab0e525dc75a2b1feec2ca13283c8 SHA512 53064240431ae3d9409dc5cb7d72ab55d9ab5f802af4de99fadd987855461b3cca53f261d6256e3b6f35e30c7e162f4dfa3978ef6976415cf5be874fb2026614
EBUILD sudo-1.9.6_p1-r2.ebuild 6725 BLAKE2B 620c20c144bb7fd723e3e46022dd3e6152084978091e2e3af0a95a961dc027defeb5d20dcee4b0e36959e04124586a2c53d65c8137af9d1f52a6044392c08aea SHA512 fc61898d795187d7ab0876001c725bdb2c5f0c98ab38adc8427f69abc1da8b33be6ef8ebe1353ead193f10f48ed042fe12a13f90c181bc3a0d3cceed352bc262
EBUILD sudo-1.9.8_p2.ebuild 6791 BLAKE2B e51a0e7e2526e921bfb9313a0873db0bc4e4874e379b640772207a788f9f83759577da1a3b258c288fe17680aa2aea3bf4abfb27c6bc14ede3909729da26cb98 SHA512 2b1598666f419142ddd7fdd64e91d99706c701b66d55162d6bd863922b9b93cb839f96654f8aa886c01a01ba4c2e290b7893b12c87324180d36ccc42447eaccd
-EBUILD sudo-9999.ebuild 6669 BLAKE2B 908e75ad8b33fc74a3491c77aa184e6f1de8629b13fb6bc704f7b9980b43fb313591667b58c9583f50392d44e852dcd7f3e65c5265b3eb5d32c8e970370b9d9e SHA512 f415714f5b28550b5f7b3b3f79b28a95db5738f3b2c65720d911c8fcabc4b8099f58e510c17af6194ba76cac53157fbbcb7688d35ae99b2633973bcf50799089
+EBUILD sudo-1.9.9.ebuild 6676 BLAKE2B 930318663e076bf28e23e150aeda3460773e3f2ace5ff6777d457372424d95e267068b2dbcbc2b926605fe5731aa767eb8ac27c44aad94f6b048f9be09a87f72 SHA512 4cc4d5b39290ce081d07ba31299de8844a8a4be35c70c071cdef432508e82b873bfd4602cec8d5ce9f2a70438effe1597af8f29b8bf2632e6f4af55491cf1585
+EBUILD sudo-9999.ebuild 6675 BLAKE2B 746d4e0e7ef74c245128a976ac791c9b7310e4a5eba9d44b6f61be59b2c5320f3e1a8e2b9a2260e29ef58489760ee8c016a71c0c5bee2c89c2781116f96f8c92 SHA512 f863cda8ca477fbcafcb556aac498c34add18e67fc268e98dde212bec6d402394410e6c5894769553b14a5326678895d76709f74b3680ff12ce9c83415435795
MISC metadata.xml 1050 BLAKE2B 4027c8a5941e8e12bb6c9cd9950187965b01e236ddfc073ba0dd98be8e3e98225ffbca1c05b3153d72e5507484f966e01c7b44e9416bbedecd88ae8f4d52e359 SHA512 8033bd4649190c3c6bf0d07dab2dc99a708b81a74b0d154b1f4d56bdfbc115d4889b3a78e6b2f3eebaa91bf0252e8fd043bf2bc850b8f6b4199b38ea751b7174
diff --git a/app-admin/sudo/sudo-1.9.9.ebuild b/app-admin/sudo/sudo-1.9.9.ebuild
new file mode 100644
index 000000000000..654c08839c3c
--- /dev/null
+++ b/app-admin/sudo/sudo-1.9.9.ebuild
@@ -0,0 +1,255 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit pam libtool tmpfiles toolchain-funcs
+
+MY_P="${P/_/}"
+MY_P="${MY_P/beta/b}"
+
+DESCRIPTION="Allows users or groups to run commands as other users"
+HOMEPAGE="https://www.sudo.ws/"
+if [[ ${PV} == "9999" ]] ; then
+ inherit mercurial
+ EHG_REPO_URI="https://www.sudo.ws/repos/sudo"
+else
+ uri_prefix=
+ case ${P} in
+ *_beta*|*_rc*) uri_prefix=beta/ ;;
+ esac
+
+ SRC_URI="https://www.sudo.ws/sudo/dist/${uri_prefix}${MY_P}.tar.gz
+ ftp://ftp.sudo.ws/pub/sudo/${uri_prefix}${MY_P}.tar.gz"
+ if [[ ${PV} != *_beta* ]] && [[ ${PV} != *_rc* ]] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~sparc-solaris"
+ fi
+fi
+
+# Basic license is ISC-style as-is, some files are released under
+# 3-clause BSD license
+LICENSE="ISC BSD"
+SLOT="0"
+IUSE="gcrypt ldap nls offensive pam sasl +secure-path selinux +sendmail skey ssl sssd"
+
+DEPEND="
+ sys-libs/zlib:=
+ virtual/libcrypt:=
+ gcrypt? ( dev-libs/libgcrypt:= )
+ ldap? (
+ >=net-nds/openldap-2.1.30-r1
+ sasl? (
+ dev-libs/cyrus-sasl
+ net-nds/openldap[sasl]
+ )
+ )
+ pam? ( sys-libs/pam )
+ sasl? ( dev-libs/cyrus-sasl )
+ skey? ( >=sys-auth/skey-1.1.5-r1 )
+ ssl? ( dev-libs/openssl:0= )
+ sssd? ( sys-auth/sssd[sudo] )
+"
+RDEPEND="
+ ${DEPEND}
+ >=app-misc/editor-wrapper-3
+ virtual/editor
+ ldap? ( dev-lang/perl )
+ pam? ( sys-auth/pambase )
+ selinux? ( sec-policy/selinux-sudo )
+ sendmail? ( virtual/mta )
+"
+BDEPEND="
+ sys-devel/bison
+ virtual/pkgconfig
+"
+
+S="${WORKDIR}/${MY_P}"
+
+REQUIRED_USE="
+ ?? ( pam skey )
+ ?? ( gcrypt ssl )
+"
+
+MAKEOPTS+=" SAMPLES="
+
+src_prepare() {
+ default
+ elibtoolize
+}
+
+set_secure_path() {
+ # first extract the default ROOTPATH from build env
+ SECURE_PATH=$(unset ROOTPATH; . "${EPREFIX}"/etc/profile.env;
+ echo "${ROOTPATH}")
+ case "${SECURE_PATH}" in
+ */usr/sbin*) ;;
+ *) SECURE_PATH=$(unset PATH;
+ . "${EPREFIX}"/etc/profile.env; echo "${PATH}")
+ ;;
+ esac
+ if [[ -z ${SECURE_PATH} ]] ; then
+ ewarn " Failed to detect SECURE_PATH, please report this"
+ fi
+
+ # then remove duplicate path entries
+ cleanpath() {
+ local newpath thisp IFS=:
+ for thisp in $1 ; do
+ if [[ :${newpath}: != *:${thisp}:* ]] ; then
+ newpath+=:${thisp}
+ else
+ einfo " Duplicate entry ${thisp} removed..."
+ fi
+ done
+ SECURE_PATH=${newpath#:}
+ }
+ cleanpath /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin${SECURE_PATH:+:${SECURE_PATH}}
+
+ # finally, strip gcc paths #136027
+ rmpath() {
+ local e newpath thisp IFS=:
+ for thisp in ${SECURE_PATH} ; do
+ for e ; do [[ ${thisp} == ${e} ]] && continue 2 ; done
+ newpath+=:${thisp}
+ done
+ SECURE_PATH=${newpath#:}
+ }
+ rmpath '*/gcc-bin/*' '*/gnat-gcc-bin/*' '*/gnat-gcc/*'
+}
+
+src_configure() {
+ local SECURE_PATH
+ set_secure_path
+ tc-export PKG_CONFIG #767712
+
+ # audit: somebody got to explain me how I can test this before I
+ # enable it.. - Diego
+ # plugindir: autoconf code is crappy and does not delay evaluation
+ # until `make` time, so we have to use a full path here rather than
+ # basing off other values.
+ myeconfargs=(
+ # requires some python eclass
+ --disable-python
+ --enable-tmpfiles.d="${EPREFIX}"/usr/lib/tmpfiles.d
+ --enable-zlib=system
+ --with-editor="${EPREFIX}"/usr/libexec/editor
+ --with-env-editor
+ --with-plugindir="${EPREFIX}"/usr/$(get_libdir)/sudo
+ --with-rundir="${EPREFIX}"/run/sudo
+ --with-vardir="${EPREFIX}"/var/db/sudo
+ --without-linux-audit
+ --without-opie
+ $(use_enable gcrypt)
+ $(use_enable nls)
+ $(use_enable sasl)
+ $(use_enable ssl openssl)
+ $(use_with ldap)
+ $(use_with ldap ldap_conf_file /etc/ldap.conf.sudo)
+ $(use_with offensive insults)
+ $(use_with offensive all-insults)
+ $(use_with pam)
+ $(use_with pam pam-login)
+ $(use_with secure-path secure-path "${SECURE_PATH}")
+ $(use_with selinux)
+ $(use_with sendmail)
+ $(use_with skey)
+ $(use_with sssd)
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ default
+
+ if use ldap ; then
+ dodoc README.LDAP.md
+
+ cat <<-EOF > "${T}"/ldap.conf.sudo
+ # See ldap.conf(5) and README.LDAP.md for details
+ # This file should only be readable by root
+
+ # supported directives: host, port, ssl, ldap_version
+ # uri, binddn, bindpw, sudoers_base, sudoers_debug
+ # tls_{checkpeer,cacertfile,cacertdir,randfile,ciphers,cert,key}
+ EOF
+
+ if use sasl ; then
+ cat <<-EOF >> "${T}"/ldap.conf.sudo
+
+ # SASL directives: use_sasl, sasl_mech, sasl_auth_id
+ # sasl_secprops, rootuse_sasl, rootsasl_auth_id, krb5_ccname
+ EOF
+ fi
+
+ insinto /etc
+ doins "${T}"/ldap.conf.sudo
+ fperms 0440 /etc/ldap.conf.sudo
+
+ insinto /etc/openldap/schema
+ newins docs/schema.OpenLDAP sudo.schema
+ fi
+
+ if use pam; then
+ pamd_mimic system-auth sudo auth account session
+ pamd_mimic system-auth sudo-i auth account session
+ fi
+
+ keepdir /var/db/sudo/lectured
+ fperms 0700 /var/db/sudo/lectured
+ fperms 0711 /var/db/sudo #652958
+
+ # Don't install into /run as that is a tmpfs most of the time
+ # (bug #504854)
+ rm -rf "${ED}"/run || die
+
+ find "${ED}" -type f -name "*.la" -delete || die #697812
+}
+
+pkg_postinst() {
+ tmpfiles_process sudo.conf
+
+ #652958
+ local sudo_db="${EROOT}/var/db/sudo"
+ if [[ "$(stat -c %a "${sudo_db}")" -ne 711 ]] ; then
+ chmod 711 "${sudo_db}" || die
+ fi
+
+ if use ldap ; then
+ ewarn
+ ewarn "sudo uses the /etc/ldap.conf.sudo file for ldap configuration."
+ ewarn
+ if grep -qs '^[[:space:]]*sudoers:' "${ROOT}"/etc/nsswitch.conf ; then
+ ewarn "In 1.7 series, LDAP is no more consulted, unless explicitly"
+ ewarn "configured in /etc/nsswitch.conf."
+ ewarn
+ ewarn "To make use of LDAP, add this line to your /etc/nsswitch.conf:"
+ ewarn " sudoers: ldap files"
+ ewarn
+ fi
+ fi
+ if use prefix ; then
+ ewarn
+ ewarn "To use sudo, you need to change file ownership and permissions"
+ ewarn "with root privileges, as follows:"
+ ewarn
+ ewarn " # chown root:root ${EPREFIX}/usr/bin/sudo"
+ ewarn " # chown root:root ${EPREFIX}/usr/lib/sudo/sudoers.so"
+ ewarn " # chown root:root ${EPREFIX}/etc/sudoers"
+ ewarn " # chown root:root ${EPREFIX}/etc/sudoers.d"
+ ewarn " # chown root:root ${EPREFIX}/var/db/sudo"
+ ewarn " # chmod 4111 ${EPREFIX}/usr/bin/sudo"
+ ewarn
+ fi
+
+ elog "To use the -A (askpass) option, you need to install a compatible"
+ elog "password program from the following list. Starred packages will"
+ elog "automatically register for the use with sudo (but will not force"
+ elog "the -A option):"
+ elog ""
+ elog " [*] net-misc/ssh-askpass-fullscreen"
+ elog " net-misc/x11-ssh-askpass"
+ elog ""
+ elog "You can override the choice by setting the SUDO_ASKPASS environmnent"
+ elog "variable to the program you want to use."
+}
diff --git a/app-admin/sudo/sudo-9999.ebuild b/app-admin/sudo/sudo-9999.ebuild
index de7fec385553..5aed15763216 100644
--- a/app-admin/sudo/sudo-9999.ebuild
+++ b/app-admin/sudo/sudo-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -163,10 +163,10 @@ src_install() {
default
if use ldap ; then
- dodoc README.LDAP
+ dodoc README.LDAP.md
cat <<-EOF > "${T}"/ldap.conf.sudo
- # See ldap.conf(5) and README.LDAP for details
+ # See ldap.conf(5) and README.LDAP.md for details
# This file should only be readable by root
# supported directives: host, port, ssl, ldap_version