From f4fc10428424904caf2035cffc442195cb088b2c Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 28 Jul 2021 10:27:13 +0100 Subject: gentoo resync : 28.07.2021 --- net-ftp/vsftpd/Manifest | 4 +- net-ftp/vsftpd/vsftpd-3.0.3-r3.ebuild | 141 ------------------------------- net-ftp/vsftpd/vsftpd-3.0.3-r4.ebuild | 146 ++++++++++++++++++++++++++++++++ net-ftp/vsftpd/vsftpd-3.0.4-r1.ebuild | 152 ++++++++++++++++++++++++++++++++++ net-ftp/vsftpd/vsftpd-3.0.4.ebuild | 147 -------------------------------- 5 files changed, 300 insertions(+), 290 deletions(-) delete mode 100644 net-ftp/vsftpd/vsftpd-3.0.3-r3.ebuild create mode 100644 net-ftp/vsftpd/vsftpd-3.0.3-r4.ebuild create mode 100644 net-ftp/vsftpd/vsftpd-3.0.4-r1.ebuild delete mode 100644 net-ftp/vsftpd/vsftpd-3.0.4.ebuild (limited to 'net-ftp/vsftpd') diff --git a/net-ftp/vsftpd/Manifest b/net-ftp/vsftpd/Manifest index 2447da750a04..cac6a85c320d 100644 --- a/net-ftp/vsftpd/Manifest +++ b/net-ftp/vsftpd/Manifest @@ -18,6 +18,6 @@ AUX vsftpd.xinetd 321 BLAKE2B 3a91c0e65a511ed5ca0feed429550b0ce6e1bd2cc133460e26 AUX vsftpd_at.service 328 BLAKE2B 826daeaa5b388273c6cefcfcee7415353773db5b9937b3ee714bcf76dd8b061c0693bc9d4b60742fcf5cc946543e69dbb7caacc4ba07b5503d8b66c7db4174df SHA512 5a39e853405bd5028f2c52183eb91ad559fb8edbaacfff5d5146e686417c208bb894bd86d5830a61720a1aaa9ba901160c75ed2bf47eec459b2a49ed217b9cb1 DIST vsftpd-3.0.3.tar.gz 196649 BLAKE2B dbf96e788494c29d78ca49fad6a03641c9725f9a5b01a4059ad009870fdc28520cd467cd8288a8a9a520c411c495a42c3fff57ee1069efc65840adb245792dca SHA512 5a4410a88e72ecf6f60a60a89771bcec300c9f63c2ea83b219bdf65fd9749b9853f9579f7257205b55659aefcd5dab243eba878dbbd4f0ff8532dd6e60884df7 DIST vsftpd-3.0.4.tar.gz 197637 BLAKE2B 3a2457bd74076de8ffba7ad2861009157c80dd9f38cdb63033804c72d7482666f7e1a400777e2cff4170f0999d79f9d384339ade3ad48f2a7567b2e684e48817 SHA512 a4c3b28ef7bd762dcfe53f5c9b68fc1bb371d2eb61dc88038959cc9f5efba8cc2c45a15956a7fddbac3b1ce03d8555df8fb7b86300e273a78e632f3dac15c2e3 -EBUILD vsftpd-3.0.3-r3.ebuild 3633 BLAKE2B 08c7a3d97316b3e11f828c68cd45d93748b8d8bf152ff18b0209330ea12a4431202b5f0afdcd77ee05a7d4b40ebbed603b4171d6daaa7794455dbdaddfd1f02c SHA512 08c61ab1b145df8218af695eae82331a76f8609805175aa721183973554e1fb7ab2bbffbf37052c0db12afc47c4cfa2b71282d1ca327e973607b8bb8a6bafa73 -EBUILD vsftpd-3.0.4.ebuild 3624 BLAKE2B 1b48db1411cbf50b05e576417e07228d7aee860fd33bc1f5c1c8d118e13cf74ff620ca3b3a885512ba1eac57473bd4d34aececac63dba115710b3c729721a2dc SHA512 f58d8653f8a141337168d3cca1d6608c32eaf97c73ad703f5316032448f6d0445dbe778d32564b1e4899c9913bb5ab7a8be890dc7d62dff4869b6709009ff7a4 +EBUILD vsftpd-3.0.3-r4.ebuild 3700 BLAKE2B afd82fb42398d3ff80e3ac6caea0353be89742c79a419876d415c9eb2283ef2548fec791d945a78e2039cb66b39a7348b5e2d2b41422122032ef743c0fd1f8fb SHA512 29ee6f8547e35bad5861bc7ae2818b6f55aee69cdb909965931c698c3c05e40504b8b198869819531a223f03850d73350d03e7f7baaeccf3c2aaa74222bcc8f2 +EBUILD vsftpd-3.0.4-r1.ebuild 3691 BLAKE2B c59a4d4579e99b2e6137658b70d2f6341c4d907f6f492a0ec6e57a7090d072dde5cd0a9e5c333bad96f1fe025ff838c9f6c4f6ac737d85648bcf8480d5ba4973 SHA512 8c6b75ea2f16ed9f916194e3d2e9a266f455459c4effee22ec13c7a31324c722f3f4c7d439fead4cf507ec6860d10ade01a5e1f3c0bc8d5686dec337ca58eb3e MISC metadata.xml 218 BLAKE2B aa65c9ff8920bcfbaafb2744343f4f32a9b33aaf3d0f7d4487354d5fa625e5a8c183791da4ce7ff237f7a490567a3c2a833470efd7231d5111c41704da93a668 SHA512 cfc42ad64ce3592cf7606ec9a7f04120b3f3667c0ca6c059ac6a0a8cf4158594a8814e03f8a3746ef0ea97382b6b078a8557b720000a7e5fb3cffca9f2977dd2 diff --git a/net-ftp/vsftpd/vsftpd-3.0.3-r3.ebuild b/net-ftp/vsftpd/vsftpd-3.0.3-r3.ebuild deleted file mode 100644 index bba34a41dd44..000000000000 --- a/net-ftp/vsftpd/vsftpd-3.0.3-r3.ebuild +++ /dev/null @@ -1,141 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -inherit eutils systemd toolchain-funcs - -DESCRIPTION="Very Secure FTP Daemon written with speed, size and security in mind" -HOMEPAGE="http://vsftpd.beasts.org/" -SRC_URI="http://security.appspot.com/downloads/${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ppc ppc64 ~s390 sparc x86" -IUSE="caps pam tcpd ssl selinux xinetd" - -DEPEND="caps? ( >=sys-libs/libcap-2 ) - pam? ( sys-libs/pam ) - tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) - ssl? ( - dev-libs/openssl:0= - )" -RDEPEND="${DEPEND} - net-ftp/ftpbase - selinux? ( sec-policy/selinux-ftp ) - xinetd? ( sys-apps/xinetd )" - -src_prepare() { - local PATCHES=( - # kerberos patch. bug #335980 - "${FILESDIR}/${PN}-2.3.2-kerberos.patch" - - # Patch the source, config and the manpage to use /etc/vsftpd/ - "${FILESDIR}/${PN}-2.3.5-gentoo.patch" - - # Fix building without the libcap - "${FILESDIR}/${PN}-2.1.0-caps.patch" - - # Fix building on alpha. Bug #405829 - "${FILESDIR}/${PN}-3.0.2-alpha.patch" - - #Bug #335977 - "${FILESDIR}"/${PN}-3.0.0-Makefile.patch - - #Bug #450536 - "${FILESDIR}"/${PN}-3.0.2-remove-legacy-cap.patch - - #Bug #630704 - "${FILESDIR}"/${PN}-3.0.3-sparc.patch - - # https://bugs.gentoo.org/443898 - "${FILESDIR}"/vsftpd-disable-seccomp-sandbox.patch - ) - - # Configure vsftpd build defaults - use tcpd && echo "#define VSF_BUILD_TCPWRAPPERS" >> builddefs.h - use ssl && echo "#define VSF_BUILD_SSL" >> builddefs.h - use pam || echo "#undef VSF_BUILD_PAM" >> builddefs.h - - # Ensure that we don't link against libcap unless asked - if ! use caps ; then - sed -i '/^#define VSF_SYSDEP_HAVE_LIBCAP$/ d' sysdeputil.c || die - eapply "${FILESDIR}"/${PN}-2.2.0-dont-link-caps.patch - fi - - # Let portage control stripping - sed -i '/^LINK[[:space:]]*=[[:space:]]*/ s/-Wl,-s//' Makefile || die - - default -} - -src_compile() { - # Override LIBS variable. Bug #508192 - LIBS= - use caps && LIBS+=" -lcap" - use pam && LIBS+=" -lpam" - use tcpd && LIBS+=" -lwrap" - use ssl && LIBS+=" -lssl -lcrypto" - - CFLAGS="${CFLAGS}" \ - CC="$(tc-getCC)" \ - emake LIBS="${LIBS}" -} - -src_install() { - into /usr - doman ${PN}.conf.5 ${PN}.8 - dosbin ${PN} - - dodoc AUDIT BENCHMARKS BUGS Changelog FAQ \ - README README.security REWARD SIZE \ - SPEED TODO TUNING || die "dodoc failed" - newdoc ${PN}.conf ${PN}.conf.example - - docinto security - dodoc SECURITY/* - - insinto "/usr/share/doc/${PF}/examples" - doins -r EXAMPLE/* - - insinto /etc/${PN} - newins ${PN}.conf{,.example} - - insinto /etc/logrotate.d - newins "${FILESDIR}/${PN}.logrotate" ${PN} - - if use xinetd ; then - insinto /etc/xinetd.d - newins "${FILESDIR}/${PN}.xinetd" ${PN} - fi - - newinitd "${FILESDIR}/${PN}.init" ${PN} - - keepdir /usr/share/${PN}/empty - - exeinto /usr/libexec - doexe "${FILESDIR}/vsftpd-checkconfig.sh" - systemd_dounit "${FILESDIR}/${PN}.service" - systemd_newunit "${FILESDIR}/${PN}_at.service" "${PN}@.service" - systemd_dounit "${FILESDIR}/${PN}.socket" -} - -pkg_preinst() { - # If we use xinetd, then we set listen=NO - # so that our default config works under xinetd - fixes #78347 - if use xinetd ; then - sed -i 's/listen=YES/listen=NO/g' "${D}"/etc/${PN}/${PN}.conf.example - fi -} - -pkg_postinst() { - einfo "vsftpd openRC init script can now be multiplexed." - einfo "The default init script forces /etc/vsftpd/vsftpd.conf to exist." - einfo "If you symlink the init script to another one, say vsftpd.foo" - einfo "then that uses /etc/vsftpd/foo.conf instead." - einfo - einfo "Example:" - einfo " cd /etc/init.d" - einfo " ln -s vsftpd vsftpd.foo" - einfo "You can now treat vsftpd.foo like any other service" -} diff --git a/net-ftp/vsftpd/vsftpd-3.0.3-r4.ebuild b/net-ftp/vsftpd/vsftpd-3.0.3-r4.ebuild new file mode 100644 index 000000000000..e3ad887f7e16 --- /dev/null +++ b/net-ftp/vsftpd/vsftpd-3.0.3-r4.ebuild @@ -0,0 +1,146 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +inherit eutils systemd toolchain-funcs + +DESCRIPTION="Very Secure FTP Daemon written with speed, size and security in mind" +HOMEPAGE="http://vsftpd.beasts.org/" +SRC_URI="http://security.appspot.com/downloads/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ppc ppc64 ~s390 sparc x86" +IUSE="caps pam tcpd ssl selinux xinetd" + +DEPEND="caps? ( >=sys-libs/libcap-2 ) + pam? ( sys-libs/pam ) + !pam? ( virtual/libcrypt:= ) + tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) + ssl? ( + dev-libs/openssl:0= + )" +RDEPEND="${DEPEND} + net-ftp/ftpbase + selinux? ( sec-policy/selinux-ftp ) + xinetd? ( sys-apps/xinetd )" + +src_prepare() { + local PATCHES=( + # kerberos patch. bug #335980 + "${FILESDIR}/${PN}-2.3.2-kerberos.patch" + + # Patch the source, config and the manpage to use /etc/vsftpd/ + "${FILESDIR}/${PN}-2.3.5-gentoo.patch" + + # Fix building without the libcap + "${FILESDIR}/${PN}-2.1.0-caps.patch" + + # Fix building on alpha. Bug #405829 + "${FILESDIR}/${PN}-3.0.2-alpha.patch" + + #Bug #335977 + "${FILESDIR}"/${PN}-3.0.0-Makefile.patch + + #Bug #450536 + "${FILESDIR}"/${PN}-3.0.2-remove-legacy-cap.patch + + #Bug #630704 + "${FILESDIR}"/${PN}-3.0.3-sparc.patch + + # https://bugs.gentoo.org/443898 + "${FILESDIR}"/vsftpd-disable-seccomp-sandbox.patch + ) + + # Configure vsftpd build defaults + use tcpd && echo "#define VSF_BUILD_TCPWRAPPERS" >> builddefs.h + use ssl && echo "#define VSF_BUILD_SSL" >> builddefs.h + use pam || echo "#undef VSF_BUILD_PAM" >> builddefs.h + + # Ensure that we don't link against libcap unless asked + if ! use caps ; then + sed -i '/^#define VSF_SYSDEP_HAVE_LIBCAP$/ d' sysdeputil.c || die + eapply "${FILESDIR}"/${PN}-2.2.0-dont-link-caps.patch + fi + + # Let portage control stripping + sed -i '/^LINK[[:space:]]*=[[:space:]]*/ s/-Wl,-s//' Makefile || die + + default +} + +src_compile() { + # Override LIBS variable. Bug #508192 + LIBS= + use caps && LIBS+=" -lcap" + if use pam; then + LIBS+=" -lpam" + else + LIBS+=" -lcrypt" + fi + use tcpd && LIBS+=" -lwrap" + use ssl && LIBS+=" -lssl -lcrypto" + + CFLAGS="${CFLAGS}" \ + CC="$(tc-getCC)" \ + emake LIBS="${LIBS}" +} + +src_install() { + into /usr + doman ${PN}.conf.5 ${PN}.8 + dosbin ${PN} + + dodoc AUDIT BENCHMARKS BUGS Changelog FAQ \ + README README.security REWARD SIZE \ + SPEED TODO TUNING || die "dodoc failed" + newdoc ${PN}.conf ${PN}.conf.example + + docinto security + dodoc SECURITY/* + + insinto "/usr/share/doc/${PF}/examples" + doins -r EXAMPLE/* + + insinto /etc/${PN} + newins ${PN}.conf{,.example} + + insinto /etc/logrotate.d + newins "${FILESDIR}/${PN}.logrotate" ${PN} + + if use xinetd ; then + insinto /etc/xinetd.d + newins "${FILESDIR}/${PN}.xinetd" ${PN} + fi + + newinitd "${FILESDIR}/${PN}.init" ${PN} + + keepdir /usr/share/${PN}/empty + + exeinto /usr/libexec + doexe "${FILESDIR}/vsftpd-checkconfig.sh" + systemd_dounit "${FILESDIR}/${PN}.service" + systemd_newunit "${FILESDIR}/${PN}_at.service" "${PN}@.service" + systemd_dounit "${FILESDIR}/${PN}.socket" +} + +pkg_preinst() { + # If we use xinetd, then we set listen=NO + # so that our default config works under xinetd - fixes #78347 + if use xinetd ; then + sed -i 's/listen=YES/listen=NO/g' "${D}"/etc/${PN}/${PN}.conf.example + fi +} + +pkg_postinst() { + einfo "vsftpd openRC init script can now be multiplexed." + einfo "The default init script forces /etc/vsftpd/vsftpd.conf to exist." + einfo "If you symlink the init script to another one, say vsftpd.foo" + einfo "then that uses /etc/vsftpd/foo.conf instead." + einfo + einfo "Example:" + einfo " cd /etc/init.d" + einfo " ln -s vsftpd vsftpd.foo" + einfo "You can now treat vsftpd.foo like any other service" +} diff --git a/net-ftp/vsftpd/vsftpd-3.0.4-r1.ebuild b/net-ftp/vsftpd/vsftpd-3.0.4-r1.ebuild new file mode 100644 index 000000000000..d68b28925225 --- /dev/null +++ b/net-ftp/vsftpd/vsftpd-3.0.4-r1.ebuild @@ -0,0 +1,152 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit systemd toolchain-funcs + +DESCRIPTION="Very Secure FTP Daemon written with speed, size and security in mind" +HOMEPAGE="http://vsftpd.beasts.org/" +SRC_URI="http://security.appspot.com/downloads/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86" +IUSE="caps pam tcpd ssl selinux xinetd" + +DEPEND="caps? ( >=sys-libs/libcap-2 ) + pam? ( sys-libs/pam ) + !pam? ( virtual/libcrypt:= ) + tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) + ssl? ( dev-libs/openssl:0= )" +RDEPEND="${DEPEND} + net-ftp/ftpbase + selinux? ( sec-policy/selinux-ftp ) + xinetd? ( sys-apps/xinetd )" + +PATCHES=( + # kerberos patch. bug #335980 + "${FILESDIR}/${PN}-2.3.2-kerberos.patch" + + # Patch the source, config and the manpage to use /etc/vsftpd/ + "${FILESDIR}/${PN}-2.3.5-gentoo.patch" + + # Fix building without the libcap + "${FILESDIR}/${PN}-2.1.0-caps.patch" + + # Fix building on alpha. Bug #405829 + "${FILESDIR}/${PN}-3.0.2-alpha.patch" + + # Bug #335977 + "${FILESDIR}"/${PN}-3.0.0-Makefile.patch + + # Bug #450536 + "${FILESDIR}"/${PN}-3.0.2-remove-legacy-cap.patch + + # Bug #630704 + "${FILESDIR}"/${PN}-3.0.3-sparc.patch + + # https://bugs.gentoo.org/443898 + #"${FILESDIR}"/vsftpd-disable-seccomp-sandbox.patch +) + +src_prepare() { + # Configure vsftpd build defaults + if use tcpd ; then + echo "#define VSF_BUILD_TCPWRAPPERS" >> builddefs.h || die + fi + + if use ssl ; then + echo "#define VSF_BUILD_SSL" >> builddefs.h || die + fi + + if ! use pam; then + echo "#undef VSF_BUILD_PAM" >> builddefs.h || die + fi + + # Ensure that we don't link against libcap unless asked + if ! use caps ; then + sed -i '/^#define VSF_SYSDEP_HAVE_LIBCAP$/ d' sysdeputil.c || die + eapply "${FILESDIR}"/${PN}-3.0.4-dont-link-caps.patch + fi + + # Let portage control stripping + sed -i '/^LINK[[:space:]]*=[[:space:]]*/ s/-Wl,-s//' Makefile || die + + default +} + +src_compile() { + # Override LIBS variable. Bug #508192 + LIBS= + use caps && LIBS+=" -lcap" + if use pam; then + LIBS+=" -lpam" + else + LIBS+=" -lcrypt" + fi + use tcpd && LIBS+=" -lwrap" + use ssl && LIBS+=" -lssl -lcrypto" + + tc-export CC + + CFLAGS="${CFLAGS}" emake LIBS="${LIBS}" +} + +src_install() { + into /usr + doman ${PN}.conf.5 ${PN}.8 + dosbin ${PN} + + dodoc AUDIT BENCHMARKS BUGS Changelog FAQ \ + README README.security REWARD SIZE \ + SPEED TODO TUNING + newdoc ${PN}.conf ${PN}.conf.example + + docinto security + dodoc SECURITY/* + + docinto examples + dodoc -r EXAMPLE/* + + insinto /etc/${PN} + newins ${PN}.conf{,.example} + + insinto /etc/logrotate.d + newins "${FILESDIR}"/${PN}.logrotate ${PN} + + if use xinetd ; then + insinto /etc/xinetd.d + newins "${FILESDIR}"/${PN}.xinetd ${PN} + fi + + newinitd "${FILESDIR}"/${PN}.init ${PN} + + keepdir /usr/share/${PN}/empty + + exeinto /usr/libexec + doexe "${FILESDIR}"/vsftpd-checkconfig.sh + systemd_dounit "${FILESDIR}"/${PN}.service + systemd_newunit "${FILESDIR}"/${PN}_at.service "${PN}@.service" + systemd_dounit "${FILESDIR}"/${PN}.socket +} + +pkg_preinst() { + # If we use xinetd, then we set listen=NO + # so that our default config works under xinetd - fixes #78347 + if use xinetd ; then + sed -i 's/listen=YES/listen=NO/g' "${D}"/etc/${PN}/${PN}.conf.example || die + fi +} + +pkg_postinst() { + einfo "vsftpd openRC init script can now be multiplexed." + einfo "The default init script forces /etc/vsftpd/vsftpd.conf to exist." + einfo "If you symlink the init script to another one, say vsftpd.foo" + einfo "then that uses /etc/vsftpd/foo.conf instead." + einfo + einfo "Example:" + einfo " cd /etc/init.d" + einfo " ln -s vsftpd vsftpd.foo" + einfo "You can now treat vsftpd.foo like any other service" +} diff --git a/net-ftp/vsftpd/vsftpd-3.0.4.ebuild b/net-ftp/vsftpd/vsftpd-3.0.4.ebuild deleted file mode 100644 index e7be11994783..000000000000 --- a/net-ftp/vsftpd/vsftpd-3.0.4.ebuild +++ /dev/null @@ -1,147 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit systemd toolchain-funcs - -DESCRIPTION="Very Secure FTP Daemon written with speed, size and security in mind" -HOMEPAGE="http://vsftpd.beasts.org/" -SRC_URI="http://security.appspot.com/downloads/${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86" -IUSE="caps pam tcpd ssl selinux xinetd" - -DEPEND="caps? ( >=sys-libs/libcap-2 ) - pam? ( sys-libs/pam ) - tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) - ssl? ( dev-libs/openssl:0= )" -RDEPEND="${DEPEND} - net-ftp/ftpbase - selinux? ( sec-policy/selinux-ftp ) - xinetd? ( sys-apps/xinetd )" - -PATCHES=( - # kerberos patch. bug #335980 - "${FILESDIR}/${PN}-2.3.2-kerberos.patch" - - # Patch the source, config and the manpage to use /etc/vsftpd/ - "${FILESDIR}/${PN}-2.3.5-gentoo.patch" - - # Fix building without the libcap - "${FILESDIR}/${PN}-2.1.0-caps.patch" - - # Fix building on alpha. Bug #405829 - "${FILESDIR}/${PN}-3.0.2-alpha.patch" - - # Bug #335977 - "${FILESDIR}"/${PN}-3.0.0-Makefile.patch - - # Bug #450536 - "${FILESDIR}"/${PN}-3.0.2-remove-legacy-cap.patch - - # Bug #630704 - "${FILESDIR}"/${PN}-3.0.3-sparc.patch - - # https://bugs.gentoo.org/443898 - #"${FILESDIR}"/vsftpd-disable-seccomp-sandbox.patch -) - -src_prepare() { - # Configure vsftpd build defaults - if use tcpd ; then - echo "#define VSF_BUILD_TCPWRAPPERS" >> builddefs.h || die - fi - - if use ssl ; then - echo "#define VSF_BUILD_SSL" >> builddefs.h || die - fi - - if ! use pam; then - echo "#undef VSF_BUILD_PAM" >> builddefs.h || die - fi - - # Ensure that we don't link against libcap unless asked - if ! use caps ; then - sed -i '/^#define VSF_SYSDEP_HAVE_LIBCAP$/ d' sysdeputil.c || die - eapply "${FILESDIR}"/${PN}-3.0.4-dont-link-caps.patch - fi - - # Let portage control stripping - sed -i '/^LINK[[:space:]]*=[[:space:]]*/ s/-Wl,-s//' Makefile || die - - default -} - -src_compile() { - # Override LIBS variable. Bug #508192 - LIBS= - use caps && LIBS+=" -lcap" - use pam && LIBS+=" -lpam" - use tcpd && LIBS+=" -lwrap" - use ssl && LIBS+=" -lssl -lcrypto" - - tc-export CC - - CFLAGS="${CFLAGS}" emake LIBS="${LIBS}" -} - -src_install() { - into /usr - doman ${PN}.conf.5 ${PN}.8 - dosbin ${PN} - - dodoc AUDIT BENCHMARKS BUGS Changelog FAQ \ - README README.security REWARD SIZE \ - SPEED TODO TUNING - newdoc ${PN}.conf ${PN}.conf.example - - docinto security - dodoc SECURITY/* - - docinto examples - dodoc -r EXAMPLE/* - - insinto /etc/${PN} - newins ${PN}.conf{,.example} - - insinto /etc/logrotate.d - newins "${FILESDIR}"/${PN}.logrotate ${PN} - - if use xinetd ; then - insinto /etc/xinetd.d - newins "${FILESDIR}"/${PN}.xinetd ${PN} - fi - - newinitd "${FILESDIR}"/${PN}.init ${PN} - - keepdir /usr/share/${PN}/empty - - exeinto /usr/libexec - doexe "${FILESDIR}"/vsftpd-checkconfig.sh - systemd_dounit "${FILESDIR}"/${PN}.service - systemd_newunit "${FILESDIR}"/${PN}_at.service "${PN}@.service" - systemd_dounit "${FILESDIR}"/${PN}.socket -} - -pkg_preinst() { - # If we use xinetd, then we set listen=NO - # so that our default config works under xinetd - fixes #78347 - if use xinetd ; then - sed -i 's/listen=YES/listen=NO/g' "${D}"/etc/${PN}/${PN}.conf.example || die - fi -} - -pkg_postinst() { - einfo "vsftpd openRC init script can now be multiplexed." - einfo "The default init script forces /etc/vsftpd/vsftpd.conf to exist." - einfo "If you symlink the init script to another one, say vsftpd.foo" - einfo "then that uses /etc/vsftpd/foo.conf instead." - einfo - einfo "Example:" - einfo " cd /etc/init.d" - einfo " ln -s vsftpd vsftpd.foo" - einfo "You can now treat vsftpd.foo like any other service" -} -- cgit v1.2.3