1 |
commit: 0a25d8b33a20fd9fc4ad2a5e3080f55911ea54db |
2 |
Author: Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr> |
3 |
AuthorDate: Mon Nov 30 21:39:48 2020 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 30 21:39:48 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a25d8b3 |
7 |
|
8 |
net-mail/dbmail: port to EAPI 7 and GLEP 81 |
9 |
|
10 |
* Fix build with gcc-10 |
11 |
|
12 |
Closes: https://bugs.gentoo.org/708722 |
13 |
Package-Manager: Portage-3.0.9, Repoman-3.0.1 |
14 |
Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr> |
15 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
16 |
|
17 |
net-mail/dbmail/dbmail-3.2.3-r2.ebuild | 138 --------------------- |
18 |
net-mail/dbmail/dbmail-3.2.3-r3.ebuild | 133 ++++++++++++++++++++ |
19 |
.../dbmail/files/dbmail-3.2.3-fno-common.patch | 14 +++ |
20 |
net-mail/dbmail/files/dbmail-imapd.initd | 2 +- |
21 |
net-mail/dbmail/files/dbmail-lmtpd.initd | 2 +- |
22 |
net-mail/dbmail/files/dbmail-pop3d.initd | 2 +- |
23 |
net-mail/dbmail/files/dbmail-timsieved.initd | 2 +- |
24 |
7 files changed, 151 insertions(+), 142 deletions(-) |
25 |
|
26 |
diff --git a/net-mail/dbmail/dbmail-3.2.3-r2.ebuild b/net-mail/dbmail/dbmail-3.2.3-r2.ebuild |
27 |
deleted file mode 100644 |
28 |
index 2875f819a20..00000000000 |
29 |
--- a/net-mail/dbmail/dbmail-3.2.3-r2.ebuild |
30 |
+++ /dev/null |
31 |
@@ -1,138 +0,0 @@ |
32 |
-# Copyright 1999-2018 Gentoo Foundation |
33 |
-# Distributed under the terms of the GNU General Public License v2 |
34 |
- |
35 |
-EAPI=6 |
36 |
- |
37 |
-inherit systemd versionator user |
38 |
- |
39 |
-DESCRIPTION="Fast and scalable sql based email services" |
40 |
-HOMEPAGE="http://www.dbmail.org/" |
41 |
-SRC_URI="http://www.dbmail.org/download/$(get_version_component_range 1-2)/${P}.tar.gz" |
42 |
- |
43 |
-LICENSE="GPL-2" |
44 |
-SLOT="0" |
45 |
-KEYWORDS="~amd64 ~x86" |
46 |
-IUSE="ldap libressl sieve ssl static" |
47 |
- |
48 |
-DEPEND="dev-db/libzdb |
49 |
- sieve? ( >=mail-filter/libsieve-2.2.1 ) |
50 |
- ldap? ( >=net-nds/openldap-2.3.33 ) |
51 |
- app-text/asciidoc |
52 |
- app-text/xmlto |
53 |
- app-crypt/mhash |
54 |
- sys-libs/zlib |
55 |
- dev-libs/gmime:2.6 |
56 |
- >=dev-libs/glib-2.16 |
57 |
- dev-libs/libevent |
58 |
- ssl? ( |
59 |
- !libressl? ( dev-libs/openssl:0= ) |
60 |
- libressl? ( dev-libs/libressl:0= ) |
61 |
- )" |
62 |
-RDEPEND="${DEPEND}" |
63 |
- |
64 |
-pkg_setup() { |
65 |
- enewgroup dbmail |
66 |
- enewuser dbmail -1 -1 /var/lib/dbmail dbmail |
67 |
-} |
68 |
- |
69 |
-src_configure() { |
70 |
- econf \ |
71 |
- --enable-manpages \ |
72 |
- --enable-systemd \ |
73 |
- --sysconfdir=/etc/dbmail \ |
74 |
- $(use_enable static) \ |
75 |
- $(use_with sieve) \ |
76 |
- $(use_with ldap auth-ldap) |
77 |
-} |
78 |
- |
79 |
-src_install() { |
80 |
- emake DESTDIR="${D}" SYSTEMD_UNIT_DIR="$(systemd_get_systemunitdir)" install |
81 |
- |
82 |
- DOCS=( AUTHORS README.md INSTALL THANKS UPGRADING ) |
83 |
- einstalldocs |
84 |
- |
85 |
- docompress -x /usr/share/doc/${PF}/sql |
86 |
- dodoc -r sql |
87 |
- dodoc -r test-scripts |
88 |
- dodoc -r contrib |
89 |
- ## TODO: install other contrib stuff |
90 |
- |
91 |
- sed -i -e "s:nobody:dbmail:" dbmail.conf || die |
92 |
- sed -i -e "s:nogroup:dbmail:" dbmail.conf || die |
93 |
- sed -i -e "s:/var/run:/run/dbmail:" dbmail.conf || die |
94 |
- |
95 |
- insinto /etc/dbmail |
96 |
- newins dbmail.conf dbmail.conf.dist |
97 |
- |
98 |
- # change config path to our default and use the conf.d and init.d files from the contrib dir |
99 |
- sed -i -e "s:/etc/dbmail.conf:/etc/dbmail/dbmail.conf:" contrib/startup-scripts/gentoo/init.d-dbmail || die |
100 |
- #sed -i -e "s:exit 0:return 1:" contrib/startup-scripts/gentoo/init.d-dbmail || die |
101 |
- #sed -i -e "s:/var/run:/var/run/dbmail:" contrib/startup-scripts/gentoo/init.d-dbmail || die |
102 |
- #newconfd contrib/startup-scripts/gentoo/conf.d-dbmail dbmail |
103 |
- #newinitd contrib/startup-scripts/gentoo/init.d-dbmail dbmail |
104 |
- # use custom init scripts until updated in upstream contrib |
105 |
- newinitd "${FILESDIR}/dbmail-imapd.initd" dbmail-imapd |
106 |
- newinitd "${FILESDIR}/dbmail-lmtpd.initd" dbmail-lmtpd |
107 |
- newinitd "${FILESDIR}/dbmail-pop3d.initd" dbmail-pop3d |
108 |
- newinitd "${FILESDIR}/dbmail-timsieved.initd" dbmail-timsieved |
109 |
- sed -i -e "s:/var/run:/run:" "${D}"/etc/init.d/dbmail-* || die |
110 |
- |
111 |
- dobin contrib/mailbox2dbmail/mailbox2dbmail |
112 |
- doman contrib/mailbox2dbmail/mailbox2dbmail.1 |
113 |
- |
114 |
- # ldap schema |
115 |
- if use ldap; then |
116 |
- insinto /etc/openldap/schema |
117 |
- doins "${S}/dbmail.schema" |
118 |
- fi |
119 |
- |
120 |
- keepdir /var/lib/dbmail |
121 |
- fperms 750 /var/lib/dbmail |
122 |
- fowners dbmail:dbmail /var/lib/dbmail |
123 |
- # create this through init-scripts instead of at install time (bug #455002) |
124 |
- #keepdir /run/dbmail |
125 |
- #fowners dbmail:dbmail /run/dbmail |
126 |
-} |
127 |
- |
128 |
-pkg_postinst() { |
129 |
- elog "Please read the INSTALL file in /usr/share/doc/${PF}/" |
130 |
- elog "for remaining instructions on setting up dbmail users and " |
131 |
- elog "for finishing configuration to connect to your MTA and " |
132 |
- elog "to connect to your db." |
133 |
- echo |
134 |
- elog "DBMail requires either SQLite, PostgreSQL or MySQL." |
135 |
- elog "Database schemes can be found in /usr/share/doc/${PF}/" |
136 |
- elog "You will also want to follow the installation instructions" |
137 |
- elog "on setting up the maintenance program to delete old messages." |
138 |
- elog "Don't forget to edit /etc/dbmail/dbmail.conf as well." |
139 |
- echo |
140 |
- elog "For regular maintenance, add this to crontab:" |
141 |
- elog "0 3 * * * /usr/bin/dbmail-util -cpdy >/dev/null 2>&1" |
142 |
- echo |
143 |
- elog "Please make sure to run etc-update." |
144 |
- elog "If you get an error message about plugins not found" |
145 |
- elog "please add the library_directory configuration switch to" |
146 |
- elog "dbmail.conf and set it to the correct path" |
147 |
- elog "(usually /usr/lib/dbmail or /usr/lib64/dbmail on amd64)" |
148 |
- elog "A sample can be found in dbmail.conf.dist after etc-update." |
149 |
- echo |
150 |
- elog "We are now using the init script from upstream." |
151 |
- elog "Please edit /etc/conf.d/dbmail to set which services to start" |
152 |
- elog "and delete /etc/init.d/dbmail-* when you are done. (don't" |
153 |
- elog "forget to rc-update del dbmail-* first)" |
154 |
- echo |
155 |
- elog "Changed pid directory to /run/dbmail (see" |
156 |
- elog "http://www.dbmail.org/mantis/view.php?id=949 for details)" |
157 |
- echo |
158 |
- ewarn "The database config has changed to support libzdb db URI" |
159 |
- ewarn "Please check the documentation (or Bug #479664)" |
160 |
- echo |
161 |
- ewarn "The database schema has changed since 3.0.x make sure" |
162 |
- ewarn "to run the migration script" |
163 |
- echo |
164 |
- ewarn "Please be aware, that the single init-script for all services" |
165 |
- ewarn "has been replaced with seperate init scripts for the individual services." |
166 |
- ewarn "Make sure to add dbmail-(imapd|lmtpd|pop3d|timsieved) using rc-update" |
167 |
- ewarn "and remove dbmail if you want to take advantage of this change." |
168 |
- echo |
169 |
-} |
170 |
|
171 |
diff --git a/net-mail/dbmail/dbmail-3.2.3-r3.ebuild b/net-mail/dbmail/dbmail-3.2.3-r3.ebuild |
172 |
new file mode 100644 |
173 |
index 00000000000..39d811d7e7c |
174 |
--- /dev/null |
175 |
+++ b/net-mail/dbmail/dbmail-3.2.3-r3.ebuild |
176 |
@@ -0,0 +1,133 @@ |
177 |
+# Copyright 1999-2020 Gentoo Authors |
178 |
+# Distributed under the terms of the GNU General Public License v2 |
179 |
+ |
180 |
+EAPI=7 |
181 |
+ |
182 |
+inherit readme.gentoo-r1 systemd |
183 |
+ |
184 |
+DESCRIPTION="Fast and scalable sql based email services" |
185 |
+HOMEPAGE="https://www.dbmail.org/" |
186 |
+SRC_URI="https://github.com/dbmail/dbmail/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
187 |
+ |
188 |
+LICENSE="GPL-2" |
189 |
+SLOT="0" |
190 |
+KEYWORDS="~amd64 ~x86" |
191 |
+IUSE="ldap libressl sieve ssl" |
192 |
+ |
193 |
+RDEPEND=" |
194 |
+ acct-group/dbmail |
195 |
+ acct-user/dbmail |
196 |
+ app-text/asciidoc |
197 |
+ app-crypt/mhash |
198 |
+ app-text/xmlto |
199 |
+ dev-db/libzdb |
200 |
+ >=dev-libs/glib-2.16 |
201 |
+ dev-libs/gmime:2.6 |
202 |
+ dev-libs/libevent |
203 |
+ sys-libs/zlib |
204 |
+ ldap? ( >=net-nds/openldap-2.3.33 ) |
205 |
+ sieve? ( >=mail-filter/libsieve-2.2.1 ) |
206 |
+ ssl? ( |
207 |
+ !libressl? ( dev-libs/openssl:0= ) |
208 |
+ libressl? ( dev-libs/libressl:0= ) |
209 |
+ )" |
210 |
+DEPEND="${RDEPEND}" |
211 |
+BDEPEND="virtual/pkgconfig" |
212 |
+ |
213 |
+PATCHES=( "${FILESDIR}"/${P}-fno-common.patch ) |
214 |
+ |
215 |
+DOC_CONTENTS="Please read the INSTALL file in /usr/share/doc/${PF}/ |
216 |
+for remaining instructions on setting up dbmail users and |
217 |
+for finishing configuration to connect to your MTA and |
218 |
+to connect to your db. |
219 |
+DBMail requires either SQLite, PostgreSQL or MySQL. |
220 |
+Database schemes can be found in /usr/share/doc/${PF}/ |
221 |
+You will also want to follow the installation instructions |
222 |
+on setting up the maintenance program to delete old messages. |
223 |
+Don't forget to edit /etc/dbmail/dbmail.conf as well. |
224 |
+For regular maintenance, add this to crontab: |
225 |
+0 3 * * * /usr/bin/dbmail-util -cpdy >/dev/null 2>&1 |
226 |
+Please make sure to run etc-update. |
227 |
+If you get an error message about plugins not found |
228 |
+please add the library_directory configuration switch to |
229 |
+dbmail.conf and set it to the correct path |
230 |
+(usually /usr/lib/dbmail or /usr/lib64/dbmail on amd64) |
231 |
+A sample can be found in dbmail.conf.dist after etc-update. |
232 |
+We are now using the init script from upstream. |
233 |
+Please edit /etc/conf.d/dbmail to set which services to start |
234 |
+and delete /etc/init.d/dbmail-* when you are done. (don't |
235 |
+forget to rc-update del dbmail-* first) |
236 |
+Changed pid directory to /run/dbmail (see |
237 |
+http://www.dbmail.org/mantis/view.php?id=949 for details) |
238 |
+The database config has changed to support libzdb db URI |
239 |
+Please check the documentation (or Bug #479664) |
240 |
+The database schema has changed since 3.0.x make sure |
241 |
+to run the migration script |
242 |
+Please be aware, that the single init-script for all services |
243 |
+has been replaced with seperate init scripts for the individual services. |
244 |
+Make sure to add dbmail-(imapd|lmtpd|pop3d|timsieved) using rc-update |
245 |
+and remove dbmail if you want to take advantage of this change." |
246 |
+ |
247 |
+src_prepare() { |
248 |
+ default |
249 |
+ |
250 |
+ # change config path to our default and use the conf.d and init.d files from the contrib dir |
251 |
+ sed -i -e "s:/etc/dbmail.conf:/etc/dbmail/dbmail.conf:" contrib/startup-scripts/gentoo/init.d-dbmail || die |
252 |
+ |
253 |
+ sed -i \ |
254 |
+ -e "s:nobody:dbmail:" \ |
255 |
+ -e "s:nogroup:dbmail:" \ |
256 |
+ -e "s:/var/run:/run/dbmail:" \ |
257 |
+ dbmail.conf || die |
258 |
+} |
259 |
+ |
260 |
+src_configure() { |
261 |
+ econf \ |
262 |
+ --enable-manpages \ |
263 |
+ --enable-systemd \ |
264 |
+ --sysconfdir=/etc/dbmail \ |
265 |
+ --disable-static \ |
266 |
+ $(use_with sieve) \ |
267 |
+ $(use_with ldap auth-ldap) |
268 |
+} |
269 |
+ |
270 |
+src_install() { |
271 |
+ emake DESTDIR="${D}" SYSTEMD_UNIT_DIR="$(systemd_get_systemunitdir)" install |
272 |
+ einstalldocs |
273 |
+ dodoc UPGRADING |
274 |
+ |
275 |
+ docompress -x /usr/share/doc/${PF}/sql |
276 |
+ dodoc -r sql |
277 |
+ dodoc -r test-scripts |
278 |
+ dodoc -r contrib |
279 |
+ |
280 |
+ insinto /etc/dbmail |
281 |
+ newins dbmail.conf dbmail.conf.dist |
282 |
+ |
283 |
+ # use custom init scripts until updated in upstream contrib |
284 |
+ newinitd "${FILESDIR}/dbmail-imapd.initd" dbmail-imapd |
285 |
+ newinitd "${FILESDIR}/dbmail-lmtpd.initd" dbmail-lmtpd |
286 |
+ newinitd "${FILESDIR}/dbmail-pop3d.initd" dbmail-pop3d |
287 |
+ newinitd "${FILESDIR}/dbmail-timsieved.initd" dbmail-timsieved |
288 |
+ |
289 |
+ dobin contrib/mailbox2dbmail/mailbox2dbmail |
290 |
+ doman contrib/mailbox2dbmail/mailbox2dbmail.1 |
291 |
+ |
292 |
+ # ldap schema |
293 |
+ if use ldap; then |
294 |
+ insinto /etc/openldap/schema |
295 |
+ doins dbmail.schema |
296 |
+ fi |
297 |
+ |
298 |
+ keepdir /var/lib/dbmail |
299 |
+ fperms 750 /var/lib/dbmail |
300 |
+ fowners dbmail:dbmail /var/lib/dbmail |
301 |
+ |
302 |
+ readme.gentoo_create_doc |
303 |
+ |
304 |
+ find "${ED}" -name '*.la' -delete || die |
305 |
+} |
306 |
+ |
307 |
+pkg_postinst() { |
308 |
+ readme.gentoo_print_elog |
309 |
+} |
310 |
|
311 |
diff --git a/net-mail/dbmail/files/dbmail-3.2.3-fno-common.patch b/net-mail/dbmail/files/dbmail-3.2.3-fno-common.patch |
312 |
new file mode 100644 |
313 |
index 00000000000..3a6948bc0e3 |
314 |
--- /dev/null |
315 |
+++ b/net-mail/dbmail/files/dbmail-3.2.3-fno-common.patch |
316 |
@@ -0,0 +1,14 @@ |
317 |
+Taken from: https://github.com/dbmail/dbmail/pull/64 |
318 |
+Author: Chris Mayo <aklhfex@×××××.com> |
319 |
+ |
320 |
+--- a/src/dm_tls.c |
321 |
++++ b/src/dm_tls.c |
322 |
+@@ -31,7 +31,7 @@ |
323 |
+ #define THIS_MODULE "tls" |
324 |
+ |
325 |
+ |
326 |
+-SSL_CTX *tls_context; |
327 |
++extern SSL_CTX *tls_context; |
328 |
+ |
329 |
+ /* Create the initial SSL context structure */ |
330 |
+ SSL_CTX *tls_init(void) { |
331 |
|
332 |
diff --git a/net-mail/dbmail/files/dbmail-imapd.initd b/net-mail/dbmail/files/dbmail-imapd.initd |
333 |
index 9914f6a58bf..f2e16dff170 100644 |
334 |
--- a/net-mail/dbmail/files/dbmail-imapd.initd |
335 |
+++ b/net-mail/dbmail/files/dbmail-imapd.initd |
336 |
@@ -8,7 +8,7 @@ |
337 |
PROGRAM=dbmail-imapd |
338 |
|
339 |
BIN_DIR=/usr/sbin |
340 |
-PID_DIR=/var/run/dbmail |
341 |
+PID_DIR=/run/dbmail |
342 |
PID=pid |
343 |
|
344 |
# Where is the dbmail.conf file located? |
345 |
|
346 |
diff --git a/net-mail/dbmail/files/dbmail-lmtpd.initd b/net-mail/dbmail/files/dbmail-lmtpd.initd |
347 |
index 68e41c34e24..7062098fb7b 100644 |
348 |
--- a/net-mail/dbmail/files/dbmail-lmtpd.initd |
349 |
+++ b/net-mail/dbmail/files/dbmail-lmtpd.initd |
350 |
@@ -8,7 +8,7 @@ |
351 |
PROGRAM=dbmail-lmtpd |
352 |
|
353 |
BIN_DIR=/usr/sbin |
354 |
-PID_DIR=/var/run/dbmail |
355 |
+PID_DIR=/run/dbmail |
356 |
PID=pid |
357 |
|
358 |
# Where is the dbmail.conf file located? |
359 |
|
360 |
diff --git a/net-mail/dbmail/files/dbmail-pop3d.initd b/net-mail/dbmail/files/dbmail-pop3d.initd |
361 |
index 6629a9a610a..156c030be37 100644 |
362 |
--- a/net-mail/dbmail/files/dbmail-pop3d.initd |
363 |
+++ b/net-mail/dbmail/files/dbmail-pop3d.initd |
364 |
@@ -8,7 +8,7 @@ |
365 |
PROGRAM=dbmail-pop3d |
366 |
|
367 |
BIN_DIR=/usr/sbin |
368 |
-PID_DIR=/var/run/dbmail |
369 |
+PID_DIR=/run/dbmail |
370 |
PID=pid |
371 |
|
372 |
# Where is the dbmail.conf file located? |
373 |
|
374 |
diff --git a/net-mail/dbmail/files/dbmail-timsieved.initd b/net-mail/dbmail/files/dbmail-timsieved.initd |
375 |
index fdd809c5485..c5402bdf876 100644 |
376 |
--- a/net-mail/dbmail/files/dbmail-timsieved.initd |
377 |
+++ b/net-mail/dbmail/files/dbmail-timsieved.initd |
378 |
@@ -8,7 +8,7 @@ |
379 |
PROGRAM=dbmail-timsieved |
380 |
|
381 |
BIN_DIR=/usr/sbin |
382 |
-PID_DIR=/var/run/dbmail |
383 |
+PID_DIR=/run/dbmail |
384 |
PID=pid |
385 |
|
386 |
# Where is the dbmail.conf file located? |