Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-mail/dbmail/files/, net-mail/dbmail/
Date: Wed, 27 Jan 2021 13:29:31
Message-Id: 1611754158.fe99916a6310adad8cca2e1494681af0a476646b.juippis@gentoo
1 commit: fe99916a6310adad8cca2e1494681af0a476646b
2 Author: Sandino Araico Sanchez <sandino <AT> sandino <DOT> net>
3 AuthorDate: Wed Jan 27 13:28:27 2021 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 27 13:29:18 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe99916a
7
8 net-mail/dbmail: version bump to 3.2.5
9
10 Signed-off-by: Sandino Araico Sanchez <sandino <AT> sandino.net>
11 Closes: https://bugs.gentoo.org/728060
12 Closes: https://github.com/gentoo/gentoo/pull/16994
13 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
14
15 net-mail/dbmail/Manifest | 1 +
16 net-mail/dbmail/dbmail-3.2.5.ebuild | 96 ++++++++++++++++++++++++++++
17 net-mail/dbmail/files/README.gentoo | 41 ++++++++++++
18 net-mail/dbmail/files/dbmail-imapd.initd | 74 ++++++++-------------
19 net-mail/dbmail/files/dbmail-lmtpd.initd | 74 ++++++++-------------
20 net-mail/dbmail/files/dbmail-pop3d.initd | 74 ++++++++-------------
21 net-mail/dbmail/files/dbmail-timsieved.initd | 71 ++++++++------------
22 7 files changed, 246 insertions(+), 185 deletions(-)
23
24 diff --git a/net-mail/dbmail/Manifest b/net-mail/dbmail/Manifest
25 index 46eddcf7a2a..8d47f7766f6 100644
26 --- a/net-mail/dbmail/Manifest
27 +++ b/net-mail/dbmail/Manifest
28 @@ -1 +1,2 @@
29 DIST dbmail-3.2.3.tar.gz 2444227 BLAKE2B baa812fb3e925e6d896762596426208fc2ac5fcb01cb8100cfbd0464f1342f934c099ca52fd857e05fc82b97227155e9dcfc987d6c9b5c37e7daf21b167c9841 SHA512 29cc89830278f2ff28a4221fc81d4ff13cc371fbca7fb51d5376e9243234220b552cb4b6ec035c150e6cfa178435c4f36b9ce132fc02334bc6cdeb1a41c8ed85
30 +DIST dbmail-3.2.5.tar.gz 2463966 BLAKE2B f4099c6f869dbb041d7eccdf20f3a34d36918237cc0386c71a1d339da8651b9301e676b25201856038045bb9590f880353c6ccafd57330f9cf48382c1b4c603c SHA512 6b0d7e1f6f7449869db1e094ffce9e1ef315c60784ea5ae5f814f2cf9a18c358b4c5d107a420c7317961ffa343fc59c9083789177514aee96523927688f276a0
31
32 diff --git a/net-mail/dbmail/dbmail-3.2.5.ebuild b/net-mail/dbmail/dbmail-3.2.5.ebuild
33 new file mode 100644
34 index 00000000000..ab3f44a299a
35 --- /dev/null
36 +++ b/net-mail/dbmail/dbmail-3.2.5.ebuild
37 @@ -0,0 +1,96 @@
38 +# Copyright 1999-2021 Gentoo Authors
39 +# Distributed under the terms of the GNU General Public License v2
40 +
41 +EAPI=7
42 +
43 +inherit systemd readme.gentoo-r1
44 +
45 +DESCRIPTION="Fast and scalable sql based email services"
46 +HOMEPAGE="https://www.dbmail.org/"
47 +SRC_URI="https://github.com/dbmail/dbmail/archive/v${PV}.tar.gz -> ${P}.tar.gz"
48 +
49 +LICENSE="GPL-2"
50 +SLOT="0"
51 +KEYWORDS="~amd64 ~x86"
52 +IUSE="+doc jemalloc ldap libressl sieve ssl static systemd"
53 +
54 +DEPEND="dev-db/libzdb
55 + sieve? ( >=mail-filter/libsieve-2.2.1 )
56 + ldap? ( >=net-nds/openldap-2.3.33 )
57 + jemalloc? ( dev-libs/jemalloc )
58 + app-text/asciidoc
59 + app-text/xmlto
60 + app-crypt/mhash
61 + sys-libs/zlib
62 + dev-libs/gmime:2.6
63 + >=dev-libs/glib-2.16
64 + dev-libs/libevent
65 + ssl? (
66 + !libressl? ( dev-libs/openssl:0= )
67 + libressl? ( dev-libs/libressl:0= )
68 + )"
69 +RDEPEND="${DEPEND}
70 + acct-group/dbmail
71 + acct-user/dbmail"
72 +DOCS=( AUTHORS README.md INSTALL THANKS UPGRADING )
73 +
74 +README_GENTOO_SUFFIX=""
75 +
76 +src_prepare() {
77 + sed -i -e "s:nobody:dbmail: ; s:nogroup:dbmail: ; s:/var/run:/run/dbmail:" dbmail.conf || die
78 + # change config path to our default and use the conf.d and init.d files from the contrib dir
79 + sed -i -e "s:/etc/dbmail.conf:/etc/dbmail/dbmail.conf:" contrib/startup-scripts/gentoo/init.d-dbmail || die
80 +
81 + default
82 +}
83 +
84 +src_configure() {
85 + econf \
86 + --enable-manpages \
87 + --sysconfdir=/etc/dbmail \
88 + $(use_enable doc manpages) \
89 + $(use_enable static) \
90 + $(use_enable systemd) \
91 + $(use_with jemalloc) \
92 + $(use_with sieve) \
93 + $(use_with ldap auth-ldap)
94 +}
95 +
96 +src_install() {
97 + emake DESTDIR="${D}" SYSTEMD_UNIT_DIR="$(systemd_get_systemunitdir)" install
98 + einstalldocs
99 +
100 + docompress -x /usr/share/doc/${PF}/sql
101 + dodoc -r sql
102 + dodoc -r test-scripts
103 + dodoc -r contrib
104 + ## TODO: install other contrib stuff
105 +
106 + insinto /etc/dbmail
107 + newins dbmail.conf dbmail.conf.dist
108 +
109 + # use custom init scripts until updated in upstream contrib
110 + newinitd "${FILESDIR}/dbmail-imapd.initd" dbmail-imapd
111 + newinitd "${FILESDIR}/dbmail-lmtpd.initd" dbmail-lmtpd
112 + newinitd "${FILESDIR}/dbmail-pop3d.initd" dbmail-pop3d
113 + newinitd "${FILESDIR}/dbmail-timsieved.initd" dbmail-timsieved
114 +
115 + dobin contrib/mailbox2dbmail/mailbox2dbmail
116 + doman contrib/mailbox2dbmail/mailbox2dbmail.1
117 +
118 + # ldap schema
119 + if use ldap; then
120 + insinto /etc/openldap/schema
121 + doins "${S}/dbmail.schema"
122 + fi
123 +
124 + keepdir /var/lib/dbmail
125 + fperms 750 /var/lib/dbmail
126 + fowners dbmail:dbmail /var/lib/dbmail
127 +
128 + readme.gentoo_create_doc
129 +}
130 +
131 +pkg_postinst() {
132 + readme.gentoo_print_elog
133 +}
134
135 diff --git a/net-mail/dbmail/files/README.gentoo b/net-mail/dbmail/files/README.gentoo
136 new file mode 100644
137 index 00000000000..b7e052261a9
138 --- /dev/null
139 +++ b/net-mail/dbmail/files/README.gentoo
140 @@ -0,0 +1,41 @@
141 +Please read the INSTALL file in /usr/share/doc/${PF}/
142 +for remaining instructions on setting up dbmail users and
143 +for finishing configuration to connect to your MTA and
144 +to connect to your db.
145 +
146 +DBMail requires either SQLite, PostgreSQL or MySQL.
147 +Database schemes can be found in /usr/share/doc/${PF}/
148 +You will also want to follow the installation instructions
149 +on setting up the maintenance program to delete old messages.
150 +Don't forget to edit /etc/dbmail/dbmail.conf as well.
151 +
152 +For regular maintenance, add this to crontab:
153 +0 3 * * * /usr/bin/dbmail-util -cpdy >/dev/null 2>&1
154 +
155 +Please make sure to run etc-update.
156 +If you get an error message about plugins not found
157 +please add the library_directory configuration switch to
158 +dbmail.conf and set it to the correct path
159 +(usually /usr/lib/dbmail or /usr/lib64/dbmail on amd64)
160 +A sample can be found in dbmail.conf.dist after etc-update.
161 +
162 +We are now using the init script from upstream.
163 +Please edit /etc/conf.d/dbmail to set which services to start
164 +and delete /etc/init.d/dbmail-* when you are done. (don't
165 +forget to rc-update del dbmail-* first)
166 +
167 +Changed pid directory to /run/dbmail (see
168 +http://www.dbmail.org/mantis/view.php?id=949 for details)
169 +
170 +The database config has changed to support libzdb db URI
171 +Please check the documentation (or Bug #479664)
172 +
173 +The database schema has changed since 3.0.x make sure
174 +to run the migration script
175 +
176 +Please be aware, that the single init-script for all services
177 +has been replaced with seperate init scripts for the individual services.
178 +Make sure to add dbmail-(imapd|lmtpd|pop3d|timsieved) using rc-update
179 +and remove dbmail if you want to take advantage of this change.
180 +
181 +
182
183 diff --git a/net-mail/dbmail/files/dbmail-imapd.initd b/net-mail/dbmail/files/dbmail-imapd.initd
184 index f2e16dff170..c2925f9ecb0 100644
185 --- a/net-mail/dbmail/files/dbmail-imapd.initd
186 +++ b/net-mail/dbmail/files/dbmail-imapd.initd
187 @@ -1,11 +1,5 @@
188 -#!/sbin/openrc-run
189 +#!/sbin/runscript
190 #
191 -# chkconfig: - 91 35
192 -# description: Starts and stops dbmail-impad
193 -#
194 -
195 -
196 -PROGRAM=dbmail-imapd
197
198 BIN_DIR=/usr/sbin
199 PID_DIR=/run/dbmail
200 @@ -18,51 +12,37 @@ CONFIG=/etc/dbmail/dbmail.conf
201 #extra_started_commands="reload"
202
203 depend() {
204 - need net
205 - # This won't cause a hard failure if neither is installed, however.
206 - use mysql
207 - use pgsql
208 - after mta
209 + need net
210 + use mysql
211 + use pgsql
212 + after mta
213 }
214
215 -initService() {
216 - # Avoid using root's TMPDIR
217 - unset TMPDIR
218 -
219 - # Check that config file exists.
220 - if [ ! -e $CONFIG ]; then
221 - eerror "Config file not found ($CONFIG)"
222 - eerror "An example config can be found in /etc/dbmail/dbmail.conf.dist"
223 - return 1
224 - fi
225 -
226 - checkpath -d $PID_DIR -m 750 -o dbmail:dbmail
227 -
228 - RETVAL=0
229 +checkconfig() {
230 + if [ ! -e "/etc/dbmail/dbmail.conf" ]; then
231 + eerror "You need to create apropriate config"
232 + eerror "in /etc/dbmail/ . Example can be found in /etc/dbmail/dbmail.conf.dist"
233 + return 1
234 + fi
235 + # Avoid using root's TMPDIR
236 + unset TMPDIR
237 }
238
239 +
240 start() {
241 - initService
242 - ebegin "Starting DBMail IMAP daemon ($PROGRAM)"
243 - start-stop-daemon --start --quiet \
244 - --pidfile $PID_DIR/$PROGRAM.$PID \
245 - --exec $BIN_DIR/$PROGRAM \
246 - --name $PROGRAM \
247 - -- -f $CONFIG -p $PID_DIR/$PROGRAM.$PID 2>&1
248 - eend $?
249 -}
250 + checkconfig && \
251 + ebegin "Starting DBMail IMAP daemon"
252 + start-stop-daemon --start --quiet \
253 + --exec /usr/sbin/dbmail-imapd \
254 + --name dbmail-imapd \
255 + -- -p ${PIDFILE} -f /etc/dbmail/dbmail.conf 2>&1
256 + eend $?
257 +}
258
259 stop() {
260 - ebegin "Stopping DBMail IMAP daemon ($PROGRAM)"
261 - start-stop-daemon --stop --quiet --retry 15 \
262 - --pidfile $PID_DIR/$PROGRAM.$PID
263 - eend $?
264 -}
265 + ebegin "Stopping DBMail IMAP daemon"
266 + start-stop-daemon --stop --quiet --retry 5 \
267 + --pidfile ${PIDFILE}
268 + eend $?
269 +}
270
271 -## not in 3.1.x yet
272 -#reload() {#
273 -# ebegin "Reloading DBMail IMAP daemon ($PROGRAM)"
274 -# start-stop-daemon --quiet --signal HUP \
275 -# --pidfile $PID_DIR/$PROGRAM.$PID
276 -# eend $?
277 -#}
278
279 diff --git a/net-mail/dbmail/files/dbmail-lmtpd.initd b/net-mail/dbmail/files/dbmail-lmtpd.initd
280 index 7062098fb7b..083d0e6b8a8 100644
281 --- a/net-mail/dbmail/files/dbmail-lmtpd.initd
282 +++ b/net-mail/dbmail/files/dbmail-lmtpd.initd
283 @@ -1,11 +1,5 @@
284 -#!/sbin/openrc-run
285 +#!/sbin/runscript
286 #
287 -# chkconfig: - 91 35
288 -# description: Starts and stops dbmail-lmtpd
289 -#
290 -
291 -
292 -PROGRAM=dbmail-lmtpd
293
294 BIN_DIR=/usr/sbin
295 PID_DIR=/run/dbmail
296 @@ -18,51 +12,37 @@ CONFIG=/etc/dbmail/dbmail.conf
297 #extra_started_commands="reload"
298
299 depend() {
300 - need net
301 - # This won't cause a hard failure if neither is installed, however.
302 - use mysql
303 - use pgsql
304 - after mta
305 + need net
306 + use mysql
307 + use pgsql
308 + after mta
309 }
310
311 -initService() {
312 - # Avoid using root's TMPDIR
313 - unset TMPDIR
314 -
315 - # Check that config file exists.
316 - if [ ! -e $CONFIG ]; then
317 - eerror "Config file not found ($CONFIG)"
318 - eerror "An example config can be found in /etc/dbmail/dbmail.conf.dist"
319 - return 1
320 - fi
321 -
322 - checkpath -d $PID_DIR -m 750 -o dbmail:dbmail
323 -
324 - RETVAL=0
325 +checkconfig() {
326 + if [ ! -e "/etc/dbmail/dbmail.conf" ]; then
327 + eerror "You need to create apropriate config"
328 + eerror "in /etc/dbmail/ . Example can be found in /etc/dbmail/dbmail.conf.dist"
329 + return 1
330 + fi
331 + # Avoid using root's TMPDIR
332 + unset TMPDIR
333 }
334
335 +
336 start() {
337 - initService
338 - ebegin "Starting DBMail LMTP daemon ($PROGRAM)"
339 - start-stop-daemon --start --quiet \
340 - --pidfile $PID_DIR/$PROGRAM.$PID \
341 - --exec $BIN_DIR/$PROGRAM \
342 - --name $PROGRAM \
343 - -- -f $CONFIG -p $PID_DIR/$PROGRAM.$PID 2>&1
344 - eend $?
345 -}
346 + checkconfig && \
347 + ebegin "Starting DBMail LMTP daemon"
348 + start-stop-daemon --start --quiet \
349 + --exec /usr/sbin/dbmail-lmtpd \
350 + --name dbmail-lmtpd \
351 + -- -p ${PIDFILE} -f /etc/dbmail/dbmail.conf 2>&1
352 + eend $?
353 +}
354
355 stop() {
356 - ebegin "Stopping DBMail LMTP daemon ($PROGRAM)"
357 - start-stop-daemon --stop --quiet --retry 15 \
358 - --pidfile $PID_DIR/$PROGRAM.$PID
359 - eend $?
360 -}
361 + ebegin "Stopping DBMail LMTP daemon"
362 + start-stop-daemon --stop --quiet --retry 5 \
363 + --pidfile ${PIDFILE}
364 + eend $?
365 +}
366
367 -## not in 3.1.x yet
368 -#reload() {#
369 -# ebegin "Reloading DBMail LMTP daemon ($PROGRAM)"
370 -# start-stop-daemon --quiet --signal HUP \
371 -# --pidfile $PID_DIR/$PROGRAM.$PID
372 -# eend $?
373 -#}
374
375 diff --git a/net-mail/dbmail/files/dbmail-pop3d.initd b/net-mail/dbmail/files/dbmail-pop3d.initd
376 index 156c030be37..16c4d371f2e 100644
377 --- a/net-mail/dbmail/files/dbmail-pop3d.initd
378 +++ b/net-mail/dbmail/files/dbmail-pop3d.initd
379 @@ -1,11 +1,5 @@
380 -#!/sbin/openrc-run
381 +#!/sbin/runscript
382 #
383 -# chkconfig: - 91 35
384 -# description: Starts and stops dbmail-pop3d
385 -#
386 -
387 -
388 -PROGRAM=dbmail-pop3d
389
390 BIN_DIR=/usr/sbin
391 PID_DIR=/run/dbmail
392 @@ -18,51 +12,37 @@ CONFIG=/etc/dbmail/dbmail.conf
393 #extra_started_commands="reload"
394
395 depend() {
396 - need net
397 - # This won't cause a hard failure if neither is installed, however.
398 - use mysql
399 - use pgsql
400 - after mta
401 + need net
402 + use mysql
403 + use pgsql
404 + after mta
405 }
406
407 -initService() {
408 - # Avoid using root's TMPDIR
409 - unset TMPDIR
410 -
411 - # Check that config file exists.
412 - if [ ! -e $CONFIG ]; then
413 - eerror "Config file not found ($CONFIG)"
414 - eerror "An example config can be found in /etc/dbmail/dbmail.conf.dist"
415 - return 1
416 - fi
417 -
418 - checkpath -d $PID_DIR -m 750 -o dbmail:dbmail
419 -
420 - RETVAL=0
421 +checkconfig() {
422 + if [ ! -e "/etc/dbmail/dbmail.conf" ]; then
423 + eerror "You need to create apropriate config"
424 + eerror "in /etc/dbmail/ . Example can be found in /etc/dbmail/dbmail.conf.dist"
425 + return 1
426 + fi
427 + # Avoid using root's TMPDIR
428 + unset TMPDIR
429 }
430
431 +
432 start() {
433 - initService
434 - ebegin "Starting DBMail POP3 daemon ($PROGRAM)"
435 - start-stop-daemon --start --quiet \
436 - --pidfile $PID_DIR/$PROGRAM.$PID \
437 - --exec $BIN_DIR/$PROGRAM \
438 - --name $PROGRAM \
439 - -- -f $CONFIG -p $PID_DIR/$PROGRAM.$PID 2>&1
440 - eend $?
441 -}
442 + checkconfig && \
443 + ebegin "Starting DBMail POP3 daemon"
444 + start-stop-daemon --start --quiet \
445 + --exec /usr/sbin/dbmail-pop3d \
446 + --name dbmail-pop3d \
447 + -- -p ${PIDFILE} -f /etc/dbmail/dbmail.conf 2>&1
448 + eend $?
449 +}
450
451 stop() {
452 - ebegin "Stopping DBMail POP3 daemon ($PROGRAM)"
453 - start-stop-daemon --stop --quiet --retry 15 \
454 - --pidfile $PID_DIR/$PROGRAM.$PID
455 - eend $?
456 -}
457 + ebegin "Stopping DBMail POP3 daemon"
458 + start-stop-daemon --stop --quiet --retry 5 \
459 + --pidfile ${PIDFILE}
460 + eend $?
461 +}
462
463 -## not in 3.1.x yet
464 -#reload() {#
465 -# ebegin "Reloading DBMail POP3 daemon ($PROGRAM)"
466 -# start-stop-daemon --quiet --signal HUP \
467 -# --pidfile $PID_DIR/$PROGRAM.$PID
468 -# eend $?
469 -#}
470
471 diff --git a/net-mail/dbmail/files/dbmail-timsieved.initd b/net-mail/dbmail/files/dbmail-timsieved.initd
472 index c5402bdf876..657bfd58666 100644
473 --- a/net-mail/dbmail/files/dbmail-timsieved.initd
474 +++ b/net-mail/dbmail/files/dbmail-timsieved.initd
475 @@ -1,10 +1,9 @@
476 -#!/sbin/openrc-run
477 +#!/sbin/runscript
478 #
479 # chkconfig: - 91 35
480 # description: Starts and stops dbmail-timsieved
481 #
482
483 -
484 PROGRAM=dbmail-timsieved
485
486 BIN_DIR=/usr/sbin
487 @@ -14,55 +13,39 @@ PID=pid
488 # Where is the dbmail.conf file located?
489 CONFIG=/etc/dbmail/dbmail.conf
490
491 -## not in 3.1.x yet
492 -#extra_started_commands="reload"
493 +PIDFILE="/run/dbmail-timsieved.pid"
494
495 depend() {
496 - need net
497 - # This won't cause a hard failure if neither is installed, however.
498 - use mysql
499 - use pgsql
500 - after mta
501 + need net
502 + use mysql
503 + use pgsql
504 + after mta
505 }
506
507 -initService() {
508 - # Avoid using root's TMPDIR
509 - unset TMPDIR
510 -
511 - # Check that config file exists.
512 - if [ ! -e $CONFIG ]; then
513 - eerror "Config file not found ($CONFIG)"
514 - eerror "An example config can be found in /etc/dbmail/dbmail.conf.dist"
515 - return 1
516 - fi
517 -
518 - checkpath -d $PID_DIR -m 750 -o dbmail:dbmail
519 -
520 - RETVAL=0
521 +checkconfig() {
522 + if [ ! -e "/etc/dbmail/dbmail.conf" ]; then
523 + eerror "You need to create apropriate config"
524 + eerror "in /etc/dbmail/ . Example can be found in /etc/dbmail/dbmail.conf.dist"
525 + return 1
526 + fi
527 + # Avoid using root's TMPDIR
528 + unset TMPDIR
529 }
530
531 +
532 start() {
533 - initService
534 - ebegin "Starting DBMail SIEVE daemon ($PROGRAM)"
535 - start-stop-daemon --start --quiet \
536 - --pidfile $PID_DIR/$PROGRAM.$PID \
537 - --exec $BIN_DIR/$PROGRAM \
538 - --name $PROGRAM \
539 - -- -f $CONFIG -p $PID_DIR/$PROGRAM.$PID 2>&1
540 - eend $?
541 -}
542 + checkconfig && \
543 + ebegin "Starting DBMail SIEVE daemon"
544 + start-stop-daemon --start --quiet \
545 + --exec /usr/sbin/dbmail-timsieved \
546 + -- -p ${PIDFILE} -f /etc/dbmail/dbmail.conf 2>&1
547 + eend $?
548 +}
549
550 stop() {
551 - ebegin "Stopping DBMail SIEVE daemon ($PROGRAM)"
552 - start-stop-daemon --stop --quiet --retry 15 \
553 - --pidfile $PID_DIR/$PROGRAM.$PID
554 - eend $?
555 -}
556 + ebegin "Stopping DBMail SIEVE daemon"
557 + start-stop-daemon --stop --quiet --retry 5 \
558 + --pidfile ${PIDFILE}
559 + eend $?
560 +}
561
562 -## not in 3.1.x yet
563 -#reload() {#
564 -# ebegin "Reloading DBMail SIEVE daemon ($PROGRAM)"
565 -# start-stop-daemon --quiet --signal HUP \
566 -# --pidfile $PID_DIR/$PROGRAM.$PID
567 -# eend $?
568 -#}