1 |
chtekk 07/11/26 12:09:05 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: postfix-2.4.6-r1.ebuild |
5 |
Removed: postfix-2.4.6.ebuild |
6 |
Log: |
7 |
Fix VDA-NG with quota=0 and mailboxes. |
8 |
(Portage version: 2.1.4_rc3) |
9 |
|
10 |
Revision Changes Path |
11 |
1.141 mail-mta/postfix/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-mta/postfix/ChangeLog?rev=1.141&view=markup |
14 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-mta/postfix/ChangeLog?rev=1.141&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-mta/postfix/ChangeLog?r1=1.140&r2=1.141 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v |
20 |
retrieving revision 1.140 |
21 |
retrieving revision 1.141 |
22 |
diff -u -r1.140 -r1.141 |
23 |
--- ChangeLog 25 Nov 2007 17:21:16 -0000 1.140 |
24 |
+++ ChangeLog 26 Nov 2007 12:09:04 -0000 1.141 |
25 |
@@ -1,6 +1,12 @@ |
26 |
# ChangeLog for mail-mta/postfix |
27 |
# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.140 2007/11/25 17:21:16 chtekk Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.141 2007/11/26 12:09:04 chtekk Exp $ |
30 |
+ |
31 |
+*postfix-2.4.6-r1 (26 Nov 2007) |
32 |
+ |
33 |
+ 26 Nov 2007; Luca Longinotti <chtekk@g.o> -postfix-2.4.6.ebuild, |
34 |
+ +postfix-2.4.6-r1.ebuild: |
35 |
+ Fix VDA-NG with quota=0 and mailboxes. |
36 |
|
37 |
*postfix-2.4.6 (25 Nov 2007) |
38 |
|
39 |
|
40 |
|
41 |
|
42 |
1.1 mail-mta/postfix/postfix-2.4.6-r1.ebuild |
43 |
|
44 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-mta/postfix/postfix-2.4.6-r1.ebuild?rev=1.1&view=markup |
45 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-mta/postfix/postfix-2.4.6-r1.ebuild?rev=1.1&content-type=text/plain |
46 |
|
47 |
Index: postfix-2.4.6-r1.ebuild |
48 |
=================================================================== |
49 |
# Copyright 1999-2007 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.4.6-r1.ebuild,v 1.1 2007/11/26 12:09:04 chtekk 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 mailwrapper 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_P="${P}-vda-ng-r2" |
73 |
RC_VER="2.2.9" |
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://gentoo.longitekk.com/${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? ( >=dev-db/postgresql-7.1 ) |
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? ( !virtual/mta ) |
102 |
mailwrapper? ( >=net-mail/mailwrapper-0.2 ) |
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.4 |
123 |
if [[ -f /var/lib/init.d/started/postfix ]] ; then |
124 |
if has_version '<mail-mta/postfix-2.4.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 |
cd "${S}" |
205 |
|
206 |
if use vda ; then |
207 |
epatch "${WORKDIR}/${VDA_P}.patch" |
208 |
fi |
209 |
|
210 |
sed -i -e "/^#define ALIAS_DB_MAP/s|hash:/etc/aliases|hash:/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 |
cd "${S}" |
219 |
|
220 |
# Added -Wl,-z,now wrt bug #62674 |
221 |
# Remove -ldl as it is not necessary, solves bug #106446 |
222 |
# -Wl,-z,now replaced by $(bindnow-flags) |
223 |
# make sure LDFLAGS get passed down to the executables. |
224 |
local mycc="-DHAS_PCRE" mylibs="$(bindnow-flags) ${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 -I/usr/include/mysql" |
235 |
mylibs="${mylibs} -lmysqlclient -lm -lz" |
236 |
fi |
237 |
|
238 |
if use postgres ; then |
239 |
if best_version '=dev-db/postgresql-7.3*' ; then |
240 |
mycc="${mycc} -DHAS_PGSQL -I/usr/include/postgresql" |
241 |
else |
242 |
mycc="${mycc} -DHAS_PGSQL -I/usr/include/postgresql/pgsql" |
243 |
fi |
244 |
mylibs="${mylibs} -lpq" |
245 |
fi |
246 |
|
247 |
if use ssl ; then |
248 |
mycc="${mycc} -DUSE_TLS" |
249 |
mylibs="${mylibs} -lssl -lcrypto" |
250 |
fi |
251 |
|
252 |
if use sasl ; then |
253 |
if use dovecot-sasl ; then |
254 |
# Set dovecot as default. |
255 |
mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\"" |
256 |
fi |
257 |
mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl" |
258 |
mylibs="${mylibs} -lsasl2" |
259 |
elif use dovecot-sasl ; then |
260 |
mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\"" |
261 |
fi |
262 |
|
263 |
if ! use nis ; then |
264 |
sed -i -e "s|#define HAS_NIS|//#define HAS_NIS|g" \ |
265 |
src/util/sys_defs.h || die "sed failed" |
266 |
fi |
267 |
|
268 |
if use cdb ; then |
269 |
mycc="${mycc} -DHAS_CDB" |
270 |
CDB_LIBS="" |
271 |
|
272 |
# Tinycdb is preferred. |
273 |
if has_version dev-db/tinycdb ; then |
274 |
einfo "Building with dev-db/tinycdb" |
275 |
CDB_LIBS="-lcdb" |
276 |
else |
277 |
einfo "Building with dev-db/cdb" |
278 |
CDB_PATH="/usr/$(get_libdir)" |
279 |
for i in cdb.a alloc.a buffer.a unix.a byte.a ; do |
280 |
CDB_LIBS="${CDB_LIBS} ${CDB_PATH}/${i}" |
281 |
done |
282 |
fi |
283 |
|
284 |
mylibs="${mylibs} ${CDB_LIBS}" |
285 |
fi |
286 |
|
287 |
mycc="${mycc} -DDEF_DAEMON_DIR=\\\"/usr/$(get_libdir)/postfix\\\"" |
288 |
mycc="${mycc} -DDEF_MANPAGE_DIR=\\\"/usr/share/man\\\"" |
289 |
mycc="${mycc} -DDEF_README_DIR=\\\"/usr/share/doc/${PF}/readme\\\"" |
290 |
mycc="${mycc} -DDEF_HTML_DIR=\\\"/usr/share/doc/${PF}/html\\\"" |
291 |
|
292 |
# Robin H. Johnson <robbat2@g.o> 17/Nov/2006 |
293 |
# Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check. |
294 |
mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" |
295 |
filter-lfs-flags |
296 |
|
297 |
local my_cc=$(tc-getCC) |
298 |
einfo "CC=${my_cc:=gcc}" |
299 |
|
300 |
# Workaround for bug #76512 |
301 |
[[ "$(gcc-version)" == "3.4" ]] && use hardened && replace-flags -O? -Os |
302 |
|
303 |
make DEBUG="" CC="${my_cc:=gcc}" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" \ |
304 |
makefiles || die "configure problem" |
305 |
|
306 |
emake || die "compile problem" |
307 |
} |
308 |
|
309 |
src_install () { |
310 |
/bin/sh postfix-install \ |
311 |
-non-interactive \ |
312 |
install_root="${D}" \ |
313 |
config_directory="/usr/share/doc/${PF}/defaults" \ |
314 |
readme_directory="/usr/share/doc/${PF}/readme" \ |
315 |
|| die "postfix-install failed" |
316 |
|
317 |
# Fix spool removal on upgrade |
318 |
rm -Rf "${D}/var" |
319 |
keepdir /var/spool/postfix |
320 |
|
321 |
# Install rmail for UUCP, closes bug #19127 |
322 |
dobin auxiliary/rmail/rmail |
323 |
|
324 |
# mailwrapper stuff |
325 |
if use mailwrapper ; then |
326 |
mv "${D}/usr/sbin/sendmail" "${D}/usr/sbin/sendmail.postfix" |
327 |
mv "${D}/usr/bin/rmail" "${D}/usr/bin/rmail.postfix" |
328 |
# mailer-config support |
329 |
#rm "${D}/usr/bin/mailq" "${D}/usr/bin/newaliases" |
330 |
|
331 |
mv "${D}/usr/share/man/man1/sendmail.1" \ |
332 |
"${D}/usr/share/man/man1/sendmail-postfix.1" |
333 |
mv "${D}/usr/share/man/man1/newaliases.1" \ |
334 |
"${D}/usr/share/man/man1/newaliases-postfix.1" |
335 |
mv "${D}/usr/share/man/man1/mailq.1" \ |
336 |
"${D}/usr/share/man/man1/mailq-postfix.1" |
337 |
mv "${D}/usr/share/man/man5/aliases.5" \ |
338 |
"${D}/usr/share/man/man5/aliases-postfix.5" |
339 |
|
340 |
# regular ebuild |
341 |
insinto /etc/mail |
342 |
doins "${FILESDIR}/mailer.conf" |
343 |
# mailer-config support |
344 |
#mailer_install_conf |
345 |
else |
346 |
# Provide another link for legacy FSH |
347 |
dosym /usr/sbin/sendmail /usr/$(get_libdir)/sendmail |
348 |
fi |
349 |
|
350 |
# Install qshape tool |
351 |
dobin auxiliary/qshape/qshape.pl |
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 |
fowners root:postdrop /usr/sbin/post{drop,queue} |
359 |
fperms 02711 /usr/sbin/post{drop,queue} |
360 |
|
361 |
keepdir /etc/postfix |
362 |
mv "${D}"/usr/share/doc/${PF}/defaults/{*.cf,post*-*} "${D}"/etc/postfix |
363 |
if use mbox ; then |
364 |
mypostconf="mail_spool_directory=/var/spool/mail" |
365 |
else |
366 |
mypostconf="home_mailbox=.maildir/" |
367 |
fi |
368 |
"${D}/usr/sbin/postconf" -c "${D}/etc/postfix" \ |
369 |
-e ${mypostconf} || die "postconf failed" |
370 |
|
371 |
insinto /etc/postfix |
372 |
newins "${FILESDIR}/smtp.pass" saslpass |
373 |
fperms 600 /etc/postfix/saslpass |
374 |
|
375 |
newinitd "${FILESDIR}/postfix.rc6.${RC_VER}" postfix || die "newinitd failed" |
376 |
|
377 |
mv "${S}/examples" "${D}/usr/share/doc/${PF}/" |
378 |
dodoc *README COMPATIBILITY HISTORY INSTALL LICENSE PORTING RELEASE_NOTES* |
379 |
dohtml html/* |
380 |
|
381 |
pamd_mimic_system smtp auth account |
382 |
|
383 |
# Do not install server.{key,pem) SSL certificates if they already exist |
384 |
if use ssl && [[ ! -f /etc/ssl/postfix/server.key && ! -f /etc/ssl/postfix/server.pem ]] ; then |
385 |
SSL_ORGANIZATION="${SSL_ORGANIZATION:-Postfix SMTP Server}" |
386 |
insinto /etc/ssl/postfix |
387 |
docert server |
388 |
fowners postfix:mail /etc/ssl/postfix/server.{key,pem} |
389 |
fi |
390 |
|
391 |
if use sasl ; then |
392 |
insinto /etc/sasl2 |
393 |
newins "${FILESDIR}/smtp.sasl" smtpd.conf |
394 |
fi |
395 |
} |
396 |
|
397 |
pkg_postinst() { |
398 |
# Add postfix, postdrop user/group (bug #77565) |
399 |
group_user_check || die "Failed to check/add needed user/group" |
400 |
|
401 |
ebegin "Fixing queue directories and permissions" |
402 |
"${ROOT}/etc/postfix/post-install" upgrade-permissions |
403 |
echo |
404 |
ewarn "If you upgraded from Postfix-1.x, you must revisit" |
405 |
ewarn "your configuration files. See" |
406 |
ewarn " /usr/share/doc/${PF}/RELEASE_NOTES" |
407 |
ewarn "for a list of changes." |
408 |
|
409 |
if [[ ! -e /etc/mail/aliases.db ]] ; then |
410 |
echo |
411 |
ewarn "You must edit /etc/mail/aliases to suit your needs" |
412 |
ewarn "and then run /usr/bin/newaliases. Postfix will not" |
413 |
ewarn "work correctly without it." |
414 |
fi |
415 |
|
416 |
# regular ebuild |
417 |
if ! use mailwrapper && [[ -e /etc/mailer.conf ]] ; then |
418 |
einfo |
419 |
einfo "Since you emerged Postfix without mailwrapper in USE," |
420 |
einfo "you may want to 'emerge -C mailwrapper' now." |
421 |
einfo |
422 |
fi |
423 |
# mailer-config support |
424 |
#mailer_pkg_postinst |
425 |
} |
426 |
|
427 |
|
428 |
|
429 |
-- |
430 |
gentoo-commits@g.o mailing list |