From 8ff4f2f51a6cf07fc33742ce3bee81328896e49b Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Fri, 25 May 2018 23:29:36 +0000 Subject: Fri May 25 23:29:36 UTC 2018 patches/packages/glibc-zoneinfo-2018e-noarch-2_slack14.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. --- patches/source/proftpd/doinst.sh | 18 ++++ patches/source/proftpd/etc/ftpusers | 22 +++++ patches/source/proftpd/etc/proftpd.conf | 74 ++++++++++++++++ patches/source/proftpd/proftpd.SlackBuild | 138 ++++++++++++++++++++++++++++++ patches/source/proftpd/slack-desc | 19 ++++ 5 files changed, 271 insertions(+) create mode 100644 patches/source/proftpd/doinst.sh create mode 100644 patches/source/proftpd/etc/ftpusers create mode 100644 patches/source/proftpd/etc/proftpd.conf create mode 100755 patches/source/proftpd/proftpd.SlackBuild create mode 100644 patches/source/proftpd/slack-desc (limited to 'patches/source/proftpd') diff --git a/patches/source/proftpd/doinst.sh b/patches/source/proftpd/doinst.sh new file mode 100644 index 000000000..37fe02dd9 --- /dev/null +++ b/patches/source/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/patches/source/proftpd/etc/ftpusers b/patches/source/proftpd/etc/ftpusers new file mode 100644 index 000000000..d08f2a1fd --- /dev/null +++ b/patches/source/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, +# +# 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/patches/source/proftpd/etc/proftpd.conf b/patches/source/proftpd/etc/proftpd.conf new file mode 100644 index 000000000..ffb0df3fe --- /dev/null +++ b/patches/source/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. + + AllowOverwrite on + + +# A basic anonymous FTP server configuration. +# To enable this, remove the user ftp from /etc/ftpusers. + + 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 + + DenyAll + + + # An upload directory that allows storing files but not retrieving + # or creating directories. +# +# +# DenyAll +# +# +# +# AllowAll +# +# + + diff --git a/patches/source/proftpd/proftpd.SlackBuild b/patches/source/proftpd/proftpd.SlackBuild new file mode 100755 index 000000000..0d36f7195 --- /dev/null +++ b/patches/source/proftpd/proftpd.SlackBuild @@ -0,0 +1,138 @@ +#!/bin/sh + +# Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2015 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.5e +DIRVER=1.3.5e +BUILD=${BUILD:-1_slack14.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" = "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" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +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.?z* || 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_radius:mod_ban:mod_readme:mod_ratio:mod_tls:mod_wrap:mod_ctrls_admin \ + --build=$ARCH-slackware-linux || exit 1 +# 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 + +# Directory used by mod_ban: +mkdir -p $PKG/var/db/proftpd +chown nobody:nogroup $PKG/var/db/proftpd + +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 +# 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/proftpd-$VERSION) + cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog + touch -r ChangeLog $DOCSDIR/ChangeLog +fi +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/patches/source/proftpd/slack-desc b/patches/source/proftpd/slack-desc new file mode 100644 index 000000000..5ed80ca92 --- /dev/null +++ b/patches/source/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: -- cgit v1.2.3