aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorValery Kartel <valery.kartel@gmail.com>2017-04-14 14:16:45 +0300
committerWilliam Pitcock <nenolod@dereferenced.org>2017-05-11 03:52:27 +0000
commit246bdb87ac773d726decfa686edf132f2a3c268a (patch)
tree9ee21a94dcc81b0681fc6cd538974fbdd83e18eb /testing
parent5fafd50b76e9a7302e9a576c3f6c654fe370ac42 (diff)
downloadaports-246bdb87ac773d726decfa686edf132f2a3c268a.tar.bz2
aports-246bdb87ac773d726decfa686edf132f2a3c268a.tar.xz
testing/proftpd: move from unmaintained
upgrade to 1.3.6 take maintainership
Diffstat (limited to 'testing')
-rw-r--r--testing/proftpd/APKBUILD146
-rw-r--r--testing/proftpd/mod_delay.conf3
-rw-r--r--testing/proftpd/mod_load.conf3
-rw-r--r--testing/proftpd/mod_sftp.conf10
-rw-r--r--testing/proftpd/mod_tls_shmcache.conf3
-rw-r--r--testing/proftpd/proftpd.initd35
-rw-r--r--testing/proftpd/proftpd.logrotate9
-rw-r--r--testing/proftpd/proftpd.pre-install7
8 files changed, 216 insertions, 0 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