From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- net-ftp/pure-ftpd/Manifest | 12 ++ net-ftp/pure-ftpd/files/pure-ftpd-1.0.28-pam.patch | 20 +++ .../files/pure-ftpd-1.0.45-openssl-1.1.patch | 41 ++++++ net-ftp/pure-ftpd/files/pure-ftpd.conf_d-3 | 90 ++++++++++++++ net-ftp/pure-ftpd/files/pure-ftpd.rc11 | 74 +++++++++++ net-ftp/pure-ftpd/files/pure-ftpd.xinetd | 13 ++ net-ftp/pure-ftpd/metadata.xml | 25 ++++ net-ftp/pure-ftpd/pure-ftpd-1.0.45-r1.ebuild | 137 +++++++++++++++++++++ net-ftp/pure-ftpd/pure-ftpd-1.0.46.ebuild | 136 ++++++++++++++++++++ 9 files changed, 548 insertions(+) create mode 100644 net-ftp/pure-ftpd/Manifest create mode 100644 net-ftp/pure-ftpd/files/pure-ftpd-1.0.28-pam.patch create mode 100644 net-ftp/pure-ftpd/files/pure-ftpd-1.0.45-openssl-1.1.patch create mode 100644 net-ftp/pure-ftpd/files/pure-ftpd.conf_d-3 create mode 100644 net-ftp/pure-ftpd/files/pure-ftpd.rc11 create mode 100644 net-ftp/pure-ftpd/files/pure-ftpd.xinetd create mode 100644 net-ftp/pure-ftpd/metadata.xml create mode 100644 net-ftp/pure-ftpd/pure-ftpd-1.0.45-r1.ebuild create mode 100644 net-ftp/pure-ftpd/pure-ftpd-1.0.46.ebuild (limited to 'net-ftp/pure-ftpd') diff --git a/net-ftp/pure-ftpd/Manifest b/net-ftp/pure-ftpd/Manifest new file mode 100644 index 000000000000..b382536713e7 --- /dev/null +++ b/net-ftp/pure-ftpd/Manifest @@ -0,0 +1,12 @@ +AUX pure-ftpd-1.0.28-pam.patch 568 SHA256 070e44f8502095dcefd56ebc9508412e3914a7e5f105c97aa7c58f3674140484 SHA512 c331837c4c8988e0623a6a4f4222263dd161a49a2748079d3c539db2025b7b048ca5976b4450dd32cab5755932c7e59f6976d9d3bda2e5e87f1869789f8e00ba WHIRLPOOL e8c33271265d640a7627cc200cb6e4fae74a2598f9373909d7867df2ef8fca85eaddb08ba8195269dbc9739f877f9a0075a428fb19909a46dccac83419d1ab9b +AUX pure-ftpd-1.0.45-openssl-1.1.patch 1184 SHA256 4e0e477ef5653d009642f25dd7270da760d03f8b7a2dda194730d3f8bcd43641 SHA512 e6876cd2dd8551f7ad37ad52dfad142d19d7294c2ef226b394d1ea064ab89408b90ad84a7b560be0eb4ac955606f9aeb44b28009a712b681acceafa7410fb053 WHIRLPOOL 47e593d140adf05e0d12ff34268645c7be0eb7cbab2a480d8fc897e04fc1ce1409da1fa43af3ac9ec6ef042f4778f9025188aad2cf0da5db88b199827b9e6cdb +AUX pure-ftpd.conf_d-3 3728 SHA256 6b67379efa91a6168bd4cebee56ba09dfa77830a4843b25edb7a85f1bb88e5fa SHA512 a5cc8e59178a5d0f7b5909d09009ef6ace1f8e6874bd733e21bc30f4899447e70b020a0369077132751ceb28afa971588efedcce3dea83e9b043b1545caf3393 WHIRLPOOL 5004cbac643d05b0315309d943c1718c30778f07bcbfb834fb3957a7b9060b24ad98607793060549dc17a61ec7714a5081d80151dfa80b0d41d0f9abad77c312 +AUX pure-ftpd.rc11 1990 SHA256 9d10da1c459f0167eea910b8515d23f7c44dd7ce8c55e1dc97fa13cd94c69f05 SHA512 39e076b3ecc511646e6e14884852313ba6126810841ed9667a53ac061232418e8e53e2cf9191b35d7655168680d961ee2edf67bff5e16b295f8a00752032e253 WHIRLPOOL bc70544c9c8abae240c4ba0b0a01a2dbab02a241f31a62d73782a59c3c68904113a67d9c632d9c92ee7df6bfdfc0e6a27f21fa6f1a5f534341a26c6b69bc11e9 +AUX pure-ftpd.xinetd 247 SHA256 30e166051c7331c48ab1d948d6deecaa71130aaf3cfdc3ffb99124971b64f80c SHA512 e8ac0527daf1e182e7514d17f04bd20e789231e627cc7228ac23a241a4c420204a61ef9438c57e63f402eb3608ae0acc15a72fe484c99bb4e172bbd5ece2b72d WHIRLPOOL 557d9f627b0ff32975edc674386bdde3676ab8e69d486e28755f889e844171f5a26a53511f313a9416e3376d27f00113b005f12c9605017498b898862c9e3fc1 +DIST pure-ftpd-1.0.45.tar.bz2 497695 SHA256 9256db7e59abdba712f84581a3ec47cd5b039034c78825d9dc24ea4eecda7d20 SHA512 bb22b6b88778e2586411318905aa165e590185f7a87ac30761d6250f4de22a1deec6be5441926eae28011d3a5a923bad2ac366e237cc96a4d7932e3dbc9a1f2a WHIRLPOOL 4eebb19342d2580658cac7bb13cf6ecebf70ec5000336565aea6609204befe85a5a96aed1ad24ada6a3b187a4750194d7d4676ea4942f0aff3137b45c9cde139 +DIST pure-ftpd-1.0.46.tar.bz2 490337 SHA256 9e733f366d8d600004bb171cf2ec75dad0da4b922b7102ee4b3e18824966192d SHA512 e44c1842e6f101f4d7dd42617392f3d54ff58d68608f6a3bc5e612fc89bfd1da6935215a7e87c0d2bbd9fc9f0fa31a40ceb764fd67428dfdd8c5454e0d64e0ab WHIRLPOOL b8b9ab6cab507dab9c529be651ef37126134932fb4d853e9ddbe012434e06dade27301523098db72ce8ed8287ef0ed4750284827266a8cdf9359313046780a40 +EBUILD pure-ftpd-1.0.45-r1.ebuild 3896 SHA256 b346e8b929e4122af8eb3f22643a15cf0fd0ecadcc54135feee4b910e3214672 SHA512 285cfa299ff0f5554b1b54163e4d0c9824f404c2eee76cb77831c6989b8bbc089f45b6c0acc969ac35bfc77065082d6a0288ec35c38427204edc0bcef7354176 WHIRLPOOL a134872252c65840faffbffeabd2a050037a3a1707c08200102e8e5f767b64b64bb8ba13b780535d6326efcf0e1b67b3e83a7ad2168d0006e34d65ee965b9e2c +EBUILD pure-ftpd-1.0.46.ebuild 3867 SHA256 dfb09f1ae8b4b720c7d077c6ee1585831879115d045ba4ac5ecd23169ca1973d SHA512 baae36d4332ba3e44b913691fe90e382f55eeff34da12cbbf1d81361db5db8e0d1014329d915972010656131519071f1c983bf7177a59f2bed9ad04ed625859c WHIRLPOOL 565990993d988b685524df339d2c65a5be421b89573e16bef384143b0a4de1abe0f97d9070d66cb1c0df09c6ef278ba12d4daaafc80305c9c31e054646857d3e +MISC ChangeLog 4805 SHA256 4c09d05c1e65224975dd8c33c71c73c68e0df80fd1794147d85ada1aa21bdc87 SHA512 f00511979bbe4cf7e5b7051a165d10021595e0417ad8531b34d278d9c0e84b7f9f5c7cf6e835f630bbf2c2d99fede7dff38b09790dd6cc2e19407a4c05659641 WHIRLPOOL 536b43acf88af51ffe09a69c1588b5c746ea559a05f00595a9c7b52b6c2aad9de0e8be783b6a93a34096ec036558f222ba1add8386ae06894504304a1d2f0b64 +MISC ChangeLog-2015 26402 SHA256 192a65608c963577c608802cf06913574bbb6f92839609a774dcd92e1d955309 SHA512 bb720b13f2e07e33e2345562427273368aad03af1400d340978b98e7376e9f13ac9b0c1b8872a07c1878b0019f16a50e0af4b5de3c68a907a30378a70e20337f WHIRLPOOL 0e4305b08866528e0226344e19dd83786198ae0fb0f2f16f1fd4a9fa61a6e4fb059bdacaceb3a05111481c8f34e7e144de26063dd21ea00981c48b264ad118f7 +MISC metadata.xml 1233 SHA256 b245931d3aa6017e091ea91954375fb66bbae741d29b7e5c258904a59de0cff6 SHA512 ce47470d3c8bfeba9c02f6d6638e7b0bb6e0ddeddd1aaf0362342aadf07e823f1093523a1432c703bd410c3b760049a1e1c32e3f36718844b3a1ba44144afea4 WHIRLPOOL f5f7cf56bd28f06dfba12a9dc67e1a934b893b39e62b6643e45ded0d7d7e473108cc335f5e7438ad4df48d67e58ad0a8fc2393c64079862f5c0f0a0e1abe2a97 diff --git a/net-ftp/pure-ftpd/files/pure-ftpd-1.0.28-pam.patch b/net-ftp/pure-ftpd/files/pure-ftpd-1.0.28-pam.patch new file mode 100644 index 000000000000..8346cf253f4f --- /dev/null +++ b/net-ftp/pure-ftpd/files/pure-ftpd-1.0.28-pam.patch @@ -0,0 +1,20 @@ +--- a/src/log_pam.c ++++ b/src/log_pam.c +@@ -49,7 +49,7 @@ + # endif + + #ifndef FTPD_PAM_SERVICE_NAME +-# define FTPD_PAM_SERVICE_NAME "pure-ftpd" ++# define FTPD_PAM_SERVICE_NAME "ftp" + #endif + + /* Static variables used to communicate between the conversation function +@@ -164,7 +164,7 @@ + &PAM_conversation, &pamh); + PAM_BAIL; + # ifdef PAM_TTY +- (void) pam_set_item(pamh, PAM_TTY, "pure-ftpd"); ++ (void) pam_set_item(pamh, PAM_TTY, FTPD_PAM_SERVICE_NAME); + # endif + # ifdef PAM_RUSER + (void) pam_set_item(pamh, PAM_RUSER, user); diff --git a/net-ftp/pure-ftpd/files/pure-ftpd-1.0.45-openssl-1.1.patch b/net-ftp/pure-ftpd/files/pure-ftpd-1.0.45-openssl-1.1.patch new file mode 100644 index 000000000000..714809f37af1 --- /dev/null +++ b/net-ftp/pure-ftpd/files/pure-ftpd-1.0.45-openssl-1.1.patch @@ -0,0 +1,41 @@ +From 54cc692f997c72eb530f38e62de38ed444eb152e Mon Sep 17 00:00:00 2001 +From: Frank Denis +Date: Wed, 5 Apr 2017 12:30:32 -0700 +Subject: [PATCH] Add strict support for the OpenSSL 1.1 API + +--- + src/tls.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/src/tls.c b/src/tls.c +index 3c87bbb..21c83b2 100644 +--- a/src/tls.c ++++ b/src/tls.c +@@ -258,9 +258,17 @@ int tls_init_library(void) + + tls_cnx_handshook = 0; + tls_data_cnx_handshook = 0; ++# if OPENSSL_VERSION_NUMBER < 0x10100000L + SSL_library_init(); + SSL_load_error_strings(); + OpenSSL_add_all_algorithms(); ++# else ++ OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS | ++ OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL); ++ OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS | ++ OPENSSL_INIT_ADD_ALL_DIGESTS | ++ OPENSSL_INIT_LOAD_CONFIG, NULL); ++# endif + while (RAND_status() == 0) { + rnd = zrand(); + RAND_seed(&rnd, (int) sizeof rnd); +@@ -347,7 +355,9 @@ void tls_free_library(void) + SSL_CTX_free(tls_ctx); + tls_ctx = NULL; + } ++# if OPENSSL_API_COMPAT < 0x10100000L + EVP_cleanup(); ++# endif + } + + int tls_init_new_session(void) diff --git a/net-ftp/pure-ftpd/files/pure-ftpd.conf_d-3 b/net-ftp/pure-ftpd/files/pure-ftpd.conf_d-3 new file mode 100644 index 000000000000..29b15a5a8928 --- /dev/null +++ b/net-ftp/pure-ftpd/files/pure-ftpd.conf_d-3 @@ -0,0 +1,90 @@ +# Config file for /etc/init.d/pure-ftpd +##Comment variables out to disable its features, or change the values in it... ## + +## This variable must be uncommented in order for the server to start ## +#IS_CONFIGURED="yes" + +## FTP Server,Port (separated by comma) ## +## If you prefer host names over IP addresses, it's your choice: +## SERVER="-S ftp.rtchat.com,21" +## IPv6 addresses are supported. +## !!! WARNING !!! +## Using an invalid IP will result in the server not starting, +## but reporting a correct start! +## SERVER="-S 192.168.0.1,21" +## By default binds to all available IPs. +SERVER="-S 21" + +## Number of simultaneous connections in total, and per IP ## +MAX_CONN="-c 30" +MAX_CONN_IP="-C 10" + +## Don't allow uploads if the partition is more full then this var ## +DISK_FULL="-k 90%" + +## If your FTP server is behind a NAT box, uncomment this ## +#USE_NAT="-N" + +## Authentication mechanisms (others are 'pam', ...) ## +## Further infos can be found in the README file. +AUTH="-l unix" + +## Change the maximum idle time (in minutes) ## +## If this variable is not defined, it will default to 15 minutes. +#TIMEOUT="-I '" + +## Facility used for syslog logging ## +## If this variable is not defined, it will default to the 'ftp' facility. +## Logging can be disabled with '-f none'. +#LOG="-f " + +## Charset conversion support *experimental* ## +## Only works if USE "charconv" is enabled (only Pure-FTPd >=1.0.21). +## Set the charset of the filesystem. +# CHARCONV="--fscharset " + +## If you want to process each file uploaded through Pure-FTPd, enter the name +## of the script that should process the files below. +## man pure-uploadscript to learn more about how to write this script. +# UPLOADSCRIPT="/path/to/uploadscript" + +## Misc. Others ## +MISC_OTHER="-A -x -j -R -Z" + +# +# Use these inside $MISC_OTHER +# More can be found on "http://download.pureftpd.org/pub/pure-ftpd/doc/README" +# +# -A [ chroot() everyone, but root ] +# -e [ Only allow anonymous users ] +# -E [ Only allow authenticated users. Anonymous logins are prohibited. ] +# -i [ Disallow upload for anonymous users, whatever directory perms are ] +# -j [ If the home directory of a user doesn't exist, auto-create it ] +# -M [ Allow anonymous users to create directories. ] +# -R [ Disallow users (even non-anonymous ones) usage of the CHMOD command ] +# -x [ In normal operation mode, authenticated users can read/write +# files beginning with a dot ('.'). Anonymous users can't, for security reasons +# (like changing banners or a forgotten .rhosts). When '-x' is used, authenticated +# users can download dot-files, but not overwrite/create them, even if they own +# them. ] +# -X [ This flag is identical to the previous one (writing +# dot-files is prohibited), but in addition, users can't even *read* files and +# directories beginning with a dot (like "cd .ssh"). ] +# -D [ List files beginning with a dot ('.') even when the client doesn't +# append the '-a' option to the list command. A workaround for badly +# configured FTP clients. ] +# -G [ Disallow renaming. ] +# -d [ Send various debugging messages to the syslog. ONLY for DEBUG ] +# -F [ Display a fortune cookie on login. Check the README file ] +# -H [ By default, fully-qualified host names are logged. The '-H' flag avoids host names resolution. ] + + +# Some filesystems don't like accesses being memory mapped. This happens for +# example with ftpwho on JFFS2 filesystems (bug #330563). If you happen to +# have such a filesystem on /var set TMPFS_MOUNT to "true". +TMPFS_MOUNT="false" + +# Special mount options (like nosuid or nodev) for the tmpfs mount can be added +# here. Several options must be separated by comma: "nodev,nosuid" +#TMPFS_OPTS="" + diff --git a/net-ftp/pure-ftpd/files/pure-ftpd.rc11 b/net-ftp/pure-ftpd/files/pure-ftpd.rc11 new file mode 100644 index 000000000000..cc17b5afa12d --- /dev/null +++ b/net-ftp/pure-ftpd/files/pure-ftpd.rc11 @@ -0,0 +1,74 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +ftpd_pidfile="/var/run/pure-ftpd.pid" +script_pidfile="/var/run/pure-uploadscript.pid" +ftpd_rundir="/var/lib/run/pure-ftpd" +daemon="/usr/sbin/pure-ftpd" +script_daemon="/usr/sbin/pure-uploadscript" + +depend() { + need net +} + +start_pre() { + if [ -z "$IS_CONFIGURED" ] ; then + eerror "You need to setup /etc/conf.d/pure-ftpd first!" + return 1 + fi +} + +start() { + UPSCRIPT="" + if [ -n "$UPLOADSCRIPT" ] ; then + UPSCRIPT="--uploadscript" + fi + + FTPD_CONFIG="$SERVER $MAX_CONN $MAX_CONN_IP $DISK_FULL $USE_NAT $AUTH + $LOG $TIMEOUT $CHARCONV $MISC_OTHER $UPSCRIPT" + + WAIT="--wait 100" + + if ${TMPFS_MOUNT:-false} && grep -q tmpfs /proc/filesystems ; then + [ -n "${TMPFS_OPTS}" ] && MOUNT_OPTS="-o ${TMPFS_OPTS}" + einfo "Mounting tmpfs on ${ftpd_rundir}" + mount ${MOUNT_OPTS} -t tmpfs tmpfs ${ftpd_rundir} \ + || eerror "Unable to mount tmpfs" + fi + + ebegin "Starting Pure-FTPd" + start-stop-daemon --start --quiet --pidfile ${ftpd_pidfile} \ + --make-pidfile --background --exec /usr/sbin/pure-ftpd ${WAIT} \ + -- $(echo ${FTPD_CONFIG} | sed 's@\([[:space:]]\+\|^\)-B\([[:space:]]\+\|$\)@\1@g') + result=$? + if [ $result -ne 0 ] ; then + eend 1 "Could not launch Pure-FTPd" + else + eend $result + if [ -n "$UPLOADSCRIPT" ] ; then + ebegin "Starting Pure-FTPd upload script" + start-stop-daemon --start --quiet --make-pidfile \ + --pidfile ${script_pidfile} \ + --exec ${script_daemon} --background ${WAIT} \ + -- -r $UPLOADSCRIPT + eend $? + fi + fi +} + +stop() { + if [ -n "$UPLOADSCRIPT" ] ; then + ebegin "Stopping Pure-FTPd upload script" + start-stop-daemon --stop --retry 20 --quiet \ + --pidfile ${script_pidfile} + eend $? + fi + ebegin "Stopping Pure-FTPd" + start-stop-daemon --stop --retry 20 --quiet --pidfile ${ftpd_pidfile} + eend $? + + if ${TMPFS_MOUNT:-false} && mount | grep -q ${ftpd_rundir} ; then + umount ${ftpd_rundir} >/dev/null 2>&1 + fi +} diff --git a/net-ftp/pure-ftpd/files/pure-ftpd.xinetd b/net-ftp/pure-ftpd/files/pure-ftpd.xinetd new file mode 100644 index 000000000000..11022e6fde8d --- /dev/null +++ b/net-ftp/pure-ftpd/files/pure-ftpd.xinetd @@ -0,0 +1,13 @@ +# +# Pure-FTPd FTP daemon - http://www.pureftpd.org +# +service ftp +{ + socket_type = stream + wait = no + user = root + server = /usr/sbin/pure-ftpd + server_args = -s -a 42 + protocol = tcp + disable = yes +} diff --git a/net-ftp/pure-ftpd/metadata.xml b/net-ftp/pure-ftpd/metadata.xml new file mode 100644 index 000000000000..5ee42de87aec --- /dev/null +++ b/net-ftp/pure-ftpd/metadata.xml @@ -0,0 +1,25 @@ + + + + + polynomial-c@gentoo.org + Lars Wendler + +Free (BSD), secure, production-quality and standard-conformant FTP server based upon Troll-FTPd. It doesn't provide useless bells and whistles, but focuses on efficiency and ease of use. + + Permit anonymous to delete files + Permit anonymous to change file permissions + Permit anonymous to rename files + Permit anonymous to resume file transfers + Enables charset conversion + Enable TLS on Port 990 + Disables logging of IP addresses + Display paranoid messages instead of normal + ones + Resolve UIDs/GIDs + Enables system quota support (needs sys-fs/quota) + + Enable support for virtual chroot (possible security + risk) + + diff --git a/net-ftp/pure-ftpd/pure-ftpd-1.0.45-r1.ebuild b/net-ftp/pure-ftpd/pure-ftpd-1.0.45-r1.ebuild new file mode 100644 index 000000000000..7dcc0d9aee3d --- /dev/null +++ b/net-ftp/pure-ftpd/pure-ftpd-1.0.45-r1.ebuild @@ -0,0 +1,137 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit eutils flag-o-matic + +KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86" + +DESCRIPTION="Fast, production-quality, standard-conformant FTP server" +HOMEPAGE="http://www.pureftpd.org/" +SRC_URI="ftp://ftp.pureftpd.org/pub/${PN}/releases/${P}.tar.bz2 + http://download.pureftpd.org/pub/${PN}/releases/${P}.tar.bz2" + +LICENSE="BSD" +SLOT="0" + +IUSE="anondel anonperm anonren anonres caps charconv implicittls ldap libressl mysql noiplog pam paranoidmsg postgres resolveids selinux ssl sysquota vchroot xinetd" + +REQUIRED_USE="implicittls? ( ssl )" + +DEPEND="caps? ( sys-libs/libcap ) + charconv? ( virtual/libiconv ) + ldap? ( >=net-nds/openldap-2.0.25 ) + mysql? ( virtual/mysql ) + pam? ( virtual/pam ) + postgres? ( dev-db/postgresql:= ) + ssl? ( + !libressl? ( >=dev-libs/openssl-0.9.6g:0=[-bindist] ) + libressl? ( dev-libs/libressl:= ) + ) + sysquota? ( sys-fs/quota[-rpc] ) + xinetd? ( virtual/inetd )" + +RDEPEND="${DEPEND} + dev-libs/libsodium:= + net-ftp/ftpbase + selinux? ( sec-policy/selinux-ftp )" + +PATCHES=( + "${FILESDIR}"/${PN}-1.0.28-pam.patch + "${FILESDIR}"/${P}-openssl-1.1.patch +) + +src_configure() { + # adjust max user length to something more appropriate + # for virtual hosts. See bug #62472 for details. + sed -e "s:# define MAX_USER_LENGTH 32U:# define MAX_USER_LENGTH 127U:" \ + -i "${S}/src/ftpd.h" || die "sed failed" + + # Those features are only configurable like this, see bug #179375. + use anondel && append-cppflags -DANON_CAN_DELETE + use anonperm && append-cppflags -DANON_CAN_CHANGE_PERMS + use anonren && append-cppflags -DANON_CAN_RENAME + use anonres && append-cppflags -DANON_CAN_RESUME + use resolveids && append-cppflags -DALWAYS_RESOLVE_IDS + + # Do not auto-use SSP -- let the user select this. + export ax_cv_check_cflags___fstack_protector_all=no + + local myeconfargs=( + --enable-largefile + --with-altlog + --with-cookie + --with-diraliases + --with-extauth + --with-ftpwho + --with-language=${PUREFTPD_LANG:=english} + --with-peruserlimits + --with-privsep + --with-puredb + --with-quotas + --with-ratios + --with-throttling + --with-uploadscript + --with-virtualhosts + $(use_with charconv rfc2640) + $(use_with ldap) + $(use_with mysql) + $(use_with pam) + $(use_with paranoidmsg) + $(use_with postgres pgsql) + $(use_with ssl tls) + $(use_with implicittls) + $(use_with vchroot virtualchroot) + $(use_with sysquota sysquotas) + $(usex caps '' '--without-capabilities') + $(usex noiplog '--without-iplogging' '') + $(usex xinetd '' '--without-inetd') + ) + econf "${myeconfargs[@]}" +} + +src_install() { + local DOCS=( AUTHORS CONTACT ChangeLog FAQ HISTORY INSTALL README* NEWS ) + + default + + newinitd "${FILESDIR}/pure-ftpd.rc11" ${PN} + newconfd "${FILESDIR}/pure-ftpd.conf_d-3" ${PN} + + if use implicittls ; then + sed -i '/^SERVER/s@21@990@' "${ED}"/etc/conf.d/${PN} \ + || die "Adjusting default server port for implicittls usage failed!" + fi + + keepdir /var/lib/run/${PN} + + if use xinetd ; then + insinto /etc/xinetd.d + newins "${FILESDIR}/pure-ftpd.xinetd" ${PN} + fi + + if use ldap ; then + insinto /etc/openldap/schema + doins pureftpd.schema + insinto /etc/openldap + insopts -m 0600 + doins pureftpd-ldap.conf + fi +} + +pkg_postinst() { + if [[ -z "${REPLACING_VERSIONS}" ]]; then + # This is a new installation + elog + elog "Before starting Pure-FTPd, you have to edit the /etc/conf.d/pure-ftpd file!" + elog + ewarn "It's *really* important to read the README provided with Pure-FTPd!" + ewarn "Check out http://download.pureftpd.org/pub/pure-ftpd/doc/README for general info" + ewarn "and http://download.pureftpd.org/pub/pure-ftpd/doc/README.TLS for SSL/TLS info." + ewarn + if use charconv ; then + ewarn "Charset conversion is an *experimental* feature!" + ewarn "Remember to set a valid charset for your filesystem in the configuration!" + fi + fi +} diff --git a/net-ftp/pure-ftpd/pure-ftpd-1.0.46.ebuild b/net-ftp/pure-ftpd/pure-ftpd-1.0.46.ebuild new file mode 100644 index 000000000000..0666f54ec764 --- /dev/null +++ b/net-ftp/pure-ftpd/pure-ftpd-1.0.46.ebuild @@ -0,0 +1,136 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit eutils flag-o-matic + +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" + +DESCRIPTION="Fast, production-quality, standard-conformant FTP server" +HOMEPAGE="http://www.pureftpd.org/" +SRC_URI="ftp://ftp.pureftpd.org/pub/${PN}/releases/${P}.tar.bz2 + http://download.pureftpd.org/pub/${PN}/releases/${P}.tar.bz2" + +LICENSE="BSD" +SLOT="0" + +IUSE="anondel anonperm anonren anonres caps charconv implicittls ldap libressl mysql noiplog pam paranoidmsg postgres resolveids selinux ssl sysquota vchroot xinetd" + +REQUIRED_USE="implicittls? ( ssl )" + +DEPEND="caps? ( sys-libs/libcap ) + charconv? ( virtual/libiconv ) + ldap? ( >=net-nds/openldap-2.0.25 ) + mysql? ( virtual/mysql ) + pam? ( virtual/pam ) + postgres? ( dev-db/postgresql:= ) + ssl? ( + !libressl? ( >=dev-libs/openssl-0.9.6g:0=[-bindist] ) + libressl? ( dev-libs/libressl:= ) + ) + sysquota? ( sys-fs/quota[-rpc] ) + xinetd? ( virtual/inetd )" + +RDEPEND="${DEPEND} + dev-libs/libsodium:= + net-ftp/ftpbase + selinux? ( sec-policy/selinux-ftp )" + +PATCHES=( + "${FILESDIR}"/${PN}-1.0.28-pam.patch +) + +src_configure() { + # adjust max user length to something more appropriate + # for virtual hosts. See bug #62472 for details. + sed -e "s:# define MAX_USER_LENGTH 32U:# define MAX_USER_LENGTH 127U:" \ + -i "${S}/src/ftpd.h" || die "sed failed" + + # Those features are only configurable like this, see bug #179375. + use anondel && append-cppflags -DANON_CAN_DELETE + use anonperm && append-cppflags -DANON_CAN_CHANGE_PERMS + use anonren && append-cppflags -DANON_CAN_RENAME + use anonres && append-cppflags -DANON_CAN_RESUME + use resolveids && append-cppflags -DALWAYS_RESOLVE_IDS + + # Do not auto-use SSP -- let the user select this. + export ax_cv_check_cflags___fstack_protector_all=no + + local myeconfargs=( + --enable-largefile + --with-altlog + --with-cookie + --with-diraliases + --with-extauth + --with-ftpwho + --with-language=${PUREFTPD_LANG:=english} + --with-peruserlimits + --with-privsep + --with-puredb + --with-quotas + --with-ratios + --with-throttling + --with-uploadscript + --with-virtualhosts + $(use_with charconv rfc2640) + $(use_with ldap) + $(use_with mysql) + $(use_with pam) + $(use_with paranoidmsg) + $(use_with postgres pgsql) + $(use_with ssl tls) + $(use_with implicittls) + $(use_with vchroot virtualchroot) + $(use_with sysquota sysquotas) + $(usex caps '' '--without-capabilities') + $(usex noiplog '--without-iplogging' '') + $(usex xinetd '' '--without-inetd') + ) + econf "${myeconfargs[@]}" +} + +src_install() { + local DOCS=( AUTHORS CONTACT ChangeLog FAQ HISTORY INSTALL README* NEWS ) + + default + + newinitd "${FILESDIR}/pure-ftpd.rc11" ${PN} + newconfd "${FILESDIR}/pure-ftpd.conf_d-3" ${PN} + + if use implicittls ; then + sed -i '/^SERVER/s@21@990@' "${ED}"/etc/conf.d/${PN} \ + || die "Adjusting default server port for implicittls usage failed!" + fi + + keepdir /var/lib/run/${PN} + + if use xinetd ; then + insinto /etc/xinetd.d + newins "${FILESDIR}/pure-ftpd.xinetd" ${PN} + fi + + if use ldap ; then + insinto /etc/openldap/schema + doins pureftpd.schema + insinto /etc/openldap + insopts -m 0600 + doins pureftpd-ldap.conf + fi +} + +pkg_postinst() { + if [[ -z "${REPLACING_VERSIONS}" ]]; then + # This is a new installation + elog + elog "Before starting Pure-FTPd, you have to edit the /etc/conf.d/pure-ftpd file!" + elog + ewarn "It's *really* important to read the README provided with Pure-FTPd!" + ewarn "Check out http://download.pureftpd.org/pub/pure-ftpd/doc/README for general info" + ewarn "and http://download.pureftpd.org/pub/pure-ftpd/doc/README.TLS for SSL/TLS info." + ewarn + if use charconv ; then + ewarn "Charset conversion is an *experimental* feature!" + ewarn "Remember to set a valid charset for your filesystem in the configuration!" + fi + fi +} -- cgit v1.2.3