Gentoo Archives: gentoo-commits

From: "Tobias Scherbaum (dertobi123)" <dertobi123@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in mail-mta/postfix: ChangeLog postfix-2.6.6.ebuild postfix-2.5.7.ebuild postfix-2.6.5-r1.ebuild postfix-2.5.9.ebuild postfix-2.5.5.ebuild
Date: Fri, 02 Apr 2010 17:20:43
Message-Id: E1NxkXv-00011Z-VE@stork.gentoo.org
1 dertobi123 10/04/02 17:20:39
2
3 Modified: ChangeLog
4 Added: postfix-2.6.6.ebuild
5 Removed: postfix-2.5.7.ebuild postfix-2.6.5-r1.ebuild
6 postfix-2.5.9.ebuild postfix-2.5.5.ebuild
7 Log:
8 Version bump
9 (Portage version: 2.2_rc67/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.204 mail-mta/postfix/ChangeLog
13
14 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-mta/postfix/ChangeLog?rev=1.204&view=markup
15 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-mta/postfix/ChangeLog?rev=1.204&content-type=text/plain
16 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-mta/postfix/ChangeLog?r1=1.203&r2=1.204
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v
21 retrieving revision 1.203
22 retrieving revision 1.204
23 diff -u -r1.203 -r1.204
24 --- ChangeLog 25 Feb 2010 22:18:02 -0000 1.203
25 +++ ChangeLog 2 Apr 2010 17:20:39 -0000 1.204
26 @@ -1,6 +1,13 @@
27 # ChangeLog for mail-mta/postfix
28 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.203 2010/02/25 22:18:02 robbat2 Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.204 2010/04/02 17:20:39 dertobi123 Exp $
31 +
32 +*postfix-2.6.6 (02 Apr 2010)
33 +
34 + 02 Apr 2010; Tobias Scherbaum <dertobi123@g.o>
35 + -postfix-2.5.5.ebuild, -postfix-2.5.7.ebuild, -postfix-2.5.9.ebuild,
36 + -postfix-2.6.5-r1.ebuild, +postfix-2.6.6.ebuild:
37 + Version bump
38
39 *postfix-2.6.5-r1 (25 Feb 2010)
40
41
42
43
44 1.1 mail-mta/postfix/postfix-2.6.6.ebuild
45
46 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-mta/postfix/postfix-2.6.6.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-mta/postfix/postfix-2.6.6.ebuild?rev=1.1&content-type=text/plain
48
49 Index: postfix-2.6.6.ebuild
50 ===================================================================
51 # Copyright 1999-2010 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 # $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/postfix-2.6.6.ebuild,v 1.1 2010/04/02 17:20:39 dertobi123 Exp $
54
55 # NOTE: this ebuild is a regular ebuild without mailer-config support!
56 # Comment lines below "regular ebuild" and uncomment lines below "mailer-config support"
57 # to turn this ebuild to a mailer-config enabled ebuild.
58
59 # regular ebuild
60 inherit eutils multilib ssl-cert toolchain-funcs flag-o-matic pam
61 # mailer-config support
62 #inherit eutils multilib ssl-cert toolchain-funcs flag-o-matic mailer pam
63
64 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
65
66 # regular ebuild
67 IUSE="cdb dovecot-sasl hardened ipv6 ldap mbox mysql nis pam postgres sasl selinux ssl vda"
68 # mailer-config support
69 #IUSE="cdb dovecot-sasl hardened ipv6 ldap mbox mysql nis pam postgres sasl selinux ssl vda"
70
71 MY_PV="${PV/_rc/-RC}"
72 MY_SRC="${PN}-${MY_PV}"
73 MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official"
74 VDA_PV="2.6.5"
75 VDA_P="${PN}-${VDA_PV}-vda-ng"
76 RC_VER="2.5"
77
78 DESCRIPTION="A fast and secure drop-in replacement for sendmail."
79 HOMEPAGE="http://www.postfix.org/"
80 SRC_URI="${MY_URI}/${MY_SRC}.tar.gz
81 vda? ( http://vda.sourceforge.net/VDA/${VDA_P}.patch.gz ) "
82
83 LICENSE="IBM"
84 SLOT="0"
85
86 # regular ebuild
87 PROVIDE="virtual/mta virtual/mda"
88 # mailer-config support
89 #PROVIDE="${PROVIDE} virtual/mda"
90
91 DEPEND=">=sys-libs/db-3.2
92 >=dev-libs/libpcre-3.4
93 cdb? ( || ( >=dev-db/cdb-0.75-r1 >=dev-db/tinycdb-0.76 ) )
94 ldap? ( >=net-nds/openldap-1.2 )
95 mysql? ( virtual/mysql )
96 pam? ( virtual/pam )
97 postgres? ( virtual/postgresql-base )
98 sasl? ( >=dev-libs/cyrus-sasl-2 )
99 ssl? ( >=dev-libs/openssl-0.9.6g )"
100
101 # regular ebuild
102 RDEPEND="${DEPEND}
103 >=net-mail/mailbase-0.00
104 !virtual/mta
105 !net-mail/mailwrapper
106 selinux? ( sec-policy/selinux-postfix )"
107
108 # mailer-config support
109 #RDEPEND="${DEPEND}
110 # >=net-mail/mailbase-0.00
111 # selinux? ( sec-policy/selinux-postfix )"
112
113 S="${WORKDIR}/${MY_SRC}"
114
115 group_user_check() {
116 einfo "Checking for postfix group ..."
117 enewgroup postfix 207
118 einfo "Checking for postdrop group ..."
119 enewgroup postdrop 208
120 einfo "Checking for postfix user ..."
121 enewuser postfix 207 -1 /var/spool/postfix postfix,mail
122 }
123
124 pkg_setup() {
125 # Do not upgrade live from Postfix <2.5
126 if [[ -f /var/lib/init.d/started/postfix ]] ; then
127 if has_version '<mail-mta/postfix-2.5.0' ; then
128 if [[ "${FORCE_UPGRADE}" ]] ; then
129 echo
130 ewarn "You are upgrading from an incompatible version and you have"
131 ewarn "FORCE_UPGRADE set, will build this package while Postfix is running."
132 ewarn "You MUST stop Postfix BEFORE installing this version to your system."
133 echo
134 else
135 echo
136 eerror "You are upgrading from an incompatible version."
137 eerror "You MUST stop Postfix BEFORE installing this version to your system."
138 eerror "If you want minimal downtime, emerge postfix with:"
139 eerror " FORCE_UPGRADE=1 emerge --buildpkgonly postfix"
140 eerror " /etc/init.d/postfix stop"
141 eerror " emerge --usepkgonly postfix"
142 eerror "Then run etc-update or dispatch-conf and merge the configuration files."
143 eerror "Then restart Postfix with: /etc/init.d/postfix start"
144 die "Upgrade from an incompatible version!"
145 echo
146 fi
147 else
148 echo
149 ewarn "It's safe to upgrade your current version while it's running."
150 ewarn "If you don't want to take any chance, please hit Ctrl+C now,"
151 ewarn "stop Postfix, then emerge again."
152 ewarn "You have been warned!"
153 ewarn "Waiting 5 seconds before continuing ..."
154 echo
155 epause 5
156 fi
157 fi
158
159 echo
160 ewarn "Read \"ftp://ftp.porcupine.org/mirrors/postfix-release/official/${MY_SRC}.RELEASE_NOTES\""
161 ewarn "for incompatible changes before continueing."
162 ewarn "Bugs should be filed at \"http://bugs.gentoo.org/\" and"
163 ewarn "assigned to \"net-mail@g.o\"."
164 echo
165
166 # Warnings to work around bug #45764
167 if has_version '<=mail-mta/postfix-2.0.18' ; then
168 echo
169 ewarn "You are upgrading from postfix-2.0.18 or earlier, some of the empty queue"
170 ewarn "directories get deleted while unmerging the older version (see bug #45764)."
171 ewarn "Please run '/etc/postfix/post-install upgrade-source' to recreate them."
172 echo
173 fi
174
175 # TLS non-prod warning
176 if use ssl ; then
177 echo
178 ewarn "You have \"ssl\" in your USE flags, TLS will be enabled."
179 ewarn "This service is incompatible with the previous TLS patch."
180 ewarn "Visit http://www.postfix.org/TLS_README.html for more info."
181 echo
182 fi
183
184 # IPV6 non-prod warn
185 if use ipv6 ; then
186 echo
187 ewarn "You have \"ipv6\" in your USE flags, IPV6 will be enabled."
188 ewarn "Visit http://www.postfix.org/IPV6_README.html for more info."
189 echo
190 fi
191
192 # SASL non-prod warning
193 if use sasl ; then
194 echo
195 elog "Postfix 2.3 and newer supports two SASL implementations."
196 elog "Cyrus SASL and Dovecot protocol version 1 (server only)"
197 elog "Visit http://www.postfix.org/SASL_README.html for more info."
198 echo
199 fi
200
201 # Add postfix, postdrop user/group (bug #77565)
202 group_user_check || die "Failed to check/add needed user/group"
203 }
204
205 src_unpack() {
206 unpack ${A}
207
208 cd "${S}"
209 if use vda ; then
210 epatch "${WORKDIR}/${VDA_P}.patch"
211 fi
212
213 sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \
214 src/util/sys_defs.h || die "sed failed"
215
216 # change default paths to better comply with portage standard paths
217 sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed"
218 }
219
220 src_compile() {
221 # 1) Added -Wl,-z,now wrt bug #62674
222 # 2) Remove -ldl as it is not necessary, solves bug #106446
223 # 3) -Wl,-z,now replaced by $(bindnow-flags)
224 # 4) Then bindnow-flags has been simply dropped according to
225 # http://www.mail-archive.com/gentoo-dev@l.g.o/msg23679.html
226 # 5) Make sure LDFLAGS get passed down to the executables.
227 local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -lpcre -lcrypt -lpthread"
228
229 use pam && mylibs="${mylibs} -lpam"
230
231 if use ldap ; then
232 mycc="${mycc} -DHAS_LDAP"
233 mylibs="${mylibs} -lldap -llber"
234 fi
235
236 if use mysql ; then
237 mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)"
238 mylibs="${mylibs} -lmysqlclient -lm -lz"
239 fi
240
241 if use postgres ; then
242 mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)"
243 mylibs="${mylibs} -lpq -L$(pg_config --libdir)"
244 fi
245
246 if use ssl ; then
247 mycc="${mycc} -DUSE_TLS"
248 mylibs="${mylibs} -lssl -lcrypto"
249 fi
250
251 if use sasl ; then
252 if use dovecot-sasl ; then
253 # Set dovecot as default.
254 mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\""
255 fi
256 mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl"
257 mylibs="${mylibs} -lsasl2"
258 elif use dovecot-sasl ; then
259 mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\""
260 fi
261
262 if ! use nis ; then
263 sed -i -e "s|#define HAS_NIS|//#define HAS_NIS|g" \
264 src/util/sys_defs.h || die "sed failed"
265 fi
266
267 if use cdb ; then
268 mycc="${mycc} -DHAS_CDB"
269 CDB_LIBS=""
270
271 # Tinycdb is preferred.
272 if has_version dev-db/tinycdb ; then
273 einfo "Building with dev-db/tinycdb"
274 CDB_LIBS="-lcdb"
275 else
276 einfo "Building with dev-db/cdb"
277 CDB_PATH="/usr/$(get_libdir)"
278 for i in cdb.a alloc.a buffer.a unix.a byte.a ; do
279 CDB_LIBS="${CDB_LIBS} ${CDB_PATH}/${i}"
280 done
281 fi
282
283 mylibs="${mylibs} ${CDB_LIBS}"
284 fi
285
286 mycc="${mycc} -DDEF_DAEMON_DIR=\\\"/usr/$(get_libdir)/postfix\\\""
287 mycc="${mycc} -DDEF_MANPAGE_DIR=\\\"/usr/share/man\\\""
288 mycc="${mycc} -DDEF_README_DIR=\\\"/usr/share/doc/${PF}/readme\\\""
289 mycc="${mycc} -DDEF_HTML_DIR=\\\"/usr/share/doc/${PF}/html\\\""
290
291 # Robin H. Johnson <robbat2@g.o> 17/Nov/2006
292 # Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check.
293 mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
294 filter-lfs-flags
295
296 local my_cc=$(tc-getCC)
297 einfo "CC=${my_cc:=gcc}"
298
299 # Workaround for bug #76512
300 if use hardened ; then
301 [[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os
302 fi
303
304 make DEBUG="" CC="${my_cc:=gcc}" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" \
305 makefiles || die "configure problem"
306
307 emake || die "compile problem"
308 }
309
310 src_install () {
311 /bin/sh postfix-install \
312 -non-interactive \
313 install_root="${D}" \
314 config_directory="/usr/share/doc/${PF}/defaults" \
315 readme_directory="/usr/share/doc/${PF}/readme" \
316 || die "postfix-install failed"
317
318 # Fix spool removal on upgrade
319 rm -Rf "${D}/var"
320 keepdir /var/spool/postfix
321
322 # Install rmail for UUCP, closes bug #19127
323 dobin auxiliary/rmail/rmail
324
325 # Provide another link for legacy FSH
326 dosym /usr/sbin/sendmail /usr/$(get_libdir)/sendmail
327
328 # Install qshape tool
329 dobin auxiliary/qshape/qshape.pl
330 doman man/man1/qshape.1
331
332 # Performance tuning tools and their manuals
333 dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink}
334 doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1
335
336 # Set proper permissions on required files/directories
337 dodir /var/lib/postfix
338 keepdir /var/lib/postfix
339 fowners postfix:postfix /var/lib/postfix
340 fowners postfix:postfix /var/lib/postfix/.keep_${CATEGORY}_${PN}-${SLOT}
341 fperms 0750 /var/lib/postfix
342 fowners root:postdrop /usr/sbin/post{drop,queue}
343 fperms 02711 /usr/sbin/post{drop,queue}
344
345 keepdir /etc/postfix
346 mv "${D}"/usr/share/doc/${PF}/defaults/*.cf "${D}"/etc/postfix
347 if use mbox ; then
348 mypostconf="mail_spool_directory=/var/spool/mail"
349 else
350 mypostconf="home_mailbox=.maildir/"
351 fi
352 "${D}/usr/sbin/postconf" -c "${D}/etc/postfix" \
353 -e ${mypostconf} || die "postconf failed"
354
355 insinto /etc/postfix
356 newins "${FILESDIR}/smtp.pass" saslpass
357 fperms 600 /etc/postfix/saslpass
358
359 newinitd "${FILESDIR}/postfix.rc6.${RC_VER}" postfix || die "newinitd failed"
360
361 mv "${S}/examples" "${D}/usr/share/doc/${PF}/"
362 dodoc *README COMPATIBILITY HISTORY INSTALL PORTING RELEASE_NOTES*
363 dohtml html/*
364
365 pamd_mimic_system smtp auth account
366
367 if use sasl ; then
368 insinto /etc/sasl2
369 newins "${FILESDIR}/smtp.sasl" smtpd.conf
370 fi
371 }
372
373 pkg_postinst() {
374 # Add postfix, postdrop user/group (bug #77565)
375 group_user_check || die "Failed to check/add needed user/group"
376
377 # Do not install server.{key,pem) SSL certificates if they already exist
378 if use ssl && [[ ! -f "${ROOT}"/etc/ssl/postfix/server.key \
379 && ! -f "${ROOT}"/etc/ssl/postfix/server.pem ]] ; then
380 SSL_ORGANIZATION="${SSL_ORGANIZATION:-Postfix SMTP Server}"
381 install_cert /etc/ssl/postfix/server
382 chown postfix:mail "${ROOT}"/etc/ssl/postfix/server.{key,pem}
383 fi
384
385 ebegin "Fixing queue directories and permissions"
386 "${ROOT}/usr/$(get_libdir)/postfix/post-install" upgrade-permissions \
387 daemon_directory=${ROOT}/usr/$(get_libdir)/postfix
388 echo
389 ewarn "If you upgraded from Postfix-1.x, you must revisit"
390 ewarn "your configuration files. See"
391 ewarn " /usr/share/doc/${PF}/RELEASE_NOTES"
392 ewarn "for a list of changes."
393
394 if [[ ! -e /etc/mail/aliases.db ]] ; then
395 echo
396 ewarn "You must edit /etc/mail/aliases to suit your needs"
397 ewarn "and then run /usr/bin/newaliases. Postfix will not"
398 ewarn "work correctly without it."
399 fi
400
401 if [[ -e /etc/mailer.conf ]] ; then
402 einfo
403 einfo "mailwrapper support is discontinued."
404 einfo "You may want to 'emerge -C mailwrapper' now."
405 einfo
406 fi
407 }