diff options
author | Aaron Bauman <bman@gentoo.org> | 2020-08-16 22:59:26 -0400 |
---|---|---|
committer | Aaron Bauman <bman@gentoo.org> | 2020-08-16 23:06:41 -0400 |
commit | 6c80a732e905607c72d563ad84cf66762eb40e2f (patch) | |
tree | 3a68e030494c2110c7e3f2119c65ac31f479a056 /mail-filter | |
parent | mail-mta/sendmail: bump to 8.16.1 (diff) | |
download | gentoo-6c80a732e905607c72d563ad84cf66762eb40e2f.tar.gz gentoo-6c80a732e905607c72d563ad84cf66762eb40e2f.tar.bz2 gentoo-6c80a732e905607c72d563ad84cf66762eb40e2f.zip |
mail-filter/libmilter: bump to 1.2 with sendmail 8.16.1 source
* Add sub SLOT to setup proper rebuilds for revdeps
* Fix sed calls with : delimiter
* Drop multilib eclass
* drop glibc-2.30 patch as it was upstreamed
* Drop blocker for mail-mta/sendmail
Closes: https://bugs.gentoo.org/728106
Closes: https://bugs.gentoo.org/713002
Acked-by: Sam James <sam@gentoo.org>
Signed-off-by: Aaron Bauman <bman@gentoo.org>
Diffstat (limited to 'mail-filter')
4 files changed, 136 insertions, 63 deletions
diff --git a/mail-filter/libmilter/Manifest b/mail-filter/libmilter/Manifest index 02a7dd7b9e97..88526081354f 100644 --- a/mail-filter/libmilter/Manifest +++ b/mail-filter/libmilter/Manifest @@ -1,2 +1,3 @@ DIST sendmail.8.14.5.tar.gz 2092508 BLAKE2B 3d90fa9778ebb42f2f334b35e46d0f24e8fcfd46fe69d6032f246c90fc998fbeb21e70c70bc454c688a76ea00c90ee9b5f0e5e0fc9b89b9f16fa9c814a825f9c SHA512 178addd247f1c7c8ca90d70b9240db4cad4e55f0710d5df0fe979e5473a182d2035150c352836576a28bb2b9660b0d5ebfcd95269a156ac0d2c3dba3edb60452 DIST sendmail.8.15.2.tar.gz 2207417 BLAKE2B 3d9dfb5bc2b535e30ef2fc61333e12a9b1fc45a5d730d2bed1ef956adb574721833f87aeba0475705b76e0c7d6cf00f9a10025bffb0de6c6b4dae606eb2ec399 SHA512 04feb37316c13b66b1518596507a7da7c16cb0bf1abf10367f7fd888a428fadb093a9efa55342fa55b936c3f0cbdc63b9e2505cd99201a69a0c05b8ad65f49f9 +DIST sendmail.8.16.1.tar.gz 2236402 BLAKE2B 80a9c2f1d04719099703e55f0a0c54fd638cf69b72839d358ae6863c95c9e0965d1b7fdd5b1807bec1ffdf87bca0c7c9ba91060962e6de5da5bf14422f6279ea SHA512 d7d4aac3c6d7505782abdb166204901b8b51cac000d610dfe40eda9eef7441a073af9e8e0b14c8719b07b445f55a1e2c28ac63d663d0daa7f1eafc5a101788b2 diff --git a/mail-filter/libmilter/files/sendmail-8.14.6-build-system.patch b/mail-filter/libmilter/files/sendmail-8.14.6-build-system.patch index 3348e921926c..c317a4e854fb 100644 --- a/mail-filter/libmilter/files/sendmail-8.14.6-build-system.patch +++ b/mail-filter/libmilter/files/sendmail-8.14.6-build-system.patch @@ -126,37 +126,25 @@ diff -Nru sendmail-8.14.3.orig/rmail/Makefile.m4 sendmail-8.14.3/rmail/Makefile. divert bldFINISH -diff -Nru sendmail-8.14.3.orig/sendmail/Makefile.m4 sendmail-8.14.3/sendmail/Makefile.m4 ---- sendmail-8.14.3.orig/sendmail/Makefile.m4.orig 2008-03-27 17:13:33.000000000 +0100 -+++ sendmail-8.14.3/sendmail/Makefile.m4 2009-09-20 11:07:24.000000000 +0200 -@@ -14,9 +14,9 @@ - - dnl hack: /etc/mail is not defined as "location of .cf" in the build system - define(`bldTARGET_INST_DEP', ifdef(`confINST_DEP', `confINST_DEP', --`${DESTDIR}/etc/mail/submit.cf ${DESTDIR}${MSPQ}'))dnl -+`"${DESTDIR}/etc/mail/submit.cf" "${DESTDIR}${MSPQ}"'))dnl - define(`bldTARGET_LINKS', ifdef(`confLINKS', `confLINKS', --`${DESTDIR}${UBINDIR}/newaliases ${DESTDIR}${UBINDIR}/mailq ${DESTDIR}${UBINDIR}/hoststat ${DESTDIR}${UBINDIR}/purgestat') -+`"${DESTDIR}${UBINDIR}/newaliases" "${DESTDIR}${UBINDIR}/mailq" "${DESTDIR}${UBINDIR}/hoststat" "${DESTDIR}${UBINDIR}/purgestat"') - )dnl - - # location of sendmail statistics file (usually /etc/mail/ or /var/log) + +--- a/sendmail/Makefile.m4 2020-08-10 23:14:23.209900406 -0400 ++++ b/sendmail/Makefile.m4 2020-08-10 23:23:51.272863753 -0400 @@ -43,21 +43,21 @@ statistics: ${CP} /dev/null statistics - + -${DESTDIR}/etc/mail/submit.cf: -+"${DESTDIR}/etc/mail/submit.cf": ++${DESTDIR}/etc/mail/submit.cf: @echo "Please read INSTALL if anything fails while installing the binary." @echo "${DESTDIR}/etc/mail/submit.cf will be installed now." cd ${SRCDIR}/cf/cf && make install-submit-cf - + MSPQ=ifdef(`confMSP_QUEUE_DIR', `confMSP_QUEUE_DIR', `/var/spool/clientmqueue') - + -${DESTDIR}${MSPQ}: -+"${DESTDIR}${MSPQ}": ++${DESTDIR}${MSPQ}: @echo "Please read INSTALL if anything fails while installing the binary." - @echo "You must have setup a new user ${MSPQOWN} and a new group ${GBINGRP}" + @echo "You must have set up a new user ${MSPQOWN} and a new group ${GBINGRP}" @echo "as explained in sendmail/SECURITY." - mkdir -p ${DESTDIR}${MSPQ} - chown ${MSPQOWN} ${DESTDIR}${MSPQ} @@ -166,46 +154,5 @@ diff -Nru sendmail-8.14.3.orig/sendmail/Makefile.m4 sendmail-8.14.3/sendmail/Mak + chown ${MSPQOWN} "${DESTDIR}${MSPQ}" + chgrp ${GBINGRP} "${DESTDIR}${MSPQ}" + chmod 0770 "${DESTDIR}${MSPQ}" - - divert(0) - -@@ -68,30 +68,30 @@ - divert(bldTARGETS_SECTION) - - install-set-user-id: bldCURRENT_PRODUCT ifdef(`confNO_HELPFILE_INSTALL',, `install-hf') ifdef(`confNO_STATISTICS_INSTALL',, `install-st') ifdef(`confNO_MAN_BUILD',, `install-docs') -- ${INSTALL} -c -o ${S`'BINOWN} -g ${S`'BINGRP} -m ${S`'BINMODE} bldCURRENT_PRODUCT ${DESTDIR}${M`'BINDIR} -+ ${INSTALL} -c -o ${S`'BINOWN} -g ${S`'BINGRP} -m ${S`'BINMODE} bldCURRENT_PRODUCT "${DESTDIR}${M`'BINDIR}" - for i in ${sendmailTARGET_LINKS}; do \ - rm -f $$i; \ - ${LN} ${LNOPTS} ${M`'BINDIR}/sendmail $$i; \ - done - --define(`confMTA_LINKS', `${DESTDIR}${UBINDIR}/newaliases ${DESTDIR}${UBINDIR}/mailq ${DESTDIR}${UBINDIR}/hoststat ${DESTDIR}${UBINDIR}/purgestat') -+define(`confMTA_LINKS', `"${DESTDIR}${UBINDIR}/newaliases" "${DESTDIR}${UBINDIR}/mailq" "${DESTDIR}${UBINDIR}/hoststat" "${DESTDIR}${UBINDIR}/purgestat"') - install-sm-mta: bldCURRENT_PRODUCT -- ${INSTALL} -c -o ${M`'BINOWN} -g ${M`'BINGRP} -m ${M`'BINMODE} bldCURRENT_PRODUCT ${DESTDIR}${M`'BINDIR}/sm-mta -+ ${INSTALL} -c -o ${M`'BINOWN} -g ${M`'BINGRP} -m ${M`'BINMODE} bldCURRENT_PRODUCT "${DESTDIR}${M`'BINDIR}/sm-mta" - for i in confMTA_LINKS; do \ - rm -f $$i; \ - ${LN} ${LNOPTS} ${M`'BINDIR}/sm-mta $$i; \ - done - - install-hf: -- if [ ! -d ${DESTDIR}${HFDIR} ]; then mkdir -p ${DESTDIR}${HFDIR}; else :; fi -- ${INSTALL} -c -o ${UBINOWN} -g ${UBINGRP} -m 444 helpfile ${DESTDIR}${HFFILE} -+ if [ ! -d "${DESTDIR}${HFDIR}" ]; then mkdir -p "${DESTDIR}${HFDIR}"; else :; fi -+ ${INSTALL} -c -o ${UBINOWN} -g ${UBINGRP} -m 444 helpfile "${DESTDIR}${HFFILE}" - - install-st: statistics -- if [ ! -d ${DESTDIR}${STDIR} ]; then mkdir -p ${DESTDIR}${STDIR}; else :; fi -- ${INSTALL} -c -o ${SBINOWN} -g ${UBINGRP} -m ifdef(`confSTMODE', `confSTMODE', `0600') statistics ${DESTDIR}${STPATH} -+ if [ ! -d "${DESTDIR}${STDIR}" ]; then mkdir -p "${DESTDIR}${STDIR}"; else :; fi -+ ${INSTALL} -c -o ${SBINOWN} -g ${UBINGRP} -m ifdef(`confSTMODE', `confSTMODE', `0600') statistics "${DESTDIR}${STPATH}" - --install-submit-st: statistics ${DESTDIR}${MSPQ} -- ${INSTALL} -c -o ${MSPQOWN} -g ${GBINGRP} -m ifdef(`confSTMODE', `confSTMODE', `0600') statistics ${DESTDIR}${MSPQ}/${MSPSTFILE} -+install-submit-st: statistics "${DESTDIR}${MSPQ}" -+ ${INSTALL} -c -o ${MSPQOWN} -g ${GBINGRP} -m ifdef(`confSTMODE', `confSTMODE', `0600') statistics "${DESTDIR}${MSPQ}/${MSPSTFILE}" - + divert(0) - bldPRODUCT_END diff --git a/mail-filter/libmilter/files/sendmail-8.15.2-glibc-2.30.patch b/mail-filter/libmilter/files/sendmail-8.15.2-glibc-2.30.patch new file mode 100644 index 000000000000..03281d1990fe --- /dev/null +++ b/mail-filter/libmilter/files/sendmail-8.15.2-glibc-2.30.patch @@ -0,0 +1,52 @@ +https://bugs.gentoo.org/700108 + +--- sendmail-8.15.2-r1/libmilter/sm_gethost.c.orig 2014-03-04 19:59:45.000000000 -0500 ++++ sendmail-8.15.2-r1/libmilter/sm_gethost.c 2019-11-15 09:32:25.812406080 -0500 +@@ -51,18 +51,21 @@ + { + bool resv6 = true; + struct hostent *h; +- ++#ifdef RES_USE_INET6 + if (family == AF_INET6) + { + /* From RFC2133, section 6.1 */ + resv6 = bitset(RES_USE_INET6, _res.options); + _res.options |= RES_USE_INET6; + } ++#endif + SM_SET_H_ERRNO(0); + h = gethostbyname(name); ++#ifdef RES_USE_INET6 + if (family == AF_INET6 && !resv6) + _res.options &= ~RES_USE_INET6; + ++#endif + /* the function is supposed to return only the requested family */ + if (h != NULL && h->h_addrtype != family) + { +--- sendmail-8.15.2-r2/sendmail/conf.c.orig 2019-11-14 17:36:41.262218822 -0500 ++++ sendmail-8.15.2-r2/sendmail/conf.c 2019-11-15 09:57:43.550284580 -0500 +@@ -4243,18 +4243,21 @@ + + # else /* HAS_GETHOSTBYNAME2 */ + bool resv6 = true; +- ++#ifdef RES_USE_INET6 + if (family == AF_INET6) + { + /* From RFC2133, section 6.1 */ + resv6 = bitset(RES_USE_INET6, _res.options); + _res.options |= RES_USE_INET6; + } ++#endif + SM_SET_H_ERRNO(0); + h = gethostbyname(name); ++#ifdef RES_USE_INET6 + if (!resv6) + _res.options &= ~RES_USE_INET6; + ++#endif + /* the function is supposed to return only the requested family */ + if (h != NULL && h->h_addrtype != family) + { diff --git a/mail-filter/libmilter/libmilter-1.0.2_p1-r1.ebuild b/mail-filter/libmilter/libmilter-1.0.2_p1-r1.ebuild new file mode 100644 index 000000000000..cddfb9391b96 --- /dev/null +++ b/mail-filter/libmilter/libmilter-1.0.2_p1-r1.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +# This library is part of sendmail, but it does not share the version number with it. +# In order to find the right libmilter version number, check SMFI_VERSION definition +# that can be found in ${S}/include/libmilter/mfapi.h (see also SM_LM_VRS_* defines). +# For example, version 1.0.1 has a SMFI_VERSION of 0x01000001. +SENDMAIL_VER=8.16.1 + +DESCRIPTION="The Sendmail Filter API (Milter)" +HOMEPAGE="http://www.sendmail.org/" +SRC_URI="ftp://ftp.sendmail.org/pub/sendmail/sendmail.${SENDMAIL_VER}.tar.gz" + +LICENSE="Sendmail" +SLOT="0/${PV}" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="ipv6 poll" + +S="${WORKDIR}/sendmail-${SENDMAIL_VER}" + +# build system patch copied from sendmail ebuild +PATCHES=( + "${FILESDIR}/sendmail-8.14.6-build-system.patch" + "${FILESDIR}/${PN}-sharedlib.patch" +) + +src_prepare() { + default + + local CC="$(tc-getCC)" + local ENVDEF="-DNETUNIX -DNETINET" + use ipv6 && ENVDEF="${ENVDEF} -DNETINET6" + use poll && ENVDEF="${ENVDEF} -DSM_CONF_POLL=1" + + if use elibc_musl; then + use ipv6 && ENVDEF="${ENVDEF} -DNEEDSGETIPNODE" + + eapply "${FILESDIR}/${PN}-musl-stack-size.patch" + eapply "${FILESDIR}/${PN}-musl-disable-cdefs.patch" + fi + + sed -e "s|@@CFLAGS@@|${CFLAGS}|" \ + -e "s|@@LDFLAGS@@|${LDFLAGS}|" \ + -e "s|@@CC@@|${CC}|" \ + -e "s|@@ENVDEF@@|${ENVDEF}|" \ + "${FILESDIR}/gentoo.config.m4" > "${S}/devtools/Site/site.config.m4" \ + || die "failed to generate site.config.m4" +} + +src_compile() { + pushd libmilter + emake -j1 MILTER_SOVER=${PV} + popd +} + +src_install() { + local MY_LIBDIR=/usr/$(get_libdir) + dodir "${MY_LIBDIR}" + emake DESTDIR="${D}" LIBDIR="${MY_LIBDIR}" MANROOT=/usr/share/man/man \ + SBINOWN=root SBINGRP=0 UBINOWN=root UBINGRP=0 \ + LIBOWN=root LIBGRP=0 GBINOWN=root GBINGRP=0 \ + MANOWN=root MANGRP=0 INCOWN=root INCGRP=0 \ + MSPQOWN=root CFOWN=root CFGRP=0 \ + MILTER_SOVER=${PV} \ + install -C obj.*/libmilter + + dodoc libmilter/README + dodoc libmilter/docs/* +} |