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