aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/dovecot/APKBUILD22
-rw-r--r--main/dovecot/APKBUILD.orig157
-rw-r--r--main/dovecot/APKBUILD.rej11
-rw-r--r--main/dovecot/dovecot.initd59
-rw-r--r--main/dovecot/dovecot.logrotate2
5 files changed, 201 insertions, 50 deletions
diff --git a/main/dovecot/APKBUILD b/main/dovecot/APKBUILD
index 03f33c48d1..b8de78cc26 100644
--- a/main/dovecot/APKBUILD
+++ b/main/dovecot/APKBUILD
@@ -3,8 +3,8 @@
# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=dovecot
-pkgver=2.2.22
-pkgrel=1
+pkgver=2.2.23
+pkgrel=0
pkgdesc="IMAP and POP3 server"
url="http://www.dovecot.org/"
arch="all"
@@ -143,15 +143,15 @@ sql() {
_mv $(cd "$pkgdir" && find etc/dovecot -name '*-sql.conf*')
}
-md5sums="bc8057bd5bdfa0f8e80e2fef1082a241 dovecot-2.2.22.tar.gz
+md5sums="0d2855c19b0603b417cd70613b4a9f36 dovecot-2.2.23.tar.gz
49f7a03284cc657857fe2ae22b8c82a0 hide-dl-errors.patch
-1a88280b65efb6cb7f70bc5a88bf264c dovecot.logrotate
-ddd77573827e0662be21303fb795eef3 dovecot.initd"
-sha256sums="c7a9db3c4ae9d9b4da920d2c82669700a0d407934501b405f37f89cc0b706ec7 dovecot-2.2.22.tar.gz
+df6d43508a82903a97e3a2a5b8436d3d dovecot.logrotate
+f0c227ab4e2593f6d410440b82103de1 dovecot.initd"
+sha256sums="5d834be43fe8f6f61d9b0fb139bf1db2a4da313aeebd7bf09e4bf6bcb1c9e441 dovecot-2.2.23.tar.gz
d6accdd6e271647c01ab8fa0a9491ee822486484961e2d5c252bf70e816d2bfa hide-dl-errors.patch
-2ac04bb7b5c503cd87ba044482e651dbe5c9d84a4268891fb2aa9ba26e62f833 dovecot.logrotate
-3f74548051297cedc7f8d203f1d1d9dc904fe89004b54b52921d2050520daa6f dovecot.initd"
-sha512sums="ea02ae491e90c0b9de7c7320901c8f7235193303fb194805564582d30e630002f21f7195e5c5b99ff3ea1fadf95ddd43c2f7bb4d24067e0e5f40a66e9eb90012 dovecot-2.2.22.tar.gz
+d0fef8cd8200549877d7594cf458d6b33f05b31f95f1fd9a8368e8471c082735 dovecot.logrotate
+1a3c845c216bb6f9633d27a8c1c0d01b591942c463bddb5ae835f162bd7fb4bf dovecot.initd"
+sha512sums="704d86dcef8b217a54db1d1ae3c1e0d6303827fedd7150aec83e805512cd1c5befc88da44660e7a40765ad6800c14d399f8c7621e84125a7732d68fee7f18d82 dovecot-2.2.23.tar.gz
1e9a1f2990019236546c7be581a4d6d0b430110d27a00bc3298f5c154ef9a4aadefa193d02a017912f826d771058fd5c6ef6cb454e14f0d15749fa8f3a68c64a hide-dl-errors.patch
-58756fa06a063777ef7c4d1e67b63adbde5462264e14bd7a3187a318f498fff21ac2a8d53bb216f56fef4588206e14112da79542b6dfdf503988786f27bb6544 dovecot.logrotate
-d7f67991e11979da91162eb64a0b924655d0ac155d97bcc42a40c758003d60b7c096945544e6b321aa8ecb3416fe17b14b5898f1dba5e5a4b3e4c9c21295c8cb dovecot.initd"
+9f19698ab45969f1f94dc4bddf6de59317daee93c9421c81f2dbf8a7efe6acf89689f1d30f60f536737bb9526c315215d2bce694db27e7b8d7896036a59c31f0 dovecot.logrotate
+6ec75a8396f4d826390e69aa8177593573eaf0e0ab537b2a4720573e04c92ff615f39e1559b48313b2cd2f03704cd977bb594a568ecc5dd22e38926c12f3c48c dovecot.initd"
diff --git a/main/dovecot/APKBUILD.orig b/main/dovecot/APKBUILD.orig
new file mode 100644
index 0000000000..03f33c48d1
--- /dev/null
+++ b/main/dovecot/APKBUILD.orig
@@ -0,0 +1,157 @@
+# Contributor: Valery Kartel <valery.kartel@gmail.com>
+# Contributor: Ɓukasz Jendrysik <scadu@yandex.com>
+# Contributor: Michael Mason <ms13sp@gmail.com>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=dovecot
+pkgver=2.2.22
+pkgrel=1
+pkgdesc="IMAP and POP3 server"
+url="http://www.dovecot.org/"
+arch="all"
+license="LGPL2+"
+depends="openssl"
+pkgusers="dovecot dovenull"
+pkggroups="dovecot dovenull"
+makedepends="libcap-dev zlib-dev openssl-dev bzip2-dev postgresql-dev
+ mariadb-dev sqlite-dev heimdal-dev openldap-dev linux-headers"
+install="dovecot.pre-install dovecot.post-install"
+subpackages="$pkgname-doc $pkgname-dev
+ $pkgname-sql $pkgname-pgsql $pkgname-mysql $pkgname-sqlite
+ $pkgname-gssapi $pkgname-ldap
+ "
+source="http://www.dovecot.org/releases/${pkgver%.*}/$pkgname-$pkgver.tar.gz
+ hide-dl-errors.patch
+ dovecot.logrotate
+ dovecot.initd
+ "
+options="libtool"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --localstatedir=/var \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --with-gssapi=plugin \
+ --with-ldap=plugin \
+ --with-sql=plugin \
+ --with-mysql \
+ --with-sqlite \
+ --with-pgsql \
+ --with-ssl=openssl \
+ --with-ssldir=/etc/ssl/dovecot \
+ --with-rundir=/run/dovecot \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+
+ install -d "$pkgdir"/etc/ssl/dovecot
+ install -Dm755 "$srcdir"/dovecot.initd "$pkgdir"/etc/init.d/dovecot
+ install -Dm644 "$srcdir"/dovecot.logrotate "$pkgdir"/etc/logrotate.d/dovecot
+
+ # default config
+ rm "$pkgdir"/etc/dovecot/*
+ rm "$pkgdir"/usr/share/doc/dovecot/mkcert.sh
+ mv "$pkgdir"/usr/share/doc/dovecot/dovecot-openssl.cnf "$pkgdir"/etc/dovecot/
+ mv "$pkgdir"/usr/share/doc/dovecot/example-config/dovecot* \
+ "$pkgdir"/usr/share/doc/dovecot/example-config/conf.d \
+ "$pkgdir"/etc/dovecot/ || return 1
+ rm -fr "$pkgdir"/usr/share/doc/dovecot/example-config
+
+ # fix ssl dirs in default config
+ sed -i -e 's,^ssl_cert =.*,ssl_cert = </etc/ssl/dovecot/server.pem,' \
+ -e 's,^ssl_key =.*,ssl_key = </etc/ssl/dovecot/server.key,' \
+ "$pkgdir"/etc/dovecot/conf.d/10-ssl.conf || return 1
+ # set default passdb to passwd and create appropriate 'users' file
+ install -m 640 -o dovecot -g mail /dev/null "$pkgdir"/etc/dovecot/users
+ sed -i -e 's,!include auth-system.conf.ext,!include auth-passwdfile.conf.ext,' \
+ -e 's,#!include auth-passwdfile.conf.ext,#!include auth-system.conf.ext,' \
+ "$pkgdir"/etc/dovecot/conf.d/10-auth.conf || return 1
+}
+
+_mv() {
+ local i
+ while [ $# -gt 0 ]; do
+ local dir=${1%/*}
+ mkdir -p "$subpkgdir"/$dir
+ mv "$pkgdir/$1" "$subpkgdir/$dir/"
+ [ "$(ls -A $pkgdir/$dir)" ] || rmdir "$pkgdir"/$dir
+ shift
+ done
+}
+
+dev() {
+ default_dev
+ mv "$pkgdir"/usr/lib/dovecot/dovecot-config \
+ "$subpkgdir"/usr/lib/dovecot/
+}
+
+pgsql() {
+ pkgdesc="postgresql driver for dovecot"
+ depends="$pkgname-sql"
+ _mv $(cd "$pkgdir" && find usr -name '*_pgsql*')
+}
+
+mysql() {
+ pkgdesc="mysql driver for dovecot"
+ depends="$pkgname-sql"
+ _mv $(cd "$pkgdir" && find usr -name '*_mysql*')
+}
+
+sqlite() {
+ pkgdesc="sqlite driver for dovecot"
+ depends="$pkgname-sql"
+ _mv $(cd "$pkgdir" && find usr -name '*_sqlite*')
+}
+
+gssapi() {
+ pkgdesc="GSSAPI auth plugin for dovecot"
+ depends="$pkgname"
+ _mv $(cd "$pkgdir" && find usr -name '*_gssapi*')
+}
+
+ldap() {
+ pkgdesc="LDAP auth plugin for dovecot"
+ depends="$pkgname"
+ _mv $(cd "$pkgdir" && find usr -name '*_ldap*')
+ _mv $(cd "$pkgdir" && find etc/dovecot -name '*-ldap.conf*')
+}
+
+sql() {
+ pkgdesc="SQL plugin for dovecot"
+ depends="$pkgname"
+ _mv $(cd "$pkgdir" && find usr -name '*-sql.*')
+ _mv $(cd "$pkgdir" && find etc/dovecot -name '*-sql.conf*')
+}
+
+md5sums="bc8057bd5bdfa0f8e80e2fef1082a241 dovecot-2.2.22.tar.gz
+49f7a03284cc657857fe2ae22b8c82a0 hide-dl-errors.patch
+1a88280b65efb6cb7f70bc5a88bf264c dovecot.logrotate
+ddd77573827e0662be21303fb795eef3 dovecot.initd"
+sha256sums="c7a9db3c4ae9d9b4da920d2c82669700a0d407934501b405f37f89cc0b706ec7 dovecot-2.2.22.tar.gz
+d6accdd6e271647c01ab8fa0a9491ee822486484961e2d5c252bf70e816d2bfa hide-dl-errors.patch
+2ac04bb7b5c503cd87ba044482e651dbe5c9d84a4268891fb2aa9ba26e62f833 dovecot.logrotate
+3f74548051297cedc7f8d203f1d1d9dc904fe89004b54b52921d2050520daa6f dovecot.initd"
+sha512sums="ea02ae491e90c0b9de7c7320901c8f7235193303fb194805564582d30e630002f21f7195e5c5b99ff3ea1fadf95ddd43c2f7bb4d24067e0e5f40a66e9eb90012 dovecot-2.2.22.tar.gz
+1e9a1f2990019236546c7be581a4d6d0b430110d27a00bc3298f5c154ef9a4aadefa193d02a017912f826d771058fd5c6ef6cb454e14f0d15749fa8f3a68c64a hide-dl-errors.patch
+58756fa06a063777ef7c4d1e67b63adbde5462264e14bd7a3187a318f498fff21ac2a8d53bb216f56fef4588206e14112da79542b6dfdf503988786f27bb6544 dovecot.logrotate
+d7f67991e11979da91162eb64a0b924655d0ac155d97bcc42a40c758003d60b7c096945544e6b321aa8ecb3416fe17b14b5898f1dba5e5a4b3e4c9c21295c8cb dovecot.initd"
diff --git a/main/dovecot/APKBUILD.rej b/main/dovecot/APKBUILD.rej
new file mode 100644
index 0000000000..1a79b7a2bf
--- /dev/null
+++ b/main/dovecot/APKBUILD.rej
@@ -0,0 +1,11 @@
+--- main/dovecot/APKBUILD
++++ main/dovecot/APKBUILD
+@@ -3,7 +3,7 @@
+ # Contributor: Michael Mason <ms13sp@gmail.com>
+ # Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+ pkgname=dovecot
+-pkgver=2.2.22
++pkgver=2.2.23
+ pkgrel=0
+ pkgdesc="IMAP and POP3 server"
+ url="http://www.dovecot.org/"
diff --git a/main/dovecot/dovecot.initd b/main/dovecot/dovecot.initd
index 880a39f254..92959c6372 100644
--- a/main/dovecot/dovecot.initd
+++ b/main/dovecot/dovecot.initd
@@ -1,57 +1,40 @@
#!/sbin/openrc-run
+[ "${SVCNAME}" != "${SVCNAME##*.}" ] && instance=${SVCNAME##*.}
+
description="Secure POP3/IMAP server"
-description_reload="Reload configuration"
-extra_started_commands="reload"
+cfgfile=/etc/dovecot/dovecot${instance:+.$instance}.conf
+pidfile=$(doveconf -c $cfgfile -h base_dir 2>/dev/null)/master.pid
+command=/usr/sbin/dovecot
+command_args=${instance:+-c $cfgfile}
+required_files="$cfgfile"
+extra_started_commands="reload reopen"
+description_reload="Reload configuration"
+description_reopen="Reopen log files"
depend() {
need localmount net
- before exim postfix
+ before mta
after bootmisc firewall ldap mysql ntp-client ntpd postgresql saslauthd slapd
use logger
}
-checkconfig() {
- DOVECOT_INSTANCE=${SVCNAME##*.}
- if [ -n "${DOVECOT_INSTANCE}" -a "${SVCNAME}" != "dovecot" ]; then
- DOVECOT_CONF=/etc/dovecot/dovecot.${DOVECOT_INSTANCE}.conf
- else
- DOVECOT_CONF=/etc/dovecot/dovecot.conf
- fi
- if [ ! -e ${DOVECOT_CONF} ]; then
- eerror "You will need an ${DOVECOT_CONF} first"
- return 1
- fi
- if [ -x /usr/sbin/dovecot ]; then
- DOVECOT_BASEDIR=$(/usr/sbin/dovecot -c ${DOVECOT_CONF} -a | grep '^base_dir = ' | sed 's/^base_dir = //')
- else
- eerror "dovecot not executable"
- return 1
- fi
- DOVECOT_BASEDIR=${DOVECOT_BASEDIR:-/run/dovecot}
- DOVECOT_PIDFILE=${DOVECOT_BASEDIR}/master.pid
- checkpath --directory --owner dovecot:dovecot --mode 0755 \
- ${DOVECOT_BASEDIR}
-}
-
-start() {
- checkconfig || return 1
- ebegin "Starting ${SVCNAME}"
- start-stop-daemon --start --exec /usr/sbin/dovecot --pidfile "${DOVECOT_PIDFILE}" -- -c "${DOVECOT_CONF}"
+start_pre() {
+ ebegin
+ doveconf -c $cfgfile -x >/dev/null && \
+ checkpath --directory ${pidfile%/*}
eend $?
}
-stop() {
- checkconfig || return 1
- ebegin "Stopping ${SVCNAME}"
- start-stop-daemon --stop --exec /usr/sbin/dovecot --pidfile "${DOVECOT_PIDFILE}"
+reload() {
+ ebegin "Reloading ${SVCNAME} configs and restarting auth/login processes"
+ start_pre && start-stop-daemon --signal HUP --pidfile $pidfile
eend $?
}
-reload() {
- checkconfig || return 1
- ebegin "Reloading ${SVCNAME} configs and restarting auth/login processes"
- start-stop-daemon --signal HUP --exec /usr/sbin/dovecot --pidfile "${DOVECOT_PIDFILE}"
+reopen() {
+ ebegin "Reopening ${SVCNAME} log files"
+ start-stop-daemon --signal USR1 --pidfile $pidfile
eend $?
}
diff --git a/main/dovecot/dovecot.logrotate b/main/dovecot/dovecot.logrotate
index 89255f8dd7..b1a4087b42 100644
--- a/main/dovecot/dovecot.logrotate
+++ b/main/dovecot/dovecot.logrotate
@@ -7,6 +7,6 @@
notifempty
sharedscripts
postrotate
- /etc/init.d/dovecot --quiet --ifstarted reload
+ /etc/init.d/dovecot --quiet --ifstarted reopen
endscript
}