From cb3f7b6d5ce566efda799ed944ef2b8120b2cdbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20F=C3=B6rster?= Date: Tue, 15 Mar 2022 21:35:52 +0100 Subject: [PATCH] [sys-auth/sssd] bump with... "some" locale handling. --- sys-auth/sssd/Manifest | 3 +- ...sssd-2.5.2-r1.ebuild => sssd-2.6.3.ebuild} | 196 ++++++++++-------- 2 files changed, 109 insertions(+), 90 deletions(-) rename sys-auth/sssd/{sssd-2.5.2-r1.ebuild => sssd-2.6.3.ebuild} (73%) diff --git a/sys-auth/sssd/Manifest b/sys-auth/sssd/Manifest index 3461e30..c6b46c5 100644 --- a/sys-auth/sssd/Manifest +++ b/sys-auth/sssd/Manifest @@ -1,2 +1 @@ -DIST sssd-2.5.2-CVE-2021-3621.patch.bz2 3155 BLAKE2B c50e331f0f1acbb9ef8e6d54a63219da44df5e565608c24635d85a110fcc024f7d5293c4412bca64831a9a3a14e2c1188be1a802c76575ad6d7a83243d3d89c2 SHA512 650af7c67b3a807935c0875ee877d366facdf818492fb4244757448ad351454a279968ea5414e6b3cd116e873abe4f1aef2ccdaf790a4df0cf7f2a0078a41860 -DIST sssd-2.5.2.tar.gz 7579208 BLAKE2B ec5d9aeaf5b5e05b56c01f9137f6f24db05544dbd48458d742285b60e7beb6d48af865f3415e11ce89e187f4643bbecf15bbb321859ec80cfe458eb781cea6c9 SHA512 a9bac7b2cc23022dce3bcda314c9c26a0a0914c448f6d5a51c5ba18670f04c1fd1a94cb20173235b6285df1dcc9251cb6b3f3e71a220037b4eb66668e6f33c48 +DIST sssd-2.6.3.tar.gz 6062332 BLAKE2B bb2a81ce45200ea933244404743438ea552be3cfb7807b57bdbfdaa33caebee437dbb846efbc779c2db4ede2a049637e6e709117c9797104cdace185520591f2 SHA512 5a8cacac5ead44d31167852b418167a740b31fc9adf2a0fe88e57c3a8ed9e9cfda1ceb57084c5e86f43deb0e96e78dc88f23dae962df3b0a5ae60255cdeff8fc diff --git a/sys-auth/sssd/sssd-2.5.2-r1.ebuild b/sys-auth/sssd/sssd-2.6.3.ebuild similarity index 73% rename from sys-auth/sssd/sssd-2.5.2-r1.ebuild rename to sys-auth/sssd/sssd-2.6.3.ebuild index 5a18c33..7aba0ac 100644 --- a/sys-auth/sssd/sssd-2.5.2-r1.ebuild +++ b/sys-auth/sssd/sssd-2.6.3.ebuild @@ -3,30 +3,81 @@ EAPI=7 -PYTHON_COMPAT=( python3_{7..10} ) +PYTHON_COMPAT=( python3_{8..10} ) +PLOCALES="ca cs de es eu fi fr ja ko nl pt pt_BR ru sv tg uk zh_CN" +PLOCALES_BIN="${PLOCALES} bg hu id it nb pl zh_TW" +PLOCALE_BACKUP="de" -inherit autotools linux-info multilib-minimal python-single-r1 pam systemd toolchain-funcs +inherit autotools linux-info multilib-minimal optfeature plocale python-single-r1 pam systemd toolchain-funcs DESCRIPTION="System Security Services Daemon provides access to identity and authentication" HOMEPAGE="https://github.com/SSSD/sssd" -SRC_URI="https://github.com/SSSD/sssd/releases/download/${PV}/${P}.tar.gz" -SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-CVE-2021-3621.patch.bz2" +SRC_URI="https://github.com/SSSD/sssd/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" LICENSE="GPL-3" SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" -IUSE="acl doc +locator +netlink nfsv4 nls +man pac python samba selinux sudo systemd systemtap test valgrind" -RESTRICT="!test? ( test )" - -REQUIRED_USE="${PYTHON_REQUIRED_USE} +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="acl doc +locator +netlink nfsv4 nls +man pac python samba selinux subid sudo systemd systemtap test valgrind" +REQUIRED_USE=" pac? ( samba ) + python? ( ${PYTHON_REQUIRED_USE} ) test? ( sudo ) valgrind? ( test )" +RESTRICT="!test? ( test )" -BDEPEND=">=sys-devel/autoconf-2.69-r5 +DEPEND=" + >=app-crypt/mit-krb5-1.19.1[${MULTILIB_USEDEP}] + app-crypt/p11-kit + >=dev-libs/ding-libs-0.2 + >=dev-libs/cyrus-sasl-2.1.25-r3[kerberos] + dev-libs/libpcre2:= + dev-libs/libunistring:= + >=dev-libs/popt-1.16 + >=dev-libs/openssl-1.0.2:= + >=net-dns/bind-tools-9.9[gssapi] + >=net-dns/c-ares-1.7.4:= + >=net-nds/openldap-2.4.30[sasl] + >=sys-apps/dbus-1.6 + >=sys-apps/keyutils-1.5:= + >=sys-libs/pam-0-r1[${MULTILIB_USEDEP}] + >=sys-libs/talloc-2.0.7 + >=sys-libs/tdb-1.2.9 + >=sys-libs/tevent-0.9.16 + >=sys-libs/ldb-1.1.17-r1:= + virtual/libintl + acl? ( net-fs/cifs-utils[acl] ) + locator? ( >=net-dns/c-ares-1.10.0-r1[${MULTILIB_USEDEP}] ) + netlink? ( dev-libs/libnl:3 ) + nfsv4? ( + || ( + >=net-fs/nfs-utils-2.3.1-r2 + net-libs/libnfsidmap + ) + ) + nls? ( >=sys-devel/gettext-0.18 ) + python? ( + ${PYTHON_DEPS} + systemd? ( + $(python_gen_cond_dep ' + dev-python/python-systemd[${PYTHON_USEDEP}] + ') + ) + ) + samba? ( >=net-fs/samba-4.10.2[winbind] ) + selinux? ( + >=sys-libs/libselinux-2.1.9 + >=sys-libs/libsemanage-2.1 + ) + subid? ( >=sys-apps/shadow-4.9 ) + systemtap? ( dev-util/systemtap )" +RDEPEND="${DEPEND} + >=sys-libs/glibc-2.17[nscd] + selinux? ( >=sec-policy/selinux-sssd-2.20120725-r9 )" +BDEPEND=" virtual/pkgconfig ${PYTHON_DEPS} doc? ( app-doc/doxygen ) + nls? ( sys-devel/gettext ) test? ( dev-libs/check dev-libs/softhsm:2 @@ -44,51 +95,6 @@ BDEPEND=">=sys-devel/autoconf-2.69-r5 nls? ( app-text/po4a ) )" -DEPEND=">=app-crypt/mit-krb5-1.19.1[${MULTILIB_USEDEP}] - app-crypt/p11-kit - >=dev-libs/ding-libs-0.2 - dev-libs/glib:2 - >=dev-libs/cyrus-sasl-2.1.25-r3[kerberos] - >=dev-libs/libpcre-8.30:= - >=dev-libs/popt-1.16 - >=dev-libs/openssl-1.0.2:0= - >=net-dns/bind-tools-9.9[gssapi] - >=net-dns/c-ares-1.7.4 - >=net-nds/openldap-2.4.30[sasl] - >=sys-apps/dbus-1.6 - >=sys-apps/keyutils-1.5:= - >=sys-libs/pam-0-r1[${MULTILIB_USEDEP}] - >=sys-libs/talloc-2.0.7 - >=sys-libs/tdb-1.2.9 - >=sys-libs/tevent-0.9.16 - >=sys-libs/ldb-1.1.17-r1:= - virtual/libintl - locator? ( - >=net-dns/c-ares-1.10.0-r1[${MULTILIB_USEDEP}] - ) - acl? ( net-fs/cifs-utils[acl] ) - netlink? ( dev-libs/libnl:3 ) - nfsv4? ( || ( >=net-fs/nfs-utils-2.3.1-r2 net-libs/libnfsidmap ) ) - nls? ( >=sys-devel/gettext-0.18 ) - pac? ( - net-fs/samba - ) - python? ( ${PYTHON_DEPS} ) - samba? ( >=net-fs/samba-4.10.2[winbind] ) - selinux? ( - >=sys-libs/libselinux-2.1.9 - >=sys-libs/libsemanage-2.1 - ) - systemd? ( - dev-libs/jansson:0= - net-libs/http-parser:0= - net-misc/curl:0= - ) - systemtap? ( dev-util/systemtap )" -RDEPEND="${DEPEND} - >=sys-libs/glibc-2.17[nscd] - selinux? ( >=sec-policy/selinux-sssd-2.20120725-r9 )" - CONFIG_CHECK="~KEYS" MULTILIB_WRAPPED_HEADERS=( @@ -102,10 +108,6 @@ MULTILIB_WRAPPED_HEADERS=( /usr/include/sss_certmap.h ) -PATCHES=( - "${WORKDIR}"/${P}-CVE-2021-3621.patch -) - pkg_setup() { linux-info_pkg_setup python-single-r1_pkg_setup @@ -114,15 +116,42 @@ pkg_setup() { src_prepare() { default + plocale_get_locales > src/man/po/LINGUAS || die + + sed -i \ + -e "/_langs]/ s/ .*//" \ + src/man/po/po4a.cfg \ + || die + enable_locale() { + local locale=${1} + + sed -i \ + -e "/_langs]/ s/$/ ${locale}/" \ + src/man/po/po4a.cfg \ + || die + } + + plocale_for_each_locale enable_locale + + # remove locales that will not build +# sed -i \ +# -e "/_langs]/ s/ br//" \ +# -e "/_langs]/ s/ lv//" \ +# src/man/po/po4a.cfg \ +# || die + + PLOCALES="${PLOCALES_BIN}" + plocale_get_locales > po/LINGUAS || die + sed -i \ -e 's:/var/run:/run:' \ - "${S}"/src/examples/logrotate \ + src/examples/logrotate \ || die # disable flaky test, see https://github.com/SSSD/sssd/issues/5631 sed -i \ -e '/^\s*pam-srv-tests[ \\]*$/d' \ - "${S}"/Makefile.am \ + Makefile.am \ || die eautoreconf @@ -131,7 +160,7 @@ src_prepare() { } src_configure() { - local native_dbus_cflags=$($(tc-getPKG_CONFIG) --cflags dbus-1) + local native_dbus_cflags=$($(tc-getPKG_CONFIG) --cflags dbus-1 || die) multilib-minimal_src_configure } @@ -154,19 +183,16 @@ multilib_src_configure() { --with-secrets-db-path="${EPREFIX}"/var/lib/sss/secrets --with-log-path="${EPREFIX}"/var/log/sssd --with-os=gentoo - --with-nscd="${EPREFIX}"/usr/sbin/nscd - --with-unicode-lib="glib2" --disable-rpath --disable-static - --sbindir=/usr/sbin - --enable-local-provider - $(multilib_native_use_with systemd kcm) - $(multilib_native_use_with systemd secrets) + --sbindir="${EPREFIX}"/usr/sbin + --libexecdir="${EPREFIX}"/usr/libexec $(use_with samba) --with-smb-idmap-interface-version=6 $(multilib_native_use_enable acl cifs-idmap-plugin) $(multilib_native_use_with selinux) $(multilib_native_use_with selinux semanage) + --with-kcm $(use_enable locator krb5-locator-plugin) $(use_enable pac pac-responder) $(multilib_native_use_with nfsv4 nfsv4-idmapd-plugin) @@ -176,21 +202,18 @@ multilib_src_configure() { $(multilib_native_use_with sudo) $(multilib_native_with autofs) $(multilib_native_with ssh) + $(use_with subid) $(use_enable systemtap) $(use_enable valgrind) --without-python2-bindings $(multilib_native_use_with python python3-bindings) + # Annoyingly configure requires that you pick systemd XOR sysv + --with-initscript=$(usex systemd systemd sysv) ) - # Annoyingly configure requires that you pick systemd XOR sysv - if use systemd; then - myconf+=( - --with-initscript="systemd" - --with-systemdunitdir=$(systemd_get_systemunitdir) - ) - else - myconf+=(--with-initscript="sysv") - fi + use systemd && myconf+=( + --with-systemdunitdir=$(systemd_get_systemunitdir) + ) if ! multilib_is_native_abi; then # work-around all the libraries that are used for CLI and server @@ -198,8 +221,8 @@ multilib_src_configure() { {POPT,TALLOC,TDB,TEVENT,LDB}_{CFLAGS,LIBS}=' ' # ldb headers are fine since native needs it # ldb lib fails... but it does not seem to bother - {DHASH,INI_CONFIG_V{0,1,1_1,1_3}}_{CFLAGS,LIBS}=' ' - {PCRE,CARES,SYSTEMD_LOGIN,SASL,GLIB2,DBUS,CRYPTO,P11_KIT}_{CFLAGS,LIBS}=' ' + {DHASH,UNISTRING,INI_CONFIG_V{0,1,1_1,1_3}}_{CFLAGS,LIBS}=' ' + {PCRE,CARES,SYSTEMD_LOGIN,SASL,DBUS,CRYPTO,P11_KIT}_{CFLAGS,LIBS}=' ' {NDR_NBT,SAMBA_UTIL,SMBCLIENT,NDR_KRB5PAC}_{CFLAGS,LIBS}=' ' # use native include path for dbus (needed for build) @@ -207,7 +230,6 @@ multilib_src_configure() { # non-pkgconfig checks ac_cv_lib_ldap_ldap_search=yes - --without-secrets --without-kcm ) fi @@ -219,9 +241,6 @@ multilib_src_compile() { if multilib_is_native_abi; then default use doc && emake docs - if use man || use nls; then - emake update-po - fi else emake libnss_sss.la pam_sss.la pam_sss_gss.la use locator && emake sssd_krb5_locator_plugin.la @@ -238,10 +257,10 @@ multilib_src_test() { multilib_src_install() { if multilib_is_native_abi; then - emake -j1 DESTDIR="${D}" "${_at_args[@]}" install + emake -j1 DESTDIR="${D}" install if use python; then - python_optimize python_fix_shebang "${ED}" + python_optimize fi else # easier than playing with automake... @@ -265,15 +284,14 @@ multilib_src_install() { multilib_src_install_all() { einstalldocs - find "${ED}" -type f -name '*.la' -delete || die insinto /etc/sssd insopts -m600 - doins "${S}"/src/examples/sssd-example.conf + doins src/examples/sssd-example.conf insinto /etc/logrotate.d insopts -m644 - newins "${S}"/src/examples/logrotate sssd + newins src/examples/logrotate sssd newconfd "${FILESDIR}"/sssd.conf sssd @@ -294,10 +312,12 @@ multilib_src_install_all() { fi rm -r "${ED}"/run || die + find "${ED}" -type f -name '*.la' -delete || die } pkg_postinst() { elog "You must set up sssd.conf (default installed into /etc/sssd)" elog "and (optionally) configuration in /etc/pam.d in order to use SSSD" elog "features. Please see howto in https://sssd.io/docs/design_pages/smartcard_authentication_require.html" + optfeature "Kerberos keytab renew (see krb5_renew_interval)" app-crypt/adcli }