Gentoo Archives: gentoo-commits

From: Michael Haubenwallner <haubi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: mail-mta/nullmailer/
Date: Mon, 01 Apr 2019 08:30:49
Message-Id: 1554106444.24c1f8418e70e3c9050942653e385da982ab2ced.haubi@gentoo
1 commit: 24c1f8418e70e3c9050942653e385da982ab2ced
2 Author: Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 26 16:37:46 2019 +0000
4 Commit: Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
5 CommitDate: Mon Apr 1 08:14:04 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24c1f841
7
8 mail-mta/nullmailer: revbump and more
9
10 Revbump, EAPI 7, add myself as maintainer.
11 Closes: https://bugs.gentoo.org/654124
12
13 Add ~arm keyword.
14 Closes: https://bugs.gentoo.org/664514
15
16 Fix permission for /var/spool/nullmailer/failed,
17 credits to John R. Graham.
18 Closes: https://bugs.gentoo.org/622738
19
20 Keep dir /var/spool/nullmailer/failed.
21 Closes: https://bugs.gentoo.org/651288
22
23 No not depend on sys-apps/groff.
24 Closes: https://bugs.gentoo.org/604316
25
26 Tell if 'emerge --config' gets empty FQDN or domainname,
27 and remind to tweak /etc/nullmailer/remotes.
28 Closes: https://bugs.gentoo.org/668104
29
30 Block with USE=mta against msmtp,opensmtpd,ssmtp.
31 Closes: https://bugs.gentoo.org/631654
32
33 Package-Manager: Portage-2.3.51, Repoman-2.3.11
34 Signed-off-by: Michael Haubenwallner <haubi <AT> gentoo.org>
35
36 mail-mta/nullmailer/Manifest | 1 +
37 mail-mta/nullmailer/metadata.xml | 4 +
38 mail-mta/nullmailer/nullmailer-2.2.ebuild | 148 ++++++++++++++++++++++++++++++
39 3 files changed, 153 insertions(+)
40
41 diff --git a/mail-mta/nullmailer/Manifest b/mail-mta/nullmailer/Manifest
42 index 2aeaf81da55..7bddba27fbc 100644
43 --- a/mail-mta/nullmailer/Manifest
44 +++ b/mail-mta/nullmailer/Manifest
45 @@ -1,3 +1,4 @@
46 DIST nullmailer-1.13.tar.gz 205431 BLAKE2B e1eaa94262e3d4d202293d35f7ac610a3a2cb92e403b2fd8dff467788a4f4c0d3a1bbc27b47eeae9d1c493eb8d07c35e056ea7501ad92ec4addae694997561b4 SHA512 96dcb3ddecde77a73e5ca1afa5167d35f965d04999f02cc2ef60b54ea7eb7a006e5cf5678fc34a54d4be4f9fd71bd0f784a8671aca40c70dbc307666c548e1d7
47 DIST nullmailer-2.0.tar.gz 249538 BLAKE2B 2340fd0b3e67be0061aedb2a1dc0466c88e1253691c955e960244f2ce330af6798bd43f21908a9f12ce9572489dd5c48288e65ae688cd73a8afedd4f7bb6a49e SHA512 2a7c914c5effcf796f987256ac68836f0ba875cc7f2da1aeb8f23767e15a556da168b8da5cc52d9f800986883bbdbcd49a9610ae220f463164a906c1d82fbce6
48 +DIST nullmailer-2.2.tar.gz 257740 BLAKE2B 18821caa1a377a899e3fedc84530d7c672f345cafb627da05e6c7bcd7d2708d54fc4ff4b761a6a23b2ddbabe73514473a5ec2abf3182dce2f5d3d4fbe3618fed SHA512 21b29d59f3c386c13ce4541ae11dc5cd69f842085479d7fc9a69a540abc608ce5c1825f06bd3566536b392931f7eeb1b2d35addd816849e6f431877bb18c8268
49 DIST nullmailer-patches-1.13.tar.xz 8384 BLAKE2B 523547f8abf9b5d05938aad1e22e4195ee49cfe392c515df442a26d2cfb79f959c37e8f860fb196e99075aaa6fe437aaec182e1c1e2057d97cc32cba78a200d0 SHA512 393531e39a92b0978bccbcdf123e05b2cdad1ec8e600825cc24177ba414c1f615995c0344291ebb664f42b384a160c0359fec5ba3308cc14cbc9ceb8577d799c
50
51 diff --git a/mail-mta/nullmailer/metadata.xml b/mail-mta/nullmailer/metadata.xml
52 index ead06a9996f..110d077c53d 100644
53 --- a/mail-mta/nullmailer/metadata.xml
54 +++ b/mail-mta/nullmailer/metadata.xml
55 @@ -5,6 +5,10 @@
56 <email>robbat2@g.o</email>
57 <name>Robin H. Johnson</name>
58 </maintainer>
59 + <maintainer type="person">
60 + <email>haubi@g.o</email>
61 + <name>Michael Haubenwallner</name>
62 + </maintainer>
63 <upstream>
64 <remote-id type="github">bruceg/nullmailer</remote-id>
65 </upstream>
66
67 diff --git a/mail-mta/nullmailer/nullmailer-2.2.ebuild b/mail-mta/nullmailer/nullmailer-2.2.ebuild
68 new file mode 100644
69 index 00000000000..a5525dd67ed
70 --- /dev/null
71 +++ b/mail-mta/nullmailer/nullmailer-2.2.ebuild
72 @@ -0,0 +1,148 @@
73 +# Copyright 1999-2019 Gentoo Authors
74 +# Distributed under the terms of the GNU General Public License v2
75 +
76 +EAPI=7
77 +
78 +inherit autotools eutils flag-o-matic multilib systemd user
79 +
80 +DESCRIPTION="Simple relay-only local mail transport agent"
81 +HOMEPAGE="http://untroubled.org/nullmailer/ https://github.com/bruceg/nullmailer"
82 +SRC_URI="http://untroubled.org/${PN}/archive/${P}.tar.gz"
83 +
84 +LICENSE="GPL-2"
85 +SLOT="0"
86 +KEYWORDS="~amd64 ~arm ~ppc ~x86"
87 +IUSE="ssl test"
88 +
89 +DEPEND="
90 + ssl? ( net-libs/gnutls:0= )
91 + test? ( sys-apps/ucspi-tcp[ipv6] sys-process/daemontools )
92 +"
93 +RDEPEND="
94 + virtual/logger
95 + virtual/shadow
96 + ssl? ( net-libs/gnutls:0= )
97 + !mail-mta/courier
98 + !mail-mta/esmtp
99 + !mail-mta/exim
100 + !mail-mta/mini-qmail
101 + !mail-mta/msmtp[mta(+)]
102 + !mail-mta/netqmail
103 + !mail-mta/opensmtpd[mta(+)]
104 + !mail-mta/postfix
105 + !mail-mta/qmail-ldap
106 + !mail-mta/sendmail
107 + !mail-mta/ssmtp[mta(+)]
108 +"
109 +
110 +pkg_setup() {
111 + enewgroup nullmail 88
112 + enewuser nullmail 88 -1 /var/spool/nullmailer nullmail
113 +}
114 +
115 +src_prepare() {
116 + default
117 + sed -i.orig \
118 + -e '/\$(localstatedir)\/trigger/d' \
119 + "${S}"/Makefile.am || die
120 + sed \
121 + -e "s:^AC_PROG_RANLIB:AC_CHECK_TOOL(AR, ar, false)\nAC_PROG_RANLIB:g" \
122 + -i configure.ac || die
123 + sed -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" -i configure.ac || die
124 + sed \
125 + -e "s#/usr/local#/usr#" \
126 + -e 's:/usr/etc/:/etc/:g' \
127 + -i doc/nullmailer-send.8 || die
128 + eautoreconf
129 +}
130 +
131 +src_configure() {
132 + # https://github.com/bruceg/nullmailer/pull/31/commits
133 + append-lfs-flags #471102
134 + econf \
135 + --localstatedir="${EPREFIX}"/var \
136 + $(use_enable ssl tls)
137 +}
138 +
139 +src_install() {
140 + default
141 +
142 + # A small bit of sample config
143 + insinto /etc/nullmailer
144 + newins "${FILESDIR}"/remotes.sample-2.0 remotes
145 +
146 + # This contains passwords, so should be secure
147 + fperms 0640 /etc/nullmailer/remotes
148 + fowners root:nullmail /etc/nullmailer/remotes
149 +
150 + # daemontools stuff
151 + dodir /var/spool/nullmailer/service{,/log}
152 +
153 + insinto /var/spool/nullmailer/service
154 + newins scripts/nullmailer.run run
155 + fperms 700 /var/spool/nullmailer/service/run
156 +
157 + insinto /var/spool/nullmailer/service/log
158 + newins scripts/nullmailer-log.run run
159 + fperms 700 /var/spool/nullmailer/service/log/run
160 +
161 + # usability
162 + dosym ../sbin/sendmail usr/$(get_libdir)/sendmail
163 +
164 + # permissions stuff
165 + keepdir /var/log/nullmailer /var/spool/nullmailer/{tmp,queue,failed}
166 + fperms 770 /var/log/nullmailer
167 + fowners nullmail:nullmail /usr/sbin/nullmailer-queue /usr/bin/mailq
168 + fperms 4711 /usr/sbin/nullmailer-queue /usr/bin/mailq
169 +
170 + newinitd "${FILESDIR}"/init.d-nullmailer-r6 nullmailer
171 + systemd_dounit scripts/${PN}.service
172 +}
173 +
174 +pkg_postinst() {
175 + if [[ ! -e ${EROOT}/var/spool/nullmailer/trigger ]]; then
176 + mkfifo --mode=0660 "${EROOT}/var/spool/nullmailer/trigger" || die
177 + fi
178 + chown nullmail:nullmail \
179 + "${EROOT}"/var/log/nullmailer \
180 + "${EROOT}"/var/spool/nullmailer/{tmp,queue,failed,trigger} || die
181 + chmod 770 \
182 + "${EROOT}"/var/log/nullmailer \
183 + "${EROOT}"/var/spool/nullmailer/{tmp,queue,failed} || die
184 + chmod 660 "${EROOT}"/var/spool/nullmailer/trigger || die
185 +
186 + # This contains passwords, so should be secure
187 + chmod 0640 "${EROOT}"/etc/nullmailer/remotes || die
188 + chown root:nullmail "${EROOT}"/etc/nullmailer/remotes || die
189 +
190 + if [[ -z ${REPLACING_VERSIONS} ]]; then
191 + elog "To create an initial setup, please do:"
192 + elog "emerge --config =${CATEGORY}/${PF}"
193 + fi
194 +}
195 +
196 +pkg_postrm() {
197 + if [[ -e ${EROOT}/var/spool/nullmailer/trigger ]]; then
198 + rm "${EROOT}/var/spool/nullmailer/trigger" || die
199 + fi
200 +}
201 +
202 +pkg_config() {
203 + if [[ ! -s ${EROOT}/etc/nullmailer/me ]]; then
204 + einfo "Setting /etc/nullmailer/me"
205 + hostname --fqdn > "${EROOT}/etc/nullmailer/me"
206 + if [[ ! -s ${EROOT}/etc/nullmailer/me ]]; then
207 + eerror "Got no output from 'hostname --fqdn'"
208 + fi
209 + fi
210 + if [[ ! -s ${EROOT}/etc/nullmailer/defaultdomain ]]; then
211 + einfo "Setting /etc/nullmailer/defaultdomain"
212 + hostname --domain > "${EROOT}/etc/nullmailer/defaultdomain"
213 + if [[ ! -s ${EROOT}/etc/nullmailer/me ]]; then
214 + eerror "Got no output from 'hostname --domain'"
215 + fi
216 + fi
217 + if ! grep -q '^[ \t]*[^# \t]' "${EROOT}/etc/nullmailer/remotes"; then
218 + ewarn "Remember to tweak ${EROOT}/etc/nullmailer/remotes yourself!"
219 + fi
220 +}