Gentoo Archives: gentoo-commits

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