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/, net-mail/cyrus-imapd/files/
Date: Fri, 15 Mar 2019 07:38:44
Message-Id: 1552635496.d90a3246db6e4d20a92632c266022dfcb85822fc.eras@gentoo
1 commit: d90a3246db6e4d20a92632c266022dfcb85822fc
2 Author: Eray Aslan <eras <AT> gentoo <DOT> org>
3 AuthorDate: Fri Mar 15 07:38:16 2019 +0000
4 Commit: Eray Aslan <eras <AT> gentoo <DOT> org>
5 CommitDate: Fri Mar 15 07:38:16 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d90a3246
7
8 net-mail/cyrus-imapd: bump to 3.0.9
9
10 and fix underlinking perl modules
11 Closes: https://bugs.gentoo.org/678754
12 Package-Manager: Portage-2.3.62, Repoman-2.3.12
13 Signed-off-by: Eray Aslan <eras <AT> gentoo.org>
14
15 net-mail/cyrus-imapd/Manifest | 1 +
16 net-mail/cyrus-imapd/cyrus-imapd-3.0.9.ebuild | 218 +++++++++++++++++++++
17 .../files/cyrus-imapd-libcap-libs-r1.patch | 35 ++++
18 3 files changed, 254 insertions(+)
19
20 diff --git a/net-mail/cyrus-imapd/Manifest b/net-mail/cyrus-imapd/Manifest
21 index 36d2675692e..6f70f5a7858 100644
22 --- a/net-mail/cyrus-imapd/Manifest
23 +++ b/net-mail/cyrus-imapd/Manifest
24 @@ -4,3 +4,4 @@ DIST cyrus-imapd-3.0.4.tar.gz 10819487 BLAKE2B 209e379731c996ee083b0de61d6122b37
25 DIST cyrus-imapd-3.0.5.tar.gz 10910080 BLAKE2B a7914ab189a290427ddc0d013c19ff0c36f3a6c4fc016f50013d0f6abb11ae2f7d067b71df99b7f00ba4e8a2170e0f068baa170458b0dc1e94d69d8e4b814873 SHA512 262806729d5ee5d753732603aa7af33c6f96bc5145b7a951b8668ffdee0dcd4a90bd287da0949e85c4596cccb471a688f7f8b6f3e39194e1cff311950d4d4410
26 DIST cyrus-imapd-3.0.6.tar.gz 10734548 BLAKE2B d16d1093b17f632fa75e77c1b923deb0c5a76de4c06a657c4c1dd2f9498ac0abd81ecee58c64378118d4b09be872957afc6db5d8deebf72c819623d6ea5aa0a9 SHA512 375e3936465e9ee448996cf738ebe93a35697a58a7784cf6f7a8be25e3e03925fb4f44ff98a0aacbc5b9e3ef39fc8a0e51acb4ea26cbbfbc8e492556fdc03a03
27 DIST cyrus-imapd-3.0.8.tar.gz 10735462 BLAKE2B 27fdead9a75048c12fe4c0eed1dcda9ce24319c2183851190068fd3ded32c1f6b4d550e726dd4a483bafe298ac0199aa2b1354c6f0c5ac0083d7d1ad0e69457a SHA512 f4aa9877e62479439bee2ca29f452bd7e9daa091c19bf3567aa7f493f5163c98b44086b749c70981402212ff90e19d9125b508cfcc077088f8c705e533812960
28 +DIST cyrus-imapd-3.0.9.tar.gz 10771916 BLAKE2B cc483246c83ed55fa7d4e85aa8189852f2e6be23aff5bb478c2d2123e3d928cc8248e580c80c1474b2b3eea9aa1c0f8b3336f779e72e690d8d093e70993cd657 SHA512 d1a65e957ad3bbbd70e4c8c699e226c17911c6f5815839694136b967a7067acaf4261c8aaad223ffb1e41d76ef78e9e7279a2805048de9b05939044ce17cb738
29
30 diff --git a/net-mail/cyrus-imapd/cyrus-imapd-3.0.9.ebuild b/net-mail/cyrus-imapd/cyrus-imapd-3.0.9.ebuild
31 new file mode 100644
32 index 00000000000..c6ba07699df
33 --- /dev/null
34 +++ b/net-mail/cyrus-imapd/cyrus-imapd-3.0.9.ebuild
35 @@ -0,0 +1,218 @@
36 +# Copyright 1999-2019 Gentoo Authors
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +EAPI=6
40 +inherit autotools flag-o-matic pam ssl-cert user
41 +
42 +DESCRIPTION="The Cyrus IMAP Server"
43 +HOMEPAGE="http://www.cyrusimap.org/"
44 +SRC_URI="https://github.com/cyrusimap/${PN}/releases/download/${P}/${P}.tar.gz"
45 +
46 +LICENSE="BSD-with-attribution"
47 +SLOT="0"
48 +KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
49 +IUSE="afs backup calalarm caps clamav http kerberos ldap lmdb \
50 + mysql nntp pam perl postgres replication +server sieve snmp \
51 + sphinx sqlite ssl static-libs tcpd test xapian"
52 +
53 +# virtual/mysql-5.5 added for the --variable= option below
54 +CDEPEND="sys-libs/zlib
55 + dev-libs/libpcre
56 + >=dev-libs/cyrus-sasl-2.1.13
57 + dev-libs/jansson
58 + dev-libs/icu:=
59 + sys-libs/e2fsprogs-libs
60 + afs? ( net-fs/openafs )
61 + calalarm? ( dev-libs/libical )
62 + caps? ( sys-libs/libcap )
63 + clamav? ( app-antivirus/clamav )
64 + http? ( dev-libs/libxml2 dev-libs/libical )
65 + kerberos? ( virtual/krb5 )
66 + ldap? ( net-nds/openldap )
67 + lmdb? ( dev-db/lmdb )
68 + mysql? ( dev-db/mysql-connector-c:0= )
69 + nntp? ( !net-nntp/leafnode )
70 + pam? (
71 + virtual/pam
72 + >=net-mail/mailbase-1
73 + )
74 + perl? ( dev-lang/perl:= )
75 + postgres? ( dev-db/postgresql:* )
76 + snmp? ( >=net-analyzer/net-snmp-5.2.2-r1 )
77 + ssl? ( >=dev-libs/openssl-1.0.1e:0[-bindist] )
78 + sqlite? ( dev-db/sqlite:3 )
79 + tcpd? ( >=sys-apps/tcp-wrappers-7.6 snmp? ( net-analyzer/net-snmp[tcpd=] ) )
80 + xapian? ( >=dev-libs/xapian-1.4.0 )"
81 +
82 +DEPEND="${CDEPEND}
83 + test? ( dev-util/cunit )"
84 +
85 +# all blockers really needed?
86 +# file collision with app-arch/dump - bug 619584
87 +RDEPEND="${CDEPEND}
88 + !mail-mta/courier
89 + !net-mail/bincimap
90 + !net-mail/courier-imap
91 + !net-mail/uw-imap
92 + !app-arch/dump"
93 +
94 +REQUIRED_USE="afs? ( kerberos )
95 + backup? ( sqlite )
96 + calalarm? ( http )
97 + http? ( sqlite )
98 + sphinx? ( mysql )"
99 +
100 +# https://bugs.gentoo.org/678754
101 +# TODO: check underlinking for other libraries
102 +PATCHES=( "${FILESDIR}/cyrus-imapd-libcap-libs-r1.patch" )
103 +
104 +pkg_setup() {
105 + enewuser cyrus -1 -1 /usr/cyrus mail
106 + # https://bugs.gentoo.org/604466
107 + append-ldflags $(no-as-needed)
108 +}
109 +
110 +src_prepare() {
111 + default
112 + # Fix master(8)->cyrusmaster(8) manpage.
113 + for i in `grep -rl -e 'master\.8' -e 'master(8)' "${S}"` ; do
114 + sed -i -e 's:master\.8:cyrusmaster.8:g' \
115 + -e 's:master(8):cyrusmaster(8):g' \
116 + "${i}" || die "sed failed" || die "sed failed"
117 + done
118 + mv man/master.8 man/cyrusmaster.8 || die "mv failed"
119 + sed -i -e "s:MASTER:CYRUSMASTER:g" \
120 + -e "s:Master:Cyrusmaster:g" \
121 + -e "s:master:cyrusmaster:g" \
122 + man/cyrusmaster.8 || die "sed failed"
123 +
124 + # lock.h to afs/lock.h
125 + sed -i -e '/lock.h/s:lock.h:afs/lock.h:' \
126 + ptclient/afskrb.c || die
127 +
128 + eautoreconf
129 +}
130 +
131 +src_configure() {
132 + local myconf
133 + if use afs ; then
134 + myconf+=" --with-afs-libdir=/usr/$(get_libdir)"
135 + myconf+=" --with-afs-incdir=/usr/include/afs"
136 + fi
137 + econf \
138 + --enable-unit-tests \
139 + --enable-murder \
140 + --enable-idled \
141 + --enable-event-notification \
142 + --enable-autocreate \
143 + --enable-pcre \
144 + --with-com_err \
145 + --with-cyrus-user=cyrus \
146 + --with-sasl \
147 + --without-krb \
148 + --without-krbdes \
149 + --enable-squat \
150 + --with-zlib \
151 + $(use_enable afs) \
152 + $(use_enable afs krb5afspts) \
153 + $(use_enable backup) \
154 + $(use_enable calalarm calalarmd) \
155 + $(use_with caps libcap) \
156 + $(use_with clamav) \
157 + $(use_enable nntp) \
158 + $(use_enable http) \
159 + $(use_enable replication) \
160 + $(use_enable kerberos gssapi) \
161 + $(use_with ldap) \
162 + $(use_with lmdb) \
163 + $(use_with mysql) \
164 + $(use_with postgres pgsql) \
165 + $(use_with perl) \
166 + $(use_with sqlite) \
167 + $(use_with ssl openssl) \
168 + $(use_enable server) \
169 + $(use_enable sieve) \
170 + $(use_with snmp) \
171 + $(use_enable sphinx) \
172 + $(use_enable static-libs static) \
173 + $(use_with tcpd libwrap) \
174 + $(use_enable xapian) \
175 + ${myconf}
176 +}
177 +
178 +src_install() {
179 + emake DESTDIR="${D}" INSTALLDIRS=vendor install
180 +
181 + dodoc README*
182 + dodoc -r doc
183 + cp -r contrib tools "${D}/usr/share/doc/${PF}"
184 + rm -f doc/text/Makefile*
185 +
186 + mv "${D}"usr/libexec/{master,cyrusmaster} || die
187 +
188 + insinto /etc
189 + newins "${D}usr/share/doc/${PF}/doc/examples/cyrus_conf/normal.conf" cyrus.conf
190 + newins "${D}usr/share/doc/${PF}/doc/examples/imapd_conf/normal.conf" imapd.conf
191 +
192 + sed -i -e '/^configdirectory/s|/var/.*|/var/imap|' \
193 + -e '/^partition-default/s|/var/.*|/var/spool/imap|' \
194 + -e '/^sievedir/s|/var/.*|/var/imap/sieve|' \
195 + "${D}"etc/imapd.conf
196 +
197 + sed -i -e 's|/var/imap/socket/lmtp|/run/cyrus/socket/lmtp|' \
198 + -e 's|/var/imap/socket/notify|/run/cyrus/socket/notify|' \
199 + "${D}"etc/cyrus.conf
200 +
201 + # turn off sieve if not installed
202 + if ! use sieve; then
203 + sed -i -e "/sieve/s/^/#/" "${D}/etc/cyrus.conf" || die
204 + fi
205 + # same thing for http(s) as well
206 + if ! use http; then
207 + sed -i -e "/http/s/^/#/" "${D}/etc/cyrus.conf" || die
208 + fi
209 +
210 + newinitd "${FILESDIR}/cyrus.rc8" cyrus
211 + newconfd "${FILESDIR}/cyrus.confd" cyrus
212 + newpamd "${FILESDIR}/cyrus.pam-include" sieve
213 +
214 + for subdir in imap/{,db,log,msg,proc,socket,sieve} spool/imap/{,stage.} ; do
215 + keepdir "/var/${subdir}"
216 + fowners cyrus:mail "/var/${subdir}"
217 + fperms 0750 "/var/${subdir}"
218 + done
219 + for subdir in imap/{user,quota,sieve} spool/imap ; do
220 + 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
221 + keepdir "/var/${subdir}/${i}"
222 + fowners cyrus:mail "/var/${subdir}/${i}"
223 + fperms 0750 "/var/${subdir}/${i}"
224 + done
225 + done
226 +}
227 +
228 +pkg_preinst() {
229 + if ! has_version ${CATEGORY}/${PN} ; then
230 + elog "For correct logging add the following to /etc/syslog.conf:"
231 + elog " local6.* /var/log/imapd.log"
232 + elog " auth.debug /var/log/auth.log"
233 + echo
234 +
235 + elog "You have to add user cyrus to the sasldb2. Do this with:"
236 + elog " saslpasswd2 cyrus"
237 + fi
238 +}
239 +
240 +pkg_postinst() {
241 + # do not install server.{key,pem) if they exist
242 + if use ssl ; then
243 + if [ ! -f "${ROOT}"etc/ssl/cyrus/server.key ]; then
244 + install_cert /etc/ssl/cyrus/server
245 + chown cyrus:mail "${ROOT}"etc/ssl/cyrus/server.{key,pem}
246 + fi
247 + fi
248 +
249 + echo
250 + einfo "Please see http://www.cyrusimap.org/imap/download/upgrade.html"
251 + einfo "for upgrade instructions."
252 + echo
253 +}
254
255 diff --git a/net-mail/cyrus-imapd/files/cyrus-imapd-libcap-libs-r1.patch b/net-mail/cyrus-imapd/files/cyrus-imapd-libcap-libs-r1.patch
256 new file mode 100644
257 index 00000000000..4b1a51056f5
258 --- /dev/null
259 +++ b/net-mail/cyrus-imapd/files/cyrus-imapd-libcap-libs-r1.patch
260 @@ -0,0 +1,35 @@
261 +--- a/configure.ac 2017-07-15 07:26:38.375295969 +0200
262 ++++ b/configure.ac 2017-07-15 07:28:33.250194410 +0200
263 +@@ -1351,7 +1351,9 @@
264 + AC_CHECK_HEADERS([sys/capability.h sys/prctl.h], , have_libcap=no)
265 + if test "$have_libcap" = "yes"; then
266 + AC_DEFINE(HAVE_LIBCAP, [], [Do we have libcap system capabilities handling (Linux systems only)?])
267 +- LIBS="$LIBS -lcap"
268 ++ LIBCAP="-lcap"
269 ++ AC_SUBST(LIBCAP)
270 ++ LIBS="$LIBS $LIBCAP"
271 + fi
272 + fi
273 + ;;
274 +--- a/perl/imap/Makefile.PL.in 2019-02-25 15:43:44.370676803 +0100
275 ++++ b/perl/imap/Makefile.PL.in 2019-02-25 15:44:02.595285944 +0100
276 +@@ -90,7 +90,7 @@
277 + 'clean' => {'FILES' => 'libcyrperl.a cyradm'},
278 + 'OBJECT' => 'IMAP.o',
279 + 'MYEXTLIB' => '@top_builddir@/perl/.libs/libcyrus.a @top_builddir@/perl/.libs/libcyrus_min.a',
280 +- 'LIBS' => [ "$LIB_SASL @SSL_LIBS@ @LIB_UUID@ @ZLIB@"],
281 ++ 'LIBS' => [ "$LIB_SASL @SSL_LIBS@ @LIB_UUID@ @ZLIB@ @LIBCAP@"],
282 + 'DEFINE' => '-DPERL_POLLUTE', # e.g., '-DHAVE_SOMETHING'
283 + 'INC' => "-I@top_srcdir@ -I@top_srcdir@/com_err/et @SASLFLAGS@ @SSL_CPPFLAGS@ -I@top_srcdir@/perl/imap",
284 + 'EXE_FILES' => [cyradm],
285 +--- a/perl/sieve/managesieve/Makefile.PL.in 2019-02-25 15:42:40.852554632 +0100
286 ++++ b/perl/sieve/managesieve/Makefile.PL.in 2019-02-25 15:43:05.029362231 +0100
287 +@@ -69,7 +69,7 @@
288 + 'ABSTRACT' => 'Cyrus Sieve management interface',
289 + 'VERSION_FROM' => "@top_srcdir@/perl/sieve/managesieve/managesieve.pm", # finds $VERSION
290 + 'MYEXTLIB' => '../lib/.libs/libisieve.a @top_builddir@/perl/.libs/libcyrus.a @top_builddir@/perl/.libs/libcyrus_min.a',
291 +- 'LIBS' => ["$LIB_SASL @SSL_LIBS@ @LIB_UUID@ @ZLIB@ @SQLITE_LIBADD@ @MYSQL_LIBADD@ @PGSQL_LIBADD@"],
292 ++ 'LIBS' => ["$LIB_SASL @SSL_LIBS@ @LIB_UUID@ @ZLIB@ @SQLITE_LIBADD@ @MYSQL_LIBADD@ @PGSQL_LIBADD@ @LIBCAP@"],
293 + 'CCFLAGS' => '@GCOV_CFLAGS@',
294 + 'DEFINE' => '-DPERL_POLLUTE', # e.g., '-DHAVE_SOMETHING'
295 + 'INC' => "-I@top_srcdir@/lib -I@top_srcdir@/perl/sieve -I@top_srcdir@/perl/sieve/lib @SASLFLAGS@ @SSL_CPPFLAGS@",