diff options
Diffstat (limited to 'patches')
-rw-r--r-- | patches/packages/bind-9.16.45-x86_64-1_slack15.0.txt (renamed from patches/packages/bind-9.16.44-x86_64-1_slack15.0.txt) | 0 | ||||
-rw-r--r-- | patches/packages/proftpd-1.3.8b-x86_64-1_slack15.0.txt | 11 | ||||
-rwxr-xr-x | patches/source/bind/bind.SlackBuild | 18 | ||||
-rw-r--r-- | patches/source/bind/caching-example/named.ca | 92 | ||||
-rw-r--r-- | patches/source/bind/caching-example/named.root | 6 | ||||
-rw-r--r-- | patches/source/bind/default.named | 14 | ||||
-rw-r--r-- | patches/source/bind/rc.bind | 12 | ||||
-rw-r--r-- | patches/source/proftpd/doinst.sh | 18 | ||||
-rw-r--r-- | patches/source/proftpd/etc/ftpusers | 22 | ||||
-rw-r--r-- | patches/source/proftpd/etc/proftpd.conf | 74 | ||||
-rwxr-xr-x | patches/source/proftpd/proftpd.SlackBuild | 153 | ||||
-rw-r--r-- | patches/source/proftpd/slack-desc | 19 |
12 files changed, 423 insertions, 16 deletions
diff --git a/patches/packages/bind-9.16.44-x86_64-1_slack15.0.txt b/patches/packages/bind-9.16.45-x86_64-1_slack15.0.txt index d61583855..d61583855 100644 --- a/patches/packages/bind-9.16.44-x86_64-1_slack15.0.txt +++ b/patches/packages/bind-9.16.45-x86_64-1_slack15.0.txt diff --git a/patches/packages/proftpd-1.3.8b-x86_64-1_slack15.0.txt b/patches/packages/proftpd-1.3.8b-x86_64-1_slack15.0.txt new file mode 100644 index 000000000..44ba1eb01 --- /dev/null +++ b/patches/packages/proftpd-1.3.8b-x86_64-1_slack15.0.txt @@ -0,0 +1,11 @@ +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: Homepage: http://www.proftpd.org +proftpd: +proftpd: +proftpd: diff --git a/patches/source/bind/bind.SlackBuild b/patches/source/bind/bind.SlackBuild index 7884f1831..f8066f9ff 100755 --- a/patches/source/bind/bind.SlackBuild +++ b/patches/source/bind/bind.SlackBuild @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2018, 2019, 2020, 2021 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2018, 2019, 2020, 2021, 2023 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -163,13 +163,18 @@ fi # Add sample config files for a simple caching nameserver: mkdir -p $PKG/var/named/caching-example -cat $CWD/caching-example/named.conf > $PKG/etc/named.conf.new -cat $CWD/caching-example/localhost.zone > $PKG/var/named/caching-example/localhost.zone -cat $CWD/caching-example/named.local > $PKG/var/named/caching-example/named.local -cat $CWD/caching-example/named.root > $PKG/var/named/caching-example/named.root +cp -a $CWD/caching-example/named.conf $PKG/etc/named.conf.new +cp -a $CWD/caching-example/localhost.zone $PKG/var/named/caching-example/localhost.zone +cp -a $CWD/caching-example/named.local $PKG/var/named/caching-example/named.local +cp -a $CWD/caching-example/named.root $PKG/var/named/caching-example/named.root # This name is deprecated, but having it here doesn't hurt in case # an old configuration file wants it: -cat $CWD/caching-example/named.root > $PKG/var/named/caching-example/named.ca +cp -a $CWD/caching-example/named.root $PKG/var/named/caching-example/named.ca +chown root:root $PKG/etc/named.conf.new +chmod 644 $PKG/var/named/caching-example/* + +# Make sure that everything in /var/named is owned by named:named: +chown -R named:named $PKG/var/named mkdir -p $PKG/install zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh @@ -177,4 +182,3 @@ cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG /sbin/makepkg -l y -c n $TMP/${PKGNAM}-$(echo $VERSION | tr - _)-$ARCH-$BUILD.txz - diff --git a/patches/source/bind/caching-example/named.ca b/patches/source/bind/caching-example/named.ca new file mode 100644 index 000000000..6db8239a2 --- /dev/null +++ b/patches/source/bind/caching-example/named.ca @@ -0,0 +1,92 @@ +; This file holds the information on root name servers needed to +; initialize cache of Internet domain name servers +; (e.g. reference this file in the "cache . <file>" +; configuration file of BIND domain name servers). +; +; This file is made available by InterNIC +; under anonymous FTP as +; file /domain/named.cache +; on server FTP.INTERNIC.NET +; -OR- RS.INTERNIC.NET +; +; last update: October 24, 2023 +; related version of root zone: 2023102402 +; +; FORMERLY NS.INTERNIC.NET +; +. 3600000 NS A.ROOT-SERVERS.NET. +A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4 +A.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:ba3e::2:30 +; +; FORMERLY NS1.ISI.EDU +; +. 3600000 NS B.ROOT-SERVERS.NET. +B.ROOT-SERVERS.NET. 3600000 A 199.9.14.201 +B.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:200::b +; +; FORMERLY C.PSI.NET +; +. 3600000 NS C.ROOT-SERVERS.NET. +C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12 +C.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2::c +; +; FORMERLY TERP.UMD.EDU +; +. 3600000 NS D.ROOT-SERVERS.NET. +D.ROOT-SERVERS.NET. 3600000 A 199.7.91.13 +D.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2d::d +; +; FORMERLY NS.NASA.GOV +; +. 3600000 NS E.ROOT-SERVERS.NET. +E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10 +E.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:a8::e +; +; FORMERLY NS.ISC.ORG +; +. 3600000 NS F.ROOT-SERVERS.NET. +F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241 +F.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2f::f +; +; FORMERLY NS.NIC.DDN.MIL +; +. 3600000 NS G.ROOT-SERVERS.NET. +G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4 +G.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:12::d0d +; +; FORMERLY AOS.ARL.ARMY.MIL +; +. 3600000 NS H.ROOT-SERVERS.NET. +H.ROOT-SERVERS.NET. 3600000 A 198.97.190.53 +H.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:1::53 +; +; FORMERLY NIC.NORDU.NET +; +. 3600000 NS I.ROOT-SERVERS.NET. +I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17 +I.ROOT-SERVERS.NET. 3600000 AAAA 2001:7fe::53 +; +; OPERATED BY VERISIGN, INC. +; +. 3600000 NS J.ROOT-SERVERS.NET. +J.ROOT-SERVERS.NET. 3600000 A 192.58.128.30 +J.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:c27::2:30 +; +; OPERATED BY RIPE NCC +; +. 3600000 NS K.ROOT-SERVERS.NET. +K.ROOT-SERVERS.NET. 3600000 A 193.0.14.129 +K.ROOT-SERVERS.NET. 3600000 AAAA 2001:7fd::1 +; +; OPERATED BY ICANN +; +. 3600000 NS L.ROOT-SERVERS.NET. +L.ROOT-SERVERS.NET. 3600000 A 199.7.83.42 +L.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:9f::42 +; +; OPERATED BY WIDE +; +. 3600000 NS M.ROOT-SERVERS.NET. +M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33 +M.ROOT-SERVERS.NET. 3600000 AAAA 2001:dc3::35 +; End of file
\ No newline at end of file diff --git a/patches/source/bind/caching-example/named.root b/patches/source/bind/caching-example/named.root index dba9ed9ea..6db8239a2 100644 --- a/patches/source/bind/caching-example/named.root +++ b/patches/source/bind/caching-example/named.root @@ -8,9 +8,9 @@ ; file /domain/named.cache ; on server FTP.INTERNIC.NET ; -OR- RS.INTERNIC.NET -; -; last update: July 30, 2019 -; related version of root zone: 2019073000 +; +; last update: October 24, 2023 +; related version of root zone: 2023102402 ; ; FORMERLY NS.INTERNIC.NET ; diff --git a/patches/source/bind/default.named b/patches/source/bind/default.named index 50e18664b..e300250af 100644 --- a/patches/source/bind/default.named +++ b/patches/source/bind/default.named @@ -1,7 +1,7 @@ # User to run named as: NAMED_USER=named -# Group to use for chowning named related files and directories. +# Group to use for named related files and directories. # By default, named will also run as the primary group of $NAMED_USER, # which will usually be the same as what's listed below, but not # necessarily if something other than the default of "named" is used. @@ -10,3 +10,15 @@ NAMED_GROUP=named # Options to run named with. At least -u $NAMED_USER is required, but # additional options may be added if needed. NAMED_OPTIONS="-u $NAMED_USER" + +# If this is set to YES, then before starting named the startup script +# will make sure that /etc/rndc.key (if it exists) and the enitre contents +# of /var/named are chowned to $NAMED_USER:$NAMED_GROUP. If some of these +# files are improperly owned, named will refuse to start or may not work +# properly. This is also a useful setting when upgrading from an older BIND +# package that would run as root. +# +# If NAMED_CHOWN is set to anything other than YES (or is unset), then these +# files will not be chowned automatically and the admin will handle any +# required file ownerships. +NAMED_CHOWN=NO diff --git a/patches/source/bind/rc.bind b/patches/source/bind/rc.bind index 169db8126..1b0b4d6fb 100644 --- a/patches/source/bind/rc.bind +++ b/patches/source/bind/rc.bind @@ -42,11 +42,13 @@ bind_start() { mkdir -p /var/run/named # Make sure that /var/run/named has correct ownership: chown -R ${NAMED_USER}:${NAMED_GROUP} /var/run/named - # Make sure that /var/named has correct ownership: - chown -R ${NAMED_USER}:${NAMED_GROUP} /var/named - if [ -r /etc/rndc.key ]; then - # Make sure that /etc/rndc.key has correct ownership: - chown ${NAMED_USER}:${NAMED_GROUP} /etc/rndc.key + if [ "$NAMED_CHOWN" = "YES" ]; then + # Make sure that /var/named has correct ownership: + chown -R ${NAMED_USER}:${NAMED_GROUP} /var/named + if [ -r /etc/rndc.key ]; then + # Make sure that /etc/rndc.key has correct ownership: + chown ${NAMED_USER}:${NAMED_GROUP} /etc/rndc.key + fi fi # Start named: if [ -x /usr/sbin/named ]; then 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, <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/patches/source/proftpd/etc/proftpd.conf b/patches/source/proftpd/etc/proftpd.conf new file mode 100644 index 000000000..50ee487c2 --- /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 + +# Don't use IPv6 support by default. +UseIPv6 off + +# 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 under which the server will run. +User nobody +Group nogroup + +# Set system log location: +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. +<Anonymous ~ftp> + 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/patches/source/proftpd/proftpd.SlackBuild b/patches/source/proftpd/proftpd.SlackBuild new file mode 100755 index 000000000..32101be6c --- /dev/null +++ b/patches/source/proftpd/proftpd.SlackBuild @@ -0,0 +1,153 @@ +#!/bin/bash + +# Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2016, 2017, 2018, 2020 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. + +cd $(dirname $0) ; CWD=$(pwd) + +PKGNAM=proftpd +VERSION=1.3.8b +DIRVER=1.3.8b +BUILD=${BUILD:-1_slack15.0} + +NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "} + +PROFTPD_MODS="mod_radius:mod_ban:mod_readme:mod_ratio:mod_tls:mod_wrap:mod_ctrls_admin:mod_quotatab:mod_quotatab_file:mod_sftp:mod_facl" + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i586 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac +fi + +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz" + exit 0 +fi + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -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 + +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-dso \ + --enable-ipv6 \ + --enable-nls \ + --localstatedir=/var/run \ + --with-modules="${PROFTPD_MODS}" \ + --build=$ARCH-slackware-linux || exit 1 + +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 + +# Compress manual pages: +find $PKG/usr/man -type f -exec gzip -9 {} \+ +for i in $( find $PKG/usr/man -type l ) ; do + ln -s $( readlink $i ).gz $i.gz + rm $i +done + +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..35b73bf2e --- /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: Homepage: http://www.proftpd.org +proftpd: +proftpd: +proftpd: |