From 29aabba0ea759c6a2864ff5631735b67ee38e5e0 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 5 Feb 2020 18:44:56 +0000 Subject: gentoo resync : 05.02.2020 --- app-admin/sudo/Manifest | 4 +- app-admin/sudo/sudo-1.8.28_p1-r2.ebuild | 2 +- app-admin/sudo/sudo-1.8.31.ebuild | 263 ++++++++++++++++++++++++++++++++ 3 files changed, 267 insertions(+), 2 deletions(-) create mode 100644 app-admin/sudo/sudo-1.8.31.ebuild (limited to 'app-admin/sudo') diff --git a/app-admin/sudo/Manifest b/app-admin/sudo/Manifest index 8319bc1282ee..1777ea7bdd77 100644 --- a/app-admin/sudo/Manifest +++ b/app-admin/sudo/Manifest @@ -2,8 +2,10 @@ AUX sudo-1.8.28-no_pam_error_message_fix.patch 1405 BLAKE2B 924c8be80bbbe75e1f3f DIST sudo-1.8.28p1.tar.gz 3310254 BLAKE2B a1810af7a42d05cce49bb9d0acf6f3731a5193e9e9c3b458691379131eb86d36995854d11c09525e8d999ed1da7e99cf170634667c5a444aa522b8f23db7d1aa SHA512 bda3de34c15fbb68fc29759542295560ccc1562b419d03709cea51613937e9b92ba689c79c3ef4858aeea90d3d1a4dc0148225b11b22cf82395ae1bad8cb1734 DIST sudo-1.8.29.tar.gz 3338260 BLAKE2B 7ba29d155bfb1d7ba20e32ade2e8ee3919e70400b6c235e313052b247b48406b9a051e71daa7e47fdb0a9fd0889f4c05b8a1a170c027503b90081e8cec81660e SHA512 ea780922b2afb47df4df4b533fb355fd916cb18a6bfd13c7ca36a25b03ef585d805648c6fa85692bea363b1f83664ac3bc622f99bcd149b3a86f70522eb4d340 DIST sudo-1.8.30.tar.gz 3349455 BLAKE2B 5e0aaa41f42c18cd0de473add3665adf797cd37eacfb4abfc9472814ea679c1e88e28e95e13a73eb7d9648174609d80a2d4eccf3bdf87a44186df07aeba60eee SHA512 d44831feabd92d736614239e0e0f086829d84b213c98524fffb4b926a96715b1156538a7ab5e0b6e0db8be67a6e24a1642b3648105b076d23b58c39d0dd947af -EBUILD sudo-1.8.28_p1-r2.ebuild 6943 BLAKE2B c4baa7977a7c46094d586fadfdf767c8b19a907f8431bf24ff7ed386bd4dfaaf270f3e9fb2b75d82a863a04ee69930b379b8a13515d25482cb24897bf11b0321 SHA512 aa59c884faa68e2905fdb84e9147fd2ccf1983649552dbaea456f0c529ae1dfe4b6b6aa1775d3c5124b82ebcb93086310ce76c884f2c210d67869a034a4f0bb3 +DIST sudo-1.8.31.tar.gz 3350674 BLAKE2B de5a968732fdd58933b4c513d13c43a08cb50075a00c3e0d338c9892570a416a2b3a8f19940c0893715f4eeab991e804831a87ef656ffd91e7f1ba047c119261 SHA512 b9e408a322938c7a712458e9012d8a5f648fba5b23a5057cf5d8372c7f931262595f1575c32c32b9cb1a04af670ff4611e7df48d197e5c4cc038d6b65439a28a +EBUILD sudo-1.8.28_p1-r2.ebuild 6944 BLAKE2B 2195847735c77e9b6e9f15fb396ee2f34f6e14dc711a2d5bfe6a613f67e8bc18f1833caab559231eed32bc8a0de63a1c9a578902a96a5ffa28b88d790779614e SHA512 d0165002c886bb40d120eb54d95d2ed5870c61a9e650fb8a7ba362e7b5943494cccb6c4e4534b9c2829b96ae4f8ffcb5f2003dc1a6e76270bf66793010b8e728 EBUILD sudo-1.8.29-r2.ebuild 6956 BLAKE2B 4065346eafcaf93f22182bb168b5ed753e65a59f2d5469c48883d19c962bd4754cff648d10bdd404d0ba846f74944670c194ad5740edcaafb605a596d214f664 SHA512 c034ce70c59e5d1bd51b1f9514aa410e372ad987776ec4447b368448770a677b548fd8aec27477f2e0c64ba050617714489f7406977e4cb762b9a14c815affb6 EBUILD sudo-1.8.30.ebuild 6876 BLAKE2B 8115b04d517ffce1527c8d5672702623ce7d22345617a0bdacd8b67219040f651563e3cd973497a0383a65045757e7a4c3d3d483bf024e52edc0dbcb75030286 SHA512 2b894667bf8fb198561c3c7a02ce9b9501aabd142f1da2563b84ea512a63d39a6a014d7a2d46dca2d87a55721f687d24aa28dcf67ca2db9f643f65fd0dc57da8 +EBUILD sudo-1.8.31.ebuild 6876 BLAKE2B 8115b04d517ffce1527c8d5672702623ce7d22345617a0bdacd8b67219040f651563e3cd973497a0383a65045757e7a4c3d3d483bf024e52edc0dbcb75030286 SHA512 2b894667bf8fb198561c3c7a02ce9b9501aabd142f1da2563b84ea512a63d39a6a014d7a2d46dca2d87a55721f687d24aa28dcf67ca2db9f643f65fd0dc57da8 EBUILD sudo-9999.ebuild 6876 BLAKE2B 3fa9af915033ac10e6cf54880b64df0dadf7fa30ccf85d34fafa1c9fbc57cc187f7820086f242d90733583c79e82a50f336b9bdb9b21b98e72b2c377f6e550af SHA512 5efb6786e9d56e0b6b6f48fd4d25b24327772ce2b2ee0af366d73d67387f959159a83b66c2421e6a919b088d8143e3396f64423200bdfbb28a38e69043de0c7c MISC metadata.xml 1379 BLAKE2B 3fb47838664544236c2c5ce55ba77cda8fdef3ff1bd050a775878444040c76ec1d18fecd7ecbcc11121c90e76e9634f4c01da676dc178dbc7787b9250774e28a SHA512 81def82cf20eb6a57d38a1cced2fef18f5f5b56b6bb92a036cf925dec1c1b77f18e3c7b5997f4055ce840873032df65edae08810e6838bb0ab6309020a4a30d6 diff --git a/app-admin/sudo/sudo-1.8.28_p1-r2.ebuild b/app-admin/sudo/sudo-1.8.28_p1-r2.ebuild index f13176729974..7fe882a7f279 100644 --- a/app-admin/sudo/sudo-1.8.28_p1-r2.ebuild +++ b/app-admin/sudo/sudo-1.8.28_p1-r2.ebuild @@ -22,7 +22,7 @@ else 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 s390 sh sparc x86 ~sparc-solaris" + KEYWORDS="~alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-solaris" fi fi diff --git a/app-admin/sudo/sudo-1.8.31.ebuild b/app-admin/sudo/sudo-1.8.31.ebuild new file mode 100644 index 000000000000..944dd7d03535 --- /dev/null +++ b/app-admin/sudo/sudo-1.8.31.ebuild @@ -0,0 +1,263 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit pam multilib libtool tmpfiles + +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 ~s390 ~sh ~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 libressl nls offensive pam sasl +secure-path selinux +sendmail skey sssd system-digest" + +DEPEND=" + sys-libs/zlib:= + 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 ) + sssd? ( sys-auth/sssd[sudo] ) + system-digest? ( + gcrypt? ( dev-libs/libgcrypt:= ) + !gcrypt? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + ) + ) +" +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 +" + +S="${WORKDIR}/${MY_P}" + +REQUIRED_USE=" + pam? ( !skey ) + skey? ( !pam ) +" + +MAKEOPTS+=" SAMPLES=" + +src_prepare() { + default + elibtoolize +} + +set_secure_path() { + # FIXME: secure_path is a compile time setting. using PATH or + # ROOTPATH is not perfect, env-update may invalidate this, but until it + # is available as a sudoers setting this will have to do. + einfo "Setting 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 /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/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/*' + + einfo "... done" +} + +src_configure() { + local SECURE_PATH + set_secure_path + + # 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=( + --enable-zlib=system + --enable-tmpfiles.d="${EPREFIX}"/usr/lib/tmpfiles.d + --with-editor="${EPREFIX}"/usr/libexec/editor + --with-env-editor + --with-plugindir="${EPREFIX}"/usr/$(get_libdir)/sudo + --with-rundir="${EPREFIX}"/run/sudo + $(use_with secure-path secure-path "${SECURE_PATH}") + --with-vardir="${EPREFIX}"/var/db/sudo + --without-linux-audit + --without-opie + $(use_enable gcrypt) + $(use_enable nls) + $(use_enable sasl) + $(use_with offensive insults) + $(use_with offensive all-insults) + $(use_with ldap ldap_conf_file /etc/ldap.conf.sudo) + $(use_with ldap) + $(use_with pam) + $(use_with skey) + $(use_with sssd) + $(use_with selinux) + $(use_with sendmail) + ) + + if use system-digest && ! use gcrypt; then + myeconfargs+=("--enable-openssl") + else + myeconfargs+=("--disable-openssl") + fi + + econf "${myeconfargs[@]}" +} + +src_install() { + default + + if use ldap ; then + dodoc README.LDAP + + cat <<-EOF > "${T}"/ldap.conf.sudo + # See ldap.conf(5) and README.LDAP 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 doc/schema.OpenLDAP sudo.schema + fi + + pamd_mimic system-auth sudo auth account session + + 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 + + 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." +} -- cgit v1.2.3