1 |
commit: 8e5b924cea36a895ead3bd0cf5b005f42cc02e4a |
2 |
Author: Eray Aslan <eras <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 1 08:10:47 2017 +0000 |
4 |
Commit: Eray Aslan <eras <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 1 08:10:47 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e5b924c |
7 |
|
8 |
mail-mta/postfix: version bump to 3.2.0 |
9 |
|
10 |
Package-Manager: Portage-2.3.3, Repoman-2.3.1 |
11 |
|
12 |
mail-mta/postfix/Manifest | 1 + |
13 |
mail-mta/postfix/postfix-3.2.0.ebuild | 308 ++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 309 insertions(+) |
15 |
|
16 |
diff --git a/mail-mta/postfix/Manifest b/mail-mta/postfix/Manifest |
17 |
index b38eca7cadc..e0d8c87fc5e 100644 |
18 |
--- a/mail-mta/postfix/Manifest |
19 |
+++ b/mail-mta/postfix/Manifest |
20 |
@@ -7,4 +7,5 @@ DIST postfix-3.1.2.tar.gz 4337569 SHA256 1ab9b4ee6bf9eb37d2467a63244132aab22ac23 |
21 |
DIST postfix-3.1.3.tar.gz 4338730 SHA256 52f8127e6797e2617a36d0afb9473c55e95c3a777b6280df3f106168fd814979 SHA512 00e2b0974e59420cabfddc92597a99b42c8a8c9cd9a0c279c63ba6be9f40b15400f37dc16d0b1312130e72b5ba82b56fc7d579ee9ef975a957c0931b0401213c WHIRLPOOL 7274501921349e1f99344adb500638e91b92f3a3a87ec2171add18d58b926478459d4540a15f421c52175efb61d220c98438a9727adf5473d609d1b94480b663 |
22 |
DIST postfix-3.1.4.tar.gz 4340102 SHA256 f33b470c47ae8b4ff199ab55dc42e86031ff0c535ccbc83069c8cff69b5bd027 SHA512 4cf8aa8d0cf6d99defa32c2907705370d6f8d047d7e938c84a20a62c68ae07a2bec304f28c178d1072b9610f2969420f83fe2066821ad34c0f95e62bbb5b8c05 WHIRLPOOL 72c881a390e96dcc3645b98383e4dcc774ac61144b086800d72e0f6e4d8fe3adccb246df728cc253851db16804e9c97c79e9966f88f02deda696117cd20551f7 |
23 |
DIST postfix-3.2-20170206.tar.gz 4394497 SHA256 2aff21afcc5d646aed7eb3973b70420f2d318c62d25483f9bbc8d68dca237b3e SHA512 3ce309ea6d54f64043a3c67e24d2a0f6cbb37d995d5cc6699f6ab092c18ce5c53451bd6b8559395044b3d4aaa1158fbf9eba5c4742ec6d7d46d22d0cf672d985 WHIRLPOOL 0a23f056996d0579f416701def5d71cf47ba564f9d285dae3e8888434fe0c50659f08e4bd88594a251e8162a5058a23ec8faec470fab1683e8208d4f84f45e04 |
24 |
+DIST postfix-3.2.0.tar.gz 4389547 SHA256 420726e79622620394fd17799e49268dada7041ea067ca3aa1c8bf155b9aa487 SHA512 bfaa4b2125758833997b399bb2f095475924c1e51fba752e631ad73494d8764458548541d175ef8a1ed6566e9dac569f963e0651e1500aa19595f9062b8e86ce WHIRLPOOL e4a37cb3bd3faec5a3fd24bc03631af51be90369e1299fd9f2d46f5194ba4d011affdf04e1566ca14fed20e3e31d60b1011ced2f21ae4f0744db08828cf0f20d |
25 |
DIST postfix-vda-v13-2.10.0.patch 55701 SHA256 6208021eb0b37ac6482e334e538ed5700cc22c4d4dd66ed9e975ae5f20bf935f SHA512 0b4b53a8cd28abf56eee3b2ed63ca1814251b60816e6ca1143249d25fd6ef7f905bec3134125ac6e851af685db8aae878012113693261529ae2ddbcf1bd93e62 WHIRLPOOL d98b7d2177b8b69738086880fd08c336fa60b99ff7413624e628fd5f17be2064f2ccaa37c047d3013ed41c0ff1bcb76e7962f8390c4179f28ab11733dd3b59d3 |
26 |
|
27 |
diff --git a/mail-mta/postfix/postfix-3.2.0.ebuild b/mail-mta/postfix/postfix-3.2.0.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..0d7b71cde94 |
30 |
--- /dev/null |
31 |
+++ b/mail-mta/postfix/postfix-3.2.0.ebuild |
32 |
@@ -0,0 +1,308 @@ |
33 |
+# Copyright 1999-2017 Gentoo Foundation |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=6 |
37 |
+inherit flag-o-matic pam systemd toolchain-funcs user |
38 |
+ |
39 |
+MY_PV="${PV/_pre/-}" |
40 |
+MY_SRC="${PN}-${MY_PV}" |
41 |
+MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official" |
42 |
+RC_VER="2.7" |
43 |
+ |
44 |
+DESCRIPTION="A fast and secure drop-in replacement for sendmail" |
45 |
+HOMEPAGE="http://www.postfix.org/" |
46 |
+SRC_URI="${MY_URI}/${MY_SRC}.tar.gz" |
47 |
+ |
48 |
+LICENSE="IBM" |
49 |
+SLOT="0" |
50 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd" |
51 |
+IUSE="+berkdb cdb doc dovecot-sasl +eai hardened ldap ldap-bind libressl lmdb memcached mbox mysql nis pam postgres sasl selinux sqlite ssl" |
52 |
+ |
53 |
+DEPEND=">=dev-libs/libpcre-3.4 |
54 |
+ dev-lang/perl |
55 |
+ berkdb? ( >=sys-libs/db-3.2:* ) |
56 |
+ cdb? ( || ( >=dev-db/tinycdb-0.76 >=dev-db/cdb-0.75-r4 ) ) |
57 |
+ eai? ( dev-libs/icu:= ) |
58 |
+ ldap? ( net-nds/openldap ) |
59 |
+ ldap-bind? ( net-nds/openldap[sasl] ) |
60 |
+ lmdb? ( >=dev-db/lmdb-0.9.11 ) |
61 |
+ mysql? ( virtual/mysql ) |
62 |
+ pam? ( virtual/pam ) |
63 |
+ postgres? ( dev-db/postgresql:* ) |
64 |
+ sasl? ( >=dev-libs/cyrus-sasl-2 ) |
65 |
+ sqlite? ( dev-db/sqlite:3 ) |
66 |
+ ssl? ( |
67 |
+ !libressl? ( dev-libs/openssl:0 ) |
68 |
+ libressl? ( dev-libs/libressl ) |
69 |
+ )" |
70 |
+ |
71 |
+RDEPEND="${DEPEND} |
72 |
+ dovecot-sasl? ( net-mail/dovecot ) |
73 |
+ memcached? ( net-misc/memcached ) |
74 |
+ net-mail/mailbase |
75 |
+ !mail-mta/courier |
76 |
+ !mail-mta/esmtp |
77 |
+ !mail-mta/exim |
78 |
+ !mail-mta/mini-qmail |
79 |
+ !mail-mta/msmtp[mta] |
80 |
+ !mail-mta/netqmail |
81 |
+ !mail-mta/nullmailer |
82 |
+ !mail-mta/qmail-ldap |
83 |
+ !mail-mta/sendmail |
84 |
+ !mail-mta/opensmtpd |
85 |
+ !<mail-mta/ssmtp-2.64-r2 |
86 |
+ !>=mail-mta/ssmtp-2.64-r2[mta] |
87 |
+ !net-mail/fastforward |
88 |
+ selinux? ( sec-policy/selinux-postfix )" |
89 |
+ |
90 |
+REQUIRED_USE="ldap-bind? ( ldap sasl )" |
91 |
+ |
92 |
+S="${WORKDIR}/${MY_SRC}" |
93 |
+ |
94 |
+pkg_setup() { |
95 |
+ # Add postfix, postdrop user/group (bug #77565) |
96 |
+ enewgroup postfix 207 |
97 |
+ enewgroup postdrop 208 |
98 |
+ enewuser postfix 207 -1 /var/spool/postfix postfix,mail |
99 |
+} |
100 |
+ |
101 |
+src_prepare() { |
102 |
+ default |
103 |
+ sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \ |
104 |
+ src/util/sys_defs.h || die "sed failed" |
105 |
+ # change default paths to better comply with portage standard paths |
106 |
+ sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed" |
107 |
+ eapply -p0 "${FILESDIR}/${PN}-libressl.patch" |
108 |
+ eapply -p0 "${FILESDIR}/${PN}-libressl-runtime.patch" |
109 |
+} |
110 |
+ |
111 |
+src_configure() { |
112 |
+ for name in CDB LDAP LMDB MYSQL PCRE PGSQL SDBM SQLITE |
113 |
+ do |
114 |
+ local AUXLIBS_${name}="" |
115 |
+ done |
116 |
+ |
117 |
+ # Make sure LDFLAGS get passed down to the executables. |
118 |
+ local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -ldl" |
119 |
+ AUXLIBS_PCRE="$(pcre-config --libs)" |
120 |
+ |
121 |
+ use pam && mylibs="${mylibs} -lpam" |
122 |
+ |
123 |
+ if use ldap; then |
124 |
+ mycc="${mycc} -DHAS_LDAP" |
125 |
+ AUXLIBS_LDAP="-lldap -llber" |
126 |
+ fi |
127 |
+ |
128 |
+ if use mysql; then |
129 |
+ mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)" |
130 |
+ AUXLIBS_MYSQL="$(mysql_config --libs)" |
131 |
+ fi |
132 |
+ |
133 |
+ if use postgres; then |
134 |
+ mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)" |
135 |
+ AUXLIBS_PGSQL="-L$(pg_config --libdir) -lpq" |
136 |
+ fi |
137 |
+ |
138 |
+ if use sqlite; then |
139 |
+ mycc="${mycc} -DHAS_SQLITE" |
140 |
+ AUXLIBS_SQLITE="-lsqlite3 -lpthread" |
141 |
+ fi |
142 |
+ |
143 |
+ if use ssl; then |
144 |
+ mycc="${mycc} -DUSE_TLS" |
145 |
+ mylibs="${mylibs} -lssl -lcrypto" |
146 |
+ fi |
147 |
+ |
148 |
+ if use lmdb; then |
149 |
+ mycc="${mycc} -DHAS_LMDB" |
150 |
+ AUXLIBS_LMDB="-llmdb -lpthread" |
151 |
+ fi |
152 |
+ |
153 |
+ if ! use eai; then |
154 |
+ mycc="${mycc} -DNO_EAI" |
155 |
+ fi |
156 |
+ |
157 |
+ # broken. and "in other words, not supported" by upstream. |
158 |
+ # Use inet_protocols setting in main.cf |
159 |
+ #if ! use ipv6; then |
160 |
+ # mycc="${mycc} -DNO_IPV6" |
161 |
+ #fi |
162 |
+ |
163 |
+ if use sasl; then |
164 |
+ if use dovecot-sasl; then |
165 |
+ # Set dovecot as default. |
166 |
+ mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\"" |
167 |
+ fi |
168 |
+ if use ldap-bind; then |
169 |
+ mycc="${mycc} -DUSE_LDAP_SASL" |
170 |
+ fi |
171 |
+ mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl" |
172 |
+ mylibs="${mylibs} -lsasl2" |
173 |
+ elif use dovecot-sasl; then |
174 |
+ mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\"" |
175 |
+ fi |
176 |
+ |
177 |
+ if ! use nis; then |
178 |
+ mycc="${mycc} -DNO_NIS" |
179 |
+ fi |
180 |
+ |
181 |
+ if ! use berkdb; then |
182 |
+ mycc="${mycc} -DNO_DB" |
183 |
+ if use cdb; then |
184 |
+ # change default hash format from Berkeley DB to cdb |
185 |
+ mycc="${mycc} -DDEF_DB_TYPE=\\\"cdb\\\"" |
186 |
+ fi |
187 |
+ fi |
188 |
+ |
189 |
+ if use cdb; then |
190 |
+ mycc="${mycc} -DHAS_CDB -I/usr/include/cdb" |
191 |
+ # Tinycdb is preferred. |
192 |
+ if has_version dev-db/tinycdb ; then |
193 |
+ einfo "Building with dev-db/tinycdb" |
194 |
+ AUXLIBS_CDB="-lcdb" |
195 |
+ else |
196 |
+ einfo "Building with dev-db/cdb" |
197 |
+ CDB_PATH="/usr/$(get_libdir)" |
198 |
+ for i in cdb.a alloc.a buffer.a unix.a byte.a ; do |
199 |
+ AUXLIBS_CDB="${AUXLIBS_CDB} ${CDB_PATH}/${i}" |
200 |
+ done |
201 |
+ fi |
202 |
+ fi |
203 |
+ |
204 |
+ # Robin H. Johnson <robbat2@g.o> 17/Nov/2006 |
205 |
+ # Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check. |
206 |
+ mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" |
207 |
+ filter-lfs-flags |
208 |
+ |
209 |
+ # Workaround for bug #76512 |
210 |
+ if use hardened; then |
211 |
+ [[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os |
212 |
+ fi |
213 |
+ |
214 |
+ # Remove annoying C++ comment style warnings - bug #378099 |
215 |
+ append-flags -Wno-comment |
216 |
+ |
217 |
+ sed -i -e "/^RANLIB/s/ranlib/$(tc-getRANLIB)/g" "${S}"/makedefs |
218 |
+ sed -i -e "/^AR/s/ar/$(tc-getAR)/g" "${S}"/makedefs |
219 |
+ |
220 |
+ emake makefiles shared=yes dynamicmaps=no pie=yes \ |
221 |
+ shlib_directory="/usr/$(get_libdir)/postfix/MAIL_VERSION" \ |
222 |
+ DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" \ |
223 |
+ AUXLIBS_CDB="${AUXLIBS_CDB}" AUXLIBS_LDAP="${AUXLIBS_LDAP}" \ |
224 |
+ AUXLIBS_LMDB="${AUXLIBS_LMDB}" AUXLIBS_MYSQL="${AUXLIBS_MYSQL}" \ |
225 |
+ AUXLIBS_PCRE="${AUXLIBS_PCRE}" AUXLIBS_PGSQL="${AUXLIBS_PGSQL}" \ |
226 |
+ AUXLIBS_SQLITE="${AUXLIBS_SQLITE}" |
227 |
+} |
228 |
+ |
229 |
+src_install () { |
230 |
+ local myconf |
231 |
+ use doc && myconf="readme_directory=\"/usr/share/doc/${PF}/readme\" \ |
232 |
+ html_directory=\"/usr/share/doc/${PF}/html\"" |
233 |
+ |
234 |
+ LD_LIBRARY_PATH="${S}/lib" \ |
235 |
+ /bin/sh postfix-install \ |
236 |
+ -non-interactive \ |
237 |
+ install_root="${D}" \ |
238 |
+ config_directory="/etc/postfix" \ |
239 |
+ manpage_directory="/usr/share/man" \ |
240 |
+ command_directory="/usr/sbin" \ |
241 |
+ mailq_path="/usr/bin/mailq" \ |
242 |
+ newaliases_path="/usr/bin/newaliases" \ |
243 |
+ sendmail_path="/usr/sbin/sendmail" \ |
244 |
+ ${myconf} \ |
245 |
+ || die "postfix-install failed" |
246 |
+ |
247 |
+ # Fix spool removal on upgrade |
248 |
+ rm -Rf "${D}"/var |
249 |
+ keepdir /var/spool/postfix |
250 |
+ |
251 |
+ # Install rmail for UUCP, closes bug #19127 |
252 |
+ dobin auxiliary/rmail/rmail |
253 |
+ |
254 |
+ # Provide another link for legacy FSH |
255 |
+ dosym /usr/sbin/sendmail /usr/$(get_libdir)/sendmail |
256 |
+ |
257 |
+ # Install qshape and posttls-finger |
258 |
+ dobin auxiliary/qshape/qshape.pl |
259 |
+ doman man/man1/qshape.1 |
260 |
+ dobin bin/posttls-finger |
261 |
+ doman man/man1/posttls-finger.1 |
262 |
+ |
263 |
+ # Performance tuning tools and their manuals |
264 |
+ dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink} |
265 |
+ doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1 |
266 |
+ |
267 |
+ # Set proper permissions on required files/directories |
268 |
+ dodir /var/lib/postfix |
269 |
+ keepdir /var/lib/postfix |
270 |
+ fowners -R postfix:postfix /var/lib/postfix |
271 |
+ fperms 0750 /var/lib/postfix |
272 |
+ fowners root:postdrop /usr/sbin/post{drop,queue} |
273 |
+ fperms 02711 /usr/sbin/post{drop,queue} |
274 |
+ |
275 |
+ keepdir /etc/postfix |
276 |
+ if use mbox; then |
277 |
+ mypostconf="mail_spool_directory=/var/spool/mail" |
278 |
+ else |
279 |
+ mypostconf="home_mailbox=.maildir/" |
280 |
+ fi |
281 |
+ LD_LIBRARY_PATH="${S}/lib" \ |
282 |
+ "${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \ |
283 |
+ -e ${mypostconf} || die "postconf failed" |
284 |
+ |
285 |
+ insinto /etc/postfix |
286 |
+ newins "${FILESDIR}"/smtp.pass saslpass |
287 |
+ fperms 600 /etc/postfix/saslpass |
288 |
+ |
289 |
+ newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix |
290 |
+ # do not start mysql/postgres unnecessarily - bug #359913 |
291 |
+ use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix" |
292 |
+ use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix" |
293 |
+ |
294 |
+ dodoc *README COMPATIBILITY HISTORY PORTING RELEASE_NOTES* |
295 |
+ use doc && mv "${S}"/examples "${D}"/usr/share/doc/${PF}/ |
296 |
+ |
297 |
+ pamd_mimic_system smtp auth account |
298 |
+ |
299 |
+ if use sasl; then |
300 |
+ insinto /etc/sasl2 |
301 |
+ newins "${FILESDIR}"/smtp.sasl smtpd.conf |
302 |
+ fi |
303 |
+ |
304 |
+ # header files |
305 |
+ insinto /usr/include/postfix |
306 |
+ doins include/*.h |
307 |
+ |
308 |
+ # Keep config_dir clean |
309 |
+ rm -f "${D}"/etc/postfix/{*LICENSE,access,aliases,canonical,generic} |
310 |
+ rm -f "${D}"/etc/postfix/{header_checks,relocated,transport,virtual} |
311 |
+ |
312 |
+ if has_version mail-mta/postfix; then |
313 |
+ # let the sysadmin decide when to change the compatibility_level |
314 |
+ sed -i -e /^compatibility_level/"s/^/#/" "${D}"/etc/postfix/main.cf || die |
315 |
+ fi |
316 |
+ |
317 |
+ systemd_dounit "${FILESDIR}/${PN}.service" |
318 |
+} |
319 |
+ |
320 |
+pkg_postinst() { |
321 |
+ if [[ ! -e /etc/mail/aliases.db ]] ; then |
322 |
+ ewarn |
323 |
+ ewarn "You must edit /etc/mail/aliases to suit your needs" |
324 |
+ ewarn "and then run /usr/bin/newaliases. Postfix will not" |
325 |
+ ewarn "work correctly without it." |
326 |
+ ewarn |
327 |
+ fi |
328 |
+ |
329 |
+ # configure tls |
330 |
+ if use ssl ; then |
331 |
+ if "${EROOT}"/usr/sbin/postfix tls all-default-client; then |
332 |
+ elog "To configure client side TLS settings:" |
333 |
+ elog "${EROOT}"usr/sbin/postfix tls enable-client |
334 |
+ fi |
335 |
+ if "${EROOT}"/usr/sbin/postfix tls all-default-server; then |
336 |
+ elog "To configure server side TLS settings:" |
337 |
+ elog "${EROOT}"usr/sbin/postfix tls enable-server |
338 |
+ fi |
339 |
+ fi |
340 |
+} |