summaryrefslogtreecommitdiffstats
path: root/source/n/proftpd
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2009-08-26 10:00:38 -0500
committer Eric Hameleers <alien@slackware.com>2018-05-31 22:41:17 +0200
commit5a12e7c134274dba706667107d10d231517d3e05 (patch)
tree55718d5acb710fde798d9f38d0bbaf594ed4b296 /source/n/proftpd
downloadcurrent-5a12e7c134274dba706667107d10d231517d3e05.tar.gz
current-5a12e7c134274dba706667107d10d231517d3e05.tar.xz
Slackware 13.0slackware-13.0
Wed Aug 26 10:00:38 CDT 2009 Slackware 13.0 x86_64 is released as stable! Thanks to everyone who helped make this release possible -- see the RELEASE_NOTES for the credits. The ISOs are off to the replicator. This time it will be a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. We're taking pre-orders now at store.slackware.com. Please consider picking up a copy to help support the project. Once again, thanks to the entire Slackware community for all the help testing and fixing things and offering suggestions during this development cycle. As always, have fun and enjoy! -P.
Diffstat (limited to 'source/n/proftpd')
-rw-r--r--source/n/proftpd/doinst.sh18
-rw-r--r--source/n/proftpd/etc/ftpusers22
-rw-r--r--source/n/proftpd/etc/proftpd.conf74
-rwxr-xr-xsource/n/proftpd/proftpd.SlackBuild117
-rw-r--r--source/n/proftpd/slack-desc19
5 files changed, 250 insertions, 0 deletions
diff --git a/source/n/proftpd/doinst.sh b/source/n/proftpd/doinst.sh
new file mode 100644
index 000000000..37fe02dd9
--- /dev/null
+++ b/source/n/proftpd/doinst.sh
@@ -0,0 +1,18 @@
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/ftpusers.new
+config etc/proftpd.conf.new
+
+# Remove any old proftpd files:
+rm -f var/run/proftpd/proftpd*
+
diff --git a/source/n/proftpd/etc/ftpusers b/source/n/proftpd/etc/ftpusers
new file mode 100644
index 000000000..d08f2a1fd
--- /dev/null
+++ b/source/n/proftpd/etc/ftpusers
@@ -0,0 +1,22 @@
+#
+# ftpusers This file describes the names of the users that may
+# _*NOT*_ log into the system via the FTP server.
+# This usually includes "root", "uucp", "news" and the
+# like, because those users have too much power to be
+# allowed to do "just" FTP...
+#
+#
+# Version: @(#)/etc/ftpusers 3.00 02/25/2001 volkerdi
+#
+# Original Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+#
+# The entire line gets matched, so no comments or extra characters on
+# lines containing a username.
+#
+# To enable anonymous FTP, remove the "ftp" user:
+ftp
+root
+uucp
+news
+
+# End of ftpusers.
diff --git a/source/n/proftpd/etc/proftpd.conf b/source/n/proftpd/etc/proftpd.conf
new file mode 100644
index 000000000..ffb0df3fe
--- /dev/null
+++ b/source/n/proftpd/etc/proftpd.conf
@@ -0,0 +1,74 @@
+# This is a basic ProFTPD configuration file.
+# It establishes a single server and a single anonymous login.
+# It assumes that you have a user/group "nobody" and "ftp"
+# for normal/anonymous operation.
+
+ServerName "ProFTPD Default Installation"
+#ServerType standalone
+ServerType inetd
+DefaultServer on
+
+# Port 21 is the standard FTP port.
+Port 21
+# 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
+# in standalone mode, in inetd mode you should use an inetd server
+# that allows you to limit maximum number of processes per service
+# (such as xinetd)
+MaxInstances 30
+
+# Set the user and group that the server normally runs at.
+User nobody
+Group nogroup
+
+# This next option is required for NIS or NIS+ to work properly:
+#PersistentPasswd off
+
+SystemLog /var/log/proftpd.log
+TransferLog /var/log/xferlog
+
+# Normally, we want files to be overwriteable.
+<Directory /*>
+ AllowOverwrite on
+</Directory>
+
+# A basic anonymous FTP server configuration.
+# To enable this, remove the user ftp from /etc/ftpusers.
+<Anonymous ~ftp>
+ RequireValidShell off
+ User ftp
+ Group 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 50
+
+ # 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>
+
+ # An upload directory that allows storing files but not retrieving
+ # or creating directories.
+# <Directory incoming/*>
+# <Limit READ>
+# DenyAll
+# </Limit>
+#
+# <Limit STOR>
+# AllowAll
+# </Limit>
+# </Directory>
+
+</Anonymous>
diff --git a/source/n/proftpd/proftpd.SlackBuild b/source/n/proftpd/proftpd.SlackBuild
new file mode 100755
index 000000000..b004745ab
--- /dev/null
+++ b/source/n/proftpd/proftpd.SlackBuild
@@ -0,0 +1,117 @@
+#!/bin/sh
+
+# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+VERSION=1.3.2
+DIRVER=1.3.2
+ARCH=${ARCH:-x86_64}
+BUILD=${BUILD:-2}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-proftpd
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf proftpd-$VERSION
+tar xvf $CWD/proftpd-$VERSION.tar.bz2 || exit 1
+cd proftpd-$DIRVER || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --sysconfdir=/etc \
+ --enable-autoshadow \
+ --enable-ctrls \
+ --enable-ipv6 \
+ --localstatedir=/var/run \
+ --with-modules=mod_readme:mod_ratio:mod_tls:mod_wrap:mod_ctrls_admin \
+ --build=$ARCH-slackware-linux
+# This caused funny messages about "Quotas off" with every FTP command,
+# and mod_wrap gets a compile error:
+# --with-modules= ... mod_quota ...
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# With no library to link against, these are useless:
+rm -rf $PKG/usr/include
+rm -f $PKG/etc/*
+rmdir $PKG/usr/libexec 2> /dev/null
+
+cat $CWD/etc/proftpd.conf > $PKG/etc/proftpd.conf.new
+cat $CWD/etc/ftpusers > $PKG/etc/ftpusers.new
+mkdir -p $PKG/home/ftp
+
+gzip -9 $PKG/usr/man/man?/*.?
+
+mkdir -p $PKG/usr/doc/proftpd-$VERSION
+cp -a COPYING CREDITS INSTALL NEWS README* \
+ contrib/README.mod_wrap contrib/README.ratio \
+ $PKG/usr/doc/proftpd-$VERSION
+head -c 93 ChangeLog > $PKG/usr/doc/proftpd-$VERSION/ChangeLog
+touch -r ChangeLog $PKG/usr/doc/proftpd-$VERSION/ChangeLog
+cp -a contrib/README $PKG/usr/doc/proftpd-$VERSION/README.contrib
+cp -a doc sample-configurations $PKG/usr/doc/proftpd-$VERSION
+# Bloat removal:
+( cd $PKG/usr/doc
+ find . -name "*.sgml" -exec rm {} \;
+ find . -name "*.pdf" -exec rm {} \;
+)
+rmdir $PKG/usr/share/locale
+rmdir $PKG/usr/share
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mkdir -p $PKG/install
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/proftpd-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/source/n/proftpd/slack-desc b/source/n/proftpd/slack-desc
new file mode 100644
index 000000000..5ed80ca92
--- /dev/null
+++ b/source/n/proftpd/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+proftpd: proftpd (FTP server daemon)
+proftpd:
+proftpd: ProFTPD is the Professional File Transfer Protocol (FTP) server
+proftpd: daemon. ProFTPD grew out of the desire to have a secure and
+proftpd: configurable FTP server, and out of a significant admiration of the
+proftpd: Apache web server.
+proftpd:
+proftpd:
+proftpd:
+proftpd:
+proftpd: