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