Gentoo Archives: gentoo-commits

From: "Eray Aslan (eras)" <eras@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in mail-mta/postfix: postfix-2.9_pre20120102.ebuild ChangeLog postfix-2.9_pre20111222.ebuild
Date: Fri, 06 Jan 2012 11:12:19
Message-Id: 20120106111204.6EB8C20033@flycatcher.gentoo.org
1 eras 12/01/06 11:12:04
2
3 Modified: ChangeLog
4 Added: postfix-2.9_pre20120102.ebuild
5 Removed: postfix-2.9_pre20111222.ebuild
6 Log:
7 version bump
8
9 (Portage version: 2.1.10.44/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.321 mail-mta/postfix/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/ChangeLog?rev=1.321&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/ChangeLog?rev=1.321&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/ChangeLog?r1=1.320&r2=1.321
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v
21 retrieving revision 1.320
22 retrieving revision 1.321
23 diff -u -r1.320 -r1.321
24 --- ChangeLog 4 Jan 2012 21:57:13 -0000 1.320
25 +++ ChangeLog 6 Jan 2012 11:12:04 -0000 1.321
26 @@ -1,6 +1,12 @@
27 # ChangeLog for mail-mta/postfix
28 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.320 2012/01/04 21:57:13 ranger Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.321 2012/01/06 11:12:04 eras Exp $
31 +
32 +*postfix-2.9_pre20120102 (06 Jan 2012)
33 +
34 + 06 Jan 2012; Eray Aslan <eras@g.o> -postfix-2.9_pre20111222.ebuild,
35 + +postfix-2.9_pre20120102.ebuild:
36 + version bump
37
38 04 Jan 2012; Brent Baude <ranger@g.o> postfix-2.8.7.ebuild:
39 Marking postfix-2.8.7 ppc for bug 395289
40
41
42
43 1.1 mail-mta/postfix/postfix-2.9_pre20120102.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/postfix-2.9_pre20120102.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/postfix-2.9_pre20120102.ebuild?rev=1.1&content-type=text/plain
47
48 Index: postfix-2.9_pre20120102.ebuild
49 ===================================================================
50 # Copyright 1999-2012 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/postfix-2.9_pre20120102.ebuild,v 1.1 2012/01/06 11:12:04 eras Exp $
53
54 EAPI=4
55
56 inherit eutils multilib ssl-cert toolchain-funcs flag-o-matic pam
57
58 MY_PV="${PV/_pre/-}"
59 MY_SRC="${PN}-${MY_PV}"
60 MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/experimental"
61 VDA_PV="2.8.5"
62 VDA_P="${PN}-vda-v10-${VDA_PV}"
63 RC_VER="2.6"
64
65 DESCRIPTION="A fast and secure drop-in replacement for sendmail."
66 HOMEPAGE="http://www.postfix.org/"
67 SRC_URI="${MY_URI}/${MY_SRC}.tar.gz
68 vda? ( http://vda.sourceforge.net/VDA/${VDA_P}.patch ) "
69
70 LICENSE="IBM"
71 SLOT="0"
72 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
73 IUSE="+berkdb cdb doc dovecot-sasl hardened ldap ldap-bind mbox mysql nis pam postgres sasl selinux sqlite ssl vda"
74
75 DEPEND=">=dev-libs/libpcre-3.4
76 dev-lang/perl
77 berkdb? ( >=sys-libs/db-3.2 )
78 cdb? ( || ( >=dev-db/tinycdb-0.76 >=dev-db/cdb-0.75-r1 ) )
79 ldap? ( net-nds/openldap )
80 ldap-bind? ( net-nds/openldap[sasl] )
81 mysql? ( virtual/mysql )
82 pam? ( virtual/pam )
83 postgres? ( dev-db/postgresql-base )
84 sasl? ( >=dev-libs/cyrus-sasl-2 )
85 sqlite? ( dev-db/sqlite:3 )
86 ssl? ( >=dev-libs/openssl-0.9.6g )"
87
88 RDEPEND="${DEPEND}
89 dovecot-sasl? ( net-mail/dovecot )
90 net-mail/mailbase
91 selinux? ( sec-policy/selinux-postfix )
92 !mail-mta/courier
93 !mail-mta/esmtp
94 !mail-mta/exim
95 !mail-mta/mini-qmail
96 !mail-mta/msmtp[mta]
97 !mail-mta/nbsmtp
98 !mail-mta/netqmail
99 !mail-mta/nullmailer
100 !mail-mta/qmail-ldap
101 !mail-mta/sendmail
102 !<mail-mta/ssmtp-2.64-r2
103 !>=mail-mta/ssmtp-2.64-r2[mta]
104 !net-mail/fastforward"
105
106 REQUIRED_USE="ldap-bind? ( ldap sasl )"
107
108 S="${WORKDIR}/${MY_SRC}"
109
110 pkg_setup() {
111 # Add postfix, postdrop user/group (bug #77565)
112 enewgroup postfix 207
113 enewgroup postdrop 208
114 enewuser postfix 207 -1 /var/spool/postfix postfix,mail
115 }
116
117 src_prepare() {
118 if use vda; then
119 epatch "${DISTDIR}"/${VDA_P}.patch
120 fi
121
122 sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \
123 src/util/sys_defs.h || die "sed failed"
124
125 # change default paths to better comply with portage standard paths
126 sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed"
127 }
128
129 src_configure() {
130 # Make sure LDFLAGS get passed down to the executables.
131 local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -lpcre -lcrypt -lpthread"
132
133 use pam && mylibs="${mylibs} -lpam"
134
135 if use ldap; then
136 mycc="${mycc} -DHAS_LDAP"
137 mylibs="${mylibs} -lldap -llber"
138 fi
139
140 if use mysql; then
141 mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)"
142 mylibs="${mylibs} $(mysql_config --libs)"
143 fi
144
145 if use postgres; then
146 mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)"
147 mylibs="${mylibs} -lpq -L$(pg_config --libdir)"
148 fi
149
150 if use sqlite; then
151 mycc="${mycc} -DHAS_SQLITE"
152 mylibs="${mylibs} -lsqlite3"
153 fi
154
155 if use ssl; then
156 mycc="${mycc} -DUSE_TLS"
157 mylibs="${mylibs} -lssl -lcrypto"
158 fi
159
160 # broken. and "in other words, not supported" by upstream.
161 # and I'd rather not patch. Use inet_protocols setting in main.cf
162 #if ! use ipv6; then
163 # mycc="${mycc} -DNO_IPV6"
164 #fi
165
166 if use sasl; then
167 if use dovecot-sasl; then
168 # Set dovecot as default.
169 mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\""
170 fi
171 if use ldap-bind; then
172 mycc="${mycc} -DUSE_LDAP_SASL"
173 fi
174 mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl"
175 mylibs="${mylibs} -lsasl2"
176 elif use dovecot-sasl; then
177 mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\""
178 fi
179
180 if ! use nis; then
181 sed -i -e "s|#define HAS_NIS|//#define HAS_NIS|g" \
182 src/util/sys_defs.h || die "sed failed"
183 fi
184
185 if ! use berkdb; then
186 sed -i -e "s|#define HAS_DB$|//#define HAS_DB|g" \
187 src/util/sys_defs.h || die
188 if use cdb; then
189 # change default hash format from Berkeley DB to cdb
190 sed -i -e "s/hash/cdb/" src/util/sys_defs.h || die
191 fi
192 fi
193
194 if use cdb; then
195 mycc="${mycc} -DHAS_CDB -I/usr/include/cdb"
196 CDB_LIBS=""
197 # Tinycdb is preferred.
198 if has_version dev-db/tinycdb ; then
199 einfo "Building with dev-db/tinycdb"
200 CDB_LIBS="-lcdb"
201 else
202 einfo "Building with dev-db/cdb"
203 CDB_PATH="/usr/$(get_libdir)"
204 for i in cdb.a alloc.a buffer.a unix.a byte.a ; do
205 CDB_LIBS="${CDB_LIBS} ${CDB_PATH}/${i}"
206 done
207 fi
208 mylibs="${mylibs} ${CDB_LIBS}"
209 fi
210
211 # mycc="${mycc} -DDEF_DAEMON_DIR=\\\"/usr/$(get_libdir)/postfix\\\""
212 # mycc="${mycc} -DDEF_CONFIG_DIR=\\\"/etc/postfix\\\""
213 # mycc="${mycc} -DDEF_COMMAND_DIR=\\\"/usr/sbin\\\""
214 # mycc="${mycc} -DDEF_SENDMAIL_PATH=\\\"/usr/sbin/sendmail\\\""
215 # mycc="${mycc} -DDEF_NEWALIS_PATH=\\\"/usr/bin/newaliases\\\""
216 # mycc="${mycc} -DDEF_MAILQ_PATH=\\\"/usr/bin/mailq\\\""
217 # mycc="${mycc} -DDEF_MANPAGE_DIR=\\\"/usr/share/man\\\""
218 # mycc="${mycc} -DDEF_README_DIR=\\\"/usr/share/doc/${PF}/readme\\\""
219 # mycc="${mycc} -DDEF_HTML_DIR=\\\"/usr/share/doc/${PF}/html\\\""
220 # mycc="${mycc} -DDEF_QUEUE_DIR=\\\"/var/spool/postfix\\\""
221 # mycc="${mycc} -DDEF_DATA_DIR=\\\"/var/lib/postfix\\\""
222 # mycc="${mycc} -DDEF_MAIL_OWNER=\\\"postfix\\\""
223 # mycc="${mycc} -DDEF_SGID_GROUP=\\\"postdrop\\\""
224
225 # Robin H. Johnson <robbat2@g.o> 17/Nov/2006
226 # Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check.
227 mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
228 filter-lfs-flags
229
230 # Workaround for bug #76512
231 if use hardened; then
232 [[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os
233 fi
234
235 # Remove annoying C++ comment style warnings - bug #378099
236 append-flags -Wno-comment
237
238 emake DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" makefiles
239 }
240
241 src_install () {
242 /bin/sh postfix-install \
243 -non-interactive \
244 install_root="${D}" \
245 config_directory="/etc/postfix" \
246 manpage_directory="/usr/share/man" \
247 readme_directory="/usr/share/doc/${PF}/readme" \
248 html_directory="/usr/share/doc/${PF}/html" \
249 command_directory="/usr/sbin" \
250 daemon_directory="/usr/$(get_libdir)/postfix" \
251 mailq_path="/usr/bin/mailq" \
252 newaliases_path="/usr/bin/newaliases" \
253 sendmail_path="/usr/sbin/sendmail" \
254 || die "postfix-install failed"
255
256 # Fix spool removal on upgrade
257 rm -Rf "${D}"/var
258 keepdir /var/spool/postfix
259
260 # Install rmail for UUCP, closes bug #19127
261 dobin auxiliary/rmail/rmail
262
263 # Provide another link for legacy FSH
264 dosym /usr/sbin/sendmail /usr/$(get_libdir)/sendmail
265
266 # Install qshape tool
267 dobin auxiliary/qshape/qshape.pl
268 doman man/man1/qshape.1
269
270 # Performance tuning tools and their manuals
271 dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink}
272 doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1
273
274 # Set proper permissions on required files/directories
275 dodir /var/lib/postfix
276 keepdir /var/lib/postfix
277 fowners postfix:postfix /var/lib/postfix
278 fowners postfix:postfix /var/lib/postfix/.keep_${CATEGORY}_${PN}-${SLOT}
279 fperms 0750 /var/lib/postfix
280 fowners root:postdrop /usr/sbin/post{drop,queue}
281 fperms 02711 /usr/sbin/post{drop,queue}
282
283 keepdir /etc/postfix
284 if use mbox; then
285 mypostconf="mail_spool_directory=/var/spool/mail"
286 else
287 mypostconf="home_mailbox=.maildir/"
288 fi
289 "${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \
290 -e ${mypostconf} || die "postconf failed"
291
292 insinto /etc/postfix
293 newins "${FILESDIR}"/smtp.pass saslpass
294 fperms 600 /etc/postfix/saslpass
295
296 newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix
297 # do not start mysql/postgres unnecessarily - bug #359913
298 use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix"
299 use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix"
300
301 mv "${S}"/examples "${D}"/usr/share/doc/${PF}/
302 mv "${D}"/etc/postfix/{*.default,makedefs.out} "${D}"/usr/share/doc/${PF}/
303
304 dodoc *README COMPATIBILITY HISTORY INSTALL PORTING RELEASE_NOTES*
305
306 pamd_mimic_system smtp auth account
307
308 if use sasl; then
309 insinto /etc/sasl2
310 newins "${FILESDIR}"/smtp.sasl smtpd.conf
311 fi
312
313 # header files
314 insinto /usr/include/postfix
315 doins include/*.h
316
317 # Remove unnecessary files
318 rm -f "${D}"/etc/postfix/{*LICENSE,access,aliases,canonical,generic}
319 rm -f "${D}"/etc/postfix/{header_checks,relocated,transport,virtual}
320 }
321
322 pkg_preinst() {
323 [[ -d ${ROOT}/etc/postfix ]] && {
324 # changed default for inet_protocols?
325 if [[ "$(${D}/usr/sbin/postconf -dh inet_protocols)" != "ipv4" ]]; then
326 if [[ ! -n "$(${D}/usr/sbin/postconf -c ${ROOT}/etc/postfix -nh inet_protocols)" ]];
327 then
328 ewarn "\nCOMPATIBILITY: adding inet_protocols=ipv4 to main.cf."
329 ewarn "That will keep the same behaviour as previous postfix versions."
330 ewarn "Specify inet_protocols explicitly if you want to enable IPv6.\n"
331 else
332 # delete inet_protocols setting. there is already one in /etc/postfix
333 sed -i -e /inet_protocols/d "${D}"/etc/postfix/main.cf || die
334 fi
335 fi
336 }
337 }
338
339 pkg_postinst() {
340 # Do not install server.{key,pem) SSL certificates if they already exist
341 if use ssl && [[ ! -f "${ROOT}"/etc/ssl/postfix/server.key \
342 && ! -f "${ROOT}"/etc/ssl/postfix/server.pem ]] ; then
343 SSL_ORGANIZATION="${SSL_ORGANIZATION:-Postfix SMTP Server}"
344 install_cert /etc/ssl/postfix/server
345 chown postfix:mail "${ROOT}"/etc/ssl/postfix/server.{key,pem}
346 fi
347
348 if [[ ! -e /etc/mail/aliases.db ]] ; then
349 ewarn
350 ewarn "You must edit /etc/mail/aliases to suit your needs"
351 ewarn "and then run /usr/bin/newaliases. Postfix will not"
352 ewarn "work correctly without it."
353 ewarn
354 fi
355
356 if [[ ${REPLACING_VERSIONS} < 2.9 ]]; then
357 elog "If you are using old style postfix instances by symlinking"
358 elog "startup scripts in ${ROOT}etc/init.d, please consider"
359 elog "upgrading your config for postmulti support. For more info:"
360 elog "http://www.postfix.org/MULTI_INSTANCE_README.html"
361 fi
362 }