Gentoo Archives: gentoo-commits

From: Eray Aslan <eras@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: mail-mta/postfix/
Date: Wed, 19 Jan 2022 08:19:59
Message-Id: 1642580315.d64df5cc90a8be5d4fbbafabf0f4bf512d95bf49.eras@gentoo
1 commit: d64df5cc90a8be5d4fbbafabf0f4bf512d95bf49
2 Author: Eray Aslan <eras <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 19 08:18:35 2022 +0000
4 Commit: Eray Aslan <eras <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 19 08:18:35 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d64df5cc
7
8 mail-mta/postfix: bump to 3.6.4
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.4.ebuild | 290 ++++++++++++++++++++++++++++++++++
15 2 files changed, 291 insertions(+)
16
17 diff --git a/mail-mta/postfix/Manifest b/mail-mta/postfix/Manifest
18 index 8e16b3e7d60b..bf03f2984990 100644
19 --- a/mail-mta/postfix/Manifest
20 +++ b/mail-mta/postfix/Manifest
21 @@ -1,2 +1,3 @@
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.7-20220103.tar.gz 4812964 BLAKE2B 40f883decaedf46428600f46fc934c0bb4d7a44a87db292e92cef71d13a69ba856bf289261e940022e9f439253868f024923c127870e0b47a00ef0381f21e8e6 SHA512 eef92f2414f41865bc684d492cb6be3b7cd445d13fd16c5e924544535b44233a08aff80768b13264bed46e8e7090a46b29e6e2652e4a446397531eb88308e866
25
26 diff --git a/mail-mta/postfix/postfix-3.6.4.ebuild b/mail-mta/postfix/postfix-3.6.4.ebuild
27 new file mode 100644
28 index 000000000000..16ec4506ca6e
29 --- /dev/null
30 +++ b/mail-mta/postfix/postfix-3.6.4.ebuild
31 @@ -0,0 +1,290 @@
32 +# Copyright 1999-2022 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +inherit pam systemd toolchain-funcs
37 +
38 +MY_PV="${PV/_rc/-RC}"
39 +MY_SRC="${PN}-${MY_PV}"
40 +MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official"
41 +RC_VER="2.7"
42 +
43 +DESCRIPTION="A fast and secure drop-in replacement for sendmail"
44 +HOMEPAGE="http://www.postfix.org/"
45 +SRC_URI="${MY_URI}/${MY_SRC}.tar.gz"
46 +
47 +LICENSE="|| ( IBM EPL-2.0 )"
48 +SLOT="0"
49 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
50 +IUSE="+berkdb cdb dovecot-sasl +eai ldap ldap-bind lmdb memcached mbox mysql nis pam postgres sasl selinux sqlite ssl"
51 +
52 +DEPEND="
53 + acct-group/postfix
54 + acct-group/postdrop
55 + acct-user/postfix
56 + >=dev-libs/libpcre-3.4
57 + dev-lang/perl
58 + berkdb? ( >=sys-libs/db-3.2:* )
59 + cdb? ( || ( >=dev-db/tinycdb-0.76 >=dev-db/cdb-0.75-r4 ) )
60 + eai? ( dev-libs/icu:= )
61 + ldap? ( net-nds/openldap )
62 + ldap-bind? ( net-nds/openldap[sasl] )
63 + lmdb? ( >=dev-db/lmdb-0.9.11:= )
64 + mysql? ( dev-db/mysql-connector-c:0= )
65 + nis? ( net-libs/libnsl:= )
66 + pam? ( sys-libs/pam )
67 + postgres? ( dev-db/postgresql:* )
68 + sasl? ( >=dev-libs/cyrus-sasl-2 )
69 + sqlite? ( dev-db/sqlite:3 )
70 + ssl? ( >=dev-libs/openssl-1.1.1:0= )
71 + "
72 +
73 +RDEPEND="${DEPEND}
74 + memcached? ( net-misc/memcached )
75 + net-mail/mailbase
76 + !mail-mta/courier
77 + !mail-mta/esmtp
78 + !mail-mta/exim
79 + !mail-mta/msmtp[mta]
80 + !mail-mta/netqmail
81 + !mail-mta/nullmailer
82 + !mail-mta/sendmail
83 + !mail-mta/opensmtpd
84 + !mail-mta/ssmtp[mta]
85 + selinux? ( sec-policy/selinux-postfix )"
86 +
87 +REQUIRED_USE="ldap-bind? ( ldap sasl )"
88 +
89 +S="${WORKDIR}/${MY_SRC}"
90 +
91 +PATCHES=(
92 + "${FILESDIR}/${PN}-glibc-2.34.patch"
93 +)
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 +}