From 483f7de4ab6a706517279a24d2efc969f4a1996d Mon Sep 17 00:00:00 2001 From: root Date: Mon, 28 May 2012 17:43:57 +0000 Subject: Mon May 28 17:43:57 UTC 2012 --- community-testing/inn/PKGBUILD | 132 ++++++++++++++++++++++++++++++++++ community-testing/inn/inn.install | 22 ++++++ community-testing/inn/innd.conf | 2 + community-testing/inn/innd.rc | 47 ++++++++++++ community-testing/inn/nnrpd.conf | 3 + community-testing/inn/nnrpd.rc | 49 +++++++++++++ community-testing/inn/site.make.patch | 32 +++++++++ 7 files changed, 287 insertions(+) create mode 100644 community-testing/inn/PKGBUILD create mode 100644 community-testing/inn/inn.install create mode 100644 community-testing/inn/innd.conf create mode 100644 community-testing/inn/innd.rc create mode 100644 community-testing/inn/nnrpd.conf create mode 100644 community-testing/inn/nnrpd.rc create mode 100644 community-testing/inn/site.make.patch (limited to 'community-testing/inn') diff --git a/community-testing/inn/PKGBUILD b/community-testing/inn/PKGBUILD new file mode 100644 index 000000000..4a71ca57e --- /dev/null +++ b/community-testing/inn/PKGBUILD @@ -0,0 +1,132 @@ +# $Id: PKGBUILD 71364 2012-05-27 07:38:55Z bluewind $ +# Maintainer: Sergej Pupykin +# Maintainer: Edward Tjörnhammar +# Contributor: Edward Tjörnhammar + +pkgname=inn +pkgver=2.5.2 +pkgrel=10 +pkgdesc="Complete open source Usenet system. De facto standard for handling news routing, news spool and serving the spool to customers." +url="http://www.isc.org/software/inn/" +arch=('i686' 'x86_64') +license=("custom:INN") +depends=('openssl' 'dovecot') +makedepends=('make' 'bison' 'python2' 'gcc' 'smtp-forwarder' 'libsasl') +optdepends=('perl' 'python2' 'libsasl') +options=(emptydirs docs zipman) +install=inn.install +backup=(etc/inn/newsfeeds + etc/inn/incoming.conf + etc/inn/nnrpd.track + etc/inn/passwd.nntp + etc/inn/inn.conf + etc/inn/moderators + etc/inn/control.ctl + etc/inn/expire.ctl + etc/inn/nntpsend.ctl + etc/inn/innreport.conf + etc/inn/innwatch.ctl + etc/inn/distrib.pats + etc/inn/actsync.cfg + etc/inn/actsync.ign + etc/inn/motd.news + etc/inn/storage.conf + etc/inn/cycbuff.conf + etc/inn/buffindexed.conf + etc/inn/innfeed.conf + etc/inn/news2mail.cf + etc/inn/readers.conf + etc/inn/radius.conf + etc/inn/ovdb.conf + etc/inn/subscriptions + var/db/inn/active + var/db/inn/active.times + var/db/inn/history + var/db/inn/history.dir + var/db/inn/history.hash + var/db/inn/history.index + var/db/inn/newsgroups) +source=(http://ftp.isc.org/isc/inn/inn-$pkgver.tar.gz + innd.rc + nnrpd.rc + innd.conf + nnrpd.conf + site.make.patch) +md5sums=('a6e577dceb90d07501b96149508b974b' + 'a243d9498568f1beee20da5684b5fbfc' + 'a0b1ff8501ac8a31ce81a2f9c9b4bac9' + 'fbf1d2c5b3c5a08ae3e515c71c2e2e4a' + 'bb4bbe86ae52fbbf08b0f6f370dea052' + '960c800026ed6e03901cf0bafdfd53d8') + +build() { + cd $srcdir/inn-$pkgver + + [ $NOEXTRACT -eq 1 ] || PYTHON=/usr/bin/python2 ./configure --prefix=/usr \ + --includedir=/usr/include/inn \ + --sbindir=/usr/sbin \ + --with-libtool \ + --with-gnu-id \ + --with-db-dir=/var/db/inn \ + --sysconfdir=/etc/inn \ + --with-spool-dir=/var/spool/news \ + --with-log-dir=/var/log/inn \ + --with-run-dir=/var/run/inn \ + --with-tmp-dir=/var/spool/inn/tmp \ + --enable-largefiles \ + --with-openssl=/usr \ + --with-perl \ + --with-python \ + --with-sendmail=/usr/bin/msmtp \ + --with-sasl=/usr \ + --with-news-user=9 \ + --with-news-group=13 + # See https://wiki.archlinux.org/index.php/DeveloperWiki:UID_/_GID_Database + + test -f include/config.h + cat >>include/config.h <&- >&- || groupadd -g 13 -r news 2>&- >&- + grep -e "^news:" /etc/passwd 2>&- >&- || useradd -u 9 -r -m -g news news 2>&- >&- + + /usr/bin/makedbz -i -o 2>&- >&- + mkdir /var/log/news 2>&- >&- + + chown news:news -R var/spool/news 2>&- >&- + chown news:news var/log/news 2>&- >&- + chown news:news -R var/db/inn 2>&- >&- + + echo "" + echo "->" + echo "-> If this is a first-time installation, a minimal active file and" + echo "-> history database have been installed. Do not forget to update" + echo "-> your cron entries and configure INN. See INSTALL for more" + echo "-> information." + echo "->" + echo "-> The default user:group for inn is news:news" + echo "->" + echo "" +} diff --git a/community-testing/inn/innd.conf b/community-testing/inn/innd.conf new file mode 100644 index 000000000..48f96ba5e --- /dev/null +++ b/community-testing/inn/innd.conf @@ -0,0 +1,2 @@ +NEWS_USER=news +NEWS_GROUP=news diff --git a/community-testing/inn/innd.rc b/community-testing/inn/innd.rc new file mode 100644 index 000000000..5e36aec0d --- /dev/null +++ b/community-testing/inn/innd.rc @@ -0,0 +1,47 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions +[ -f /etc/conf.d/innd ] && . /etc/conf.d/innd +[ -z "$NEWS_USER" ] && print "Please set news username" && exit 1; +[ -z "$NEWS_GROUP" ] && print "Please set news groupname" && exit 1; + +case "$1" in + start) + stat_busy "Starting InterNetNews" + [ -d /var/run/inn ] || { + mkdir -p /var/run/inn + chown -R $NEWS_USER:$NEWS_GROUP /var/run/inn + } + su $NEWS_USER -c /usr/bin/rc.news 2>&- >&- + if [ $? -gt 0 ]; then + stat_fail + else + echo $! > /var/run/innd.pid + add_daemon innd + stat_done + fi + + ;; + stop) + stat_busy "Stopping InterNetNews" + ctlinnd throttle "shutting down" 2>&- >&- + su $NEWS_USER -c /usr/bin/rc.news stop 2>&- >&- + if [ $? -gt 0 ]; then + stat_fail + else + kill `ps faxu| grep ^$NEWS_USER | awk -- '{print $2}'` 2>&- >&- + rm /var/run/innd.pid + rm_daemon innd + stat_done + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 diff --git a/community-testing/inn/nnrpd.conf b/community-testing/inn/nnrpd.conf new file mode 100644 index 000000000..689a289ce --- /dev/null +++ b/community-testing/inn/nnrpd.conf @@ -0,0 +1,3 @@ +USE_SSL=1 +LISTEN_PORT=563 +NNRPD_OPTS="-D -S -p $LISTEN_PORT -c /etc/inn/readers.conf" diff --git a/community-testing/inn/nnrpd.rc b/community-testing/inn/nnrpd.rc new file mode 100644 index 000000000..d7c902832 --- /dev/null +++ b/community-testing/inn/nnrpd.rc @@ -0,0 +1,49 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions +[ -f /etc/conf.d/nnrpd ] && . /etc/conf.d/nnrpd +[ -z "$NNRPD_OPTS" ] && print "FATAL: No arguments where passed" && exit 1; + +PID=`pidof -o %PPID nnrpd` +case "$1" in + start) + stat_busy "Starting InterNetNews Readers Daemon" + if [ ! -f /var/run/nnrpd.pid ]; then + stat_append ":: InterNetNews (innd) is not running" + stat_fail + exit 1 + fi + + [ -d /var/run/inn ] || mkdir -p /var/run/inn + [ -z "$PID" ] && nnrpd $NNRPD_OPTS 2>&- >&- + if [ $? -gt 0 ]; then + stat_fail + else + PID=`pidof -o %PPID nnrpd` + echo $PID > /var/run/nnrpd.pid + add_daemon nnrpd + stat_done + fi + + ;; + stop) + stat_busy "Stopping InterNetNews Readers Daemon" + [ ! -z "$PID" ] && kill $PID >&- + if [ $? -gt 0 ]; then + stat_fail + else + rm /var/run/nnrpd.pid + rm_daemon nnrpd + stat_done + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 diff --git a/community-testing/inn/site.make.patch b/community-testing/inn/site.make.patch new file mode 100644 index 000000000..5af6e1162 --- /dev/null +++ b/community-testing/inn/site.make.patch @@ -0,0 +1,32 @@ +--- old/src/inn-2.4.5/site/Makefile 2008-06-29 19:56:57.000000000 +0200 ++++ new/src/inn-2.4.5/site/Makefile 2008-10-09 19:27:59.613208825 +0200 +@@ -52,7 +52,6 @@ + + PATH_ACTIVE = ${PATHDB}/active + PATH_ACTIVE_TIMES = ${PATHDB}/active.times +-PATH_HISTORY = ${PATHDB}/history + PATH_NEWSGROUPS = ${PATHDB}/newsgroups + + ## Scripts from above, plus site-specific config files. +@@ -98,7 +97,7 @@ + ALL_INSTALLED = $(MOST_INSTALLED) $(REST_INSTALLED) + + SPECIAL = $D$(PATH_ACTIVE) $D$(PATH_ACTIVE_TIMES) \ +- $D$(PATH_NEWSGROUPS) $D$(PATH_HISTORY) ++ $D$(PATH_NEWSGROUPS) + + ## Get new versions of everything from samples directory. + all: $(ALL) config +@@ -143,12 +142,6 @@ + chown $(RUNASUSER) $@ + chgrp $(RUNASGROUP) $@ + chmod $(FILEMODE) $@ +-$D$(PATH_HISTORY): +- touch $@ +- chown $(RUNASUSER) $@ +- chgrp $(RUNASGROUP) $@ +- chmod $(FILEMODE) $@ +- test -z "$D" && $(PATHBIN)/makedbz -i -o + + bootstrap: + -- cgit v1.2.3-54-g00ecf