diff options
Diffstat (limited to 'extra')
-rw-r--r-- | extra/conntrack-tools/conntrackd.confd | 15 | ||||
-rw-r--r-- | extra/conntrack-tools/conntrackd.initd | 99 | ||||
-rw-r--r-- | extra/dovecot/dovecot.initd | 64 | ||||
-rw-r--r-- | extra/libxslt/APKBUILD | 20 | ||||
-rw-r--r-- | extra/lighttpd/APKBUILD | 16 | ||||
-rw-r--r-- | extra/lighttpd/lighttpd.install | 14 | ||||
-rw-r--r-- | extra/lighttpd/lighttpd.post-install | 4 | ||||
-rw-r--r-- | extra/lighttpd/lighttpd.pre-install | 4 | ||||
-rw-r--r-- | extra/nano/APKBUILD | 4 | ||||
-rw-r--r-- | extra/perl-xml-parser/APKBUILD | 21 | ||||
-rw-r--r-- | extra/quagga/APKBUILD | 8 | ||||
-rw-r--r-- | extra/quagga/quagga.install | 14 | ||||
-rw-r--r-- | extra/quagga/quagga.post-install | 6 | ||||
-rw-r--r-- | extra/quagga/quagga.pre-install | 6 | ||||
-rwxr-xr-x | extra/shorewall-lite/shorewall-lite.initd | 65 |
15 files changed, 295 insertions, 65 deletions
diff --git a/extra/conntrack-tools/conntrackd.confd b/extra/conntrack-tools/conntrackd.confd new file mode 100644 index 000000000..7c937cbd9 --- /dev/null +++ b/extra/conntrack-tools/conntrackd.confd @@ -0,0 +1,15 @@ +# conntrackd config file +# default: /etc/conntrackd/conntrackd.conf +#CONNTRACKD_CFG=/etc/conntrackd/conntrackd.conf + +# conntrackd lockfile (must match the "LockFile" entry +# from the "General" section in the config file) +# default: /var/lock/conntrack.lock +#CONNTRACKD_LOCK=/var/lock/conntrack.lock + +# extra options for conntrackd +#CONNTRACKD_OPTS="" # you must NOT use -C here! + +# depend on a specific network interface +#RC_NEED="net.eth1" # baselayout-1 +#rc_need="net.eth1" # baselayout-2/OpenRC diff --git a/extra/conntrack-tools/conntrackd.initd b/extra/conntrack-tools/conntrackd.initd new file mode 100644 index 000000000..9394badca --- /dev/null +++ b/extra/conntrack-tools/conntrackd.initd @@ -0,0 +1,99 @@ +#!/sbin/runscript +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +CONNTRACKD_BIN="/usr/sbin/conntrackd" +CONNTRACKD_CFG=${CONNTRACKD_CFG:-/etc/conntrackd/conntrackd.conf} +CONNTRACKD_LOCK=${CONNTRACKD_LOCK:-/var/lock/conntrack.lock} + +depend() { + use logger + need net +} + +checkconfig() { + # check for netfilter conntrack kernel support + local nf_ct_available=0 + for k in net.netfilter.nf_conntrack_max \ + net.ipv4.netfilter.ip_conntrack_max \ + net.nf_conntrack_max; do + if sysctl -e -n ${k} &>/dev/null; then + nf_ct_available=1 # sysctl key found + break + fi + done + if [ ${nf_ct_available} -eq 0 ]; then + eerror + eerror "Your kernel is missing netfilter conntrack support!" + eerror "Make sure your kernel was compiled with netfilter conntrack support." + eerror + eerror "If it was compiled as a module you need to ensure the module is being" + eerror "loaded before starting conntrackd." + eerror "Either add an entry to /etc/modules.autoload/[...] (for baselayout-1)" + eerror "or /etc/conf.d/modules (for baselayout-2/OpenRC) or load the module" + eerror "by hand like this, depending on your kernel version:" + eerror + eerror " modprobe nf_conntrack # (for newer kernels)" + eerror " modprobe ip_conntrack # (for older kernels)" + eerror + return 1 + fi + # check if netfilter conntrack TCP window tracking is disabled + local nf_ct_tcp_be_liberal=0 + for k in net.netfilter.nf_conntrack_tcp_be_liberal \ + net.ipv4.netfilter.ip_conntrack_tcp_be_liberal; do + nf_ct_tcp_be_liberal=$(sysctl -e -n ${k} 2>/dev/null) + if [ ${?} -ne 0 ]; then + continue # sysctl key not found + else + break # sysctl key found + fi + done + if [ ${nf_ct_tcp_be_liberal} -ne 1 ]; then + eerror + eerror "You need to disable TCP window tracking!" + eerror "Add the following line to your /etc/sysctl.conf:" + eerror + eerror " ${k} = 1" + eerror + eerror "...and run this to activate the setting: sysctl -q -p" + eerror + return 1 + fi + # check for config file + if [ ! -e "${CONNTRACKD_CFG}" ]; then + eerror + eerror "The conntrackd config file (${CONNTRACKD_CFG})" + eerror "is missing!" + eerror + return 1 + fi + # check for leftover lockfile + if [ -f "${CONNTRACKD_LOCK}" ]; then + ewarn + ewarn "The conntrackd lockfile (${CONNTRACKD_LOCK})" + ewarn "exists although the service is not marked as started." + ewarn "Will remove the lockfile and start the service in 10s" + ewarn "if not interrupted..." + ewarn + sleep 10 + if ! rm -f "${CONNTRACKD_LOCK}"; then + eerror "Failed to remove the conntrackd lockfile (${CONNTRACKD_LOCK})" + return 1 + fi + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting conntrackd" + start-stop-daemon --start --exec "${CONNTRACKD_BIN}" \ + -- -d -C "${CONNTRACKD_CFG}" ${CONNTRACKD_OPTS} + eend $? +} + +stop() { + ebegin "Stopping conntrackd" + start-stop-daemon --stop --exec "${CONNTRACKD_BIN}" + eend $? +} diff --git a/extra/dovecot/dovecot.initd b/extra/dovecot/dovecot.initd index 24201eeec..d9799c0dc 100644 --- a/extra/dovecot/dovecot.initd +++ b/extra/dovecot/dovecot.initd @@ -1,41 +1,57 @@ #!/sbin/runscript +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/net-mail/dovecot/files/dovecot.init-r2,v 1.1 2008/11/03 17:22:59 wschlich Exp $ -# Sample init.d file for alpine linux. - -NAME=dovecot -DAEMON=/usr/sbin/$NAME -USER=dovecot -group=dovecot +opts="reload" depend() { - need net + need localmount net + after bootmisc ldap mysql ntp-client ntpd postgresql saslauthd slapd + use logger +} + +checkconfig() { + DOVECOT_INSTANCE=${SVCNAME##*.} + if [ -n "${DOVECOT_INSTANCE}" -a "${SVCNAME}" != "dovecot" ]; then + DOVECOT_CONF=/etc/dovecot/dovecot.${DOVECOT_INSTANCE}.conf + else + DOVECOT_CONF=/etc/dovecot/dovecot.conf + fi + if [ ! -e ${DOVECOT_CONF} ]; then + eerror "You will need an ${DOVECOT_CONF} first" + return 1 + fi + DOVECOT_BASEDIR=$(/usr/sbin/dovecot -c ${DOVECOT_CONF} -a | sed -ne '/^base_dir/{s#^base_dir:[[:space:]]*\(.*[^/]\)/\?$#\1#;p}') + DOVECOT_BASEDIR=${DOVECOT_BASEDIR:-/var/run/dovecot} + DOVECOT_PIDFILE=${DOVECOT_BASEDIR}/master.pid + if [ ! -d "${DOVECOT_BASEDIR}" ]; then + ebegin "Creating missing base_dir ${DOVECOT_BASEDIR}" + install -d -o root -g root -m 0755 "${DOVECOT_BASEDIR}" + eend $? + fi } start() { - ebegin "Starting ${NAME}" - start-stop-daemon --start --quiet --background \ - --make-pidfile --pidfile /var/run/${NAME}.pid \ - --chuid ${USER}:${GROUP} \ - --exec ${DAEMON} -- ${OPTS} + checkconfig || return 1 + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --exec /usr/sbin/dovecot \ + --pidfile "${DOVECOT_PIDFILE}" -- -c "${DOVECOT_CONF}" eend $? } stop() { - ebegin "Stopping ${NAME}" - start-stop-daemon --stop --quiet \ - --exec ${DAEMON} \ - --pidfile /var/run/${NAME}.pid \ + checkconfig || return 1 + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --exec /usr/sbin/dovecot \ + --pidfile "${DOVECOT_PIDFILE}" eend $? } reload() { - ebegin "Reloading ${NAME}" - if ! service_started "${NAME}" ; then - eend 1 "${NAME} is not started" - return 1 - fi - start-stop-daemon --stop --oknodo --signal HUP \ - --exec ${DAEMON} --pidfile /var/run/${NAME}.pid + checkconfig || return 1 + ebegin "Reloading ${SVCNAME} configs and restarting auth/login processes" + start-stop-daemon --stop --oknodo --exec /usr/sbin/dovecot \ + --pidfile "${DOVECOT_PIDFILE}" --signal HUP eend $? } - diff --git a/extra/libxslt/APKBUILD b/extra/libxslt/APKBUILD new file mode 100644 index 000000000..8f6ce2938 --- /dev/null +++ b/extra/libxslt/APKBUILD @@ -0,0 +1,20 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=libxslt +pkgver=1.1.24 +pkgrel=0 +pkgdesc="XML stylesheet transformation library" +url="http://xmlsoft.org/XSLT/" +license="custom" +depends="libxml2 libgcrypt libgpg-error" +makedepends="libxml2-dev libgcrypt-dev libgpg-error-dev python" +subpackages="$pkgname-dev $pkgname-doc" +source="ftp://xmlsoft.org/$pkgname/$pkgname-$pkgver.tar.gz" + +build() { + cd "$srcdir"/$pkgname-$pkgver + ./configure --prefix=/usr || return 1 + make || return 1 + make DESTDIR="$pkgdir" install || return 1 + install -D -m644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING +} +md5sums="e83ec5d27fc4c10c6f612879bea9a153 libxslt-1.1.24.tar.gz" diff --git a/extra/lighttpd/APKBUILD b/extra/lighttpd/APKBUILD index 29db9b695..94b536069 100644 --- a/extra/lighttpd/APKBUILD +++ b/extra/lighttpd/APKBUILD @@ -1,16 +1,17 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=lighttpd -pkgver=1.4.20 -pkgrel=2 +pkgver=1.4.22 +pkgrel=0 pkgdesc="a secure, fast, compliant and very flexible web-server" url="http://www.lighttpd.net/" license="custom" -install="$pkgname.install" -depends="pcre openssl zlib bzip2 lua" +install="$pkgname.pre-install $pkgname.post-install" +depends="pcre openssl zlib lua" makedepends="flex pcre-dev openssl-dev zlib-dev bzip2-dev lua-dev pkgconfig" source="http://www.$pkgname.net/download/$pkgname-$pkgver.tar.bz2 $pkgname.initd $pkgname.confd - $pkgname.install + $install $pkgname.logrotate spawn-fcgi.confd spawn-fcgi.initd @@ -66,10 +67,11 @@ build() { install -m644 "$srcdir"/$i "$pkgdir"/etc/lighttpd/$i done } -md5sums="ed6ee0bb714f393219a32768d86984d8 lighttpd-1.4.20.tar.bz2 +md5sums="ed4ca3897eadf419c893b03fee53c982 lighttpd-1.4.22.tar.bz2 6910842e8ba496e8aa984ab30a46eb72 lighttpd.initd 0dede109282bfe685bdec6b35f0e4b6b lighttpd.confd -9b1aa3c58f50afee7c03b414c28de6f6 lighttpd.install +e250fe505d07733e920348bea0909c29 lighttpd.pre-install +6e0e81296d854887e11bc4f8d6f998d7 lighttpd.post-install ad091c9157134890499f26d170352c9f lighttpd.logrotate 1d925aed297ec4541fb230dd19e11bc1 spawn-fcgi.confd 78bc6ceac57ecaa47abf4d5df857fe57 spawn-fcgi.initd diff --git a/extra/lighttpd/lighttpd.install b/extra/lighttpd/lighttpd.install deleted file mode 100644 index 63235f3cc..000000000 --- a/extra/lighttpd/lighttpd.install +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - - -case $1 in - pre_install) - adduser -H -h /var/www/localhost/htdocs -s /bin/false -D \ - lighttpd 2>/dev/null - ;; - post_install) - chown lighttpd:lighttpd /var/*/lighttpd - ;; -esac - -exit 0 diff --git a/extra/lighttpd/lighttpd.post-install b/extra/lighttpd/lighttpd.post-install new file mode 100644 index 000000000..5b116a637 --- /dev/null +++ b/extra/lighttpd/lighttpd.post-install @@ -0,0 +1,4 @@ +#!/bin/sh + +chown lighttpd:lighttpd /var/*/lighttpd +exit 0 diff --git a/extra/lighttpd/lighttpd.pre-install b/extra/lighttpd/lighttpd.pre-install new file mode 100644 index 000000000..4682680d6 --- /dev/null +++ b/extra/lighttpd/lighttpd.pre-install @@ -0,0 +1,4 @@ +#!/bin/sh + +adduser -H -h /var/www/localhost/htdocs -s /bin/false -D lighttpd 2>/dev/null +exit 0 diff --git a/extra/nano/APKBUILD b/extra/nano/APKBUILD index bc911ba7d..ab2a8bfc5 100644 --- a/extra/nano/APKBUILD +++ b/extra/nano/APKBUILD @@ -3,11 +3,11 @@ pkgname=nano pkgver=2.0.9 pkgmaj=2.0 -pkgrel=0 +pkgrel=1 pkgdesc="Text Editor. GNU nano is designed to be a free replacement for the Pico text editor." url="http://www.nano-editor.org/" license="GPL" -depends="ncurses uclibc" +depends="ncurses uclibc ncurses-terminfo" makedepends="ncurses-dev" install= subpackages="$pkgname-doc" diff --git a/extra/perl-xml-parser/APKBUILD b/extra/perl-xml-parser/APKBUILD new file mode 100644 index 000000000..7dc23116c --- /dev/null +++ b/extra/perl-xml-parser/APKBUILD @@ -0,0 +1,21 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=perl-xml-parser +_name=XML-Parser +pkgver=2.36 +pkgrel=0 +pkgdesc="XML::Parser - an XML parser module for perl" +url="http://search.cpan.org/dist/XML-Parser/" +license="GPL PerlArtistic" +depends="perl expat uclibc" +makedepends="expat-dev" +source="http://search.cpan.org/CPAN/authors/id/M/MS/MSERGEANT/XML-Parser-$pkgver.tar.gz" + +build () { + cd "$srcdir"/$_name-$pkgver + perl Makefile.PL INSTALLDIRS=vendor || return 1 + make MAN1EXT=1p MAN3EXT=3pm || return 1 + make install MAN1EXT=1p MAN3EXT=3pm DESTDIR="$pkgdir" || return 1 + find "$pkgdir" -name perllocal.pod -delete + find "$pkgdir" -name .packlist -delete +} +md5sums="1b868962b658bd87e1563ecd56498ded XML-Parser-2.36.tar.gz" diff --git a/extra/quagga/APKBUILD b/extra/quagga/APKBUILD index e941224ce..cb5653ed7 100644 --- a/extra/quagga/APKBUILD +++ b/extra/quagga/APKBUILD @@ -1,14 +1,14 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=quagga pkgver=0.99.11 -pkgrel=7 +pkgrel=8 pkgdesc="A free routing daemon replacing Zebra supporting RIP, OSPF and BGP." url="http://quagga.net/" license="GPL-2" depends="uclibc readline ncurses iproute2" makedepends="readline-dev ncurses-dev autoconf automake libtool" -install=quagga.install +install="$pkgname.pre-install $pkgname.post-install" subpackages="$pkgname-dev $pkgname-doc" source="http://www.quagga.net/download/$pkgname-$pkgver.tar.gz $pkgname-0.99.11-link-libcap.patch @@ -54,7 +54,6 @@ build() { --localstatedir=/var/run/quagga \ || return 1 -# --with-cflags="${CFLAGS}" \ make || return 1 make DESTDIR="$pkgdir" install @@ -78,4 +77,5 @@ cc109a746273bc0d6aee9d758e7524ab bgpd.initd 120ab1b53975ec86e78266f31e935ab6 ripngd.initd 3490a10510e416ab83d5b4d767136de8 zebra.initd c38e884372406e9e59616e436cd26388 zebra.confd -c5c0ae236d32df9e7a000b19f3fc3684 quagga.install" +44b4c3684e4c7300665bf90fa4520af9 quagga.pre-install +d2181a6401280478b8700cfcee32794e quagga.post-install" diff --git a/extra/quagga/quagga.install b/extra/quagga/quagga.install deleted file mode 100644 index 52a261a1f..000000000 --- a/extra/quagga/quagga.install +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -case "$1" in - pre_install) - adduser -H -h /var/empty -s /bin/false -D quagga 2>/dev/null - mkdir -p var/empty - ;; - post_install) - chown root:root var/empty - chown quagga:quagga /var/run/quagga - ;; -esac -exit 0 - diff --git a/extra/quagga/quagga.post-install b/extra/quagga/quagga.post-install new file mode 100644 index 000000000..c1c670d20 --- /dev/null +++ b/extra/quagga/quagga.post-install @@ -0,0 +1,6 @@ +#!/bin/sh + +chown root:root var/empty +chown quagga:quagga /var/run/quagga +exit 0 + diff --git a/extra/quagga/quagga.pre-install b/extra/quagga/quagga.pre-install new file mode 100644 index 000000000..2643891dc --- /dev/null +++ b/extra/quagga/quagga.pre-install @@ -0,0 +1,6 @@ +#!/bin/sh + +adduser -H -h /var/empty -s /bin/false -D quagga 2>/dev/null +mkdir -p var/empty +exit 0 + diff --git a/extra/shorewall-lite/shorewall-lite.initd b/extra/shorewall-lite/shorewall-lite.initd new file mode 100755 index 000000000..d2537e8a1 --- /dev/null +++ b/extra/shorewall-lite/shorewall-lite.initd @@ -0,0 +1,65 @@ +#!/sbin/runscript +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-firewall/shorewall-lite/files/shorewall-lite,v 1.1 2007/05/20 22:32:36 mjolnir Exp $ + +opts="start stop restart clear reset refresh" + +depend() { + need net + provide firewall + after ulogd +} + +start() { + ebegin "Starting firewall" + /sbin/shorewall-lite -f start 1>/dev/null + eend $? +} + +stop() { + ebegin "Stopping firewall" + /sbin/shorewall-lite stop 1>/dev/null + eend $? +} + +restart() { + # shorewall comes with its own control script that includes a + # restart function, so refrain from calling svc_stop/svc_start + # here. Note that this comment is required to fix bug 55576; + # runscript.sh greps this script... (09 Jul 2004 agriffis) + ebegin "Restarting firewall" + if [ -f /var/lib/shorewall-lite/restore ] ; then + /sbin/shorewall-lite restore + else + /sbin/shorewall-lite restart 1>/dev/null + fi + eend $? +} + +clear() { + # clear will remove all the rules and bring the system to an unfirewalled + # state. (21 Nov 2004 eldad) + + ebegin "Clearing all firewall rules and setting policy to ACCEPT" + /sbin/shorewall-lite clear + eend $? +} + +reset() { + # reset the packet and byte counters in the firewall + + ebegin "Resetting the packet and byte counters in the firewall" + /sbin/shorewall-lite reset + eend $? +} + +refresh() { + # refresh the rules involving the broadcast addresses of firewall + # interfaces, the black list, traffic control rules and + # ECN control rules + + ebegin "Refreshing firewall rules" + /sbin/shorewall-lite refresh + eend $? +} |