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