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