diff options
author | Sergiy Borodych <Sergiy.Borodych@gmail.com> | 2019-10-21 19:31:34 +0300 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2020-05-30 21:46:50 -0700 |
commit | c1ad7ee1f64854d7c7ff44baa2c2eb10a895440a (patch) | |
tree | 726d74f37d3b2c8773c422772fa3b2d5275b167d /net-mail | |
parent | dev-db/redis: drop old (diff) | |
download | gentoo-c1ad7ee1f64854d7c7ff44baa2c2eb10a895440a.tar.gz gentoo-c1ad7ee1f64854d7c7ff44baa2c2eb10a895440a.tar.bz2 gentoo-c1ad7ee1f64854d7c7ff44baa2c2eb10a895440a.zip |
net-mail/relay-ctrl: fix issue for cron (run-parts)
the issue:
"run-parts: failed to exec /etc/cron.hourly/relay-ctrl-age: Exec format error"
manifested itself after migration to cronie (from vixie-cron)
Closes: https://github.com/gentoo/gentoo/pull/15921
Signed-off-by: Sergiy Borodych <Sergiy.Borodych@gmail.com>
(cherry picked from commit 0013bfd0921ff18a058b78666d9e3609ccd54f69)
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'net-mail')
-rw-r--r-- | net-mail/relay-ctrl/relay-ctrl-3.1.1-r3.ebuild | 73 |
1 files changed, 73 insertions, 0 deletions
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..25383ad78d6d --- /dev/null +++ b/net-mail/relay-ctrl/relay-ctrl-3.1.1-r3.ebuild @@ -0,0 +1,73 @@ +# 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 +} + +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} + fperms 1777 ${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" +} |