1 |
commit: 00e1964a4aab5b042c5778551e9954c0e6e6ea62 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jul 31 08:04:44 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jul 31 08:25:23 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=00e1964a |
7 |
|
8 |
mail-mta/sendmail: add 8.17.1.9 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/862483 |
11 |
Bug: https://bugs.gentoo.org/859172 |
12 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
13 |
|
14 |
mail-mta/sendmail/Manifest | 1 + |
15 |
mail-mta/sendmail/sendmail-8.17.1.9.ebuild | 217 +++++++++++++++++++++++++++++ |
16 |
2 files changed, 218 insertions(+) |
17 |
|
18 |
diff --git a/mail-mta/sendmail/Manifest b/mail-mta/sendmail/Manifest |
19 |
index a244254cbfea..89867690d895 100644 |
20 |
--- a/mail-mta/sendmail/Manifest |
21 |
+++ b/mail-mta/sendmail/Manifest |
22 |
@@ -1,2 +1,3 @@ |
23 |
DIST sendmail.8.16.1.tar.gz 2236402 BLAKE2B 80a9c2f1d04719099703e55f0a0c54fd638cf69b72839d358ae6863c95c9e0965d1b7fdd5b1807bec1ffdf87bca0c7c9ba91060962e6de5da5bf14422f6279ea SHA512 d7d4aac3c6d7505782abdb166204901b8b51cac000d610dfe40eda9eef7441a073af9e8e0b14c8719b07b445f55a1e2c28ac63d663d0daa7f1eafc5a101788b2 |
24 |
+DIST sendmail.8.17.1.9.tar.gz 2345302 BLAKE2B 378f2f98ffff6457c49f934228964e792acec6f33fbabd89a8712f09f1dc7afc951b7c984a397aa7dd3773d86bdf57a946ea9ac54ae426bc0b8ea4c040e2ad4a SHA512 ad8198b12bdc0037de5b64b2504bd5e0a42bf054274a4834163a7c46953b9aec23d52d58063cc6b925d90199973608f35edeb40128671ae32889f4558e5c0d4b |
25 |
DIST sendmail.8.17.1.tar.gz 2284027 BLAKE2B 4cbbc2bb536a48ea27994721e9dfefff7739ef1c825bbc0397202e600d8dad8f9a2572a777204693cf9630f767865d50566f0827be6b52be41c1e25532cb394c SHA512 ae42343fb06c09f2db5d919d602afc4241914387dfdae0f15e0967dda3be25bf1d3a4637b57266763679646a3cea6aa07e6453266fd9b7358c1a09ec2b627a15 |
26 |
|
27 |
diff --git a/mail-mta/sendmail/sendmail-8.17.1.9.ebuild b/mail-mta/sendmail/sendmail-8.17.1.9.ebuild |
28 |
new file mode 100644 |
29 |
index 000000000000..24fb6488cdee |
30 |
--- /dev/null |
31 |
+++ b/mail-mta/sendmail/sendmail-8.17.1.9.ebuild |
32 |
@@ -0,0 +1,217 @@ |
33 |
+# Copyright 1999-2022 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=8 |
37 |
+ |
38 |
+# Note: please bump this together with mail-filter/libmilter |
39 |
+ |
40 |
+inherit systemd toolchain-funcs |
41 |
+ |
42 |
+DESCRIPTION="Widely-used Mail Transport Agent (MTA)" |
43 |
+HOMEPAGE="https://www.sendmail.org/" |
44 |
+if [[ -n $(ver_cut 4) ]] ; then |
45 |
+ # Snapshots have an extra version component (e.g. 8.17.1 vs 8.17.1.9) |
46 |
+ SRC_URI+="https://ftp.sendmail.org/snapshots/${PN}.${PV}.tar.gz |
47 |
+ ftp://ftp.sendmail.org/pub/${PN}/snapshots/${PN}.${PV}.tar.gz" |
48 |
+else |
49 |
+ SRC_URI="https://ftp.sendmail.org/${PN}.${PV}.tar.gz |
50 |
+ ftp://ftp.sendmail.org/pub/${PN}/${PN}.${PV}.tar.gz" |
51 |
+fi |
52 |
+ |
53 |
+LICENSE="Sendmail GPL-2" # GPL-2 is here for initscript |
54 |
+SLOT="0" |
55 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
56 |
+IUSE="ipv6 ldap mbox nis sasl sockets ssl tcpd" |
57 |
+ |
58 |
+DEPEND=" |
59 |
+ acct-group/smmsp |
60 |
+ >=acct-user/smmsp-0-r2 |
61 |
+ net-mail/mailbase |
62 |
+ >=sys-libs/db-3.2:= |
63 |
+ ldap? ( net-nds/openldap:= ) |
64 |
+ nis? ( net-libs/libnsl:= ) |
65 |
+ sasl? ( >=dev-libs/cyrus-sasl-2.1.10 ) |
66 |
+ ssl? ( dev-libs/openssl:= ) |
67 |
+ tcpd? ( sys-apps/tcp-wrappers ) |
68 |
+" |
69 |
+RDEPEND=" |
70 |
+ ${DEPEND} |
71 |
+ >=mail-filter/libmilter-1.0.2_p2 |
72 |
+ !mail-mta/courier |
73 |
+ !mail-mta/esmtp |
74 |
+ !mail-mta/exim |
75 |
+ !mail-mta/mini-qmail |
76 |
+ !mail-mta/msmtp[mta] |
77 |
+ !mail-mta/netqmail |
78 |
+ !mail-mta/nullmailer |
79 |
+ !mail-mta/opensmtpd |
80 |
+ !mail-mta/postfix |
81 |
+ !mail-mta/qmail-ldap |
82 |
+ !>=mail-mta/ssmtp-2.64-r2[mta] |
83 |
+ !net-mail/vacation |
84 |
+" |
85 |
+BDEPEND=" |
86 |
+ sys-devel/m4 |
87 |
+ virtual/pkgconfig |
88 |
+" |
89 |
+PDEPEND="!mbox? ( mail-filter/procmail )" |
90 |
+ |
91 |
+src_prepare() { |
92 |
+ eapply "${FILESDIR}"/${PN}-8.16.1-build-system.patch |
93 |
+ eapply -p0 "${FILESDIR}"/${PN}-delivered_hdr.patch |
94 |
+ eapply_user |
95 |
+ |
96 |
+ local confCCOPTS="${CFLAGS}" |
97 |
+ # See bug #808954 for FLOCK |
98 |
+ local confENVDEF="-DMAXDAEMONS=64 -DHAS_GETHOSTBYNAME2=1 -DHASFLOCK=1" |
99 |
+ local confLDOPTS="${LDFLAGS}" |
100 |
+ local confLIBS= |
101 |
+ local confMAPDEF="-DMAP_REGEX" |
102 |
+ local conf_sendmail_LIBS= |
103 |
+ |
104 |
+ if use ldap; then |
105 |
+ confMAPDEF+=" -DLDAPMAP" |
106 |
+ confLIBS+=" -lldap -llber" |
107 |
+ fi |
108 |
+ |
109 |
+ if use sasl; then |
110 |
+ confCCOPTS+=" $($(tc-getPKG_CONFIG) --cflags libsasl2)" |
111 |
+ confENVDEF+=" -DSASL=2" |
112 |
+ conf_sendmail_LIBS+=" $($(tc-getPKG_CONFIG) --libs libsasl2)" |
113 |
+ fi |
114 |
+ |
115 |
+ if use ssl; then |
116 |
+ # Bug #542370 - lets add support for modern crypto (PFS) |
117 |
+ confCCOPTS+=" $($(tc-getPKG_CONFIG) --cflags openssl)" |
118 |
+ confENVDEF+=" -DSTARTTLS -D_FFR_DEAL_WITH_ERROR_SSL" |
119 |
+ confENVDEF+=" -D_FFR_TLS_1 -D_FFR_TLS_EC" |
120 |
+ conf_sendmail_LIBS+=" $($(tc-getPKG_CONFIG) --libs openssl)" |
121 |
+ fi |
122 |
+ |
123 |
+ if use tcpd; then |
124 |
+ confENVDEF+=" -DTCPWRAPPERS" |
125 |
+ confLIBS+=" -lwrap" |
126 |
+ fi |
127 |
+ |
128 |
+ use ipv6 && confENVDEF+=" -DNETINET6" |
129 |
+ use nis && confENVDEF+=" -DNIS" |
130 |
+ use sockets && confENVDEF+=" -DSOCKETMAP" |
131 |
+ |
132 |
+ sed -e "s|@@confCC@@|$(tc-getCC)|" \ |
133 |
+ -e "s|@@confCCOPTS@@|${confCCOPTS}|" \ |
134 |
+ -e "s|@@confENVDEF@@|${confENVDEF}|" \ |
135 |
+ -e "s|@@confLDOPTS@@|${confLDOPTS}|" \ |
136 |
+ -e "s|@@confLIBS@@|${confLIBS}|" \ |
137 |
+ -e "s|@@confMAPDEF@@|${confMAPDEF}|" \ |
138 |
+ -e "s|@@conf_sendmail_LIBS@@|${conf_sendmail_LIBS}|" \ |
139 |
+ "${FILESDIR}"/site.config.m4 > devtools/Site/site.config.m4 \ |
140 |
+ || die "failed to generate site.config.m4" |
141 |
+ |
142 |
+ echo "APPENDDEF(\`confLIBDIRS', \`-L${EPREFIX}/usr/$(get_libdir)')" \ |
143 |
+ >> devtools/Site/site.config.m4 || die "failed adding to site.config.m4" |
144 |
+} |
145 |
+ |
146 |
+src_compile() { |
147 |
+ sh Build AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" || die "compilation failed in main build script" |
148 |
+} |
149 |
+ |
150 |
+src_install() { |
151 |
+ dodir /usr/{bin,$(get_libdir)} |
152 |
+ dodir /usr/share/man/man{1,5,8} /usr/sbin /usr/share/sendmail-cf |
153 |
+ dodir /var/spool/{mqueue,clientmqueue} /etc/conf.d |
154 |
+ |
155 |
+ keepdir /var/spool/{clientmqueue,mqueue} |
156 |
+ |
157 |
+ local emakeargs=( |
158 |
+ DESTDIR="${D}" LIBDIR="/usr/$(get_libdir)" |
159 |
+ MANROOT=/usr/share/man/man |
160 |
+ SBINOWN=root SBINGRP=root UBINOWN=root UBINGRP=root |
161 |
+ MANOWN=root MANGRP=root INCOWN=root INCGRP=root |
162 |
+ LIBOWN=root LIBGRP=root GBINOWN=root GBINGRP=root |
163 |
+ MSPQOWN=root CFOWN=root CFGRP=root |
164 |
+ ) |
165 |
+ |
166 |
+ local dir |
167 |
+ for dir in libsmutil sendmail mailstats praliases smrsh makemap vacation editmap; do |
168 |
+ emake -j1 -C obj.*/${dir} "${emakeargs[@]}" install |
169 |
+ done |
170 |
+ for dir in rmail mail.local; do |
171 |
+ emake -j1 -C obj.*/${dir} "${emakeargs[@]}" force-install |
172 |
+ done |
173 |
+ |
174 |
+ fowners root:smmsp /usr/sbin/sendmail |
175 |
+ fperms 2555 /usr/sbin/sendmail |
176 |
+ fowners smmsp:smmsp /var/spool/clientmqueue |
177 |
+ fperms 770 /var/spool/clientmqueue |
178 |
+ fperms 700 /var/spool/mqueue |
179 |
+ dosym ../sbin/makemap /usr/bin/makemap |
180 |
+ dodoc FAQ KNOWNBUGS README RELEASE_NOTES doc/op/op.ps |
181 |
+ |
182 |
+ dodoc sendmail/{SECURITY,TUNING} |
183 |
+ newdoc sendmail/README README.sendmail |
184 |
+ newdoc smrsh/README README.smrsh |
185 |
+ |
186 |
+ newdoc cf/README README.cf |
187 |
+ newdoc cf/cf/README README.install-cf |
188 |
+ |
189 |
+ dodoc -r contrib |
190 |
+ |
191 |
+ cp -pPR cf/. "${ED}"/usr/share/sendmail-cf || die |
192 |
+ |
193 |
+ insinto /etc/mail |
194 |
+ if use mbox; then |
195 |
+ newins "${FILESDIR}"/sendmail.mc-r1 sendmail.mc |
196 |
+ else |
197 |
+ newins "${FILESDIR}"/sendmail-procmail.mc sendmail.mc |
198 |
+ fi |
199 |
+ |
200 |
+ # See discussion on bug #730890 |
201 |
+ m4 "${ED}"/usr/share/sendmail-cf/m4/cf.m4 \ |
202 |
+ <(grep -v "${EPREFIX}"/usr/share/sendmail-cf/m4/cf.m4 "${ED}"/etc/mail/sendmail.mc) \ |
203 |
+ > "${ED}"/etc/mail/sendmail.cf || die "cf.m4 failed" |
204 |
+ |
205 |
+ echo "include(\`/usr/share/sendmail-cf/m4/cf.m4')dnl" \ |
206 |
+ > "${ED}"/etc/mail/submit.mc || die "submit.mc echo failed" |
207 |
+ |
208 |
+ cat "${ED}"/usr/share/sendmail-cf/cf/submit.mc \ |
209 |
+ >> "${ED}"/etc/mail/submit.mc || die "submit.mc cat failed" |
210 |
+ |
211 |
+ echo "# local-host-names - include all aliases for your machine here" \ |
212 |
+ > "${ED}"/etc/mail/local-host-names || die "local-host-names echo failed" |
213 |
+ |
214 |
+ cat <<- EOF > "${ED}"/etc/mail/trusted-users || die "trusted-users cat failed" |
215 |
+ # trusted-users - users that can send mail as others without a warning |
216 |
+ # apache, mailman, majordomo, uucp are good candidates |
217 |
+ EOF |
218 |
+ |
219 |
+ cat <<- EOF > "${ED}"/etc/mail/access || die "access cat failed" |
220 |
+ # Check the /usr/share/doc/sendmail/README.cf file for a description |
221 |
+ # of the format of this file. (search for access_db in that file) |
222 |
+ # The /usr/share/doc/sendmail/README.cf is part of the sendmail-doc |
223 |
+ # package. |
224 |
+ # |
225 |
+ |
226 |
+ EOF |
227 |
+ |
228 |
+ cat <<- EOF > "${ED}"/etc/conf.d/sendmail || die "sendmail cat failed" |
229 |
+ # Config file for /etc/init.d/sendmail |
230 |
+ # add start-up options here |
231 |
+ SENDMAIL_OPTS="-bd -q30m -L sm-mta" # default daemon mode |
232 |
+ CLIENTMQUEUE_OPTS="-Ac -q30m -L sm-cm" # clientmqueue |
233 |
+ KILL_OPTS="" # add -9/-15/your favorite evil SIG level here |
234 |
+ |
235 |
+ EOF |
236 |
+ |
237 |
+ if use sasl; then |
238 |
+ dodir /etc/sasl2 |
239 |
+ cat <<- EOF > "${ED}"/etc/sasl2/Sendmail.conf || die "Sendmail.conf cat ailed" |
240 |
+ pwcheck_method: saslauthd |
241 |
+ mech_list: PLAIN LOGIN |
242 |
+ |
243 |
+ EOF |
244 |
+ fi |
245 |
+ |
246 |
+ doinitd "${FILESDIR}"/sendmail |
247 |
+ systemd_dounit "${FILESDIR}"/sendmail.service |
248 |
+ systemd_dounit "${FILESDIR}"/sm-client.service |
249 |
+} |