diff options
author | V3n3RiX <venerix@koprulu.sector> | 2021-10-30 19:43:03 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2021-10-30 19:43:03 +0100 |
commit | 162945d2a91899b637bbb9e163b406350de12906 (patch) | |
tree | 49cc2cc66f724a7c6f033f93aaba4ae3be1f2259 /dev-libs/cyrus-sasl | |
parent | f660c6de84558324d784218831d8f0782ee41e2e (diff) |
gentoo resync : 30.10.2021
Diffstat (limited to 'dev-libs/cyrus-sasl')
4 files changed, 308 insertions, 2 deletions
diff --git a/dev-libs/cyrus-sasl/Manifest b/dev-libs/cyrus-sasl/Manifest index bfd91317c269..787d4a6fc640 100644 --- a/dev-libs/cyrus-sasl/Manifest +++ b/dev-libs/cyrus-sasl/Manifest @@ -4,6 +4,7 @@ AUX cyrus-sasl-2.1.27-CVE-2019-19906.patch 706 BLAKE2B 5165697869a0ce71ecba92716 AUX cyrus-sasl-2.1.27-as_needed.patch 1141 BLAKE2B 7d289e96ef1f4593dd48db270dd698a7cf6f21aae3c58043b0f8af30c2d935b24d2a4902f39c9fcfc3261833d1b09032511919f15fc94f62527e46ea25cb2fcc SHA512 9eefa6d45e3dd9157a5672909acdd88f0ae35e76d64c3723890a474bbb05b22499cfadb0c077924d27f34da3710b2b700094dd7d5704050138c08dabcefdde94 AUX cyrus-sasl-2.1.27-autotools_fixes.patch 749 BLAKE2B b7f832a5e937053deaf1696f8dbf777ebf789df8165fe90f6d1be7efc47e4114a8a467c74f4acf06245e7ffab22f62436159cd610ebe5c5b0cef61f1cb01fb71 SHA512 0d99ca049e76c11500769079d94f3bdb634bddb4c8d45a83b383e9bb9777edda66b17566800acbd450e1f4842d070ec3fbc236e7f0ef8759c36e6dd5ea8e3c64 AUX cyrus-sasl-2.1.27-avoid_pic_overwrite.patch 866 BLAKE2B 1e117d9d07ad3937066c7b4ef8415df55bf9c5ce821902331792056e6df63e366fd3adebfdf09f0292aae889d0db632521f37ec5ebf74005b71a474ccc6fe250 SHA512 4ca601839b023ef790e48dae567ffbbd57c632384c980946639ec7437ad23874961451718569455e6e25afaeff1728ecbc71a8686f6b43246f83465f95a2c904 +AUX cyrus-sasl-2.1.27-db_gdbm-fix-gdbm_errno-overlay-from-gdbm_close.patch 1236 BLAKE2B 92ae70f524cb75eb18d870da45d0dd8880c51f30f91d9706fa10db6057083b3082cfd17152ab1ab26d2e34ee4bf34ace152ce14415954e0942ac325dc73b36cc SHA512 1afcd64ef154918b8ca3092e95c4590259a55498a69d083a60a158c42a38c0f334d3fd672022d85819bc2c892604703aed64ab1da220b2cbe4aacf2df15722f5 AUX cyrus-sasl-2.1.27-doc_build_fix.patch 417 BLAKE2B 2a76fcce47d248ccf0dfd08b6d18c94c5426601964fff64c0579b3c2ef2be28673e80a00f298e4830797adc3404c7c79ebce8b5869af443248bd1a25fdf7f2eb SHA512 6d723e7ec2c431b45c011b887187b6a670dbe646aa4c39d38171047ab23db529c30c433f8d4dd624181917c5ce4e5271f86e35e2644ede1c40dfb09cb67dccde AUX cyrus-sasl-2.1.27-gss_c_nt_hostbased_service.patch 734 BLAKE2B fa45f0bc2598602b9bff76fa4462010507227f4e914ae265c2715cbfb13f71848564e886bd59ce9ff0f6ff4920b215cf28a4511d8928cd93283469fa9e657011 SHA512 fca4f2b7e427c7613f71daa4a31772c33c8c0fe9d7f85b57b85da71bc5a88a18fc52f7caea463188b4addd31cd041d5349af689d5face2cc45fb50c700a8afd7 AUX cyrus-sasl-2.1.27-memmem.patch 1559 BLAKE2B 97d624b575b7479ba84b0d0fed98743eddb0419b38957c55ba66475e1509bb7fa9a2db517b1a2bcdc73f1dbdbf3031f7641890ddc4858a08af38ece082c0fa82 SHA512 6e3c6bb4212fe0cb29f4432d94d6cfc4dc9437a30dd5c4fb4d5a30afb4a9a5273674386d6c81da1829553968b371d98c4fa2efb686a62f84944a456fd420415c @@ -17,5 +18,6 @@ AUX saslauthd.pam-include 160 BLAKE2B a715cd6e780fd6db773920231f6010c35f8998d563 AUX saslauthd.service 277 BLAKE2B cf80eaa1e3f7ef854978a458e4b026f3f47891620ac63e7fd1b76d7ba6c9d2eeb3690542c416f1c316f4342f0c7316cce8992f46b32bc984ea2baaa43301185d SHA512 fa318aefec6f802badd72a4baf33875bc0021fc4889578877880971470d84bf645ad3c34dd10c582d8cc06ea512e3d56984902efaf09e2806a27feade5fc971c AUX saslauthd2.rc7 411 BLAKE2B 7cda36ea03aeea5f8e32c2fd0319a483dae78080fa213fb423bd1545e9d29193ebe077ebe5d15ab5940b2d805cb46a25ad2629757f55d2c40c4acc3f0adfa355 SHA512 1d5942a94ffbc15774443d60a88d4c89c7c3c6ea68b041d304f0110f6ec3aa2a812f59021cddc78de6f51a25bb00955e4e56d769e766a9d856f13774dd37ce83 DIST cyrus-sasl-2.1.27.tar.gz 4111249 BLAKE2B 82c9acce8534521ce5c5806f093e927f1854b4bc4b83ea7db1b32ceaa811adc1a5b6fc16d03233d729194cd603836f6e58de67f915abab2cb74561a80d03f5a8 SHA512 d11549a99b3b06af79fc62d5478dba3305d7e7cc0824f4b91f0d2638daafbe940623eab235f85af9be38dcf5d42fc131db531c177040a85187aee5096b8df63b -EBUILD cyrus-sasl-2.1.27-r4.ebuild 8278 BLAKE2B 9091aa27cc5e65a274cbb00091a679f80d2818c568050ba98dd5ab9dc8be04379c89e5783a1831de5b927fc0b7639d5c89c671126bec2621b419b89086d0e4a3 SHA512 57fae67af9e0419456995ba422e16c9e6e7b3a82f25920fc151673ea82aecb6d104221df59a56c38a1cca5cffc356fd6a6f6d9ebb4ae25b624fe930163d2d3c5 +EBUILD cyrus-sasl-2.1.27-r4.ebuild 8288 BLAKE2B d9030f78ed7e1fe0f86aea42a0202694cd1768612b0aea18cf8f589aeebc45bc77fcb03cd987c039e7ab0b39d5c15c5de47c77043159ffe00b11510fd1b9e71f SHA512 9c662f6dff16579c8ff3ec840e5df4fc9772adc8e08700a1c7d86b5f00e83f4711010a70cc82c2b46ff6a9d5b442c1f5dbca395afa4f7a78aed39624b571ed80 +EBUILD cyrus-sasl-2.1.27-r5.ebuild 8377 BLAKE2B a0ca022e79448316425452f4a128c599767ff8f553b6e6c7d7d378bdaa8a64d9ab03ed0ecfc1d3aa45e439187cbf77cc0136aac1588fd8fecfca18909bdcb509 SHA512 cfd4fcadb0edd372d8d8893a739f3de05c5488950b71b1905f011ddc0e09ca9f118166afe4fdd0d8b91e4968f4029bcd9f8c0feb6951ff9e723fa8def6117c40 MISC metadata.xml 721 BLAKE2B 23da714758f539942c45bd8f04fa0f435f0e1a4770c258ca4a1e73f89a627335d6804f636dc38d8b356968bb859ca7a65ca428e24e8eb0e64ed7f666d2c7f3b6 SHA512 388ec91796dfa0eed11200822ff521e5094a072c56469adf20f2a1a18c6e4501e73f8182a1372f7d301b28aecf755d81e330f7cfeb6b742c894c7b7750bbf7dd diff --git a/dev-libs/cyrus-sasl/cyrus-sasl-2.1.27-r4.ebuild b/dev-libs/cyrus-sasl/cyrus-sasl-2.1.27-r4.ebuild index 209963f65410..670450a576e0 100644 --- a/dev-libs/cyrus-sasl/cyrus-sasl-2.1.27-r4.ebuild +++ b/dev-libs/cyrus-sasl/cyrus-sasl-2.1.27-r4.ebuild @@ -3,7 +3,7 @@ EAPI=7 -inherit flag-o-matic multilib multilib-minimal autotools pam java-pkg-opt-2 db-use systemd toolchain-funcs tmpfiles +inherit edos2unix flag-o-matic multilib multilib-minimal autotools pam java-pkg-opt-2 db-use systemd toolchain-funcs tmpfiles SASLAUTHD_CONF_VER="2.1.26" diff --git a/dev-libs/cyrus-sasl/cyrus-sasl-2.1.27-r5.ebuild b/dev-libs/cyrus-sasl/cyrus-sasl-2.1.27-r5.ebuild new file mode 100644 index 000000000000..a77171895020 --- /dev/null +++ b/dev-libs/cyrus-sasl/cyrus-sasl-2.1.27-r5.ebuild @@ -0,0 +1,269 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit edos2unix flag-o-matic multilib multilib-minimal autotools pam java-pkg-opt-2 db-use systemd toolchain-funcs tmpfiles + +SASLAUTHD_CONF_VER="2.1.26" + +DESCRIPTION="The Cyrus SASL (Simple Authentication and Security Layer)" +HOMEPAGE="https://www.cyrusimap.org/sasl/" +#SRC_URI="ftp://ftp.cyrusimap.org/cyrus-sasl/${P}.tar.gz" +SRC_URI="https://github.com/cyrusimap/${PN}/releases/download/${P}/${P}.tar.gz" + +LICENSE="BSD-with-attribution" +SLOT="2" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="authdaemond berkdb gdbm kerberos ldapdb openldap mysql pam postgres sample selinux sqlite srp ssl static-libs urandom" + +CDEPEND=" + net-mail/mailbase + virtual/libcrypt:= + authdaemond? ( || ( net-mail/courier-imap mail-mta/courier ) ) + berkdb? ( >=sys-libs/db-4.8.30-r1:=[${MULTILIB_USEDEP}] ) + gdbm? ( >=sys-libs/gdbm-1.10-r1:=[${MULTILIB_USEDEP}] ) + kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] ) + openldap? ( >=net-nds/openldap-2.4.38-r1[${MULTILIB_USEDEP}] ) + mysql? ( dev-db/mysql-connector-c:0=[${MULTILIB_USEDEP}] ) + pam? ( >=sys-libs/pam-0-r1[${MULTILIB_USEDEP}] ) + postgres? ( dev-db/postgresql:* ) + sqlite? ( >=dev-db/sqlite-3.8.2:3[${MULTILIB_USEDEP}] ) + ssl? ( + >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] + ) + java? ( >=virtual/jdk-1.6:= )" + +REQUIRED_USE="ldapdb? ( openldap )" + +RDEPEND=" + ${CDEPEND} + selinux? ( sec-policy/selinux-sasl )" + +DEPEND="${CDEPEND}" + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/sasl/md5global.h +) + +PATCHES=( + "${FILESDIR}/${PN}-2.1.27-avoid_pic_overwrite.patch" + "${FILESDIR}/${PN}-2.1.27-autotools_fixes.patch" + "${FILESDIR}/${PN}-2.1.27-as_needed.patch" + "${FILESDIR}/${PN}-2.1.25-auxprop.patch" + "${FILESDIR}/${PN}-2.1.27-gss_c_nt_hostbased_service.patch" + "${FILESDIR}/${PN}-2.1.26-missing-size_t.patch" + "${FILESDIR}/${PN}-2.1.27-doc_build_fix.patch" + "${FILESDIR}/${PN}-2.1.27-memmem.patch" + "${FILESDIR}/${PN}-2.1.27-CVE-2019-19906.patch" + "${FILESDIR}/${PN}-2.1.27-slibtool.patch" + "${FILESDIR}/${PN}-2.1.27-db_gdbm-fix-gdbm_errno-overlay-from-gdbm_close.patch" +) + +pkg_setup() { + java-pkg-opt-2_pkg_setup +} + +src_prepare() { + default + + # Get rid of the -R switch (runpath_switch for Sun) + # >=gcc-4.6 errors out with unknown option + sed -i -e '/LIB_SQLITE.*-R/s/ -R[^"]*//' \ + configure.ac || die + + # Use plugindir for sasldir + sed -i '/^sasldir =/s:=.*:= $(plugindir):' \ + "${S}"/plugins/Makefile.{am,in} || die "sed failed" + + # #486740 #468556 + sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:g' \ + -e 's:AC_CONFIG_MACRO_DIR:AC_CONFIG_MACRO_DIRS:g' \ + configure.ac || die + + eautoreconf + + export CC_FOR_BUILD="$(tc-getBUILD_CC)" +} + +src_configure() { + append-flags -fno-strict-aliasing + + if [[ ${CHOST} == *-solaris* ]] ; then + # getpassphrase is defined in /usr/include/stdlib.h + append-cppflags -DHAVE_GETPASSPHRASE + else + # this horrendously breaks things on Solaris + append-cppflags -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -DLDAP_DEPRECATED + # replaces BSD_SOURCE (bug #579218) + append-cppflags -D_DEFAULT_SOURCE + fi + + multilib-minimal_src_configure +} + +multilib_src_configure() { + # Java support + multilib_is_native_abi && use java && export JAVAC="${JAVAC} ${JAVACFLAGS}" + + local myeconfargs=( + --enable-login + --enable-ntlm + --enable-auth-sasldb + --disable-cmulocal + --disable-krb4 + --disable-macos-framework + --enable-otp + --without-sqlite + --with-saslauthd="${EPREFIX}"/run/saslauthd + --with-pwcheck="${EPREFIX}"/run/saslauthd + --with-configdir="${EPREFIX}"/etc/sasl2 + --with-plugindir="${EPREFIX}"/usr/$(get_libdir)/sasl2 + --with-dbpath="${EPREFIX}"/etc/sasl2/sasldb2 + --with-sphinx-build=no + $(use_with ssl openssl) + $(use_with pam) + $(use_with openldap ldap) + $(use_enable ldapdb) + $(multilib_native_use_enable sample) + $(use_enable kerberos gssapi) + $(multilib_native_use_enable java) + $(multilib_native_use_with mysql mysql "${EPREFIX}"/usr) + $(multilib_native_use_with postgres pgsql "${EPREFIX}"/usr/$(get_libdir)/postgresql) + $(use_with sqlite sqlite3 "${EPREFIX}"/usr/$(get_libdir)) + $(use_enable srp) + $(use_enable static-libs static) + + # Add authdaemond support (bug #56523). + $(usex authdaemond --with-authdaemond="${EPREFIX}"/var/lib/courier/authdaemon/socket '') + + # Fix for bug #59634. + $(usex ssl '' --without-des) + + # Use /dev/urandom instead of /dev/random (bug #46038). + $(usex urandom --with-devrandom=/dev/urandom '') + ) + + if use sqlite || { multilib_is_native_abi && { use mysql || use postgres; }; } ; then + myeconfargs+=( --enable-sql ) + else + myeconfargs+=( --disable-sql ) + fi + + # Default to GDBM if both 'gdbm' and 'berkdb' are present. + if use gdbm ; then + einfo "Building with GNU DB as database backend for your SASLdb" + myeconfargs+=( --with-dblib=gdbm ) + elif use berkdb ; then + einfo "Building with BerkeleyDB as database backend for your SASLdb" + myeconfargs+=( + --with-dblib=berkeley + --with-bdb-incdir="$(db_includedir)" + ) + else + einfo "Building without SASLdb support" + myeconfargs+=( --with-dblib=none ) + fi + + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" +} + +multilib_src_compile() { + emake + + # Default location for java classes breaks OpenOffice (bug #60769). + # Thanks to axxo@gentoo.org for the solution. + if multilib_is_native_abi && use java ; then + jar -cvf ${PN}.jar -C java $(find java -name "*.class") + fi +} + +multilib_src_install() { + default + + if multilib_is_native_abi; then + if use sample ; then + docinto sample + dodoc "${S}"/sample/*.c + exeinto /usr/share/doc/${P}/sample + doexe sample/client sample/server + fi + + # Default location for java classes breaks OpenOffice (bug #60769). + if use java; then + java-pkg_dojar ${PN}.jar + java-pkg_regso "${ED}/usr/$(get_libdir)/libjavasasl$(get_libname)" + # hackish, don't wanna dig through makefile + rm -rf "${ED}/usr/$(get_libdir)/java" || die + docinto "java" + dodoc "${S}/java/README" "${FILESDIR}/java.README.gentoo" "${S}"/java/doc/* + insinto "/usr/share/doc/${PF}/java/Test" + doins "${S}"/java/Test/*.java + fi + + dosbin saslauthd/testsaslauthd + fi +} + +multilib_src_install_all() { + doman man/* + + keepdir /etc/sasl2 + + # Reset docinto to default value (#674296) + docinto + dodoc AUTHORS ChangeLog doc/legacy/TODO + newdoc pwcheck/README README.pwcheck + + newdoc docsrc/sasl/release-notes/$(ver_cut 1-2)/index.rst release-notes + edos2unix "${ED}/usr/share/doc/${PF}/release-notes" + + docinto html + dodoc doc/html/*.html + + if use pam; then + newpamd "${FILESDIR}/saslauthd.pam-include" saslauthd + fi + + newinitd "${FILESDIR}/pwcheck.rc6" pwcheck + systemd_dounit "${FILESDIR}/pwcheck.service" + + newinitd "${FILESDIR}/saslauthd2.rc7" saslauthd + newconfd "${FILESDIR}/saslauthd-${SASLAUTHD_CONF_VER}.conf" saslauthd + systemd_dounit "${FILESDIR}/saslauthd.service" + dotmpfiles "${FILESDIR}/${PN}.conf" + + # The get_modname bit is important: do not remove the .la files on + # platforms where the lib isn't called .so for cyrus searches the .la to + # figure out what the name is supposed to be instead + if ! use static-libs && [[ $(get_modname) == .so ]] ; then + find "${ED}" -name "*.la" -delete || die + fi +} + +pkg_postinst() { + tmpfiles_process ${PN}.conf + + # Generate an empty sasldb2 with correct permissions. + if ( use berkdb || use gdbm ) && [[ ! -f "${EROOT}/etc/sasl2/sasldb2" ]] ; then + einfo "Generating an empty sasldb2 with correct permissions ..." + echo "p" | "${EROOT}/usr/sbin/saslpasswd2" -f "${EROOT}/etc/sasl2/sasldb2" -p login \ + || die "Failed to generate sasldb2" + "${EROOT}/usr/sbin/saslpasswd2" -f "${EROOT}/etc/sasl2/sasldb2" -d login \ + || die "Failed to delete temp user" + chown root:mail "${EROOT}/etc/sasl2/sasldb2" \ + || die "Failed to chown ${EROOT}/etc/sasl2/sasldb2" + chmod 0640 "${EROOT}/etc/sasl2/sasldb2" \ + || die "Failed to chmod ${EROOT}/etc/sasl2/sasldb2" + fi + + if use authdaemond ; then + elog "You need to add a user running a service using Courier's" + elog "authdaemon to the 'mail' group. For example, do:" + elog " gpasswd -a postfix mail" + elog "to add the 'postfix' user to the 'mail' group." + fi + + elog "pwcheck and saslauthd home directories have moved to:" + elog " /run/saslauthd, using tmpfiles.d" +} diff --git a/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.27-db_gdbm-fix-gdbm_errno-overlay-from-gdbm_close.patch b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.27-db_gdbm-fix-gdbm_errno-overlay-from-gdbm_close.patch new file mode 100644 index 000000000000..f1e3ae9850c8 --- /dev/null +++ b/dev-libs/cyrus-sasl/files/cyrus-sasl-2.1.27-db_gdbm-fix-gdbm_errno-overlay-from-gdbm_close.patch @@ -0,0 +1,35 @@ +From af48f6fec9a7b6374d4153c5db894d4a1f349645 Mon Sep 17 00:00:00 2001 +Message-Id: <af48f6fec9a7b6374d4153c5db894d4a1f349645.1635327406.git.mkletzan@redhat.com> +From: Jonas Jelten <jj@sft.mx> +Date: Sat, 2 Feb 2019 20:53:37 +0100 +Subject: [PATCH] db_gdbm: fix gdbm_errno overlay from gdbm_close + +`gdbm_close` also sets gdbm_errno since version 1.17. +This leads to a problem in `libsasl` as the `gdbm_close` incovation overlays +the `gdbm_errno` value which is then later used for the error handling. + +Signed-off-by: Martin Kletzander <mkletzan@redhat.com> +--- + sasldb/db_gdbm.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/sasldb/db_gdbm.c b/sasldb/db_gdbm.c +index ee56a6bf8516..c908808e04a1 100644 +--- a/sasldb/db_gdbm.c ++++ b/sasldb/db_gdbm.c +@@ -107,9 +107,11 @@ int _sasldb_getdata(const sasl_utils_t *utils, + gkey.dptr = key; + gkey.dsize = key_len; + gvalue = gdbm_fetch(db, gkey); ++ int fetch_errno = gdbm_errno; ++ + gdbm_close(db); + if (! gvalue.dptr) { +- if (gdbm_errno == GDBM_ITEM_NOT_FOUND) { ++ if (fetch_errno == GDBM_ITEM_NOT_FOUND) { + utils->seterror(conn, SASL_NOLOG, + "user: %s@%s property: %s not found in %s", + authid, realm, propName, path); +-- +2.33.1 + |