diff options
author | Valery Kartel <valery.kartel@gmail.com> | 2017-04-14 14:16:45 +0300 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2017-05-11 03:52:27 +0000 |
commit | 246bdb87ac773d726decfa686edf132f2a3c268a (patch) | |
tree | 9ee21a94dcc81b0681fc6cd538974fbdd83e18eb | |
parent | 5fafd50b76e9a7302e9a576c3f6c654fe370ac42 (diff) | |
download | aports-246bdb87ac773d726decfa686edf132f2a3c268a.tar.bz2 aports-246bdb87ac773d726decfa686edf132f2a3c268a.tar.xz |
testing/proftpd: move from unmaintained
upgrade to 1.3.6
take maintainership
-rw-r--r-- | testing/proftpd/APKBUILD | 146 | ||||
-rw-r--r-- | testing/proftpd/mod_delay.conf | 3 | ||||
-rw-r--r-- | testing/proftpd/mod_load.conf | 3 | ||||
-rw-r--r-- | testing/proftpd/mod_sftp.conf | 10 | ||||
-rw-r--r-- | testing/proftpd/mod_tls_shmcache.conf | 3 | ||||
-rw-r--r-- | testing/proftpd/proftpd.initd | 35 | ||||
-rw-r--r-- | testing/proftpd/proftpd.logrotate | 9 | ||||
-rw-r--r-- | testing/proftpd/proftpd.pre-install | 7 | ||||
-rw-r--r-- | unmaintained/proftpd/APKBUILD | 68 | ||||
-rw-r--r-- | unmaintained/proftpd/mempcpy.patch | 13 | ||||
-rw-r--r-- | unmaintained/proftpd/proftpd.confd | 7 | ||||
-rw-r--r-- | unmaintained/proftpd/proftpd.initd | 28 |
12 files changed, 216 insertions, 116 deletions
diff --git a/testing/proftpd/APKBUILD b/testing/proftpd/APKBUILD new file mode 100644 index 0000000000..00c9a317a3 --- /dev/null +++ b/testing/proftpd/APKBUILD @@ -0,0 +1,146 @@ +# Contributor: Elizabeth Jennifer Myers <elizabeth@sporksirc.net> +# Contributor: Valery Kartel <valery.kartel@gmail.com> +# Maintainer: Valery Kartel <valery.kartel@gmail.com> +pkgname=proftpd +pkgver=1.3.6 +pkgrel=0 +_pkgver=${pkgver/_rc/rc} +pkgdesc="Highly configurable FTP server software" +url="http://www.proftpd.org/" +pkgusers=$pkgname +pkggroups=$pkgname +arch="all" +license="GPL" +options="!check" +depends="" +depends_dev="perl" +makedepends="$depends_dev bash pcre-dev libressl-dev sqlite-dev mariadb-dev + unixodbc-dev postgresql-dev openldap-dev geoip-dev net-snmp-dev" +install="$pkgname.pre-install" +_modules="auth_file ban copy ctrls_admin deflate delay dnsbl dynmasq exec geoip facl facts ident + ifsession:=zz ifversion ldap load log_forensic qos quotatab:-- quotatab_file:quotatab + quotatab_ldap:quotatab quotatab_radius:quotatab quotatab_sql:quotatab,sql radius ratio + readme rewrite shaper site_misc sql:-- sql_passwd:sql sftp_sql:sftp,sql sql_sqlite:sql + sql_mysql:sql sql_odbc:sql sql_postgres:sql tls tls_shmcache:tls unique_id" +for _module in $_modules; do + [ -z "${_module##*:*}" ] && eval _load_mod_${_module%:*}=${_module#*:} + subpackages="$subpackages $pkgname-mod_${_module%:*}:_module" + _shared_mods="${_shared_mods:+$_shared_mods:}mod_${_module%:*}" +done +subpackages="$pkgname-dev $pkgname-doc $pkgname-utils + $pkgname-mod_sftp $pkgname-mod_snmp $subpackages + " +source="ftp://ftp.proftpd.org/distrib/source/$pkgname-$_pkgver.tar.gz + $pkgname.logrotate + $pkgname.initd + mod_delay.conf + mod_load.conf + mod_sftp.conf + mod_tls_shmcache.conf + " +builddir="$srcdir/$pkgname-$_pkgver" + +build() { + cd "$builddir" + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc/$pkgname \ + --localstatedir=/run/$pkgname \ + --libexecdir=/usr/lib/$pkgname \ + --disable-strip \ + --disable-pam \ + --enable-dso \ + --enable-facl \ + --enable-pcre \ + --enable-ipv6 \ + --enable-ctrls \ + --enable-openssl \ + --with-shared=mod_sftp:mod_snmp:$_shared_mods \ + || return 1 + make || return 1 +} + +package() { + make -C "$builddir" DESTDIR="$pkgdir" install || return 1 + sed -i -e "5 a Include /etc/$pkgname/modules.d/*.conf" \ + -e "5 a Include /etc/$pkgname/conf.d/*.conf\n" \ + -e "s/nobody/$pkgname/" \ + -e "s/nogroup/$pkgname/" \ + "$pkgdir"/etc/$pkgname/$pkgname.conf || return 1 + mkdir -p "$pkgdir"/var/log/$pkgname \ + "$pkgdir"/etc/$pkgname/conf.d \ + "$pkgdir"/etc/$pkgname/modules.d || return 1 + install -dm750 -o ftp -g ftp "$pkgdir"/var/lib/ftp || return 1 + install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname || return 1 + install -Dm644 "$srcdir"/$pkgname.logrotate "$pkgdir"/etc/logrotate.d/$pkgname || return 1 + rm -fr "$pkgdir"/run "$pkgdir"/usr/share/locale \ + "$pkgdir"/usr/sbin/in.$pkgname +} + +dev() { + default_dev || return 1 + mkdir -p "$subpkgdir"/usr/bin || return 1 + mv "$pkgdir"/usr/bin/prxs "$subpkgdir"/usr/bin +} + +utils() { + pkgdesc="$pkgdesc (utilities)" + depends="$pkgname perl perl-mail-sendmail" + mkdir -p "$subpkgdir"/usr/sbin || return 1 + mv "$pkgdir"/usr/sbin/ftpscrub \ + "$pkgdir"/usr/sbin/ftpshut \ + "$subpkgdir"/usr/sbin || return 1 + mv "$pkgdir"/usr/bin "$subpkgdir"/usr +} + +_module() { + local name=${subpkgname#$pkgname-} + local load=$(eval echo \$_load_$name) + pkgdesc="ProFTPd module: $name" + depends="$pkgname" + mkdir -p "$subpkgdir"/usr/lib/$pkgname || return 1 + mv "$pkgdir"/usr/lib/$pkgname/$name.so \ + "$subpkgdir"/usr/lib/$pkgname || return 1 + [ -f "$srcdir"/$name.conf ] && install -Dm644 "$srcdir"/$name.conf \ + "$subpkgdir"/etc/$pkgname/conf.d/${name#mod_}.conf + if [ "$load" != "--" ]; then + local file="$subpkgdir"/etc/$pkgname/modules.d/${name#mod_}.conf + if [ -z "${load##=*}" ]; then + file="$subpkgdir"/etc/$pkgname/modules.d/${load#=}${name#mod_}.conf + load="" + fi + mkdir -p ${file%/*} || return 1 + echo "<IfModule !$name.c>" > $file + local dep; for dep in $(echo $load | tr "," " "); do + depends="$depends $pkgname-mod_$dep" + echo " <IfModule !mod_$dep.c>" >> $file + echo " LoadModule mod_$dep.c" >> $file + echo " </IfModule>" >> $file + done + echo " LoadModule $name.c" >> $file + echo "</IfModule>" >> $file + fi +} + +mod_snmp() { + _module || return 1 + mkdir -p "$subpkgdir"/usr/share/snmp/mibs || return 1 + mv "$pkgdir"/etc/$pkgname/PROFTPD-MIB.txt \ + "$subpkgdir"/usr/share/snmp/mibs +} + +mod_sftp() { + _module || return 1 + mkdir -p "$subpkgdir"/etc/$pkgname/authorized_keys || return 1 + mv "$pkgdir"/etc/$pkgname/dhparams.pem \ + "$pkgdir"/etc/$pkgname/blacklist.dat \ + "$subpkgdir"/etc/$pkgname/ +} + +sha512sums="2a3ca76a0c35ba31e9d79f7f652f4f35768262f5039c5dc04ef83ac9218f624645ac6cee445af4ec6a8c59a9bdad1e7b48e0e90cd13934cbe7c3e77a2f6013c0 proftpd-1.3.6.tar.gz +142f8ba096844eb48883cdd3890fa3c0c4c8f73f7ce4f2acd5fb742053f8a3605b3f6ca5d5ab6c62c673d76eb60885d796af55bd7b53950794c4e7e2837973b8 proftpd.logrotate +a03124a88c0c9f3981762804c62aa479f36227f24408a60437bf737c1e783c539a2d2c0aed0b1d95e56a587bdb5c372f6d670c298cdb7433ecd1f64d4bef7c42 proftpd.initd +e918e9fdf42e46953faeb55f5a8e7e7afc8951b861059182993f45b7ca870b9bdfa261fc893923772060bf500c44f98503d44878473dce7534f0825a7ff87831 mod_delay.conf +06c149f4c1b8e0deb8102a0ddbe5314354d53cb70934c9315968ab69b9d2b1e16c33bf652aba05472eac4ca44137ce18c93214bb1257fad6c6e2e9b0728cf556 mod_load.conf +557cbf2c1ca3a724216837f98c0f86b7d14df5f91564e1aceef721389c4774562edbd584d3ce2611ea4b2853c50acd569c33302f534e6e60452cf12b4b997ece mod_sftp.conf +768ce1e63b44eafb9033212655c9a5a9aa65a6f7e1b97b11210ccc0e49caf5c32dd2514dba10a098a4ab2c8bd5f3ad5167f337f5fa0a1cdd5efa4e37c980f6e5 mod_tls_shmcache.conf" diff --git a/testing/proftpd/mod_delay.conf b/testing/proftpd/mod_delay.conf new file mode 100644 index 0000000000..80b3c714e2 --- /dev/null +++ b/testing/proftpd/mod_delay.conf @@ -0,0 +1,3 @@ +<IfModule mod_delay.c> + DelayEngine on +</IfModule> diff --git a/testing/proftpd/mod_load.conf b/testing/proftpd/mod_load.conf new file mode 100644 index 0000000000..946d04eff8 --- /dev/null +++ b/testing/proftpd/mod_load.conf @@ -0,0 +1,3 @@ +<IfModule mod_load.c> + MaxLoad 10.0 "Server busy, seek elsewhere" +</IfModule> diff --git a/testing/proftpd/mod_sftp.conf b/testing/proftpd/mod_sftp.conf new file mode 100644 index 0000000000..0ecd1f629a --- /dev/null +++ b/testing/proftpd/mod_sftp.conf @@ -0,0 +1,10 @@ +<IfModule mod_sftp.c> + SFTPEngine on + Port 2222 + SFTPLog /var/log/proftpd/sftp.log + SFTPHostKey /etc/ssh/ssh_host_rsa_key + SFTPHostKey /etc/ssh/ssh_host_dsa_key + SFTPAuthMethods publickey + SFTPAuthorizedUserKeys file:/etc/proftpd/authorized_keys/%u + SFTPCompression delayed +</IfModule> diff --git a/testing/proftpd/mod_tls_shmcache.conf b/testing/proftpd/mod_tls_shmcache.conf new file mode 100644 index 0000000000..dece4cb619 --- /dev/null +++ b/testing/proftpd/mod_tls_shmcache.conf @@ -0,0 +1,3 @@ +<IfModule mod_tls_shmcache.c> + TLSSessionCache shm:/file=/run/proftpd/sesscache +</IfModule> diff --git a/testing/proftpd/proftpd.initd b/testing/proftpd/proftpd.initd new file mode 100644 index 0000000000..05670abc71 --- /dev/null +++ b/testing/proftpd/proftpd.initd @@ -0,0 +1,35 @@ +#!/sbin/openrc-run + +name="ProFTPD" +description="ProFTPD FTP Server" + +pidfile="/run/proftpd/proftpd.pid" +command="/usr/sbin/proftpd" +command_args="-n" +command_background="yes" +required_files="/etc/proftpd/proftpd.conf" +extra_commands="checkconfig" +extra_started_commands="reload" +description_checkconfig="Check configuration" +description_reload="Reload configuration" + +depend() { + need net + use logger dns + after firewall +} + +checkconfig() { + $command -t +} + +start_pre() { + checkpath --directory ${pidfile%/*} + checkconfig >/dev/null 2>&1 +} + +reload() { + ebegin "Reloading ${name:-$RC_SVCNAME}" + checkconfig >/dev/null 2>&1 && start-stop-daemon --signal HUP --pidfile $pidfile + eend $? +} diff --git a/testing/proftpd/proftpd.logrotate b/testing/proftpd/proftpd.logrotate new file mode 100644 index 0000000000..6bc5056009 --- /dev/null +++ b/testing/proftpd/proftpd.logrotate @@ -0,0 +1,9 @@ +/var/log/proftpd/*.log /var/log/xferlog { + compress + missingok + notifempty + sharedscripts + postrotate + /etc/init.d/proftpd --ifstarted --quiet reload + endscript +} diff --git a/testing/proftpd/proftpd.pre-install b/testing/proftpd/proftpd.pre-install new file mode 100644 index 0000000000..53c0d9c6df --- /dev/null +++ b/testing/proftpd/proftpd.pre-install @@ -0,0 +1,7 @@ +#!/bin/sh + +addgroup -S proftpd 2>/dev/null +adduser -S -D -h /var/lib/ftp -s /sbin/nologin -G proftpd -g proftpd proftpd 2>/dev/null +adduser proftpd ftp 2>/dev/null + +exit 0 diff --git a/unmaintained/proftpd/APKBUILD b/unmaintained/proftpd/APKBUILD deleted file mode 100644 index 278665fca9..0000000000 --- a/unmaintained/proftpd/APKBUILD +++ /dev/null @@ -1,68 +0,0 @@ -# Contributor: Elizabeth Jennifer Myers <elizabeth@sporksirc.net> -# Maintainer: Elizabeth Jennifer Myers <elizabeth@sporksirc.net> -pkgname=proftpd -pkgver=1.3.5 -pkgrel=0 -pkgdesc="Highly configurable GPL-licensed FTP server software" -url="http://www.proftpd.org/" -arch="all" -license="GPLv2" -depends="" -depends_dev="ncurses-dev openssl-dev gettext-dev libcap-dev" -makedepends="$depends_dev libtool" -install="" -subpackages="$pkgname-doc $pkgname-dev $pkgname-lang" -source="ftp://ftp.proftpd.org/distrib/source/proftpd-${pkgver}.tar.gz - mempcpy.patch - proftpd.initd - proftpd.confd" - -_builddir="$srcdir"/"$pkgname"-"$pkgver" - -prepare() { - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done -} - -build() { - cd "$_builddir" - ./configure \ - --enable-openssl \ - --enable-facl \ - --enable-dso \ - --enable-ipv6 \ - --enable-ctrls \ - --with-modules=mod_quotatab:mod_quotatab_file:mod_tls \ - --prefix=/usr \ - --sysconfdir=/etc \ - --mandir=/usr/share/man \ - --localstatedir=/var/run - make || return 1 -} - -package() { - cd "$_builddir" - make DESTDIR="$pkgdir" install || return 1 - - install -m755 -D "$srcdir"/$pkgname.initd \ - "$pkgdir"/etc/init.d/$pkgname || return 1 - install -m644 -D "$srcdir"/$pkgname.confd \ - "$pkgdir"/etc/conf.d/$pkgname || return 1 -} - -md5sums="aff1bff40e675244d72c4667f203e5bb proftpd-1.3.5.tar.gz -cee983fba72533440d1a95c87bbbefc3 mempcpy.patch -175ce0cef2fb410d0ac8929ad421f941 proftpd.initd -aab5852ac574e87781f1c9c4942e699b proftpd.confd" -sha256sums="c10316fb003bd25eccbc08c77dd9057e053693e6527ffa2ea2cc4e08ccb87715 proftpd-1.3.5.tar.gz -8d6167cf16551df61139e0410309303721fa58d3898fe9243648c319b61b7135 mempcpy.patch -afcc8971c7ddba740979117f62a01b70453e53b36806c2b2328ca32f47a5964d proftpd.initd -36677336553d5b6bc96b36be766d9eadcc42946a25cb38c0824ff509ede31955 proftpd.confd" -sha512sums="fabc10606f2f6a33c7cbe117e774ed6eba8ef062cb792723f00cc235d4ade6499621f5d546b9b176f76780271c1c881c9e57f9cad67d288b5119fe6ca58c46dd proftpd-1.3.5.tar.gz -50973de4bb234d455d8ec076c80b692b694a179f07a3903f821887bf75adce1f0672f62c97840c08e0d99bfce05f5b710aa15818031580b3f768ed7c77d2971e mempcpy.patch -a2aedcfe4c1e78c7591a21943e63f4880eb461935130ed93d4037a80374e7f70b42f37959c23bd82bf965e67b8c9fab6488d84d01628d23231a5c65270b06a74 proftpd.initd -ea06653f14484b6e3b4267cd964a37d3218c5bcff141c6a33a2e1b46c1f43eaa2996f0d9c3c3eb40c8a8ae9534be09803f53979c37d5fb760d7231a5d3003977 proftpd.confd" diff --git a/unmaintained/proftpd/mempcpy.patch b/unmaintained/proftpd/mempcpy.patch deleted file mode 100644 index e58210f372..0000000000 --- a/unmaintained/proftpd/mempcpy.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/lib/pr_fnmatch.c b/lib/pr_fnmatch.c -index 9e398e7..102591a 100644 ---- a/lib/pr_fnmatch.c -+++ b/lib/pr_fnmatch.c -@@ -233,7 +233,7 @@ __wcschrnul (const wchar_t *s, wint_t c) - # endif - # define STRLEN(S) strlen (S) - # define STRCAT(D, S) strcat (D, S) --# define MEMPCPY(D, S, N) __mempcpy (D, S, N) -+# define MEMPCPY(D, S, N) mempcpy (D, S, N) - # define MEMCHR(S, C, N) memchr (S, C, N) - # define STRCOLL(S1, S2) strcoll (S1, S2) - # include "pr_fnmatch_loop.c" diff --git a/unmaintained/proftpd/proftpd.confd b/unmaintained/proftpd/proftpd.confd deleted file mode 100644 index 0cf909c432..0000000000 --- a/unmaintained/proftpd/proftpd.confd +++ /dev/null @@ -1,7 +0,0 @@ -# Sample conf.d file for alpine linux - -# -# Specify daemon options here. -# - -sample_opts="-6" diff --git a/unmaintained/proftpd/proftpd.initd b/unmaintained/proftpd/proftpd.initd deleted file mode 100644 index c20a2543a1..0000000000 --- a/unmaintained/proftpd/proftpd.initd +++ /dev/null @@ -1,28 +0,0 @@ -#!/sbin/runscript - -# Sample init.d file for alpine linux. - -name=proftpd -daemon=/usr/sbin/proftpd - -depend() { - need net - after firewall -} - -start() { - ebegin "Starting ${name}" - start-stop-daemon --start --quiet \ - --pidfile /var/run/${name}.pid \ - --exec ${daemon} -- ${sample_opts} - eend $? -} - -stop() { - ebegin "Stopping ${name}" - start-stop-daemon --stop --quiet \ - --pidfile /var/run/$name.pid \ - --exec ${daemon} - eend $? -} - |