diff options
author | Bernard Cafarelli <voyageur@gentoo.org> | 2009-02-17 22:05:08 +0000 |
---|---|---|
committer | Bernard Cafarelli <voyageur@gentoo.org> | 2009-02-17 22:05:08 +0000 |
commit | c85a3fe10f74025e1ba632a09fe872bf775191d3 (patch) | |
tree | 5cb432e1ce2d4b3c8388c1cded923a8b041fd348 /net-ftp/proftpd | |
parent | Now propagate LDFLAGS, and merge fixes in patch (diff) | |
download | gentoo-2-c85a3fe10f74025e1ba632a09fe872bf775191d3.tar.gz gentoo-2-c85a3fe10f74025e1ba632a09fe872bf775191d3.tar.bz2 gentoo-2-c85a3fe10f74025e1ba632a09fe872bf775191d3.zip |
r1 version that should fix a few currently open bugs
(Portage version: 2.2_rc23/cvs/Linux x86_64)
Diffstat (limited to 'net-ftp/proftpd')
-rw-r--r-- | net-ftp/proftpd/ChangeLog | 14 | ||||
-rw-r--r-- | net-ftp/proftpd/files/proftpd-1.3.2-parallel-build.patch | 20 | ||||
-rw-r--r-- | net-ftp/proftpd/files/proftpd.conf | 62 | ||||
-rw-r--r-- | net-ftp/proftpd/files/proftpd.rc6 | 4 | ||||
-rw-r--r-- | net-ftp/proftpd/proftpd-1.3.2-r1.ebuild | 250 |
5 files changed, 322 insertions, 28 deletions
diff --git a/net-ftp/proftpd/ChangeLog b/net-ftp/proftpd/ChangeLog index 187922dea77d..4cfdea312ece 100644 --- a/net-ftp/proftpd/ChangeLog +++ b/net-ftp/proftpd/ChangeLog @@ -1,6 +1,18 @@ # ChangeLog for net-ftp/proftpd # Copyright 2002-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-ftp/proftpd/ChangeLog,v 1.187 2009/02/17 13:12:04 voyageur Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-ftp/proftpd/ChangeLog,v 1.188 2009/02/17 22:05:08 voyageur Exp $ + +*proftpd-1.3.2-r1 (17 Feb 2009) + + 17 Feb 2009; Bernard Cafarelli <voyageur@gentoo.org> + +files/proftpd-1.3.2-parallel-build.patch, files/proftpd.conf, + files/proftpd.rc6, +proftpd-1.3.2-r1.ebuild: + Remove append-ldflag, bug #226907, thanks Dustin Polke. Allows building + ProFTPD with both mysql and postgresql (fixes bug #234003), fix some + parallel building issues, thanks to Bernd Lommerzheim in bug #258838 + (fixes bug #178643). Update proftpd.conf sample file (DisplayFirstChdir + was already deprecated in 1.3.1), fixes bug #235591. Display configuration + errors/result on check, bug #254174 *proftpd-1.3.2 (17 Feb 2009) diff --git a/net-ftp/proftpd/files/proftpd-1.3.2-parallel-build.patch b/net-ftp/proftpd/files/proftpd-1.3.2-parallel-build.patch new file mode 100644 index 000000000000..cea1c4009aa5 --- /dev/null +++ b/net-ftp/proftpd/files/proftpd-1.3.2-parallel-build.patch @@ -0,0 +1,20 @@ +diff -ru proftpd-1.3.2-orig/Makefile.in proftpd-1.3.2/Makefile.in +--- proftpd-1.3.2-orig/Makefile.in 2008-11-19 04:51:38.000000000 +0100 ++++ proftpd-1.3.2/Makefile.in 2009-02-16 14:28:43.000000000 +0100 +@@ -54,13 +54,13 @@ + proftpd$(EXEEXT): lib src modules dirs locale + $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) $(MAIN_LDFLAGS) -o $@ $(BUILD_PROFTPD_OBJS) $(BUILD_PROFTPD_ARCHIVES) $(LIBS) $(MAIN_LIBS) + +-ftpcount$(EXEEXT): utils ++ftpcount$(EXEEXT): lib utils + $(CC) $(LDFLAGS) -o $@ $(BUILD_FTPCOUNT_OBJS) $(UTILS_LIBS) + +-ftpdctl$(EXEEXT): src ++ftpdctl$(EXEEXT): lib src + $(CC) $(LDFLAGS) -o $@ $(BUILD_FTPDCTL_OBJS) $(LIBS) + +-ftpshut$(EXEEXT): utils ++ftpshut$(EXEEXT): lib utils + $(CC) $(LDFLAGS) -o $@ $(BUILD_FTPSHUT_OBJS) $(UTILS_LIBS) + + ftptop$(EXEEXT): lib utils diff --git a/net-ftp/proftpd/files/proftpd.conf b/net-ftp/proftpd/files/proftpd.conf index 0d4eb3e6466b..23b8542cdec2 100644 --- a/net-ftp/proftpd/files/proftpd.conf +++ b/net-ftp/proftpd/files/proftpd.conf @@ -1,7 +1,7 @@ # This is a basic ProFTPD configuration file (rename it to -# 'proftpd.conf' for actual use. It establishes a single server -# and a single anonymous login. It assumes that you have a user/group -# "nobody" and "ftp" for normal operation and anonymous access. +# 'proftpd.conf' for actual use. It establishes a single server +# and a single anonymous login. It assumes that you have a user/group +# "proftpd" and "ftp" for normal operation and anon. ServerName "ProFTPD Default Installation" ServerType standalone @@ -9,48 +9,60 @@ DefaultServer on RequireValidShell off AuthPAM off AuthPAMConfig ftp + # Port 21 is the standard FTP port. Port 21 +# Don't use IPv6 support by default. +UseIPv6 off + # Umask 022 is a good standard umask to prevent new dirs and files # from being group and world writable. Umask 022 # To prevent DoS attacks, set the maximum number of child processes -# to 30. If you need to allow more than 30 concurrent connections -# at once, simply increase this value. Note that this ONLY works +# to 30. If you need to allow more than 30 concurrent connections +# at once, simply increase this value. Note that this ONLY works # in standalone mode, in inetd mode you should use an inetd server -# that allows you to limit the maximum number of processes per service +# that allows you to limit maximum number of processes per service # (such as xinetd). -MaxInstances 30 +MaxInstances 30 # Set the user and group under which the server will run. User proftpd Group proftpd +# To cause every FTP user to be "jailed" (chrooted) into their home +# directory, uncomment this line. +#DefaultRoot ~ + # Normally, we want files to be overwriteable. -<Directory /> - AllowOverwrite on -</Directory> +AllowOverwrite on + +# Bar use of SITE CHMOD by default +<Limit SITE_CHMOD> + DenyAll +</Limit> -# A basic anonymous configuration, with no upload directories. +# A basic anonymous configuration, no upload directories. If you do not +# want anonymous users, simply delete this entire <Anonymous> section. <Anonymous ~ftp> - User ftp - Group ftp + User ftp + Group ftp - # We want clients to be able to login with "anonymous" as well as "ftp". - UserAlias anonymous ftp + # We want clients to be able to login with "anonymous" as well as "ftp" + UserAlias anonymous ftp - # Limit the maximum number of anonymous logins. - MaxClients 10 + # Limit the maximum number of anonymous logins + MaxClients 10 - # We want 'welcome.msg' displayed at login, and '.message' displayed - # in each newly chdired directory. - DisplayLogin welcome.msg - DisplayFirstChdir .message + # We want 'welcome.msg' displayed at login, and '.message' displayed + # in each newly chdired directory. + DisplayLogin welcome.msg + DisplayChdir .message - # Limit WRITE everywhere in the anonymous chroot. - <Limit WRITE> - DenyAll - </Limit> + # Limit WRITE everywhere in the anonymous chroot + <Limit WRITE> + DenyAll + </Limit> </Anonymous> diff --git a/net-ftp/proftpd/files/proftpd.rc6 b/net-ftp/proftpd/files/proftpd.rc6 index c3c9fb03fbba..1a2645460a7a 100644 --- a/net-ftp/proftpd/files/proftpd.rc6 +++ b/net-ftp/proftpd/files/proftpd.rc6 @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-ftp/proftpd/files/proftpd.rc6,v 1.12 2008/04/17 07:57:57 chtekk Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-ftp/proftpd/files/proftpd.rc6,v 1.13 2009/02/17 22:05:07 voyageur Exp $ opts="${opts} reload" @@ -17,7 +17,7 @@ checkconfig() { return 1 fi ebegin "Checking proftpd configuration" - /usr/sbin/proftpd -t -c /etc/proftpd/proftpd.conf &>/dev/null + /usr/sbin/proftpd -t -c /etc/proftpd/proftpd.conf eend $? "Configuration error: please fix your configuration file (/etc/proftpd/proftpd.conf)." } diff --git a/net-ftp/proftpd/proftpd-1.3.2-r1.ebuild b/net-ftp/proftpd/proftpd-1.3.2-r1.ebuild new file mode 100644 index 000000000000..ffc90047af5d --- /dev/null +++ b/net-ftp/proftpd/proftpd-1.3.2-r1.ebuild @@ -0,0 +1,250 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-ftp/proftpd/proftpd-1.3.2-r1.ebuild,v 1.1 2009/02/17 22:05:08 voyageur Exp $ + +inherit eutils flag-o-matic toolchain-funcs autotools + +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" + +IUSE="acl authfile ban case clamav deflate hardened ifsession ipv6 ldap mysql ncurses nls noauthunix opensslcrypt pam postgres radius rewrite selinux shaper sitemisc softquota ssl tcpd vroot xinetd" + +CASE_VER="0.3" +CLAMAV_VER="0.10" +DEFLATE_VER="0.3.1" +SHAPER_VER="0.6.5" +VROOT_VER="0.8.3" + +DESCRIPTION="An advanced and very configurable FTP server." + +SRC_URI="ftp://ftp.proftpd.org/distrib/source/${P/_/w²}.tar.bz2 + case? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-case-${CASE_VER}.tar.gz ) + clamav? ( http://www.thrallingpenguin.com/resources/mod_clamav-${CLAMAV_VER}.tar.gz ) + deflate? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-deflate-${DEFLATE_VER}.tar.gz ) + shaper? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-shaper-${SHAPER_VER}.tar.gz ) + vroot? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-vroot-${VROOT_VER}.tar.gz )" + +HOMEPAGE="http://www.proftpd.org/ + http://www.castaglia.org/proftpd/ + http://www.thrallingpenguin.com/resources/mod_clamav.htm" + +SLOT="0" +LICENSE="GPL-2" + +DEPEND="acl? ( sys-apps/acl sys-apps/attr ) + clamav? ( app-antivirus/clamav ) + ldap? ( >=net-nds/openldap-1.2.11 ) + mysql? ( virtual/mysql ) + ncurses? ( sys-libs/ncurses ) + opensslcrypt? ( >=dev-libs/openssl-0.9.6f ) + pam? ( virtual/pam ) + postgres? ( virtual/postgresql-base ) + ssl? ( >=dev-libs/openssl-0.9.6f ) + tcpd? ( >=sys-apps/tcp-wrappers-7.6-r3 ) + xinetd? ( virtual/inetd )" + +RDEPEND="${DEPEND} + net-ftp/ftpbase + selinux? ( sec-policy/selinux-ftpd )" + +S="${WORKDIR}/${P/_/}" + +pkg_setup() { + # Add the proftpd user to make the default config + # work out-of-the-box + enewgroup proftpd + enewuser proftpd -1 -1 -1 proftpd +} + +src_unpack() { + unpack ${P/_/}.tar.bz2 + cd "${S}" + + # Fix upstream bug 3183 (incorrect logging to wtmp) + epatch "${FILESDIR}"/${P}-upstream-bug-3183.patch + # Fix parallel build + epatch "${FILESDIR}"/${P}-parallel-build.patch + + # Fix stripping of files + sed -e "s| @INSTALL_STRIP@||g" -i Make* + + if use case ; then + unpack ${PN}-mod-case-${CASE_VER}.tar.gz + cp -f mod_case/mod_case.c contrib/ + cp -f mod_case/mod_case.html doc/ + fi + + if use clamav ; then + unpack mod_clamav-${CLAMAV_VER}.tar.gz + cp -f mod_clamav-${CLAMAV_VER}/mod_clamav.* contrib/ + epatch mod_clamav-${CLAMAV_VER}/${PN}.patch + fi + + if use deflate ; then + unpack ${PN}-mod-deflate-${DEFLATE_VER}.tar.gz + cp -f mod_deflate/mod_deflate.c contrib/ + cp -f mod_deflate/mod_deflate.html doc/ + fi + + if use shaper ; then + unpack ${PN}-mod-shaper-${SHAPER_VER}.tar.gz + cp -f mod_shaper/mod_shaper.c contrib/ + cp -f mod_shaper/mod_shaper.html doc/ + fi + + if use vroot ; then + unpack ${PN}-mod-vroot-${VROOT_VER}.tar.gz + cp -f mod_vroot/mod_vroot.c contrib/ + cp -f mod_vroot/mod_vroot.html doc/ + fi + + # Fix bug #221275 + # extract custom PR_ macros from aclocal.m4 to acinclude.m4 + # and delete the provided aclocal.m4 before running autoreconf + einfo "Extract custom m4 macros from aclocal.m4 ..." + sed -e '/libtool\.m4/q' aclocal.m4 > acinclude.m4 + rm -f aclocal.m4 + + eautoreconf +} + +src_compile() { + addpredict /etc/krb5.conf + local modules myconf mylibs + + modules="mod_ratio:mod_readme" + use acl && modules="${modules}:mod_facl" + use ban && modules="${modules}:mod_ban" + use case && modules="${modules}:mod_case" + use clamav && modules="${modules}:mod_clamav" + use deflate && modules="${modules}:mod_deflate" + use pam && modules="${modules}:mod_auth_pam" + use radius && modules="${modules}:mod_radius" + use rewrite && modules="${modules}:mod_rewrite" + use shaper && modules="${modules}:mod_shaper" + use sitemisc && modules="${modules}:mod_site_misc" + use ssl && modules="${modules}:mod_tls" + use tcpd && modules="${modules}:mod_wrap" + use vroot && modules="${modules}:mod_vroot" + + # pam needs to be explicitely disabled + use pam || myconf="${myconf} --enable-auth-pam=no" + + if use ldap ; then + modules="${modules}:mod_ldap" + mylibs="${mylibs} -lresolv" + use ssl && CFLAGS="${CFLAGS} -DUSE_LDAP_TLS" + fi + + if use opensslcrypt ; then + myconf="${myconf} --enable-openssl --with-includes=/usr/include/openssl" + mylibs="${mylibs} -lcrypto" + CFLAGS="${CFLAGS} -DHAVE_OPENSSL" + fi + + use nls && myconf="${myconf} --enable-nls" + + if use mysql || use postgres ; then + modules="${modules}:mod_sql" + if use mysql ; then + modules="${modules}:mod_sql_mysql" + myconf="${myconf} --with-includes=/usr/include/mysql" + fi + if use postgres ; then + modules="${modules}:mod_sql_postgres" + myconf="${myconf} --with-includes=/usr/include/postgresql" + fi + fi + + if use softquota ; then + modules="${modules}:mod_quotatab" + if use mysql || use postgres ; then + modules="${modules}:mod_quotatab_sql" + fi + if use radius ; then + modules="${modules}:mod_quotatab_radius" + fi + if use ldap ; then + modules="${modules}:mod_quotatab_file:mod_quotatab_ldap" + else + modules="${modules}:mod_quotatab_file" + fi + fi + + # mod_ifsession should be the last module in the --with-modules list + # see http://www.castaglia.org/proftpd/modules/mod_ifsession.html#Installation + use ifsession && modules="${modules}:mod_ifsession" + + # bug #30359 + use hardened && echo > lib/libcap/cap_sys.c + gcc-specs-pie && echo > lib/libcap/cap_sys.c + + if use noauthunix ; then + myconf="${myconf} --disable-auth-unix" + else + myconf="${myconf} --enable-auth-unix" + fi + + LIBS="${mylibs}" econf \ + --sbindir=/usr/sbin \ + --localstatedir=/var/run \ + --sysconfdir=/etc/proftpd \ + --enable-shadow \ + --enable-autoshadow \ + --enable-ctrls \ + --with-modules=${modules} \ + $(use_enable acl facl) \ + $(use_enable authfile auth-file) \ + $(use_enable ipv6) \ + $(use_enable ncurses) \ + ${myconf} || die "econf failed" + + emake || die "emake failed" +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + + keepdir /var/run/proftpd + + dodoc "${FILESDIR}/proftpd.conf" \ + COPYING CREDITS ChangeLog NEWS README* \ + doc/license.txt + dohtml doc/*.html + dohtml doc/howto/*.html + + docinto rfc + dodoc doc/rfc/*.txt + + mv -f "${D}/etc/proftpd/proftpd.conf" "${D}/etc/proftpd/proftpd.conf.distrib" + + insinto /etc/proftpd + newins "${FILESDIR}/proftpd.conf" proftpd.conf.sample + + if use xinetd ; then + insinto /etc/xinetd.d + newins "${FILESDIR}/proftpd.xinetd" proftpd + fi + + newinitd "${FILESDIR}/proftpd.rc6" proftpd +} + +pkg_postinst() { + elog + elog "You can find the config files in /etc/proftpd" + elog + ewarn "With the introduction of net-ftp/ftpbase the ftp user is now ftp." + ewarn "Remember to change that in the configuration file." + ewarn + if use mysql && use postgres ; then + ewarn "ProFTPD has been build with the MySQL and PostgreSQL modules." + ewarn "You can use the 'SQLBackend' directive to specify the used SQL" + ewarn "backend. Without this directive the default backend is MySQL." + ewarn + fi + if use clamav ; then + ewarn "mod_clamav was updated to a new version, which uses Clamd" + ewarn "only for virus scanning, so you'll have to set Clamd up" + ewarn "and start it, also re-check the mod_clamav docs." + ewarn + fi +} |