Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: mail-mta/netqmail/files/, mail-mta/netqmail/
Date: Fri, 01 Nov 2019 14:11:34
Message-Id: 1572616754.c0c074a84d82aba52e68925cbb158e8d4b57f0bf.juippis@gentoo
1 commit: c0c074a84d82aba52e68925cbb158e8d4b57f0bf
2 Author: Rolf Eike Beer <eike <AT> sf-mail <DOT> de>
3 AuthorDate: Tue Oct 29 22:09:12 2019 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Fri Nov 1 13:59:14 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0c074a8
7
8 mail-mta/netqmail: fix SMTPUTF8 mode
9
10 This fix was provided by the original patch author, but he sadly did not provide
11 a new patch.
12
13 Closes: https://bugs.gentoo.org/611142
14 Signed-off-by: Rolf Eike Beer <eike <AT> sf-mail.de>
15 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
16
17 .../netqmail/files/qmail-smtputf8-crlf-fix.patch | 12 ++
18 mail-mta/netqmail/netqmail-1.06-r10.ebuild | 196 +++++++++++++++++++++
19 2 files changed, 208 insertions(+)
20
21 diff --git a/mail-mta/netqmail/files/qmail-smtputf8-crlf-fix.patch b/mail-mta/netqmail/files/qmail-smtputf8-crlf-fix.patch
22 new file mode 100644
23 index 00000000000..cde34e0f9dd
24 --- /dev/null
25 +++ b/mail-mta/netqmail/files/qmail-smtputf8-crlf-fix.patch
26 @@ -0,0 +1,12 @@
27 +https://bugs.gentoo.org/611142
28 +
29 +--- a/qmail-remote.c 2019-10-29 22:46:27.076000000 +0100
30 ++++ b/qmail-remote.c 2019-10-29 22:48:18.868000000 +0100
31 +@@ -556,6 +556,7 @@ void checkutf8message()
32 + if (r == 0) break;
33 + if (r == -1) temp_read();
34 +
35 ++ if (ch == '\n' && !stralloc_cats(&firstpart,"\r")) temp_nomem();
36 + if (!stralloc_append(&firstpart,&ch)) temp_nomem();
37 +
38 + if (ch == '\r')
39
40 diff --git a/mail-mta/netqmail/netqmail-1.06-r10.ebuild b/mail-mta/netqmail/netqmail-1.06-r10.ebuild
41 new file mode 100644
42 index 00000000000..315e297526f
43 --- /dev/null
44 +++ b/mail-mta/netqmail/netqmail-1.06-r10.ebuild
45 @@ -0,0 +1,196 @@
46 +# Copyright 1999-2019 Gentoo Authors
47 +# Distributed under the terms of the GNU General Public License v2
48 +
49 +EAPI=7
50 +
51 +GENQMAIL_PV=20191010
52 +QMAIL_SPP_PV=0.42
53 +
54 +QMAIL_TLS_PV=20190114
55 +QMAIL_TLS_F=${PN}-1.05-tls-smtpauth-${QMAIL_TLS_PV}.patch
56 +QMAIL_TLS_CVE=vu555316.patch
57 +
58 +QMAIL_BIGTODO_PV=103
59 +QMAIL_BIGTODO_F=big-todo.${QMAIL_BIGTODO_PV}.patch
60 +
61 +QMAIL_LARGE_DNS='qmail-103.patch'
62 +
63 +QMAIL_SMTPUTF8='qmail-smtputf8.patch'
64 +
65 +inherit qmail
66 +
67 +DESCRIPTION="qmail -- a secure, reliable, efficient, simple message transfer agent"
68 +HOMEPAGE="
69 + http://netqmail.org
70 + https://cr.yp.to/qmail.html
71 + http://qmail.org
72 +"
73 +SRC_URI="mirror://qmail/${P}.tar.gz
74 + https://github.com/DerDakon/genqmail/releases/download/genqmail-${GENQMAIL_PV}/${GENQMAIL_F}
75 + https://www.ckdhr.com/ckd/${QMAIL_LARGE_DNS}
76 + !vanilla? (
77 + highvolume? ( mirror://qmail/${QMAIL_BIGTODO_F} )
78 + qmail-spp? ( mirror://sourceforge/qmail-spp/${QMAIL_SPP_F} )
79 + ssl? (
80 + https://mirror.alexh.name/qmail/netqmail/${QMAIL_TLS_F}
81 + http://inoa.net/qmail-tls/${QMAIL_TLS_CVE}
82 + https://arnt.gulbrandsen.priv.no/qmail/qmail-smtputf8.patch
83 + )
84 + )
85 +"
86 +
87 +LICENSE="public-domain"
88 +SLOT="0"
89 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~x86"
90 +IUSE="authcram gencertdaily highvolume libressl qmail-spp ssl vanilla"
91 +REQUIRED_USE="vanilla? ( !ssl !qmail-spp !highvolume )"
92 +RESTRICT="test"
93 +
94 +DEPEND="
95 + acct-group/nofiles
96 + acct-group/qmail
97 + acct-user/alias
98 + acct-user/qmaild
99 + acct-user/qmaill
100 + acct-user/qmailp
101 + acct-user/qmailq
102 + acct-user/qmailr
103 + acct-user/qmails
104 + net-dns/libidn2
105 + net-mail/queue-repair
106 + sys-apps/gentoo-functions
107 + sys-apps/groff
108 + ssl? (
109 + !libressl? ( >=dev-libs/openssl-1.1:0= )
110 + libressl? ( dev-libs/libressl:= )
111 + )
112 +"
113 +RDEPEND="${DEPEND}
114 + sys-apps/ucspi-tcp
115 + virtual/checkpassword
116 + virtual/daemontools
117 + authcram? ( >=net-mail/cmd5checkpw-0.30 )
118 + ssl? ( sys-apps/ucspi-ssl )
119 + !mail-mta/courier
120 + !mail-mta/esmtp
121 + !mail-mta/exim
122 + !mail-mta/mini-qmail
123 + !mail-mta/msmtp[mta]
124 + !mail-mta/nullmailer
125 + !mail-mta/opensmtpd
126 + !mail-mta/postfix
127 + !mail-mta/qmail-ldap
128 + !mail-mta/sendmail
129 + !mail-mta/ssmtp[mta]
130 +"
131 +
132 +pkg_setup() {
133 + if [[ -n "${QMAIL_PATCH_DIR}" ]]; then
134 + eerror
135 + eerror "The QMAIL_PATCH_DIR variable for custom patches"
136 + eerror "has been removed from ${PN}. If you need custom patches"
137 + eerror "see 'user patches' in the portage manual."
138 + eerror
139 + die "QMAIL_PATCH_DIR is not supported anymore"
140 + fi
141 +}
142 +
143 +src_unpack() {
144 + genqmail_src_unpack
145 + use qmail-spp && qmail_spp_src_unpack
146 +
147 + unpack ${P}.tar.gz
148 +}
149 +
150 +PATCHES=(
151 + "${FILESDIR}/${PV}-exit.patch"
152 + "${FILESDIR}/${PV}-readwrite.patch"
153 + "${DISTDIR}/${QMAIL_LARGE_DNS}"
154 + "${FILESDIR}/${PV}-fbsd-utmpx.patch"
155 + "${FILESDIR}/${P}-ipme-multiple.patch"
156 +)
157 +
158 +src_prepare() {
159 + if ! use vanilla; then
160 + if use ssl; then
161 + # This patch contains relative paths and needs to be cleaned up.
162 + sed 's~^--- \.\./\.\./~--- ~g' \
163 + < "${DISTDIR}"/${QMAIL_TLS_F} \
164 + > "${T}"/${QMAIL_TLS_F} || die
165 + PATCHES+=( "${T}/${QMAIL_TLS_F}"
166 + "${DISTDIR}/${QMAIL_TLS_CVE}"
167 + "${FILESDIR}/qmail-smtputf8.patch"
168 + "${FILESDIR}/qmail-smtputf8-crlf-fix.patch"
169 + )
170 + fi
171 + if use highvolume; then
172 + PATCHES+=( "${DISTDIR}/${QMAIL_BIGTODO_F}" )
173 + fi
174 +
175 + if use qmail-spp; then
176 + if use ssl; then
177 + SPP_PATCH="${QMAIL_SPP_S}/qmail-spp-smtpauth-tls-20060105.diff"
178 + else
179 + SPP_PATCH="${QMAIL_SPP_S}/netqmail-spp.diff"
180 + fi
181 + # make the patch work with "-p1"
182 + sed -e 's#^--- \([Mq]\)#--- a/\1#' -e 's#^+++ \([Mq]\)#+++ b/\1#' -i ${SPP_PATCH} || die
183 +
184 + PATCHES+=( "${SPP_PATCH}" )
185 + fi
186 + fi
187 +
188 + default
189 +
190 + qmail_src_postunpack
191 +
192 + # Fix bug #33818 but for netqmail (Bug 137015)
193 + if ! use authcram; then
194 + einfo "Disabled CRAM_MD5 support"
195 + sed -e 's,^#define CRAM_MD5$,/*&*/,' -i "${S}"/qmail-smtpd.c || die
196 + else
197 + einfo "Enabled CRAM_MD5 support"
198 + fi
199 +
200 + ht_fix_file Makefile*
201 +}
202 +
203 +src_compile() {
204 + qmail_src_compile
205 + use qmail-spp && qmail_spp_src_compile
206 +}
207 +
208 +src_install() {
209 + qmail_src_install
210 +}
211 +
212 +pkg_postinst() {
213 + qmail_queue_setup
214 + qmail_rootmail_fixup
215 + qmail_tcprules_build
216 +
217 + qmail_config_notice
218 + qmail_supervise_config_notice
219 + elog
220 + elog "If you are looking for documentation, check those links:"
221 + elog "https://wiki.gentoo.org/wiki/Virtual_mail_hosting_with_qmail"
222 + elog " -- qmail/vpopmail Virtual Mail Hosting System Guide"
223 + elog "http://www.lifewithqmail.com/"
224 + elog " -- Life with qmail"
225 + elog
226 +}
227 +
228 +pkg_preinst() {
229 + qmail_tcprules_fixup
230 +}
231 +
232 +pkg_config() {
233 + # avoid some weird locale problems
234 + export LC_ALL=C
235 +
236 + qmail_config_fast
237 + qmail_tcprules_config
238 + qmail_tcprules_build
239 +
240 + use ssl && qmail_ssl_generate
241 +}