diff options
author | Valery Kartel <valery.kartel@gmail.com> | 2016-04-04 10:08:06 +0300 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2016-05-16 16:17:08 +0000 |
commit | 7307d5b5eb03b045960b5cf85bd98af3f7a9ab54 (patch) | |
tree | 0d1722d584271114af0d43f0c64512865ce0e6bf | |
parent | fb87e4fd62220cf107377aeb9e4e65a9a237ec7f (diff) | |
download | alpine_aports-7307d5b5eb03b045960b5cf85bd98af3f7a9ab54.tar.bz2 alpine_aports-7307d5b5eb03b045960b5cf85bd98af3f7a9ab54.tar.xz alpine_aports-7307d5b5eb03b045960b5cf85bd98af3f7a9ab54.zip |
main/dovecot: upgrade to 2.2.23, update init and logrotate scripts
-rw-r--r-- | main/dovecot/APKBUILD | 22 | ||||
-rw-r--r-- | main/dovecot/APKBUILD.orig | 157 | ||||
-rw-r--r-- | main/dovecot/APKBUILD.rej | 11 | ||||
-rw-r--r-- | main/dovecot/dovecot.initd | 59 | ||||
-rw-r--r-- | main/dovecot/dovecot.logrotate | 2 |
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 @@ | |||
3 | # Contributor: Michael Mason <ms13sp@gmail.com> | 3 | # Contributor: Michael Mason <ms13sp@gmail.com> |
4 | # Maintainer: Natanael Copa <ncopa@alpinelinux.org> | 4 | # Maintainer: Natanael Copa <ncopa@alpinelinux.org> |
5 | pkgname=dovecot | 5 | pkgname=dovecot |
6 | pkgver=2.2.22 | 6 | pkgver=2.2.23 |
7 | pkgrel=1 | 7 | pkgrel=0 |
8 | pkgdesc="IMAP and POP3 server" | 8 | pkgdesc="IMAP and POP3 server" |
9 | url="http://www.dovecot.org/" | 9 | url="http://www.dovecot.org/" |
10 | arch="all" | 10 | arch="all" |
@@ -143,15 +143,15 @@ sql() { | |||
143 | _mv $(cd "$pkgdir" && find etc/dovecot -name '*-sql.conf*') | 143 | _mv $(cd "$pkgdir" && find etc/dovecot -name '*-sql.conf*') |
144 | } | 144 | } |
145 | 145 | ||
146 | md5sums="bc8057bd5bdfa0f8e80e2fef1082a241 dovecot-2.2.22.tar.gz | 146 | md5sums="0d2855c19b0603b417cd70613b4a9f36 dovecot-2.2.23.tar.gz |
147 | 49f7a03284cc657857fe2ae22b8c82a0 hide-dl-errors.patch | 147 | 49f7a03284cc657857fe2ae22b8c82a0 hide-dl-errors.patch |
148 | 1a88280b65efb6cb7f70bc5a88bf264c dovecot.logrotate | 148 | df6d43508a82903a97e3a2a5b8436d3d dovecot.logrotate |
149 | ddd77573827e0662be21303fb795eef3 dovecot.initd" | 149 | f0c227ab4e2593f6d410440b82103de1 dovecot.initd" |
150 | sha256sums="c7a9db3c4ae9d9b4da920d2c82669700a0d407934501b405f37f89cc0b706ec7 dovecot-2.2.22.tar.gz | 150 | sha256sums="5d834be43fe8f6f61d9b0fb139bf1db2a4da313aeebd7bf09e4bf6bcb1c9e441 dovecot-2.2.23.tar.gz |
151 | d6accdd6e271647c01ab8fa0a9491ee822486484961e2d5c252bf70e816d2bfa hide-dl-errors.patch | 151 | d6accdd6e271647c01ab8fa0a9491ee822486484961e2d5c252bf70e816d2bfa hide-dl-errors.patch |
152 | 2ac04bb7b5c503cd87ba044482e651dbe5c9d84a4268891fb2aa9ba26e62f833 dovecot.logrotate | 152 | d0fef8cd8200549877d7594cf458d6b33f05b31f95f1fd9a8368e8471c082735 dovecot.logrotate |
153 | 3f74548051297cedc7f8d203f1d1d9dc904fe89004b54b52921d2050520daa6f dovecot.initd" | 153 | 1a3c845c216bb6f9633d27a8c1c0d01b591942c463bddb5ae835f162bd7fb4bf dovecot.initd" |
154 | sha512sums="ea02ae491e90c0b9de7c7320901c8f7235193303fb194805564582d30e630002f21f7195e5c5b99ff3ea1fadf95ddd43c2f7bb4d24067e0e5f40a66e9eb90012 dovecot-2.2.22.tar.gz | 154 | sha512sums="704d86dcef8b217a54db1d1ae3c1e0d6303827fedd7150aec83e805512cd1c5befc88da44660e7a40765ad6800c14d399f8c7621e84125a7732d68fee7f18d82 dovecot-2.2.23.tar.gz |
155 | 1e9a1f2990019236546c7be581a4d6d0b430110d27a00bc3298f5c154ef9a4aadefa193d02a017912f826d771058fd5c6ef6cb454e14f0d15749fa8f3a68c64a hide-dl-errors.patch | 155 | 1e9a1f2990019236546c7be581a4d6d0b430110d27a00bc3298f5c154ef9a4aadefa193d02a017912f826d771058fd5c6ef6cb454e14f0d15749fa8f3a68c64a hide-dl-errors.patch |
156 | 58756fa06a063777ef7c4d1e67b63adbde5462264e14bd7a3187a318f498fff21ac2a8d53bb216f56fef4588206e14112da79542b6dfdf503988786f27bb6544 dovecot.logrotate | 156 | 9f19698ab45969f1f94dc4bddf6de59317daee93c9421c81f2dbf8a7efe6acf89689f1d30f60f536737bb9526c315215d2bce694db27e7b8d7896036a59c31f0 dovecot.logrotate |
157 | d7f67991e11979da91162eb64a0b924655d0ac155d97bcc42a40c758003d60b7c096945544e6b321aa8ecb3416fe17b14b5898f1dba5e5a4b3e4c9c21295c8cb dovecot.initd" | 157 | 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 @@ | |||
1 | # Contributor: Valery Kartel <valery.kartel@gmail.com> | ||
2 | # Contributor: Ćukasz Jendrysik <scadu@yandex.com> | ||
3 | # Contributor: Michael Mason <ms13sp@gmail.com> | ||
4 | # Maintainer: Natanael Copa <ncopa@alpinelinux.org> | ||
5 | pkgname=dovecot | ||
6 | pkgver=2.2.22 | ||
7 | pkgrel=1 | ||
8 | pkgdesc="IMAP and POP3 server" | ||
9 | url="http://www.dovecot.org/" | ||
10 | arch="all" | ||
11 | license="LGPL2+" | ||
12 | depends="openssl" | ||
13 | pkgusers="dovecot dovenull" | ||
14 | pkggroups="dovecot dovenull" | ||
15 | makedepends="libcap-dev zlib-dev openssl-dev bzip2-dev postgresql-dev | ||
16 | mariadb-dev sqlite-dev heimdal-dev openldap-dev linux-headers" | ||
17 | install="dovecot.pre-install dovecot.post-install" | ||
18 | subpackages="$pkgname-doc $pkgname-dev | ||
19 | $pkgname-sql $pkgname-pgsql $pkgname-mysql $pkgname-sqlite | ||
20 | $pkgname-gssapi $pkgname-ldap | ||
21 | " | ||
22 | source="http://www.dovecot.org/releases/${pkgver%.*}/$pkgname-$pkgver.tar.gz | ||
23 | hide-dl-errors.patch | ||
24 | dovecot.logrotate | ||
25 | dovecot.initd | ||
26 | " | ||
27 | options="libtool" | ||
28 | |||
29 | _builddir="$srcdir"/$pkgname-$pkgver | ||
30 | |||
31 | prepare() { | ||
32 | cd "$_builddir" | ||
33 | for i in $source; do | ||
34 | case $i in | ||
35 | *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; | ||
36 | esac | ||
37 | done | ||
38 | } | ||
39 | |||
40 | build() { | ||
41 | cd "$_builddir" | ||
42 | ./configure \ | ||
43 | --build=$CBUILD \ | ||
44 | --host=$CHOST \ | ||
45 | --prefix=/usr \ | ||
46 | --localstatedir=/var \ | ||
47 | --sysconfdir=/etc \ | ||
48 | --mandir=/usr/share/man \ | ||
49 | --infodir=/usr/share/info \ | ||
50 | --with-gssapi=plugin \ | ||
51 | --with-ldap=plugin \ | ||
52 | --with-sql=plugin \ | ||
53 | --with-mysql \ | ||
54 | --with-sqlite \ | ||
55 | --with-pgsql \ | ||
56 | --with-ssl=openssl \ | ||
57 | --with-ssldir=/etc/ssl/dovecot \ | ||
58 | --with-rundir=/run/dovecot \ | ||
59 | || return 1 | ||
60 | make || return 1 | ||
61 | } | ||
62 | |||
63 | package() { | ||
64 | cd "$_builddir" | ||
65 | make DESTDIR="$pkgdir" install || return 1 | ||
66 | |||
67 | install -d "$pkgdir"/etc/ssl/dovecot | ||
68 | install -Dm755 "$srcdir"/dovecot.initd "$pkgdir"/etc/init.d/dovecot | ||
69 | install -Dm644 "$srcdir"/dovecot.logrotate "$pkgdir"/etc/logrotate.d/dovecot | ||
70 | |||
71 | # default config | ||
72 | rm "$pkgdir"/etc/dovecot/* | ||
73 | rm "$pkgdir"/usr/share/doc/dovecot/mkcert.sh | ||
74 | mv "$pkgdir"/usr/share/doc/dovecot/dovecot-openssl.cnf "$pkgdir"/etc/dovecot/ | ||
75 | mv "$pkgdir"/usr/share/doc/dovecot/example-config/dovecot* \ | ||
76 | "$pkgdir"/usr/share/doc/dovecot/example-config/conf.d \ | ||
77 | "$pkgdir"/etc/dovecot/ || return 1 | ||
78 | rm -fr "$pkgdir"/usr/share/doc/dovecot/example-config | ||
79 | |||
80 | # fix ssl dirs in default config | ||
81 | sed -i -e 's,^ssl_cert =.*,ssl_cert = </etc/ssl/dovecot/server.pem,' \ | ||
82 | -e 's,^ssl_key =.*,ssl_key = </etc/ssl/dovecot/server.key,' \ | ||
83 | "$pkgdir"/etc/dovecot/conf.d/10-ssl.conf || return 1 | ||
84 | # set default passdb to passwd and create appropriate 'users' file | ||
85 | install -m 640 -o dovecot -g mail /dev/null "$pkgdir"/etc/dovecot/users | ||
86 | sed -i -e 's,!include auth-system.conf.ext,!include auth-passwdfile.conf.ext,' \ | ||
87 | -e 's,#!include auth-passwdfile.conf.ext,#!include auth-system.conf.ext,' \ | ||
88 | "$pkgdir"/etc/dovecot/conf.d/10-auth.conf || return 1 | ||
89 | } | ||
90 | |||
91 | _mv() { | ||
92 | local i | ||
93 | while [ $# -gt 0 ]; do | ||
94 | local dir=${1%/*} | ||
95 | mkdir -p "$subpkgdir"/$dir | ||
96 | mv "$pkgdir/$1" "$subpkgdir/$dir/" | ||
97 | [ "$(ls -A $pkgdir/$dir)" ] || rmdir "$pkgdir"/$dir | ||
98 | shift | ||
99 | done | ||
100 | } | ||
101 | |||
102 | dev() { | ||
103 | default_dev | ||
104 | mv "$pkgdir"/usr/lib/dovecot/dovecot-config \ | ||
105 | "$subpkgdir"/usr/lib/dovecot/ | ||
106 | } | ||
107 | |||
108 | pgsql() { | ||
109 | pkgdesc="postgresql driver for dovecot" | ||
110 | depends="$pkgname-sql" | ||
111 | _mv $(cd "$pkgdir" && find usr -name '*_pgsql*') | ||
112 | } | ||
113 | |||
114 | mysql() { | ||
115 | pkgdesc="mysql driver for dovecot" | ||
116 | depends="$pkgname-sql" | ||
117 | _mv $(cd "$pkgdir" && find usr -name '*_mysql*') | ||
118 | } | ||
119 | |||
120 | sqlite() { | ||
121 | pkgdesc="sqlite driver for dovecot" | ||
122 | depends="$pkgname-sql" | ||
123 | _mv $(cd "$pkgdir" && find usr -name '*_sqlite*') | ||
124 | } | ||
125 | |||
126 | gssapi() { | ||
127 | pkgdesc="GSSAPI auth plugin for dovecot" | ||
128 | depends="$pkgname" | ||
129 | _mv $(cd "$pkgdir" && find usr -name '*_gssapi*') | ||
130 | } | ||
131 | |||
132 | ldap() { | ||
133 | pkgdesc="LDAP auth plugin for dovecot" | ||
134 | depends="$pkgname" | ||
135 | _mv $(cd "$pkgdir" && find usr -name '*_ldap*') | ||
136 | _mv $(cd "$pkgdir" && find etc/dovecot -name '*-ldap.conf*') | ||
137 | } | ||
138 | |||
139 | sql() { | ||
140 | pkgdesc="SQL plugin for dovecot" | ||
141 | depends="$pkgname" | ||
142 | _mv $(cd "$pkgdir" && find usr -name '*-sql.*') | ||
143 | _mv $(cd "$pkgdir" && find etc/dovecot -name '*-sql.conf*') | ||
144 | } | ||
145 | |||
146 | md5sums="bc8057bd5bdfa0f8e80e2fef1082a241 dovecot-2.2.22.tar.gz | ||
147 | 49f7a03284cc657857fe2ae22b8c82a0 hide-dl-errors.patch | ||
148 | 1a88280b65efb6cb7f70bc5a88bf264c dovecot.logrotate | ||
149 | ddd77573827e0662be21303fb795eef3 dovecot.initd" | ||
150 | sha256sums="c7a9db3c4ae9d9b4da920d2c82669700a0d407934501b405f37f89cc0b706ec7 dovecot-2.2.22.tar.gz | ||
151 | d6accdd6e271647c01ab8fa0a9491ee822486484961e2d5c252bf70e816d2bfa hide-dl-errors.patch | ||
152 | 2ac04bb7b5c503cd87ba044482e651dbe5c9d84a4268891fb2aa9ba26e62f833 dovecot.logrotate | ||
153 | 3f74548051297cedc7f8d203f1d1d9dc904fe89004b54b52921d2050520daa6f dovecot.initd" | ||
154 | sha512sums="ea02ae491e90c0b9de7c7320901c8f7235193303fb194805564582d30e630002f21f7195e5c5b99ff3ea1fadf95ddd43c2f7bb4d24067e0e5f40a66e9eb90012 dovecot-2.2.22.tar.gz | ||
155 | 1e9a1f2990019236546c7be581a4d6d0b430110d27a00bc3298f5c154ef9a4aadefa193d02a017912f826d771058fd5c6ef6cb454e14f0d15749fa8f3a68c64a hide-dl-errors.patch | ||
156 | 58756fa06a063777ef7c4d1e67b63adbde5462264e14bd7a3187a318f498fff21ac2a8d53bb216f56fef4588206e14112da79542b6dfdf503988786f27bb6544 dovecot.logrotate | ||
157 | 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 @@ | |||
1 | --- main/dovecot/APKBUILD | ||
2 | +++ main/dovecot/APKBUILD | ||
3 | @@ -3,7 +3,7 @@ | ||
4 | # Contributor: Michael Mason <ms13sp@gmail.com> | ||
5 | # Maintainer: Natanael Copa <ncopa@alpinelinux.org> | ||
6 | pkgname=dovecot | ||
7 | -pkgver=2.2.22 | ||
8 | +pkgver=2.2.23 | ||
9 | pkgrel=0 | ||
10 | pkgdesc="IMAP and POP3 server" | ||
11 | 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 @@ | |||
1 | #!/sbin/openrc-run | 1 | #!/sbin/openrc-run |
2 | 2 | ||
3 | [ "${SVCNAME}" != "${SVCNAME##*.}" ] && instance=${SVCNAME##*.} | ||
4 | |||
3 | description="Secure POP3/IMAP server" | 5 | description="Secure POP3/IMAP server" |
4 | description_reload="Reload configuration" | ||
5 | 6 | ||
6 | extra_started_commands="reload" | 7 | cfgfile=/etc/dovecot/dovecot${instance:+.$instance}.conf |
8 | pidfile=$(doveconf -c $cfgfile -h base_dir 2>/dev/null)/master.pid | ||
9 | command=/usr/sbin/dovecot | ||
10 | command_args=${instance:+-c $cfgfile} | ||
11 | required_files="$cfgfile" | ||
12 | extra_started_commands="reload reopen" | ||
13 | description_reload="Reload configuration" | ||
14 | description_reopen="Reopen log files" | ||
7 | 15 | ||
8 | depend() { | 16 | depend() { |
9 | need localmount net | 17 | need localmount net |
10 | before exim postfix | 18 | before mta |
11 | after bootmisc firewall ldap mysql ntp-client ntpd postgresql saslauthd slapd | 19 | after bootmisc firewall ldap mysql ntp-client ntpd postgresql saslauthd slapd |
12 | use logger | 20 | use logger |
13 | } | 21 | } |
14 | 22 | ||
15 | checkconfig() { | 23 | start_pre() { |
16 | DOVECOT_INSTANCE=${SVCNAME##*.} | 24 | ebegin |
17 | if [ -n "${DOVECOT_INSTANCE}" -a "${SVCNAME}" != "dovecot" ]; then | 25 | doveconf -c $cfgfile -x >/dev/null && \ |
18 | DOVECOT_CONF=/etc/dovecot/dovecot.${DOVECOT_INSTANCE}.conf | 26 | checkpath --directory ${pidfile%/*} |
19 | else | ||
20 | DOVECOT_CONF=/etc/dovecot/dovecot.conf | ||
21 | fi | ||
22 | if [ ! -e ${DOVECOT_CONF} ]; then | ||
23 | eerror "You will need an ${DOVECOT_CONF} first" | ||
24 | return 1 | ||
25 | fi | ||
26 | if [ -x /usr/sbin/dovecot ]; then | ||
27 | DOVECOT_BASEDIR=$(/usr/sbin/dovecot -c ${DOVECOT_CONF} -a | grep '^base_dir = ' | sed 's/^base_dir = //') | ||
28 | else | ||
29 | eerror "dovecot not executable" | ||
30 | return 1 | ||
31 | fi | ||
32 | DOVECOT_BASEDIR=${DOVECOT_BASEDIR:-/run/dovecot} | ||
33 | DOVECOT_PIDFILE=${DOVECOT_BASEDIR}/master.pid | ||
34 | checkpath --directory --owner dovecot:dovecot --mode 0755 \ | ||
35 | ${DOVECOT_BASEDIR} | ||
36 | } | ||
37 | |||
38 | start() { | ||
39 | checkconfig || return 1 | ||
40 | ebegin "Starting ${SVCNAME}" | ||
41 | start-stop-daemon --start --exec /usr/sbin/dovecot --pidfile "${DOVECOT_PIDFILE}" -- -c "${DOVECOT_CONF}" | ||
42 | eend $? | 27 | eend $? |
43 | } | 28 | } |
44 | 29 | ||
45 | stop() { | 30 | reload() { |
46 | checkconfig || return 1 | 31 | ebegin "Reloading ${SVCNAME} configs and restarting auth/login processes" |
47 | ebegin "Stopping ${SVCNAME}" | 32 | start_pre && start-stop-daemon --signal HUP --pidfile $pidfile |
48 | start-stop-daemon --stop --exec /usr/sbin/dovecot --pidfile "${DOVECOT_PIDFILE}" | ||
49 | eend $? | 33 | eend $? |
50 | } | 34 | } |
51 | 35 | ||
52 | reload() { | 36 | reopen() { |
53 | checkconfig || return 1 | 37 | ebegin "Reopening ${SVCNAME} log files" |
54 | ebegin "Reloading ${SVCNAME} configs and restarting auth/login processes" | 38 | start-stop-daemon --signal USR1 --pidfile $pidfile |
55 | start-stop-daemon --signal HUP --exec /usr/sbin/dovecot --pidfile "${DOVECOT_PIDFILE}" | ||
56 | eend $? | 39 | eend $? |
57 | } | 40 | } |
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 @@ | |||
7 | notifempty | 7 | notifempty |
8 | sharedscripts | 8 | sharedscripts |
9 | postrotate | 9 | postrotate |
10 | /etc/init.d/dovecot --quiet --ifstarted reload | 10 | /etc/init.d/dovecot --quiet --ifstarted reopen |
11 | endscript | 11 | endscript |
12 | } | 12 | } |