1 |
commit: d31152e9c9e88e679d24047b89653c82b14f056a |
2 |
Author: Anna “CyberTailor” <cyber <AT> sysrq <DOT> in> |
3 |
AuthorDate: Sun Jan 1 23:22:44 2023 +0000 |
4 |
Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com> |
5 |
CommitDate: Mon Jan 2 19:38:01 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=d31152e9 |
7 |
|
8 |
mail-mta/opensmtpd: new package, add 6.8.0_p2-r2 |
9 |
|
10 |
Signed-off-by: Anna “CyberTailor” <cyber <AT> sysrq.in> |
11 |
Closes: https://github.com/gentoo/libressl/pull/486 |
12 |
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com> |
13 |
|
14 |
mail-mta/opensmtpd/Manifest | 1 + |
15 |
mail-mta/opensmtpd/files/smtpd.initd | 11 ++++ |
16 |
mail-mta/opensmtpd/files/smtpd.pam | 4 ++ |
17 |
mail-mta/opensmtpd/files/smtpd.service | 10 ++++ |
18 |
mail-mta/opensmtpd/files/smtpd.socket | 8 +++ |
19 |
mail-mta/opensmtpd/metadata.xml | 17 ++++++ |
20 |
mail-mta/opensmtpd/opensmtpd-6.8.0_p2-r2.ebuild | 76 +++++++++++++++++++++++++ |
21 |
7 files changed, 127 insertions(+) |
22 |
|
23 |
diff --git a/mail-mta/opensmtpd/Manifest b/mail-mta/opensmtpd/Manifest |
24 |
new file mode 100644 |
25 |
index 0000000..f7a170b |
26 |
--- /dev/null |
27 |
+++ b/mail-mta/opensmtpd/Manifest |
28 |
@@ -0,0 +1 @@ |
29 |
+DIST opensmtpd-6.8.0p2.tar.gz 860189 BLAKE2B 603e8516860eddefb1694ea4cb5631cec2df2a19fa3193b25388caf73c41e82d44e57847fc95b5187488cae629542e72ff2d5a17badc15cef1647bdb173d7827 SHA512 48f152b75575146fdd09bdf47123041ea62fefb6e5de33a69826bf91a2126a918f8db1caffadb2f142a1a21de8126d492de88cb65bdf169e61c0b22d3e78d290 |
30 |
|
31 |
diff --git a/mail-mta/opensmtpd/files/smtpd.initd b/mail-mta/opensmtpd/files/smtpd.initd |
32 |
new file mode 100644 |
33 |
index 0000000..cf205a8 |
34 |
--- /dev/null |
35 |
+++ b/mail-mta/opensmtpd/files/smtpd.initd |
36 |
@@ -0,0 +1,11 @@ |
37 |
+#!/sbin/openrc-run |
38 |
+# Copyright 1999-2016 Gentoo Foundation |
39 |
+# Distributed under the terms of the GNU General Public License v2 |
40 |
+ |
41 |
+command="smtpd" |
42 |
+pidfile="/run/smtpd.pid" |
43 |
+description="SMTP daemon from OpenBSD" |
44 |
+ |
45 |
+depend() { |
46 |
+ need net |
47 |
+} |
48 |
|
49 |
diff --git a/mail-mta/opensmtpd/files/smtpd.pam b/mail-mta/opensmtpd/files/smtpd.pam |
50 |
new file mode 100644 |
51 |
index 0000000..a85aeae |
52 |
--- /dev/null |
53 |
+++ b/mail-mta/opensmtpd/files/smtpd.pam |
54 |
@@ -0,0 +1,4 @@ |
55 |
+auth required pam_nologin.so |
56 |
+auth include system-auth |
57 |
+account include system-auth |
58 |
+session include system-auth |
59 |
|
60 |
diff --git a/mail-mta/opensmtpd/files/smtpd.service b/mail-mta/opensmtpd/files/smtpd.service |
61 |
new file mode 100644 |
62 |
index 0000000..fd2a650 |
63 |
--- /dev/null |
64 |
+++ b/mail-mta/opensmtpd/files/smtpd.service |
65 |
@@ -0,0 +1,10 @@ |
66 |
+[Unit] |
67 |
+Description=OpenSMTPD |
68 |
+After=network.target |
69 |
+ |
70 |
+[Service] |
71 |
+Type=forking |
72 |
+ExecStart=/usr/sbin/smtpd |
73 |
+ |
74 |
+[Install] |
75 |
+WantedBy=multi-user.target |
76 |
|
77 |
diff --git a/mail-mta/opensmtpd/files/smtpd.socket b/mail-mta/opensmtpd/files/smtpd.socket |
78 |
new file mode 100644 |
79 |
index 0000000..fb42f85 |
80 |
--- /dev/null |
81 |
+++ b/mail-mta/opensmtpd/files/smtpd.socket |
82 |
@@ -0,0 +1,8 @@ |
83 |
+[Unit] |
84 |
+Description=OpenSMTPD Socket |
85 |
+ |
86 |
+[Socket] |
87 |
+ListenStream=/var/run/smtpd.sock |
88 |
+ |
89 |
+[Install] |
90 |
+WantedBy=sockets.target |
91 |
|
92 |
diff --git a/mail-mta/opensmtpd/metadata.xml b/mail-mta/opensmtpd/metadata.xml |
93 |
new file mode 100644 |
94 |
index 0000000..12887d4 |
95 |
--- /dev/null |
96 |
+++ b/mail-mta/opensmtpd/metadata.xml |
97 |
@@ -0,0 +1,17 @@ |
98 |
+<?xml version="1.0" encoding="UTF-8"?> |
99 |
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> |
100 |
+<pkgmetadata> |
101 |
+ <longdescription lang="en"> |
102 |
+ OpenSMTPD is an implementation of the server-side SMTP protocol as defined by RFC 5321, with some additional standard extensions. It allows ordinary machines to exchange e-mails with other systems speaking the SMTP protocol. |
103 |
+ </longdescription> |
104 |
+ <maintainer type="person"> |
105 |
+ <email>zx2c4@g.o</email> |
106 |
+ <name>Jason A. Donenfeld</name> |
107 |
+ </maintainer> |
108 |
+ <use> |
109 |
+ <flag name="mta">Enable this to install as system-wide MTA</flag> |
110 |
+ </use> |
111 |
+ <upstream> |
112 |
+ <remote-id type="github">OpenSMTPD/OpenSMTPD</remote-id> |
113 |
+ </upstream> |
114 |
+</pkgmetadata> |
115 |
|
116 |
diff --git a/mail-mta/opensmtpd/opensmtpd-6.8.0_p2-r2.ebuild b/mail-mta/opensmtpd/opensmtpd-6.8.0_p2-r2.ebuild |
117 |
new file mode 100644 |
118 |
index 0000000..c41cdef |
119 |
--- /dev/null |
120 |
+++ b/mail-mta/opensmtpd/opensmtpd-6.8.0_p2-r2.ebuild |
121 |
@@ -0,0 +1,76 @@ |
122 |
+# Copyright 1999-2022 Gentoo Authors |
123 |
+# Distributed under the terms of the GNU General Public License v2 |
124 |
+ |
125 |
+EAPI=7 |
126 |
+ |
127 |
+inherit pam systemd |
128 |
+ |
129 |
+DESCRIPTION="Lightweight but featured SMTP daemon from OpenBSD" |
130 |
+HOMEPAGE="https://www.opensmtpd.org" |
131 |
+SRC_URI="https://www.opensmtpd.org/archives/${P/_}.tar.gz" |
132 |
+ |
133 |
+LICENSE="ISC BSD BSD-1 BSD-2 BSD-4" |
134 |
+SLOT="0" |
135 |
+KEYWORDS="amd64 ~arm arm64 ppc64 ~riscv x86" |
136 |
+IUSE="berkdb +mta pam split-usr" |
137 |
+ |
138 |
+DEPEND=" |
139 |
+ acct-user/smtpd |
140 |
+ acct-user/smtpq |
141 |
+ dev-libs/openssl:= |
142 |
+ elibc_musl? ( sys-libs/fts-standalone ) |
143 |
+ sys-libs/zlib |
144 |
+ pam? ( sys-libs/pam ) |
145 |
+ berkdb? ( sys-libs/db:= ) |
146 |
+ dev-libs/libevent:= |
147 |
+ app-misc/ca-certificates |
148 |
+ net-mail/mailbase |
149 |
+ net-libs/libasr |
150 |
+ virtual/libcrypt:= |
151 |
+ !mail-mta/courier |
152 |
+ !mail-mta/esmtp |
153 |
+ !mail-mta/exim |
154 |
+ !mail-mta/mini-qmail |
155 |
+ !mail-mta/msmtp[mta] |
156 |
+ !mail-mta/netqmail |
157 |
+ !mail-mta/nullmailer |
158 |
+ !mail-mta/postfix |
159 |
+ !mail-mta/qmail-ldap |
160 |
+ !mail-mta/sendmail |
161 |
+ !mail-mta/ssmtp[mta] |
162 |
+" |
163 |
+RDEPEND="${DEPEND}" |
164 |
+ |
165 |
+S=${WORKDIR}/${P/_} |
166 |
+ |
167 |
+src_configure() { |
168 |
+ econf \ |
169 |
+ --sysconfdir=/etc/smtpd \ |
170 |
+ --with-path-mbox=/var/spool/mail \ |
171 |
+ --with-path-empty=/var/empty \ |
172 |
+ --with-path-socket=/run \ |
173 |
+ --with-path-CAfile=/etc/ssl/certs/ca-certificates.crt \ |
174 |
+ --with-user-smtpd=smtpd \ |
175 |
+ --with-user-queue=smtpq \ |
176 |
+ --with-group-queue=smtpq \ |
177 |
+ $(use_with pam auth-pam) \ |
178 |
+ $(use_with berkdb table-db) |
179 |
+} |
180 |
+ |
181 |
+src_install() { |
182 |
+ default |
183 |
+ newinitd "${FILESDIR}"/smtpd.initd smtpd |
184 |
+ systemd_dounit "${FILESDIR}"/smtpd.{service,socket} |
185 |
+ use pam && newpamd "${FILESDIR}"/smtpd.pam smtpd |
186 |
+ dosym smtpctl /usr/sbin/makemap |
187 |
+ dosym smtpctl /usr/sbin/newaliases |
188 |
+ if use mta ; then |
189 |
+ dodir /usr/sbin |
190 |
+ dosym smtpctl /usr/sbin/sendmail |
191 |
+ # on USE="-split-usr" system sbin and bin are merged |
192 |
+ # so symlink made above will collide with one below |
193 |
+ use split-usr && dosym ../sbin/smtpctl /usr/bin/sendmail |
194 |
+ mkdir -p "${ED}"/usr/$(get_libdir) || die |
195 |
+ ln -s --relative "${ED}"/usr/sbin/smtpctl "${ED}"/usr/$(get_libdir)/sendmail || die |
196 |
+ fi |
197 |
+} |