From 9452a6e87b6c2c70513bc47a2470bf9f1168920e Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 13 Jun 2020 10:39:22 +0100 Subject: gentoo resync : 13.06.2020 --- net-mail/relay-ctrl/Manifest | 4 ++ .../files/relay-ctrl-3.1.1-NOFILE-overstep.patch | 25 +++++++ net-mail/relay-ctrl/relay-ctrl-3.1.1-r3.ebuild | 78 +++++++++++++++++++++ net-mail/relay-ctrl/relay-ctrl-3.2.ebuild | 79 ++++++++++++++++++++++ 4 files changed, 186 insertions(+) create mode 100644 net-mail/relay-ctrl/files/relay-ctrl-3.1.1-NOFILE-overstep.patch create mode 100644 net-mail/relay-ctrl/relay-ctrl-3.1.1-r3.ebuild create mode 100644 net-mail/relay-ctrl/relay-ctrl-3.2.ebuild (limited to 'net-mail/relay-ctrl') diff --git a/net-mail/relay-ctrl/Manifest b/net-mail/relay-ctrl/Manifest index f4d73dc4cee8..8da687d6ffb5 100644 --- a/net-mail/relay-ctrl/Manifest +++ b/net-mail/relay-ctrl/Manifest @@ -1,4 +1,8 @@ AUX authenticated.c-relayfixup.diff 702 BLAKE2B c597a6dbf6fc7161caa769aafc3938bcc5ca14ac6ef3da176b04dbf62bb7832059816e603f9600394cbd7225d1c5d9ec30829f41a4b00da3d0e9d2ac6805c60e SHA512 2515f2b5a43e5bae900ef0f419d7f9fb95953e39ebaee524efd8952e0764d82507483b08279866426cd84c6c8524a57cd51b8cf439a6dfbfca3da3e5d3fb0089 +AUX relay-ctrl-3.1.1-NOFILE-overstep.patch 671 BLAKE2B 93af856d842f1493afa35addb3077b750345e7b2ce4d5274f01f23a3081b3e873d12a826281e23c0d6a1e4815082e98be7e32f539d70d98ec2412ae610bd20c4 SHA512 83508f61caf936196a7093e8124267663ce89302e66832de30383432b68f08cbee26026ef1d18c5125fbcfd1c59477c14e406917370bfa1d3ea33a5c6b405377 DIST relay-ctrl-3.1.1.tar.gz 35046 BLAKE2B 91e4ce0f1f6ce5933f64e0d60407004d409474180f42bf40632bdb3bce1f3f974abdb597d34ab7ee4113e041323bd55965ce57f271fe79cfb8c56972fe8612b4 SHA512 738a001f6a058809955f04664919f261ff1a0bfc280ec5e805b870baf448b27664e1b376dd078100a2847e38248eb16651e23812f00609a437893e7b1dc9102c +DIST relay-ctrl-3.2.tar.gz 23119 BLAKE2B 663a95e7ef075b1b1fa390ab4d144a83c02eec615aa2a359892da1c5878ffe44995ed28df792a7cf1c179c93c1f874c87ffe4b781a28694c5fd81cec38228056 SHA512 aa2c7516e330ba3c4f466848e59b60cf5649393c3f9c87a3a5e5dfa170f96b9b1ad519098dfa153f9e06f9e02bd48d2a22118e1e8ccfe3e2585250e8feb4e5af EBUILD relay-ctrl-3.1.1-r2.ebuild 2094 BLAKE2B 30a58a02ba1c68387251dafd38eb942aaea325224ae97f6b50a70c8d4ebdab3f18720c634afcb9fb004ec2ed1453ae672a6fe300a7dd8d654435cbf30ad8be40 SHA512 cfc96e7dabc169c21d7bf64a00e51a8a8565d16f13e4a59cbadc5508243d9d514b4e8d5dffb232fd29392e5132cbed787e2d586eec460dd4359e7ab0da84bb92 +EBUILD relay-ctrl-3.1.1-r3.ebuild 2406 BLAKE2B 25e961bcc5222f55d3ac911b368386acb2f431e4664ef2f146bff25dede2ef06669210f3985e94bbbf6b40da42f9e6b17263ed42071133f843c23373cef5067d SHA512 3352b06bf68173814b66ba8ad147e36d4517d9a5e86d4d1e907eeacfa437cb4d4d9d1541d3aadc5d97d88fef3ec908f428a9b8df3b75ad39eca7f28ea6b20a2a +EBUILD relay-ctrl-3.2.ebuild 2469 BLAKE2B 5e7e0b212988705c418bdd65b63ba7771a5ba4e04e8603ad437810f0f616e5b04487415877d3601d359569c7f5471226872002fa8ae956c72ad58e2ba99d8ff5 SHA512 0ed0929b47c0ac6f7eb75c94e409579120ee73a1bcb2904d5a45710b91a0ac853cd04b1c48cbc0da4221c7ea9e3de5f11f31a2a38590c2b767e370c26563105f MISC metadata.xml 268 BLAKE2B 914b6995ad966e2b83ec718b2598969b181c119d8805241b0046f69e161ac22a9f769204f4783240056804008475aa406cbd91b9de499ec7840f9595158bd291 SHA512 ffda1db3fd6ac952f41a970e2e496c6a9fd0b12ed11cdf363fd269c3b00f627c6e70421fd545aad61d69594af2e5f43d8ebc197232a39b596d012818fe758850 diff --git a/net-mail/relay-ctrl/files/relay-ctrl-3.1.1-NOFILE-overstep.patch b/net-mail/relay-ctrl/files/relay-ctrl-3.1.1-NOFILE-overstep.patch new file mode 100644 index 000000000000..3bcd54c1f949 --- /dev/null +++ b/net-mail/relay-ctrl/files/relay-ctrl-3.1.1-NOFILE-overstep.patch @@ -0,0 +1,25 @@ +--- relay-ctrl-3.1.1/relay-ctrl-chdir.c 2002-04-26 18:07:38.000000000 +0200 ++++ relay-ctrl-3.1.1-patch/relay-ctrl-chdir.c 2010-12-08 20:49:15.449915704 +0100 +@@ -2,6 +2,7 @@ + #include + #include + #include ++#include + #include + #include "misc/misc.h" + #include "msg/msg.h" +@@ -14,9 +15,12 @@ + static int move_high(int fd) + { + struct stat s; ++ struct rlimit rl; + int newfd; +- +- for (newfd = fd + 1;; ++newfd) { ++ ++ getrlimit(RLIMIT_NOFILE, &rl); ++ ++ for (newfd = fd + 1; newfd < rl.rlim_cur; ++newfd) { + if (fstat(newfd, &s) != -1) continue; + if (dup2(fd, newfd) == -1) break; + close(fd); diff --git a/net-mail/relay-ctrl/relay-ctrl-3.1.1-r3.ebuild b/net-mail/relay-ctrl/relay-ctrl-3.1.1-r3.ebuild new file mode 100644 index 000000000000..9e71696f8480 --- /dev/null +++ b/net-mail/relay-ctrl/relay-ctrl-3.1.1-r3.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs fixheadtails + +DESCRIPTION="SMTP Relaying Control designed for qmail & tcpserver" +HOMEPAGE="http://untroubled.org/relay-ctrl/" +SRC_URI="http://untroubled.org/relay-ctrl/archive/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~sparc ~x86" +IUSE="" + +DEPEND="" +RDEPEND="sys-apps/ucspi-tcp + virtual/daemontools" + +RELAYCTRL_BASE="/var/spool/relay-ctrl" +# this is relative to RELAYCTRL_BASE +RELAYCTRL_STORAGE="allow" +RELAYCTRL_CONFDIR="/etc/relay-ctrl" +RELAYCTRL_BINDIR="/usr/bin" + +src_prepare() { + eapply_user + ht_fix_file "${S}"/Makefile + eapply "${FILESDIR}"/authenticated.c-relayfixup.diff + eapply "${FILESDIR}"/relay-ctrl-3.1.1-NOFILE-overstep.patch +} + +src_configure() { + local myCC="$(tc-getCC)" + echo "${myCC} ${CFLAGS}" > conf-cc || die + echo "${myCC} ${LDFLAGS}" > conf-ld || die +} + +src_install() { + exeinto ${RELAYCTRL_BINDIR} + doexe relay-ctrl-age relay-ctrl-allow relay-ctrl-check relay-ctrl-send relay-ctrl-udp relay-ctrl-chdir + + #NB: at some point the man page for relay-ctrl-chdir will be added! + doman relay-ctrl-age.8 relay-ctrl-allow.8 relay-ctrl-check.8 relay-ctrl-send.8 relay-ctrl-udp.8 + dodoc README ANNOUNCEMENT NEWS + + keepdir ${RELAYCTRL_BASE} ${RELAYCTRL_BASE}/${RELAYCTRL_STORAGE} + fperms 700 ${RELAYCTRL_BASE} + # perm 777 is intentional, see http://untroubled.org/relay-ctrl/ + fperms 777 ${RELAYCTRL_BASE}/${RELAYCTRL_STORAGE} + + dodir ${RELAYCTRL_CONFDIR} + + # tell it our storage dir + echo "${RELAYCTRL_BASE}/${RELAYCTRL_STORAGE}" \ + > ${D}${RELAYCTRL_CONFDIR}/RELAY_CTRL_DIR || die + # default to 30 minutes + echo "1800" > ${D}${RELAYCTRL_CONFDIR}/RELAY_CTRL_EXPIRY || die + + dodir /etc/cron.hourly + echo "#!/bin/sh" > ${D}/etc/cron.hourly/relay-ctrl-age + echo "/usr/bin/envdir ${RELAYCTRL_CONFDIR} ${RELAYCTRL_BINDIR}/relay-ctrl-age" \ + >> "${D}"/etc/cron.hourly/relay-ctrl-age + fperms 755 /etc/cron.hourly/relay-ctrl-age +} + +pkg_postinst() { + if [[ -d /usr/lib/courier-imap/authlib ]]; then + ln -sf /usr/bin/relay-ctrl-allow \ + /usr/lib/courier-imap/authlib/relay-ctrl-allow + fi + elog "Please see the instructions in /usr/share/doc/${PF}/README" + elog "for setup instructions with Courier-IMAP and Qmail" + + einfo "Ensure that the relay-ctrl-age cronjob is running" + einfo "otherwise your system may accumulate old relay entries." +} diff --git a/net-mail/relay-ctrl/relay-ctrl-3.2.ebuild b/net-mail/relay-ctrl/relay-ctrl-3.2.ebuild new file mode 100644 index 000000000000..2c858db5f652 --- /dev/null +++ b/net-mail/relay-ctrl/relay-ctrl-3.2.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs fixheadtails + +DESCRIPTION="SMTP Relaying Control designed for qmail & tcpserver" +HOMEPAGE="http://untroubled.org/relay-ctrl/" +SRC_URI="http://untroubled.org/relay-ctrl/archive/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~sparc ~x86" +IUSE="" + +DEPEND="dev-libs/bglibs" +RDEPEND="${DEPEND} + sys-apps/ucspi-tcp + virtual/daemontools" + +RELAYCTRL_BASE="/var/spool/relay-ctrl" +# this is relative to RELAYCTRL_BASE +RELAYCTRL_STORAGE="allow" +RELAYCTRL_CONFDIR="/etc/relay-ctrl" +RELAYCTRL_BINDIR="/usr/bin" + +src_prepare() { + eapply_user + ht_fix_file "${S}"/Makefile + #eapply "${FILESDIR}"/authenticated.c-relayfixup.diff # Fixed upstream in a different way + eapply "${FILESDIR}"/relay-ctrl-3.1.1-NOFILE-overstep.patch +} + +src_configure() { + local myCC="$(tc-getCC)" + echo "${myCC} ${CFLAGS}" > conf-cc || die + echo "${myCC} ${LDFLAGS}" > conf-ld || die +} + +src_install() { + exeinto ${RELAYCTRL_BINDIR} + doexe relay-ctrl-age relay-ctrl-allow relay-ctrl-check relay-ctrl-send relay-ctrl-udp relay-ctrl-chdir + + #NB: at some point the man page for relay-ctrl-chdir will be added! + doman relay-ctrl-age.8 relay-ctrl-allow.8 relay-ctrl-check.8 relay-ctrl-send.8 relay-ctrl-udp.8 + dodoc README ANNOUNCEMENT NEWS + + keepdir ${RELAYCTRL_BASE} ${RELAYCTRL_BASE}/${RELAYCTRL_STORAGE} + fperms 700 ${RELAYCTRL_BASE} + # perm 777 is intentional, see http://untroubled.org/relay-ctrl/ + fperms 777 ${RELAYCTRL_BASE}/${RELAYCTRL_STORAGE} + + dodir ${RELAYCTRL_CONFDIR} + + # tell it our storage dir + echo "${RELAYCTRL_BASE}/${RELAYCTRL_STORAGE}" \ + > ${D}${RELAYCTRL_CONFDIR}/RELAY_CTRL_DIR || die + # default to 30 minutes + echo "1800" > ${D}${RELAYCTRL_CONFDIR}/RELAY_CTRL_EXPIRY || die + + dodir /etc/cron.hourly + echo "#!/bin/sh" > ${D}/etc/cron.hourly/relay-ctrl-age + echo "/usr/bin/envdir ${RELAYCTRL_CONFDIR} ${RELAYCTRL_BINDIR}/relay-ctrl-age" \ + >> "${D}"/etc/cron.hourly/relay-ctrl-age + fperms 755 /etc/cron.hourly/relay-ctrl-age +} + +pkg_postinst() { + if [[ -d /usr/lib/courier-imap/authlib ]]; then + ln -sf /usr/bin/relay-ctrl-allow \ + /usr/lib/courier-imap/authlib/relay-ctrl-allow + fi + elog "Please see the instructions in /usr/share/doc/${PF}/README" + elog "for setup instructions with Courier-IMAP and Qmail" + + einfo "Ensure that the relay-ctrl-age cronjob is running" + einfo "otherwise your system may accumulate old relay entries." +} -- cgit v1.2.3