summaryrefslogtreecommitdiff
path: root/patches/source/vsftpd
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2018-05-25 23:29:36 +0000
committerEric Hameleers <alien@slackware.com>2018-05-31 15:10:50 -0700
commit329684b59b8d55dd403c2c59f76d37210ba2f517 (patch)
tree10421c6ee3bf179d50915cc00d4c15c1b83cb77a /patches/source/vsftpd
parentb76270bf9e6dd375e495fec92140a79a79415d27 (diff)
downloadcurrent-329684b59b8d55dd403c2c59f76d37210ba2f517.tar.gz
Fri May 25 23:29:36 UTC 201813.1
patches/packages/glibc-zoneinfo-2018e-noarch-2_slack13.1.txz: Rebuilt. Handle removal of US/Pacific-New timezone. If we see that the machine is using this, it will be automatically switched to US/Pacific.
Diffstat (limited to 'patches/source/vsftpd')
-rw-r--r--patches/source/vsftpd/doinst.sh15
-rw-r--r--patches/source/vsftpd/slack-desc19
-rwxr-xr-xpatches/source/vsftpd/vsftpd.SlackBuild106
-rw-r--r--patches/source/vsftpd/vsftpd.builddefs.diff15
-rw-r--r--patches/source/vsftpd/vsftpd.conf.diff45
-rw-r--r--patches/source/vsftpd/vsftpd.log5
6 files changed, 205 insertions, 0 deletions
diff --git a/patches/source/vsftpd/doinst.sh b/patches/source/vsftpd/doinst.sh
new file mode 100644
index 00000000..f915774f
--- /dev/null
+++ b/patches/source/vsftpd/doinst.sh
@@ -0,0 +1,15 @@
+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/vsftpd.conf.new
+config etc/logrotate.d/vsftpd.new
+rm -f etc/logrotate.d/vsftpd.new
+
diff --git a/patches/source/vsftpd/slack-desc b/patches/source/vsftpd/slack-desc
new file mode 100644
index 00000000..82b9f521
--- /dev/null
+++ b/patches/source/vsftpd/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------------------------------------------------------|
+vsftpd: vsftpd (Very Secure FTP Daemon)
+vsftpd:
+vsftpd: vsftpd is an FTP server, or daemon. The 'vs' stands for Very Secure.
+vsftpd: Obviously this is not a guarantee, but a reflection that the entire
+vsftpd: codebase was written with security in mind, and carefully designed to
+vsftpd: be resilient to attack (as well as extremely fast and scalable).
+vsftpd:
+vsftpd: The vsftpd homepage is http://vsftpd.beasts.org/
+vsftpd:
+vsftpd: The Very Secure FTP Daemon was written by Chris Evans.
+vsftpd:
diff --git a/patches/source/vsftpd/vsftpd.SlackBuild b/patches/source/vsftpd/vsftpd.SlackBuild
new file mode 100755
index 00000000..96d8dfbb
--- /dev/null
+++ b/patches/source/vsftpd/vsftpd.SlackBuild
@@ -0,0 +1,106 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2012 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.
+
+PKGNAM=vsftpd
+VERSION=${VERSION:-$(echo ${PKGNAM}-*.tar.gz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack13.1}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-vsftpd
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP || exit 1
+rm -rf vsftpd-$VERSION
+tar xvf $CWD/vsftpd-$VERSION.tar.gz || exit 1
+cd vsftpd-$VERSION || 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 {} \;
+
+zcat $CWD/vsftpd.builddefs.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/vsftpd.conf.diff.gz | patch -p1 --verbose || exit 1
+
+make $NUMJOBS || make || exit 1
+
+mkdir -p $PKG/usr/sbin
+cp vsftpd $PKG/usr/sbin
+chmod 755 $PKG/usr/sbin/vsftpd
+strip --strip-unneeded $PKG/usr/sbin/vsftpd
+
+mkdir -p $PKG/usr/man/man{5,8}
+cat vsftpd.conf.5 | gzip -9c > $PKG/usr/man/man5/vsftpd.conf.5.gz
+cat vsftpd.8 | gzip -9c > $PKG/usr/man/man8/vsftpd.8.gz
+
+mkdir -p $PKG/etc
+cat vsftpd.conf > $PKG/etc/vsftpd.conf.new
+
+mkdir -p $PKG/etc/logrotate.d
+zcat $CWD/vsftpd.log.gz > $PKG/etc/logrotate.d/vsftpd.new
+
+mkdir -p $PKG/usr/share/empty
+mkdir -p $PKG/home/ftp
+
+mkdir -p $PKG/usr/doc/vsftpd-$VERSION
+cp -a \
+ AUDIT BENCHMARKS BUGS COPYING* COPYRIGHT EXAMPLE FAQ \
+ INSTALL LICENSE README* REFS REWARD SECURITY SIZE SPEED TODO TUNING \
+ $PKG/usr/doc/vsftpd-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r Changelog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat Changelog | head -n 1000 > $DOCSDIR/Changelog
+ touch -r Changelog $DOCSDIR/Changelog
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/vsftpd-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/vsftpd/vsftpd.builddefs.diff b/patches/source/vsftpd/vsftpd.builddefs.diff
new file mode 100644
index 00000000..ea908139
--- /dev/null
+++ b/patches/source/vsftpd/vsftpd.builddefs.diff
@@ -0,0 +1,15 @@
+--- ./builddefs.h.orig 2004-07-02 07:36:59.000000000 -0700
++++ ./builddefs.h 2004-09-03 11:25:13.000000000 -0700
+@@ -1,9 +1,9 @@
+ #ifndef VSF_BUILDDEFS_H
+ #define VSF_BUILDDEFS_H
+
+-#undef VSF_BUILD_TCPWRAPPERS
+-#define VSF_BUILD_PAM
+-#undef VSF_BUILD_SSL
++#define VSF_BUILD_TCPWRAPPERS
++#undef VSF_BUILD_PAM
++#define VSF_BUILD_SSL
+
+ #endif /* VSF_BUILDDEFS_H */
+
diff --git a/patches/source/vsftpd/vsftpd.conf.diff b/patches/source/vsftpd/vsftpd.conf.diff
new file mode 100644
index 00000000..1f410a7a
--- /dev/null
+++ b/patches/source/vsftpd/vsftpd.conf.diff
@@ -0,0 +1,45 @@
+diff -Nur vsftpd-2.2.1.orig/vsftpd.conf vsftpd-2.2.1/vsftpd.conf
+--- vsftpd-2.2.1.orig/vsftpd.conf 2009-10-18 21:04:23.000000000 -0500
++++ vsftpd-2.2.1/vsftpd.conf 2009-10-19 10:22:16.609407947 -0500
+@@ -19,7 +19,7 @@
+ #
+ # Default umask for local users is 077. You may wish to change this to 022,
+ # if your users expect that (022 is used by most other ftpd's)
+-#local_umask=022
++local_umask=022
+ #
+ # Uncomment this to allow the anonymous FTP user to upload files. This only
+ # has an effect if the above global write enable is activated. Also, you will
+@@ -48,11 +48,11 @@
+ #
+ # You may override where the log file goes if you like. The default is shown
+ # below.
+-#xferlog_file=/var/log/vsftpd.log
++xferlog_file=/var/log/vsftpd.log
+ #
+ # If you want, you can have your log file in standard ftpd xferlog format.
+ # Note that the default log file location is /var/log/xferlog in this case.
+-#xferlog_std_format=YES
++xferlog_std_format=YES
+ #
+ # You may change the default value for timing out an idle session.
+ #idle_session_timeout=600
+@@ -101,12 +101,13 @@
+ # default to avoid remote users being able to cause excessive I/O on large
+ # sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
+ # the presence of the "-R" option, so there is a strong case for enabling it.
+-#ls_recurse_enable=YES
++ls_recurse_enable=YES
+ #
+-# When "listen" directive is enabled, vsftpd runs in standalone mode and
+-# listens on IPv4 sockets. This directive cannot be used in conjunction
+-# with the listen_ipv6 directive.
+-listen=YES
++# When "listen" directive is enabled, vsftpd runs in standalone mode (rather
++# than from inetd) and listens on IPv4 sockets. To use vsftpd in standalone
++# mode rather than with inetd, change the line below to 'listen=YES'
++# This directive cannot be used in conjunction with the listen_ipv6 directive.
++listen=NO
+ #
+ # This directive enables listening on IPv6 sockets. To listen on IPv4 and IPv6
+ # sockets, you must run two copies of vsftpd with two configuration files.
diff --git a/patches/source/vsftpd/vsftpd.log b/patches/source/vsftpd/vsftpd.log
new file mode 100644
index 00000000..d338de81
--- /dev/null
+++ b/patches/source/vsftpd/vsftpd.log
@@ -0,0 +1,5 @@
+/var/log/vsftpd.log {
+ # ftpd doesn't handle SIGHUP properly
+ nocompress
+ missingok
+}