From 3517852e3b8a68d1e997770fc0650c5053bafc6c Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 4 Jan 2022 01:27:12 +0000 Subject: gentoo resync : 04.01.2022 --- sys-apps/shadow/Manifest | 10 +- sys-apps/shadow/shadow-4.10-r3.ebuild | 253 -------------------------------- sys-apps/shadow/shadow-4.10-r4.ebuild | 257 +++++++++++++++++++++++++++++++++ sys-apps/shadow/shadow-4.11.1.ebuild | 256 ++++++++++++++++++++++++++++++++ sys-apps/shadow/shadow-4.8.1-r4.ebuild | 4 +- sys-apps/shadow/shadow-4.9-r3.ebuild | 4 +- sys-apps/shadow/shadow-4.9-r4.ebuild | 6 +- 7 files changed, 523 insertions(+), 267 deletions(-) delete mode 100644 sys-apps/shadow/shadow-4.10-r3.ebuild create mode 100644 sys-apps/shadow/shadow-4.10-r4.ebuild create mode 100644 sys-apps/shadow/shadow-4.11.1.ebuild (limited to 'sys-apps/shadow') diff --git a/sys-apps/shadow/Manifest b/sys-apps/shadow/Manifest index 1ec8d2d857d5..9c88513a5f59 100644 --- a/sys-apps/shadow/Manifest +++ b/sys-apps/shadow/Manifest @@ -12,10 +12,12 @@ AUX shadow-4.9-libcrack.patch 738 BLAKE2B 7ba0fd5e2c9c81bbefa75b2f1e29ed94ae32f3 AUX shadow-4.9-libsubid_oot_build.patch 2933 BLAKE2B 9bc638bd1d0733c6e51b54ab1f1db132bd4499a24b33efc76c58c306267015ebd9e2e927e774c3631cfa94490bb249b4d2267a163ae85f9f6ba18b964fcc81d4 SHA512 7f42cd84cb606fde19750f26883c4650642499dc6cb0078bc733d5d61a51b39c9f1c3898000e2df8ceb84eaecadbab6ae502178bf51d205fe644bb8c58a62bfa AUX shadow-4.9-libsubid_pam_linking.patch 706 BLAKE2B 8d9b3f6ab2aea004275e6347568013b0092beb57d08a51e6bbca0480773525518febd0ec975dd37a9c071c5ec17d56541586b9afa12010081a392dc60cee4c13 SHA512 49a40045520358d1fb29daae30f9fef1f8aab4516596f16781d3702642ef70592959536d69f4755d57689fc6e30d029c5dfc545d95362e811a284900cb628b6b DIST shadow-4.10.tar.xz 1662364 BLAKE2B 80b5f0f6b8fbb3e2ca134e14e93a3f67e5baa34d793ace5b90690676634f4cc72dfb4b3d50dbd7626c1a144898c1c943f8acbc8121903f17519c981986c284ae SHA512 39ffc1863d1f84aa39a2983c08e5adb93642b09e3e5e65c1c4e8a342207a79201b199e518e3701726014c7cb736977ef275d2dc1c659b5776183ae73978357da +DIST shadow-4.11.1.tar.xz 1656584 BLAKE2B d459a1e0ffb342b6b455caf65e6af60b32eee72d4a9b1ab126485fb4632503a42061d3f0b960554c8155af6dc0564c585335b27aecca6538b394a0d58d927588 SHA512 12fbe4d6ac929ad3c21525ed0f1026b5b678ccec9762f2ec7e611d9c180934def506325f2835fb750dd30af035b592f827ff151cd6e4c805aaaf8e01425c279f DIST shadow-4.8.1.tar.xz 1611196 BLAKE2B 952707cdd55dc6c00dcbc60dbc3bf84ac618dbe916b36d993802b3ce42594de332a9bc22933a28881af3d317a340eab017ada55511b4e4fbc3ca6b422c4bc254 SHA512 780a983483d847ed3c91c82064a0fa902b6f4185225978241bc3bc03fcc3aa143975b46aee43151c6ba43efcfdb1819516b76ba7ad3d1d3c34fcc38ea42e917b DIST shadow-4.9.tar.xz 1627008 BLAKE2B 7a9a6a489115c7a20520cfec61f008fc0f70f7f50aaf539e94dfdcb20035d2de88ab3198e76812a4e3eb944b92c76c0ca2e85e35f4342537711c2c033248a72b SHA512 254cda49bb14505a7604821e7fa898bf4bf317d648e9ddc881ab80a6860d52053dfffacad6feab87c7d16608c35ed6b6cee99e7757eac930da3a7b31cdcd4b95 -EBUILD shadow-4.10-r3.ebuild 6144 BLAKE2B e468918a5c1358f2a89534f5824f8a1d7033d48e2b39e43c3703bb4aa6afedfc7e3a013c8093bf6c51d495c3111c12e1aaaf9840cbfc8ac0856afc23cc426467 SHA512 294fbfd98972493289c6ee847acf5d5a89c29146dfaffb46d1ffe3f6ff143893c807831b9d7bf98a1a455c354bf4a61bf6c9535b85850d3e4c53d254f8b5dec8 -EBUILD shadow-4.8.1-r4.ebuild 6134 BLAKE2B a3effe54f52408bfee5ed17134a58806e005aab38391d4ff78888e3ae18c86f0d76dd946c2494bc92901e8400e7b98db0e4045f004a8880cb6c437acff28d560 SHA512 2e7375dd6c94bdc85eabfe8cb65d0c7df4bb1bc9b2aff418824046a8af80493f3a481476f63bdc91abca4aefcc61105b2aa6c551e8b260b8da1db2d0587b56fb -EBUILD shadow-4.9-r3.ebuild 6112 BLAKE2B 09778e7c21213de9f541bd46e50c647c9a64f83bb3556c9f1845d72504e394de42a3ee4e2f832ba9e532b8eb46f542160928ef4d6e0b97ca53060b4980be7445 SHA512 82753d7c7936d72b80dd759a94746c66cf89f68528584af369e2e1978807853e5d39364feea9b169e3c7beb0bbcceb46f2a1d11bbf0e7bd08ab55c0a84df9e6c -EBUILD shadow-4.9-r4.ebuild 6207 BLAKE2B d48c118d9d149bdc0c4002ac99ab649571bdcb410e9cd1dabcc81e9009f255e00e52bc85f2c63b3d08a74e15f51179fd09ec8261d5f9173b8cb3333d157b8d70 SHA512 8e008190604c318430141905e13321f4d287242548a9e10c5a345b1fd0d02bd6e26213f4487142fce39dcda49ca805033250d907002e6e2f4a7282670378208a +EBUILD shadow-4.10-r4.ebuild 6298 BLAKE2B 239be497a87a4ae3442c0aaf10b6f97f417d734eb41f7ef4ea1a4afb3951a9bc44922b6b624667066ed0172b7727cccc8da1ad98cafc7530e024b7eaf3714d14 SHA512 9c118d0fc3e81bf4300787b40bc03e4107be12cbebf32e311e866e9ccafa337e109448b8e7e6e0b5021d9ae7c3da45bfe3db4b3543a190505da251f4df4b5bb3 +EBUILD shadow-4.11.1.ebuild 6248 BLAKE2B 99f8d3f06126926bc79cf3b083fc4e433ae1199af3eccf3860c3987f0c21df4d4b1551b553106c4ce9e3be932505d199ccd3ebce53ae14fe4d945d3e52b170c8 SHA512 ebe44491e263ac74d31d79a07165deeb51e8080101df6dcb646da2500aaf039bd851ec764236771218661f80710fda0a096aa8cdad816463300a77226764c102 +EBUILD shadow-4.8.1-r4.ebuild 6057 BLAKE2B 88aef5e1dcbb7e3206040b43758336a18f60b60dc29e9cd3b67da71da5aa3d213d37a7fd3475979934a3c08061701d12d8761cd17b55f0609d9d331a3ffa0b33 SHA512 b838166f8cf0a7bd128b02b2368010251a0d65d65a3ab0bc3817a73d7393d297a055482fc5b431f239383ed07fb60bc351576f2bf725f17c023d39ef541e93a1 +EBUILD shadow-4.9-r3.ebuild 6035 BLAKE2B 7ed01b79a23ab4a88db83a16bf421edd1c4842cccdcc4228ffc3e33abd21c948bfb7c6e6ef50a33b0c591d7313653fbc5c9f367fa60c30b4c5e6baa02837e89c SHA512 10949dfabf88d084adaf12339d837632c4231e7038c57dd1432df686f1e70cd82aeacbc4d500ea628181944bfe0e82790be2916ee52d3c3a62e10d423760bfc6 +EBUILD shadow-4.9-r4.ebuild 6123 BLAKE2B 1cfc38547d3c49ffacd3787c970c22f8c2f45c3c49b01dffe4b6dad11e033f5540c1034a0b8945c5de6c823c2dd36b8966ec766e771ed81347c51e0bf7c55b88 SHA512 1bd4231f511efaad0ec9e692d1da42077ce9f50f250000a6389fc06e62fff8970ef2f47c44fcc0fa3e08f352bb0f3c5bb0fa42e39f898c3ff9b6c2da24b9c4ec MISC metadata.xml 606 BLAKE2B 2b14042f4702a908f8250c3fb6499ea33d8a8c44072707aa44881a36e3cc710256a821f8cd82c5214b32e9f5632745db4fdf00dd722f6fb7401e2f6b0bfbb4fd SHA512 694e039ae781982e8cbe6670b4e9c93b43455715ce4b9830a5fa61e6bf3eb91abcc284bf29c64fab055ba9754edaeab5d2da8140dbb2794fc1f534e2ccbb2b16 diff --git a/sys-apps/shadow/shadow-4.10-r3.ebuild b/sys-apps/shadow/shadow-4.10-r3.ebuild deleted file mode 100644 index 020224692897..000000000000 --- a/sys-apps/shadow/shadow-4.10-r3.ebuild +++ /dev/null @@ -1,253 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit autotools pam - -DESCRIPTION="Utilities to deal with user accounts" -HOMEPAGE="https://github.com/shadow-maint/shadow" -SRC_URI="https://github.com/shadow-maint/shadow/releases/download/v${PV}/${P}.tar.xz" - -LICENSE="BSD GPL-2" -# Subslot is for libsubid's SONAME. -SLOT="0/4" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" -IUSE="acl audit bcrypt cracklib nls pam selinux skey split-usr su xattr" -# Taken from the man/Makefile.am file. -LANGS=( cs da de es fi fr hu id it ja ko pl pt_BR ru sv tr zh_CN zh_TW ) - -REQUIRED_USE="?? ( cracklib pam )" - -BDEPEND=" - app-arch/xz-utils - sys-devel/gettext -" -COMMON_DEPEND=" - virtual/libcrypt:= - acl? ( sys-apps/acl:0= ) - audit? ( >=sys-process/audit-2.6:0= ) - cracklib? ( >=sys-libs/cracklib-2.7-r3:0= ) - nls? ( virtual/libintl ) - pam? ( sys-libs/pam:0= ) - skey? ( sys-auth/skey:0= ) - selinux? ( - >=sys-libs/libselinux-1.28:0= - sys-libs/libsemanage:0= - ) - xattr? ( sys-apps/attr:0= ) -" -DEPEND="${COMMON_DEPEND} - >=sys-kernel/linux-headers-4.14 -" -RDEPEND="${COMMON_DEPEND} - !=sys-auth/pambase-20150213 ) - su? ( !sys-apps/util-linux[su(-)] ) -" - -PATCHES=( - "${FILESDIR}/${PN}-4.1.3-dots-in-usernames.patch" - "${FILESDIR}/${PN}-4.10-libsubid-soname.patch" -) - -src_prepare() { - default - - eautoreconf - #elibtoolize -} - -src_configure() { - local myeconfargs=( - --disable-account-tools-setuid - --disable-static - --with-btrfs - --without-group-name-max-length - --without-tcb - $(use_enable nls) - $(use_with acl) - $(use_with audit) - $(use_with bcrypt) - $(use_with cracklib libcrack) - $(use_with elibc_glibc nscd) - $(use_with pam libpam) - $(use_with selinux) - $(use_with skey) - $(use_with su) - $(use_with xattr attr) - ) - econf "${myeconfargs[@]}" - - has_version 'sys-libs/uclibc[-rpc]' && sed -i '/RLOGIN/d' config.h #425052 - - if use nls ; then - local l langs="po" # These are the pot files. - for l in ${LANGS[*]} ; do - has ${l} ${LINGUAS-${l}} && langs+=" ${l}" - done - sed -i "/^SUBDIRS = /s:=.*:= ${langs}:" man/Makefile || die - fi -} - -set_login_opt() { - local comment="" opt=${1} val=${2} - if [[ -z ${val} ]]; then - comment="#" - sed -i \ - -e "/^${opt}\>/s:^:#:" \ - "${ED}"/etc/login.defs || die - else - sed -i -r \ - -e "/^#?${opt}\>/s:.*:${opt} ${val}:" \ - "${ED}"/etc/login.defs - fi - local res=$(grep "^${comment}${opt}\>" "${ED}"/etc/login.defs) - einfo "${res:-Unable to find ${opt} in /etc/login.defs}" -} - -src_install() { - emake DESTDIR="${D}" suidperms=4711 install - - # 4.9 regression: https://github.com/shadow-maint/shadow/issues/389 - emake DESTDIR="${D}" -C man install - - find "${ED}" -name '*.la' -type f -delete || die - - insinto /etc - if ! use pam ; then - insopts -m0600 - doins etc/login.access etc/limits - fi - - # needed for 'useradd -D' - insinto /etc/default - insopts -m0600 - doins "${FILESDIR}"/default/useradd - - if use split-usr ; then - # move passwd to / to help recover broke systems #64441 - # We cannot simply remove this or else net-misc/scponly - # and other tools will break because of hardcoded passwd - # location - dodir /bin - mv "${ED}"/usr/bin/passwd "${ED}"/bin/ || die - dosym ../../bin/passwd /usr/bin/passwd - fi - - cd "${S}" || die - insinto /etc - insopts -m0644 - newins etc/login.defs login.defs - - set_login_opt CREATE_HOME yes - if ! use pam ; then - set_login_opt MAIL_CHECK_ENAB no - set_login_opt SU_WHEEL_ONLY yes - set_login_opt CRACKLIB_DICTPATH /usr/lib/cracklib_dict - set_login_opt LOGIN_RETRIES 3 - set_login_opt ENCRYPT_METHOD SHA512 - set_login_opt CONSOLE - else - dopamd "${FILESDIR}"/pam.d-include/shadow - - for x in chsh shfn ; do - newpamd "${FILESDIR}"/pam.d-include/passwd ${x} - done - - for x in chpasswd newusers ; do - newpamd "${FILESDIR}"/pam.d-include/chpasswd ${x} - done - - newpamd "${FILESDIR}"/pam.d-include/shadow-r1 groupmems - - # comment out login.defs options that pam hates - local opt sed_args=() - for opt in \ - CHFN_AUTH \ - CONSOLE \ - CRACKLIB_DICTPATH \ - ENV_HZ \ - ENVIRON_FILE \ - FAILLOG_ENAB \ - FTMP_FILE \ - LASTLOG_ENAB \ - MAIL_CHECK_ENAB \ - MOTD_FILE \ - NOLOGINS_FILE \ - OBSCURE_CHECKS_ENAB \ - PASS_ALWAYS_WARN \ - PASS_CHANGE_TRIES \ - PASS_MIN_LEN \ - PORTTIME_CHECKS_ENAB \ - QUOTAS_ENAB \ - SU_WHEEL_ONLY - do - set_login_opt ${opt} - sed_args+=( -e "/^#${opt}\>/b pamnote" ) - done - sed -i "${sed_args[@]}" \ - -e 'b exit' \ - -e ': pamnote; i# NOTE: This setting should be configured via /etc/pam.d/ and not in this file.' \ - -e ': exit' \ - "${ED}"/etc/login.defs || die - - # remove manpages that pam will install for us - # and/or don't apply when using pam - find "${ED}"/usr/share/man -type f \ - '(' -name 'limits.5*' -o -name 'suauth.5*' ')' \ - -delete - - # Remove pam.d files provided by pambase. - rm "${ED}"/etc/pam.d/{login,passwd} || die - if use su ; then - rm "${ED}"/etc/pam.d/su || die - fi - fi - - # Remove manpages that are handled by other packages - find "${ED}"/usr/share/man -type f \ - '(' -name id.1 -o -name getspnam.3 ')' \ - -delete || die - - if ! use su ; then - find "${ED}"/usr/share/man -type f -name su.1 -delete || die - fi - - cd "${S}" || die - dodoc ChangeLog NEWS TODO - newdoc README README.download - cd doc || die - dodoc HOWTO README* WISHLIST *.txt -} - -pkg_preinst() { - rm -f "${EROOT}"/etc/pam.d/system-auth.new \ - "${EROOT}/etc/login.defs.new" -} - -pkg_postinst() { - # Enable shadow groups. - if [ ! -f "${EROOT}"/etc/gshadow ] ; then - if grpck -r -R "${EROOT}" 2>/dev/null ; then - grpconv -R "${EROOT}" - else - ewarn "Running 'grpck' returned errors. Please run it by hand, and then" - ewarn "run 'grpconv' afterwards!" - fi - fi - - [[ ! -f "${EROOT}"/etc/subgid ]] && - touch "${EROOT}"/etc/subgid - [[ ! -f "${EROOT}"/etc/subuid ]] && - touch "${EROOT}"/etc/subuid - - einfo "The 'adduser' symlink to 'useradd' has been dropped." -} diff --git a/sys-apps/shadow/shadow-4.10-r4.ebuild b/sys-apps/shadow/shadow-4.10-r4.ebuild new file mode 100644 index 000000000000..af2ce039df60 --- /dev/null +++ b/sys-apps/shadow/shadow-4.10-r4.ebuild @@ -0,0 +1,257 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools pam + +DESCRIPTION="Utilities to deal with user accounts" +HOMEPAGE="https://github.com/shadow-maint/shadow" +SRC_URI="https://github.com/shadow-maint/shadow/releases/download/v${PV}/${P}.tar.xz" + +LICENSE="BSD GPL-2" +# Subslot is for libsubid's SONAME. +SLOT="0/4" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="acl audit bcrypt cracklib nls pam selinux skey split-usr su xattr" +# Taken from the man/Makefile.am file. +LANGS=( cs da de es fi fr hu id it ja ko pl pt_BR ru sv tr zh_CN zh_TW ) + +REQUIRED_USE="?? ( cracklib pam )" + +BDEPEND=" + app-arch/xz-utils + sys-devel/gettext +" +COMMON_DEPEND=" + virtual/libcrypt:= + acl? ( sys-apps/acl:0= ) + audit? ( >=sys-process/audit-2.6:0= ) + cracklib? ( >=sys-libs/cracklib-2.7-r3:0= ) + nls? ( virtual/libintl ) + pam? ( sys-libs/pam:0= ) + skey? ( sys-auth/skey:0= ) + selinux? ( + >=sys-libs/libselinux-1.28:0= + sys-libs/libsemanage:0= + ) + xattr? ( sys-apps/attr:0= ) +" +DEPEND="${COMMON_DEPEND} + >=sys-kernel/linux-headers-4.14 +" +RDEPEND="${COMMON_DEPEND} + !=sys-auth/pambase-20150213 ) + su? ( !sys-apps/util-linux[su(-)] ) +" + +PATCHES=( + "${FILESDIR}/${PN}-4.1.3-dots-in-usernames.patch" + "${FILESDIR}/${PN}-4.10-libsubid-soname.patch" +) + +src_prepare() { + default + + eautoreconf + #elibtoolize +} + +src_configure() { + local myeconfargs=( + --disable-account-tools-setuid + --disable-static + --with-btrfs + --without-group-name-max-length + --without-tcb + $(use_enable nls) + $(use_with acl) + $(use_with audit) + $(use_with bcrypt) + $(use_with cracklib libcrack) + $(use_with elibc_glibc nscd) + $(use_with pam libpam) + $(use_with selinux) + $(use_with skey) + $(use_with su) + $(use_with xattr attr) + ) + econf "${myeconfargs[@]}" + + if use nls ; then + local l langs="po" # These are the pot files. + for l in ${LANGS[*]} ; do + has ${l} ${LINGUAS-${l}} && langs+=" ${l}" + done + sed -i "/^SUBDIRS = /s:=.*:= ${langs}:" man/Makefile || die + fi +} + +set_login_opt() { + local comment="" opt=${1} val=${2} + if [[ -z ${val} ]]; then + comment="#" + sed -i \ + -e "/^${opt}\>/s:^:#:" \ + "${ED}"/etc/login.defs || die + else + sed -i -r \ + -e "/^#?${opt}\>/s:.*:${opt} ${val}:" \ + "${ED}"/etc/login.defs + fi + local res=$(grep "^${comment}${opt}\>" "${ED}"/etc/login.defs) + einfo "${res:-Unable to find ${opt} in /etc/login.defs}" +} + +src_install() { + emake DESTDIR="${D}" suidperms=4711 install + + # 4.9 regression: https://github.com/shadow-maint/shadow/issues/389 + emake DESTDIR="${D}" -C man install + + find "${ED}" -name '*.la' -type f -delete || die + + insinto /etc + if ! use pam ; then + insopts -m0600 + doins etc/login.access etc/limits + fi + + # needed for 'useradd -D' + insinto /etc/default + insopts -m0600 + doins "${FILESDIR}"/default/useradd + + if use split-usr ; then + # move passwd to / to help recover broke systems #64441 + # We cannot simply remove this or else net-misc/scponly + # and other tools will break because of hardcoded passwd + # location + dodir /bin + mv "${ED}"/usr/bin/passwd "${ED}"/bin/ || die + dosym ../../bin/passwd /usr/bin/passwd + fi + + cd "${S}" || die + insinto /etc + insopts -m0644 + newins etc/login.defs login.defs + + set_login_opt CREATE_HOME yes + if ! use pam ; then + set_login_opt MAIL_CHECK_ENAB no + set_login_opt SU_WHEEL_ONLY yes + set_login_opt CRACKLIB_DICTPATH /usr/lib/cracklib_dict + set_login_opt LOGIN_RETRIES 3 + set_login_opt ENCRYPT_METHOD SHA512 + set_login_opt CONSOLE + else + dopamd "${FILESDIR}"/pam.d-include/shadow + + for x in chsh shfn ; do + newpamd "${FILESDIR}"/pam.d-include/passwd ${x} + done + + for x in chpasswd newusers ; do + newpamd "${FILESDIR}"/pam.d-include/chpasswd ${x} + done + + newpamd "${FILESDIR}"/pam.d-include/shadow-r1 groupmems + + # comment out login.defs options that pam hates + local opt sed_args=() + for opt in \ + CHFN_AUTH \ + CONSOLE \ + CRACKLIB_DICTPATH \ + ENV_HZ \ + ENVIRON_FILE \ + FAILLOG_ENAB \ + FTMP_FILE \ + LASTLOG_ENAB \ + MAIL_CHECK_ENAB \ + MOTD_FILE \ + NOLOGINS_FILE \ + OBSCURE_CHECKS_ENAB \ + PASS_ALWAYS_WARN \ + PASS_CHANGE_TRIES \ + PASS_MIN_LEN \ + PORTTIME_CHECKS_ENAB \ + QUOTAS_ENAB \ + SU_WHEEL_ONLY + do + set_login_opt ${opt} + sed_args+=( -e "/^#${opt}\>/b pamnote" ) + done + sed -i "${sed_args[@]}" \ + -e 'b exit' \ + -e ': pamnote; i# NOTE: This setting should be configured via /etc/pam.d/ and not in this file.' \ + -e ': exit' \ + "${ED}"/etc/login.defs || die + + # remove manpages that pam will install for us + # and/or don't apply when using pam + find "${ED}"/usr/share/man -type f \ + '(' -name 'limits.5*' -o -name 'suauth.5*' ')' \ + -delete + + # Remove pam.d files provided by pambase. + rm "${ED}"/etc/pam.d/{login,passwd} || die + if use su ; then + rm "${ED}"/etc/pam.d/su || die + fi + fi + + # Remove manpages that are handled by other packages + find "${ED}"/usr/share/man -type f \ + '(' -name id.1 -o -name getspnam.3 ')' \ + -delete || die + + if ! use su ; then + find "${ED}"/usr/share/man -type f -name su.1 -delete || die + fi + + cd "${S}" || die + dodoc ChangeLog NEWS TODO + newdoc README README.download + cd doc || die + dodoc HOWTO README* WISHLIST *.txt +} + +pkg_preinst() { + rm -f "${EROOT}"/etc/pam.d/system-auth.new \ + "${EROOT}/etc/login.defs.new" +} + +pkg_postinst() { + # Missing entries from /etc/passwd can cause odd system blips. + # See bug #829872. + if ! pwck -r -q -R "${EROOT:-/}" &>/dev/null ; then + ewarn "Running 'pwck' returned errors. Please run it manually to fix any errors." + fi + + # Enable shadow groups. + if [ ! -f "${EROOT}"/etc/gshadow ] ; then + if grpck -r -R "${EROOT:-/}" 2>/dev/null ; then + grpconv -R "${EROOT:-/}" + else + ewarn "Running 'grpck' returned errors. Please run it by hand, and then" + ewarn "run 'grpconv' afterwards!" + fi + fi + + [[ ! -f "${EROOT}"/etc/subgid ]] && + touch "${EROOT}"/etc/subgid + [[ ! -f "${EROOT}"/etc/subuid ]] && + touch "${EROOT}"/etc/subuid + + einfo "The 'adduser' symlink to 'useradd' has been dropped." +} diff --git a/sys-apps/shadow/shadow-4.11.1.ebuild b/sys-apps/shadow/shadow-4.11.1.ebuild new file mode 100644 index 000000000000..f9a60e2b722d --- /dev/null +++ b/sys-apps/shadow/shadow-4.11.1.ebuild @@ -0,0 +1,256 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit libtool pam + +DESCRIPTION="Utilities to deal with user accounts" +HOMEPAGE="https://github.com/shadow-maint/shadow" +SRC_URI="https://github.com/shadow-maint/shadow/releases/download/v${PV}/${P}.tar.xz" + +LICENSE="BSD GPL-2" +# Subslot is for libsubid's SONAME. +SLOT="0/4" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="acl audit bcrypt cracklib nls pam selinux skey split-usr su xattr" +# Taken from the man/Makefile.am file. +LANGS=( cs da de es fi fr hu id it ja ko pl pt_BR ru sv tr zh_CN zh_TW ) + +REQUIRED_USE="?? ( cracklib pam )" + +BDEPEND=" + app-arch/xz-utils + sys-devel/gettext +" +COMMON_DEPEND=" + virtual/libcrypt:= + acl? ( sys-apps/acl:0= ) + audit? ( >=sys-process/audit-2.6:0= ) + cracklib? ( >=sys-libs/cracklib-2.7-r3:0= ) + nls? ( virtual/libintl ) + pam? ( sys-libs/pam:0= ) + skey? ( sys-auth/skey:0= ) + selinux? ( + >=sys-libs/libselinux-1.28:0= + sys-libs/libsemanage:0= + ) + xattr? ( sys-apps/attr:0= ) +" +DEPEND="${COMMON_DEPEND} + >=sys-kernel/linux-headers-4.14 +" +RDEPEND="${COMMON_DEPEND} + !=sys-auth/pambase-20150213 ) + su? ( !sys-apps/util-linux[su(-)] ) +" + +PATCHES=( + "${FILESDIR}/${PN}-4.1.3-dots-in-usernames.patch" +) + +src_prepare() { + default + + #eautoreconf + elibtoolize +} + +src_configure() { + local myeconfargs=( + --disable-account-tools-setuid + --disable-static + --with-btrfs + --without-group-name-max-length + --without-tcb + $(use_enable nls) + $(use_with acl) + $(use_with audit) + $(use_with bcrypt) + $(use_with cracklib libcrack) + $(use_with elibc_glibc nscd) + $(use_with pam libpam) + $(use_with selinux) + $(use_with skey) + $(use_with su) + $(use_with xattr attr) + ) + econf "${myeconfargs[@]}" + + if use nls ; then + local l langs="po" # These are the pot files. + for l in ${LANGS[*]} ; do + has ${l} ${LINGUAS-${l}} && langs+=" ${l}" + done + sed -i "/^SUBDIRS = /s:=.*:= ${langs}:" man/Makefile || die + fi +} + +set_login_opt() { + local comment="" opt=${1} val=${2} + if [[ -z ${val} ]]; then + comment="#" + sed -i \ + -e "/^${opt}\>/s:^:#:" \ + "${ED}"/etc/login.defs || die + else + sed -i -r \ + -e "/^#?${opt}\>/s:.*:${opt} ${val}:" \ + "${ED}"/etc/login.defs + fi + local res=$(grep "^${comment}${opt}\>" "${ED}"/etc/login.defs) + einfo "${res:-Unable to find ${opt} in /etc/login.defs}" +} + +src_install() { + emake DESTDIR="${D}" suidperms=4711 install + + # 4.9 regression: https://github.com/shadow-maint/shadow/issues/389 + emake DESTDIR="${D}" -C man install + + find "${ED}" -name '*.la' -type f -delete || die + + insinto /etc + if ! use pam ; then + insopts -m0600 + doins etc/login.access etc/limits + fi + + # needed for 'useradd -D' + insinto /etc/default + insopts -m0600 + doins "${FILESDIR}"/default/useradd + + if use split-usr ; then + # move passwd to / to help recover broke systems #64441 + # We cannot simply remove this or else net-misc/scponly + # and other tools will break because of hardcoded passwd + # location + dodir /bin + mv "${ED}"/usr/bin/passwd "${ED}"/bin/ || die + dosym ../../bin/passwd /usr/bin/passwd + fi + + cd "${S}" || die + insinto /etc + insopts -m0644 + newins etc/login.defs login.defs + + set_login_opt CREATE_HOME yes + if ! use pam ; then + set_login_opt MAIL_CHECK_ENAB no + set_login_opt SU_WHEEL_ONLY yes + set_login_opt CRACKLIB_DICTPATH /usr/lib/cracklib_dict + set_login_opt LOGIN_RETRIES 3 + set_login_opt ENCRYPT_METHOD SHA512 + set_login_opt CONSOLE + else + dopamd "${FILESDIR}"/pam.d-include/shadow + + for x in chsh shfn ; do + newpamd "${FILESDIR}"/pam.d-include/passwd ${x} + done + + for x in chpasswd newusers ; do + newpamd "${FILESDIR}"/pam.d-include/chpasswd ${x} + done + + newpamd "${FILESDIR}"/pam.d-include/shadow-r1 groupmems + + # comment out login.defs options that pam hates + local opt sed_args=() + for opt in \ + CHFN_AUTH \ + CONSOLE \ + CRACKLIB_DICTPATH \ + ENV_HZ \ + ENVIRON_FILE \ + FAILLOG_ENAB \ + FTMP_FILE \ + LASTLOG_ENAB \ + MAIL_CHECK_ENAB \ + MOTD_FILE \ + NOLOGINS_FILE \ + OBSCURE_CHECKS_ENAB \ + PASS_ALWAYS_WARN \ + PASS_CHANGE_TRIES \ + PASS_MIN_LEN \ + PORTTIME_CHECKS_ENAB \ + QUOTAS_ENAB \ + SU_WHEEL_ONLY + do + set_login_opt ${opt} + sed_args+=( -e "/^#${opt}\>/b pamnote" ) + done + sed -i "${sed_args[@]}" \ + -e 'b exit' \ + -e ': pamnote; i# NOTE: This setting should be configured via /etc/pam.d/ and not in this file.' \ + -e ': exit' \ + "${ED}"/etc/login.defs || die + + # remove manpages that pam will install for us + # and/or don't apply when using pam + find "${ED}"/usr/share/man -type f \ + '(' -name 'limits.5*' -o -name 'suauth.5*' ')' \ + -delete + + # Remove pam.d files provided by pambase. + rm "${ED}"/etc/pam.d/{login,passwd} || die + if use su ; then + rm "${ED}"/etc/pam.d/su || die + fi + fi + + # Remove manpages that are handled by other packages + find "${ED}"/usr/share/man -type f \ + '(' -name id.1 -o -name getspnam.3 ')' \ + -delete || die + + if ! use su ; then + find "${ED}"/usr/share/man -type f -name su.1 -delete || die + fi + + cd "${S}" || die + dodoc ChangeLog NEWS TODO + newdoc README README.download + cd doc || die + dodoc HOWTO README* WISHLIST *.txt +} + +pkg_preinst() { + rm -f "${EROOT}"/etc/pam.d/system-auth.new \ + "${EROOT}/etc/login.defs.new" +} + +pkg_postinst() { + # Missing entries from /etc/passwd can cause odd system blips. + # See bug #829872. + if ! pwck -r -q -R "${EROOT:-/}" &>/dev/null ; then + ewarn "Running 'pwck' returned errors. Please run it manually to fix any errors." + fi + + # Enable shadow groups. + if [ ! -f "${EROOT}"/etc/gshadow ] ; then + if grpck -r -R "${EROOT:-/}" 2>/dev/null ; then + grpconv -R "${EROOT:-/}" + else + ewarn "Running 'grpck' returned errors. Please run it by hand, and then" + ewarn "run 'grpconv' afterwards!" + fi + fi + + [[ ! -f "${EROOT}"/etc/subgid ]] && + touch "${EROOT}"/etc/subgid + [[ ! -f "${EROOT}"/etc/subuid ]] && + touch "${EROOT}"/etc/subuid + + einfo "The 'adduser' symlink to 'useradd' has been dropped." +} diff --git a/sys-apps/shadow/shadow-4.8.1-r4.ebuild b/sys-apps/shadow/shadow-4.8.1-r4.ebuild index 0f0c0c206359..8471d2236d9d 100644 --- a/sys-apps/shadow/shadow-4.8.1-r4.ebuild +++ b/sys-apps/shadow/shadow-4.8.1-r4.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 @@ -84,8 +84,6 @@ src_configure() { ) econf "${myeconfargs[@]}" - has_version 'sys-libs/uclibc[-rpc]' && sed -i '/RLOGIN/d' config.h #425052 - if use nls ; then local l langs="po" # These are the pot files. for l in ${LANGS[*]} ; do diff --git a/sys-apps/shadow/shadow-4.9-r3.ebuild b/sys-apps/shadow/shadow-4.9-r3.ebuild index 69a16bb519be..6d6e13ab4822 100644 --- a/sys-apps/shadow/shadow-4.9-r3.ebuild +++ b/sys-apps/shadow/shadow-4.9-r3.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 @@ -86,8 +86,6 @@ src_configure() { ) econf "${myeconfargs[@]}" - has_version 'sys-libs/uclibc[-rpc]' && sed -i '/RLOGIN/d' config.h #425052 - if use nls ; then local l langs="po" # These are the pot files. for l in ${LANGS[*]} ; do diff --git a/sys-apps/shadow/shadow-4.9-r4.ebuild b/sys-apps/shadow/shadow-4.9-r4.ebuild index 044718eed4c1..b9f851ce8115 100644 --- a/sys-apps/shadow/shadow-4.9-r4.ebuild +++ b/sys-apps/shadow/shadow-4.9-r4.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 @@ -11,7 +11,7 @@ SRC_URI="https://github.com/shadow-maint/shadow/releases/download/v${PV}/${P}.ta LICENSE="BSD GPL-2" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" IUSE="acl audit bcrypt cracklib nls pam selinux skey split-usr +su xattr" # Taken from the man/Makefile.am file. LANGS=( cs da de es fi fr hu id it ja ko pl pt_BR ru sv tr zh_CN zh_TW ) @@ -88,8 +88,6 @@ src_configure() { ) econf "${myeconfargs[@]}" - has_version 'sys-libs/uclibc[-rpc]' && sed -i '/RLOGIN/d' config.h #425052 - if use nls ; then local l langs="po" # These are the pot files. for l in ${LANGS[*]} ; do -- cgit v1.2.3