diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-02-12 11:35:28 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-02-12 11:35:28 +0000 |
commit | be02a7a73b91bee15befeba8a15dd2bc0b582585 (patch) | |
tree | 8c137ee3b6d0b81af47dde600e113572d398b08a /sys-apps | |
parent | c1b4edfc987ed3d2b1f39cdf70d1b9a19e725616 (diff) |
gentoo auto-resync : 12:02:2024 - 11:35:27
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/Manifest.gz | bin | 50361 -> 50364 bytes | |||
-rw-r--r-- | sys-apps/man-pages/Manifest | 5 | ||||
-rw-r--r-- | sys-apps/man-pages/man-pages-6.06.ebuild | 150 | ||||
-rw-r--r-- | sys-apps/man-pages/man-pages-9999.ebuild | 34 | ||||
-rw-r--r-- | sys-apps/shadow/Manifest | 3 | ||||
-rw-r--r-- | sys-apps/shadow/shadow-4.14.4.ebuild | 276 |
6 files changed, 464 insertions, 4 deletions
diff --git a/sys-apps/Manifest.gz b/sys-apps/Manifest.gz Binary files differindex 4565672565b5..2300ca75b474 100644 --- a/sys-apps/Manifest.gz +++ b/sys-apps/Manifest.gz diff --git a/sys-apps/man-pages/Manifest b/sys-apps/man-pages/Manifest index 7fb4fcf1f696..4b211cec7178 100644 --- a/sys-apps/man-pages/Manifest +++ b/sys-apps/man-pages/Manifest @@ -1,7 +1,10 @@ DIST man-pages-6.04.tar.xz 2188236 BLAKE2B 741ff7e279c9bd961a1d39e432599a985d010516c03eb13978c5bda46a26ef914053c511bce923d49eb9111b3a1f7537e4418df3b5abd2eb0c051faf9f39c7fb SHA512 3f95d15dda419e824f902947a268d8021e9e04c5ba8503e4fe9f96a9ab8363fde8088b2712cc9c795638163ad8432bc5f8c6a3ea320293ec6aa79bb748e85b9e DIST man-pages-6.05.01.tar.xz 2194472 BLAKE2B edc40828bc9c75f655a8352f10c214d68b64f90815cc947f65d49794e0b588b103cae28b3644e41bedd8caaa6cef3c77b02525d8c2ccc91ccf887a10b2f2c32a SHA512 ad3f6dc28bb83824faf8c855a5db8983dc0f5ac3b5702624033ed320a6f39a7f1f0845acf0bc62a0a10cdfe42eb66ba9596e2796ba2683cfb29e480710da3d70 +DIST man-pages-6.06.tar.sign 833 BLAKE2B 7198f7a024731fcaeb97c131ff02611cefc60cf26fa8bac013c82d90f1f9dcd39230adc6ad94c97488c7a8d844b0bb31db6fea2528d84084dec54454a073f3c1 SHA512 21304778df56f079c8b3ff38cf42453697a2b155964069bf6837b9c89b32c3a80eef9cfd0c2f9e3feeee12889cb4e6dd1d4ef1fae75cc646fed84289c5862578 +DIST man-pages-6.06.tar.xz 2166012 BLAKE2B 49c022204f8ce82fafd6f34a590a310beb6618d884290123a755efd38a71c974aa2e49d729655fcf82df0b96db8f782c1b2eac5174b319b6a383740e715fa11a SHA512 c50b5a47cff5172e46752b61af4dd9f54ee0be88ab69bcc5914bd8ce5ddfaf7358143bea9f69bd6a45f0420eb5eb4596c2200109b23fe98a5221dd01e4a8ea15 DIST man-pages-gentoo-2.tar.bz2 5141 BLAKE2B c5c7956ab47c8a473e258b1902d5d19d9eb2e9d01786e907d9c3ba691c2a506834ed96cd1f54e8d8415e65d4fea0056659537f0faffe68fcbed33aa728a5e61e SHA512 6e6524b8ad6f1b8c9b147665ee32af49e05603dac61d433acd6b4f1164adef27cd542898f272b07d8659725013dac59c7f34a858968cc054a4785c945e14a770 EBUILD man-pages-6.04.ebuild 3585 BLAKE2B d0fadcaf3f096029d388447a0cb9f0f281786fada32a79a2f6cfa400226f653cdeceec92fdafc56a13f8fcfc7b788f2ccb124ff6763d0082c8cf9d0b738bb763 SHA512 d4f0ada88c0aefc8a753300f930170ea1d3faad28d24bec4df9fffae8c285974360f00a6ded62bd6b301af1881a15f5ac732267304473dba95edc973942f2ad7 EBUILD man-pages-6.05.01.ebuild 3585 BLAKE2B d0fadcaf3f096029d388447a0cb9f0f281786fada32a79a2f6cfa400226f653cdeceec92fdafc56a13f8fcfc7b788f2ccb124ff6763d0082c8cf9d0b738bb763 SHA512 d4f0ada88c0aefc8a753300f930170ea1d3faad28d24bec4df9fffae8c285974360f00a6ded62bd6b301af1881a15f5ac732267304473dba95edc973942f2ad7 -EBUILD man-pages-9999.ebuild 3593 BLAKE2B c317472d6e1c89f336eaddf13fbda7749b628f155609c451960d64fbb3e545e420a5fbf09c3f3764e2483abf9f786d04f213dc33d0653e9cb4f56fcce67cfabb SHA512 5299684fbf4dd058b97f947f8ac3d3fa9c436ddeeccbc19bb0b84557c052ebe5660aa669dd533c0848efccf90d4162c5129a9cf89740099418930807a9c7a64c +EBUILD man-pages-6.06.ebuild 4449 BLAKE2B a0753ea92b599e432710e8c9cfe291fd23370426a7c64e15e9bfa29e3749d3eb0ff4a57c9f0d4120462e0b18d98ef990cd59d4deb8bbf9326e95a896a237f711 SHA512 c409a7c58bfbbf15d2e76d330e1b9ccfd42712516dc07aa61a27b5968a39edb793124ed8f904055a9423ac41a3519ad067665455d79dc273a7b9767ac27d2de7 +EBUILD man-pages-9999.ebuild 4449 BLAKE2B a0753ea92b599e432710e8c9cfe291fd23370426a7c64e15e9bfa29e3749d3eb0ff4a57c9f0d4120462e0b18d98ef990cd59d4deb8bbf9326e95a896a237f711 SHA512 c409a7c58bfbbf15d2e76d330e1b9ccfd42712516dc07aa61a27b5968a39edb793124ed8f904055a9423ac41a3519ad067665455d79dc273a7b9767ac27d2de7 MISC metadata.xml 277 BLAKE2B 866b0f11a1927de0a75083001a598aa5ff99fc21b3e2b61811bda22915df73776a2d0ffe350497964c95c47a050723d2573d7248589c5cce28ba83c2660736b9 SHA512 0f502e6d4e3e23c0c88e2d5f4ba641974d934a175a643ba2ad96cdd954a2ab26972794b6ca9a1b370536c6eade6798bcb9c89be0193d170320e1b0f302a2747f diff --git a/sys-apps/man-pages/man-pages-6.06.ebuild b/sys-apps/man-pages/man-pages-6.06.ebuild new file mode 100644 index 000000000000..04246b807452 --- /dev/null +++ b/sys-apps/man-pages/man-pages-6.06.ebuild @@ -0,0 +1,150 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Maintenance notes: +# - Upstream are very friendly, do approach them if have any questions; +# +# - It's considered fine (and somewhat encouraged) for us to make snapshots +# if we want specific fixes, perhaps aligned with newer kernels, glibc, etc. +# Just generate it with 'make dist'. We can set DISTVERSION if we want a vanity +# name or if the comit hash is too long; +# +# - If we do use a snapshot, *don't* grab it directly from git and use it +# raw in the ebuild. Use 'make dist' as above; +# +# - Sometimes there's no dist tarball available post-release and upstream +# encourage distros to make their own. Set MAN_PAGES_GENTOO_DIST to 1 if none is +# available, 0 otherwise. +MAN_PAGES_GENTOO_DIST=0 +GENTOO_PATCH=2 + +DESCRIPTION="A somewhat comprehensive collection of Linux man pages" +HOMEPAGE="https://www.kernel.org/doc/man-pages/" + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git" + inherit git-r3 +elif [[ ${PV} == *_rc* ]] ; then + MY_P=${PN}-${PV/_/-} + + SRC_URI="https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/snapshot/${MY_P}.tar.gz" + S="${WORKDIR}"/${MY_P} +else + if [[ ${MAN_PAGES_GENTOO_DIST} -eq 1 ]] ; then + SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-gentoo.tar.xz" + else + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/alejandro-colomar.asc + inherit verify-sig + + SRC_URI=" + https://www.kernel.org/pub/linux/docs/man-pages/Archive/${P}.tar.xz + https://www.kernel.org/pub/linux/docs/man-pages/${P}.tar.xz + verify-sig? ( + https://www.kernel.org/pub/linux/docs/man-pages/Archive/${P}.tar.sign + https://www.kernel.org/pub/linux/docs/man-pages/${P}.tar.sign + ) + " + + BDEPEND="verify-sig? ( sec-keys/openpgp-keys-alejandro-colomar )" + fi + + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos" +fi + +SRC_URI+=" + mirror://gentoo/man-pages-gentoo-${GENTOO_PATCH}.tar.bz2 + https://dev.gentoo.org/~cardoe/files/man-pages-gentoo-${GENTOO_PATCH}.tar.bz2 +" + +LICENSE="man-pages GPL-2+ BSD" +SLOT="0" +# Keep the following in sync with app-i18n/man-pages-l10n +MY_L10N=( cs da de el es fi fr hu id it mk nb nl pl pt-BR ro sr sv uk vi ) +IUSE="l10n_ja l10n_ru l10n_zh-CN ${MY_L10N[@]/#/l10n_}" +RESTRICT="binchecks" + +BDEPEND+=" + app-alternatives/bc +" +# Block packages that used to install colliding man pages: +# bug #341953, bug #548900, bug #612640, bug #617462 +RDEPEND=" + virtual/man + !<sys-apps/keyutils-1.5.9-r4 + !<dev-libs/libbsd-0.8.3-r1 +" +PDEPEND=" + l10n_ja? ( app-i18n/man-pages-ja ) + l10n_ru? ( || ( + app-i18n/man-pages-l10n[l10n_ru(-)] + app-i18n/man-pages-ru + ) ) + l10n_zh-CN? ( app-i18n/man-pages-zh_CN ) +" +for lang in "${MY_L10N[@]}"; do + PDEPEND+=" l10n_${lang}? ( app-i18n/man-pages-l10n[l10n_${lang}(-)] )" +done +unset lang + +src_unpack() { + if [[ ${PV} == 9999 ]] ; then + git-r3_src_unpack + return + fi + + if [[ ${PV} != *_rc* ]] && ! [[ ${MAN_PAGES_GENTOO_DIST} -eq 1 ]] && use verify-sig ; then + mkdir "${T}"/verify-sig || die + pushd "${T}"/verify-sig &>/dev/null || die + + # Upstream sign the decompressed .tar + # Let's do it separately in ${T} then cleanup to avoid external + # effects on normal unpack. + cp "${DISTDIR}"/${P}.tar.xz . || die + xz -d ${P}.tar.xz || die + verify-sig_verify_detached ${P}.tar "${DISTDIR}"/${P}.tar.sign + + popd &>/dev/null || die + rm -r "${T}"/verify-sig || die + fi + + default +} + +src_prepare() { + default + + # passwd.5 installed by sys-apps/shadow, bug #776787 + rm man5/passwd.5 || die +} + +src_compile() { :; } + +src_test() { + # We don't use the 'check' target right now because of known errors + # https://lore.kernel.org/linux-man/0dfd5319-2d22-a8ad-f085-d635eb6d0678@gmail.com/T/#t + emake lint-man-tbl +} + +src_install() { + emake install prefix="${EPREFIX}"/usr DESTDIR="${D}" + dodoc README Changes* + + # Override with Gentoo specific or additional Gentoo pages + cd "${WORKDIR}"/man-pages-gentoo || die + doman */* + dodoc README.Gentoo +} + +pkg_postinst() { + for ver in ${REPLACING_VERSIONS} ; do + if ver_test ${ver} -lt 5.13-r2 ; then + # Avoid ACCEPT_LICENSE issues for users by default + # bug #871636 + ewarn "This version of ${PN} no longer depends on sys-apps/man-pages-posix!" + ewarn "Please install sys-apps/man-pages-posix yourself if needed." + break + fi + done +} diff --git a/sys-apps/man-pages/man-pages-9999.ebuild b/sys-apps/man-pages/man-pages-9999.ebuild index 4afe72595a0d..04246b807452 100644 --- a/sys-apps/man-pages/man-pages-9999.ebuild +++ b/sys-apps/man-pages/man-pages-9999.ebuild @@ -22,6 +22,7 @@ GENTOO_PATCH=2 DESCRIPTION="A somewhat comprehensive collection of Linux man pages" HOMEPAGE="https://www.kernel.org/doc/man-pages/" + if [[ ${PV} == 9999 ]] ; then EGIT_REPO_URI="https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git" inherit git-r3 @@ -34,10 +35,19 @@ else if [[ ${MAN_PAGES_GENTOO_DIST} -eq 1 ]] ; then SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-gentoo.tar.xz" else + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/alejandro-colomar.asc + inherit verify-sig + SRC_URI=" https://www.kernel.org/pub/linux/docs/man-pages/Archive/${P}.tar.xz https://www.kernel.org/pub/linux/docs/man-pages/${P}.tar.xz + verify-sig? ( + https://www.kernel.org/pub/linux/docs/man-pages/Archive/${P}.tar.sign + https://www.kernel.org/pub/linux/docs/man-pages/${P}.tar.sign + ) " + + BDEPEND="verify-sig? ( sec-keys/openpgp-keys-alejandro-colomar )" fi KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos" @@ -55,7 +65,7 @@ MY_L10N=( cs da de el es fi fr hu id it mk nb nl pl pt-BR ro sr sv uk vi ) IUSE="l10n_ja l10n_ru l10n_zh-CN ${MY_L10N[@]/#/l10n_}" RESTRICT="binchecks" -BDEPEND=" +BDEPEND+=" app-alternatives/bc " # Block packages that used to install colliding man pages: @@ -79,9 +89,27 @@ done unset lang src_unpack() { - default + if [[ ${PV} == 9999 ]] ; then + git-r3_src_unpack + return + fi - [[ ${PV} == 9999 ]] && git-r3_src_unpack + if [[ ${PV} != *_rc* ]] && ! [[ ${MAN_PAGES_GENTOO_DIST} -eq 1 ]] && use verify-sig ; then + mkdir "${T}"/verify-sig || die + pushd "${T}"/verify-sig &>/dev/null || die + + # Upstream sign the decompressed .tar + # Let's do it separately in ${T} then cleanup to avoid external + # effects on normal unpack. + cp "${DISTDIR}"/${P}.tar.xz . || die + xz -d ${P}.tar.xz || die + verify-sig_verify_detached ${P}.tar "${DISTDIR}"/${P}.tar.sign + + popd &>/dev/null || die + rm -r "${T}"/verify-sig || die + fi + + default } src_prepare() { diff --git a/sys-apps/shadow/Manifest b/sys-apps/shadow/Manifest index fdc459034aef..5007cd8e201e 100644 --- a/sys-apps/shadow/Manifest +++ b/sys-apps/shadow/Manifest @@ -16,9 +16,12 @@ DIST shadow-4.14.2.tar.xz 1799548 BLAKE2B 419f0a516753616ef691f71ec9002eef6fd756 DIST shadow-4.14.2.tar.xz.asc 833 BLAKE2B 9e085c79ccd3aa77489eb92e947dd4875dea84be2dbcbd2b8443e70b3dc065d288171ee024f81c6c3bf44d0ebfcabbb69937a906fdb26b6622d5a369aa415e8e SHA512 47a2607fa782a48b0333e353343a32f358115bb40225ea962fab86d4a8dbed1df976eb6231baf5b95f34a13139b99d6b719521626e5d3e9c80fc4c685767d9b7 DIST shadow-4.14.3.tar.xz 1799112 BLAKE2B 6707cae41a0f8478cadd94ea5eaba95cdc6b1b23896b8dd903c62c931839a82b0538f04f8c12433f148da5b23c12a033963380be81f6fc97fa0e3f9399e51b21 SHA512 da5bba26ccf64535e39a4918033f76bf40da00959512424b23427511bedd9b5a4973343062cc8e415690ebc842a1d4a3ac344bca8d14a57f38281629d0bf3edd DIST shadow-4.14.3.tar.xz.asc 833 BLAKE2B 80c1b2ef54081b48bb912fa486f5f1a29b5435de0f5c312984f67c7bee38ab4b80d63026aba24cf04f45994af5502ae5f3dad1e24b89d2094ab6dc2e5641e304 SHA512 8f2e07a91752e43dc382abc3999c34e4bdc719a28e39090dadccddaf2e865535d8ff1223edb2949ce791f999ce7e8c088b079497d544e33f6b8871a4fb49aafc +DIST shadow-4.14.4.tar.xz 1805956 BLAKE2B 05704e9c4a1d0fc35d89c651887b8114bfe19530b68ffc8562042080d41f5defa2aba00fdf34318b080abe9b1eae4f428f5370ab381b1a37c5b4ec3012a2f98a SHA512 f15aeb3819e1cd6e040ef112ea0f45f3dd89b32f27f6a028c696fab4df03771ac857563c09e5e89f2bece150e6de0567b0a6cbacbea9bd25cd94a02d419fac62 +DIST shadow-4.14.4.tar.xz.asc 833 BLAKE2B 0052d88a24c7d8a69ab33a1b263dcd42c51e27b6d91aa4cae47b7b5f7d3500fce284728450eaf99977dce28f6ab4dd42226eadb24b1cbcac3f4b38a11603ae12 SHA512 c76b8ea87d8b4bfb97895c5ff45daa4ca08c9c8f444371d3683f2af8b71db5186143c206b0df96bf50d95691d6a4e34f864be5e8942c72d76683bbf6d786735a EBUILD shadow-4.13-r3.ebuild 6681 BLAKE2B bd6a781d598a2ffddf30e96a9656c7a2368d4b77f25b5992d98fd07a10cd7310e4886e039169cb3cb6b63df62b2a2b2e1ee961f1f02ae7b27441b5691007abc1 SHA512 ed806bfa1b3124c93cc95de08390eff9020c7615c4bac966d62f428261532056d97d4eec5570b12b7a653f6b5199f2ca8f388bcb9bc4ae25ef268ca53c997cec EBUILD shadow-4.13-r4.ebuild 6762 BLAKE2B 402c6f9c1ade380f2c763078bc2bfb576220f3b63adc585552714a21142a7e76c277160403629ccd255d6c9add55cef9bdbc4c7011c2ac59d02a268e172cf7bf SHA512 6384ed6c8e05cd02a312251d2736ddaec4d4189fcf9c94d4c73dc0349e1a9fd1c909459d067889baa18b15ee1ed7943a3291fac27344d4a98b2091934b2f8fc2 EBUILD shadow-4.14.0-r3.ebuild 7153 BLAKE2B 97bb47b4361a39776729913e7ac037bad266f0b9c4f5eb4b67c38e7b328be7f873fbd6d888c56c8f9bf51e8887eb580d7f81f880046bea8decdcfd7c9b825ca8 SHA512 bd1fb11e23a8d018d970e68e1e737e7962f887f6d4de95993f1c4913b0c74f971c96946ef133c6e36cd5e530146b3097e5304917d6a927080708d1c915117884 EBUILD shadow-4.14.2.ebuild 7144 BLAKE2B b4fbb6e65c6b8b646572c89627cf9d1a513ca1b3873f83172bf4fe192c2b8e0405dacb016cb3c154fad25a52692328ca9f3ebd0f38ca26e2c25ec61599590df6 SHA512 2aa577d61f42a002b4aded5946da01c72f855e936eb8fa848dd510d08dfecd2fc9aa566b5b2cf3b1852bdd858d2eae3f38dd761c050fa59abd1d2427ae605c92 EBUILD shadow-4.14.3.ebuild 7152 BLAKE2B 72c2181790a084ee3e6e90c25c3b8954fcb776a3e78a4f28a604e1c27665585a8fb42050a10107daa3becf784e58990cc19ad76a3b10d8637ba42134b92f8fe2 SHA512 e545c060bd9014246374ad3494410fab52ad5319aa5cfdca3091fcc072246f06ff6972e18bef00c8dad25dc559eb52e125f87ad2576540d44584a39321f3a2c4 +EBUILD shadow-4.14.4.ebuild 7152 BLAKE2B 72c2181790a084ee3e6e90c25c3b8954fcb776a3e78a4f28a604e1c27665585a8fb42050a10107daa3becf784e58990cc19ad76a3b10d8637ba42134b92f8fe2 SHA512 e545c060bd9014246374ad3494410fab52ad5319aa5cfdca3091fcc072246f06ff6972e18bef00c8dad25dc559eb52e125f87ad2576540d44584a39321f3a2c4 MISC metadata.xml 606 BLAKE2B 2b14042f4702a908f8250c3fb6499ea33d8a8c44072707aa44881a36e3cc710256a821f8cd82c5214b32e9f5632745db4fdf00dd722f6fb7401e2f6b0bfbb4fd SHA512 694e039ae781982e8cbe6670b4e9c93b43455715ce4b9830a5fa61e6bf3eb91abcc284bf29c64fab055ba9754edaeab5d2da8140dbb2794fc1f534e2ccbb2b16 diff --git a/sys-apps/shadow/shadow-4.14.4.ebuild b/sys-apps/shadow/shadow-4.14.4.ebuild new file mode 100644 index 000000000000..6c3ff1585aff --- /dev/null +++ b/sys-apps/shadow/shadow-4.14.4.ebuild @@ -0,0 +1,276 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Upstream sometimes pushes releases as pre-releases before marking them +# official. Don't keyword the pre-releases! +# Check https://github.com/shadow-maint/shadow/releases. + +inherit libtool pam verify-sig + +DESCRIPTION="Utilities to deal with user accounts" +HOMEPAGE="https://github.com/shadow-maint/shadow" +SRC_URI="https://github.com/shadow-maint/shadow/releases/download/${PV}/${P}.tar.xz" +SRC_URI+=" verify-sig? ( https://github.com/shadow-maint/shadow/releases/download/${PV}/${P}.tar.xz.asc )" + +LICENSE="BSD GPL-2" +# Subslot is for libsubid's SONAME. +SLOT="0/4" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="acl audit cracklib nls pam selinux skey split-usr su systemd 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 )" + +# TODO: Revisit libbsd dep once glibc-2.28 is stable as it provides strlcpy. +COMMON_DEPEND=" + dev-libs/libbsd + virtual/libcrypt:= + acl? ( sys-apps/acl:= ) + audit? ( >=sys-process/audit-2.6:= ) + cracklib? ( >=sys-libs/cracklib-2.7-r3:= ) + nls? ( virtual/libintl ) + pam? ( sys-libs/pam:= ) + skey? ( sys-auth/skey:= ) + selinux? ( + >=sys-libs/libselinux-1.28:= + sys-libs/libsemanage:= + ) + systemd? ( sys-apps/systemd:= ) + xattr? ( sys-apps/attr:= ) +" +DEPEND=" + ${COMMON_DEPEND} + >=sys-kernel/linux-headers-4.14 +" +RDEPEND=" + ${COMMON_DEPEND} + !<sys-apps/man-pages-5.11-r1 + !=sys-apps/man-pages-5.12-r0 + !=sys-apps/man-pages-5.12-r1 + nls? ( + !<app-i18n/man-pages-it-5.06-r1 + !<app-i18n/man-pages-ja-20180315-r1 + !<app-i18n/man-pages-ru-5.03.2390.2390.20191017-r1 + ) + pam? ( >=sys-auth/pambase-20150213 ) + su? ( !sys-apps/util-linux[su(-)] ) +" +BDEPEND=" + app-arch/xz-utils + sys-devel/gettext +" + +if [[ ${PV} == *.0 ]]; then + BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-sergehallyn )" + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/sergehallyn.asc +else + BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-alejandro-colomar )" + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/alejandro-colomar.asc +fi + +src_prepare() { + default + elibtoolize +} + +src_configure() { + local myeconfargs=( + # Negate new upstream default of disabling for now + --enable-lastlog + --disable-account-tools-setuid + --disable-static + --with-btrfs + # shadow uses a bundled copy of readpassphrase if --without-libbsd + --with-libbsd + --without-group-name-max-length + --without-tcb + --with-bcrypt + --with-yescrypt + $(use_enable nls) + # TODO: wire up upstream for elogind too + $(use_enable systemd logind) + $(use_with acl) + $(use_with audit) + $(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 chfn ; 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." +} |