1 |
commit: a3ce118ec13660049ca3b69322bd2b22ba0bfc07 |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Aug 23 15:42:07 2016 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Aug 23 15:42:07 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3ce118e |
7 |
|
8 |
net-ftp/vsftpd: bump to EAPI=6 and add libressl support |
9 |
|
10 |
Package-Manager: portage-2.2.28 |
11 |
|
12 |
net-ftp/vsftpd/vsftpd-3.0.3-r1.ebuild | 135 ++++++++++++++++++++++++++++++++++ |
13 |
1 file changed, 135 insertions(+) |
14 |
|
15 |
diff --git a/net-ftp/vsftpd/vsftpd-3.0.3-r1.ebuild b/net-ftp/vsftpd/vsftpd-3.0.3-r1.ebuild |
16 |
new file mode 100644 |
17 |
index 0000000..2c890e0 |
18 |
--- /dev/null |
19 |
+++ b/net-ftp/vsftpd/vsftpd-3.0.3-r1.ebuild |
20 |
@@ -0,0 +1,135 @@ |
21 |
+# Copyright 1999-2016 Gentoo Foundation |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+# $Id$ |
24 |
+ |
25 |
+EAPI="6" |
26 |
+ |
27 |
+inherit eutils systemd toolchain-funcs |
28 |
+ |
29 |
+DESCRIPTION="Very Secure FTP Daemon written with speed, size and security in mind" |
30 |
+HOMEPAGE="http://vsftpd.beasts.org/" |
31 |
+SRC_URI="http://security.appspot.com/downloads/${P}.tar.gz" |
32 |
+ |
33 |
+LICENSE="GPL-2" |
34 |
+SLOT="0" |
35 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" |
36 |
+IUSE="caps libressl pam tcpd ssl selinux xinetd" |
37 |
+ |
38 |
+DEPEND="caps? ( >=sys-libs/libcap-2 ) |
39 |
+ pam? ( virtual/pam ) |
40 |
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) |
41 |
+ ssl? ( |
42 |
+ !libressl? ( dev-libs/openssl:0= ) |
43 |
+ libressl? ( dev-libs/libressl:0= ) |
44 |
+ )" |
45 |
+RDEPEND="${DEPEND} |
46 |
+ net-ftp/ftpbase |
47 |
+ selinux? ( sec-policy/selinux-ftp ) |
48 |
+ xinetd? ( sys-apps/xinetd )" |
49 |
+ |
50 |
+src_prepare() { |
51 |
+ # kerberos patch. bug #335980 |
52 |
+ epatch "${FILESDIR}/${PN}-2.3.2-kerberos.patch" |
53 |
+ |
54 |
+ # Patch the source, config and the manpage to use /etc/vsftpd/ |
55 |
+ epatch "${FILESDIR}/${PN}-2.3.5-gentoo.patch" |
56 |
+ |
57 |
+ # Fix building without the libcap |
58 |
+ epatch "${FILESDIR}/${PN}-2.1.0-caps.patch" |
59 |
+ |
60 |
+ # Fix building on alpha. Bug #405829 |
61 |
+ epatch "${FILESDIR}/${PN}-3.0.2-alpha.patch" |
62 |
+ |
63 |
+ # Configure vsftpd build defaults |
64 |
+ use tcpd && echo "#define VSF_BUILD_TCPWRAPPERS" >> builddefs.h |
65 |
+ use ssl && echo "#define VSF_BUILD_SSL" >> builddefs.h |
66 |
+ use pam || echo "#undef VSF_BUILD_PAM" >> builddefs.h |
67 |
+ |
68 |
+ # Ensure that we don't link against libcap unless asked |
69 |
+ if ! use caps ; then |
70 |
+ sed -i '/^#define VSF_SYSDEP_HAVE_LIBCAP$/ d' sysdeputil.c || die |
71 |
+ epatch "${FILESDIR}"/${PN}-2.2.0-dont-link-caps.patch |
72 |
+ fi |
73 |
+ |
74 |
+ # Let portage control stripping |
75 |
+ sed -i '/^LINK[[:space:]]*=[[:space:]]*/ s/-Wl,-s//' Makefile || die |
76 |
+ |
77 |
+ #Bug #335977 |
78 |
+ epatch "${FILESDIR}"/${PN}-3.0.0-Makefile.patch |
79 |
+ |
80 |
+ #Bug #450536 |
81 |
+ epatch "${FILESDIR}"/${PN}-3.0.2-remove-legacy-cap.patch |
82 |
+ |
83 |
+ eapply_user |
84 |
+} |
85 |
+ |
86 |
+src_compile() { |
87 |
+ # Override LIBS variable. Bug #508192 |
88 |
+ LIBS= |
89 |
+ use caps && LIBS+=" -lcap" |
90 |
+ use pam && LIBS+=" -lpam" |
91 |
+ use tcpd && LIBS+=" -lwrap" |
92 |
+ use ssl && LIBS+=" -lssl -lcrypto" |
93 |
+ |
94 |
+ CFLAGS="${CFLAGS}" \ |
95 |
+ CC="$(tc-getCC)" \ |
96 |
+ emake LIBS="${LIBS}" |
97 |
+} |
98 |
+ |
99 |
+src_install() { |
100 |
+ into /usr |
101 |
+ doman ${PN}.conf.5 ${PN}.8 |
102 |
+ dosbin ${PN} || die "disbin failed" |
103 |
+ |
104 |
+ dodoc AUDIT BENCHMARKS BUGS Changelog FAQ \ |
105 |
+ README README.security REWARD SIZE \ |
106 |
+ SPEED TODO TUNING || die "dodoc failed" |
107 |
+ newdoc ${PN}.conf ${PN}.conf.example |
108 |
+ |
109 |
+ docinto security |
110 |
+ dodoc SECURITY/* || die "dodoc failed" |
111 |
+ |
112 |
+ insinto "/usr/share/doc/${PF}/examples" |
113 |
+ doins -r EXAMPLE/* || die "doins faileD" |
114 |
+ |
115 |
+ insinto /etc/${PN} |
116 |
+ newins ${PN}.conf{,.example} |
117 |
+ |
118 |
+ insinto /etc/logrotate.d |
119 |
+ newins "${FILESDIR}/${PN}.logrotate" ${PN} |
120 |
+ |
121 |
+ if use xinetd ; then |
122 |
+ insinto /etc/xinetd.d |
123 |
+ newins "${FILESDIR}/${PN}.xinetd" ${PN} |
124 |
+ fi |
125 |
+ |
126 |
+ newinitd "${FILESDIR}/${PN}.init" ${PN} |
127 |
+ |
128 |
+ keepdir /usr/share/${PN}/empty |
129 |
+ |
130 |
+ exeinto /usr/libexec |
131 |
+ doexe "${FILESDIR}/vsftpd-checkconfig.sh" |
132 |
+ systemd_dounit "${FILESDIR}/${PN}.service" |
133 |
+ systemd_newunit "${FILESDIR}/${PN}_at.service" "${PN}@.service" |
134 |
+ systemd_dounit "${FILESDIR}/${PN}.socket" |
135 |
+} |
136 |
+ |
137 |
+pkg_preinst() { |
138 |
+ # If we use xinetd, then we set listen=NO |
139 |
+ # so that our default config works under xinetd - fixes #78347 |
140 |
+ if use xinetd ; then |
141 |
+ sed -i 's/listen=YES/listen=NO/g' "${D}"/etc/${PN}/${PN}.conf.example |
142 |
+ fi |
143 |
+} |
144 |
+ |
145 |
+pkg_postinst() { |
146 |
+ einfo "vsftpd openRC init script can now be multiplexed." |
147 |
+ einfo "The default init script forces /etc/vsftpd/vsftpd.conf to exist." |
148 |
+ einfo "If you symlink the init script to another one, say vsftpd.foo" |
149 |
+ einfo "then that uses /etc/vsftpd/foo.conf instead." |
150 |
+ einfo |
151 |
+ einfo "Example:" |
152 |
+ einfo " cd /etc/init.d" |
153 |
+ einfo " ln -s vsftpd vsftpd.foo" |
154 |
+ einfo "You can now treat vsftpd.foo like any other service" |
155 |
+} |