summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Haubenwallner <haubi@gentoo.org>2019-02-26 17:37:46 +0100
committerMichael Haubenwallner <haubi@gentoo.org>2019-04-01 10:14:04 +0200
commit24c1f8418e70e3c9050942653e385da982ab2ced (patch)
treeaa12d3f30e7948288ca185f8bcaa2a2317be31d7 /mail-mta
parentx11-misc/py3status: version bump (diff)
downloadgentoo-24c1f8418e70e3c9050942653e385da982ab2ced.tar.gz
gentoo-24c1f8418e70e3c9050942653e385da982ab2ced.tar.bz2
gentoo-24c1f8418e70e3c9050942653e385da982ab2ced.zip
mail-mta/nullmailer: revbump and more
Revbump, EAPI 7, add myself as maintainer. Closes: https://bugs.gentoo.org/654124 Add ~arm keyword. Closes: https://bugs.gentoo.org/664514 Fix permission for /var/spool/nullmailer/failed, credits to John R. Graham. Closes: https://bugs.gentoo.org/622738 Keep dir /var/spool/nullmailer/failed. Closes: https://bugs.gentoo.org/651288 No not depend on sys-apps/groff. Closes: https://bugs.gentoo.org/604316 Tell if 'emerge --config' gets empty FQDN or domainname, and remind to tweak /etc/nullmailer/remotes. Closes: https://bugs.gentoo.org/668104 Block with USE=mta against msmtp,opensmtpd,ssmtp. Closes: https://bugs.gentoo.org/631654 Package-Manager: Portage-2.3.51, Repoman-2.3.11 Signed-off-by: Michael Haubenwallner <haubi@gentoo.org>
Diffstat (limited to 'mail-mta')
-rw-r--r--mail-mta/nullmailer/Manifest1
-rw-r--r--mail-mta/nullmailer/metadata.xml4
-rw-r--r--mail-mta/nullmailer/nullmailer-2.2.ebuild148
3 files changed, 153 insertions, 0 deletions
diff --git a/mail-mta/nullmailer/Manifest b/mail-mta/nullmailer/Manifest
index 2aeaf81da555..7bddba27fbc8 100644
--- a/mail-mta/nullmailer/Manifest
+++ b/mail-mta/nullmailer/Manifest
@@ -1,3 +1,4 @@
DIST nullmailer-1.13.tar.gz 205431 BLAKE2B e1eaa94262e3d4d202293d35f7ac610a3a2cb92e403b2fd8dff467788a4f4c0d3a1bbc27b47eeae9d1c493eb8d07c35e056ea7501ad92ec4addae694997561b4 SHA512 96dcb3ddecde77a73e5ca1afa5167d35f965d04999f02cc2ef60b54ea7eb7a006e5cf5678fc34a54d4be4f9fd71bd0f784a8671aca40c70dbc307666c548e1d7
DIST nullmailer-2.0.tar.gz 249538 BLAKE2B 2340fd0b3e67be0061aedb2a1dc0466c88e1253691c955e960244f2ce330af6798bd43f21908a9f12ce9572489dd5c48288e65ae688cd73a8afedd4f7bb6a49e SHA512 2a7c914c5effcf796f987256ac68836f0ba875cc7f2da1aeb8f23767e15a556da168b8da5cc52d9f800986883bbdbcd49a9610ae220f463164a906c1d82fbce6
+DIST nullmailer-2.2.tar.gz 257740 BLAKE2B 18821caa1a377a899e3fedc84530d7c672f345cafb627da05e6c7bcd7d2708d54fc4ff4b761a6a23b2ddbabe73514473a5ec2abf3182dce2f5d3d4fbe3618fed SHA512 21b29d59f3c386c13ce4541ae11dc5cd69f842085479d7fc9a69a540abc608ce5c1825f06bd3566536b392931f7eeb1b2d35addd816849e6f431877bb18c8268
DIST nullmailer-patches-1.13.tar.xz 8384 BLAKE2B 523547f8abf9b5d05938aad1e22e4195ee49cfe392c515df442a26d2cfb79f959c37e8f860fb196e99075aaa6fe437aaec182e1c1e2057d97cc32cba78a200d0 SHA512 393531e39a92b0978bccbcdf123e05b2cdad1ec8e600825cc24177ba414c1f615995c0344291ebb664f42b384a160c0359fec5ba3308cc14cbc9ceb8577d799c
diff --git a/mail-mta/nullmailer/metadata.xml b/mail-mta/nullmailer/metadata.xml
index ead06a9996fe..110d077c53d1 100644
--- a/mail-mta/nullmailer/metadata.xml
+++ b/mail-mta/nullmailer/metadata.xml
@@ -5,6 +5,10 @@
<email>robbat2@gentoo.org</email>
<name>Robin H. Johnson</name>
</maintainer>
+ <maintainer type="person">
+ <email>haubi@gentoo.org</email>
+ <name>Michael Haubenwallner</name>
+ </maintainer>
<upstream>
<remote-id type="github">bruceg/nullmailer</remote-id>
</upstream>
diff --git a/mail-mta/nullmailer/nullmailer-2.2.ebuild b/mail-mta/nullmailer/nullmailer-2.2.ebuild
new file mode 100644
index 000000000000..a5525dd67ed8
--- /dev/null
+++ b/mail-mta/nullmailer/nullmailer-2.2.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools eutils flag-o-matic multilib systemd user
+
+DESCRIPTION="Simple relay-only local mail transport agent"
+HOMEPAGE="http://untroubled.org/nullmailer/ https://github.com/bruceg/nullmailer"
+SRC_URI="http://untroubled.org/${PN}/archive/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~x86"
+IUSE="ssl test"
+
+DEPEND="
+ ssl? ( net-libs/gnutls:0= )
+ test? ( sys-apps/ucspi-tcp[ipv6] sys-process/daemontools )
+"
+RDEPEND="
+ virtual/logger
+ virtual/shadow
+ ssl? ( net-libs/gnutls:0= )
+ !mail-mta/courier
+ !mail-mta/esmtp
+ !mail-mta/exim
+ !mail-mta/mini-qmail
+ !mail-mta/msmtp[mta(+)]
+ !mail-mta/netqmail
+ !mail-mta/opensmtpd[mta(+)]
+ !mail-mta/postfix
+ !mail-mta/qmail-ldap
+ !mail-mta/sendmail
+ !mail-mta/ssmtp[mta(+)]
+"
+
+pkg_setup() {
+ enewgroup nullmail 88
+ enewuser nullmail 88 -1 /var/spool/nullmailer nullmail
+}
+
+src_prepare() {
+ default
+ sed -i.orig \
+ -e '/\$(localstatedir)\/trigger/d' \
+ "${S}"/Makefile.am || die
+ sed \
+ -e "s:^AC_PROG_RANLIB:AC_CHECK_TOOL(AR, ar, false)\nAC_PROG_RANLIB:g" \
+ -i configure.ac || die
+ sed -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" -i configure.ac || die
+ sed \
+ -e "s#/usr/local#/usr#" \
+ -e 's:/usr/etc/:/etc/:g' \
+ -i doc/nullmailer-send.8 || die
+ eautoreconf
+}
+
+src_configure() {
+ # https://github.com/bruceg/nullmailer/pull/31/commits
+ append-lfs-flags #471102
+ econf \
+ --localstatedir="${EPREFIX}"/var \
+ $(use_enable ssl tls)
+}
+
+src_install() {
+ default
+
+ # A small bit of sample config
+ insinto /etc/nullmailer
+ newins "${FILESDIR}"/remotes.sample-2.0 remotes
+
+ # This contains passwords, so should be secure
+ fperms 0640 /etc/nullmailer/remotes
+ fowners root:nullmail /etc/nullmailer/remotes
+
+ # daemontools stuff
+ dodir /var/spool/nullmailer/service{,/log}
+
+ insinto /var/spool/nullmailer/service
+ newins scripts/nullmailer.run run
+ fperms 700 /var/spool/nullmailer/service/run
+
+ insinto /var/spool/nullmailer/service/log
+ newins scripts/nullmailer-log.run run
+ fperms 700 /var/spool/nullmailer/service/log/run
+
+ # usability
+ dosym ../sbin/sendmail usr/$(get_libdir)/sendmail
+
+ # permissions stuff
+ keepdir /var/log/nullmailer /var/spool/nullmailer/{tmp,queue,failed}
+ fperms 770 /var/log/nullmailer
+ fowners nullmail:nullmail /usr/sbin/nullmailer-queue /usr/bin/mailq
+ fperms 4711 /usr/sbin/nullmailer-queue /usr/bin/mailq
+
+ newinitd "${FILESDIR}"/init.d-nullmailer-r6 nullmailer
+ systemd_dounit scripts/${PN}.service
+}
+
+pkg_postinst() {
+ if [[ ! -e ${EROOT}/var/spool/nullmailer/trigger ]]; then
+ mkfifo --mode=0660 "${EROOT}/var/spool/nullmailer/trigger" || die
+ fi
+ chown nullmail:nullmail \
+ "${EROOT}"/var/log/nullmailer \
+ "${EROOT}"/var/spool/nullmailer/{tmp,queue,failed,trigger} || die
+ chmod 770 \
+ "${EROOT}"/var/log/nullmailer \
+ "${EROOT}"/var/spool/nullmailer/{tmp,queue,failed} || die
+ chmod 660 "${EROOT}"/var/spool/nullmailer/trigger || die
+
+ # This contains passwords, so should be secure
+ chmod 0640 "${EROOT}"/etc/nullmailer/remotes || die
+ chown root:nullmail "${EROOT}"/etc/nullmailer/remotes || die
+
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "To create an initial setup, please do:"
+ elog "emerge --config =${CATEGORY}/${PF}"
+ fi
+}
+
+pkg_postrm() {
+ if [[ -e ${EROOT}/var/spool/nullmailer/trigger ]]; then
+ rm "${EROOT}/var/spool/nullmailer/trigger" || die
+ fi
+}
+
+pkg_config() {
+ if [[ ! -s ${EROOT}/etc/nullmailer/me ]]; then
+ einfo "Setting /etc/nullmailer/me"
+ hostname --fqdn > "${EROOT}/etc/nullmailer/me"
+ if [[ ! -s ${EROOT}/etc/nullmailer/me ]]; then
+ eerror "Got no output from 'hostname --fqdn'"
+ fi
+ fi
+ if [[ ! -s ${EROOT}/etc/nullmailer/defaultdomain ]]; then
+ einfo "Setting /etc/nullmailer/defaultdomain"
+ hostname --domain > "${EROOT}/etc/nullmailer/defaultdomain"
+ if [[ ! -s ${EROOT}/etc/nullmailer/me ]]; then
+ eerror "Got no output from 'hostname --domain'"
+ fi
+ fi
+ if ! grep -q '^[ \t]*[^# \t]' "${EROOT}/etc/nullmailer/remotes"; then
+ ewarn "Remember to tweak ${EROOT}/etc/nullmailer/remotes yourself!"
+ fi
+}