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