Gentoo Archives: gentoo-commits

From: Eray Aslan <eras@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-mail/cyrus-imapd/
Date: Tue, 28 May 2019 10:17:23
Message-Id: 1559038615.ac3a4f5a9f0f61453e755749f28a66960ce9a81b.eras@gentoo
1 commit: ac3a4f5a9f0f61453e755749f28a66960ce9a81b
2 Author: Eray Aslan <eras <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 28 10:16:55 2019 +0000
4 Commit: Eray Aslan <eras <AT> gentoo <DOT> org>
5 CommitDate: Tue May 28 10:16:55 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ac3a4f5a
7
8 net-mail/cyrus-imapd: security bump to 3.0.10
9
10 Package-Manager: Portage-2.3.67, Repoman-2.3.13
11 Signed-off-by: Eray Aslan <eras <AT> gentoo.org>
12
13 net-mail/cyrus-imapd/Manifest | 1 +
14 net-mail/cyrus-imapd/cyrus-imapd-3.0.10.ebuild | 217 +++++++++++++++++++++++++
15 2 files changed, 218 insertions(+)
16
17 diff --git a/net-mail/cyrus-imapd/Manifest b/net-mail/cyrus-imapd/Manifest
18 index d13e6897628..931da492bf2 100644
19 --- a/net-mail/cyrus-imapd/Manifest
20 +++ b/net-mail/cyrus-imapd/Manifest
21 @@ -1,3 +1,4 @@
22 +DIST cyrus-imapd-3.0.10.tar.gz 10766263 BLAKE2B 366a8f524849d2173b8ea836e9f239ae20295dd435594af17d4c4682e7e672bc92c9f1bb0a60d7f7dce638beb94954f20906f9454b33830d2dcabb956ebd558a SHA512 1ae153a8f181bbe020326bec2dc177b78ef3c442f94e24e89b7a719298d93701006596dd21fa1c3a40afd75f01162b03524cf793dd7438ec7192f9a13f7614d0
23 DIST cyrus-imapd-3.0.4.tar.gz 10819487 BLAKE2B 209e379731c996ee083b0de61d6122b3756d1f6880071ebf015157057cf45845961d762ee762ae56213f72f15c01df29ab2d2661c4e352c6b4a680924d15d7b0 SHA512 9ceb7ac837c932c70fa0c1583bf8700b3ec27568d72538ae8d59f2f551e3007b3c2fc68fd29c009597c3949345dbe1bf2eb614bea038d70a5b49e5507df6b69a
24 DIST cyrus-imapd-3.0.5.tar.gz 10910080 BLAKE2B a7914ab189a290427ddc0d013c19ff0c36f3a6c4fc016f50013d0f6abb11ae2f7d067b71df99b7f00ba4e8a2170e0f068baa170458b0dc1e94d69d8e4b814873 SHA512 262806729d5ee5d753732603aa7af33c6f96bc5145b7a951b8668ffdee0dcd4a90bd287da0949e85c4596cccb471a688f7f8b6f3e39194e1cff311950d4d4410
25 DIST cyrus-imapd-3.0.6.tar.gz 10734548 BLAKE2B d16d1093b17f632fa75e77c1b923deb0c5a76de4c06a657c4c1dd2f9498ac0abd81ecee58c64378118d4b09be872957afc6db5d8deebf72c819623d6ea5aa0a9 SHA512 375e3936465e9ee448996cf738ebe93a35697a58a7784cf6f7a8be25e3e03925fb4f44ff98a0aacbc5b9e3ef39fc8a0e51acb4ea26cbbfbc8e492556fdc03a03
26
27 diff --git a/net-mail/cyrus-imapd/cyrus-imapd-3.0.10.ebuild b/net-mail/cyrus-imapd/cyrus-imapd-3.0.10.ebuild
28 new file mode 100644
29 index 00000000000..5bf98d12a9b
30 --- /dev/null
31 +++ b/net-mail/cyrus-imapd/cyrus-imapd-3.0.10.ebuild
32 @@ -0,0 +1,217 @@
33 +# Copyright 1999-2019 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=6
37 +inherit autotools flag-o-matic pam ssl-cert user
38 +
39 +DESCRIPTION="The Cyrus IMAP Server"
40 +HOMEPAGE="https://www.cyrusimap.org/"
41 +SRC_URI="https://github.com/cyrusimap/${PN}/releases/download/${P}/${P}.tar.gz"
42 +
43 +LICENSE="BSD-with-attribution"
44 +SLOT="0"
45 +KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
46 +IUSE="afs backup calalarm caps clamav http kerberos ldap lmdb \
47 + mysql nntp pam perl postgres replication +server sieve snmp \
48 + sphinx sqlite ssl static-libs tcpd test xapian"
49 +
50 +CDEPEND="sys-libs/zlib
51 + dev-libs/libpcre
52 + >=dev-libs/cyrus-sasl-2.1.13
53 + dev-libs/jansson
54 + dev-libs/icu:=
55 + sys-libs/e2fsprogs-libs
56 + afs? ( net-fs/openafs )
57 + calalarm? ( dev-libs/libical )
58 + caps? ( sys-libs/libcap )
59 + clamav? ( app-antivirus/clamav )
60 + http? ( dev-libs/libxml2 dev-libs/libical )
61 + kerberos? ( virtual/krb5 )
62 + ldap? ( net-nds/openldap )
63 + lmdb? ( dev-db/lmdb )
64 + mysql? ( dev-db/mysql-connector-c:0= )
65 + nntp? ( !net-nntp/leafnode )
66 + pam? (
67 + virtual/pam
68 + >=net-mail/mailbase-1
69 + )
70 + perl? ( dev-lang/perl:= )
71 + postgres? ( dev-db/postgresql:* )
72 + snmp? ( >=net-analyzer/net-snmp-5.2.2-r1 )
73 + ssl? ( >=dev-libs/openssl-1.0.1e:0[-bindist] )
74 + sqlite? ( dev-db/sqlite:3 )
75 + tcpd? ( >=sys-apps/tcp-wrappers-7.6 snmp? ( net-analyzer/net-snmp[tcpd=] ) )
76 + xapian? ( >=dev-libs/xapian-1.4.0 )"
77 +
78 +DEPEND="${CDEPEND}
79 + test? ( dev-util/cunit )"
80 +
81 +# all blockers really needed?
82 +# file collision with app-arch/dump - bug 619584
83 +RDEPEND="${CDEPEND}
84 + !mail-mta/courier
85 + !net-mail/bincimap
86 + !net-mail/courier-imap
87 + !net-mail/uw-imap
88 + !app-arch/dump"
89 +
90 +REQUIRED_USE="afs? ( kerberos )
91 + backup? ( sqlite )
92 + calalarm? ( http )
93 + http? ( sqlite )
94 + sphinx? ( mysql )"
95 +
96 +# https://bugs.gentoo.org/678754
97 +# TODO: check underlinking for other libraries
98 +PATCHES=( "${FILESDIR}/cyrus-imapd-libcap-libs-r1.patch" )
99 +
100 +pkg_setup() {
101 + enewuser cyrus -1 -1 /usr/cyrus mail
102 + # https://bugs.gentoo.org/604466
103 + append-ldflags $(no-as-needed)
104 +}
105 +
106 +src_prepare() {
107 + default
108 + # Fix master(8)->cyrusmaster(8) manpage.
109 + for i in `grep -rl -e 'master\.8' -e 'master(8)' "${S}"` ; do
110 + sed -i -e 's:master\.8:cyrusmaster.8:g' \
111 + -e 's:master(8):cyrusmaster(8):g' \
112 + "${i}" || die "sed failed" || die "sed failed"
113 + done
114 + mv man/master.8 man/cyrusmaster.8 || die "mv failed"
115 + sed -i -e "s:MASTER:CYRUSMASTER:g" \
116 + -e "s:Master:Cyrusmaster:g" \
117 + -e "s:master:cyrusmaster:g" \
118 + man/cyrusmaster.8 || die "sed failed"
119 +
120 + # lock.h to afs/lock.h
121 + sed -i -e '/lock.h/s:lock.h:afs/lock.h:' \
122 + ptclient/afskrb.c || die
123 +
124 + eautoreconf
125 +}
126 +
127 +src_configure() {
128 + local myconf
129 + if use afs ; then
130 + myconf+=" --with-afs-libdir=/usr/$(get_libdir)"
131 + myconf+=" --with-afs-incdir=/usr/include/afs"
132 + fi
133 + econf \
134 + --enable-unit-tests \
135 + --enable-murder \
136 + --enable-idled \
137 + --enable-event-notification \
138 + --enable-autocreate \
139 + --enable-pcre \
140 + --with-com_err \
141 + --with-cyrus-user=cyrus \
142 + --with-sasl \
143 + --without-krb \
144 + --without-krbdes \
145 + --enable-squat \
146 + --with-zlib \
147 + $(use_enable afs) \
148 + $(use_enable afs krb5afspts) \
149 + $(use_enable backup) \
150 + $(use_enable calalarm calalarmd) \
151 + $(use_with caps libcap) \
152 + $(use_with clamav) \
153 + $(use_enable nntp) \
154 + $(use_enable http) \
155 + $(use_enable replication) \
156 + $(use_enable kerberos gssapi) \
157 + $(use_with ldap) \
158 + $(use_with lmdb) \
159 + $(use_with mysql) \
160 + $(use_with postgres pgsql) \
161 + $(use_with perl) \
162 + $(use_with sqlite) \
163 + $(use_with ssl openssl) \
164 + $(use_enable server) \
165 + $(use_enable sieve) \
166 + $(use_with snmp) \
167 + $(use_enable sphinx) \
168 + $(use_enable static-libs static) \
169 + $(use_with tcpd libwrap) \
170 + $(use_enable xapian) \
171 + ${myconf}
172 +}
173 +
174 +src_install() {
175 + emake DESTDIR="${D}" INSTALLDIRS=vendor install
176 +
177 + dodoc README*
178 + dodoc -r doc
179 + cp -r contrib tools "${D}/usr/share/doc/${PF}"
180 + rm -f doc/text/Makefile*
181 +
182 + mv "${D}"usr/libexec/{master,cyrusmaster} || die
183 +
184 + insinto /etc
185 + newins "${D}usr/share/doc/${PF}/doc/examples/cyrus_conf/normal.conf" cyrus.conf
186 + newins "${D}usr/share/doc/${PF}/doc/examples/imapd_conf/normal.conf" imapd.conf
187 +
188 + sed -i -e '/^configdirectory/s|/var/.*|/var/imap|' \
189 + -e '/^partition-default/s|/var/.*|/var/spool/imap|' \
190 + -e '/^sievedir/s|/var/.*|/var/imap/sieve|' \
191 + "${D}"etc/imapd.conf
192 +
193 + sed -i -e 's|/var/imap/socket/lmtp|/run/cyrus/socket/lmtp|' \
194 + -e 's|/var/imap/socket/notify|/run/cyrus/socket/notify|' \
195 + "${D}"etc/cyrus.conf
196 +
197 + # turn off sieve if not installed
198 + if ! use sieve; then
199 + sed -i -e "/sieve/s/^/#/" "${D}/etc/cyrus.conf" || die
200 + fi
201 + # same thing for http(s) as well
202 + if ! use http; then
203 + sed -i -e "/http/s/^/#/" "${D}/etc/cyrus.conf" || die
204 + fi
205 +
206 + newinitd "${FILESDIR}/cyrus.rc8" cyrus
207 + newconfd "${FILESDIR}/cyrus.confd" cyrus
208 + newpamd "${FILESDIR}/cyrus.pam-include" sieve
209 +
210 + for subdir in imap/{,db,log,msg,proc,socket,sieve} spool/imap/{,stage.} ; do
211 + keepdir "/var/${subdir}"
212 + fowners cyrus:mail "/var/${subdir}"
213 + fperms 0750 "/var/${subdir}"
214 + done
215 + for subdir in imap/{user,quota,sieve} spool/imap ; do
216 + for i in a b c d e f g h i j k l m n o p q r s t v u w x y z ; do
217 + keepdir "/var/${subdir}/${i}"
218 + fowners cyrus:mail "/var/${subdir}/${i}"
219 + fperms 0750 "/var/${subdir}/${i}"
220 + done
221 + done
222 +}
223 +
224 +pkg_preinst() {
225 + if ! has_version ${CATEGORY}/${PN} ; then
226 + elog "For correct logging add the following to /etc/syslog.conf:"
227 + elog " local6.* /var/log/imapd.log"
228 + elog " auth.debug /var/log/auth.log"
229 + echo
230 +
231 + elog "You have to add user cyrus to the sasldb2. Do this with:"
232 + elog " saslpasswd2 cyrus"
233 + fi
234 +}
235 +
236 +pkg_postinst() {
237 + # do not install server.{key,pem) if they exist
238 + if use ssl ; then
239 + if [ ! -f "${ROOT}"etc/ssl/cyrus/server.key ]; then
240 + install_cert /etc/ssl/cyrus/server
241 + chown cyrus:mail "${ROOT}"etc/ssl/cyrus/server.{key,pem}
242 + fi
243 + fi
244 +
245 + echo
246 + einfo "Please see https://www.cyrusimap.org/imap/download/upgrade.html"
247 + einfo "for upgrade instructions."
248 + echo
249 +}