summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakov Smolic <jakov.smolic@sartura.hr>2020-11-30 22:39:48 +0100
committerDavid Seifert <soap@gentoo.org>2020-11-30 22:39:48 +0100
commit0a25d8b33a20fd9fc4ad2a5e3080f55911ea54db (patch)
tree00b085ea3ef470f6b1b96b061dd66ba311467a63
parentdev-python/thunarx-python: port to EAPI 7 (diff)
downloadgentoo-0a25d8b33a20fd9fc4ad2a5e3080f55911ea54db.tar.gz
gentoo-0a25d8b33a20fd9fc4ad2a5e3080f55911ea54db.tar.bz2
gentoo-0a25d8b33a20fd9fc4ad2a5e3080f55911ea54db.zip
net-mail/dbmail: port to EAPI 7 and GLEP 81
* Fix build with gcc-10 Closes: https://bugs.gentoo.org/708722 Package-Manager: Portage-3.0.9, Repoman-3.0.1 Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr> Signed-off-by: David Seifert <soap@gentoo.org>
-rw-r--r--net-mail/dbmail/dbmail-3.2.3-r2.ebuild138
-rw-r--r--net-mail/dbmail/dbmail-3.2.3-r3.ebuild133
-rw-r--r--net-mail/dbmail/files/dbmail-3.2.3-fno-common.patch14
-rw-r--r--net-mail/dbmail/files/dbmail-imapd.initd2
-rw-r--r--net-mail/dbmail/files/dbmail-lmtpd.initd2
-rw-r--r--net-mail/dbmail/files/dbmail-pop3d.initd2
-rw-r--r--net-mail/dbmail/files/dbmail-timsieved.initd2
7 files changed, 151 insertions, 142 deletions
diff --git a/net-mail/dbmail/dbmail-3.2.3-r2.ebuild b/net-mail/dbmail/dbmail-3.2.3-r2.ebuild
deleted file mode 100644
index 2875f819a20..00000000000
--- a/net-mail/dbmail/dbmail-3.2.3-r2.ebuild
+++ /dev/null
@@ -1,138 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit systemd versionator user
-
-DESCRIPTION="Fast and scalable sql based email services"
-HOMEPAGE="http://www.dbmail.org/"
-SRC_URI="http://www.dbmail.org/download/$(get_version_component_range 1-2)/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="ldap libressl sieve ssl static"
-
-DEPEND="dev-db/libzdb
- sieve? ( >=mail-filter/libsieve-2.2.1 )
- ldap? ( >=net-nds/openldap-2.3.33 )
- app-text/asciidoc
- app-text/xmlto
- app-crypt/mhash
- sys-libs/zlib
- dev-libs/gmime:2.6
- >=dev-libs/glib-2.16
- dev-libs/libevent
- ssl? (
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
- )"
-RDEPEND="${DEPEND}"
-
-pkg_setup() {
- enewgroup dbmail
- enewuser dbmail -1 -1 /var/lib/dbmail dbmail
-}
-
-src_configure() {
- econf \
- --enable-manpages \
- --enable-systemd \
- --sysconfdir=/etc/dbmail \
- $(use_enable static) \
- $(use_with sieve) \
- $(use_with ldap auth-ldap)
-}
-
-src_install() {
- emake DESTDIR="${D}" SYSTEMD_UNIT_DIR="$(systemd_get_systemunitdir)" install
-
- DOCS=( AUTHORS README.md INSTALL THANKS UPGRADING )
- einstalldocs
-
- docompress -x /usr/share/doc/${PF}/sql
- dodoc -r sql
- dodoc -r test-scripts
- dodoc -r contrib
- ## TODO: install other contrib stuff
-
- sed -i -e "s:nobody:dbmail:" dbmail.conf || die
- sed -i -e "s:nogroup:dbmail:" dbmail.conf || die
- sed -i -e "s:/var/run:/run/dbmail:" dbmail.conf || die
-
- insinto /etc/dbmail
- newins dbmail.conf dbmail.conf.dist
-
- # change config path to our default and use the conf.d and init.d files from the contrib dir
- sed -i -e "s:/etc/dbmail.conf:/etc/dbmail/dbmail.conf:" contrib/startup-scripts/gentoo/init.d-dbmail || die
- #sed -i -e "s:exit 0:return 1:" contrib/startup-scripts/gentoo/init.d-dbmail || die
- #sed -i -e "s:/var/run:/var/run/dbmail:" contrib/startup-scripts/gentoo/init.d-dbmail || die
- #newconfd contrib/startup-scripts/gentoo/conf.d-dbmail dbmail
- #newinitd contrib/startup-scripts/gentoo/init.d-dbmail dbmail
- # use custom init scripts until updated in upstream contrib
- newinitd "${FILESDIR}/dbmail-imapd.initd" dbmail-imapd
- newinitd "${FILESDIR}/dbmail-lmtpd.initd" dbmail-lmtpd
- newinitd "${FILESDIR}/dbmail-pop3d.initd" dbmail-pop3d
- newinitd "${FILESDIR}/dbmail-timsieved.initd" dbmail-timsieved
- sed -i -e "s:/var/run:/run:" "${D}"/etc/init.d/dbmail-* || die
-
- dobin contrib/mailbox2dbmail/mailbox2dbmail
- doman contrib/mailbox2dbmail/mailbox2dbmail.1
-
- # ldap schema
- if use ldap; then
- insinto /etc/openldap/schema
- doins "${S}/dbmail.schema"
- fi
-
- keepdir /var/lib/dbmail
- fperms 750 /var/lib/dbmail
- fowners dbmail:dbmail /var/lib/dbmail
- # create this through init-scripts instead of at install time (bug #455002)
- #keepdir /run/dbmail
- #fowners dbmail:dbmail /run/dbmail
-}
-
-pkg_postinst() {
- elog "Please read the INSTALL file in /usr/share/doc/${PF}/"
- elog "for remaining instructions on setting up dbmail users and "
- elog "for finishing configuration to connect to your MTA and "
- elog "to connect to your db."
- echo
- elog "DBMail requires either SQLite, PostgreSQL or MySQL."
- elog "Database schemes can be found in /usr/share/doc/${PF}/"
- elog "You will also want to follow the installation instructions"
- elog "on setting up the maintenance program to delete old messages."
- elog "Don't forget to edit /etc/dbmail/dbmail.conf as well."
- echo
- elog "For regular maintenance, add this to crontab:"
- elog "0 3 * * * /usr/bin/dbmail-util -cpdy >/dev/null 2>&1"
- echo
- elog "Please make sure to run etc-update."
- elog "If you get an error message about plugins not found"
- elog "please add the library_directory configuration switch to"
- elog "dbmail.conf and set it to the correct path"
- elog "(usually /usr/lib/dbmail or /usr/lib64/dbmail on amd64)"
- elog "A sample can be found in dbmail.conf.dist after etc-update."
- echo
- elog "We are now using the init script from upstream."
- elog "Please edit /etc/conf.d/dbmail to set which services to start"
- elog "and delete /etc/init.d/dbmail-* when you are done. (don't"
- elog "forget to rc-update del dbmail-* first)"
- echo
- elog "Changed pid directory to /run/dbmail (see"
- elog "http://www.dbmail.org/mantis/view.php?id=949 for details)"
- echo
- ewarn "The database config has changed to support libzdb db URI"
- ewarn "Please check the documentation (or Bug #479664)"
- echo
- ewarn "The database schema has changed since 3.0.x make sure"
- ewarn "to run the migration script"
- echo
- ewarn "Please be aware, that the single init-script for all services"
- ewarn "has been replaced with seperate init scripts for the individual services."
- ewarn "Make sure to add dbmail-(imapd|lmtpd|pop3d|timsieved) using rc-update"
- ewarn "and remove dbmail if you want to take advantage of this change."
- echo
-}
diff --git a/net-mail/dbmail/dbmail-3.2.3-r3.ebuild b/net-mail/dbmail/dbmail-3.2.3-r3.ebuild
new file mode 100644
index 00000000000..39d811d7e7c
--- /dev/null
+++ b/net-mail/dbmail/dbmail-3.2.3-r3.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit readme.gentoo-r1 systemd
+
+DESCRIPTION="Fast and scalable sql based email services"
+HOMEPAGE="https://www.dbmail.org/"
+SRC_URI="https://github.com/dbmail/dbmail/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ldap libressl sieve ssl"
+
+RDEPEND="
+ acct-group/dbmail
+ acct-user/dbmail
+ app-text/asciidoc
+ app-crypt/mhash
+ app-text/xmlto
+ dev-db/libzdb
+ >=dev-libs/glib-2.16
+ dev-libs/gmime:2.6
+ dev-libs/libevent
+ sys-libs/zlib
+ ldap? ( >=net-nds/openldap-2.3.33 )
+ sieve? ( >=mail-filter/libsieve-2.2.1 )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=( "${FILESDIR}"/${P}-fno-common.patch )
+
+DOC_CONTENTS="Please read the INSTALL file in /usr/share/doc/${PF}/
+for remaining instructions on setting up dbmail users and
+for finishing configuration to connect to your MTA and
+to connect to your db.
+DBMail requires either SQLite, PostgreSQL or MySQL.
+Database schemes can be found in /usr/share/doc/${PF}/
+You will also want to follow the installation instructions
+on setting up the maintenance program to delete old messages.
+Don't forget to edit /etc/dbmail/dbmail.conf as well.
+For regular maintenance, add this to crontab:
+0 3 * * * /usr/bin/dbmail-util -cpdy >/dev/null 2>&1
+Please make sure to run etc-update.
+If you get an error message about plugins not found
+please add the library_directory configuration switch to
+dbmail.conf and set it to the correct path
+(usually /usr/lib/dbmail or /usr/lib64/dbmail on amd64)
+A sample can be found in dbmail.conf.dist after etc-update.
+We are now using the init script from upstream.
+Please edit /etc/conf.d/dbmail to set which services to start
+and delete /etc/init.d/dbmail-* when you are done. (don't
+forget to rc-update del dbmail-* first)
+Changed pid directory to /run/dbmail (see
+http://www.dbmail.org/mantis/view.php?id=949 for details)
+The database config has changed to support libzdb db URI
+Please check the documentation (or Bug #479664)
+The database schema has changed since 3.0.x make sure
+to run the migration script
+Please be aware, that the single init-script for all services
+has been replaced with seperate init scripts for the individual services.
+Make sure to add dbmail-(imapd|lmtpd|pop3d|timsieved) using rc-update
+and remove dbmail if you want to take advantage of this change."
+
+src_prepare() {
+ default
+
+ # change config path to our default and use the conf.d and init.d files from the contrib dir
+ sed -i -e "s:/etc/dbmail.conf:/etc/dbmail/dbmail.conf:" contrib/startup-scripts/gentoo/init.d-dbmail || die
+
+ sed -i \
+ -e "s:nobody:dbmail:" \
+ -e "s:nogroup:dbmail:" \
+ -e "s:/var/run:/run/dbmail:" \
+ dbmail.conf || die
+}
+
+src_configure() {
+ econf \
+ --enable-manpages \
+ --enable-systemd \
+ --sysconfdir=/etc/dbmail \
+ --disable-static \
+ $(use_with sieve) \
+ $(use_with ldap auth-ldap)
+}
+
+src_install() {
+ emake DESTDIR="${D}" SYSTEMD_UNIT_DIR="$(systemd_get_systemunitdir)" install
+ einstalldocs
+ dodoc UPGRADING
+
+ docompress -x /usr/share/doc/${PF}/sql
+ dodoc -r sql
+ dodoc -r test-scripts
+ dodoc -r contrib
+
+ insinto /etc/dbmail
+ newins dbmail.conf dbmail.conf.dist
+
+ # use custom init scripts until updated in upstream contrib
+ newinitd "${FILESDIR}/dbmail-imapd.initd" dbmail-imapd
+ newinitd "${FILESDIR}/dbmail-lmtpd.initd" dbmail-lmtpd
+ newinitd "${FILESDIR}/dbmail-pop3d.initd" dbmail-pop3d
+ newinitd "${FILESDIR}/dbmail-timsieved.initd" dbmail-timsieved
+
+ dobin contrib/mailbox2dbmail/mailbox2dbmail
+ doman contrib/mailbox2dbmail/mailbox2dbmail.1
+
+ # ldap schema
+ if use ldap; then
+ insinto /etc/openldap/schema
+ doins dbmail.schema
+ fi
+
+ keepdir /var/lib/dbmail
+ fperms 750 /var/lib/dbmail
+ fowners dbmail:dbmail /var/lib/dbmail
+
+ readme.gentoo_create_doc
+
+ find "${ED}" -name '*.la' -delete || die
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+}
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
new file mode 100644
index 00000000000..3a6948bc0e3
--- /dev/null
+++ b/net-mail/dbmail/files/dbmail-3.2.3-fno-common.patch
@@ -0,0 +1,14 @@
+Taken from: https://github.com/dbmail/dbmail/pull/64
+Author: Chris Mayo <aklhfex@gmail.com>
+
+--- a/src/dm_tls.c
++++ b/src/dm_tls.c
+@@ -31,7 +31,7 @@
+ #define THIS_MODULE "tls"
+
+
+-SSL_CTX *tls_context;
++extern SSL_CTX *tls_context;
+
+ /* Create the initial SSL context structure */
+ SSL_CTX *tls_init(void) {
diff --git a/net-mail/dbmail/files/dbmail-imapd.initd b/net-mail/dbmail/files/dbmail-imapd.initd
index 9914f6a58bf..f2e16dff170 100644
--- a/net-mail/dbmail/files/dbmail-imapd.initd
+++ b/net-mail/dbmail/files/dbmail-imapd.initd
@@ -8,7 +8,7 @@
PROGRAM=dbmail-imapd
BIN_DIR=/usr/sbin
-PID_DIR=/var/run/dbmail
+PID_DIR=/run/dbmail
PID=pid
# Where is the dbmail.conf file located?
diff --git a/net-mail/dbmail/files/dbmail-lmtpd.initd b/net-mail/dbmail/files/dbmail-lmtpd.initd
index 68e41c34e24..7062098fb7b 100644
--- a/net-mail/dbmail/files/dbmail-lmtpd.initd
+++ b/net-mail/dbmail/files/dbmail-lmtpd.initd
@@ -8,7 +8,7 @@
PROGRAM=dbmail-lmtpd
BIN_DIR=/usr/sbin
-PID_DIR=/var/run/dbmail
+PID_DIR=/run/dbmail
PID=pid
# Where is the dbmail.conf file located?
diff --git a/net-mail/dbmail/files/dbmail-pop3d.initd b/net-mail/dbmail/files/dbmail-pop3d.initd
index 6629a9a610a..156c030be37 100644
--- a/net-mail/dbmail/files/dbmail-pop3d.initd
+++ b/net-mail/dbmail/files/dbmail-pop3d.initd
@@ -8,7 +8,7 @@
PROGRAM=dbmail-pop3d
BIN_DIR=/usr/sbin
-PID_DIR=/var/run/dbmail
+PID_DIR=/run/dbmail
PID=pid
# Where is the dbmail.conf file located?
diff --git a/net-mail/dbmail/files/dbmail-timsieved.initd b/net-mail/dbmail/files/dbmail-timsieved.initd
index fdd809c5485..c5402bdf876 100644
--- a/net-mail/dbmail/files/dbmail-timsieved.initd
+++ b/net-mail/dbmail/files/dbmail-timsieved.initd
@@ -8,7 +8,7 @@
PROGRAM=dbmail-timsieved
BIN_DIR=/usr/sbin
-PID_DIR=/var/run/dbmail
+PID_DIR=/run/dbmail
PID=pid
# Where is the dbmail.conf file located?