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.5.5-r1.ebuild
Date: Sat, 27 Dec 2008 19:49:32
Message-Id: E1LGfA9-0007fJ-Oe@stork.gentoo.org
1 dertobi123 08/12/27 19:49:29
2
3 Modified: ChangeLog
4 Added: postfix-2.5.5-r1.ebuild
5 Log:
6 Revbump, update VDA patch (#239461)
7 (Portage version: 2.2_rc19/cvs/Linux 2.6.25-gentoo-r7 x86_64)
8
9 Revision Changes Path
10 1.179 mail-mta/postfix/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-mta/postfix/ChangeLog?rev=1.179&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-mta/postfix/ChangeLog?rev=1.179&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-mta/postfix/ChangeLog?r1=1.178&r2=1.179
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v
19 retrieving revision 1.178
20 retrieving revision 1.179
21 diff -u -r1.178 -r1.179
22 --- ChangeLog 29 Nov 2008 16:36:12 -0000 1.178
23 +++ ChangeLog 27 Dec 2008 19:49:29 -0000 1.179
24 @@ -1,6 +1,12 @@
25 # ChangeLog for mail-mta/postfix
26 # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.178 2008/11/29 16:36:12 dertobi123 Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.179 2008/12/27 19:49:29 dertobi123 Exp $
29 +
30 +*postfix-2.5.5-r1 (27 Dec 2008)
31 +
32 + 27 Dec 2008; Tobias Scherbaum <dertobi123@g.o>
33 + +postfix-2.5.5-r1.ebuild:
34 + Revbump, update VDA patch (#239461)
35
36 29 Nov 2008; Tobias Scherbaum <dertobi123@g.o>
37 -files/postfix-2.0.9-get-FQDN.patch,
38
39
40
41 1.1 mail-mta/postfix/postfix-2.5.5-r1.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-mta/postfix/postfix-2.5.5-r1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-mta/postfix/postfix-2.5.5-r1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: postfix-2.5.5-r1.ebuild
47 ===================================================================
48 # Copyright 1999-2008 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/postfix-2.5.5-r1.ebuild,v 1.1 2008/12/27 19:49:29 dertobi123 Exp $
51
52 # NOTE: this ebuild is a regular ebuild without mailer-config support!
53 # Comment lines below "regular ebuild" and uncomment lines below "mailer-config support"
54 # to turn this ebuild to a mailer-config enabled ebuild.
55
56 # regular ebuild
57 inherit eutils multilib ssl-cert toolchain-funcs flag-o-matic pam
58 # mailer-config support
59 #inherit eutils multilib ssl-cert toolchain-funcs flag-o-matic mailer pam
60
61 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
62
63 # regular ebuild
64 IUSE="cdb dovecot-sasl hardened ipv6 ldap mailwrapper mbox mysql nis pam postgres sasl selinux ssl vda"
65 # mailer-config support
66 #IUSE="cdb dovecot-sasl hardened ipv6 ldap mbox mysql nis pam postgres sasl selinux ssl vda"
67
68 MY_PV="${PV/_rc/-RC}"
69 MY_SRC="${PN}-${MY_PV}"
70 MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official"
71 VDA_PV="2.5.5"
72 VDA_P="${PN}-${VDA_PV}-vda-ng"
73 RC_VER="2.5"
74
75 DESCRIPTION="A fast and secure drop-in replacement for sendmail."
76 HOMEPAGE="http://www.postfix.org/"
77 SRC_URI="${MY_URI}/${MY_SRC}.tar.gz
78 vda? ( http://vda.sourceforge.net/VDA/${VDA_P}.patch.gz ) "
79
80 LICENSE="IPL-1"
81 SLOT="0"
82
83 # regular ebuild
84 PROVIDE="virtual/mta virtual/mda"
85 # mailer-config support
86 #PROVIDE="${PROVIDE} virtual/mda"
87
88 DEPEND=">=sys-libs/db-3.2
89 >=dev-libs/libpcre-3.4
90 cdb? ( || ( >=dev-db/cdb-0.75-r1 >=dev-db/tinycdb-0.76 ) )
91 ldap? ( >=net-nds/openldap-1.2 )
92 mysql? ( virtual/mysql )
93 pam? ( virtual/pam )
94 postgres? ( virtual/postgresql-base )
95 sasl? ( >=dev-libs/cyrus-sasl-2 )
96 ssl? ( >=dev-libs/openssl-0.9.6g )"
97
98 # regular ebuild
99 RDEPEND="${DEPEND}
100 >=net-mail/mailbase-0.00
101 !mailwrapper? (
102 !virtual/mta
103 !net-mail/mailwrapper
104 )
105 mailwrapper? ( >=net-mail/mailwrapper-0.2 )
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 [[ "$(gcc-version)" == "3.4" ]] && use hardened && replace-flags -O? -Os
301
302 make DEBUG="" CC="${my_cc:=gcc}" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" \
303 makefiles || die "configure problem"
304
305 emake || die "compile problem"
306 }
307
308 src_install () {
309 /bin/sh postfix-install \
310 -non-interactive \
311 install_root="${D}" \
312 config_directory="/usr/share/doc/${PF}/defaults" \
313 readme_directory="/usr/share/doc/${PF}/readme" \
314 || die "postfix-install failed"
315
316 # Fix spool removal on upgrade
317 rm -Rf "${D}/var"
318 keepdir /var/spool/postfix
319
320 # Install rmail for UUCP, closes bug #19127
321 dobin auxiliary/rmail/rmail
322
323 # mailwrapper stuff
324 if use mailwrapper ; then
325 mv "${D}/usr/sbin/sendmail" "${D}/usr/sbin/sendmail.postfix"
326 mv "${D}/usr/bin/rmail" "${D}/usr/bin/rmail.postfix"
327 # mailer-config support
328 #rm "${D}/usr/bin/mailq" "${D}/usr/bin/newaliases"
329
330 mv "${D}/usr/share/man/man1/sendmail.1" \
331 "${D}/usr/share/man/man1/sendmail-postfix.1"
332 mv "${D}/usr/share/man/man1/newaliases.1" \
333 "${D}/usr/share/man/man1/newaliases-postfix.1"
334 mv "${D}/usr/share/man/man1/mailq.1" \
335 "${D}/usr/share/man/man1/mailq-postfix.1"
336 mv "${D}/usr/share/man/man5/aliases.5" \
337 "${D}/usr/share/man/man5/aliases-postfix.5"
338
339 # regular ebuild
340 insinto /etc/mail
341 doins "${FILESDIR}/mailer.conf"
342 # mailer-config support
343 #mailer_install_conf
344 else
345 # Provide another link for legacy FSH
346 dosym /usr/sbin/sendmail /usr/$(get_libdir)/sendmail
347 fi
348
349 # Install qshape tool
350 dobin auxiliary/qshape/qshape.pl
351 doman man/man1/qshape.1
352
353 # Performance tuning tools and their manuals
354 dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink}
355 doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1
356
357 # Set proper permissions on required files/directories
358 dodir /var/lib/postfix
359 keepdir /var/lib/postfix
360 fowners postfix:postfix /var/lib/postfix
361 fowners postfix:postfix /var/lib/postfix/.keep_${CATEGORY}_${PN}-${SLOT}
362 fperms 0750 /var/lib/postfix
363 fowners root:postdrop /usr/sbin/post{drop,queue}
364 fperms 02711 /usr/sbin/post{drop,queue}
365
366 keepdir /etc/postfix
367 mv "${D}"/usr/share/doc/${PF}/defaults/{*.cf,post*-*} "${D}"/etc/postfix
368 if use mbox ; then
369 mypostconf="mail_spool_directory=/var/spool/mail"
370 else
371 mypostconf="home_mailbox=.maildir/"
372 fi
373 "${D}/usr/sbin/postconf" -c "${D}/etc/postfix" \
374 -e ${mypostconf} || die "postconf failed"
375
376 insinto /etc/postfix
377 newins "${FILESDIR}/smtp.pass" saslpass
378 fperms 600 /etc/postfix/saslpass
379
380 newinitd "${FILESDIR}/postfix.rc6.${RC_VER}" postfix || die "newinitd failed"
381
382 mv "${S}/examples" "${D}/usr/share/doc/${PF}/"
383 dodoc *README COMPATIBILITY HISTORY INSTALL PORTING RELEASE_NOTES*
384 dohtml html/*
385
386 pamd_mimic_system smtp auth account
387
388 if use sasl ; then
389 insinto /etc/sasl2
390 newins "${FILESDIR}/smtp.sasl" smtpd.conf
391 fi
392 }
393
394 pkg_postinst() {
395 # Add postfix, postdrop user/group (bug #77565)
396 group_user_check || die "Failed to check/add needed user/group"
397
398 # Do not install server.{key,pem) SSL certificates if they already exist
399 if use ssl && [[ ! -f "${ROOT}"/etc/ssl/postfix/server.key \
400 && ! -f "${ROOT}"/etc/ssl/postfix/server.pem ]] ; then
401 SSL_ORGANIZATION="${SSL_ORGANIZATION:-Postfix SMTP Server}"
402 install_cert /etc/ssl/postfix/server
403 chown postfix:mail "${ROOT}"/etc/ssl/postfix/server.{key,pem}
404 fi
405
406 ebegin "Fixing queue directories and permissions"
407 "${ROOT}/etc/postfix/post-install" upgrade-permissions
408 echo
409 ewarn "If you upgraded from Postfix-1.x, you must revisit"
410 ewarn "your configuration files. See"
411 ewarn " /usr/share/doc/${PF}/RELEASE_NOTES"
412 ewarn "for a list of changes."
413
414 if [[ ! -e /etc/mail/aliases.db ]] ; then
415 echo
416 ewarn "You must edit /etc/mail/aliases to suit your needs"
417 ewarn "and then run /usr/bin/newaliases. Postfix will not"
418 ewarn "work correctly without it."
419 fi
420
421 # regular ebuild
422 if ! use mailwrapper && [[ -e /etc/mailer.conf ]] ; then
423 einfo
424 einfo "Since you emerged Postfix without mailwrapper in USE,"
425 einfo "you may want to 'emerge -C mailwrapper' now."
426 einfo
427 fi
428 # mailer-config support
429 #mailer_pkg_postinst
430 }