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_pre20140531.ebuild ChangeLog postfix-2.12_pre20140516.ebuild
Date: Sat, 07 Jun 2014 19:57:48
Message-Id: 20140607195741.D1BB32004E@flycatcher.gentoo.org
1 eras 14/06/07 19:57:41
2
3 Modified: ChangeLog
4 Added: postfix-2.12_pre20140531.ebuild
5 Removed: postfix-2.12_pre20140516.ebuild
6 Log:
7 Version bump
8
9 (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 0x77F1F175586A3B1F)
10
11 Revision Changes Path
12 1.505 mail-mta/postfix/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/ChangeLog?rev=1.505&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/ChangeLog?rev=1.505&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/ChangeLog?r1=1.504&r2=1.505
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v
21 retrieving revision 1.504
22 retrieving revision 1.505
23 diff -u -r1.504 -r1.505
24 --- ChangeLog 17 May 2014 05:03:27 -0000 1.504
25 +++ ChangeLog 7 Jun 2014 19:57:41 -0000 1.505
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.504 2014/05/17 05:03:27 eras Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.505 2014/06/07 19:57:41 eras Exp $
31 +
32 +*postfix-2.12_pre20140531 (07 Jun 2014)
33 +
34 + 07 Jun 2014; Eray Aslan <eras@g.o> +postfix-2.12_pre20140531.ebuild,
35 + -postfix-2.12_pre20140516.ebuild:
36 + Version bump
37
38 *postfix-2.12_pre20140516 (17 May 2014)
39
40
41
42
43 1.1 mail-mta/postfix/postfix-2.12_pre20140531.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/postfix-2.12_pre20140531.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/postfix-2.12_pre20140531.ebuild?rev=1.1&content-type=text/plain
47
48 Index: postfix-2.12_pre20140531.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_pre20140531.ebuild,v 1.1 2014/06/07 19:57:41 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 for name in CDB LDAP LMDB MYSQL PCRE PGSQL SDBM SQLITE
132 do
133 local AUXLIBS_${name}=""
134 done
135
136 # Make sure LDFLAGS get passed down to the executables.
137 local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -ldl"
138 AUXLIBS_PCRE="$(pcre-config --libs)"
139
140 use pam && mylibs="${mylibs} -lpam"
141
142 if use ldap; then
143 mycc="${mycc} -DHAS_LDAP"
144 AUXLIBS_LDAP="-lldap -llber"
145 fi
146
147 if use mysql; then
148 mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)"
149 AUXLIBS_MYSQL="$(mysql_config --libs)"
150 fi
151
152 if use postgres; then
153 mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)"
154 AUXLIBS_PGSQL="-L$(pg_config --libdir) -lpq"
155 fi
156
157 if use sqlite; then
158 mycc="${mycc} -DHAS_SQLITE"
159 AUXLIBS_SQLITE="-lsqlite3 -lpthread"
160 fi
161
162 if use ssl; then
163 mycc="${mycc} -DUSE_TLS"
164 mylibs="${mylibs} -lssl -lcrypto"
165 fi
166
167 if use lmdb; then
168 mycc="${mycc} -DHAS_LMDB"
169 AUXLIBS_LMDB="-llmdb -lpthread"
170 fi
171
172 # broken. and "in other words, not supported" by upstream.
173 # Use inet_protocols setting in main.cf
174 #if ! use ipv6; then
175 # mycc="${mycc} -DNO_IPV6"
176 #fi
177
178 if use sasl; then
179 if use dovecot-sasl; then
180 # Set dovecot as default.
181 mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\""
182 fi
183 if use ldap-bind; then
184 mycc="${mycc} -DUSE_LDAP_SASL"
185 fi
186 mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl"
187 mylibs="${mylibs} -lsasl2"
188 elif use dovecot-sasl; then
189 mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\""
190 fi
191
192 if ! use nis; then
193 mycc="${mycc} -DNO_NIS"
194 fi
195
196 if ! use berkdb; then
197 mycc="${mycc} -DNO_DB"
198 if use cdb; then
199 # change default hash format from Berkeley DB to cdb
200 mycc="${mycc} -DDEF_DB_TYPE=\\\"cdb\\\""
201 fi
202 fi
203
204 if use cdb; then
205 mycc="${mycc} -DHAS_CDB -I/usr/include/cdb"
206 # Tinycdb is preferred.
207 if has_version dev-db/tinycdb ; then
208 einfo "Building with dev-db/tinycdb"
209 AUXLIBS_CDB="-lcdb"
210 else
211 einfo "Building with dev-db/cdb"
212 CDB_PATH="/usr/$(get_libdir)"
213 for i in cdb.a alloc.a buffer.a unix.a byte.a ; do
214 AUXLIBS_CDB="${AUXLIBS_CDB} ${CDB_PATH}/${i}"
215 done
216 fi
217 fi
218
219 # Robin H. Johnson <robbat2@g.o> 17/Nov/2006
220 # Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check.
221 mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
222 filter-lfs-flags
223
224 # Workaround for bug #76512
225 if use hardened; then
226 [[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os
227 fi
228
229 # Remove annoying C++ comment style warnings - bug #378099
230 append-flags -Wno-comment
231
232 sed -i -e "/^RANLIB/s/ranlib/$(tc-getRANLIB)/g" "${S}"/makedefs
233 sed -i -e "/^AR/s/ar/$(tc-getAR)/g" "${S}"/makedefs
234
235 emake makefiles shared=yes shlib_directory="/usr/$(get_libdir)" dynamicmaps=no \
236 DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" \
237 AUXLIBS_CDB="${AUXLIBS_CDB}" AUXLIBS_LDAP="${AUXLIBS_LDAP}" \
238 AUXLIBS_LMDB="${AUXLIBS_LMDB}" AUXLIBS_MYSQL="${AUXLIBS_MYSQL}" \
239 AUXLIBS_PCRE="${AUXLIBS_PCRE}" AUXLIBS_PGSQL="${AUXLIBS_PGSQL}" \
240 AUXLIBS_SQLITE="${AUXLIBS_SQLITE}"
241 }
242
243 src_install () {
244 local myconf
245 use doc && myconf="readme_directory=\"/usr/share/doc/${PF}/readme\" \
246 html_directory=\"/usr/share/doc/${PF}/html\""
247
248 LD_LIBRARY_PATH="${S}/lib" \
249 /bin/sh postfix-install \
250 -non-interactive \
251 install_root="${D}" \
252 config_directory="/etc/postfix" \
253 manpage_directory="/usr/share/man" \
254 command_directory="/usr/sbin" \
255 mailq_path="/usr/bin/mailq" \
256 newaliases_path="/usr/bin/newaliases" \
257 sendmail_path="/usr/sbin/sendmail" \
258 ${myconf} \
259 || die "postfix-install failed"
260
261 # Fix spool removal on upgrade
262 rm -Rf "${D}"/var
263 keepdir /var/spool/postfix
264
265 # Install rmail for UUCP, closes bug #19127
266 dobin auxiliary/rmail/rmail
267
268 # Provide another link for legacy FSH
269 dosym /usr/sbin/sendmail /usr/$(get_libdir)/sendmail
270
271 # Install qshape tool and posttls-finger
272 dobin auxiliary/qshape/qshape.pl
273 doman man/man1/qshape.1
274 dobin bin/posttls-finger
275 doman man/man1/posttls-finger.1
276
277 # Performance tuning tools and their manuals
278 dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink}
279 doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1
280
281 # Set proper permissions on required files/directories
282 dodir /var/lib/postfix
283 keepdir /var/lib/postfix
284 fowners -R postfix:postfix /var/lib/postfix
285 fperms 0750 /var/lib/postfix
286 fowners root:postdrop /usr/sbin/post{drop,queue}
287 fperms 02711 /usr/sbin/post{drop,queue}
288
289 keepdir /etc/postfix
290 if use mbox; then
291 mypostconf="mail_spool_directory=/var/spool/mail"
292 else
293 mypostconf="home_mailbox=.maildir/"
294 fi
295 LD_LIBRARY_PATH="${S}/lib" \
296 "${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \
297 -e ${mypostconf} || die "postconf failed"
298
299 insinto /etc/postfix
300 newins "${FILESDIR}"/smtp.pass saslpass
301 fperms 600 /etc/postfix/saslpass
302
303 newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix
304 # do not start mysql/postgres unnecessarily - bug #359913
305 use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix"
306 use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix"
307
308 dodoc *README COMPATIBILITY HISTORY PORTING RELEASE_NOTES*
309 mv "${D}"/etc/postfix/{*.default,makedefs.out} "${D}"/usr/share/doc/${PF}/
310 use doc && mv "${S}"/examples "${D}"/usr/share/doc/${PF}/
311
312 pamd_mimic_system smtp auth account
313
314 if use sasl; then
315 insinto /etc/sasl2
316 newins "${FILESDIR}"/smtp.sasl smtpd.conf
317 fi
318
319 # header files
320 insinto /usr/include/postfix
321 doins include/*.h
322
323 # Remove unnecessary files
324 rm -f "${D}"/etc/postfix/{*LICENSE,access,aliases,canonical,generic}
325 rm -f "${D}"/etc/postfix/{header_checks,relocated,transport,virtual}
326
327 systemd_dounit "${FILESDIR}/${PN}.service"
328 }
329
330 pkg_postinst() {
331 # Do not install server.{key,pem) SSL certificates if they already exist
332 if use ssl && [[ ! -f "${ROOT}"/etc/ssl/postfix/server.key \
333 && ! -f "${ROOT}"/etc/ssl/postfix/server.pem ]] ; then
334 SSL_ORGANIZATION="${SSL_ORGANIZATION:-Postfix SMTP Server}"
335 install_cert /etc/ssl/postfix/server
336 chown postfix:mail "${ROOT}"/etc/ssl/postfix/server.{key,pem}
337 fi
338
339 if [[ ! -e /etc/mail/aliases.db ]] ; then
340 ewarn
341 ewarn "You must edit /etc/mail/aliases to suit your needs"
342 ewarn "and then run /usr/bin/newaliases. Postfix will not"
343 ewarn "work correctly without it."
344 ewarn
345 fi
346
347 if [[ $(get_version_component_range 2 ${REPLACING_VERSIONS}) -lt 9 ]]; then
348 elog "If you are using old style postfix instances by symlinking"
349 elog "startup scripts in ${ROOT}etc/init.d, please consider"
350 elog "upgrading your config for postmulti support. For more info:"
351 elog "http://www.postfix.org/MULTI_INSTANCE_README.html"
352 if ! use berkdb; then
353 ewarn "\nPostfix is installed without BerkeleyDB support."
354 ewarn "Please turn on berkdb USE flag if you need hash or"
355 ewarn "btree table lookups.\n"
356 fi
357 ewarn "Postfix daemons now live under /usr/libexec/postfix"
358 ewarn "Please adjust your main.cf accordingly by running"
359 ewarn "etc-update/dispatch-conf or similar and accepting the new"
360 ewarn "daemon_directory setting."
361 fi
362 }