Gentoo Archives: gentoo-commits

From: "Eray Aslan (eras)" <eras@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in mail-mta/postfix: postfix-2.12_pre20140223.ebuild ChangeLog postfix-2.12_pre20140219.ebuild
Date: Thu, 27 Feb 2014 15:16:41
Message-Id: 20140227151637.DB1DC2004C@flycatcher.gentoo.org
1 eras 14/02/27 15:16:37
2
3 Modified: ChangeLog
4 Added: postfix-2.12_pre20140223.ebuild
5 Removed: postfix-2.12_pre20140219.ebuild
6 Log:
7 Version bump
8
9 (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 0x77F1F175586A3B1F)
10
11 Revision Changes Path
12 1.496 mail-mta/postfix/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/ChangeLog?rev=1.496&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/ChangeLog?rev=1.496&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/ChangeLog?r1=1.495&r2=1.496
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v
21 retrieving revision 1.495
22 retrieving revision 1.496
23 diff -u -r1.495 -r1.496
24 --- ChangeLog 20 Feb 2014 06:00:05 -0000 1.495
25 +++ ChangeLog 27 Feb 2014 15:16:37 -0000 1.496
26 @@ -1,6 +1,12 @@
27 # ChangeLog for mail-mta/postfix
28 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.495 2014/02/20 06:00:05 eras Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.496 2014/02/27 15:16:37 eras Exp $
31 +
32 +*postfix-2.12_pre20140223 (27 Feb 2014)
33 +
34 + 27 Feb 2014; Eray Aslan <eras@g.o> +postfix-2.12_pre20140223.ebuild,
35 + -postfix-2.12_pre20140219.ebuild:
36 + Version bump
37
38 *postfix-2.12_pre20140219 (20 Feb 2014)
39
40
41
42
43 1.1 mail-mta/postfix/postfix-2.12_pre20140223.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/postfix-2.12_pre20140223.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/postfix-2.12_pre20140223.ebuild?rev=1.1&content-type=text/plain
47
48 Index: postfix-2.12_pre20140223.ebuild
49 ===================================================================
50 # Copyright 1999-2014 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/postfix-2.12_pre20140223.ebuild,v 1.1 2014/02/27 15:16:37 eras Exp $
53
54 EAPI=5
55 inherit eutils flag-o-matic multilib pam ssl-cert systemd toolchain-funcs user versionator
56
57 MY_PV="${PV/_pre/-}"
58 MY_SRC="${PN}-${MY_PV}"
59 MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/experimental"
60 VDA_PV="2.10.0"
61 VDA_P="${PN}-vda-v13-${VDA_PV}"
62 RC_VER="2.7"
63
64 DESCRIPTION="A fast and secure drop-in replacement for sendmail."
65 HOMEPAGE="http://www.postfix.org/"
66 SRC_URI="${MY_URI}/${MY_SRC}.tar.gz
67 vda? ( http://vda.sourceforge.net/VDA/${VDA_P}.patch ) "
68
69 LICENSE="IBM"
70 SLOT="0"
71 KEYWORDS="~amd64 ~arm ~hppa ~x86"
72 IUSE="+berkdb cdb doc dovecot-sasl hardened ldap ldap-bind lmdb memcached mbox mysql nis pam postgres sasl selinux sqlite ssl vda"
73
74 DEPEND=">=dev-libs/libpcre-3.4
75 dev-lang/perl
76 berkdb? ( >=sys-libs/db-3.2 )
77 cdb? ( || ( >=dev-db/tinycdb-0.76 >=dev-db/cdb-0.75-r1 ) )
78 ldap? ( net-nds/openldap )
79 ldap-bind? ( net-nds/openldap[sasl] )
80 lmdb? ( >=dev-db/lmdb-0.9.11 )
81 mysql? ( virtual/mysql )
82 pam? ( virtual/pam )
83 postgres? ( dev-db/postgresql-base )
84 sasl? ( >=dev-libs/cyrus-sasl-2 )
85 sqlite? ( dev-db/sqlite:3 )
86 ssl? ( >=dev-libs/openssl-0.9.6g )"
87
88 RDEPEND="${DEPEND}
89 dovecot-sasl? ( net-mail/dovecot )
90 memcached? ( net-misc/memcached )
91 net-mail/mailbase
92 selinux? ( sec-policy/selinux-postfix )
93 !mail-mta/courier
94 !mail-mta/esmtp
95 !mail-mta/exim
96 !mail-mta/mini-qmail
97 !mail-mta/msmtp[mta]
98 !mail-mta/netqmail
99 !mail-mta/nullmailer
100 !mail-mta/qmail-ldap
101 !mail-mta/sendmail
102 !mail-mta/opensmtpd
103 !<mail-mta/ssmtp-2.64-r2
104 !>=mail-mta/ssmtp-2.64-r2[mta]
105 !net-mail/fastforward"
106
107 REQUIRED_USE="ldap-bind? ( ldap sasl )"
108
109 S="${WORKDIR}/${MY_SRC}"
110
111 pkg_setup() {
112 # Add postfix, postdrop user/group (bug #77565)
113 enewgroup postfix 207
114 enewgroup postdrop 208
115 enewuser postfix 207 -1 /var/spool/postfix postfix,mail
116 }
117
118 src_prepare() {
119 if use vda; then
120 epatch "${DISTDIR}"/${VDA_P}.patch
121 fi
122
123 sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \
124 src/util/sys_defs.h || die "sed failed"
125
126 # change default paths to better comply with portage standard paths
127 sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed"
128 }
129
130 src_configure() {
131 # Make sure LDFLAGS get passed down to the executables.
132 local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -lpcre -lcrypt -lpthread"
133
134 use pam && mylibs="${mylibs} -lpam"
135
136 if use ldap; then
137 mycc="${mycc} -DHAS_LDAP"
138 mylibs="${mylibs} -lldap -llber"
139 fi
140
141 if use mysql; then
142 mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)"
143 mylibs="${mylibs} $(mysql_config --libs)"
144 fi
145
146 if use postgres; then
147 mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)"
148 mylibs="${mylibs} -lpq -L$(pg_config --libdir)"
149 fi
150
151 if use sqlite; then
152 mycc="${mycc} -DHAS_SQLITE"
153 mylibs="${mylibs} -lsqlite3"
154 fi
155
156 if use ssl; then
157 mycc="${mycc} -DUSE_TLS"
158 mylibs="${mylibs} -lssl -lcrypto"
159 fi
160
161 if use lmdb; then
162 mycc="${mycc} -DHAS_LMDB"
163 mylibs="${mylibs} -llmdb"
164 fi
165
166 # broken. and "in other words, not supported" by upstream.
167 # Use inet_protocols setting in main.cf
168 #if ! use ipv6; then
169 # mycc="${mycc} -DNO_IPV6"
170 #fi
171
172 if use sasl; then
173 if use dovecot-sasl; then
174 # Set dovecot as default.
175 mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\""
176 fi
177 if use ldap-bind; then
178 mycc="${mycc} -DUSE_LDAP_SASL"
179 fi
180 mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl"
181 mylibs="${mylibs} -lsasl2"
182 elif use dovecot-sasl; then
183 mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\""
184 fi
185
186 if ! use nis; then
187 mycc="${mycc} -DNO_NIS"
188 fi
189
190 if ! use berkdb; then
191 mycc="${mycc} -DNO_DB"
192 if use cdb; then
193 # change default hash format from Berkeley DB to cdb
194 mycc="${mycc} -DDEF_DB_TYPE=\\\"cdb\\\""
195 fi
196 fi
197
198 if use cdb; then
199 mycc="${mycc} -DHAS_CDB -I/usr/include/cdb"
200 CDB_LIBS=""
201 # Tinycdb is preferred.
202 if has_version dev-db/tinycdb ; then
203 einfo "Building with dev-db/tinycdb"
204 CDB_LIBS="-lcdb"
205 else
206 einfo "Building with dev-db/cdb"
207 CDB_PATH="/usr/$(get_libdir)"
208 for i in cdb.a alloc.a buffer.a unix.a byte.a ; do
209 CDB_LIBS="${CDB_LIBS} ${CDB_PATH}/${i}"
210 done
211 fi
212 mylibs="${mylibs} ${CDB_LIBS}"
213 fi
214
215 # Robin H. Johnson <robbat2@g.o> 17/Nov/2006
216 # Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check.
217 mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
218 filter-lfs-flags
219
220 # Workaround for bug #76512
221 if use hardened; then
222 [[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os
223 fi
224
225 # Remove annoying C++ comment style warnings - bug #378099
226 append-flags -Wno-comment
227
228 sed -i -e "/^RANLIB/s/ranlib/$(tc-getRANLIB)/g" "${S}"/makedefs
229 sed -i -e "/^AR/s/ar/$(tc-getAR)/g" "${S}"/makedefs
230 emake DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" makefiles
231 }
232
233 src_install () {
234 local myconf
235 use doc && myconf="readme_directory=\"/usr/share/doc/${PF}/readme\" \
236 html_directory=\"/usr/share/doc/${PF}/html\""
237
238 /bin/sh postfix-install \
239 -non-interactive \
240 install_root="${D}" \
241 config_directory="/etc/postfix" \
242 manpage_directory="/usr/share/man" \
243 command_directory="/usr/sbin" \
244 mailq_path="/usr/bin/mailq" \
245 newaliases_path="/usr/bin/newaliases" \
246 sendmail_path="/usr/sbin/sendmail" \
247 ${myconf} \
248 || die "postfix-install failed"
249
250 # Fix spool removal on upgrade
251 rm -Rf "${D}"/var
252 keepdir /var/spool/postfix
253
254 # Install rmail for UUCP, closes bug #19127
255 dobin auxiliary/rmail/rmail
256
257 # Provide another link for legacy FSH
258 dosym /usr/sbin/sendmail /usr/$(get_libdir)/sendmail
259
260 # Install qshape tool and posttls-finger
261 dobin auxiliary/qshape/qshape.pl
262 doman man/man1/qshape.1
263 dobin bin/posttls-finger
264 doman man/man1/posttls-finger.1
265
266 # Performance tuning tools and their manuals
267 dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink}
268 doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1
269
270 # Set proper permissions on required files/directories
271 dodir /var/lib/postfix
272 keepdir /var/lib/postfix
273 fowners -R postfix:postfix /var/lib/postfix
274 fperms 0750 /var/lib/postfix
275 fowners root:postdrop /usr/sbin/post{drop,queue}
276 fperms 02711 /usr/sbin/post{drop,queue}
277
278 keepdir /etc/postfix
279 if use mbox; then
280 mypostconf="mail_spool_directory=/var/spool/mail"
281 else
282 mypostconf="home_mailbox=.maildir/"
283 fi
284 "${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \
285 -e ${mypostconf} || die "postconf failed"
286
287 insinto /etc/postfix
288 newins "${FILESDIR}"/smtp.pass saslpass
289 fperms 600 /etc/postfix/saslpass
290
291 newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix
292 # do not start mysql/postgres unnecessarily - bug #359913
293 use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix"
294 use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix"
295
296 dodoc *README COMPATIBILITY HISTORY PORTING RELEASE_NOTES*
297 mv "${D}"/etc/postfix/{*.default,makedefs.out} "${D}"/usr/share/doc/${PF}/
298 use doc && mv "${S}"/examples "${D}"/usr/share/doc/${PF}/
299
300 pamd_mimic_system smtp auth account
301
302 if use sasl; then
303 insinto /etc/sasl2
304 newins "${FILESDIR}"/smtp.sasl smtpd.conf
305 fi
306
307 # header files
308 insinto /usr/include/postfix
309 doins include/*.h
310
311 # Remove unnecessary files
312 rm -f "${D}"/etc/postfix/{*LICENSE,access,aliases,canonical,generic}
313 rm -f "${D}"/etc/postfix/{header_checks,relocated,transport,virtual}
314
315 systemd_dounit "${FILESDIR}/${PN}.service"
316 }
317
318 pkg_preinst() {
319 # Postfix 2.9.
320 # default for inet_protocols changed from ipv4 to all in postfix-2.9.
321 # check inet_protocols setting in main.cf and modify if necessary to prevent
322 # performance loss with useless DNS lookups and useless connection attempts.
323 [[ -d ${ROOT}/etc/postfix ]] && {
324 if [[ "$(${D}/usr/sbin/postconf -dh inet_protocols)" != "ipv4" ]]; then
325 if [[ ! -n "$(${D}/usr/sbin/postconf -c ${ROOT}/etc/postfix -n inet_protocols)" ]];
326 then
327 ewarn "\nCOMPATIBILITY: adding inet_protocols=ipv4 to main.cf."
328 ewarn "That will keep the same behaviour as previous postfix versions."
329 ewarn "Specify inet_protocols explicitly if you want to enable IPv6.\n"
330 else
331 # delete inet_protocols setting. there is already one in /etc/postfix
332 sed -i -e /inet_protocols/d "${D}"/etc/postfix/main.cf || die
333 fi
334 fi
335 }
336 }
337
338 pkg_postinst() {
339 # Do not install server.{key,pem) SSL certificates if they already exist
340 if use ssl && [[ ! -f "${ROOT}"/etc/ssl/postfix/server.key \
341 && ! -f "${ROOT}"/etc/ssl/postfix/server.pem ]] ; then
342 SSL_ORGANIZATION="${SSL_ORGANIZATION:-Postfix SMTP Server}"
343 install_cert /etc/ssl/postfix/server
344 chown postfix:mail "${ROOT}"/etc/ssl/postfix/server.{key,pem}
345 fi
346
347 if [[ ! -e /etc/mail/aliases.db ]] ; then
348 ewarn
349 ewarn "You must edit /etc/mail/aliases to suit your needs"
350 ewarn "and then run /usr/bin/newaliases. Postfix will not"
351 ewarn "work correctly without it."
352 ewarn
353 fi
354
355 if [[ $(get_version_component_range 2 ${REPLACING_VERSIONS}) -lt 9 ]]; then
356 elog "If you are using old style postfix instances by symlinking"
357 elog "startup scripts in ${ROOT}etc/init.d, please consider"
358 elog "upgrading your config for postmulti support. For more info:"
359 elog "http://www.postfix.org/MULTI_INSTANCE_README.html"
360 if ! use berkdb; then
361 ewarn "\nPostfix is installed without BerkeleyDB support."
362 ewarn "Please turn on berkdb USE flag if you need hash or"
363 ewarn "btree table lookups.\n"
364 fi
365 ewarn "Postfix daemons now live under /usr/libexec/postfix"
366 ewarn "Please adjust your main.cf accordingly by running"
367 ewarn "etc-update/dispatch-conf or similar and accepting the new"
368 ewarn "daemon_directory setting."
369 fi
370 }