summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorNicolas Reynolds <fauno@kiwwwi.com.ar>2011-05-14 00:07:43 -0300
committerNicolas Reynolds <fauno@kiwwwi.com.ar>2011-05-14 00:07:43 -0300
commit6d90f2496f41209ab84d8b61d20b4d79d632ec7d (patch)
tree91a141bc21b17ccd6187b5c6a8b9f53367d9c93e /testing
parent26841be26f283b971f431eb735f748cef7a5250d (diff)
parent2c4629f613c001fd29740d0f4c0e497c771a2182 (diff)
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts: community/frogatto/PKGBUILD community/python-psycopg2/PKGBUILD core/libtirpc/PKGBUILD extra/cd-discid/PKGBUILD extra/cups/PKGBUILD extra/cyrus-sasl/PKGBUILD extra/evolution-data-server/PKGBUILD extra/gnome-control-center/PKGBUILD extra/gnugo/PKGBUILD extra/gperf/PKGBUILD extra/gtk2/PKGBUILD extra/kdegames/PKGBUILD extra/kismet/PKGBUILD extra/lzo/PKGBUILD extra/mutt/PKGBUILD extra/obconf/PKGBUILD extra/opensp/PKGBUILD extra/qt3/PKGBUILD extra/re2c/PKGBUILD extra/samba/PKGBUILD extra/sharutils/PKGBUILD extra/wireshark/PKGBUILD
Diffstat (limited to 'testing')
-rw-r--r--testing/binutils/PKGBUILD89
-rw-r--r--testing/binutils/binutils-2.21-strip-segfault.patch96
-rw-r--r--testing/binutils/binutils.install17
-rw-r--r--testing/file/PKGBUILD39
-rw-r--r--testing/file/file-5.05-zip64.patch11
-rw-r--r--testing/libgssglue/PKGBUILD34
-rw-r--r--testing/libgssglue/gssapi_mech.conf22
-rw-r--r--testing/lvm2/Be-quiet-on-removing-cache-on-read-only-fs.diff17
-rw-r--r--testing/lvm2/PKGBUILD67
-rw-r--r--testing/lvm2/lvm2_hook24
-rw-r--r--testing/lvm2/lvm2_install29
-rw-r--r--testing/udev/80-drivers.rules14
-rw-r--r--testing/udev/81-arch.rules138
-rw-r--r--testing/udev/PKGBUILD116
-rwxr-xr-xtesting/udev/cdsymlinks.sh44
-rwxr-xr-xtesting/udev/load-modules.sh80
-rw-r--r--testing/udev/udev.install38
-rw-r--r--testing/ypbind-mt/PKGBUILD35
-rwxr-xr-xtesting/ypbind-mt/ypbind36
-rw-r--r--testing/ypbind-mt/ypbind.conf4
-rw-r--r--testing/ypserv/PKGBUILD36
-rwxr-xr-xtesting/ypserv/yppasswd34
-rwxr-xr-xtesting/ypserv/ypserv34
23 files changed, 1054 insertions, 0 deletions
diff --git a/testing/binutils/PKGBUILD b/testing/binutils/PKGBUILD
new file mode 100644
index 000000000..0d1d6a0bc
--- /dev/null
+++ b/testing/binutils/PKGBUILD
@@ -0,0 +1,89 @@
+# $Id: PKGBUILD 123424 2011-05-11 10:41:25Z allan $
+# Maintainer: Allan McRae <allan@archlinux.org>
+
+# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
+
+pkgname=binutils
+pkgver=2.21
+pkgrel=8
+_date=20110430
+pkgdesc="A set of programs to assemble and manipulate binary and object files"
+arch=('i686' 'x86_64')
+url="http://www.gnu.org/software/binutils/"
+license=('GPL')
+groups=('base')
+depends=('glibc>=2.13' 'zlib')
+makedepends=('dejagnu')
+options=('!libtool' '!distcc' '!ccache')
+install=binutils.install
+source=(ftp://ftp.archlinux.org/other/${pkgname}/${pkgname}-${pkgver}_${_date}.tar.bz2
+ binutils-2.21-strip-segfault.patch)
+md5sums=('7b3e28fb35cb8bb371cc47291e1c6dec'
+ '98e8dfaf1c0ededa586823ebfb27825a')
+
+mksource() {
+ mkdir ${pkgname}-${_date}
+ cd ${pkgname}-${_date}
+ export _TAG=binutils-2_21-branch
+ export 'CVSROOT=:pserver:anoncvs@sourceware.org:/cvs/src'
+ cvs -z9 co -r $_TAG binutils || return 1
+ mv src binutils
+ tar -cvjf ../binutils-${pkgver}_${_date}.tar.bz2 binutils/*
+}
+
+build() {
+ cd ${srcdir}/binutils
+ # http://sourceware.org/bugzilla/show_bug.cgi?id=12632
+ patch -Np1 -i $srcdir/binutils-2.21-strip-segfault.patch
+
+ cd ${srcdir}
+ mkdir binutils-build && cd binutils-build
+
+ [[ $CARCH == "x86_64" ]] && CONFIGFLAG="--enable-64-bit-bfd --disable-multilib"
+
+ ${srcdir}/binutils/configure --prefix=/usr \
+ --enable-ld=default --enable-gold \
+ --enable-plugins --enable-threads \
+ --enable-shared $CONFIGFLAG
+
+ # This checks the host environment and makes sure all the necessary tools are available to compile Binutils.
+ make configure-host
+
+ make tooldir=${pkgdir}/usr
+}
+
+check() {
+ cd ${srcdir}/binutils-build
+
+ # do not abort on errors - manually check log files
+ make -k -j1 check || true
+}
+
+package() {
+ cd ${srcdir}/binutils-build
+ make prefix=${pkgdir}/usr tooldir=${pkgdir}/usr install
+
+ # Add some useful headers
+ install -m644 ${srcdir}/binutils/include/libiberty.h ${pkgdir}/usr/include
+ install -m644 ${srcdir}/binutils/include/demangle.h ${pkgdir}/usr/include
+
+ # Rebuild libiberty.a with -fPIC
+ make -C libiberty clean
+ make CFLAGS="$CFLAGS -fPIC" -C libiberty
+ install -m644 libiberty/libiberty.a ${pkgdir}/usr/lib
+
+ # Rebuild libbfd.a with -fPIC
+ make -C bfd clean
+ # hidden visability prevent 3rd party shared libraries exporting bfd non-stable API
+ make CFLAGS="$CFLAGS -fPIC -fvisibility=hidden" -C bfd
+ install -m644 bfd/libbfd.a ${pkgdir}/usr/lib
+
+ # Remove Windows/Novell specific man pages
+ rm -f ${pkgdir}/usr/share/man/man1/{dlltool,nlmconv,windres,windmc}*
+
+ # Remove these symlinks, they are not ABI stable.
+ # Programs should compile static to the .a file.
+ rm -f ${pkgdir}/usr/lib/lib{bfd,opcodes}.so
+ echo "INPUT ( /usr/lib/libbfd.a -liberty -lz )" >${pkgdir}/usr/lib/libbfd.so
+ echo "INPUT ( /usr/lib/libopcodes.a -lbfd )" >${pkgdir}/usr/lib/libopcodes.so
+}
diff --git a/testing/binutils/binutils-2.21-strip-segfault.patch b/testing/binutils/binutils-2.21-strip-segfault.patch
new file mode 100644
index 000000000..0133d879b
--- /dev/null
+++ b/testing/binutils/binutils-2.21-strip-segfault.patch
@@ -0,0 +1,96 @@
+diff --git a/binutils/objcopy.c b/binutils/objcopy.c
+index 15c4f95..b64f3d0 100644
+--- a/binutils/objcopy.c
++++ b/binutils/objcopy.c
+@@ -1,6 +1,6 @@
+ /* objcopy.c -- copy object file from input to output, optionally massaging it.
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+- 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
++ 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+ Free Software Foundation, Inc.
+
+ This file is part of GNU Binutils.
+@@ -2024,6 +2024,7 @@ copy_archive (bfd *ibfd, bfd *obfd, const char *output_target,
+ struct stat buf;
+ int stat_status = 0;
+ bfd_boolean del = TRUE;
++ bfd_boolean ok_object;
+
+ /* Create an output file for this member. */
+ output_name = concat (dir, "/",
+@@ -2061,44 +2062,42 @@ copy_archive (bfd *ibfd, bfd *obfd, const char *output_target,
+ l->obfd = NULL;
+ list = l;
+
+- if (bfd_check_format (this_element, bfd_object))
++ ok_object = bfd_check_format (this_element, bfd_object);
++ if (!ok_object)
++ bfd_nonfatal_message (NULL, this_element, NULL,
++ _("Unable to recognise the format of file"));
++
++ /* PR binutils/3110: Cope with archives
++ containing multiple target types. */
++ if (force_output_target || !ok_object)
++ output_bfd = bfd_openw (output_name, output_target);
++ else
++ output_bfd = bfd_openw (output_name, bfd_get_target (this_element));
++
++ if (output_bfd == NULL)
+ {
+- /* PR binutils/3110: Cope with archives
+- containing multiple target types. */
+- if (force_output_target)
+- output_bfd = bfd_openw (output_name, output_target);
+- else
+- output_bfd = bfd_openw (output_name, bfd_get_target (this_element));
++ bfd_nonfatal_message (output_name, NULL, NULL, NULL);
++ status = 1;
++ return;
++ }
++
++ if (ok_object)
++ {
++ del = !copy_object (this_element, output_bfd, input_arch);
+
+- if (output_bfd == NULL)
++ if (del && bfd_get_arch (this_element) == bfd_arch_unknown)
++ /* Try again as an unknown object file. */
++ ok_object = FALSE;
++ else if (!bfd_close (output_bfd))
+ {
+ bfd_nonfatal_message (output_name, NULL, NULL, NULL);
++ /* Error in new object file. Don't change archive. */
+ status = 1;
+- return;
+ }
+-
+- del = ! copy_object (this_element, output_bfd, input_arch);
+-
+- if (! del
+- || bfd_get_arch (this_element) != bfd_arch_unknown)
+- {
+- if (!bfd_close (output_bfd))
+- {
+- bfd_nonfatal_message (output_name, NULL, NULL, NULL);
+- /* Error in new object file. Don't change archive. */
+- status = 1;
+- }
+- }
+- else
+- goto copy_unknown_element;
+ }
+- else
+- {
+- bfd_nonfatal_message (NULL, this_element, NULL,
+- _("Unable to recognise the format of file"));
+
+- output_bfd = bfd_openw (output_name, output_target);
+-copy_unknown_element:
++ if (!ok_object)
++ {
+ del = !copy_unknown_object (this_element, output_bfd);
+ if (!bfd_close_all_done (output_bfd))
+ {
+--
+1.6.5.GIT
+
diff --git a/testing/binutils/binutils.install b/testing/binutils/binutils.install
new file mode 100644
index 000000000..8bf9f3a47
--- /dev/null
+++ b/testing/binutils/binutils.install
@@ -0,0 +1,17 @@
+infodir=usr/share/info
+filelist=(as.info bfd.info binutils.info configure.info gprof.info ld.info standards.info)
+
+post_upgrade() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
+}
+
+pre_remove() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
+}
+
diff --git a/testing/file/PKGBUILD b/testing/file/PKGBUILD
new file mode 100644
index 000000000..be9e1c172
--- /dev/null
+++ b/testing/file/PKGBUILD
@@ -0,0 +1,39 @@
+# $Id: PKGBUILD 123428 2011-05-11 11:07:46Z allan $
+# Maintainer: Allan McRae <allan@archlinux.org>
+# Contributor: Andreas Radke <andyrtr@archlinux.org>
+
+pkgname=file
+pkgver=5.07
+pkgrel=1
+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.05-zip64.patch)
+md5sums=('b8d1f9a8a644067bd0a703cebf3f4858'
+ '385f020467debd98bd2d8df6143f93d0')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ sed -i 's#\$(datadir)/misc#\$(datadir)#' configure
+
+ # identify zip64 files
+ patch -Np1 -i ${srcdir}/file-5.05-zip64.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.05-zip64.patch b/testing/file/file-5.05-zip64.patch
new file mode 100644
index 000000000..2c9aede5f
--- /dev/null
+++ b/testing/file/file-5.05-zip64.patch
@@ -0,0 +1,11 @@
+diff -Naur file-5.05-old//magic/Magdir/archive file-5.05/magic/Magdir/archive
+--- file-5.05-old//magic/Magdir/archive 2011-01-08 06:24:25.000000000 +1000
++++ file-5.05/magic/Magdir/archive 2011-01-19 14:37:47.766673895 +1000
+@@ -688,6 +688,7 @@
+ >>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
+
+ # Zoo archiver
+ 20 lelong 0xfdc4a7dc Zoo archive data
diff --git a/testing/libgssglue/PKGBUILD b/testing/libgssglue/PKGBUILD
new file mode 100644
index 000000000..493598561
--- /dev/null
+++ b/testing/libgssglue/PKGBUILD
@@ -0,0 +1,34 @@
+# $Id: PKGBUILD 123644 2011-05-12 06:23:26Z tpowa $
+# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+
+pkgname=libgssglue
+pkgver=0.1
+pkgrel=4
+pkgdesc="Exports a gssapi interface which calls other random gssapi libraries"
+arch=('i686' 'x86_64')
+url="http://www.citi.umich.edu/projects/nfsv4/linux/"
+license=('BSD')
+depends=('glibc')
+makedepends=('pkgconfig' 'autoconf')
+backup=(etc/gssapi_mech.conf)
+options=('!libtool')
+source=(http://www.citi.umich.edu/projects/nfsv4/linux/$pkgname/$pkgname-$pkgver.tar.gz
+ gssapi_mech.conf)
+md5sums=('ce1b4c758e6de01b712d154c5c97e540'
+ '080be866717e4e06fa6f7d6f43cb395a')
+
+build() {
+ cd "$srcdir"/$pkgname-$pkgver
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "$srcdir"/$pkgname-$pkgver
+ make DESTDIR="$pkgdir/" install
+
+ # Configuration
+ install -Dm644 "$srcdir"/gssapi_mech.conf "$pkgdir/"etc/gssapi_mech.conf
+ # install license
+ install -Dm644 COPYING "$pkgdir"/usr/share/licenses/libgssglue/COPYING
+}
diff --git a/testing/libgssglue/gssapi_mech.conf b/testing/libgssglue/gssapi_mech.conf
new file mode 100644
index 000000000..9a832ee1b
--- /dev/null
+++ b/testing/libgssglue/gssapi_mech.conf
@@ -0,0 +1,22 @@
+# Example /etc/gssapi_mech.conf file
+#
+# GSSAPI Mechanism Definitions
+#
+# This configuration file determines which GSS-API mechanisms
+# the gssd code should use
+#
+# NOTE:
+# The initiaiization function "mechglue_internal_krb5_init"
+# is used for the MIT krb5 gssapi mechanism. This special
+# function name indicates that an internal function should
+# be used to determine the entry points for the MIT gssapi
+# mechanism funtions.
+#
+# library initialization function
+# ================================ ==========================
+# The MIT K5 gssapi library, use special function for initialization.
+/usr/lib/libgssapi_krb5.so mechglue_internal_krb5_init
+#/usr/lib/libgssapi.so mechglue_internal_krb5_init
+#
+# The SPKM3 gssapi library function. Use the function spkm3_gss_initialize.
+# /usr/local/gss_mechs/spkm/spkm3/libgssapi_spkm3.so spkm3_gss_initialize
diff --git a/testing/lvm2/Be-quiet-on-removing-cache-on-read-only-fs.diff b/testing/lvm2/Be-quiet-on-removing-cache-on-read-only-fs.diff
new file mode 100644
index 000000000..e75499e8e
--- /dev/null
+++ b/testing/lvm2/Be-quiet-on-removing-cache-on-read-only-fs.diff
@@ -0,0 +1,17 @@
+Do not issue an error message when unable to remove .cache on read-only fs.
+===================================================================
+RCS file: /cvs/lvm2/LVM2/lib/filters/filter-persistent.c,v
+retrieving revision 1.49
+retrieving revision 1.50
+diff -u -r1.49 -r1.50
+--- LVM2/lib/filters/filter-persistent.c 2011/04/22 12:05:33 1.49
++++ LVM2/lib/filters/filter-persistent.c 2011/05/12 12:42:48 1.50
+@@ -108,7 +108,7 @@
+ log_very_verbose("Obtaining device list from "
+ "udev. Removing obolete %s.",
+ pf->file);
+- if (unlink(pf->file) < 0)
++ if (unlink(pf->file) < 0 && errno != EROFS)
+ log_sys_error("unlink", pf->file);
+ }
+ return 1;
diff --git a/testing/lvm2/PKGBUILD b/testing/lvm2/PKGBUILD
new file mode 100644
index 000000000..e7129b765
--- /dev/null
+++ b/testing/lvm2/PKGBUILD
@@ -0,0 +1,67 @@
+# $Id: PKGBUILD 123786 2011-05-13 00:53:49Z eric $
+# Maintainer: Eric Bélanger <eric@archlinux.org>
+# Maintainer: Thomas Bächler <thomas@archlinux.org>
+
+pkgbase=lvm2
+pkgname=('lvm2' 'device-mapper')
+pkgver=2.02.85
+_pkgverlvm=${pkgver}
+pkgrel=1
+arch=('i686' 'x86_64')
+url="http://sourceware.org/lvm2/"
+license=('GPL2' 'LGPL2.1')
+groups=('base')
+conflicts=('mkinitcpio<0.5.99')
+source=(ftp://sources.redhat.com/pub/lvm2/LVM2.${_pkgverlvm}.tgz
+ lvm2_install
+ lvm2_hook
+ Be-quiet-on-removing-cache-on-read-only-fs.diff)
+md5sums=('91785ca438e5ce679dd3a386b183d552'
+ 'e29bc80d636ed17b617d9b384a5f3aa0'
+ 'cf05f2c7281e24269ea9dcc6b4e106ba'
+ '6db89da27928d2415a8e26cd0a842712')
+sha1sums=('43ba2a3be84b2e897ae6b47b0b0be7e212216be7'
+ '662fc54ce291fd79bd09701e4c3e10854f325282'
+ '1cd20e8fbad6fd7d5c0f54e831fbf58ae564b440'
+ '6d7dd04be291d7537235704c816a701fd5beacc0')
+
+build() {
+ cd "${srcdir}/LVM2.${_pkgverlvm}"
+ sed -i 's|/usr/bin/tr|/bin/tr|' scripts/lvmdump.sh
+ patch -p1 -i ../Be-quiet-on-removing-cache-on-read-only-fs.diff
+ unset LDFLAGS
+ ./configure --prefix= --sysconfdir=/etc --localstatedir=/var --datarootdir=/usr/share \
+ --includedir=/usr/include --with-usrlibdir=/usr/lib \
+ --enable-pkgconfig --enable-readline --enable-dmeventd --enable-cmdlib --enable-applib \
+ --with-udevdir=/lib/udev/rules.d/ --enable-udev_sync --enable-udev_rules
+ make
+}
+
+package_device-mapper() {
+ pkgdesc="Device mapper userspace library and tools"
+ url="http://sourceware.org/dm/"
+ depends=('glibc' 'udev')
+
+ cd "${srcdir}/LVM2.${_pkgverlvm}"
+ make DESTDIR="${pkgdir}" install_device-mapper
+}
+
+package_lvm2() {
+ pkgdesc="Logical Volume Manager 2 utilities"
+ depends=('bash' "device-mapper>=${pkgver}" 'udev' 'readline')
+ conflicts=('lvm' 'mkinitcpio<0.5.99')
+ backup=('etc/lvm/lvm.conf')
+ options=('!makeflags')
+
+ cd "${srcdir}/LVM2.${_pkgverlvm}"
+ make DESTDIR="${pkgdir}" install_lvm2
+ # install applib
+ cd liblvm
+ make DESTDIR="${pkgdir}" install
+ cd ..
+ # /etc directories
+ install -d "${pkgdir}"/etc/lvm/{archive,backup}
+ # mkinitcpio hook
+ install -D -m644 "${srcdir}/lvm2_hook" "${pkgdir}/lib/initcpio/hooks/lvm2"
+ install -D -m644 "${srcdir}/lvm2_install" "${pkgdir}/lib/initcpio/install/lvm2"
+}
diff --git a/testing/lvm2/lvm2_hook b/testing/lvm2/lvm2_hook
new file mode 100644
index 000000000..86d2ea582
--- /dev/null
+++ b/testing/lvm2/lvm2_hook
@@ -0,0 +1,24 @@
+# vim:set ft=sh:
+run_hook ()
+{
+ /sbin/modprobe -q dm-mod >/dev/null 2>&1
+ if [ -e "/sys/class/misc/device-mapper" ]; then
+ if [ ! -e "/dev/mapper/control" ]; then
+ /bin/mknod "/dev/mapper/control" c $(cat /sys/class/misc/device-mapper/dev | sed 's|:| |')
+ fi
+
+ # If the lvmwait= parameter has been specified on the command line
+ # wait for the device(s) before trying to activate the volume group(s)
+ if [ -n "${lvmwait}" ]; then
+ for pvdev in $(echo ${lvmwait} | sed 's|,| |g'); do
+ poll_device ${pvdev} ${rootdelay}
+ done
+ fi
+
+ [ "${quiet}" = "y" ] && LVMQUIET=">/dev/null"
+
+ msg "Activating logical volumes..."
+ [ -d /etc/lvm ] && /sbin/lvm vgscan --sysinit
+ eval /sbin/lvm vgchange --sysinit -a y $LVMQUIET
+ fi
+}
diff --git a/testing/lvm2/lvm2_install b/testing/lvm2/lvm2_install
new file mode 100644
index 000000000..0c01ce69c
--- /dev/null
+++ b/testing/lvm2/lvm2_install
@@ -0,0 +1,29 @@
+# vim: set ft=sh:
+
+install ()
+{
+ MODULES=" dm-mod dm-snapshot dm-mirror"
+ BINARIES=""
+ FILES=""
+ SCRIPT="lvm2"
+
+ add_dir "/dev/mapper"
+ add_binary "/sbin/lvm"
+ add_binary "/sbin/dmsetup"
+ add_file "/lib/udev/rules.d/10-dm.rules"
+ add_file "/lib/udev/rules.d/13-dm-disk.rules"
+ add_file "/lib/udev/rules.d/95-dm-notify.rules"
+ add_file "/lib/udev/rules.d/11-dm-lvm.rules"
+}
+
+help ()
+{
+cat<<HELPEOF
+ This hook loads the necessary modules for an LVM2 root device.
+
+ The optional lvmwait= parameter followed by a comma-separated
+ list of device names can be given on the command line.
+ It will cause the hook to wait until all given devices exist
+ before trying to scan and activate any volume groups.
+HELPEOF
+}
diff --git a/testing/udev/80-drivers.rules b/testing/udev/80-drivers.rules
new file mode 100644
index 000000000..56ac06cb4
--- /dev/null
+++ b/testing/udev/80-drivers.rules
@@ -0,0 +1,14 @@
+# do not edit this file, it will be overwritten on update
+
+ACTION=="remove", GOTO="drivers_end"
+
+DRIVER!="?*", ENV{MODALIAS}=="?*", RUN+="/lib/udev/load-modules.sh $env{MODALIAS}"
+SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN+="/lib/udev/load-modules.sh tifm_sd"
+SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", RUN+="/lib/udev/load-modules.sh tifm_ms"
+SUBSYSTEM=="memstick", RUN+="/lib/udev/load-modules.sh ms_block"
+SUBSYSTEM=="memstick", RUN+="/lib/udev/load-modules.sh mspro_block"
+SUBSYSTEM=="i2o", RUN+="/lib/udev/load-modules.sh i2o_block"
+SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST!="[module/sg]", RUN+="/lib/udev/load-modules.sh sg"
+SUBSYSTEM=="module", KERNEL=="parport_pc", RUN+="/lib/udev/load-modules.sh ppdev"
+
+LABEL="drivers_end"
diff --git a/testing/udev/81-arch.rules b/testing/udev/81-arch.rules
new file mode 100644
index 000000000..21127a729
--- /dev/null
+++ b/testing/udev/81-arch.rules
@@ -0,0 +1,138 @@
+# Udev rules for Archlinux by Tobias Powalowski <tpowa@archlinux.org>
+# do not edit this file, it will be overwritten on update
+#
+# There are a number of modifiers that are allowed to be used in some
+# of the different fields. They provide the following subsitutions:
+#
+# %n the "kernel number" of the device.
+# For example, 'sda3' has a "kernel number" of '3'
+# %k the kernel name for the device.
+# %M the kernel major number for the device
+# %m the kernel minor number for the device
+# %b the bus id for the device
+# %c the string returned by the PROGRAM
+# %s{filename} the content of a sysfs attribute.
+# %% the '%' char itself.
+#
+# There are a number of modifiers that are allowed to be used in some of the
+# fields. See the udev man page for a full description of them.
+# global stuff
+#
+
+#####################################
+###### Hotplug rules - begin
+# Only additional modules,
+# which are not detectable,
+# are loaded here!
+#####################################
+# check if the device has already been claimed by a driver
+ACTION!="add", GOTO="drivers_end"
+
+# SOUND addon modules
+SUBSYSTEM=="sound", RUN+="/lib/udev/load-modules.sh snd-pcm-oss"
+SUBSYSTEM=="sound", RUN+="/lib/udev/load-modules.sh snd-seq-oss"
+
+#PNP addon modules
+SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", ATTRS{id}=="PNP0800", RUN+="/lib/udev/load-modules.sh pcspkr"
+SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", ATTRS{id}=="*PNP051[01]*", RUN+="/lib/udev/load-modules.sh irtty-sir"
+SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", ATTRS{id}=="PNPb02f", RUN+="/lib/udev/load-modules.sh analog"
+
+# PARPORT addon modules
+SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", ATTRS{id}=="PNP040*", RUN+="/lib/udev/load-modules.sh lp"
+SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", ATTRS{id}=="PNP040*", RUN+="/lib/udev/load-modules.sh ppdev"
+
+# fix ide cdrom detection on old proliant servers
+SUBSYSTEM=="pci", ENV{MODALIAS}=="pci:v00000E11d00000001sv00000000sd00000000bc06sc02i00", RUN+="/lib/udev/load-modules.sh ide-generic"
+
+LABEL="drivers_end"
+#####################################
+##### Hotplug rules - end
+#####################################
+
+#####################################
+###### CD/DVD symlinks - begin
+#####################################
+ACTION=="add|change", SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", IMPORT="cdrom_id --export $tempnode"
+ACTION=="add|change", SUBSYSTEMS=="scsi", KERNEL=="sr[0-9]*", IMPORT="cdrom_id --export $tempnode"
+ACTION=="add|change", SUBSYSTEMS=="scsi", KERNEL=="scd[a-z]", IMPORT="cdrom_id --export $tempnode"
+ENV{ID_CDROM}=="?*", SYMLINK+="cd/cdrom-%b"
+ENV{ID_CDROM_CD_RW}=="?*", SYMLINK+="cd/cdrw-%b"
+ENV{ID_CDROM_DVD}=="?*", SYMLINK+="cd/dvd-%b"
+ENV{ID_CDROM_DVD_R}=="?*", SYMLINK+="cd/dvdrw-%b"
+ACTION=="add|change", SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTR{removable}=="1", ATTRS{media}=="cdrom*", RUN+="cdsymlinks.sh"
+ACTION=="add|change", SUBSYSTEMS=="scsi", KERNEL=="sr[0-9]*", ATTRS{type}=="5", RUN+="cdsymlinks.sh"
+ACTION=="add|change", SUBSYSTEMS=="scsi", KERNEL=="sg[0-9]*", ATTRS{type}=="5", RUN+="cdsymlinks.sh"
+ACTION=="remove", SUBSYSTEMS=="block", KERNEL=="hd[a-z]", RUN+="cdsymlinks.sh"
+ACTION=="remove", SUBSYSTEMS=="block", KERNEL=="sr[0-9]*", RUN+="cdsymlinks.sh"
+ACTION=="remove", SUBSYSTEMS=="block", KERNEL=="sg[0-9]*", RUN+="cdsymlinks.sh"
+#####################################
+###### CD/DVD symlinks - end
+#####################################
+
+#####################################
+# Additional Archlinux
+# Permissions and Symlinks - begin
+#####################################
+
+# permission for sg devices
+KERNEL=="sg[0-9]*", ATTRS{type}!="3|6", GROUP="disk", MODE="0660"
+
+# permissions for IDE CD devices
+SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTR{removable}=="1", ATTRS{media}=="cdrom*", GROUP="optical"
+
+# permissions for SCSI CD devices
+SUBSYSTEMS=="scsi", KERNEL=="sr[0-9]*", ATTRS{type}=="5", SYMLINK+="scd%n", GROUP="optical"
+SUBSYSTEMS=="scsi", KERNEL=="sg[0-9]*", ATTRS{type}=="5", GROUP="optical"
+
+# permissions for removable devices like cardreaders or sticks
+KERNEL=="sd*", ATTRS{scsi_level}=="3", ATTRS{type}=="0", GROUP="storage"
+
+# permissions for firewire external drives
+KERNEL=="sd*", ATTRS{scsi_level}=="5", GROUP="storage"
+
+# permissions for usb to scsi external adapters
+KERNEL=="sd*", ATTRS{scsi_level}=="3", ATTRS{type}=="7", GROUP="storage"
+
+# permissions for ide storage like pcmcia card readers
+ACTION!="add", GOTO="pcmcia_end"
+SUBSYSTEM!="block", GOTO="pcmcia_end"
+KERNEL=="hd*[!0-9]", IMPORT{program}="ata_id --export $tempnode"
+KERNEL=="hd*", IMPORT{parent}=="ID_*"
+KERNEL=="hd*", ENV{ID_TYPE}=="generic", GROUP="storage"
+LABEL="pcmcia_end"
+
+# permissions for SCSI scanners
+SUBSYSTEMS=="scsi", KERNEL=="sg[0-9]*", ATTRS{type}=="6", GROUP="scanner"
+
+# mem
+KERNEL=="ram0", SYMLINK+="ramdisk"
+KERNEL=="ram1", SYMLINK+="ram"
+
+# video4linux
+
+KERNEL=="vbi0", SYMLINK+="vbi"
+KERNEL=="radio0", SYMLINK+="radio"
+KERNEL=="radio[0-9]*", GROUP="video"
+KERNEL=="video0", SYMLINK+="video"
+KERNEL=="vtx0", SYMLINK+="vtx"
+
+# video devices
+### xorg resets those permissions, adjust your xorg.conf!
+KERNEL=="3dfx*", GROUP="video"
+KERNEL=="fb[0-9]*", GROUP="video"
+
+# misc
+KERNEL=="sgi_fetchop", MODE="0666"
+KERNEL=="sonypi", MODE="0666"
+
+# USB devices
+KERNEL=="legousbtower*", MODE="0666"
+
+# kbd devices
+KERNEL=="kbd", MODE="0664"
+
+# miscellaneous
+KERNEL=="rtc|rtc0", GROUP="audio", MODE="0664"
+#######################################
+# Permissions and Symlinks - end
+#######################################
diff --git a/testing/udev/PKGBUILD b/testing/udev/PKGBUILD
new file mode 100644
index 000000000..44c2cf9d7
--- /dev/null
+++ b/testing/udev/PKGBUILD
@@ -0,0 +1,116 @@
+# $Id: PKGBUILD 123587 2011-05-11 16:38:57Z tomegun $
+# Maintainer: Aaron Griffin <aaron@archlinux.org>
+# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+# Maintainer: Thomas Bächler <thomas@archlinux.org>
+# Maintainer: Tom Gundersen <teg@jklm.no>
+
+pkgbase="udev"
+pkgname=('udev' 'udev-compat')
+pkgver=168
+pkgrel=1
+arch=(i686 x86_64)
+url="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
+license=('GPL')
+groups=('base')
+# older initscripts versions required start_udev
+options=(!makeflags !libtool)
+makedepends=('glibc' 'coreutils' 'util-linux' 'pciutils' 'libusb-compat' 'glib2' 'kernel26' 'gperf' 'libxslt' 'gobject-introspection')
+source=(http://www.kernel.org/pub/linux/utils/kernel/hotplug/$pkgbase-$pkgver.tar.bz2
+ 80-drivers.rules
+ 81-arch.rules
+ load-modules.sh
+ cdsymlinks.sh)
+
+build() {
+ cd $srcdir/$pkgbase-$pkgver
+ ./configure --sysconfdir=/etc --with-rootlibdir=/lib --libexecdir=/lib/udev\
+ --sbindir=/sbin --with-systemdsystemunitdir=/lib/systemd/system
+ make
+}
+
+package_udev() {
+ pkgdesc="The userspace dev tools (udev)"
+ depends=('glibc' 'coreutils' 'util-linux' 'libusb-compat' 'glib2'
+ 'module-init-tools>=3.11' 'pciutils')
+ install=udev.install
+ backup=(etc/udev/udev.conf
+ etc/modprobe.d/framebuffer_blacklist.conf)
+ conflicts=('pcmcia-cs' 'hotplug' 'initscripts<2009.07')
+ replaces=('devfsd')
+
+ cd $srcdir/$pkgbase-$pkgver
+ make DESTDIR=${pkgdir} install
+ # Replace original 80-drivers.rules with custom one.
+ install -D -m644 $srcdir/80-drivers.rules $pkgdir/lib/udev/rules.d/80-drivers.rules
+ # Install our rule for permissions and symlinks
+ install -D -m644 $srcdir/81-arch.rules $pkgdir/lib/udev/rules.d/81-arch.rules
+ # install our module loading subsystem
+ install -D -m755 $srcdir/load-modules.sh $pkgdir/lib/udev/load-modules.sh
+ # install cdsymlinks.sh
+ install -D -m755 $srcdir/cdsymlinks.sh $pkgdir/lib/udev/cdsymlinks.sh
+ # disable error logging to prevent startup failures printed to vc on boot
+ sed -i -e 's|udev_log="err"|udev_log="0"|g' $pkgdir/etc/udev/udev.conf
+ # disable persistent cdromsymlinks and network by default
+ # and move it to /etc/udev/rules.d
+ mv $pkgdir/lib/udev/rules.d/75-persistent-net-generator.rules \
+ $pkgdir/etc/udev/rules.d/75-persistent-net-generator.rules.optional
+ mv $pkgdir/lib/udev/rules.d/75-cd-aliases-generator.rules \
+ $pkgdir/etc/udev/rules.d/75-cd-aliases-generator.rules.optional
+
+ # create framebuffer blacklist
+ mkdir -p $pkgdir/etc/modprobe.d/
+ for mod in $(find /lib/modules/*/kernel/drivers/video -name '*fb.ko.gz' -exec basename {} .ko.gz \;); do
+ echo "blacklist $mod"
+ done | sort -u > $pkgdir/etc/modprobe.d/framebuffer_blacklist.conf
+
+ # create static devices in /lib/udev/devices/
+ mkdir ${pkgdir}/lib/udev/devices/pts
+ mkdir ${pkgdir}/lib/udev/devices/shm
+
+ mknod -m 0600 ${pkgdir}/lib/udev/devices/console c 5 1
+ mknod -m 0666 ${pkgdir}/lib/udev/devices/null c 1 3
+ mknod -m 0660 ${pkgdir}/lib/udev/devices/zero c 1 5
+ mknod -m 0666 ${pkgdir}/lib/udev/devices/kmsg c 1 11
+
+ ln -snf /proc/self/fd ${pkgdir}/lib/udev/devices/fd
+ ln -snf /proc/self/fd/0 ${pkgdir}/lib/udev/devices/stdin
+ ln -snf /proc/self/fd/1 ${pkgdir}/lib/udev/devices/stdout
+ ln -snf /proc/self/fd/2 ${pkgdir}/lib/udev/devices/stderr
+ ln -snf /proc/kcore ${pkgdir}/lib/udev/devices/core
+
+ # these static devices are created for convenience, to autoload the modules if necessary
+ # /dev/loop0
+ mknod -m 0660 ${pkgdir}/lib/udev/devices/loop0 b 7 0
+ chgrp disk ${pkgdir}/lib/udev/devices/loop0
+ # /dev/net/tun
+ mkdir ${pkgdir}/lib/udev/devices/net
+ mknod -m 0666 ${pkgdir}/lib/udev/devices/net/tun c 10 200
+ # /dev/fuse
+ mknod -m 0666 ${pkgdir}/lib/udev/devices/fuse c 10 229
+ # /dev/ppp
+ mknod -m 0600 ${pkgdir}/lib/udev/devices/ppp c 108 0
+
+ # Replace dialout/tape/cdrom group in rules with uucp/storage/optical group
+ for i in $pkgdir/lib/udev/rules.d/*.rules; do
+ sed -i -e 's#GROUP="dialout"#GROUP="uucp"#g;
+ s#GROUP="tape"#GROUP="storage"#g;
+ s#GROUP="cdrom"#GROUP="optical"#g' $i
+ done
+
+ # Provided by the bluez package, remove this line when updating to udev>=169
+ rm ${pkgdir}/lib/udev/hid2hci
+}
+
+package_udev-compat() {
+ pkgdesc="The userspace dev tools (udev) - additional rules for older kernels"
+ depends=('udev')
+ groups=('')
+ cd $srcdir/$pkgbase-$pkgver
+ install -d -m755 ${pkgdir}/lib/${pkgbase}/rules.d
+ install -D -m644 ${srcdir}/${pkgbase}-${pkgver}/rules/misc/30-kernel-compat.rules ${pkgdir}/lib/udev/rules.d/30-kernel-compat.rules
+}
+md5sums=('4a466078532ab5dd5c35acc3ea2ec9a1'
+ '4427855146513a4703ab5c7eb8a0156e'
+ 'f17c99779173ddc79f866cf3a5de5e68'
+ 'f91fddc67609b45b244a624977c4247b'
+ '2e808ee78d237c478b57af2a68d43769')
diff --git a/testing/udev/cdsymlinks.sh b/testing/udev/cdsymlinks.sh
new file mode 100755
index 000000000..498abda4a
--- /dev/null
+++ b/testing/udev/cdsymlinks.sh
@@ -0,0 +1,44 @@
+#! /bin/sh
+# Creates cdsymlinks in /dev
+# for Archlinux by Tobias Powalowski <tpowa@archlinux.org>
+
+# check on cd/dvd drives and if persistant rules file is used
+if [ -d /dev/cd -a ! -e /etc/udev/rules.d/75-persistent-cd.rules ]; then
+ # remove existing device files
+ rm /dev/cdrom*
+ rm /dev/cdrw*
+ rm /dev/dvd*
+ rm /dev/dvdrw*
+ # start creating symlinks
+ for i in /dev/cd/cdrom-*; do
+ if [ -h $i ]; then
+ [ "$CD_NUMBER" = "" ] && ln -s $i /dev/cdrom
+ [ "$CD_NUMBER" = "" ] && CD_NUMBER="-1"
+ ! [ "$CD_NUMBER" = "" ] && CD_NUMBER="$((CD_NUMBER+1))" && ln -s $i /dev/cdrom$CD_NUMBER
+ fi
+ done
+
+ for i in /dev/cd/cdrw-*; do
+ if [ -h $i ]; then
+ [ "$CDRW_NUMBER" = "" ] && ln -s $i /dev/cdrw
+ [ "$CDRW_NUMBER" = "" ] && CDRW_NUMBER="-1"
+ ! [ "$CDRW_NUMBER" = "" ] && CDRW_NUMBER="$((CDRW_NUMBER+1))" && ln -s $i /dev/cdrw$CDRW_NUMBER
+ fi
+ done
+
+ for i in /dev/cd/dvd-*; do
+ if [ -h $i ]; then
+ [ "$DVD_NUMBER" = "" ] && ln -s $i /dev/dvd
+ [ "$DVD_NUMBER" = "" ] && DVD_NUMBER="-1"
+ ! [ "$DVD_NUMBER" = "" ] && DVD_NUMBER="$((DVD_NUMBER+1))" && ln -s $i /dev/dvd$DVD_NUMBER
+ fi
+ done
+
+ for i in /dev/cd/dvdrw-*; do
+ if [ -h $i ]; then
+ [ "$DVDRW_NUMBER" = "" ] && ln -s $i /dev/dvdrw
+ [ "$DVDRW_NUMBER" = "" ] && DVDRW_NUMBER="-1"
+ ! [ "$DVDRW_NUMBER" = "" ] && DVDRW_NUMBER="$((DVDRW_NUMBER+1))" && ln -s $i /dev/dvdrw$DVDRW_NUMBER
+ fi
+ done
+fi
diff --git a/testing/udev/load-modules.sh b/testing/udev/load-modules.sh
new file mode 100755
index 000000000..1e2af913e
--- /dev/null
+++ b/testing/udev/load-modules.sh
@@ -0,0 +1,80 @@
+#!/bin/bash
+# Implement blacklisting for udev-loaded modules
+
+[ $# -ne 1 ] && exit 1
+
+. /etc/rc.conf
+
+# grab modules from rc.conf
+BLACKLIST="${MOD_BLACKLIST[@]}"
+MODPROBE="/sbin/modprobe"
+LOGGER="/usr/bin/logger"
+RESOLVEALIAS="${MODPROBE} --resolve-alias"
+USEBLACKLIST="--use-blacklist"
+
+if [ -f /proc/cmdline ]; then
+ for cmd in $(cat /proc/cmdline); do
+ case $cmd in
+ disablemodules=*) eval $cmd ;;
+ load_modules=off) exit ;;
+ esac
+ done
+ #parse cmdline entries of the form "disablemodules=x,y,z"
+ if [ -n "$disablemodules" ]; then
+ BLACKLIST="$BLACKLIST $(echo $disablemodules | sed 's|,| |g')"
+ fi
+fi
+
+#MODULES entries in rc.conf that begin with ! are blacklisted
+for mod in ${MODULES[@]}; do
+ if [ "${mod}" != "${mod#!}" ]; then
+ BLACKLIST="$BLACKLIST ${mod#!}"
+ fi
+done
+
+if [ "$MOD_AUTOLOAD" = "yes" -o "$MOD_AUTOLOAD" = "YES" ]; then
+ if [ -n "${BLACKLIST}" ]; then
+ # If an alias name is on the blacklist, load no modules for this device
+ if echo "${BLACKLIST}" | /bin/grep -q -e " $1 " -e "^$1 " -e " $1\$"; then
+ $LOGGER -p info -t "$(basename $0)" "Not loading module alias '$1' because it is blacklisted"
+ exit
+ fi
+ #sanitize the blacklist
+ BLACKLIST="$(echo "$BLACKLIST" | sed -e 's|-|_|g')"
+ # Try to find all modules for the alias
+ mods=$($RESOLVEALIAS $1)
+ # If no modules could be found, try if the alias name is a module name
+ # In that case, omit the --use-blacklist parameter to imitate normal modprobe behaviour
+ [ -z "${mods}" ] && $MODPROBE -qni $1 && mods="$1" && USEBLACKLIST=""
+ [ -z "${mods}" ] && $LOGGER -p local0.debug -t "$(basename $0)" "'$1' is not a valid module or alias name"
+ for mod in ${mods}; do
+ # Find the module and all its dependencies
+ deps="$($MODPROBE -i --show-depends ${mod})"
+ [ $? -ne 0 ] && continue
+
+ #sanitize the module names
+ deps="$(echo "$deps" | sed \
+ -e "s#^insmod /lib.*/\(.*\)\.ko.*#\1#g" \
+ -e 's|-|_|g')"
+
+ # If the module or any of its dependencies is blacklisted, don't load it
+ for dep in $deps; do
+ if echo "${BLACKLIST}" | /bin/grep -q -e " ${dep} " -e "^${dep} " -e " ${dep}\$"; then
+ if [ "${dep}" = "${mod}" ]; then
+ $LOGGER -p local0.info -t "$(basename $0)" "Not loading module '${mod}' for alias '$1' because it is blacklisted"
+ else
+ $LOGGER -p local0.info -t "$(basename $0)" "Not loading module '${mod}' for alias '$1' because its dependency '${dep}' is blacklisted"
+ fi
+ continue 2
+ fi
+ done
+ # modprobe usually uses the "blacklist" statements from modprobe.conf only to blacklist all aliases
+ # of a module, but not the module itself. We use --use-blacklist here so that modprobe also blacklists
+ # module names if we resolved alias names manually above
+ $MODPROBE $USEBLACKLIST ${mod}
+ done
+ else
+ $MODPROBE $USEBLACKLIST $1
+ fi
+fi
+# vim: set et ts=4:
diff --git a/testing/udev/udev.install b/testing/udev/udev.install
new file mode 100644
index 000000000..e953ec743
--- /dev/null
+++ b/testing/udev/udev.install
@@ -0,0 +1,38 @@
+# arg 1: the new package version
+# arg 2: the old package version
+
+post_upgrade() {
+ if [ "$(vercmp $2 100)" -lt 0 ]; then
+ echo "ATTENTION UDEV:"
+ echo "----------"
+ echo "udev >=098 rules syntax has changed, please update your own rules."
+ echo "udev >=099 Added persistent network and CD/DVD Symlink generator rules."
+ echo "Please read the instructions carefully before reboot."
+ echo "They are located in /etc/udev/readme-udev-arch.txt"
+ echo "----------"
+ fi
+}
+
+post_install() {
+ # If a ramfs is mounted, we still need to make sure that /dev/{console,null,zero} exist
+ # The Archlinux installer bind-mounts /dev to /mnt/dev, thus making the real /dev invisible
+ ROOTDIR=""
+ [ "$(stat -c %D /)" != "$(stat -c %D /dev)" ] && ROOTDIR=$(mktemp -d /tmp/udevinstall.XXXXXX)
+ [ -n "${ROOTDIR}" ] && mount --bind / ${ROOTDIR}
+ if [ ! -c ${ROOTDIR}/dev/console ]; then
+ rm -f ${ROOTDIR}/dev/console
+ mknod -m600 ${ROOTDIR}/dev/console c 5 1
+ fi
+ if [ ! -c ${ROOTDIR}/dev/null ]; then
+ rm -f ${ROOTDIR}/dev/null
+ mknod -m644 ${ROOTDIR}/dev/null c 1 3
+ fi
+ if [ ! -c ${ROOTDIR}/dev/zero ]; then
+ rm -f ${ROOTDIR}/dev/zero
+ mknod -m644 ${ROOTDIR}/dev/zero c 1 5
+ fi
+ if [ -n "${ROOTDIR}" ]; then
+ umount ${ROOTDIR}
+ rmdir ${ROOTDIR}
+ fi
+}
diff --git a/testing/ypbind-mt/PKGBUILD b/testing/ypbind-mt/PKGBUILD
new file mode 100644
index 000000000..ddb807725
--- /dev/null
+++ b/testing/ypbind-mt/PKGBUILD
@@ -0,0 +1,35 @@
+# $Id: PKGBUILD 123631 2011-05-11 23:05:30Z bisson $
+# Maintainer: Gaetan Bisson <bisson@archlinux.org>
+# Contributor: judd <jvinet@zeroflux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+
+pkgname=ypbind-mt
+pkgver=1.33
+pkgrel=1
+pkgdesc='Linux NIS daemon'
+arch=('i686' 'x86_64')
+url='http://www.linux-nis.org/nis/ypbind-mt/'
+license=('GPL2')
+depends=('rpcbind' 'openslp')
+backup=('etc/yp.conf' 'etc/conf.d/ypbind')
+source=("ftp://ftp.kernel.org/pub/linux/utils/net/NIS/$pkgname-$pkgver.tar.gz"
+ 'ypbind.conf'
+ 'ypbind')
+sha1sums=('49f578d15aa5d4f4130a2e96cd9c0e519263fc88'
+ '07dee386d001fb9e9e6b76dda8af5b2092e5a4a2'
+ '66f6ea2f622e0724e6017bf835d4f7f4a5bf9534')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ ./configure --prefix=/usr --disable-dbus-nm
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+ install -D -m644 etc/yp.conf "$pkgdir"/etc/yp.conf
+ install -D -m755 ../ypbind "$pkgdir"/etc/rc.d/ypbind
+ install -D -m644 ../ypbind.conf "$pkgdir"/etc/conf.d/ypbind
+ install -d -m755 "$pkgdir"/var/yp/binding
+}
diff --git a/testing/ypbind-mt/ypbind b/testing/ypbind-mt/ypbind
new file mode 100755
index 000000000..5ef5cf5b3
--- /dev/null
+++ b/testing/ypbind-mt/ypbind
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/ypbind
+
+case "$1" in
+ start)
+ stat_busy "Starting NIS Bind Daemon"
+ [ -f /etc/defaultdomain ] && /bin/domainname -F /etc/defaultdomain
+ /usr/sbin/ypbind $YPBIND_ARGS
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon ypbind
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping NIS Bind Daemon"
+ killall -q /usr/sbin/ypbind
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon ypbind
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
diff --git a/testing/ypbind-mt/ypbind.conf b/testing/ypbind-mt/ypbind.conf
new file mode 100644
index 000000000..fd0ebd491
--- /dev/null
+++ b/testing/ypbind-mt/ypbind.conf
@@ -0,0 +1,4 @@
+#
+# Parameters to be passed to ypbind
+#
+YPBIND_ARGS=""
diff --git a/testing/ypserv/PKGBUILD b/testing/ypserv/PKGBUILD
new file mode 100644
index 000000000..4c6e2333b
--- /dev/null
+++ b/testing/ypserv/PKGBUILD
@@ -0,0 +1,36 @@
+# $Id: PKGBUILD 123628 2011-05-11 23:04:51Z bisson $
+# Maintainer: judd <jvinet@zeroflux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+
+pkgname=ypserv
+pkgver=2.25
+pkgrel=1
+pkgdesc='Linux NIS Server'
+arch=('i686' 'x86_64')
+url='http://www.linux-nis.org/nis/ypserv/'
+license=('GPL2')
+depends=('gdbm' 'openslp')
+backup=('etc/ypserv.conf' 'etc/netgroup' 'var/yp/securenets')
+source=("ftp://ftp.kernel.org/pub/linux/utils/net/NIS/$pkgname-$pkgver.tar.gz" \
+ 'yppasswd'
+ 'ypserv')
+sha1sums=('ab997022d25b6374ae21d39f7ff564be028d8736'
+ '96192b628afe36709496e4801d016c4bff343f0e'
+ 'b625381bfa6cf62345377a7df30b8f45935206c5')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+
+ install -D -m644 etc/netgroup "$pkgdir"/etc/netgroup
+ install -D -m644 etc/ypserv.conf "$pkgdir"/etc/ypserv.conf
+ install -D -m644 etc/securenets "$pkgdir"/var/yp/securenets
+ install -D -m755 ../ypserv "$pkgdir"/etc/rc.d/ypserv
+ install -D -m755 ../yppasswd "$pkgdir"/etc/rc.d/yppasswd
+}
diff --git a/testing/ypserv/yppasswd b/testing/ypserv/yppasswd
new file mode 100755
index 000000000..c2b00b2ca
--- /dev/null
+++ b/testing/ypserv/yppasswd
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+ stat_busy "Starting NIS Password Daemon"
+ /usr/sbin/rpc.yppasswdd
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon yppasswd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping NIS Password Daemon"
+ killall -q /usr/sbin/rpc.yppasswdd
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon yppasswd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
diff --git a/testing/ypserv/ypserv b/testing/ypserv/ypserv
new file mode 100755
index 000000000..c36e6901b
--- /dev/null
+++ b/testing/ypserv/ypserv
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+ stat_busy "Starting NIS Server"
+ /usr/sbin/ypserv
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon ypserv
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping NIS Server"
+ killall -q /usr/sbin/ypserv
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon ypserv
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac