summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorNicolas Reynolds <fauno@kiwwwi.com.ar>2011-07-18 12:59:47 -0300
committerNicolas Reynolds <fauno@kiwwwi.com.ar>2011-07-18 12:59:47 -0300
commit12c074375919d2de177eb9456352866902118a03 (patch)
tree3f6b2e5baadedbc7901bf3e614fd017ca8aaee52 /testing
parent598db82f25ffe3557e395a11f379de65af9e1ac1 (diff)
parentddddf9c453076a407bfdbf3e030e606f31ee2b86 (diff)
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts: community/dopewars/PKGBUILD community/virtualbox/PKGBUILD core/lvm2/PKGBUILD extra/aspell/PKGBUILD extra/gnome-python-extras/PKGBUILD extra/libproxy/PKGBUILD extra/live-media/PKGBUILD extra/ocaml/PKGBUILD extra/putty/PKGBUILD extra/python/PKGBUILD extra/ruby/PKGBUILD kde-unstable/calligra/PKGBUILD multilib-testing/lib32-mesa/PKGBUILD testing/mesa/PKGBUILD
Diffstat (limited to 'testing')
-rw-r--r--testing/ardour/PKGBUILD73
-rw-r--r--testing/ardour/ardour.changelog49
-rw-r--r--testing/ardour/ardour.desktop9
-rw-r--r--testing/ardour/gcc46.patch42
-rw-r--r--testing/ardour/raptor2.patch57
-rw-r--r--testing/esound/PKGBUILD38
-rwxr-xr-xtesting/esound/esd37
-rw-r--r--testing/esound/esd-0.2.38-alsa-drain.patch11
-rw-r--r--testing/file/PKGBUILD39
-rw-r--r--testing/file/file-5.07-zip-detect.patch40
-rw-r--r--testing/inetutils/PKGBUILD62
-rw-r--r--testing/inetutils/ftpd.conf4
-rw-r--r--testing/inetutils/ftpd.rc37
-rw-r--r--testing/inetutils/inetutils.install20
-rw-r--r--testing/inetutils/rexec.xinetd10
-rw-r--r--testing/inetutils/rlogin.xinetd10
-rw-r--r--testing/inetutils/rsh.xinetd10
-rw-r--r--testing/inetutils/talk.xinetd10
-rw-r--r--testing/inetutils/telnet.xinetd10
-rw-r--r--testing/mesa/linking_fix.patch22
-rw-r--r--testing/mysql/PKGBUILD130
-rw-r--r--testing/mysql/my.cnf145
-rw-r--r--testing/mysql/mysql.install26
-rwxr-xr-xtesting/mysql/mysqld77
-rw-r--r--testing/net-snmp/PKGBUILD48
-rw-r--r--testing/net-snmp/libnl-2.patch67
-rw-r--r--testing/net-snmp/snmpd.rc38
-rw-r--r--testing/nfs-utils/PKGBUILD72
-rw-r--r--testing/nfs-utils/exports15
-rw-r--r--testing/nfs-utils/idmapd.conf14
-rw-r--r--testing/nfs-utils/nfs-common319
-rw-r--r--testing/nfs-utils/nfs-common.conf40
-rw-r--r--testing/nfs-utils/nfs-server303
-rw-r--r--testing/nfs-utils/nfs-server.conf29
-rw-r--r--testing/nfs-utils/nfs-utils-1.1.2-kerberos-ac.patch138
-rw-r--r--testing/nfs-utils/nfs-utils-1.1.4-mtab-sym.patch39
-rw-r--r--testing/nfs-utils/nfs-utils-1.1.4-no-exec.patch15
-rw-r--r--testing/nfs-utils/nfs-utils-1.1.6-heimdal_functions.patch69
-rw-r--r--testing/nfs-utils/nfs-utils-1.1.6-no_libgssapi.patch57
-rw-r--r--testing/nfs-utils/nfs-utils.install32
-rw-r--r--testing/nfs-utils/start-statd.patch22
-rw-r--r--testing/openssh/PKGBUILD70
-rw-r--r--testing/openssh/authfile.c.patch198
-rwxr-xr-xtesting/openssh/sshd48
-rw-r--r--testing/openssh/sshd.confd4
-rw-r--r--testing/openssh/sshd.pam11
-rw-r--r--testing/pygtk/PKGBUILD37
-rw-r--r--testing/pygtk/python27.patch50
-rwxr-xr-xtesting/python-numpy/PKGBUILD61
-rw-r--r--testing/quota-tools/LICENSE33
-rw-r--r--testing/quota-tools/PKGBUILD49
-rw-r--r--testing/quota-tools/nulls.diff20
-rw-r--r--testing/quota-tools/quotaon.diff216
-rw-r--r--testing/quota-tools/repquota.diff91
-rw-r--r--testing/quota-tools/system_inodes.diff18
-rw-r--r--testing/rrdtool/PKGBUILD37
-rw-r--r--testing/slv2/PKGBUILD32
-rw-r--r--testing/slv2/slv2.changelog23
-rw-r--r--testing/slv2/slv2.install14
-rw-r--r--testing/socat/PKGBUILD32
-rw-r--r--testing/tftp-hpa/LICENSE32
-rw-r--r--testing/tftp-hpa/PKGBUILD35
-rw-r--r--testing/tftp-hpa/tftpd.conf4
-rwxr-xr-xtesting/tftp-hpa/tftpd.rc38
-rw-r--r--testing/vsftpd/PKGBUILD43
-rw-r--r--testing/vsftpd/vsftpd.d67
-rw-r--r--testing/vsftpd/vsftpd.install17
-rw-r--r--testing/vsftpd/vsftpd.xinetd10
-rw-r--r--testing/xinetd/PKGBUILD43
-rw-r--r--testing/xinetd/servers10
-rw-r--r--testing/xinetd/services10
-rwxr-xr-xtesting/xinetd/xinetd38
-rw-r--r--testing/xinetd/xinetd.conf14
73 files changed, 3690 insertions, 0 deletions
diff --git a/testing/ardour/PKGBUILD b/testing/ardour/PKGBUILD
new file mode 100644
index 000000000..5780fa159
--- /dev/null
+++ b/testing/ardour/PKGBUILD
@@ -0,0 +1,73 @@
+# $Id: PKGBUILD 131778 2011-07-14 23:39:36Z schiv $
+# Maintainer: tobias <tobias@archlinux.org>
+# Maintainer: Ray Rashif <schiv@archlinux.org>
+# Contributor: Giovanni Scafora <giovanni@archlinux.org>
+
+# ardour, liblrdf and raptor are heavily dependent on each other. Updating of
+# one package mostly will require an update of all the other packages. I vote
+# for fixed dependencies speaking in terms of versions
+
+pkgname=ardour
+pkgver=2.8.11
+pkgrel=5
+pkgdesc="A multichannel hard disk recorder and digital audio workstation"
+arch=('i686' 'x86_64')
+url="http://ardour.org/"
+license=('GPL')
+depends=('liblrdf>=0.4.0-8' 'liblo' 'aubio' 'libusb-compat'
+ 'libgnomecanvasmm' 'soundtouch' 'slv2>=0.6.6-6')
+ # -rubberband -libgnomecanvas(+libgnomecanvasmm)
+ # +soundtouch (these +/- changes are for SYSLIBS)
+ # liblrdf versioned for https://bugs.archlinux.org/task/25005
+ # slv2 versioned for https://bugs.archlinux.org/task/25060
+makedepends=('scons' 'boost' 'pkg-config')
+changelog=${pkgname}.changelog
+source=(ftp://ftp.archlinux.org/other/ardour/${pkgname}-${pkgver}.tar.bz2
+ ${pkgname}.desktop
+ gcc46.patch
+ raptor2.patch)
+md5sums=('f451a8d0abc133a1700c3932e07a5612'
+ '8aeaf433ebf781733db48e5a16b0c4da'
+ 'd709add59911d099c813162448e4db99'
+ 'a26a9bec0968fa0630c70f70c54f67de')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ # gcc 4.6 compatibility
+ # http://tracker.ardour.org/view.php?id=3771
+ patch -Np1 -i "$srcdir/gcc46.patch"
+
+ # raptor2 compatibility
+ # https://bugs.archlinux.org/task/25060
+ # http://tracker.ardour.org/view.php?id=4179
+ patch -Np0 -i "$srcdir/raptor2.patch"
+
+ sed -i '/-O3/d' SConstruct
+
+ # use syslibs until internal sigc++ issue w/ latest gcc (?) resolves
+ # TODO: report upstream
+ scons ${MAKEFLAGS} ARCH="${CFLAGS}" \
+ PREFIX="/usr" \
+ DIST_LIBDIR="lib" \
+ FREEDESKTOP=0 \
+ FREESOUND=1 \
+ SYSLIBS=1 \
+ DESTDIR="${pkgdir}"
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ scons PREFIX="/usr" \
+ FREEDESKTOP=0 \
+ FREESOUND=1 \
+ SYSLIBS=1 \
+ DESTDIR="${pkgdir}" install
+
+ # install some freedesktop.org compatibility
+ install -Dm644 "${srcdir}/${pkgname}.desktop" \
+ "${pkgdir}/usr/share/applications/${pkgname}.desktop"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/testing/ardour/ardour.changelog b/testing/ardour/ardour.changelog
new file mode 100644
index 000000000..47c111f01
--- /dev/null
+++ b/testing/ardour/ardour.changelog
@@ -0,0 +1,49 @@
+15 Jul 2011 (GMT+8) Ray Rashif <schiv@archlinux.org>
+
+ * 2.8.11-5:
+ Resolve previous issues with slv2 & redland/rasqal/raptor
+ - just needed rebuild of slv2 against latest redland suite [1]
+ - also needed ardour buildsystem patch for raptor2 [1][2]
+ - bring back support for slv2
+
+ [1] https://bugs.archlinux.org/task/25060
+ [2] http://tracker.ardour.org/view.php?id=4179
+
+9 Jul 2011 (GMT+8) Ray Rashif <schiv@archlinux.org>
+
+ * 2.8.11-4:
+ Fix build failures and runtime segfaults
+ - gcc 4.6 patch
+ - enable SYSLIBS due to ardour sigc++ issues
+ - remove slv2 dep due to ardour rasqal incompatibility [1][2]
+
+ [1] https://bugs.archlinux.org/task/25060
+ [2] https://ardour.org/node/4301
+
+22 Feb 2011 (GMT+8) Ray Rashif <schiv@archlinux.org>
+
+ * 2.8.11-2 :
+ raptor rebuild
+
+9 Aug 2010 (GMT+8) Ray Rashif <schiv@archlinux.org>
+
+ * 2.8.11-1 :
+ Testing build.
+ Removed libgnomecanvasmm depend (ardour internal).
+ Removed soundtouch makedepend (ardour internal, unneded).
+ Added new depends
+ - slv2 ("LV2" plug-ins support)
+ - rubberband (can "do more" than soundtouch)
+ - libgnomecanvas
+ Not using SYSLIBS because upstream does not support it.
+ Namcap warnings can be ignored; they're ardour internals.
+
+ * PKGBUILD :
+ Minor cosmetic ammendments.
+
+ * ardour.changelog :
+ Added this changelog.
+ Only important changes will be logged.
+
+ * ardour.install :
+ Removed install scriptlet; old and deprecated information.
diff --git a/testing/ardour/ardour.desktop b/testing/ardour/ardour.desktop
new file mode 100644
index 000000000..b50f6c952
--- /dev/null
+++ b/testing/ardour/ardour.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Ardour
+Comment=Multitrack hard disk recorder
+Exec=ardour2
+Icon=/usr/share/ardour2/icons/ardour_icon_48px.png
+Terminal=false
+Type=Application
+X-MultipleArgs=false
+Categories=GTK;Audio;AudioVideoEditing;AudioVideo;Video;
diff --git a/testing/ardour/gcc46.patch b/testing/ardour/gcc46.patch
new file mode 100644
index 000000000..d01610d1d
--- /dev/null
+++ b/testing/ardour/gcc46.patch
@@ -0,0 +1,42 @@
+diff -rupN ardour-2.8.11.old/libs/ardour/enums.cc ardour-2.8.11/libs/ardour/enums.cc
+--- ardour-2.8.11.old/libs/ardour/enums.cc 2010-04-20 13:28:37.000000000 -0400
++++ ardour-2.8.11/libs/ardour/enums.cc 2011-02-13 11:23:02.000000000 -0500
+@@ -31,7 +31,8 @@
+
+ using namespace std;
+ using namespace PBD;
+-using namespace ARDOUR;
++namespace ARDOUR
++{
+
+ void
+ setup_enum_writer ()
+@@ -362,3 +363,5 @@ setup_enum_writer ()
+ REGISTER (_Track_FreezeState);
+
+ }
++
++}
+diff -rupN ardour-2.8.11.old/libs/rubberband/rubberband/RubberBandStretcher.h ardour-2.8.11/libs/rubberband/rubberband/RubberBandStretcher.h
+--- ardour-2.8.11.old/libs/rubberband/rubberband/RubberBandStretcher.h 2009-03-26 10:25:40.000000000 -0400
++++ ardour-2.8.11/libs/rubberband/rubberband/RubberBandStretcher.h 2011-02-09 21:41:04.000000000 -0500
+@@ -19,6 +19,7 @@
+ #define RUBBERBAND_API_MAJOR_VERSION 2
+ #define RUBBERBAND_API_MINOR_VERSION 0
+
++#include <cstddef>
+ #include <vector>
+
+ /**
+diff -rupN ardour-2.8.11.old/libs/surfaces/wiimote/wiimote.cc ardour-2.8.11/libs/surfaces/wiimote/wiimote.cc
+--- ardour-2.8.11.old/libs/surfaces/wiimote/wiimote.cc 2009-02-24 07:38:19.000000000 -0500
++++ ardour-2.8.11/libs/surfaces/wiimote/wiimote.cc 2011-02-13 11:23:24.000000000 -0500
+@@ -177,7 +177,7 @@ wiimote_discovery:
+ std::cerr << "Wiimote: discovering, press 1+2" << std::endl;
+
+ while (!wiimote_handle && !main_thread_quit) {
+- bdaddr = *BDADDR_ANY;
++ bdaddr = (bdaddr_t) {{0, 0, 0, 0, 0, 0}};
+ callback_thread_registered_for_ardour = false;
+ wiimote_handle = cwiid_open(&bdaddr, 0);
+
diff --git a/testing/ardour/raptor2.patch b/testing/ardour/raptor2.patch
new file mode 100644
index 000000000..fe7cacff3
--- /dev/null
+++ b/testing/ardour/raptor2.patch
@@ -0,0 +1,57 @@
+Index: SConstruct
+===================================================================
+--- SConstruct (revision 9877)
++++ SConstruct (revision 9878)
+@@ -431,7 +431,6 @@
+ 'gtk+-2.0' : '2.8.1',
+ 'libxml-2.0' : '2.6.0',
+ 'samplerate' : '0.1.0',
+- 'raptor' : '1.4.2',
+ 'lrdf' : '0.4.0',
+ 'jack' : '0.109.0',
+ 'libgnomecanvas-2.0' : '2.0',
+@@ -487,7 +486,10 @@
+
+ libraries['core'] = LibraryInfo (CCFLAGS = '-Ilibs')
+
+-conf = env.Configure (custom_tests = { 'CheckPKGExists' : CheckPKGExists } )
++conf = env.Configure (custom_tests = { 'CheckPKGExists' : CheckPKGExists,
++ 'CheckPKGVersion' : CheckPKGVersion }
++ )
++
+
+ if conf.CheckPKGExists ('fftw3f'):
+ libraries['fftw3f'] = LibraryInfo()
+@@ -501,6 +503,22 @@
+ libraries['aubio'] = LibraryInfo()
+ libraries['aubio'].ParseConfig('pkg-config --cflags --libs aubio')
+
++raptorOK = 0
++
++if conf.CheckPKGExists ('raptor2'):
++ libraries['raptor'] = LibraryInfo()
++ libraries['raptor'].ParseConfig('pkg-config --cflags --libs raptor2')
++ raptorOK = 1
++else:
++ if conf.CheckPKGExists ('raptor') and conf.CheckPKGVersion (pkg, '1.4.2'):
++ libraries['raptor'] = LibraryInfo()
++ libraries['raptor'].ParseConfig('pkg-config --cflags --libs raptor')
++ raptorOK = 1
++
++if raptorOK == 0:
++ print "Ardour requires either raptor or raptor2 to be available at build time"
++ Exit (1)
++
+ env = conf.Finish ()
+
+ if env['FFT_ANALYSIS']:
+@@ -570,9 +588,6 @@
+ libraries['lrdf'] = LibraryInfo()
+ libraries['lrdf'].ParseConfig('pkg-config --cflags --libs lrdf')
+
+-libraries['raptor'] = LibraryInfo()
+-libraries['raptor'].ParseConfig('pkg-config --cflags --libs raptor')
+-
+ libraries['sndfile'] = LibraryInfo()
+ libraries['sndfile'].ParseConfig ('pkg-config --cflags --libs sndfile')
+
diff --git a/testing/esound/PKGBUILD b/testing/esound/PKGBUILD
new file mode 100644
index 000000000..b6d035b22
--- /dev/null
+++ b/testing/esound/PKGBUILD
@@ -0,0 +1,38 @@
+# $Id: PKGBUILD 131830 2011-07-16 00:02:10Z dreisner $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+pkgname=esound
+pkgver=0.2.41
+pkgrel=2
+pkgdesc="Enlightened Sound Daemon"
+arch=(i686 x86_64)
+license=('LGPL')
+depends=('audiofile' 'alsa-lib>=1.0.18')
+url="http://www.tux.org/~ricdude/EsounD.html"
+provides=("esd=${pkgver}")
+replaces=('esd')
+conflicts=('esd')
+backup=('etc/esd.conf')
+options=('!libtool')
+source=(http://ftp.gnome.org/pub/GNOME/sources/${pkgname}/0.2/${pkgname}-${pkgver}.tar.bz2
+ esd-0.2.38-alsa-drain.patch
+ esd)
+md5sums=('8d9aad3d94d15e0d59ba9dc0ea990c6c'
+ '3de93efcd1bc196a3585e6aef50eac48'
+ 'a4c76e7c7f75b201ea7ab6fb15b47472')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -Np1 -i "${srcdir}/esd-0.2.38-alsa-drain.patch"
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --localstatedir=/var --disable-static \
+ --with-audiofile --without-libwrap \
+ --enable-alsa --disable-artstest
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ install -m755 -d "${pkgdir}/etc/rc.d"
+ install -m755 "${srcdir}/esd" "${pkgdir}/etc/rc.d/esd"
+}
diff --git a/testing/esound/esd b/testing/esound/esd
new file mode 100755
index 000000000..d90ef55fa
--- /dev/null
+++ b/testing/esound/esd
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/bin/esd`
+case "$1" in
+ start)
+ stat_busy "Starting Esound Daemon"
+ if [ -z "$PID" ]; then
+ /usr/bin/esd -nobeeps &
+ fi
+ if [ ! -z "$PID" -o $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon esd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Esound Daemon"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon esd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
diff --git a/testing/esound/esd-0.2.38-alsa-drain.patch b/testing/esound/esd-0.2.38-alsa-drain.patch
new file mode 100644
index 000000000..f2fb716ba
--- /dev/null
+++ b/testing/esound/esd-0.2.38-alsa-drain.patch
@@ -0,0 +1,11 @@
+--- esound-0.2.38/audio_alsa09.c.old 2007-06-11 12:22:24.000000000 +0200
++++ esound-0.2.38/audio_alsa09.c 2007-06-11 12:22:49.000000000 +0200
+@@ -486,7 +486,7 @@ void esd_audio_flush(void)
+ }
+
+ if (alsa_playback_handle != NULL)
+- snd_pcm_drain( alsa_playback_handle );
++ snd_pcm_drop( alsa_playback_handle );
+
+ if (alsadbg)
+ print_state();
diff --git a/testing/file/PKGBUILD b/testing/file/PKGBUILD
new file mode 100644
index 000000000..2a5489e9d
--- /dev/null
+++ b/testing/file/PKGBUILD
@@ -0,0 +1,39 @@
+# $Id: PKGBUILD 131726 2011-07-14 01:54:47Z allan $
+# Maintainer: Allan McRae <allan@archlinux.org>
+# Contributor: Andreas Radke <andyrtr@archlinux.org>
+
+pkgname=file
+pkgver=5.07
+pkgrel=4
+pkgdesc="File type identification utility"
+arch=('i686' 'x86_64')
+license=('custom')
+groups=('base')
+url="http://www.darwinsys.com/file/"
+depends=('glibc' 'zlib')
+options=('!libtool')
+source=(ftp://ftp.astron.com/pub/${pkgname}/${pkgname}-${pkgver}.tar.gz
+ file-5.07-zip-detect.patch)
+md5sums=('b8d1f9a8a644067bd0a703cebf3f4858'
+ 'ac155cf89af6665dfee76738c27366d8')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ sed -i 's#\$(datadir)/misc#\$(datadir)#' configure
+
+ # combined upstream patches to fix zip file detection
+ patch -Np1 -i ${srcdir}/file-5.07-zip-detect.patch
+
+ ./configure --prefix=/usr --datadir=/usr/share/file
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make DESTDIR=${pkgdir} install
+ install -dm755 ${pkgdir}/usr/share/misc
+ ln -s ../file/magic.mgc ${pkgdir}/usr/share/misc
+
+ install -D -m644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/COPYING
+}
diff --git a/testing/file/file-5.07-zip-detect.patch b/testing/file/file-5.07-zip-detect.patch
new file mode 100644
index 000000000..ce433bb90
--- /dev/null
+++ b/testing/file/file-5.07-zip-detect.patch
@@ -0,0 +1,40 @@
+diff -Naur file-5.07-orig//magic/Magdir/archive file-5.07/magic/Magdir/archive
+--- file-5.07-orig//magic/Magdir/archive 2011-04-24 01:02:48.000000000 +1000
++++ file-5.07/magic/Magdir/archive 2011-07-14 11:55:11.821178049 +1000
+@@ -1,5 +1,5 @@
+ #------------------------------------------------------------------------------
+-# $File: archive,v 1.63 2011/04/23 15:02:48 christos Exp $
++# $File: archive,v 1.66 2011/05/25 17:45:54 christos Exp $
+ # archive: file(1) magic for archive formats (see also "msdos" for self-
+ # extracting compressed archives)
+ #
+@@ -654,12 +654,6 @@
+ >>>>78 string -template Template
+ !:mime application/vnd.oasis.opendocument.image-template
+
+-# StarView Metafile
+-# From Pierre Ducroquet <pinaraf@pinaraf.info>
+-0 string VCLMTF StarView MetaFile
+->6 beshort x \b, version %d
+->8 belong x \b, size %d
+-
+ # EPUB (OEBPS) books using OCF (OEBPS Container Format)
+ # From: Adam Buchbinder <adam.buchbinder@gmail.com>
+ # http://www.idpf.org/ocf/ocf1.0/download/ocf10.htm, section 4.
+@@ -692,8 +686,15 @@
+ >>4 byte 0x09 \b, at least v0.9 to extract
+ >>4 byte 0x0a \b, at least v1.0 to extract
+ >>4 byte 0x0b \b, at least v1.1 to extract
+->>0x161 string WINZIP \b, WinZIP self-extracting
+ >>4 byte 0x14 \b, at least v2.0 to extract
++>>4 byte 0x2d \b, at least v3.0 to extract
++>>0x161 string WINZIP \b, WinZIP self-extracting
++
++# StarView Metafile
++# From Pierre Ducroquet <pinaraf@pinaraf.info>
++0 string VCLMTF StarView MetaFile
++>6 beshort x \b, version %d
++>8 belong x \b, size %d
+
+ # Zoo archiver
+ 20 lelong 0xfdc4a7dc Zoo archive data
diff --git a/testing/inetutils/PKGBUILD b/testing/inetutils/PKGBUILD
new file mode 100644
index 000000000..19feb931e
--- /dev/null
+++ b/testing/inetutils/PKGBUILD
@@ -0,0 +1,62 @@
+# $Id: PKGBUILD 131824 2011-07-15 23:53:22Z dan $
+# Maintainer: Eric Belanger <eric@archlinux.org>
+
+pkgname=inetutils
+pkgver=1.8
+pkgrel=3
+pkgdesc="A collection of common network programs"
+arch=('i686' 'x86_64')
+url="http://www.gnu.org/software/inetutils/"
+license=('GPL')
+depends=('readline' 'ncurses' 'pam')
+provides=('netkit-ftp' 'netkit-rsh' 'netkit-telnet' 'netkit-ntalk')
+conflicts=('netkit-ftp' 'netkit-rsh' 'netkit-telnet' 'netkit-ntalk')
+replaces=('netkit-ftp' 'netkit-rsh' 'netkit-telnet' 'netkit-ntalk')
+backup=('etc/conf.d/ftpd' 'etc/xinetd.d/telnet' 'etc/xinetd.d/talk' \
+ 'etc/xinetd.d/rexec' 'etc/xinetd.d/rlogin' 'etc/xinetd.d/rsh')
+options=('!emptydirs')
+install=inetutils.install
+source=(http://ftp.gnu.org/gnu/inetutils/${pkgname}-${pkgver}.tar.gz \
+ ftpd.rc ftpd.conf telnet.xinetd talk.xinetd rexec.xinetd rlogin.xinetd rsh.xinetd)
+md5sums=('ad8fdcdf1797b9ca258264a6b04e48fd' 'c167200f6faeb64659e69ced2a9d672a'\
+ 'e6e6e5990a2e8159a276fef8fbf54c04' '8596208d119045543c5fb644e1d713d5'\
+ '2c3655985cf122591d71d031af84ff90' 'c490ea36751ac5f1d61d2c014959a3d1'\
+ 'c25d8382a994de84d9c6962d804f689b' 'c3aa508a9d1293a787341108cd49c1b7')
+sha1sums=('598445859b511f73681e4d74a41d65cd6ae0f83e' '84dc802b5e57b5e04c847572225a3b9612017155'\
+ '68a590083b45997dfdb80e666b2de762f494ba74' 'bfad98a4a62f1fff8779f076c6019ed07f9111af'\
+ '27d99b910eec0fc26bd79ccc2c1de26608330298' '87aa4f38ebee9dac5dcaa04cbc3f2f0906bec605'\
+ '81f10b3b688e3952f793b35bcef63b5bf257a92b' '81f4a8da823cf0bb14284fc71ee6108849691eda')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --libexec=/usr/sbin --localstatedir=/var \
+ --mandir=/usr/share/man --infodir=/usr/share/info \
+ --without-wrap --with-pam \
+ --enable-ftp --enable-ftpd \
+ --enable-telnet --enable-telnetd \
+ --enable-talk --enable-talkd \
+ --enable-rlogin --enable-rlogind \
+ --enable-rsh --enable-rshd \
+ --enable-rexec --enable-rexecd \
+ --enable-rcp \
+ --disable-tftp --disable-tftpd \
+ --disable-ping --disable-ping6 \
+ --disable-logger --disable-syslogd \
+ --disable-inetd --disable-whois \
+ --disable-uucpd --disable-hostname \
+ --disable-ifconfig --disable-traceroute
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+
+ install -D -m755 "${srcdir}/ftpd.rc" "${pkgdir}/etc/rc.d/ftpd"
+ install -D -m644 "${srcdir}/ftpd.conf" "${pkgdir}/etc/conf.d/ftpd"
+ install -D -m644 "${srcdir}/telnet.xinetd" "${pkgdir}/etc/xinetd.d/telnet"
+ install -D -m644 "${srcdir}/talk.xinetd" "${pkgdir}/etc/xinetd.d/talk"
+ install -D -m644 "${srcdir}/rexec.xinetd" "${pkgdir}/etc/xinetd.d/rexec"
+ install -D -m644 "${srcdir}/rlogin.xinetd" "${pkgdir}/etc/xinetd.d/rlogin"
+ install -D -m644 "${srcdir}/rsh.xinetd" "${pkgdir}/etc/xinetd.d/rsh"
+}
diff --git a/testing/inetutils/ftpd.conf b/testing/inetutils/ftpd.conf
new file mode 100644
index 000000000..f660f0035
--- /dev/null
+++ b/testing/inetutils/ftpd.conf
@@ -0,0 +1,4 @@
+#
+# Parameters to be passed to ftpd
+#
+FTPD_ARGS=""
diff --git a/testing/inetutils/ftpd.rc b/testing/inetutils/ftpd.rc
new file mode 100644
index 000000000..3d0d34421
--- /dev/null
+++ b/testing/inetutils/ftpd.rc
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/ftpd
+
+PID=$(pidof -o %PPID /usr/sbin/ftpd)
+case "$1" in
+ start)
+ stat_busy "Starting ftpd"
+ [ -z "$PID" ] && /usr/sbin/ftpd -D $FTPD_ARGS
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon ftpd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping ftpd"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon ftpd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/testing/inetutils/inetutils.install b/testing/inetutils/inetutils.install
new file mode 100644
index 000000000..b338fa498
--- /dev/null
+++ b/testing/inetutils/inetutils.install
@@ -0,0 +1,20 @@
+infodir=/usr/share/info
+filelist=(inetutils.info.gz)
+
+post_install() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info $infodir/$file $infodir/dir 2> /dev/null
+ done
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info --delete $infodir/$file $infodir/dir 2> /dev/null
+ done
+}
diff --git a/testing/inetutils/rexec.xinetd b/testing/inetutils/rexec.xinetd
new file mode 100644
index 000000000..4659e4745
--- /dev/null
+++ b/testing/inetutils/rexec.xinetd
@@ -0,0 +1,10 @@
+service exec
+{
+ flags = REUSE
+ socket_type = stream
+ wait = no
+ user = root
+ server = /usr/sbin/rexecd
+ log_on_failure += USERID
+ disable = yes
+}
diff --git a/testing/inetutils/rlogin.xinetd b/testing/inetutils/rlogin.xinetd
new file mode 100644
index 000000000..5c72f86df
--- /dev/null
+++ b/testing/inetutils/rlogin.xinetd
@@ -0,0 +1,10 @@
+service login
+{
+ flags = REUSE
+ socket_type = stream
+ wait = no
+ user = root
+ server = /usr/sbin/rlogind
+ log_on_failure += USERID
+ disable = yes
+}
diff --git a/testing/inetutils/rsh.xinetd b/testing/inetutils/rsh.xinetd
new file mode 100644
index 000000000..a13738c31
--- /dev/null
+++ b/testing/inetutils/rsh.xinetd
@@ -0,0 +1,10 @@
+service shell
+{
+ flags = REUSE
+ socket_type = stream
+ wait = no
+ user = root
+ server = /usr/sbin/rshd
+ log_on_failure += USERID
+ disable = yes
+}
diff --git a/testing/inetutils/talk.xinetd b/testing/inetutils/talk.xinetd
new file mode 100644
index 000000000..6abef359c
--- /dev/null
+++ b/testing/inetutils/talk.xinetd
@@ -0,0 +1,10 @@
+service ntalk
+{
+ flags = REUSE
+ socket_type = dgram
+ wait = yes
+ user = root
+ server = /usr/sbin/talkd
+ log_on_failure += USERID
+ disable = yes
+}
diff --git a/testing/inetutils/telnet.xinetd b/testing/inetutils/telnet.xinetd
new file mode 100644
index 000000000..bd3a5e4b1
--- /dev/null
+++ b/testing/inetutils/telnet.xinetd
@@ -0,0 +1,10 @@
+service telnet
+{
+ flags = REUSE
+ socket_type = stream
+ wait = no
+ user = root
+ server = /usr/sbin/telnetd
+ log_on_failure += USERID
+ disable = yes
+}
diff --git a/testing/mesa/linking_fix.patch b/testing/mesa/linking_fix.patch
new file mode 100644
index 000000000..34ed7902d
--- /dev/null
+++ b/testing/mesa/linking_fix.patch
@@ -0,0 +1,22 @@
+From 5fe5d236c26b3b2428bc7395304e40cf21d3d3e1 Mon Sep 17 00:00:00 2001
+From: Chia-I Wu <olv@lunarg.com>
+Date: Wed, 13 Jul 2011 07:25:46 +0000
+Subject: targets/egl-static: fix a linking error
+
+rbug is always linked in and it needs libpthread.
+---
+diff --git a/src/gallium/targets/egl-static/Makefile b/src/gallium/targets/egl-static/Makefile
+index 832d7ba..69e7eec 100644
+--- a/src/gallium/targets/egl-static/Makefile
++++ b/src/gallium/targets/egl-static/Makefile
+@@ -42,7 +42,7 @@ egl_CPPFLAGS += \
+ -I$(TOP)/src/egl/main \
+ -D_EGL_MAIN=_eglMain
+ egl_LIBS += $(TOP)/src/gallium/state_trackers/egl/libegl.a
+-egl_SYS += $(LIBUDEV_LIBS) $(DLOPEN_LIBS) -lEGL -lm
++egl_SYS += $(LIBUDEV_LIBS) $(DLOPEN_LIBS) -lEGL -lm -lpthread
+
+ # EGL platforms
+ ifneq ($(findstring x11, $(EGL_PLATFORMS)),)
+--
+cgit v0.8.3-6-g21f6
diff --git a/testing/mysql/PKGBUILD b/testing/mysql/PKGBUILD
new file mode 100644
index 000000000..54248034e
--- /dev/null
+++ b/testing/mysql/PKGBUILD
@@ -0,0 +1,130 @@
+# $Id: PKGBUILD 131641 2011-07-13 07:03:22Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
+# Contributor: judd <jvinet@zeroflux.org>
+
+pkgbase=mysql
+pkgname=('libmysqlclient' 'mysql-clients' 'mysql')
+pkgver=5.5.14
+pkgrel=2
+arch=('i686' 'x86_64')
+license=('GPL')
+url="http://www.mysql.com/"
+makedepends=('cmake' 'openssl' 'zlib')
+options=('!libtool')
+source=("http://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-5.5/${pkgbase}-${pkgver}.tar.gz"
+ 'mysqld'
+ 'my.cnf')
+md5sums=('19f43bb9c72b1b5f7ff86a7f921c9244'
+ '2234207625baa29b2ff7d7b4f088abce'
+ '1c949c0dbea5206af0db14942d9927b6')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+
+ # CFLAGS/CXXFLAGS as suggested upstream
+ CFLAGS="-fPIC ${CFLAGS} -fno-strict-aliasing -DBIG_JOINS=1 -fomit-frame-pointer" \
+ CXXFLAGS="-fPIC ${CXXFLAGS} -fno-strict-aliasing -DBIG_JOINS=1 -felide-constructors -fno-rtti" \
+
+ cmake ../${pkgbase}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DSYSCONFDIR=/etc/mysql \
+ -DMYSQL_DATADIR=/var/lib/mysql \
+ -DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock \
+ -DDEFAULT_CHARSET=utf8 \
+ -DDEFAULT_COLLATION=utf8_general_ci \
+ -DENABLED_LOCAL_INFILE=ON \
+ -DINSTALL_INFODIR=share/mysql/docs \
+ -DINSTALL_MANDIR=share/man \
+ -DINSTALL_PLUGINDIR=/usr/lib/mysql/plugin \
+ -DINSTALL_SCRIPTDIR=bin \
+ -DINSTALL_INCLUDEDIR=include/mysql \
+ -DINSTALL_DOCREADMEDIR=share/mysql \
+ -DINSTALL_SUPPORTFILESDIR=share/mysql \
+ -DINSTALL_MYSQLSHAREDIR=share/mysql \
+ -DINSTALL_DOCDIR=share/mysql/docs \
+ -DINSTALL_SHAREDIR=share/mysql \
+ -DWITH_READLINE=ON \
+ -DWITH_ZLIB=system \
+ -DWITH_SSL=system \
+ -DWITH_LIBWRAP=OFF \
+ -DWITH_MYSQLD_LDFLAGS="${LDFLAGS}" \
+ -DWITH_EXTRA_CHARSETS=complex \
+ -DWITH_EMBEDDED_SERVER=ON \
+ -DWITH_INNOBASE_STORAGE_ENGINE=1 \
+ -DWITH_PARTITION_STORAGE_ENGINE=1 \
+ -DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \
+ -DWITHOUT_ARCHIVE_STORAGE_ENGINE=1 \
+ -DWITHOUT_BLACKHOLE_STORAGE_ENGINE=1 \
+ -DWITHOUT_FEDERATED_STORAGE_ENGINE=1
+
+ make
+}
+
+package_libmysqlclient(){
+ pkgdesc="MySQL client libraries"
+ depends=('openssl')
+
+ cd "${srcdir}"/build
+ for dir in include libmysql libmysqld libservices; do
+ make -C ${dir} DESTDIR="${pkgdir}" install
+ done
+
+ install -d "${pkgdir}"/usr/bin
+ install -m755 scripts/mysql_config "${pkgdir}"/usr/bin/
+ install -d "${pkgdir}"/usr/share/man/man1
+ for man in mysql_config mysql_client_test_embedded mysqltest_embedded; do
+ install -m644 "${srcdir}"/${pkgbase}-${pkgver}/man/$man.1 "${pkgdir}"/usr/share/man/man1/$man.1
+ done
+}
+
+package_mysql-clients(){
+ pkgdesc="MySQL client tools"
+ depends=('libmysqlclient')
+
+ cd "${srcdir}"/build
+ make -C client DESTDIR="${pkgdir}" install
+
+ # install man pages
+ install -d "${pkgdir}"/usr/share/man/man1
+ for man in mysql mysqladmin mysqlcheck mysqldump mysqlimport mysqlshow mysqlslap; do
+ install -m644 "${srcdir}"/${pkgbase}-${pkgver}/man/$man.1 "${pkgdir}"/usr/share/man/man1/$man.1
+ done
+
+ # provided by mysql
+ rm "${pkgdir}"/usr/bin/{mysql_upgrade,mysqlbinlog,mysqltest}
+}
+
+package_mysql(){
+ pkgdesc="A fast SQL database server"
+ backup=('etc/mysql/my.cnf')
+ install=mysql.install
+ depends=('mysql-clients' 'net-tools')
+ optdepends=('perl-dbi' 'perl-dbd-mysql')
+ options=('emptydirs')
+
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+
+ install -Dm644 "${srcdir}"/my.cnf "${pkgdir}"/etc/mysql/my.cnf
+ install -Dm755 "${srcdir}"/mysqld "${pkgdir}"/etc/rc.d/mysqld
+
+ # provided by libmysqlclient
+ rm "${pkgdir}"/usr/bin/{mysql_config,mysql_client_test_embedded,mysqltest_embedded}
+ rm "${pkgdir}"/usr/lib/libmysql*
+ rm -r "${pkgdir}"/usr/include/
+ rm "${pkgdir}"/usr/share/man/man1/{mysql_config,mysql_client_test_embedded,mysqltest_embedded}.1
+
+ # provided by mysql-clients
+ rm "${pkgdir}"/usr/bin/{mysql,mysqladmin,mysqlcheck,mysqldump,mysqlimport,mysqlshow,mysqlslap}
+ rm "${pkgdir}"/usr/share/man/man1/{mysql,mysqladmin,mysqlcheck,mysqldump,mysqlimport,mysqlshow,mysqlslap}.1
+
+ # not needed
+ rm -r "${pkgdir}"/usr/{data,mysql-test,sql-bench}
+ rm "${pkgdir}"/usr/share/man/man1/mysql-test-run.pl.1
+
+ install -dm700 "${pkgdir}"/var/lib/mysql
+}
diff --git a/testing/mysql/my.cnf b/testing/mysql/my.cnf
new file mode 100644
index 000000000..9a41b4fc3
--- /dev/null
+++ b/testing/mysql/my.cnf
@@ -0,0 +1,145 @@
+# MySQL config file for medium systems.
+#
+# This is for a system with little memory (32M - 64M) where MySQL plays
+# an important part, or systems up to 128M where MySQL is used together with
+# other programs (such as a web server)
+#
+# MySQL programs look for option files in a set of
+# locations which depend on the deployment platform.
+# You can copy this option file to one of those
+# locations. For information about these locations, see:
+# http://dev.mysql.com/doc/mysql/en/option-files.html
+#
+# In this file, you can use all long options that a program supports.
+# If you want to know which options a program supports, run the program
+# with the "--help" option.
+
+# The following options will be passed to all MySQL clients
+[client]
+#password = your_password
+port = 3306
+socket = /var/run/mysqld/mysqld.sock
+
+# Here follows entries for some specific programs
+
+# The MySQL server
+[mysqld]
+port = 3306
+socket = /var/run/mysqld/mysqld.sock
+datadir = /var/lib/mysql
+skip-external-locking
+key_buffer_size = 16M
+max_allowed_packet = 1M
+table_open_cache = 64
+sort_buffer_size = 512K
+net_buffer_length = 8K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+
+# Don't listen on a TCP/IP port at all. This can be a security enhancement,
+# if all processes that need to connect to mysqld run on the same host.
+# All interaction with mysqld must be made via Unix sockets or named pipes.
+# Note that using this option without enabling named pipes on Windows
+# (via the "enable-named-pipe" option) will render mysqld useless!
+#
+skip-networking
+
+# Replication Master Server (default)
+# binary logging is required for replication
+log-bin=mysql-bin
+
+# binary logging format - mixed recommended
+binlog_format=mixed
+
+# required unique id between 1 and 2^32 - 1
+# defaults to 1 if master-host is not set
+# but will not function as a master if omitted
+server-id = 1
+
+# Replication Slave (comment out master section to use this)
+#
+# To configure this host as a replication slave, you can choose between
+# two methods :
+#
+# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
+# the syntax is:
+#
+# CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
+# MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
+#
+# where you replace <host>, <user>, <password> by quoted strings and
+# <port> by the master's port number (3306 by default).
+#
+# Example:
+#
+# CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
+# MASTER_USER='joe', MASTER_PASSWORD='secret';
+#
+# OR
+#
+# 2) Set the variables below. However, in case you choose this method, then
+# start replication for the first time (even unsuccessfully, for example
+# if you mistyped the password in master-password and the slave fails to
+# connect), the slave will create a master.info file, and any later
+# change in this file to the variables' values below will be ignored and
+# overridden by the content of the master.info file, unless you shutdown
+# the slave server, delete master.info and restart the slaver server.
+# For that reason, you may want to leave the lines below untouched
+# (commented) and instead use CHANGE MASTER TO (see above)
+#
+# required unique id between 2 and 2^32 - 1
+# (and different from the master)
+# defaults to 2 if master-host is set
+# but will not function as a slave if omitted
+#server-id = 2
+#
+# The replication master for this slave - required
+#master-host = <hostname>
+#
+# The username the slave will use for authentication when connecting
+# to the master - required
+#master-user = <username>
+#
+# The password the slave will authenticate with when connecting to
+# the master - required
+#master-password = <password>
+#
+# The port the master is listening on.
+# optional - defaults to 3306
+#master-port = <port>
+#
+# binary logging - not required for slaves, but recommended
+#log-bin=mysql-bin
+
+# Uncomment the following if you are using InnoDB tables
+#innodb_data_home_dir = /var/lib/mysql
+#innodb_data_file_path = ibdata1:10M:autoextend
+#innodb_log_group_home_dir = /var/lib/mysql
+# You can set .._buffer_pool_size up to 50 - 80 %
+# of RAM but beware of setting memory usage too high
+#innodb_buffer_pool_size = 16M
+#innodb_additional_mem_pool_size = 2M
+# Set .._log_file_size to 25 % of buffer pool size
+#innodb_log_file_size = 5M
+#innodb_log_buffer_size = 8M
+#innodb_flush_log_at_trx_commit = 1
+#innodb_lock_wait_timeout = 50
+
+[mysqldump]
+quick
+max_allowed_packet = 16M
+
+[mysql]
+no-auto-rehash
+# Remove the next comment character if you are not familiar with SQL
+#safe-updates
+
+[myisamchk]
+key_buffer_size = 20M
+sort_buffer_size = 20M
+read_buffer = 2M
+write_buffer = 2M
+
+[mysqlhotcopy]
+interactive-timeout
diff --git a/testing/mysql/mysql.install b/testing/mysql/mysql.install
new file mode 100644
index 000000000..9a4479215
--- /dev/null
+++ b/testing/mysql/mysql.install
@@ -0,0 +1,26 @@
+post_install(){
+ groupadd -g 89 mysql &>/dev/null
+ useradd -u 89 -g mysql -d /var/lib/mysql -s /bin/false mysql &>/dev/null
+ usr/bin/mysql_install_db --user=mysql --basedir=/usr
+ chown -R mysql:mysql var/lib/mysql &>/dev/null
+}
+
+post_upgrade(){
+ getent group mysql >/dev/null 2>&1 || groupadd -g 89 mysql &>/dev/null
+ getent passwd mysql >/dev/null 2>&1 || useradd -u 89 -g mysql -d /var/lib/mysql -s /bin/false mysql &>/dev/null
+
+ if [ "$(vercmp $2 5.5)" -lt 0 ]; then
+ echo " >> "
+ echo " >> Major version update. Consider restart the service, and then running mysql_upgrade after it."
+ echo " >> "
+ fi
+}
+
+post_remove(){
+ if getent passwd mysql >/dev/null 2>&1; then
+ userdel mysql
+ fi
+ if getent group mysql >/dev/null 2>&1; then
+ groupdel mysql
+ fi
+}
diff --git a/testing/mysql/mysqld b/testing/mysql/mysqld
new file mode 100755
index 000000000..1ac88a7cc
--- /dev/null
+++ b/testing/mysql/mysqld
@@ -0,0 +1,77 @@
+#!/bin/bash
+
+# general config
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+getPID() {
+ echo $(pgrep -u mysql mysqld 2>/dev/null);
+}
+
+case "$1" in
+ start)
+ stat_busy "Starting MySQL Server"
+ [ ! -d /var/run/mysqld ] && install -d -g mysql -o mysql /var/run/mysqld &>/dev/null
+ if [ -z "$(getPID)" ]; then
+ /usr/bin/mysqld_safe --user=mysql &>/dev/null &
+ if [ $? -gt 0 ]; then
+ stat_fail
+ exit 1
+ else
+ timeo=30
+ while [ $timeo -gt 0 ]; do
+ response=`/usr/bin/mysqladmin -uUNKNOWN_USER ping 2>&1` && break
+ echo "$response" | grep -q "mysqld is alive" && break
+ sleep 1
+ let timeo=${timeo}-1
+ done
+ if [ $timeo -eq 0 ]; then
+ stat_fail
+ exit 1
+ else
+ echo $(getPID) > /var/run/mysqld/mysqld.pid
+ add_daemon mysqld
+ stat_done
+ fi
+ fi
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+
+ stop)
+ stat_busy "Stopping MySQL Server"
+ if [ ! -z "$(getPID)" ]; then
+ timeo=30
+ kill $(getPID) &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ exit 1
+ fi
+ while [ ! -z "$(getPID)" -a $timeo -gt 0 ]; do
+ sleep 1
+ let timeo=${timeo}-1
+ done
+ if [ -z "$(getPID)" ]; then
+ rm -f /var/run/mysqld/mysqld.pid &>/dev/null
+ rm_daemon mysqld
+ stat_done
+ else
+ stat_fail
+ exit 1
+ fi
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/testing/net-snmp/PKGBUILD b/testing/net-snmp/PKGBUILD
new file mode 100644
index 000000000..a1f72cb01
--- /dev/null
+++ b/testing/net-snmp/PKGBUILD
@@ -0,0 +1,48 @@
+# $Id: PKGBUILD 131650 2011-07-13 08:13:14Z andrea $
+# Maintainer: Eric Belanger <eric@archlinux.org>
+# Contributor: Dale Blount <dale@archlinux.org>
+
+pkgname=net-snmp
+pkgver=5.6.1
+pkgrel=3
+pkgdesc="A suite of applications used to implement SNMP v1, SNMP v2c and SNMP v3 using both IPv4 and IPv6"
+arch=('i686' 'x86_64')
+url="http://www.net-snmp.org/"
+license=('custom')
+depends=('openssl' 'libnl')
+makedepends=('setuptools')
+optdepends=('perl-term-readkey: for snmpcheck application'
+ 'perl-tk: for snmpcheck and tkmib applications'
+ 'python2: for the python modules')
+provides=('ucd-snmp')
+options=('!libtool' '!makeflags' '!emptydirs')
+source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz"
+ 'snmpd.rc')
+md5sums=('b4e30ead5783b0bb1d280172c6095ea4'
+ '9f0d13676ba1fae1eb7eb178edd85b43')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ sed -i -e "s:\(install --basedir=\$\$dir\):\1 --root='${pkgdir}':" Makefile.in
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --enable-ucd-snmp-compatibility \
+ --enable-ipv6 \
+ --with-python-modules \
+ --with-default-snmp-version="3" \
+ --with-sys-contact="root@localhost" \
+ --with-sys-location="Unknown" \
+ --with-logfile="/var/log/snmpd.log" \
+ --with-mib-modules="host misc/ipfwacc ucd-snmp/diskio tunnel ucd-snmp/dlmod" \
+ --with-persistent-directory="/var/net-snmp" \
+ PYTHONPROG=/usr/bin/python2
+ make NETSNMP_DONT_CHECK_VERSION=1 LDFLAGS+="-Wl,-rpath -Wl,/usr/lib/perl5/core_perl/CORE"
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" INSTALL_PREFIX="${pkgdir}" INSTALLDIRS=vendor install
+ install -D -m755 "${srcdir}/snmpd.rc" "${pkgdir}/etc/rc.d/snmpd"
+ install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/testing/net-snmp/libnl-2.patch b/testing/net-snmp/libnl-2.patch
new file mode 100644
index 000000000..7c140fe83
--- /dev/null
+++ b/testing/net-snmp/libnl-2.patch
@@ -0,0 +1,67 @@
+diff -Nur net-snmp-5.5.orig//agent/mibgroup/mibII/tcpTable.c net-snmp-5.5//agent/mibgroup/mibII/tcpTable.c
+--- net-snmp-5.5.orig//agent/mibgroup/mibII/tcpTable.c 2009-06-13 04:02:02.000000000 +0200
++++ net-snmp-5.5//agent/mibgroup/mibII/tcpTable.c 2011-01-15 10:31:03.579735957 +0100
+@@ -555,8 +555,10 @@
+ static int
+ tcpTable_load_netlink()
+ {
++ int err;
++
+ /* TODO: perhaps use permanent nl handle? */
+- struct nl_handle *nl = nl_handle_alloc();
++ struct nl_sock *nl = nl_socket_alloc();
+
+ if (nl == NULL) {
+ DEBUGMSGTL(("mibII/tcpTable", "Failed to allocate netlink handle\n"));
+@@ -564,10 +566,10 @@
+ return -1;
+ }
+
+- if (nl_connect(nl, NETLINK_INET_DIAG) < 0) {
+- DEBUGMSGTL(("mibII/tcpTable", "Failed to connect to netlink: %s\n", nl_geterror()));
+- snmp_log(LOG_ERR, "snmpd: Couldn't connect to netlink: %s\n", nl_geterror());
+- nl_handle_destroy(nl);
++ if ((err = nl_connect(nl, NETLINK_INET_DIAG)) < 0) {
++ DEBUGMSGTL(("mibII/tcpTable", "Failed to connect to netlink: %s\n", nl_geterror(err)));
++ snmp_log(LOG_ERR, "snmpd: Couldn't connect to netlink: %s\n", nl_geterror(err));
++ nl_socket_free(nl);
+ return -1;
+ }
+
+@@ -579,10 +581,10 @@
+ struct nl_msg *nm = nlmsg_alloc_simple(TCPDIAG_GETSOCK, NLM_F_ROOT|NLM_F_MATCH|NLM_F_REQUEST);
+ nlmsg_append(nm, &req, sizeof(struct inet_diag_req), 0);
+
+- if (nl_send_auto_complete(nl, nm) < 0) {
+- DEBUGMSGTL(("mibII/tcpTable", "nl_send_autocomplete(): %s\n", nl_geterror()));
+- snmp_log(LOG_ERR, "snmpd: nl_send_autocomplete(): %s\n", nl_geterror());
+- nl_handle_destroy(nl);
++ if ((err = nl_send_auto_complete(nl, nm)) < 0) {
++ DEBUGMSGTL(("mibII/tcpTable", "nl_send_autocomplete(): %s\n", nl_geterror(err)));
++ snmp_log(LOG_ERR, "snmpd: nl_send_autocomplete(): %s\n", nl_geterror(err));
++ nl_socket_free(nl);
+ return -1;
+ }
+ nlmsg_free(nm);
+@@ -593,9 +595,9 @@
+
+ while (running) {
+ if ((len = nl_recv(nl, &peer, &buf, NULL)) <= 0) {
+- DEBUGMSGTL(("mibII/tcpTable", "nl_recv(): %s\n", nl_geterror()));
+- snmp_log(LOG_ERR, "snmpd: nl_recv(): %s\n", nl_geterror());
+- nl_handle_destroy(nl);
++ DEBUGMSGTL(("mibII/tcpTable", "nl_recv(): %s\n", nl_geterror(len)));
++ snmp_log(LOG_ERR, "snmpd: nl_recv(): %s\n", nl_geterror(len));
++ nl_socket_free(nl);
+ return -1;
+ }
+
+@@ -644,7 +646,7 @@
+ free(buf);
+ }
+
+- nl_handle_destroy(nl);
++ nl_socket_free(nl);
+
+ if (tcp_head) {
+ DEBUGMSGTL(("mibII/tcpTable", "Loaded TCP Table using netlink\n"));
diff --git a/testing/net-snmp/snmpd.rc b/testing/net-snmp/snmpd.rc
new file mode 100644
index 000000000..9f1b83f64
--- /dev/null
+++ b/testing/net-snmp/snmpd.rc
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/snmpd`
+case "$1" in
+ start)
+ stat_busy "Starting Net-SNMP"
+ [ -z "$PID" ] && /usr/sbin/snmpd
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ echo $PID > /var/run/snmpd.pid
+ add_daemon snmpd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Net-SNMP"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm /var/run/snmpd.pid
+ rm_daemon snmpd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 2
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/testing/nfs-utils/PKGBUILD b/testing/nfs-utils/PKGBUILD
new file mode 100644
index 000000000..3adca96d4
--- /dev/null
+++ b/testing/nfs-utils/PKGBUILD
@@ -0,0 +1,72 @@
+# $Id: PKGBUILD 131837 2011-07-16 00:22:48Z dreisner $
+# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+# Contributor: John Proctor <jproctor@prium.net>
+# Contributor: dibblethewrecker <dibblethewrecker.at.jiwe.org>
+# Contributor: abelstr <abel@pinklf.eu>
+# Contributor: Marco Lima <cipparello gmail com>
+
+pkgname=nfs-utils
+pkgver=1.2.3
+pkgrel=3
+pkgdesc="Support programs for Network File Systems"
+arch=('i686' 'x86_64')
+url='http://nfs.sourceforge.net'
+license=('GPL')
+backup=(etc/{exports,idmapd.conf} etc/conf.d/{nfs-common.conf,nfs-server.conf})
+depends=('glibc' 'e2fsprogs' 'rpcbind' 'libtirpc>=0.2.1' 'librpcsecgss>=0.19-2' 'nfsidmap' 'libevent>=2.0.10' 'libgssglue')
+makedepends=('pkgconfig' 'autoconf' 'automake')
+source=(http://downloads.sourceforge.net/project/nfs/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.bz2
+ nfs-common
+ nfs-common.conf
+ nfs-server
+ nfs-server.conf
+ exports
+ idmapd.conf
+ start-statd.patch
+ nfs-utils-1.1.4-mtab-sym.patch
+ nfs-utils-1.1.4-no-exec.patch)
+install=nfs-utils.install
+md5sums=('1131dc5f27c4f3905a6e7ee0d594fd4d'
+ 'fc508e10cdf5e8ddd80373b1b2bc99a1'
+ 'f73f197a16b02c3e248488ec35c4cf43'
+ '5ae080f6117cef3140f02bc162bdc755'
+ '2bf71def3263325643a09458635520f0'
+ 'ff585faf410a62c4333a027c50b56bae'
+ 'eb4f4027fab6fc1201f1ca04f5954c76'
+ 'e24f81a8c8657672e262c61235d34b4a'
+ '7674106eaaa4c149bccd4f05fe3604e9'
+ '4f4827dfc93008dfadd0a530ad0872b2')
+
+build() {
+ cd $srcdir/${pkgname}-${pkgver}
+ patch -Np1 -i ../nfs-utils-1.1.4-mtab-sym.patch
+ patch -Np1 -i ../nfs-utils-1.1.4-no-exec.patch
+
+ # arch specific patch
+ patch -Np0 -i $srcdir/start-statd.patch
+
+ ./configure --prefix=/usr --enable-nfsv3 --enable-nfsv4 --enable-gss \
+ --without-tcp-wrappers --with-statedir=/var/lib/nfs --enable-ipv6 --sysconfdir=/etc
+
+ make
+}
+
+package() {
+ cd $srcdir/${pkgname}-${pkgver}
+ make DESTDIR=$pkgdir install
+
+ # support python2 (FS#25120)
+ sed -i '1s/python$/python2/' "$pkgdir"/usr/sbin/{nfsiostat,mountstats}
+
+ # NFS & NFSv4 init scripts
+ install -D -m 755 ../nfs-common "$pkgdir/"etc/rc.d/nfs-common
+ install -D -m 755 ../nfs-server "$pkgdir/"etc/rc.d/nfs-server
+ # Configuration
+ install -D -m 644 ../exports "$pkgdir/"etc/exports
+ install -D -m 644 ../idmapd.conf "$pkgdir/"etc/idmapd.conf
+ install -D -m 644 ../nfs-common.conf "$pkgdir/"etc/conf.d/nfs-common.conf
+ install -D -m 644 ../nfs-server.conf "$pkgdir/"etc/conf.d/nfs-server.conf
+ # directories
+ mkdir "$pkgdir/"var/lib/nfs/rpc_pipefs
+ mkdir "$pkgdir/"var/lib/nfs/v4recovery
+}
diff --git a/testing/nfs-utils/exports b/testing/nfs-utils/exports
new file mode 100644
index 000000000..8f4aac598
--- /dev/null
+++ b/testing/nfs-utils/exports
@@ -0,0 +1,15 @@
+# /etc/exports
+#
+# List of directories exported to NFS clients. See exports(5).
+# Use exportfs -arv to reread.
+#
+# Example for NFSv2 and NFSv3:
+# /srv/home hostname1(rw,sync) hostname2(ro,sync)
+#
+# Example for NFSv4:
+# /srv/nfs4 hostname1(rw,sync,fsid=0)
+# /srv/nfs4/home hostname1(rw,sync,nohide)
+# Using Kerberos and integrity checking:
+# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt)
+# /srv/nfs4/home gss/krb5i(rw,sync,nohide)
+#
diff --git a/testing/nfs-utils/idmapd.conf b/testing/nfs-utils/idmapd.conf
new file mode 100644
index 000000000..b1b23afe9
--- /dev/null
+++ b/testing/nfs-utils/idmapd.conf
@@ -0,0 +1,14 @@
+[General]
+
+Verbosity = 0
+Pipefs-Directory = /var/lib/nfs/rpc_pipefs
+Domain = localdomain
+
+[Mapping]
+
+Nobody-User = nobody
+Nobody-Group = nobody
+
+[Translation]
+
+Method = nsswitch
diff --git a/testing/nfs-utils/nfs-common b/testing/nfs-utils/nfs-common
new file mode 100644
index 000000000..13742bde3
--- /dev/null
+++ b/testing/nfs-utils/nfs-common
@@ -0,0 +1,319 @@
+#!/bin/bash
+
+daemon_name=nfs-common
+
+# daemon dependencies
+DAEMON_DEPENDS=('rpcbind')
+
+NEED_STATD=
+STATD_OPTS=
+NEED_IDMAPD=
+IDMAPD_OPTS=
+NEED_GSSD=
+GSSD_OPTS=
+PIPEFS_MOUNTPOINT=
+PIPEFS_MOUNTOPTS=
+
+# rpc.statd daemon & binary location
+STATD_DAEMON_NAME=rpc.statd
+STATD="/usr/sbin/rpc.statd"
+
+# rpc.idmapd daemon & binary location
+IDMAPD_DAEMON_NAME=rpc.idmapd
+IDMAPD="/usr/sbin/rpc.idmapd"
+
+# rpc.gssd daemon & binary location
+GSSD_DAEMON_NAME=rpc.gssd
+GSSD="/usr/sbin/rpc.gssd"
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/$daemon_name.conf
+
+# Default mountpoint and options for rpc_pipefs filesystem
+[ -z "$PIPEFS_MOUNTPOINT" ] && PIPEFS_MOUNTPOINT="/var/lib/nfs/rpc_pipefs"
+[ -z "$PIPEFS_MOUNTOPTS" ] && PIPEFS_MOUNTOPTS="defaults"
+
+# Parse the fstab file, and determine whether we need idmapd and gssd. (The
+# /etc/conf.d/nfs-common settings, if any, will override our autodetection.)
+AUTO_NEED_IDMAPD=no
+AUTO_NEED_GSSD=no
+
+if [ -f /etc/fstab ]; then
+ exec 9<&0 </etc/fstab
+
+ while read DEV MTPT FSTYPE OPTS REST; do
+ if [ "$FSTYPE" = "nfs4" ]; then
+ AUTO_NEED_IDMAPD=yes
+ fi
+ case "$OPTS" in
+ sec=krb5|*,sec=krb5|sec=krb5,*|*,sec=krb5i,*|sec=krb5i|*,sec=krb5i|sec=krb5i,*|*,sec=krb5i,*|sec=krb5p|*,sec=krb5p|sec=krb5p,*|*,sec=krb5p,*)
+ AUTO_NEED_GSSD=yes
+ ;;
+ esac
+ done
+
+ exec 0<&9 9<&-
+fi
+
+# We also need idmapd if we run an NFSv4 server. It's fairly difficult
+# to autodetect whether there are NFSv4 exports or not, and idmapd is not a
+# particularily heavy daemon, so we auto-enable it if we find an /etc/exports
+# file. This does not mean that there are NFSv4 or other mounts active (or
+# even that nfs-kernel-server is installed), but it matches what the "start"
+# condition in nfs-kernel-server's init script does, which has a value in
+# itself.
+if [ -f /etc/exports ] && grep -q '^[[:space:]]*[^#]*/' /etc/exports; then
+ AUTO_NEED_IDMAPD=yes
+fi
+
+case "$NEED_STATD" in
+ yes|no)
+ ;;
+ *)
+ NEED_STATD=yes
+ ;;
+esac
+
+case "$NEED_IDMAPD" in
+ yes|no)
+ ;;
+ *)
+ NEED_IDMAPD=$AUTO_NEED_IDMAPD
+ ;;
+esac
+
+case "$NEED_GSSD" in
+ yes|no)
+ ;;
+ *)
+ NEED_GSSD=$AUTO_NEED_GSSD
+ ;;
+esac
+
+do_modprobe() {
+ if [ -x /sbin/modprobe -a -f /proc/modules ]; then
+ modprobe -q "$1" || true
+ fi
+}
+
+do_mount() {
+ if ! grep -E "$1\$" /proc/filesystems &> /dev/null ; then
+ return 1
+ fi
+
+ if grep -vw "$1" /proc/mounts &> /dev/null ; then
+ if ! mountpoint -q "$2" ; then
+ mount -t "$1" "$1" "$2" -o "$3"
+ return
+ fi
+ fi
+ return 0
+}
+
+do_umount() {
+ if mountpoint -q "$1" ; then
+ umount "$1"
+ fi
+ return 0
+}
+
+get_pid() {
+ pidof -o %PPID "$1"
+}
+
+case "$1" in
+ start)
+ ck_depends ${DAEMON_DEPENDS[@]}
+
+ rc=0
+ if [ "$NEED_STATD" = yes ]; then
+ stat_busy "Starting $STATD_DAEMON_NAME daemon"
+ PID=$(get_pid $STATD)
+ if [ -z "$PID" ]; then
+ [ -f /var/run/$STATD_DAEMON_NAME.pid ] && rm -f /var/run/$STATD_DAEMON_NAME.pid
+ # RUN
+ $STATD $STATD_OPTS
+ #
+ rc=$(($rc+$?))
+ if [ $rc -gt 0 ]; then
+ stat_fail
+ exit $rc
+ else
+ echo $(get_pid $STATD) > /var/run/$STATD_DAEMON_NAME.pid
+ stat_done
+ fi
+ else
+ stat_fail
+ exit 1
+ fi
+ # Run sm-notify
+ /usr/sbin/sm-notify $SMNOTIFY_OPTS
+ fi
+
+ if [ "$NEED_IDMAPD" = yes ] || [ "$NEED_GSSD" = yes ]; then
+ stat_busy "Mounting pipefs filesystem"
+ do_modprobe sunrpc
+ do_modprobe nfs
+ do_modprobe nfsd
+ do_mount rpc_pipefs "$PIPEFS_MOUNTPOINT" "$PIPEFS_MOUNTOPTS"
+ rc=$(($rc+$?))
+ if [ $rc -gt 0 ]; then
+ stat_fail
+ exit $rc
+ else
+ stat_done
+ fi
+
+ if [ "$NEED_IDMAPD" = yes ]; then
+ stat_busy "Starting $IDMAPD_DAEMON_NAME daemon"
+ PID=$(get_pid $IDMAPD)
+ if [ -z "$PID" ]; then
+ [ -f /var/run/$IDMAPD_DAEMON_NAME.pid ] && rm -f /var/run/$IDMAPD_DAEMON_NAME.pid
+ # RUN
+ $IDMAPD $IDMAPD_OPTS
+ #
+ rc=$(($rc+$?))
+ if [ $rc -gt 0 ]; then
+ stat_fail
+ exit $rc
+ else
+ echo $(get_pid $IDMAPD) > /var/run/$IDMAPD_DAEMON_NAME.pid
+ stat_done
+ fi
+ else
+ stat_fail
+ exit 1
+ fi
+ fi
+
+ if [ "$NEED_GSSD" = yes ]; then
+ do_modprobe rpcsec_gss_krb5
+ stat_busy "Starting $GSSD_DAEMON_NAME daemon"
+ PID=$(get_pid $GSSD)
+ if [ -z "$PID" ]; then
+ [ -f /var/run/$GSSD_DAEMON_NAME.pid ] && rm -f /var/run/$GSSD_DAEMON_NAME.pid
+ # RUN
+ $GSSD $GSSD_OPTS
+ #
+ rc=$(($rc+$?))
+ if [ $rc -gt 0 ]; then
+ stat_fail
+ exit $rc
+ else
+ echo $(get_pid $GSSD) > /var/run/$GSSD_DAEMON_NAME.pid
+ stat_done
+ fi
+ else
+ stat_fail
+ exit 1
+ fi
+ fi
+ fi
+
+ add_daemon $daemon_name
+ ;;
+
+ stop)
+ rc=0
+ if [ "$NEED_IDMAPD" = yes ] || [ "$NEED_GSSD" = yes ]; then
+
+ if [ "$NEED_GSSD" = yes ]; then
+ stat_busy "Stopping $GSSD_DAEMON_NAME daemon"
+ PID=$(get_pid $GSSD)
+ # KILL
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ #
+ rc=$(($rc+$?))
+ if [ $rc -gt 0 ]; then
+ stat_fail
+ exit $rc
+ else
+ rm -f /var/run/$GSSD_DAEMON_NAME.pid &> /dev/null
+ stat_done
+ fi
+ fi
+
+ if [ "$NEED_IDMAPD" = yes ]; then
+ stat_busy "Stopping $IDMAPD_DAEMON_NAME daemon"
+ PID=$(get_pid $IDMAPD)
+ # KILL
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ #
+ rc=$(($rc+$?))
+ if [ $rc -gt 0 ]; then
+ stat_fail
+ exit $rc
+ else
+ rm -f /var/run/$IDMAPD_DAEMON_NAME.pid &> /dev/null
+ stat_done
+ fi
+ fi
+ do_umount "$PIPEFS_MOUNTPOINT" 2>/dev/null || true
+ fi
+
+ if [ "$NEED_STATD" = yes ]; then
+ stat_busy "Stopping $STATD_DAEMON_NAME daemon"
+ PID=$(get_pid $STATD)
+ # KILL
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ #
+ rc=$(($rc+$?))
+ if [ $rc -gt 0 ]; then
+ stat_fail
+ exit $rc
+ else
+ rm -f /var/run/$STATD_DAEMON_NAME.pid &> /dev/null
+ stat_done
+ fi
+ fi
+
+ rm_daemon $daemon_name
+ ;;
+
+ status)
+ stat_busy "Checking $daemon_name status";
+ ck_status $daemon_name
+
+ if [ "$NEED_STATD" = yes ]; then
+ stat_busy "Daemon $STATD_DAEMON_NAME running"
+ PID=$(get_pid $STATD)
+ if [ -z "$PID" ]; then
+ stat_fail
+ else
+ stat_done
+ fi
+ fi
+
+ if [ "$NEED_GSSD" = yes ]; then
+ stat_busy "Daemon $GSSD_DAEMON_NAME running"
+ PID=$(get_pid $GSSD)
+ if [ -z "$PID" ]; then
+ stat_fail
+ else
+ stat_done
+ fi
+ fi
+
+ if [ "$NEED_IDMAPD" = yes ]; then
+ stat_busy "Daemon $IDMAPD_DAEMON_NAME running"
+ PID=$(get_pid $IDMAPD)
+ if [ -z "$PID" ]; then
+ stat_fail
+ else
+ stat_done
+ fi
+ fi
+ echo
+ ;;
+
+ restart)
+ $0 stop
+ sleep 3
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|status|restart}"
+esac
+exit 0
+
diff --git a/testing/nfs-utils/nfs-common.conf b/testing/nfs-utils/nfs-common.conf
new file mode 100644
index 000000000..12466b3e5
--- /dev/null
+++ b/testing/nfs-utils/nfs-common.conf
@@ -0,0 +1,40 @@
+# Parameters to be passed to nfs-common (nfs clients & server) init script.
+#
+
+# If you do not set values for the NEED_ options, they will be attempted
+# autodetected; this should be sufficient for most people. Valid alternatives
+# for the NEED_ options are "yes" and "no".
+
+# Do you want to start the statd daemon? It is not needed for NFSv4.
+NEED_STATD=""
+
+# Options to pass to rpc.statd.
+# See rpc.statd(8) for more details.
+# N.B. statd normally runs on both client and server, and run-time
+# options should be specified accordingly.
+# STATD_OPTS="-p 32765 -o 32766"
+STATD_OPTS=""
+
+# Options to pass to sm-notify
+# e.g. SMNOTIFY_OPTS="-p 32764"
+SMNOTIFY_OPTS=""
+
+# Do you want to start the idmapd daemon? It is only needed for NFSv4.
+NEED_IDMAPD=""
+
+# Options to pass to rpc.idmapd.
+# See rpc.idmapd(8) for more details.
+IDMAPD_OPTS=""
+
+# Do you want to start the gssd daemon? It is required for Kerberos mounts.
+NEED_GSSD=""
+
+# Options to pass to rpc.gssd.
+# See rpc.gssd(8) for more details.
+GSSD_OPTS=""
+
+# Where to mount rpc_pipefs filesystem; the default is "/var/lib/nfs/rpc_pipefs".
+PIPEFS_MOUNTPOINT=""
+
+# Options used to mount rpc_pipefs filesystem; the default is "defaults".
+PIPEFS_MOUNTOPTS=""
diff --git a/testing/nfs-utils/nfs-server b/testing/nfs-utils/nfs-server
new file mode 100644
index 000000000..9574cbc12
--- /dev/null
+++ b/testing/nfs-utils/nfs-server
@@ -0,0 +1,303 @@
+#!/bin/bash
+
+daemon_name=nfs-server
+
+# daemon dependencies
+DAEMON_DEPENDS=('nfs-common')
+
+NFSD_COUNT=
+NFSD_OPTS=
+NEED_SVCGSSD=
+SVCGSSD_OPTS=
+MOUNTD_OPTS=
+PROCNFSD_MOUNTPOINT=
+PROCNFSD_MOUNTOPTS=
+
+# rpc.nfsd daemon & binary location
+NFSD_PROCESS_NAME=nfsd
+NFSD_DAEMON_NAME=rpc.nfsd
+NFSD="/usr/sbin/rpc.nfsd"
+
+# rpc.svcgssd daemon & binary location
+SVCGSSD_DAEMON_NAME=rpc.svcgssd
+SVCGSSD="/usr/sbin/rpc.svcgssd"
+
+# rpc.idmapd daemon & binary location
+IDMAPD_DAEMON_NAME=rpc.idmapd
+IDMAPD="/usr/sbin/rpc.idmapd"
+
+# rpc.mountd daemon & binary location
+MOUNTD_DAEMON_NAME=rpc.mountd
+MOUNTD="/usr/sbin/rpc.mountd"
+
+# exortfs binary location
+EXPORTFS="/usr/sbin/exportfs"
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/$daemon_name.conf
+
+# Default number of nfsd servers
+[ -z "$NFSD_COUNT" ] && NFSD_COUNT=8
+
+# Default mountpoint and options for nfsd filesystem
+[ -z "$PROCNFSD_MOUNTPOINT" ] && PROCNFSD_MOUNTPOINT="/proc/fs/nfsd"
+[ -z "$PROCNFSD_MOUNTOPTS" ] && PROCNFSD_MOUNTOPTS="rw,nodev,noexec,nosuid"
+
+case "$NEED_SVCGSSD" in
+ yes|no)
+ ;;
+ *)
+ NEED_SVCGSSD=no
+ ;;
+esac
+
+do_modprobe() {
+ if [ -x /sbin/modprobe -a -f /proc/modules ]; then
+ modprobe -q "$1" || true
+ fi
+}
+
+do_mount() {
+ if ! grep -E "$1\$" /proc/filesystems &> /dev/null ; then
+ return 1
+ fi
+
+ if grep -vw "$1" /proc/mounts &> /dev/null ; then
+ if ! mountpoint -q "$2" ; then
+ mount -t "$1" "$1" "$2" -o "$3"
+ return
+ fi
+ fi
+ return 0
+}
+
+do_umount() {
+ if mountpoint -q "$1" ; then
+ umount "$1"
+ fi
+ return 0
+}
+
+get_pid() {
+ pidof -o %PPID "$1"
+}
+
+case "$1" in
+ start)
+ ck_depends ${DAEMON_DEPENDS[@]}
+
+ rc=0
+ stat_busy "Mounting nfsd filesystem"
+ do_modprobe nfsd
+ do_mount nfsd "$PROCNFSD_MOUNTPOINT" "$PROCNFSD_MOUNTOPTS"
+ rc=$(($rc+$?))
+ if [ $rc -gt 0 ]; then
+ stat_fail
+ exit $rc
+ else
+ stat_done
+ fi
+
+ stat_busy "Exporting all directories"
+ $EXPORTFS -r
+ rc=$(($rc+$?))
+ if [ $rc -gt 0 ]; then
+ stat_fail
+ exit $rc
+ else
+ stat_done
+ fi
+
+ stat_busy "Starting $NFSD_DAEMON_NAME daemon"
+ PID=$(get_pid $NFSD_PROCESS_NAME)
+ if [ -z "$PID" ]; then
+ [ -f /var/run/$NFSD_DAEMON_NAME.pid ] && rm -f /var/run/$NFSD_DAEMON_NAME.pid
+ # RUN
+ $NFSD $NFSD_OPTS $NFSD_COUNT
+ #
+ rc=$(($rc+$?))
+ if [ $rc -gt 0 ]; then
+ stat_fail
+ exit $rc
+ else
+ echo $(get_pid $NFSD_PROCESS_NAME) > /var/run/$NFSD_DAEMON_NAME.pid
+ stat_done
+ fi
+ else
+ stat_fail
+ exit 1
+ fi
+
+ if [ "$NEED_SVCGSSD" = yes ]; then
+ do_modprobe rpcsec_gss_krb5
+ stat_busy "Starting $SVCGSSD_DAEMON_NAME daemon"
+ PID=$(get_pid $SVCGSSD)
+ if [ -z "$PID" ]; then
+ [ -f /var/run/$SVCGSSD_DAEMON_NAME.pid ] && rm -f /var/run/$SVCGSSD_DAEMON_NAME.pid
+ # RUN
+ $SVCGSSD $SVCGSSD_OPTS
+ #
+ rc=$(($rc+$?))
+ if [ $rc -gt 0 ]; then
+ stat_fail
+ exit $rc
+ else
+ echo $(get_pid $SVCGSSD) > /var/run/$SVCGSSD_DAEMON_NAME.pid
+ stat_done
+ fi
+ else
+ stat_fail
+ exit 1
+ fi
+ fi
+
+ PID=$(get_pid $IDMAPD)
+ [ ! -z "$PID" ] && kill -SIGHUP $IDMAPD_DAEMON_NAME &> /dev/null
+
+ stat_busy "Starting $MOUNTD_DAEMON_NAME daemon"
+ PID=$(get_pid $MOUNTD)
+ if [ -z "$PID" ]; then
+ [ -f /var/run/$MOUNTD_DAEMON_NAME.pid ] && rm -f /var/run/$MOUNTD_DAEMON_NAME.pid
+ # RUN
+ $MOUNTD $MOUNTD_OPTS
+ #
+ rc=$(($rc+$?))
+ if [ $rc -gt 0 ]; then
+ stat_fail
+ exit $rc
+ else
+ echo $(get_pid $MOUNTD) > /var/run/$MOUNTD_DAEMON_NAME.pid
+ stat_done
+ fi
+ else
+ stat_fail
+ exit 1
+ fi
+
+ add_daemon $daemon_name
+ ;;
+
+ stop)
+ rc=0
+ stat_busy "Stopping $MOUNTD_DAEMON_NAME daemon"
+ PID=$(get_pid $MOUNTD)
+ # KILL
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ #
+ rc=$(($rc+$?))
+ if [ $rc -gt 0 ]; then
+ stat_fail
+ exit $rc
+ else
+ rm -f /var/run/$MOUNTD_DAEMON_NAME.pid &> /dev/null
+ stat_done
+ fi
+
+ if [ "$NEED_SVCGSSD" = yes ]; then
+ stat_busy "Stopping $SVCGSSD_DAEMON_NAME daemon"
+ PID=$(get_pid $SVCGSSD)
+ # KILL
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ #
+ rc=$(($rc+$?))
+ if [ $rc -gt 0 ]; then
+ stat_fail
+ exit $rc
+ else
+ rm -f /var/run/$SVCGSSD_DAEMON_NAME.pid &> /dev/null
+ stat_done
+ fi
+ fi
+
+ stat_busy "Stopping $NFSD_DAEMON_NAME daemon"
+ PID=$(get_pid $NFSD_PROCESS_NAME)
+ # KILL (SIGINT)
+ [ ! -z "$PID" ] && kill -2 $PID &> /dev/null
+ #
+ rc=$(($rc+$?))
+ if [ $rc -gt 0 ]; then
+ stat_fail
+ exit $rc
+ else
+ sleep 1
+ PID=$(get_pid $NFSD_PROCESS_NAME)
+ # KILL (KILL) - just to be sure
+ [ ! -z "$PID" ] && kill -9 $PID &> /dev/null
+ #
+ rm -f /var/run/$NFSD_DAEMON_NAME.pid &> /dev/null
+ stat_done
+ fi
+
+ stat_busy "Unexporting all directories"
+ $EXPORTFS -au
+ rc=$(($rc+$?))
+ if [ $rc -gt 0 ]; then
+ stat_fail
+ exit $rc
+ else
+ stat_done
+ fi
+
+ # flush everything out of the kernels export table
+ if mountpoint -q "$PROCNFSD_MOUNTPOINT" ; then
+ $EXPORTFS -f
+ fi
+ do_umount "$PROCNFSD_MOUNTPOINT" 2>/dev/null || true
+ rm_daemon $daemon_name
+ ;;
+
+ status)
+ stat_busy "Checking $daemon_name status";
+ ck_status $daemon_name
+
+ stat_busy "Daemon $NFSD_DAEMON_NAME running"
+ PID=$(get_pid $NFSD_PROCESS_NAME)
+ if [ -z "$PID" ]; then
+ stat_fail
+ else
+ stat_done
+ fi
+
+ stat_busy "Daemon $MOUNTD_DAEMON_NAME running"
+ PID=$(get_pid $MOUNTD)
+ if [ -z "$PID" ]; then
+ stat_fail
+ else
+ stat_done
+ fi
+
+ if [ "$NEED_SVCGSSD" = yes ]; then
+ stat_busy "Daemon $SVCGSSD_DAEMON_NAME running"
+ PID=$(get_pid $SVCGSSD)
+ if [ -z "$PID" ]; then
+ stat_fail
+ else
+ stat_done
+ fi
+ fi
+ echo
+ ;;
+
+ reload)
+ rc=0
+ stat_busy "Re-exporting all directories"
+ $EXPORTFS -r
+ rc=$(($rc+$?))
+ if [ $rc -gt 0 ]; then
+ stat_fail
+ exit $rc
+ else
+ stat_done
+ fi
+ ;;
+
+ restart)
+ $0 stop
+ sleep 3
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|status|reload|restart}"
+esac
+exit 0
diff --git a/testing/nfs-utils/nfs-server.conf b/testing/nfs-utils/nfs-server.conf
new file mode 100644
index 000000000..4054d6b88
--- /dev/null
+++ b/testing/nfs-utils/nfs-server.conf
@@ -0,0 +1,29 @@
+# Parameters to be passed to nfs-server init script.
+#
+
+# Options to pass to rpc.nfsd.
+# See rpc.nfsd(8) for more details.
+NFSD_OPTS=""
+
+# Number of servers to start up; the default is 8 servers.
+NFSD_COUNT=""
+
+# Where to mount nfsd filesystem; the default is "/proc/fs/nfsd".
+PROCNFSD_MOUNTPOINT=""
+
+# Options used to mount nfsd filesystem; the default is "rw,nodev,noexec,nosuid".
+PROCNFSD_MOUNTOPTS=""
+
+# Options for rpc.mountd.
+# If you have a port-based firewall, you might want to set up
+# a fixed port here using the --port option.
+# See rpc.mountd(8) for more details.
+MOUNTD_OPTS="--no-nfs-version 2"
+
+# Do you want to start the svcgssd daemon? It is only required for Kerberos
+# exports. Valid alternatives are "yes" and "no"; the default is "no".
+NEED_SVCGSSD=""
+
+# Options to pass to rpc.svcgssd.
+# See rpc.svcgssd(8) for more details.
+SVCGSSD_OPTS=""
diff --git a/testing/nfs-utils/nfs-utils-1.1.2-kerberos-ac.patch b/testing/nfs-utils/nfs-utils-1.1.2-kerberos-ac.patch
new file mode 100644
index 000000000..4a5a138e7
--- /dev/null
+++ b/testing/nfs-utils/nfs-utils-1.1.2-kerberos-ac.patch
@@ -0,0 +1,138 @@
+diff -NaurwB nfs-utils-1.1.2.orig/aclocal/kerberos5.m4 nfs-utils-1.1.2/aclocal/kerberos5.m4
+--- nfs-utils-1.1.2.orig/aclocal/kerberos5.m4 2008-03-14 16:46:29.000000000 +0100
++++ nfs-utils-1.1.2/aclocal/kerberos5.m4 2008-06-12 17:13:51.000000000 +0200
+@@ -1,112 +1,48 @@
+-dnl Checks for Kerberos
+-dnl NOTE: while we intend to do generic gss-api, currently we
+-dnl have a requirement to get an initial Kerberos machine
+-dnl credential. Thus, the requirement for Kerberos.
+-dnl The Kerberos gssapi library will be dynamically loaded?
+ AC_DEFUN([AC_KERBEROS_V5],[
++ K5CONFIG="krb5-config"
+ AC_MSG_CHECKING(for Kerberos v5)
+- AC_ARG_WITH(krb5,
+- [AC_HELP_STRING([--with-krb5=DIR], [use Kerberos v5 installation in DIR])],
++ AC_ARG_WITH(krb5-config,
++ [AC_HELP_STRING([--with-krb5-config=PATH], [Full Path to krb5-config.])],
+ [ case "$withval" in
+ yes|no)
+- krb5_with=""
++ K5CONFIG="krb5-config"
+ ;;
+ *)
+- krb5_with="$withval"
++ K5CONFIG="$withval"
+ ;;
+ esac ]
+ )
+
+- for dir in $krb5_with /usr /usr/kerberos /usr/local /usr/local/krb5 \
+- /usr/krb5 /usr/heimdal /usr/local/heimdal /usr/athena ; do
+- dnl This ugly hack brought on by the split installation of
+- dnl MIT Kerberos on Fedora Core 1
+- K5CONFIG=""
+- if test -f $dir/bin/krb5-config; then
+- K5CONFIG=$dir/bin/krb5-config
+- elif test -f "/usr/kerberos/bin/krb5-config"; then
+- K5CONFIG="/usr/kerberos/bin/krb5-config"
+- elif test -f "/usr/lib/mit/bin/krb5-config"; then
+- K5CONFIG="/usr/lib/mit/bin/krb5-config"
+- fi
+ if test "$K5CONFIG" != ""; then
+ KRBCFLAGS=`$K5CONFIG --cflags`
+ KRBLIBS=`$K5CONFIG --libs gssapi`
+- K5VERS=`$K5CONFIG --version | head -n 1 | awk '{split($(4),v,"."); if (v@<:@"3"@:>@ == "") v@<:@"3"@:>@ = "0"; print v@<:@"1"@:>@v@<:@"2"@:>@v@<:@"3"@:>@ }'`
+- AC_DEFINE_UNQUOTED(KRB5_VERSION, $K5VERS, [Define this as the Kerberos version number])
+- if test -f $dir/include/gssapi/gssapi_krb5.h -a \
+- \( -f $dir/lib/libgssapi_krb5.a -o \
+- -f $dir/lib64/libgssapi_krb5.a -o \
+- -f $dir/lib64/libgssapi_krb5.so -o \
+- -f $dir/lib/libgssapi_krb5.so \) ; then
++ if $K5CONFIG --version | grep -q -e heimdal; then
++ K5VERS=`$K5CONFIG --version | head -n 1 | cut -f2 -d ' ' | tr -d '.'`
++ AC_DEFINE(HAVE_HEIMDAL, 1, [Define this if you have Heimdal Kerberos libraries])
++ gssapi_lib=gssapi
++ KRBIMPL="heimdal"
++ elif $K5CONFIG --version | grep -q -e mit; then
++ K5VERS=`$K5CONFIG --version | head -n 1 | cut -f4 -d ' ' | tr -d '.'`
+ AC_DEFINE(HAVE_KRB5, 1, [Define this if you have MIT Kerberos libraries])
+- KRBDIR="$dir"
+- dnl If we are using MIT K5 1.3.1 and before, we *MUST* use the
+- dnl private function (gss_krb5_ccache_name) to get correct
+- dnl behavior of changing the ccache used by gssapi.
+- dnl Starting in 1.3.2, we *DO NOT* want to use
+- dnl gss_krb5_ccache_name, instead we want to set KRB5CCNAME
+- dnl to get gssapi to use a different ccache
+ if test $K5VERS -le 131; then
+ AC_DEFINE(USE_GSS_KRB5_CCACHE_NAME, 1, [Define this if the private function, gss_krb5_cache_name, must be used to tell the Kerberos library which credentials cache to use. Otherwise, this is done by setting the KRB5CCNAME environment variable])
+ fi
+ gssapi_lib=gssapi_krb5
+- break
+- dnl The following ugly hack brought on by the split installation
+- dnl of Heimdal Kerberos on SuSe
+- elif test \( -f $dir/include/heim_err.h -o\
+- -f $dir/include/heimdal/heim_err.h \) -a \
+- -f $dir/lib/libroken.a; then
+- AC_DEFINE(HAVE_HEIMDAL, 1, [Define this if you have Heimdal Kerberos libraries])
+- KRBDIR="$dir"
+- gssapi_lib=gssapi
+- break
+- fi
+- fi
+- done
+- dnl We didn't find a usable Kerberos environment
+- if test "x$KRBDIR" = "x"; then
+- if test "x$krb5_with" = "x"; then
+- AC_MSG_ERROR(Kerberos v5 with GSS support not found: consider --disable-gss or --with-krb5=)
++ KRBIMPL="mit-krb5"
+ else
+- AC_MSG_ERROR(Kerberos v5 with GSS support not found at $krb5_with)
+- fi
++ AC_MSG_ERROR(Unknown Kerberos 5 Implementation. Is neither heimdal or mit-krb5.)
++ KRBIMPL="unknown"
+ fi
+- AC_MSG_RESULT($KRBDIR)
+-
+- dnl Check if -rpath=$(KRBDIR)/lib is needed
+- echo "The current KRBDIR is $KRBDIR"
+- if test "$KRBDIR/lib" = "/lib" -o "$KRBDIR/lib" = "/usr/lib" \
+- -o "$KRBDIR/lib" = "//lib" -o "$KRBDIR/lib" = "/usr//lib" ; then
+- KRBLDFLAGS="";
+- elif /sbin/ldconfig -p | grep > /dev/null "=> $KRBDIR/lib/"; then
+- KRBLDFLAGS="";
+- else
+- KRBLDFLAGS="-Wl,-rpath=$KRBDIR/lib"
++ AC_DEFINE_UNQUOTED(KRB5_VERSION, $K5VERS, [Define this as the Kerberos version number])
+ fi
++ AC_MSG_RESULT($KRBIMPL)
+
+- dnl Now check for functions within gssapi library
+- AC_CHECK_LIB($gssapi_lib, gss_krb5_export_lucid_sec_context,
+- AC_DEFINE(HAVE_LUCID_CONTEXT_SUPPORT, 1, [Define this if the Kerberos GSS library supports gss_krb5_export_lucid_sec_context]), ,$KRBLIBS)
+- AC_CHECK_LIB($gssapi_lib, gss_krb5_set_allowable_enctypes,
+- AC_DEFINE(HAVE_SET_ALLOWABLE_ENCTYPES, 1, [Define this if the Kerberos GSS library supports gss_krb5_set_allowable_enctypes]), ,$KRBLIBS)
+- AC_CHECK_LIB($gssapi_lib, gss_krb5_ccache_name,
+- AC_DEFINE(HAVE_GSS_KRB5_CCACHE_NAME, 1, [Define this if the Kerberos GSS library supports gss_krb5_ccache_name]), ,$KRBLIBS)
+-
+- dnl Check for newer error message facility
+- AC_CHECK_LIB($gssapi_lib, krb5_get_error_message,
+- AC_DEFINE(HAVE_KRB5_GET_ERROR_MESSAGE, 1, [Define this if the function krb5_get_error_message is available]), ,$KRBLIBS)
++ AC_CHECK_LIB($gssapi_lib, gss_krb5_export_lucid_sec_context, AC_DEFINE(HAVE_LUCID_CONTEXT_SUPPORT, 1, [Define this if the Kerberos GSS library supports gss_krb5_export_lucid_sec_context]), ,$KRBLIBS)
++ AC_CHECK_LIB($gssapi_lib, gss_krb5_set_allowable_enctypes, AC_DEFINE(HAVE_SET_ALLOWABLE_ENCTYPES, 1, [Define this if the Kerberos GSS library supports gss_krb5_set_allowable_enctypes]), ,$KRBLIBS)
++ AC_CHECK_LIB($gssapi_lib, gss_krb5_ccache_name, AC_DEFINE(HAVE_GSS_KRB5_CCACHE_NAME, 1, [Define this if the Kerberos GSS library supports gss_krb5_ccache_name]), ,$KRBLIBS)
++ AC_CHECK_LIB($gssapi_lib, krb5_get_error_message, AC_DEFINE(HAVE_KRB5_GET_ERROR_MESSAGE, 1, [Define this if the function krb5_get_error_message is available]), ,$KRBLIBS)
++ AC_CHECK_LIB($gssapi_lib, krb5_get_init_creds_opt_set_addressless, AC_DEFINE(HAVE_KRB5_GET_INIT_CREDS_OPT_SET_ADDRESSLESS, 1, [Define this if the function krb5_get_init_creds_opt_set_addressless is available]), ,$KRBLIBS)
+
+- dnl Check for function to specify addressless tickets
+- AC_CHECK_LIB($gssapi_lib, krb5_get_init_creds_opt_set_addressless,
+- AC_DEFINE(HAVE_KRB5_GET_INIT_CREDS_OPT_SET_ADDRESSLESS, 1, [Define this if the function krb5_get_init_creds_opt_set_addressless is available]), ,$KRBLIBS)
+-
+- dnl If they specified a directory and it didn't work, give them a warning
+- if test "x$krb5_with" != "x" -a "$krb5_with" != "$KRBDIR"; then
+- AC_MSG_WARN(Using $KRBDIR instead of requested value of $krb5_with for Kerberos!)
+- fi
+-
+- AC_SUBST([KRBDIR])
+ AC_SUBST([KRBLIBS])
+ AC_SUBST([KRBCFLAGS])
+ AC_SUBST([KRBLDFLAGS])
diff --git a/testing/nfs-utils/nfs-utils-1.1.4-mtab-sym.patch b/testing/nfs-utils/nfs-utils-1.1.4-mtab-sym.patch
new file mode 100644
index 000000000..c9e60afc7
--- /dev/null
+++ b/testing/nfs-utils/nfs-utils-1.1.4-mtab-sym.patch
@@ -0,0 +1,39 @@
+ripped from Debian
+
+--- nfs-utils-1.1.4/utils/mount/fstab.c
++++ nfs-utils-1.1.4/utils/mount/fstab.c
+@@ -57,7 +57,7 @@ mtab_does_not_exist(void) {
+ return var_mtab_does_not_exist;
+ }
+
+-static int
++int
+ mtab_is_a_symlink(void) {
+ get_mtab_info();
+ return var_mtab_is_a_symlink;
+--- nfs-utils-1.1.4/utils/mount/fstab.h
++++ nfs-utils-1.1.4/utils/mount/fstab.h
+@@ -7,6 +7,7 @@
+ #define _PATH_FSTAB "/etc/fstab"
+ #endif
+
++int mtab_is_a_symlink(void);
+ int mtab_is_writable(void);
+ int mtab_does_not_exist(void);
+ void reset_mtab_info(void);
+--- nfs-utils-1.1.4/utils/mount/mount.c
++++ nfs-utils-1.1.4/utils/mount/mount.c
+@@ -230,6 +230,13 @@ create_mtab (void) {
+ int flags;
+ mntFILE *mfp;
+
++ /* Avoid writing if the mtab is a symlink to /proc/mounts, since
++ that would create a file /proc/mounts in case the proc filesystem
++ is not mounted, and the fchmod below would also fail. */
++ if (mtab_is_a_symlink()) {
++ return EX_SUCCESS;
++ }
++
+ lock_mtab();
+
+ mfp = nfs_setmntent (MOUNTED, "a+");
diff --git a/testing/nfs-utils/nfs-utils-1.1.4-no-exec.patch b/testing/nfs-utils/nfs-utils-1.1.4-no-exec.patch
new file mode 100644
index 000000000..ea50a21d8
--- /dev/null
+++ b/testing/nfs-utils/nfs-utils-1.1.4-no-exec.patch
@@ -0,0 +1,15 @@
+ripped from Debian
+
+--- nfs-utils-1.1.2/utils/mount/mount.c
++++ nfs-utils-1.1.2/utils/mount/mount.c
+@@ -381,10 +381,6 @@
+ mount_error(NULL, mount_point, ENOTDIR);
+ return 1;
+ }
+- if (access(mount_point, X_OK) < 0) {
+- mount_error(NULL, mount_point, errno);
+- return 1;
+- }
+
+ return 0;
+ }
diff --git a/testing/nfs-utils/nfs-utils-1.1.6-heimdal_functions.patch b/testing/nfs-utils/nfs-utils-1.1.6-heimdal_functions.patch
new file mode 100644
index 000000000..7f6c7a751
--- /dev/null
+++ b/testing/nfs-utils/nfs-utils-1.1.6-heimdal_functions.patch
@@ -0,0 +1,69 @@
+diff -Naur nfs-utils-1.1.6.orig/utils/gssd/krb5_util.c nfs-utils-1.1.6/utils/gssd/krb5_util.c
+--- utils/gssd/krb5_util.c 2009-04-20 19:32:50.000000000 +0200
++++ utils/gssd/krb5_util.c 2009-04-20 20:57:31.000000000 +0200
+@@ -940,9 +940,37 @@
+ {
+ krb5_error_code ret;
+ krb5_creds creds;
+- krb5_cc_cursor cur;
+ int found = 0;
+
++#ifdef HAVE_HEIMDAL
++ krb5_creds pattern;
++ krb5_realm *client_realm;
++
++ krb5_cc_clear_mcred(&pattern);
++
++ client_realm = krb5_princ_realm (context, principal);
++
++ ret = krb5_make_principal (context, &pattern.server,
++ *client_realm, KRB5_TGS_NAME, *client_realm,
++ NULL);
++ if (ret)
++ krb5_err (context, 1, ret, "krb5_make_principal");
++ pattern.client = principal;
++
++ ret = krb5_cc_retrieve_cred (context, ccache, 0, &pattern, &creds);
++ krb5_free_principal (context, pattern.server);
++ if (ret) {
++ if (ret == KRB5_CC_END)
++ return 1;
++ krb5_err (context, 1, ret, "krb5_cc_retrieve_cred");
++ }
++
++ found = creds.times.endtime > time(NULL);
++
++ krb5_free_cred_contents (context, &creds);
++#else
++ krb5_cc_cursor cur;
++
+ ret = krb5_cc_start_seq_get(context, ccache, &cur);
+ if (ret)
+ return 0;
+@@ -962,6 +990,7 @@
+ krb5_free_cred_contents(context, &creds);
+ }
+ krb5_cc_end_seq_get(context, ccache, &cur);
++#endif
+
+ return found;
+ }
+@@ -1008,6 +1037,9 @@
+ }
+ krb5_free_principal(context, principal);
+ err_princ:
++#ifdef HAVE_HEIMDAL
++#define KRB5_TC_OPENCLOSE 0x00000001
++#endif
+ krb5_cc_set_flags(context, ccache, KRB5_TC_OPENCLOSE);
+ krb5_cc_close(context, ccache);
+ err_cache:
+@@ -1262,7 +1294,7 @@
+ if (context != NULL) {
+ origmsg = krb5_get_error_message(context, code);
+ msg = strdup(origmsg);
+- krb5_free_error_message(context, origmsg);
++ krb5_free_error_string(context, origmsg);
+ }
+ #endif
+ if (msg != NULL)
diff --git a/testing/nfs-utils/nfs-utils-1.1.6-no_libgssapi.patch b/testing/nfs-utils/nfs-utils-1.1.6-no_libgssapi.patch
new file mode 100644
index 000000000..917136a8c
--- /dev/null
+++ b/testing/nfs-utils/nfs-utils-1.1.6-no_libgssapi.patch
@@ -0,0 +1,57 @@
+Index: nfs-utils-1.1.6/utils/gssd/context_lucid.c
+===================================================================
+--- nfs-utils-1.1.6.orig/utils/gssd/context_lucid.c
++++ nfs-utils-1.1.6/utils/gssd/context_lucid.c
+@@ -51,8 +51,10 @@
+ #include "context.h"
+
+ #ifndef OM_uint64
++#ifndef GSSAPI_GSSAPI_H_
+ typedef uint64_t OM_uint64;
+ #endif
++#endif
+
+ static int
+ write_lucid_keyblock(char **p, char *end, gss_krb5_lucid_key_t *key)
+@@ -177,10 +179,10 @@
+ int retcode = 0;
+
+ printerr(2, "DEBUG: serialize_krb5_ctx: lucid version!\n");
+- maj_stat = gss_export_lucid_sec_context(&min_stat, &ctx,
++ maj_stat = gss_krb5_export_lucid_sec_context(&min_stat, &ctx,
+ 1, &return_ctx);
+ if (maj_stat != GSS_S_COMPLETE) {
+- pgsserr("gss_export_lucid_sec_context",
++ pgsserr("gss_krb5_export_lucid_sec_context",
+ maj_stat, min_stat, &krb5oid);
+ goto out_err;
+ }
+@@ -204,9 +206,9 @@
+ else
+ retcode = prepare_krb5_rfc_cfx_buffer(lctx, buf, endtime);
+
+- maj_stat = gss_free_lucid_sec_context(&min_stat, ctx, return_ctx);
++ maj_stat = gss_krb5_free_lucid_sec_context(&min_stat, ctx);
+ if (maj_stat != GSS_S_COMPLETE) {
+- pgsserr("gss_export_lucid_sec_context",
++ pgsserr("gss_krb5_export_lucid_sec_context",
+ maj_stat, min_stat, &krb5oid);
+ printerr(0, "WARN: failed to free lucid sec context\n");
+ }
+Index: nfs-utils-1.1.6/utils/gssd/krb5_util.c
+===================================================================
+--- nfs-utils-1.1.6.orig/utils/gssd/krb5_util.c
++++ nfs-utils-1.1.6/utils/gssd/krb5_util.c
+@@ -332,10 +332,10 @@
+ return -1;
+ }
+
+- maj_stat = gss_set_allowable_enctypes(&min_stat, credh, &krb5oid,
++ maj_stat = gss_krb5_set_allowable_enctypes(&min_stat, credh,
+ num_enctypes, &enctypes);
+ if (maj_stat != GSS_S_COMPLETE) {
+- pgsserr("gss_set_allowable_enctypes",
++ pgsserr("gss_krb5_set_allowable_enctypes",
+ maj_stat, min_stat, &krb5oid);
+ gss_release_cred(&min_stat, &credh);
+ return -1;
diff --git a/testing/nfs-utils/nfs-utils.install b/testing/nfs-utils/nfs-utils.install
new file mode 100644
index 000000000..7dcdf9575
--- /dev/null
+++ b/testing/nfs-utils/nfs-utils.install
@@ -0,0 +1,32 @@
+## arg 1: the new package version
+post_install() {
+cat << 'EOM'
+ ==> PLEASE NOTE:
+ ==> Extended configuration options for NFS (clients & server) are available in
+ ==> /etc/conf.d/nfs-common.conf and in /etc/conf.d/nfs-server.conf
+ ==>
+ ==> Please refer to http://wiki.archlinux.org/index.php/Nfs
+ ==> for further information on NFS; for NFSv4, refer to
+ ==> http://wiki.archlinux.org/index.php/NFSv4
+EOM
+}
+
+## arg 1: the new package version
+## arg 2: the old package version
+post_upgrade() {
+ if [ "$(vercmp $2 1.2.0-2)" -lt 0 ]; then
+cat << 'EOM'
+ ==> IMPORTANT NFS UTILS CHANGES:
+ ==> This is a rather important upgrade, you are going to have to change config files.
+ ==> /etc/rc.conf daemons changes:
+ ==> Change portmap to rpcbind
+ ==> Change nfslock to nfs-common
+ ==> Change nfsd to nfs-server
+ ==>
+ ==> Extended configuration options for NFS (clients & server) are available in:
+ ==> /etc/conf.d/nfs-common
+ ==> /etc/conf.d/nfs-server
+ ==> Please change them to your needs.
+EOM
+ fi
+}
diff --git a/testing/nfs-utils/start-statd.patch b/testing/nfs-utils/start-statd.patch
new file mode 100644
index 000000000..38c60a784
--- /dev/null
+++ b/testing/nfs-utils/start-statd.patch
@@ -0,0 +1,22 @@
+--- utils/statd/start-statd 2007-05-11 04:40:57.000000000 +0100
++++ utils/statd/start-statd.new 2007-09-21 17:11:34.000000000 +0100
+@@ -1,9 +1,16 @@
+-#!/bin/sh -p
++#!/bin/sh
++
++# Original script provided by the NFS project
++# Modified for Arch Linux by Tom Killian
++
+ # nfsmount calls this script when mounting a filesystem with locking
+ # enabled, but when statd does not seem to be running (based on
+ # /var/run/rpc.statd.pid).
+ # It should run run statd with whatever flags are apropriate for this
+ # site.
+-PATH=/sbin:/usr/sbin
+-exec rpc.statd --no-notify
++
++# source application-specific settings
++[ -f /etc/conf.d/nfs-common.conf ] && . /etc/conf.d/nfs-common.conf
++
++exec /usr/sbin/rpc.statd $STATD_OPTS
+
diff --git a/testing/openssh/PKGBUILD b/testing/openssh/PKGBUILD
new file mode 100644
index 000000000..bf45e6396
--- /dev/null
+++ b/testing/openssh/PKGBUILD
@@ -0,0 +1,70 @@
+# $Id: PKGBUILD 131644 2011-07-13 07:48:58Z bisson $
+# Maintainer: Gaetan Bisson <bisson@archlinux.org>
+# Contributor: Aaron Griffin <aaron@archlinux.org>
+# Contributor: judd <jvinet@zeroflux.org>
+
+pkgname=openssh
+pkgver=5.8p2
+pkgrel=9
+pkgdesc='Free version of the SSH connectivity tools'
+arch=('i686' 'x86_64')
+license=('custom:BSD')
+url='http://www.openssh.org/portable.html'
+backup=('etc/ssh/ssh_config' 'etc/ssh/sshd_config' 'etc/pam.d/sshd' 'etc/conf.d/sshd')
+depends=('krb5' 'openssl' 'libedit')
+source=("ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/${pkgname}-${pkgver}.tar.gz"
+ 'authfile.c.patch'
+ 'sshd.confd'
+ 'sshd.pam'
+ 'sshd')
+sha1sums=('64798328d310e4f06c9f01228107520adbc8b3e5'
+ '3669cb5ca6149f69015df5ce8e60b82c540eb0a4'
+ 'ec102deb69cad7d14f406289d2fc11fee6eddbdd'
+ '07fecd5880b1c4fdd8c94ddb2e89ddce88effdc1'
+ '6b7f8ebf0c1cc37137a7d9a53447ac8a0ee6a2b5')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ patch -p1 -i ../authfile.c.patch # fix FS#24693 using http://anoncvs.mindrot.org/index.cgi/openssh/authfile.c?revision=1.95
+
+ ./configure \
+ --prefix=/usr \
+ --libexecdir=/usr/lib/ssh \
+ --sysconfdir=/etc/ssh \
+ --with-privsep-user=nobody \
+ --with-md5-passwords \
+ --with-pam \
+ --with-mantype=man \
+ --mandir=/usr/share/man \
+ --with-xauth=/usr/bin/xauth \
+ --with-kerberos5=/usr \
+ --with-ssl-engine \
+ --with-libedit=/usr/lib \
+ --disable-strip # stripping is done by makepkg
+
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+
+ install -Dm755 ../sshd "${pkgdir}"/etc/rc.d/sshd
+ install -Dm644 ../sshd.pam "${pkgdir}"/etc/pam.d/sshd
+ install -Dm644 ../sshd.confd "${pkgdir}"/etc/conf.d/sshd
+ install -Dm644 LICENCE "${pkgdir}/usr/share/licenses/${pkgname}/LICENCE"
+
+ rm "${pkgdir}"/usr/share/man/man1/slogin.1
+ ln -sf ssh.1.gz "${pkgdir}"/usr/share/man/man1/slogin.1.gz
+
+ # additional contrib scripts that we like
+ install -Dm755 contrib/findssl.sh "${pkgdir}"/usr/bin/findssl.sh
+ install -Dm755 contrib/ssh-copy-id "${pkgdir}"/usr/bin/ssh-copy-id
+ install -Dm644 contrib/ssh-copy-id.1 "${pkgdir}"/usr/share/man/man1/ssh-copy-id.1
+
+ # PAM is a common, standard feature to have
+ sed -i -e '/^#ChallengeResponseAuthentication yes$/c ChallengeResponseAuthentication no' \
+ -e '/^#UsePAM no$/c UsePAM yes' \
+ "${pkgdir}"/etc/ssh/sshd_config
+}
diff --git a/testing/openssh/authfile.c.patch b/testing/openssh/authfile.c.patch
new file mode 100644
index 000000000..6c18fe807
--- /dev/null
+++ b/testing/openssh/authfile.c.patch
@@ -0,0 +1,198 @@
+diff -aur old/authfile.c new/authfile.c
+--- old/authfile.c 2011-06-12 02:21:52.262338254 +0200
++++ new/authfile.c 2011-06-12 02:13:43.051467269 +0200
+@@ -1,4 +1,4 @@
+-/* $OpenBSD: authfile.c,v 1.87 2010/11/29 18:57:04 markus Exp $ */
++/* $OpenBSD: authfile.c,v 1.95 2011/05/29 11:42:08 djm Exp $ */
+ /*
+ * Author: Tatu Ylonen <ylo@cs.hut.fi>
+ * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
+@@ -69,6 +69,8 @@
+ #include "misc.h"
+ #include "atomicio.h"
+
++#define MAX_KEY_FILE_SIZE (1024 * 1024)
++
+ /* Version identification string for SSH v1 identity files. */
+ static const char authfile_id_string[] =
+ "SSH PRIVATE KEY FILE FORMAT 1.1\n";
+@@ -312,12 +314,12 @@
+ return pub;
+ }
+
+-/* Load the contents of a key file into a buffer */
+-static int
++/* Load a key from a fd into a buffer */
++int
+ key_load_file(int fd, const char *filename, Buffer *blob)
+ {
++ u_char buf[1024];
+ size_t len;
+- u_char *cp;
+ struct stat st;
+
+ if (fstat(fd, &st) < 0) {
+@@ -325,30 +327,45 @@
+ filename == NULL ? "" : filename,
+ filename == NULL ? "" : " ",
+ strerror(errno));
+- close(fd);
+ return 0;
+ }
+- if (st.st_size > 1*1024*1024) {
++ if ((st.st_mode & (S_IFSOCK|S_IFCHR|S_IFIFO)) == 0 &&
++ st.st_size > MAX_KEY_FILE_SIZE) {
++ toobig:
+ error("%s: key file %.200s%stoo large", __func__,
+ filename == NULL ? "" : filename,
+ filename == NULL ? "" : " ");
+- close(fd);
+ return 0;
+ }
+- len = (size_t)st.st_size; /* truncated */
+-
+ buffer_init(blob);
+- cp = buffer_append_space(blob, len);
+-
+- if (atomicio(read, fd, cp, len) != len) {
+- debug("%s: read from key file %.200s%sfailed: %.100s", __func__,
+- filename == NULL ? "" : filename,
+- filename == NULL ? "" : " ",
+- strerror(errno));
++ for (;;) {
++ if ((len = atomicio(read, fd, buf, sizeof(buf))) == 0) {
++ if (errno == EPIPE)
++ break;
++ debug("%s: read from key file %.200s%sfailed: %.100s",
++ __func__, filename == NULL ? "" : filename,
++ filename == NULL ? "" : " ", strerror(errno));
++ buffer_clear(blob);
++ bzero(buf, sizeof(buf));
++ return 0;
++ }
++ buffer_append(blob, buf, len);
++ if (buffer_len(blob) > MAX_KEY_FILE_SIZE) {
++ buffer_clear(blob);
++ bzero(buf, sizeof(buf));
++ goto toobig;
++ }
++ }
++ bzero(buf, sizeof(buf));
++ if ((st.st_mode & (S_IFSOCK|S_IFCHR|S_IFIFO)) == 0 &&
++ st.st_size != buffer_len(blob)) {
++ debug("%s: key file %.200s%schanged size while reading",
++ __func__, filename == NULL ? "" : filename,
++ filename == NULL ? "" : " ");
+ buffer_clear(blob);
+- close(fd);
+ return 0;
+ }
++
+ return 1;
+ }
+
+@@ -606,7 +623,7 @@
+ error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");
+ error("Permissions 0%3.3o for '%s' are too open.",
+ (u_int)st.st_mode & 0777, filename);
+- error("It is recommended that your private key files are NOT accessible by others.");
++ error("It is required that your private key files are NOT accessible by others.");
+ error("This private key will be ignored.");
+ return 0;
+ }
+@@ -626,6 +643,7 @@
+ case KEY_UNSPEC:
+ return key_parse_private_pem(blob, type, passphrase, commentp);
+ default:
++ error("%s: cannot parse key type %d", __func__, type);
+ break;
+ }
+ return NULL;
+@@ -670,11 +688,38 @@
+ }
+
+ Key *
++key_parse_private(Buffer *buffer, const char *filename,
++ const char *passphrase, char **commentp)
++{
++ Key *pub, *prv;
++ Buffer pubcopy;
++
++ buffer_init(&pubcopy);
++ buffer_append(&pubcopy, buffer_ptr(buffer), buffer_len(buffer));
++ /* it's a SSH v1 key if the public key part is readable */
++ pub = key_parse_public_rsa1(&pubcopy, commentp);
++ buffer_free(&pubcopy);
++ if (pub == NULL) {
++ prv = key_parse_private_type(buffer, KEY_UNSPEC,
++ passphrase, NULL);
++ /* use the filename as a comment for PEM */
++ if (commentp && prv)
++ *commentp = xstrdup(filename);
++ } else {
++ key_free(pub);
++ /* key_parse_public_rsa1() has already loaded the comment */
++ prv = key_parse_private_type(buffer, KEY_RSA1, passphrase,
++ NULL);
++ }
++ return prv;
++}
++
++Key *
+ key_load_private(const char *filename, const char *passphrase,
+ char **commentp)
+ {
+- Key *pub, *prv;
+- Buffer buffer, pubcopy;
++ Key *prv;
++ Buffer buffer;
+ int fd;
+
+ fd = open(filename, O_RDONLY);
+@@ -697,23 +742,7 @@
+ }
+ close(fd);
+
+- buffer_init(&pubcopy);
+- buffer_append(&pubcopy, buffer_ptr(&buffer), buffer_len(&buffer));
+- /* it's a SSH v1 key if the public key part is readable */
+- pub = key_parse_public_rsa1(&pubcopy, commentp);
+- buffer_free(&pubcopy);
+- if (pub == NULL) {
+- prv = key_parse_private_type(&buffer, KEY_UNSPEC,
+- passphrase, NULL);
+- /* use the filename as a comment for PEM */
+- if (commentp && prv)
+- *commentp = xstrdup(filename);
+- } else {
+- key_free(pub);
+- /* key_parse_public_rsa1() has already loaded the comment */
+- prv = key_parse_private_type(&buffer, KEY_RSA1, passphrase,
+- NULL);
+- }
++ prv = key_parse_private(&buffer, filename, passphrase, commentp);
+ buffer_free(&buffer);
+ return prv;
+ }
+@@ -737,13 +766,19 @@
+ case '\0':
+ continue;
+ }
++ /* Abort loading if this looks like a private key */
++ if (strncmp(cp, "-----BEGIN", 10) == 0)
++ break;
+ /* Skip leading whitespace. */
+ for (; *cp && (*cp == ' ' || *cp == '\t'); cp++)
+ ;
+ if (*cp) {
+ if (key_read(k, &cp) == 1) {
+- if (commentp)
+- *commentp=xstrdup(filename);
++ cp[strcspn(cp, "\r\n")] = '\0';
++ if (commentp) {
++ *commentp = xstrdup(*cp ?
++ cp : filename);
++ }
+ fclose(f);
+ return 1;
+ }
diff --git a/testing/openssh/sshd b/testing/openssh/sshd
new file mode 100755
index 000000000..2ee1091f0
--- /dev/null
+++ b/testing/openssh/sshd
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/sshd
+
+PIDFILE=/var/run/sshd.pid
+PID=$(cat $PIDFILE 2>/dev/null)
+if ! readlink -q /proc/$PID/exe | grep -q '^/usr/sbin/sshd'; then
+ PID=
+ rm $PIDFILE 2>/dev/null
+fi
+
+case "$1" in
+ start)
+ stat_busy "Starting Secure Shell Daemon"
+ [ -f /etc/ssh/ssh_host_key ] || { /usr/bin/ssh-keygen -t rsa1 -N "" -f /etc/ssh/ssh_host_key >/dev/null; }
+ [ -f /etc/ssh/ssh_host_rsa_key ] || { /usr/bin/ssh-keygen -t rsa -N "" -f /etc/ssh/ssh_host_rsa_key >/dev/null; }
+ [ -f /etc/ssh/ssh_host_dsa_key ] || { /usr/bin/ssh-keygen -t dsa -N "" -f /etc/ssh/ssh_host_dsa_key >/dev/null; }
+ [ -f /etc/ssh/ssh_host_ecdsa_key ] || { /usr/bin/ssh-keygen -t ecdsa -N "" -f /etc/ssh/ssh_host_ecdsa_key >/dev/null; }
+ [ -d /var/empty ] || mkdir -p /var/empty
+ [ -z "$PID" ] && /usr/sbin/sshd $SSHD_ARGS
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon sshd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Secure Shell Daemon"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon sshd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/testing/openssh/sshd.confd b/testing/openssh/sshd.confd
new file mode 100644
index 000000000..5ce7c0079
--- /dev/null
+++ b/testing/openssh/sshd.confd
@@ -0,0 +1,4 @@
+#
+# Parameters to be passed to sshd
+#
+SSHD_ARGS=""
diff --git a/testing/openssh/sshd.pam b/testing/openssh/sshd.pam
new file mode 100644
index 000000000..ff8829fe9
--- /dev/null
+++ b/testing/openssh/sshd.pam
@@ -0,0 +1,11 @@
+#%PAM-1.0
+#auth required pam_securetty.so #Disable remote root
+auth required pam_unix.so
+auth required pam_env.so
+account required pam_nologin.so
+account required pam_unix.so
+account required pam_time.so
+password required pam_unix.so
+session required pam_unix_session.so
+session required pam_limits.so
+-session optional pam_ck_connector.so nox11
diff --git a/testing/pygtk/PKGBUILD b/testing/pygtk/PKGBUILD
new file mode 100644
index 000000000..bc7c56efa
--- /dev/null
+++ b/testing/pygtk/PKGBUILD
@@ -0,0 +1,37 @@
+# $Id: PKGBUILD 131736 2011-07-14 11:07:45Z stephane $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: Sarah Hay <sarahhay@mb.sympatico.ca>
+
+pkgname=pygtk
+pkgver=2.24.0
+pkgrel=2
+pkgdesc="Python bindings for the GTK widget set"
+arch=('i686' 'x86_64')
+license=('LGPL')
+depends=('libglade' 'python2-cairo' 'pygobject')
+makedepends=('python2-numpy' 'pygobject-devel')
+optdepends=('python2-numpy')
+options=('!libtool')
+url="http://www.pygtk.org/"
+source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.bz2
+ python27.patch)
+sha256sums=('cd1c1ea265bd63ff669e92a2d3c2a88eb26bcd9e5363e0f82c896e649f206912'
+ '39a30456cba055a452bb55c74ef1ff2f5f7bfaad22855b4dd569ab009b56b682')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ #https://bugzilla.gnome.org/show_bug.cgi?id=623965
+ patch -Np1 -i "${srcdir}/python27.patch"
+
+ PYTHON=python2 ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ install -m644 gtk/gtk-extrafuncs.defs "${pkgdir}/usr/share/pygtk/2.0/defs/"
+
+ sed -i -e 's#env python$#env python2#' "${pkgdir}"/usr/lib/pygtk/2.0/{,demos/}*.py
+}
diff --git a/testing/pygtk/python27.patch b/testing/pygtk/python27.patch
new file mode 100644
index 000000000..9bbe2b5ae
--- /dev/null
+++ b/testing/pygtk/python27.patch
@@ -0,0 +1,50 @@
+diff --git a/gtk/gtkmodule.c b/gtk/gtkmodule.c
+index c0e1493..aa8cf10 100644
+--- a/gtk/gtkmodule.c
++++ b/gtk/gtkmodule.c
+@@ -227,8 +227,12 @@ init_gtk(void)
+ pygtk_add_stock_items(d);
+
+ /* extension API */
+- PyDict_SetItemString(d, "_PyGtk_API",
+- o=PyCObject_FromVoidPtr(&functions, NULL));
++#if PY_VERSION_HEX >= 0x02070000
++ o = PyCapsule_New(&functions, "gtk._gtk._PyGtk_API", NULL);
++#else
++ o = PyCObject_FromVoidPtr(&functions, NULL);
++#endif
++ PyDict_SetItemString(d, "_PyGtk_API", o);
+ Py_DECREF(o);
+
+ PyGtkDeprecationWarning = PyErr_NewException("gtk.GtkDeprecationWarning",
+diff --git a/gtk/pygtk.h b/gtk/pygtk.h
+index 573c3b9..e4c680f 100644
+--- a/gtk/pygtk.h
++++ b/gtk/pygtk.h
+@@ -60,6 +60,18 @@ struct _PyGtk_FunctionStruct *_PyGtk_API;
+
+
+ /* a function to initialise the pygtk functions */
++
++/* Python 2.7 introduced the PyCapsule API and deprecated the CObject API */
++#if PY_VERSION_HEX >= 0x02070000
++#define init_pygtk() G_STMT_START { \
++ void *capsule = PyCapsule_Import("gtk._gtk._PyGtk_API", 0); \
++ if (!capsule) { \
++ return; \
++ } \
++ _PyGtk_API = (struct _PyGtk_FunctionStruct*)capsule; \
++} G_STMT_END
++#else /* PY_VERSION_HEX */
++/* Python 2.6 and earlier use the CObject API */
+ #define init_pygtk() G_STMT_START { \
+ PyObject *pygtk = PyImport_ImportModule("gtk"); \
+ if (pygtk != NULL) { \
+@@ -79,6 +91,7 @@ struct _PyGtk_FunctionStruct *_PyGtk_API;
+ return; \
+ } \
+ } G_STMT_END
++#endif /* PY_VERSION_HEX */
+
+ #endif
+
diff --git a/testing/python-numpy/PKGBUILD b/testing/python-numpy/PKGBUILD
new file mode 100755
index 000000000..699137cf6
--- /dev/null
+++ b/testing/python-numpy/PKGBUILD
@@ -0,0 +1,61 @@
+# $Id: PKGBUILD 131668 2011-07-13 13:42:02Z stephane $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: Douglas Soares de Andrade <dsa@aur.archlinux.org>
+# Contributor: Angel 'angvp' Velasquez <angvp[at]archlinux.com.ve>
+
+pkgbase=python-numpy
+pkgname=('python2-numpy' 'python-numpy')
+pkgver=1.6.0
+pkgrel=1
+pkgdesc="Scientific tools for Python"
+arch=('i686' 'x86_64')
+license=('custom')
+url="http://numpy.scipy.org/"
+makedepends=('lapack' 'python' 'python2' 'python-distribute' 'python2-distribute' 'gcc-fortran' 'python-nose')
+source=(http://downloads.sourceforge.net/numpy/numpy-${pkgver}.tar.gz)
+md5sums=('e0993c74cb8e83292e560eac1a9be8e9')
+
+build() {
+ cd "${srcdir}"
+ cp -a numpy-${pkgver} numpy-py2-${pkgver}
+
+ export Atlas=None
+ export LDFLAGS="$LDFLAGS -shared"
+
+ echo "Building Python2"
+ cd "${srcdir}/numpy-py2-${pkgver}"
+ python2 setup.py config_fc --fcompiler=gnu95 build
+
+ echo "Building Python3"
+ cd "${srcdir}/numpy-${pkgver}"
+ python setup.py config_fc --fcompiler=gnu95 build
+}
+
+package_python2-numpy() {
+ depends=('lapack' 'python2')
+ optdepends=('python-nose: testsuite')
+
+ cd "${srcdir}/numpy-py2-${pkgver}"
+ python2 setup.py config_fc --fcompiler=gnu95 install --prefix=/usr --root="${pkgdir}" --optimize=1
+
+ install -m755 -d "${pkgdir}/usr/share/licenses/python2-numpy"
+ install -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/python2-numpy/"
+
+ sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
+ -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
+ -e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \
+ $(find ${pkgdir} -name '*.py')
+}
+
+package_python-numpy() {
+ depends=('lapack' 'python')
+ provides=("python3-numpy=${pkgver}")
+ replaces=('python3-numpy')
+ conflicts=('python3-numpy')
+
+ cd "${srcdir}/numpy-${pkgver}"
+ python setup.py config_fc --fcompiler=gnu95 install --prefix=/usr --root="${pkgdir}" --optimize=1
+
+ install -m755 -d "${pkgdir}/usr/share/licenses/python3-numpy"
+ install -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/python3-numpy/"
+}
diff --git a/testing/quota-tools/LICENSE b/testing/quota-tools/LICENSE
new file mode 100644
index 000000000..4bae71589
--- /dev/null
+++ b/testing/quota-tools/LICENSE
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 1980, 1990 Regents of the University of California. All
+ * rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by Robert Elz at
+ * The University of Melbourne.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met: 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer. 2.
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution. 3. All advertising
+ * materials mentioning features or use of this software must display the
+ * following acknowledgement: This product includes software developed by the
+ * University of California, Berkeley and its contributors. 4. Neither the
+ * name of the University nor the names of its contributors may be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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.
+ */
diff --git a/testing/quota-tools/PKGBUILD b/testing/quota-tools/PKGBUILD
new file mode 100644
index 000000000..79bb209a4
--- /dev/null
+++ b/testing/quota-tools/PKGBUILD
@@ -0,0 +1,49 @@
+# $Id: PKGBUILD 131802 2011-07-15 11:55:43Z eric $
+# Maintainer: Eric Bélanger <eric@archlinux.org>
+
+pkgname=quota-tools
+pkgver=4.00_pre1
+pkgrel=1
+pkgdesc="Tools to manage kernel-level quotas in Linux"
+arch=('i686' 'x86_64')
+url="http://sourceforge.net/projects/linuxquota/"
+license=('GPL' 'BSD')
+depends=('e2fsprogs')
+backup=('etc/warnquota.conf' 'etc/quotatab' 'etc/quotagrpadmins')
+options=('!emptydirs')
+source=(http://downloads.sourceforge.net/sourceforge/linuxquota/quota-${pkgver/_/-}.tar.gz LICENSE \
+ quotaon.diff system_inodes.diff repquota.diff nulls.diff)
+md5sums=('ef9d66e8a968ecffd2d9df648fa8ada2'
+ 'dd792440e684043e4e4ef80963d0237b'
+ '9ac7ca4746de1ad057baee21474b7906'
+ '92d9f2a4b3e5e3adf2977051391785a7'
+ 'd1d70d4167e53d1414079b4391f1cfb8'
+ '094bce5226c4fd1c383bd0b75405ee2c')
+sha1sums=('adf29b49dab449078eb6ffdfe8af51fe85419e28'
+ '57297bdc9e638c500506169bbbe12eb89bcf7d07'
+ '2304f03cddd06d8791167f621683f7ef54610673'
+ 'e2a33f1f95a3ff8c741a2067058e898f6054af09'
+ '8b00e7c4f7af2188ad49a50a616c1d71eee20459'
+ '0527f761aa869f5d9e463ceab4a3bf82881d05c2')
+
+build() {
+ cd "${srcdir}/${pkgname}"
+ patch -p1 -i "${srcdir}/quotaon.diff"
+ patch -p1 -i "${srcdir}/system_inodes.diff"
+ patch -p1 -i "${srcdir}/repquota.diff"
+ patch -p1 -i "${srcdir}/nulls.diff"
+ ./configure --prefix=/usr --sysconfdir=/etc
+ sed -i -e 's/#define HOSTS_ACCESS 1//' -e 's/HOSTS_ACCESS//' config.h
+ sed -i 's/-lwrap//' Makefile
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}"
+ make ROOTDIR="${pkgdir}" install
+ install -D -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+# remove conflicts with glibc and man-pages
+ rm "${pkgdir}"/usr/include/rpcsvc/rquota.{h,x}
+ rm "${pkgdir}/usr/share/man/man2/quotactl.2"
+}
diff --git a/testing/quota-tools/nulls.diff b/testing/quota-tools/nulls.diff
new file mode 100644
index 000000000..97c5bc482
--- /dev/null
+++ b/testing/quota-tools/nulls.diff
@@ -0,0 +1,20 @@
+#Description: Avoid memory corruption of NULL address
+#Author: Petr Pisar
+
+--- quota/quotasys.c 2010-02-18 09:44:11.000000000 +0100
++++ quota-tools/quotasys.c 2010-05-05 08:02:53.000000000 +0200
+@@ -746,9 +746,12 @@
+ kernel_qfmt_num = 0;
+ if (!stat("/proc/fs/xfs/stat", &st))
+ kernel_qfmt[kernel_qfmt_num++] = QF_XFS;
+- else
+- if (!quotactl(QCMD(Q_XGETQSTAT, 0), NULL, 0, NULL) || (errno != EINVAL && errno != ENOSYS))
++ else {
++ fs_quota_stat_t dummy;
++
++ if (!quotactl(QCMD(Q_XGETQSTAT, 0), "/dev/root", 0, (void *)&dummy) || (errno != EINVAL && errno != ENOSYS))
+ kernel_qfmt[kernel_qfmt_num++] = QF_XFS;
++ }
+ /* Detect new kernel interface; Assume generic interface unless we can prove there is not one... */
+ if (!stat("/proc/sys/fs/quota", &st) || errno != ENOENT) {
+ kernel_iface = IFACE_GENERIC;
diff --git a/testing/quota-tools/quotaon.diff b/testing/quota-tools/quotaon.diff
new file mode 100644
index 000000000..6a43cee6c
--- /dev/null
+++ b/testing/quota-tools/quotaon.diff
@@ -0,0 +1,216 @@
+# Description: Fix quotaon to work with XFS and print all informational messages only in verbose mode
+# Author: Jan Kara
+
+diff -u quota/quotaon.c quota-tools/quotaon.c
+--- quota/quotaon.c 2010-07-28 11:14:02.000000000 +0200
++++ quota-tools/quotaon.c 2010-06-15 10:11:30.000000000 +0200
+@@ -42,6 +42,7 @@
+ #include <getopt.h>
+ #include <string.h>
+ #include <stdlib.h>
++#include <stdarg.h>
+
+ #include "quotaon.h"
+ #include "quota.h"
+@@ -145,6 +146,19 @@
+ }
+ }
+
++int pinfo(char *fmt, ...)
++{
++ va_list arg;
++ int ret;
++
++ if (!(flags & FL_VERBOSE))
++ return 0;
++ va_start(arg, fmt);
++ ret = vprintf(fmt, arg);
++ va_end(arg);
++ return ret;
++}
++
+ /*
+ * Enable/disable rsquash on given filesystem
+ */
+@@ -171,10 +185,10 @@
+ errstr(_("set root_squash on %s: %s\n"), quotadev, strerror(errno));
+ return 1;
+ }
+- if ((flags & STATEFLAG_VERBOSE) && (flags & STATEFLAG_OFF))
+- printf(_("%s: %s root_squash turned off\n"), quotadev, type2name(type));
+- else if ((flags & STATEFLAG_VERBOSE) && (flags & STATEFLAG_ON))
+- printf(_("%s: %s root_squash turned on\n"), quotadev, type2name(type));
++ if (flags & STATEFLAG_OFF)
++ pinfo(_("%s: %s root_squash turned off\n"), quotadev, type2name(type));
++ else if (flags & STATEFLAG_ON)
++ pinfo(_("%s: %s root_squash turned on\n"), quotadev, type2name(type));
+ #endif
+ return 0;
+ }
+@@ -195,8 +209,7 @@
+ errstr(_("quotactl on %s [%s]: %s\n"), quotadev, quotadir, strerror(errno));
+ return 1;
+ }
+- if (flags & STATEFLAG_VERBOSE)
+- printf(_("%s [%s]: %s quotas turned off\n"), quotadev, quotadir, type2name(type));
++ pinfo(_("%s [%s]: %s quotas turned off\n"), quotadev, quotadir, type2name(type));
+ return 0;
+ }
+ if (kernel_iface == IFACE_GENERIC) {
+@@ -218,8 +231,7 @@
+ errstr(_("Quota format not supported in kernel.\n"));
+ return 1;
+ }
+- if (flags & STATEFLAG_VERBOSE)
+- printf(_("%s [%s]: %s quotas turned on\n"), quotadev, quotadir, type2name(type));
++ pinfo(_("%s [%s]: %s quotas turned on\n"), quotadev, quotadir, type2name(type));
+ return 0;
+ }
+
+@@ -268,8 +280,6 @@
+ int sflags, ret = 0;
+
+ sflags = flags & FL_OFF ? STATEFLAG_OFF : STATEFLAG_ON;
+- if (flags & FL_VERBOSE)
+- sflags |= STATEFLAG_VERBOSE;
+ if (flags & FL_ALL)
+ sflags |= STATEFLAG_ALL;
+
+@@ -281,10 +291,7 @@
+ errstr(_("Cannot change state of XFS quota. It's not compiled in kernel.\n"));
+ return 1;
+ }
+- if ((flags & FL_OFF && (kern_quota_on(mnt->mnt_fsname, USRQUOTA, QF_XFS) != -1
+- || kern_quota_on(mnt->mnt_fsname, GRPQUOTA, QF_XFS) != -1))
+- || (!(flags & FL_OFF) && kern_quota_on(mnt->mnt_fsname, type, QF_XFS) == -1))
+- ret = xfs_newstate(mnt, type, extra, sflags);
++ ret = xfs_newstate(mnt, type, extra, sflags);
+ }
+ else if (meta_qf_fstype(mnt->mnt_type)) {
+ if (!hasquota(mnt, type, 0))
+@@ -376,7 +383,7 @@
+ while ((mnt = get_next_mount())) {
+ if (nfs_fstype(mnt->mnt_type)) {
+ if (!(flags & FL_ALL))
+- fprintf(stderr, "%s: Quota cannot be turned on on NFS filesystem\n", mnt->mnt_fsname);
++ errstr(_("%s: Quota cannot be turned on on NFS filesystem\n"), mnt->mnt_fsname);
+ continue;
+ }
+
+diff -u quota/quotaon.h quota-tools/quotaon.h
+--- quota/quotaon.h 2010-02-18 09:44:11.000000000 +0100
++++ quota-tools/quotaon.h 2010-06-12 12:06:08.000000000 +0200
+@@ -13,7 +13,7 @@
+ #define STATEFLAG_ON 0x01
+ #define STATEFLAG_OFF 0x02
+ #define STATEFLAG_ALL 0x04
+-#define STATEFLAG_VERBOSE 0x08
+
+ typedef int (newstate_t) (struct mntent * mnt, int type, char *file, int flags);
+ extern int xfs_newstate(struct mntent *mnt, int type, char *file, int flags);
++extern int pinfo(char *fmt, ...);
+diff -u quota/quotaon_xfs.c quota-tools/quotaon_xfs.c
+--- quota/quotaon_xfs.c 2010-07-26 18:48:24.000000000 +0200
++++ quota-tools/quotaon_xfs.c 2010-06-15 10:11:30.000000000 +0200
+@@ -59,8 +59,8 @@
+ return 1;
+ case Q_XFS_QUOTAON:
+ if (roothack) {
+- printf(_("Enabling %s quota on root filesystem"
+- " (reboot to take effect)\n"), type2name(type));
++ pinfo(_("Enabling %s quota on root filesystem"
++ " (reboot to take effect)\n"), type2name(type));
+ return 1;
+ }
+ errstr(_("Enable XFS %s quota accounting during mount\n"),
+@@ -79,12 +79,12 @@
+ return -1;
+ case Q_XFS_QUOTAON:
+ if (roothack) {
+- printf(_("Enabling %s quota on root filesystem"
+- " (reboot to take effect)\n"), type2name(type));
++ pinfo(_("Enabling %s quota on root filesystem"
++ " (reboot to take effect)\n"), type2name(type));
+ return 1;
+ }
+ if (xopts & XFS_QUOTA_UDQ_ENFD || xopts & XFS_QUOTA_GDQ_ENFD) {
+- printf(_("Enabling %s quota enforcement on %s\n"), type2name(type), dev);
++ pinfo(_("Enabling %s quota enforcement on %s\n"), type2name(type), dev);
+ return 1;
+ }
+ errstr(_("Already accounting %s quota on %s\n"),
+@@ -92,7 +92,7 @@
+ return -1;
+ case Q_XFS_QUOTAOFF:
+ if (xopts & XFS_QUOTA_UDQ_ACCT || xopts & XFS_QUOTA_GDQ_ACCT) {
+- printf(_("Disabling %s quota accounting on %s\n"),
++ pinfo(_("Disabling %s quota accounting on %s\n"),
+ type2name(type), dev);
+ return 1;
+ }
+@@ -121,9 +121,9 @@
+ return -1;
+ }
+ if (xopts & XFS_QUOTA_UDQ_ACCT || xopts & XFS_QUOTA_GDQ_ACCT)
+- acctstr = _("and accounting ");
+- printf(_("Disabling %s quota enforcement %son %s\n"),
+- type2name(type), acctstr, dev);
++ acctstr = _("and accounting ");
++ pinfo(_("Disabling %s quota enforcement %son %s\n"),
++ type2name(type), acctstr, dev);
+ return 1;
+ }
+ break;
+@@ -146,10 +146,10 @@
+ errstr(_("quotactl on %s: %s\n"), dev, strerror(errno));
+ return 1;
+ }
+- if ((flags & STATEFLAG_VERBOSE) && qoff)
+- printf(_("%s: %s quotas turned off\n"), dev, type2name(type));
+- else if ((flags & STATEFLAG_VERBOSE) && !qoff)
+- printf(_("%s: %s quotas turned on\n"), dev, type2name(type));
++ if (qoff)
++ pinfo(_("%s: %s quotas turned off\n"), dev, type2name(type));
++ else
++ pinfo(_("%s: %s quotas turned on\n"), dev, type2name(type));
+ return 0;
+ }
+
+@@ -168,8 +168,7 @@
+ return 1;
+ }
+
+- if (flags & STATEFLAG_VERBOSE)
+- printf(_("%s: deleted %s quota blocks\n"), dev, type2name(type));
++ pinfo(_("%s: deleted %s quota blocks\n"), dev, type2name(type));
+ return 0;
+ }
+
+@@ -208,16 +207,12 @@
+ }
+ #endif /* XFS_ROOTHACK */
+
+- if (xarg == NULL) { /* both acct & enfd on/off */
+- xopts |= (type == USRQUOTA) ?
+- (XFS_QUOTA_UDQ_ACCT | XFS_QUOTA_UDQ_ENFD) :
+- (XFS_QUOTA_GDQ_ACCT | XFS_QUOTA_GDQ_ENFD);
++ if (xarg == NULL) { /* only enfd on/off */
++ xopts |= (type == USRQUOTA) ? XFS_QUOTA_UDQ_ENFD :
++ XFS_QUOTA_GDQ_ENFD;
+ err = xfs_onoff((char *)dev, type, flags, roothack, xopts);
+ }
+ else if (strcmp(xarg, "account") == 0) {
+- /* only useful if we want root accounting only */
+- if (!roothack || !(flags & STATEFLAG_ON))
+- goto done;
+ xopts |= (type == USRQUOTA) ? XFS_QUOTA_UDQ_ACCT : XFS_QUOTA_GDQ_ACCT;
+ err = xfs_onoff((char *)dev, type, flags, roothack, xopts);
+ }
+@@ -231,7 +226,6 @@
+ }
+ else
+ die(1, _("Invalid argument \"%s\"\n"), xarg);
+- done:
+ free((char *)dev);
+ return err;
+ }
diff --git a/testing/quota-tools/repquota.diff b/testing/quota-tools/repquota.diff
new file mode 100644
index 000000000..3d79497d9
--- /dev/null
+++ b/testing/quota-tools/repquota.diff
@@ -0,0 +1,91 @@
+# Description: fix repquota to get latest quota info header
+# Author: Jan Kara
+
+diff -u quota/quotaio.c quota-tools/quotaio.c
+--- quota/quotaio.c 2010-07-28 11:14:02.000000000 +0200
++++ quota-tools/quotaio.c 2010-05-28 09:05:21.000000000 +0200
+@@ -147,6 +147,15 @@
+ }
+ }
+ if (!QIO_ENABLED(h) || flags & IOI_OPENFILE) { /* Need to open file? */
++ if (QIO_ENABLED(h)) { /* Kernel uses same file? */
++ unsigned int cmd =
++ (kernel_iface == IFACE_GENERIC) ? Q_SYNC : Q_6_5_SYNC;
++ if (quotactl(QCMD(cmd, h->qh_type), h->qh_quotadev,
++ 0, NULL) < 0) {
++ die(4, _("Cannot sync quotas on device %s: %s\n"),
++ h->qh_quotadev, strerror(errno));
++ }
++ }
+ /* We still need to open file for operations like 'repquota' */
+ if ((fd = open(qfname, QIO_RO(h) ? O_RDONLY : O_RDWR)) < 0) {
+ errstr(_("Cannot open quotafile %s: %s\n"),
+diff -u quota/quotaio_v1.c quota-tools/quotaio_v1.c
+--- quota/quotaio_v1.c 2010-07-26 18:48:24.000000000 +0200
++++ quota-tools/quotaio_v1.c 2010-05-28 09:05:23.000000000 +0200
+@@ -348,11 +348,6 @@
+ struct dquot *dquot = get_empty_dquot();
+ qid_t id = 0;
+
+- if (QIO_ENABLED(h)) /* Kernel uses same file? */
+- if (quotactl(QCMD((kernel_iface == IFACE_GENERIC) ? Q_SYNC : Q_6_5_SYNC, h->qh_type),
+- h->qh_quotadev, 0, NULL) < 0)
+- die(4, _("Cannot sync quotas on device %s: %s\n"), h->qh_quotadev,
+- strerror(errno));
+ memset(dquot, 0, sizeof(*dquot));
+ dquot->dq_h = h;
+ lseek(h->qh_fd, 0, SEEK_SET);
+diff -u quota/quotaio_v2.c quota-tools/quotaio_v2.c
+--- quota/quotaio_v2.c 2010-02-18 09:44:11.000000000 +0100
++++ quota-tools/quotaio_v2.c 2010-05-28 09:05:23.000000000 +0200
+@@ -484,11 +484,6 @@
+
+ static int v2_scan_dquots(struct quota_handle *h, int (*process_dquot) (struct dquot *, char *))
+ {
+- if (QIO_ENABLED(h)) /* Kernel uses same file? */
+- if (quotactl(QCMD((kernel_iface == IFACE_GENERIC) ? Q_SYNC : Q_6_5_SYNC, h->qh_type),
+- h->qh_quotadev, 0, NULL) < 0)
+- die(4, _("Cannot sync quotas on device %s: %s\n"), h->qh_quotadev,
+- strerror(errno));
+ return qtree_scan_dquots(h, process_dquot);
+ }
+
+diff -u quota/quotasys.c quota-tools/quotasys.c
+--- quota/quotasys.c 2010-07-28 11:14:02.000000000 +0200
++++ quota-tools/quotasys.c 2010-06-15 10:11:30.000000000 +0200
+@@ -861,22 +861,23 @@
+ if (kernel_iface == IFACE_GENERIC) {
+ int actfmt;
+
+- if (quotactl(QCMD(Q_GETFMT, type), dev, 0, (void *)&actfmt) < 0)
+- return -1;
+- actfmt = kern2utilfmt(actfmt);
+- if (actfmt < 0)
+- return -1;
+- return actfmt;
++ if (quotactl(QCMD(Q_GETFMT, type), dev, 0,
++ (void *)&actfmt) >= 0) {
++ actfmt = kern2utilfmt(actfmt);
++ if (actfmt >= 0)
++ return actfmt;
++ }
++ } else {
++ if ((fmt == -1 || fmt == QF_VFSV0) &&
++ v2_kern_quota_on(dev, type)) /* VFSv0 quota format */
++ return QF_VFSV0;
++ if ((fmt == -1 || fmt == QF_VFSOLD) &&
++ v1_kern_quota_on(dev, type)) /* Old quota format */
++ return QF_VFSOLD;
+ }
+- if ((fmt == -1 || fmt == QF_VFSV0) &&
+- v2_kern_quota_on(dev, type)) /* VFSv0 quota format */
+- return QF_VFSV0;
+ if ((fmt == -1 || fmt == QF_XFS) &&
+ xfs_kern_quota_on(dev, type)) /* XFS quota format */
+ return QF_XFS;
+- if ((fmt == -1 || fmt == QF_VFSOLD) &&
+- v1_kern_quota_on(dev, type)) /* Old quota format */
+- return QF_VFSOLD;
+ return -1;
+ }
+
diff --git a/testing/quota-tools/system_inodes.diff b/testing/quota-tools/system_inodes.diff
new file mode 100644
index 000000000..94f4d66da
--- /dev/null
+++ b/testing/quota-tools/system_inodes.diff
@@ -0,0 +1,18 @@
+# Description: Do not count system inodes into quota for ext[234]
+# Author: Jan Kara
+
+--- quota/quotacheck.c 2010-02-18 09:44:10.000000000 +0100
++++ quota-tools//quotacheck.c 2010-05-22 16:47:53.000000000 +0200
+@@ -455,8 +455,10 @@
+ return -1;
+ }
+
+- while ((long)i_num) {
+- if (inode.i_links_count) {
++ while (i_num) {
++ if ((i_num == EXT2_ROOT_INO ||
++ i_num >= EXT2_FIRST_INO(fs->super)) &&
++ inode.i_links_count) {
+ debug(FL_DEBUG, _("Found i_num %ld, blocks %ld\n"), (long)i_num, (long)inode.i_blocks);
+ if (flags & FL_VERBOSE)
+ blit(NULL);
diff --git a/testing/rrdtool/PKGBUILD b/testing/rrdtool/PKGBUILD
new file mode 100644
index 000000000..2395df342
--- /dev/null
+++ b/testing/rrdtool/PKGBUILD
@@ -0,0 +1,37 @@
+# $Id: PKGBUILD 131818 2011-07-15 23:27:54Z dan $
+# Maintainer: Eric Bélanger <eric@archlinux.org>
+
+pkgname=rrdtool
+pkgver=1.4.5
+pkgrel=3
+pkgdesc="Data logging and graphing application"
+arch=('i686' 'x86_64')
+url="http://www.rrdtool.org"
+license=('GPL' 'custom')
+depends=('libpng' 'libxml2' 'pango')
+makedepends=('intltool' 'ruby' 'python2' 'tcl' 'lua')
+optdepends=('tcl: to use corresponding binding' \
+ 'python2: to use corresponding binding' \
+ 'ruby: to use corresponding binding' \
+ 'lua: to use corresponding binding')
+options=('!libtool' '!emptydirs' '!makeflags')
+source=(http://oss.oetiker.ch/rrdtool/pub/rrdtool-${pkgver}.tar.gz)
+md5sums=('4d116dba9a0888d8aaac179e35d3980a')
+sha1sums=('56638e8aedd5d5522152e86746e382b75dc48c35')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ sed -i 's|-lrrd|-lrrd -L/usr/lib/perl5/core_perl/CORE/ -lperl -Wl,-E -Wl,-rpath,/usr/lib/perl5/core_perl/CORE |' \
+ bindings/perl-shared/Makefile.PL
+ ./configure --prefix=/usr --localstatedir=/var --disable-rpath \
+ --enable-perl --enable-perl-site-install --with-perl-options='INSTALLDIRS=vendor' \
+ --enable-ruby --enable-ruby-site-install --enable-python \
+ --enable-lua --enable-lua-site-install --enable-tcl --disable-libwrap
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ install -D -m644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/testing/slv2/PKGBUILD b/testing/slv2/PKGBUILD
new file mode 100644
index 000000000..3005cd313
--- /dev/null
+++ b/testing/slv2/PKGBUILD
@@ -0,0 +1,32 @@
+# $Id: PKGBUILD 131701 2011-07-13 15:39:04Z schiv $
+# Maintainer: Ray Rashif <schiv@archlinux.org>
+# Contributor: Leslie P. Polzer <polzer@stardawn.org>
+
+pkgname=slv2
+pkgver=0.6.6
+pkgrel=6
+pkgdesc="Library for LV2 hosts"
+arch=('i686' 'x86_64')
+url="http://drobilla.net/software/slv2"
+license=('GPL')
+depends=('redland>=1.0.13' 'lv2core' 'jack')
+makedepends=('python2')
+install=$pkgname.install
+changelog=$pkgname.changelog
+source=(http://download.drobilla.net/$pkgname-$pkgver.tar.bz2)
+md5sums=('b8e8e0e82dd04324fcd533e8acd1ce85')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ python2 waf configure --prefix=/usr
+ python2 waf build $MAKEFLAGS
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ python2 waf install --destdir="$pkgdir/"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/testing/slv2/slv2.changelog b/testing/slv2/slv2.changelog
new file mode 100644
index 000000000..f394a5067
--- /dev/null
+++ b/testing/slv2/slv2.changelog
@@ -0,0 +1,23 @@
+22 Feb 2011 (GMT+8) Ray Rashif <schiv@archlinux.org>
+
+ * 0.6.6-3:
+ raptor rebuild
+
+24 Nov 2010 (GMT+8) Ray Rashif <schiv@archlinux.org>
+
+ * PKGBUILD :
+ Get rid of sed and use python2 directly for waf.
+ waf fix for python transition already included previously (unlogged).
+ Release only (no need binary update; no runtime python requirement).
+
+9 Aug 2010 (GMT+8) Ray Rashif <schiv@archlinux.org>
+
+ * 0.6.6-2 :
+ Brought into extra from community for ardour
+ - adds "LV2" plug-ins support
+
+ * PKGBUILD :
+ Minor cosmetic ammendments.
+
+ * slv2.changelog :
+ Added this changelog.
diff --git a/testing/slv2/slv2.install b/testing/slv2/slv2.install
new file mode 100644
index 000000000..c980ddfab
--- /dev/null
+++ b/testing/slv2/slv2.install
@@ -0,0 +1,14 @@
+post_install() {
+ echo "Updating Shared Library Links"
+ /sbin/ldconfig
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/testing/socat/PKGBUILD b/testing/socat/PKGBUILD
new file mode 100644
index 000000000..458009ce3
--- /dev/null
+++ b/testing/socat/PKGBUILD
@@ -0,0 +1,32 @@
+# $Id: PKGBUILD 131647 2011-07-13 08:01:50Z bisson $
+# Maintainer: Gaetan Bisson <bisson@archlinux.org>
+# Contributor: Juergen Hoetzel <juergen@archlinux.org>
+# Contributor: John Proctor <jproctor@prium.net>
+
+pkgname=socat
+pkgver=1.7.1.3
+pkgrel=3
+pkgdesc='Multipurpose relay'
+url='http://www.dest-unreach.org/socat/'
+license=('GPL2')
+arch=('i686' 'x86_64')
+depends=('readline' 'openssl')
+source=("http://www.dest-unreach.org/socat/download/${pkgname}-${pkgver}.tar.gz")
+sha1sums=('5a42275da0d8a5182452b36535a74c3cdf21793b')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ ./configure \
+ --prefix=/usr \
+ --mandir=/usr/share/man \
+ --disable-libwrap # only required while base/base-devel uses tcp_wrappers
+
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/testing/tftp-hpa/LICENSE b/testing/tftp-hpa/LICENSE
new file mode 100644
index 000000000..6dade6984
--- /dev/null
+++ b/testing/tftp-hpa/LICENSE
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 1983, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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.
+ */
diff --git a/testing/tftp-hpa/PKGBUILD b/testing/tftp-hpa/PKGBUILD
new file mode 100644
index 000000000..72034141e
--- /dev/null
+++ b/testing/tftp-hpa/PKGBUILD
@@ -0,0 +1,35 @@
+# $Id: PKGBUILD 131856 2011-07-16 06:36:05Z tpowa $
+# Maintainer: dorphell <dorphell@archlinux.org>
+# Contributor: Jose Javier <jojapa@terra.es>
+pkgname=tftp-hpa
+pkgver=5.1
+pkgrel=1
+pkgdesc="Official tftp server"
+arch=('i686' 'x86_64')
+url="http://www.kernel.org/pub/software/network/tftp/"
+license=('BSD')
+depends=('readline>=6.0.00')
+conflicts=('netkit-tftp')
+backup=('etc/conf.d/tftpd')
+source=(http://www.kernel.org/pub/software/network/tftp/$pkgname-$pkgver.tar.gz tftpd.rc tftpd.conf LICENSE)
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --mandir=/usr/share/man --without-tcpwrappers
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make INSTALLROOT="${pkgdir}" install
+ install -d "${pkgdir}/etc/rc.d"
+ install -d "${pkgdir}/var/tftpboot"
+ install -m755 "${srcdir}/tftpd.rc" "${pkgdir}/etc/rc.d/tftpd"
+ install -D -m644 "${srcdir}/tftpd.conf" "${pkgdir}/etc/conf.d/tftpd"
+ rm "${pkgdir}/usr/share/man/man8/tftpd.8"
+ install -D -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
+md5sums=('d086b1bd6e5ed6375ad407e273afccdf'
+ '83fbb6f52205d95951a3c059e5351ca2'
+ '414a79dc891bced056d99a9bb790fc9e'
+ '6ce21e27b6fdc1a1adf85c81e42aeecf')
diff --git a/testing/tftp-hpa/tftpd.conf b/testing/tftp-hpa/tftpd.conf
new file mode 100644
index 000000000..4705cc3a9
--- /dev/null
+++ b/testing/tftp-hpa/tftpd.conf
@@ -0,0 +1,4 @@
+#
+# Parameters to be passed to TFTPD
+#
+TFTPD_ARGS="-l -s /var/tftpboot"
diff --git a/testing/tftp-hpa/tftpd.rc b/testing/tftp-hpa/tftpd.rc
new file mode 100755
index 000000000..0222d1693
--- /dev/null
+++ b/testing/tftp-hpa/tftpd.rc
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+TFTPD_ARGS=
+[ -f /etc/conf.d/tftpd ] && . /etc/conf.d/tftpd
+
+PID=$(pidof -o %PPID /usr/sbin/in.tftpd)
+case "$1" in
+ start)
+ stat_busy "Starting TFTPD"
+ [ -z "$PID" ] && /usr/sbin/in.tftpd ${TFTPD_ARGS}
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon tftpd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping TFTPD"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon tftpd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/testing/vsftpd/PKGBUILD b/testing/vsftpd/PKGBUILD
new file mode 100644
index 000000000..c35fe02de
--- /dev/null
+++ b/testing/vsftpd/PKGBUILD
@@ -0,0 +1,43 @@
+# $Id: PKGBUILD 131827 2011-07-15 23:59:43Z dreisner $
+# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+# Contributor: judd <jvinet@zeroflux.org>
+
+pkgname=vsftpd
+pkgver=2.3.4
+pkgrel=2
+pkgdesc="Very Secure FTP daemon"
+arch=('i686' 'x86_64')
+url="https://security.appspot.com/vsftpd.html"
+license=('GPL2')
+depends=('openssl')
+backup=('etc/vsftpd.conf' 'etc/xinetd.d/vsftpd')
+install=vsftpd.install
+source=("https://security.appspot.com/downloads/${pkgname}-${pkgver}.tar.gz"
+ 'vsftpd.xinetd' 'vsftpd.d')
+md5sums=('2ea5d19978710527bb7444d93b67767a'
+ 'b07fd4609c70063c1d6b20142910c1a6'
+ '60060a6c7db3b3b7baa1561a302e6923')
+sha1sums=('b774cc6b4c50e20f4fe9ca7f6aa74169ce7fe5ea'
+ 'c87b4ce56dac15223694a6e86c01ea813b877596'
+ '24f268956c24e78be0c234c6d31f41487922eafe')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ # build-time config
+ sed \
+ -e 's|^#undef VSF_BUILD_SSL$|#define VSF_BUILD_SSL|' \
+ -i builddefs.h
+ make CFLAGS="${CFLAGS}"
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ install -D -m755 vsftpd "${pkgdir}/usr/sbin/vsftpd"
+ install -D -m644 vsftpd.conf "${pkgdir}/etc/vsftpd.conf"
+ install -D -m644 vsftpd.8 "${pkgdir}/usr/share/man/man8/vsftpd.8"
+ install -D -m644 vsftpd.conf.5 "${pkgdir}/usr/share/man/man5/vsftpd.conf.5"
+ install -D -m644 "${srcdir}/vsftpd.xinetd" "${pkgdir}/etc/xinetd.d/vsftpd"
+ install -D -m755 "${srcdir}/vsftpd.d" "${pkgdir}/etc/rc.d/vsftpd"
+
+ install -d -m755 "${pkgdir}/usr/share/empty"
+}
diff --git a/testing/vsftpd/vsftpd.d b/testing/vsftpd/vsftpd.d
new file mode 100644
index 000000000..27310855c
--- /dev/null
+++ b/testing/vsftpd/vsftpd.d
@@ -0,0 +1,67 @@
+#!/bin/bash
+
+daemon_name=vsftpd
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+get_pid() {
+ pidof -o %PPID $daemon_name
+}
+
+case "$1" in
+ start)
+ stat_busy "Starting $daemon_name daemon"
+
+ PID=$(get_pid)
+ if [ -z "$PID" ]; then
+ [ -f /var/run/$daemon_name.pid ] && rm -f /var/run/$daemon_name.pid
+ # RUN
+ $daemon_name &
+ #
+ if [ $? -gt 0 ]; then
+ stat_fail
+ exit 1
+ else
+ echo $(get_pid) > /var/run/$daemon_name.pid
+ add_daemon $daemon_name
+ stat_done
+ fi
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+
+ stop)
+ stat_busy "Stopping $daemon_name daemon"
+ PID=$(get_pid)
+ # KILL
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ #
+ if [ $? -gt 0 ]; then
+ stat_fail
+ exit 1
+ else
+ rm -f /var/run/$daemon_name.pid &> /dev/null
+ rm_daemon $daemon_name
+ stat_done
+ fi
+ ;;
+
+ restart)
+ $0 stop
+ sleep 3
+ $0 start
+ ;;
+
+ status)
+ stat_busy "Checking $daemon_name status";
+ ck_status $daemon_name
+ ;;
+
+ *)
+ echo "usage: $0 {start|stop|restart|status}"
+esac
+
+exit 0
diff --git a/testing/vsftpd/vsftpd.install b/testing/vsftpd/vsftpd.install
new file mode 100644
index 000000000..48f134e24
--- /dev/null
+++ b/testing/vsftpd/vsftpd.install
@@ -0,0 +1,17 @@
+# arg 1: the new package version
+post_install() {
+ if [ -f lib/modules/`uname -r`/kernel/security/capability.ko ]; then
+ echo ">>> It appears that your current kernel has linux security"
+ echo ">>> capabilities built as a module. vsftpd requires this"
+ echo ">>> functionality to operate."
+ echo ">>>"
+ echo ">>> To activate the module, please load it now (modprobe capability)."
+ echo ">>> Also, you should add it to your MODULES array in rc.conf, so"
+ echo ">>> it will be activated automatically at boot-up."
+ fi
+}
+
+post_upgrade() {
+ post_install $1
+}
+
diff --git a/testing/vsftpd/vsftpd.xinetd b/testing/vsftpd/vsftpd.xinetd
new file mode 100644
index 000000000..eff2eb3db
--- /dev/null
+++ b/testing/vsftpd/vsftpd.xinetd
@@ -0,0 +1,10 @@
+service ftp
+{
+ socket_type = stream
+ wait = no
+ user = root
+ server = /usr/sbin/vsftpd
+ log_on_success += HOST DURATION
+ log_on_failure += HOST
+ disable = yes
+}
diff --git a/testing/xinetd/PKGBUILD b/testing/xinetd/PKGBUILD
new file mode 100644
index 000000000..27bf3b2a0
--- /dev/null
+++ b/testing/xinetd/PKGBUILD
@@ -0,0 +1,43 @@
+# $Id: PKGBUILD 131821 2011-07-15 23:50:00Z dan $
+# Maintainer:
+# Contributor: Judd <jvinet@zeroflux.org>
+
+pkgname=xinetd
+pkgver=2.3.14
+pkgrel=7
+pkgdesc="A secure replacement for inetd"
+arch=('i686' 'x86_64')
+url="http://www.xinetd.org/"
+license=('custom')
+optdepends=('perl: for xconv.pl script')
+backup=('etc/xinetd.conf' 'etc/xinetd.d/servers' 'etc/xinetd.d/services')
+source=(http://www.xinetd.org/xinetd-$pkgver.tar.gz
+ xinetd.conf
+ xinetd
+ servers
+ services)
+md5sums=('567382d7972613090215c6c54f9b82d9'
+ 'f109f699a07bc8cfb5791060f5e87f9e'
+ 'ea37a2794f202e6b953d9b6956dad16a'
+ '21f47b4aa20921cfaddddd9f9a407f81'
+ '9fa2061dc7dd738c8424251deb86f81e')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ sed -i "s#${prefix}/man#${prefix}/share/man#" configure
+ ./configure --prefix=/usr --without-libwrap
+ make
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+ make prefix=$pkgdir/usr install
+
+ install -Dm755 $srcdir/xinetd $pkgdir/etc/rc.d/xinetd
+ install -Dm644 $srcdir/xinetd.conf $pkgdir/etc/xinetd.conf
+ install -Dm644 $srcdir/servers $pkgdir/etc/xinetd.d/servers
+ install -Dm644 $srcdir/services $pkgdir/etc/xinetd.d/services
+
+ # install license
+ install -Dm644 COPYRIGHT $pkgdir/usr/share/licenses/$pkgname/COPYRIGHT
+}
diff --git a/testing/xinetd/servers b/testing/xinetd/servers
new file mode 100644
index 000000000..f064c8d7a
--- /dev/null
+++ b/testing/xinetd/servers
@@ -0,0 +1,10 @@
+service servers
+{
+ type = INTERNAL UNLISTED
+ port = 9099
+ socket_type = stream
+ protocol = tcp
+ wait = no
+ disable = yes
+ only_from = 127.0.0.1
+}
diff --git a/testing/xinetd/services b/testing/xinetd/services
new file mode 100644
index 000000000..4ea304c4f
--- /dev/null
+++ b/testing/xinetd/services
@@ -0,0 +1,10 @@
+service services
+{
+ type = INTERNAL UNLISTED
+ port = 9098
+ socket_type = stream
+ protocol = tcp
+ wait = no
+ disable = yes
+ only_from = 127.0.0.1
+}
diff --git a/testing/xinetd/xinetd b/testing/xinetd/xinetd
new file mode 100755
index 000000000..4b8fa369a
--- /dev/null
+++ b/testing/xinetd/xinetd
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/xinetd`
+case "$1" in
+ start)
+ stat_busy "Starting xinetd"
+ [ -z "$PID" ] && /usr/sbin/xinetd -stayalive -pidfile /var/run/xinetd.pid
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ echo $PID > /var/run/xinetd.pid
+ add_daemon xinetd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping xinetd"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm -f /var/run/xinetd.pid
+ rm_daemon xinetd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/testing/xinetd/xinetd.conf b/testing/xinetd/xinetd.conf
new file mode 100644
index 000000000..b15d9f649
--- /dev/null
+++ b/testing/xinetd/xinetd.conf
@@ -0,0 +1,14 @@
+#
+# /etc/xinetd.conf
+#
+
+defaults
+{
+ instances = 60
+ log_type = SYSLOG authpriv
+ log_on_success = HOST PID
+ log_on_failure = HOST
+ cps = 25 30
+}
+
+includedir /etc/xinetd.d