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