1 |
commit: 68a118bd8810d456234181f0bae63eb8ee949109 |
2 |
Author: Eray Aslan <eras <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Apr 27 06:48:31 2021 +0000 |
4 |
Commit: Eray Aslan <eras <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Apr 27 06:48:31 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=68a118bd |
7 |
|
8 |
mail-mta/postfix: bump to 3.6.0_rc1 |
9 |
|
10 |
Package-Manager: Portage-3.0.18, Repoman-3.0.3 |
11 |
Signed-off-by: Eray Aslan <eras <AT> gentoo.org> |
12 |
|
13 |
mail-mta/postfix/Manifest | 1 + |
14 |
mail-mta/postfix/postfix-3.6.0_rc1.ebuild | 289 ++++++++++++++++++++++++++++++ |
15 |
2 files changed, 290 insertions(+) |
16 |
|
17 |
diff --git a/mail-mta/postfix/Manifest b/mail-mta/postfix/Manifest |
18 |
index e23fb6cd033..b105f6092be 100644 |
19 |
--- a/mail-mta/postfix/Manifest |
20 |
+++ b/mail-mta/postfix/Manifest |
21 |
@@ -2,3 +2,4 @@ DIST postfix-3.5.10.tar.gz 4621130 BLAKE2B 32a0ef43131c1bff319fb8a159e78a4fd81ab |
22 |
DIST postfix-3.5.8.tar.gz 4614733 BLAKE2B 13166e854f70987f981bb5e7e5dabfaa73b3170ab16fc1ff8f70f6b98a0697ac980bdf74bbfb39fdfd1972f922a31a28882b1575b79fd8f01d81e08e68d756bc SHA512 0abb07d99e343b76e6a26b4a090af9d592f4dfd03c8c737cc72bfb0f4267dafcbb0cb0aa7b6255f8b834c9289d89a5c47b167be3758239309937cb77e0d9464b |
23 |
DIST postfix-3.5.9.tar.gz 4620852 BLAKE2B 66a7bd71e7f74c8f25963ed8d41f04f1f95e060fd23c848065a0e947e766efe058e6593ed8ce1f69528f5b2e9868756d0ea0622b3d77486852882622dd3bb872 SHA512 9ff3a33cdd5811e470d5c6cfa896fa76e4d3257b139deec5f420d18e34232f327b7c8496c5d13566c6f9ae1fdf8719feb9981372b2869b0208a2eb3a1daaeadd |
24 |
DIST postfix-3.6-20210422.tar.gz 4737710 BLAKE2B 5559115e14922f1692ab193e06f5aa4097c6d82c2b693bef39858a9284177c381c32db81ac686f055fe2c516223dc223a1cad607ef79bddcef059e382bf5d3ed SHA512 6cb3d101d5f9aee786ca131432ed6aaaffe4c225f207b538e9dc2bd765b4c4e67c4751506b8cca6f9867fe4aee0a18ed703fd7006160b2fdfe1a4d48aa95834c |
25 |
+DIST postfix-3.6.0-RC1.tar.gz 4748644 BLAKE2B 288064e6f1cb60060c960772ceab87cdc8b8dea23489f4ec0368074fe80d5aff0c2bb768e93d2a7a369c63a67590b92539a3c5f89c8088bc9372f199fe9136b7 SHA512 64837a83fc7df0210b02ceb18d4d5b562cc2f0219a3b1457986633d1ebb4c1790b3f288d48039fc85352d28a31b128557f975185f1e0a95623021aa4db8a2c30 |
26 |
|
27 |
diff --git a/mail-mta/postfix/postfix-3.6.0_rc1.ebuild b/mail-mta/postfix/postfix-3.6.0_rc1.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..96598ffacec |
30 |
--- /dev/null |
31 |
+++ b/mail-mta/postfix/postfix-3.6.0_rc1.ebuild |
32 |
@@ -0,0 +1,289 @@ |
33 |
+# Copyright 1999-2021 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=7 |
37 |
+inherit pam systemd toolchain-funcs |
38 |
+ |
39 |
+MY_PV="${PV/_rc/-RC}" |
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 EPL-2.0 )" |
49 |
+SLOT="0" |
50 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" |
51 |
+IUSE="+berkdb cdb dovecot-sasl +eai ldap ldap-bind lmdb memcached mbox mysql nis pam postgres sasl selinux sqlite ssl" |
52 |
+ |
53 |
+DEPEND=" |
54 |
+ acct-group/postfix |
55 |
+ acct-group/postdrop |
56 |
+ acct-user/postfix |
57 |
+ >=dev-libs/libpcre-3.4 |
58 |
+ dev-lang/perl |
59 |
+ berkdb? ( >=sys-libs/db-3.2:* ) |
60 |
+ cdb? ( || ( >=dev-db/tinycdb-0.76 >=dev-db/cdb-0.75-r4 ) ) |
61 |
+ eai? ( dev-libs/icu:= ) |
62 |
+ ldap? ( net-nds/openldap ) |
63 |
+ ldap-bind? ( net-nds/openldap[sasl] ) |
64 |
+ lmdb? ( >=dev-db/lmdb-0.9.11 ) |
65 |
+ mysql? ( dev-db/mysql-connector-c:0= ) |
66 |
+ nis? ( net-libs/libnsl ) |
67 |
+ pam? ( sys-libs/pam ) |
68 |
+ postgres? ( dev-db/postgresql:* ) |
69 |
+ sasl? ( >=dev-libs/cyrus-sasl-2 ) |
70 |
+ sqlite? ( dev-db/sqlite:3 ) |
71 |
+ ssl? ( >=dev-libs/openssl-1.1.1:0= ) |
72 |
+ " |
73 |
+ |
74 |
+RDEPEND="${DEPEND} |
75 |
+ memcached? ( net-misc/memcached ) |
76 |
+ net-mail/mailbase |
77 |
+ !mail-mta/courier |
78 |
+ !mail-mta/esmtp |
79 |
+ !mail-mta/exim |
80 |
+ !mail-mta/mini-qmail |
81 |
+ !mail-mta/msmtp[mta] |
82 |
+ !mail-mta/netqmail |
83 |
+ !mail-mta/nullmailer |
84 |
+ !mail-mta/qmail-ldap |
85 |
+ !mail-mta/sendmail |
86 |
+ !mail-mta/opensmtpd |
87 |
+ !mail-mta/ssmtp[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 |
+src_prepare() { |
96 |
+ default |
97 |
+ sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \ |
98 |
+ src/util/sys_defs.h || die "sed failed" |
99 |
+ # change default paths to better comply with portage standard paths |
100 |
+ sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed" |
101 |
+} |
102 |
+ |
103 |
+src_configure() { |
104 |
+ for name in CDB LDAP LMDB MYSQL PCRE PGSQL SDBM SQLITE |
105 |
+ do |
106 |
+ local AUXLIBS_${name}="" |
107 |
+ done |
108 |
+ |
109 |
+ # Make sure LDFLAGS get passed down to the executables. |
110 |
+ local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -ldl" |
111 |
+ AUXLIBS_PCRE="$(pcre-config --libs)" |
112 |
+ |
113 |
+ use pam && mylibs="${mylibs} -lpam" |
114 |
+ |
115 |
+ if use ldap; then |
116 |
+ mycc="${mycc} -DHAS_LDAP" |
117 |
+ AUXLIBS_LDAP="-lldap -llber" |
118 |
+ fi |
119 |
+ |
120 |
+ if use mysql; then |
121 |
+ mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)" |
122 |
+ AUXLIBS_MYSQL="$(mysql_config --libs)" |
123 |
+ fi |
124 |
+ |
125 |
+ if use postgres; then |
126 |
+ mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)" |
127 |
+ AUXLIBS_PGSQL="-L$(pg_config --libdir) -lpq" |
128 |
+ fi |
129 |
+ |
130 |
+ if use sqlite; then |
131 |
+ mycc="${mycc} -DHAS_SQLITE" |
132 |
+ AUXLIBS_SQLITE="-lsqlite3 -lpthread" |
133 |
+ fi |
134 |
+ |
135 |
+ if use ssl; then |
136 |
+ mycc="${mycc} -DUSE_TLS" |
137 |
+ mylibs="${mylibs} -lssl -lcrypto" |
138 |
+ fi |
139 |
+ |
140 |
+ if use lmdb; then |
141 |
+ mycc="${mycc} -DHAS_LMDB" |
142 |
+ AUXLIBS_LMDB="-llmdb -lpthread" |
143 |
+ fi |
144 |
+ |
145 |
+ if ! use eai; then |
146 |
+ mycc="${mycc} -DNO_EAI" |
147 |
+ fi |
148 |
+ |
149 |
+ # broken. and "in other words, not supported" by upstream. |
150 |
+ # Use inet_protocols setting in main.cf |
151 |
+ #if ! use ipv6; then |
152 |
+ # mycc="${mycc} -DNO_IPV6" |
153 |
+ #fi |
154 |
+ |
155 |
+ if use sasl; then |
156 |
+ if use dovecot-sasl; then |
157 |
+ # Set dovecot as default. |
158 |
+ mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\"" |
159 |
+ fi |
160 |
+ if use ldap-bind; then |
161 |
+ mycc="${mycc} -DUSE_LDAP_SASL" |
162 |
+ fi |
163 |
+ mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl" |
164 |
+ mylibs="${mylibs} -lsasl2" |
165 |
+ elif use dovecot-sasl; then |
166 |
+ mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\"" |
167 |
+ fi |
168 |
+ |
169 |
+ if ! use nis; then |
170 |
+ mycc="${mycc} -DNO_NIS" |
171 |
+ fi |
172 |
+ |
173 |
+ if ! use berkdb; then |
174 |
+ mycc="${mycc} -DNO_DB" |
175 |
+ if use cdb; then |
176 |
+ # change default hash format from Berkeley DB to cdb |
177 |
+ mycc="${mycc} -DDEF_DB_TYPE=\\\"cdb\\\"" |
178 |
+ fi |
179 |
+ fi |
180 |
+ |
181 |
+ if use cdb; then |
182 |
+ mycc="${mycc} -DHAS_CDB -I/usr/include/cdb" |
183 |
+ # Tinycdb is preferred. |
184 |
+ if has_version dev-db/tinycdb ; then |
185 |
+ einfo "Building with dev-db/tinycdb" |
186 |
+ AUXLIBS_CDB="-lcdb" |
187 |
+ else |
188 |
+ einfo "Building with dev-db/cdb" |
189 |
+ CDB_PATH="/usr/$(get_libdir)" |
190 |
+ for i in cdb.a alloc.a buffer.a unix.a byte.a ; do |
191 |
+ AUXLIBS_CDB="${AUXLIBS_CDB} ${CDB_PATH}/${i}" |
192 |
+ done |
193 |
+ fi |
194 |
+ fi |
195 |
+ |
196 |
+ sed -i -e "/^RANLIB/s/ranlib/$(tc-getRANLIB)/g" "${S}"/makedefs |
197 |
+ sed -i -e "/^AR/s/ar/$(tc-getAR)/g" "${S}"/makedefs |
198 |
+ |
199 |
+ emake makefiles shared=yes dynamicmaps=no pie=yes \ |
200 |
+ shlib_directory="/usr/$(get_libdir)/postfix/MAIL_VERSION" \ |
201 |
+ DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" \ |
202 |
+ AUXLIBS_CDB="${AUXLIBS_CDB}" AUXLIBS_LDAP="${AUXLIBS_LDAP}" \ |
203 |
+ AUXLIBS_LMDB="${AUXLIBS_LMDB}" AUXLIBS_MYSQL="${AUXLIBS_MYSQL}" \ |
204 |
+ AUXLIBS_PCRE="${AUXLIBS_PCRE}" AUXLIBS_PGSQL="${AUXLIBS_PGSQL}" \ |
205 |
+ AUXLIBS_SQLITE="${AUXLIBS_SQLITE}" |
206 |
+} |
207 |
+ |
208 |
+src_install() { |
209 |
+ LD_LIBRARY_PATH="${S}/lib" \ |
210 |
+ /bin/sh postfix-install \ |
211 |
+ -non-interactive \ |
212 |
+ install_root="${D}" \ |
213 |
+ config_directory="/etc/postfix" \ |
214 |
+ manpage_directory="/usr/share/man" \ |
215 |
+ command_directory="/usr/sbin" \ |
216 |
+ mailq_path="/usr/bin/mailq" \ |
217 |
+ newaliases_path="/usr/bin/newaliases" \ |
218 |
+ sendmail_path="/usr/sbin/sendmail" \ |
219 |
+ || die "postfix-install failed" |
220 |
+ |
221 |
+ # Fix spool removal on upgrade |
222 |
+ rm -Rf "${D}"/var |
223 |
+ keepdir /var/spool/postfix |
224 |
+ |
225 |
+ # Install rmail for UUCP, closes bug #19127 |
226 |
+ dobin auxiliary/rmail/rmail |
227 |
+ |
228 |
+ # Provide another link for legacy FSH |
229 |
+ dosym ../sbin/sendmail /usr/$(get_libdir)/sendmail |
230 |
+ |
231 |
+ # Install qshape, posttls-finger and collate and tlstype |
232 |
+ dobin auxiliary/qshape/qshape.pl |
233 |
+ doman man/man1/qshape.1 |
234 |
+ dobin bin/posttls-finger |
235 |
+ doman man/man1/posttls-finger.1 |
236 |
+ dobin auxiliary/collate/collate.pl |
237 |
+ newdoc auxiliary/collate/README README.collate |
238 |
+ dobin auxiliary/collate/tlstype.pl |
239 |
+ dodoc auxiliary/collate/README.tlstype |
240 |
+ |
241 |
+ # Performance tuning tools and their manuals |
242 |
+ dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink} |
243 |
+ doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1 |
244 |
+ |
245 |
+ # Set proper permissions on required files/directories |
246 |
+ keepdir /var/lib/postfix |
247 |
+ fowners -R postfix:postfix /var/lib/postfix |
248 |
+ fperms 0750 /var/lib/postfix |
249 |
+ fowners root:postdrop /usr/sbin/post{drop,queue} |
250 |
+ fperms 02755 /usr/sbin/post{drop,queue} |
251 |
+ |
252 |
+ keepdir /etc/postfix |
253 |
+ keepdir /etc/postfix/postfix-files.d |
254 |
+ if use mbox; then |
255 |
+ mypostconf="mail_spool_directory=/var/spool/mail" |
256 |
+ else |
257 |
+ mypostconf="home_mailbox=.maildir/" |
258 |
+ fi |
259 |
+ LD_LIBRARY_PATH="${S}/lib" \ |
260 |
+ "${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \ |
261 |
+ -e ${mypostconf} || die "postconf failed" |
262 |
+ |
263 |
+ insinto /etc/postfix |
264 |
+ newins "${FILESDIR}"/smtp.pass saslpass |
265 |
+ fperms 600 /etc/postfix/saslpass |
266 |
+ |
267 |
+ newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix |
268 |
+ # do not start mysql/postgres unnecessarily - bug #359913 |
269 |
+ use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix" |
270 |
+ use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix" |
271 |
+ |
272 |
+ dodoc *README COMPATIBILITY HISTORY PORTING RELEASE_NOTES* |
273 |
+ mv "${S}"/examples "${D}"/usr/share/doc/${PF}/ |
274 |
+ # postfix set-permissions expects uncompressed man files |
275 |
+ docompress -x /usr/share/man |
276 |
+ |
277 |
+ if use pam; then |
278 |
+ pamd_mimic_system smtp auth account |
279 |
+ fi |
280 |
+ |
281 |
+ if use sasl; then |
282 |
+ insinto /etc/sasl2 |
283 |
+ newins "${FILESDIR}"/smtp.sasl smtpd.conf |
284 |
+ fi |
285 |
+ |
286 |
+ # header files |
287 |
+ insinto /usr/include/postfix |
288 |
+ doins include/*.h |
289 |
+ |
290 |
+ if has_version mail-mta/postfix; then |
291 |
+ # let the sysadmin decide when to change the compatibility_level |
292 |
+ sed -i -e /^compatibility_level/"s/^/#/" "${D}"/etc/postfix/main.cf || die |
293 |
+ fi |
294 |
+ |
295 |
+ systemd_dounit "${FILESDIR}/${PN}.service" |
296 |
+} |
297 |
+ |
298 |
+pkg_postinst() { |
299 |
+ if [[ ! -e /etc/mail/aliases.db ]] ; then |
300 |
+ ewarn |
301 |
+ ewarn "You must edit /etc/mail/aliases to suit your needs" |
302 |
+ ewarn "and then run /usr/bin/newaliases. Postfix will not" |
303 |
+ ewarn "work correctly without it." |
304 |
+ ewarn |
305 |
+ fi |
306 |
+ |
307 |
+ # check and fix file permissions |
308 |
+ "${EROOT}"/usr/sbin/postfix set-permissions |
309 |
+ |
310 |
+ # configure tls |
311 |
+ if use ssl ; then |
312 |
+ if "${EROOT}"/usr/sbin/postfix tls all-default-client; then |
313 |
+ elog "To configure client side TLS settings:" |
314 |
+ elog "${EROOT}"/usr/sbin/postfix tls enable-client |
315 |
+ fi |
316 |
+ if "${EROOT}"/usr/sbin/postfix tls all-default-server; then |
317 |
+ elog "To configure server side TLS settings:" |
318 |
+ elog "${EROOT}"/usr/sbin/postfix tls enable-server |
319 |
+ fi |
320 |
+ fi |
321 |
+} |