Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-ftp/pure-ftpd/
Date: Thu, 13 Sep 2018 13:47:58
Message-Id: 1536846454.020c8aaeefb975f801e92821ed30b968177acbd6.polynomial-c@gentoo
1 commit: 020c8aaeefb975f801e92821ed30b968177acbd6
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 13 13:36:55 2018 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 13 13:47:34 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=020c8aae
7
8 net-ftp/pure-ftpd: Revbumps to replace virtual/mysql
9
10 with dev-db/{mariadb,mysql}-connector-c
11
12 Closes: https://bugs.gentoo.org/665976
13 Package-Manager: Portage-2.3.49, Repoman-2.3.10
14
15 net-ftp/pure-ftpd/pure-ftpd-1.0.45-r3.ebuild | 142 +++++++++++++++++++++++++++
16 net-ftp/pure-ftpd/pure-ftpd-1.0.47-r2.ebuild | 141 ++++++++++++++++++++++++++
17 2 files changed, 283 insertions(+)
18
19 diff --git a/net-ftp/pure-ftpd/pure-ftpd-1.0.45-r3.ebuild b/net-ftp/pure-ftpd/pure-ftpd-1.0.45-r3.ebuild
20 new file mode 100644
21 index 00000000000..045d7c6b7ed
22 --- /dev/null
23 +++ b/net-ftp/pure-ftpd/pure-ftpd-1.0.45-r3.ebuild
24 @@ -0,0 +1,142 @@
25 +# Copyright 1999-2018 Gentoo Foundation
26 +# Distributed under the terms of the GNU General Public License v2
27 +
28 +EAPI=7
29 +
30 +inherit flag-o-matic
31 +
32 +KEYWORDS="alpha amd64 arm ~hppa ia64 ppc ppc64 sparc x86"
33 +
34 +DESCRIPTION="Fast, production-quality, standard-conformant FTP server"
35 +HOMEPAGE="http://www.pureftpd.org/"
36 +SRC_URI="ftp://ftp.pureftpd.org/pub/${PN}/releases/${P}.tar.bz2
37 + http://download.pureftpd.org/pub/${PN}/releases/${P}.tar.bz2"
38 +
39 +LICENSE="BSD"
40 +SLOT="0"
41 +
42 +IUSE="anondel anonperm anonren anonres caps charconv implicittls ldap libressl mysql noiplog pam paranoidmsg postgres resolveids selinux ssl sysquota vchroot xinetd"
43 +
44 +REQUIRED_USE="implicittls? ( ssl )"
45 +
46 +DEPEND="caps? ( sys-libs/libcap )
47 + charconv? ( virtual/libiconv )
48 + ldap? ( >=net-nds/openldap-2.0.25 )
49 + mysql? ( || (
50 + dev-db/mariadb-connector-c
51 + dev-db/mysql-connector-c
52 + ) )
53 + pam? ( virtual/pam )
54 + postgres? ( dev-db/postgresql:= )
55 + ssl? (
56 + !libressl? ( >=dev-libs/openssl-0.9.6g:0=[-bindist] )
57 + libressl? ( dev-libs/libressl:= )
58 + )
59 + sysquota? ( sys-fs/quota[-rpc] )
60 + xinetd? ( virtual/inetd )"
61 +
62 +RDEPEND="${DEPEND}
63 + dev-libs/libsodium:=
64 + net-ftp/ftpbase
65 + selinux? ( sec-policy/selinux-ftp )"
66 +
67 +PATCHES=(
68 + "${FILESDIR}/${PN}-1.0.28-pam.patch"
69 + "${FILESDIR}/${P}-openssl-1.1.patch"
70 + "${FILESDIR}/${PN}-1.0.47-MAX_DATA_SIZE.patch"
71 +)
72 +
73 +src_configure() {
74 + # adjust max user length to something more appropriate
75 + # for virtual hosts. See bug #62472 for details.
76 + sed -e "s:# define MAX_USER_LENGTH 32U:# define MAX_USER_LENGTH 127U:" \
77 + -i "${S}/src/ftpd.h" || die "sed failed"
78 +
79 + # Those features are only configurable like this, see bug #179375.
80 + use anondel && append-cppflags -DANON_CAN_DELETE
81 + use anonperm && append-cppflags -DANON_CAN_CHANGE_PERMS
82 + use anonren && append-cppflags -DANON_CAN_RENAME
83 + use anonres && append-cppflags -DANON_CAN_RESUME
84 + use resolveids && append-cppflags -DALWAYS_RESOLVE_IDS
85 +
86 + # Do not auto-use SSP -- let the user select this.
87 + export ax_cv_check_cflags___fstack_protector_all=no
88 +
89 + local myeconfargs=(
90 + --enable-largefile
91 + --with-altlog
92 + --with-cookie
93 + --with-diraliases
94 + --with-extauth
95 + --with-ftpwho
96 + --with-language=${PUREFTPD_LANG:=english}
97 + --with-peruserlimits
98 + --with-privsep
99 + --with-puredb
100 + --with-quotas
101 + --with-ratios
102 + --with-throttling
103 + --with-uploadscript
104 + --with-virtualhosts
105 + $(use_with charconv rfc2640)
106 + $(use_with ldap)
107 + $(use_with mysql)
108 + $(use_with pam)
109 + $(use_with paranoidmsg)
110 + $(use_with postgres pgsql)
111 + $(use_with ssl tls)
112 + $(use_with implicittls)
113 + $(use_with vchroot virtualchroot)
114 + $(use_with sysquota sysquotas)
115 + $(usex caps '' '--without-capabilities')
116 + $(usex noiplog '--without-iplogging' '')
117 + $(usex xinetd '' '--without-inetd')
118 + )
119 + econf "${myeconfargs[@]}"
120 +}
121 +
122 +src_install() {
123 + local DOCS=( AUTHORS CONTACT ChangeLog FAQ HISTORY INSTALL README* NEWS )
124 +
125 + default
126 +
127 + newinitd "${FILESDIR}/pure-ftpd.rc11" ${PN}
128 + newconfd "${FILESDIR}/pure-ftpd.conf_d-3" ${PN}
129 +
130 + if use implicittls ; then
131 + sed -i '/^SERVER/s@21@990@' "${ED}"/etc/conf.d/${PN} \
132 + || die "Adjusting default server port for implicittls usage failed!"
133 + fi
134 +
135 + keepdir /var/lib/run/${PN}
136 +
137 + if use xinetd ; then
138 + insinto /etc/xinetd.d
139 + newins "${FILESDIR}/pure-ftpd.xinetd" ${PN}
140 + fi
141 +
142 + if use ldap ; then
143 + insinto /etc/openldap/schema
144 + doins pureftpd.schema
145 + insinto /etc/openldap
146 + insopts -m 0600
147 + doins pureftpd-ldap.conf
148 + fi
149 +}
150 +
151 +pkg_postinst() {
152 + if [[ -z "${REPLACING_VERSIONS}" ]]; then
153 + # This is a new installation
154 + elog
155 + elog "Before starting Pure-FTPd, you have to edit the /etc/conf.d/pure-ftpd file!"
156 + elog
157 + ewarn "It's *really* important to read the README provided with Pure-FTPd!"
158 + ewarn "Check out http://download.pureftpd.org/pub/pure-ftpd/doc/README for general info"
159 + ewarn "and http://download.pureftpd.org/pub/pure-ftpd/doc/README.TLS for SSL/TLS info."
160 + ewarn
161 + if use charconv ; then
162 + ewarn "Charset conversion is an *experimental* feature!"
163 + ewarn "Remember to set a valid charset for your filesystem in the configuration!"
164 + fi
165 + fi
166 +}
167
168 diff --git a/net-ftp/pure-ftpd/pure-ftpd-1.0.47-r2.ebuild b/net-ftp/pure-ftpd/pure-ftpd-1.0.47-r2.ebuild
169 new file mode 100644
170 index 00000000000..15f2259bad7
171 --- /dev/null
172 +++ b/net-ftp/pure-ftpd/pure-ftpd-1.0.47-r2.ebuild
173 @@ -0,0 +1,141 @@
174 +# Copyright 1999-2018 Gentoo Foundation
175 +# Distributed under the terms of the GNU General Public License v2
176 +
177 +EAPI=7
178 +
179 +inherit flag-o-matic
180 +
181 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
182 +
183 +DESCRIPTION="Fast, production-quality, standard-conformant FTP server"
184 +HOMEPAGE="http://www.pureftpd.org/"
185 +SRC_URI="ftp://ftp.pureftpd.org/pub/${PN}/releases/${P}.tar.bz2
186 + http://download.pureftpd.org/pub/${PN}/releases/${P}.tar.bz2"
187 +
188 +LICENSE="BSD"
189 +SLOT="0"
190 +
191 +IUSE="anondel anonperm anonren anonres caps charconv implicittls ldap libressl mysql noiplog pam paranoidmsg postgres resolveids selinux ssl sysquota vchroot xinetd"
192 +
193 +REQUIRED_USE="implicittls? ( ssl )"
194 +
195 +DEPEND="caps? ( sys-libs/libcap )
196 + charconv? ( virtual/libiconv )
197 + ldap? ( >=net-nds/openldap-2.0.25 )
198 + mysql? ( || (
199 + dev-db/mariadb-connector-c
200 + dev-db/mysql-connector-c
201 + ) )
202 + pam? ( virtual/pam )
203 + postgres? ( dev-db/postgresql:= )
204 + ssl? (
205 + !libressl? ( >=dev-libs/openssl-0.9.6g:0=[-bindist] )
206 + libressl? ( dev-libs/libressl:= )
207 + )
208 + sysquota? ( sys-fs/quota[-rpc] )
209 + xinetd? ( virtual/inetd )"
210 +
211 +RDEPEND="${DEPEND}
212 + dev-libs/libsodium:=
213 + net-ftp/ftpbase
214 + selinux? ( sec-policy/selinux-ftp )"
215 +
216 +PATCHES=(
217 + "${FILESDIR}/${PN}-1.0.28-pam.patch"
218 + "${FILESDIR}/${PN}-1.0.47-MAX_DATA_SIZE.patch"
219 +)
220 +
221 +src_configure() {
222 + # adjust max user length to something more appropriate
223 + # for virtual hosts. See bug #62472 for details.
224 + sed -e "s:# define MAX_USER_LENGTH 32U:# define MAX_USER_LENGTH 127U:" \
225 + -i "${S}/src/ftpd.h" || die "sed failed"
226 +
227 + # Those features are only configurable like this, see bug #179375.
228 + use anondel && append-cppflags -DANON_CAN_DELETE
229 + use anonperm && append-cppflags -DANON_CAN_CHANGE_PERMS
230 + use anonren && append-cppflags -DANON_CAN_RENAME
231 + use anonres && append-cppflags -DANON_CAN_RESUME
232 + use resolveids && append-cppflags -DALWAYS_RESOLVE_IDS
233 +
234 + # Do not auto-use SSP -- let the user select this.
235 + export ax_cv_check_cflags___fstack_protector_all=no
236 +
237 + local myeconfargs=(
238 + --enable-largefile
239 + --with-altlog
240 + --with-cookie
241 + --with-diraliases
242 + --with-extauth
243 + --with-ftpwho
244 + --with-language=${PUREFTPD_LANG:=english}
245 + --with-peruserlimits
246 + --with-privsep
247 + --with-puredb
248 + --with-quotas
249 + --with-ratios
250 + --with-throttling
251 + --with-uploadscript
252 + --with-virtualhosts
253 + $(use_with charconv rfc2640)
254 + $(use_with ldap)
255 + $(use_with mysql)
256 + $(use_with pam)
257 + $(use_with paranoidmsg)
258 + $(use_with postgres pgsql)
259 + $(use_with ssl tls)
260 + $(use_with implicittls)
261 + $(use_with vchroot virtualchroot)
262 + $(use_with sysquota sysquotas)
263 + $(usex caps '' '--without-capabilities')
264 + $(usex noiplog '--without-iplogging' '')
265 + $(usex xinetd '' '--without-inetd')
266 + )
267 + econf "${myeconfargs[@]}"
268 +}
269 +
270 +src_install() {
271 + local DOCS=( AUTHORS CONTACT ChangeLog FAQ HISTORY INSTALL README* NEWS )
272 +
273 + default
274 +
275 + newinitd "${FILESDIR}/pure-ftpd.rc11" ${PN}
276 + newconfd "${FILESDIR}/pure-ftpd.conf_d-3" ${PN}
277 +
278 + if use implicittls ; then
279 + sed -i '/^SERVER/s@21@990@' "${ED}"/etc/conf.d/${PN} \
280 + || die "Adjusting default server port for implicittls usage failed!"
281 + fi
282 +
283 + keepdir /var/lib/run/${PN}
284 +
285 + if use xinetd ; then
286 + insinto /etc/xinetd.d
287 + newins "${FILESDIR}/pure-ftpd.xinetd" ${PN}
288 + fi
289 +
290 + if use ldap ; then
291 + insinto /etc/openldap/schema
292 + doins pureftpd.schema
293 + insinto /etc/openldap
294 + insopts -m 0600
295 + doins pureftpd-ldap.conf
296 + fi
297 +}
298 +
299 +pkg_postinst() {
300 + if [[ -z "${REPLACING_VERSIONS}" ]]; then
301 + # This is a new installation
302 + elog
303 + elog "Before starting Pure-FTPd, you have to edit the /etc/conf.d/pure-ftpd file!"
304 + elog
305 + ewarn "It's *really* important to read the README provided with Pure-FTPd!"
306 + ewarn "Check out http://download.pureftpd.org/pub/pure-ftpd/doc/README for general info"
307 + ewarn "and http://download.pureftpd.org/pub/pure-ftpd/doc/README.TLS for SSL/TLS info."
308 + ewarn
309 + if use charconv ; then
310 + ewarn "Charset conversion is an *experimental* feature!"
311 + ewarn "Remember to set a valid charset for your filesystem in the configuration!"
312 + fi
313 + fi
314 +}