summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/gnucash/PKGBUILD38
-rw-r--r--testing/gnucash/gnucash.install34
-rw-r--r--testing/libofx/PKGBUILD44
-rw-r--r--testing/libofx/libofx-gcc47.patch11
-rw-r--r--testing/libxml2/PKGBUILD38
-rw-r--r--testing/lvm2/lvm-on-crypt.service16
-rw-r--r--testing/net-tools/Makefile.patch17
-rw-r--r--testing/network-manager-applet/PKGBUILD38
-rw-r--r--testing/network-manager-applet/network-manager-applet.install18
-rw-r--r--testing/networkmanager-openconnect/PKGBUILD31
-rw-r--r--testing/networkmanager-openconnect/networkmanager-openconnect.install16
-rw-r--r--testing/networkmanager-openvpn/PKGBUILD31
-rw-r--r--testing/networkmanager-openvpn/networkmanager-openvpn.install11
-rw-r--r--testing/networkmanager-pptp/PKGBUILD31
-rw-r--r--testing/networkmanager-pptp/networkmanager-pptp.install11
-rw-r--r--testing/networkmanager-vpnc/PKGBUILD31
-rw-r--r--testing/networkmanager-vpnc/networkmanager-vpnc.install11
-rw-r--r--testing/networkmanager/NetworkManager.conf2
-rw-r--r--testing/networkmanager/PKGBUILD72
-rw-r--r--testing/networkmanager/disable_set_hostname.patch19
-rw-r--r--testing/networkmanager/dnsmasq-path.patch30
-rw-r--r--testing/networkmanager/networkmanager.install9
-rw-r--r--testing/networkmanager/systemd-fallback.patch470
-rw-r--r--testing/perl/0001-Append-CFLAGS-and-LDFLAGS-to-their-Config.pm-counter.patch83
-rw-r--r--testing/perl/ChangeLog66
-rw-r--r--testing/perl/PKGBUILD116
-rw-r--r--testing/perl/digest_eval_hole.diff61
-rw-r--r--testing/perl/fix-h2ph-and-tests.patch104
-rw-r--r--testing/perl/perl.install10
-rw-r--r--testing/perl/perlbin.csh15
-rwxr-xr-xtesting/perl/perlbin.sh18
-rw-r--r--testing/perl/provides.pl299
-rw-r--r--testing/systemd/0001-shutdown-recursively-mark-root-as-private-before-piv.patch31
-rw-r--r--testing/systemd/0001-systemctl-fix-issue-with-systemctl-daemon-reexec.patch73
-rw-r--r--testing/xorg-server/10-quirks.conf10
-rw-r--r--testing/xorg-server/PKGBUILD190
-rw-r--r--testing/xorg-server/autoconfig-nvidia.patch28
-rw-r--r--testing/xorg-server/autoconfig-sis.patch21
-rw-r--r--testing/xorg-server/xvfb-run180
-rw-r--r--testing/xorg-server/xvfb-run.1282
40 files changed, 2616 insertions, 0 deletions
diff --git a/testing/gnucash/PKGBUILD b/testing/gnucash/PKGBUILD
new file mode 100644
index 000000000..23745c948
--- /dev/null
+++ b/testing/gnucash/PKGBUILD
@@ -0,0 +1,38 @@
+# $Id: PKGBUILD 165082 2012-08-10 05:02:38Z eric $
+# Maintainer: Aaron Griffin <aaron@archlinux.org>
+# Contributor: Mark Schneider <queueRAM@gmail.com>
+
+pkgname=gnucash
+pkgver=2.4.11
+pkgrel=1
+pkgdesc="A personal and small-business financial-accounting application"
+arch=('i686' 'x86_64')
+url="http://www.gnucash.org"
+license=("GPL")
+depends=('gtkhtml' 'slib' 'goffice' 'libgnomeui' 'libdbi-drivers' 'aqbanking' 'desktop-file-utils')
+makedepends=('intltool')
+optdepends=('evince: for print preview'
+ 'perl-finance-quote: for stock information lookups'
+ 'perl-date-manip: for stock information lookups')
+options=('!libtool' '!makeflags' '!emptydirs')
+install=gnucash.install
+source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.bz2)
+sha1sums=('c157ad7ea0960c71966f5071acd9018580ece538')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc \
+ --libexecdir=/usr/lib --disable-schemas-install --enable-ofx --enable-aqbanking
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install
+ cd src/doc/design
+ make DESTDIR="${pkgdir}" install-info
+
+ install -dm755 "${pkgdir}/usr/share/gconf/schemas"
+ gconf-merge-schema "${pkgdir}/usr/share/gconf/schemas/${pkgname}.schemas" --domain gnucash "${pkgdir}"/etc/gconf/schemas/*.schemas
+ rm -f "${pkgdir}"/etc/gconf/schemas/*.schemas
+}
diff --git a/testing/gnucash/gnucash.install b/testing/gnucash/gnucash.install
new file mode 100644
index 000000000..d6a48c31b
--- /dev/null
+++ b/testing/gnucash/gnucash.install
@@ -0,0 +1,34 @@
+pkgname=gnucash
+info_dir=usr/share/info
+info_files=(gnucash-design.info)
+
+post_install() {
+ usr/sbin/gconfpkg --install ${pkgname}
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+ update-desktop-database -q
+ [ -x usr/bin/install-info ] || return 0
+ for f in ${info_files[@]}; do
+ usr/bin/install-info ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null
+ done
+}
+
+pre_upgrade() {
+ pre_remove $1
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ usr/sbin/gconfpkg --uninstall ${pkgname}
+ [ -x usr/bin/install-info ] || return 0
+ for f in ${info_files[@]}; do
+ usr/bin/install-info --delete ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null
+ done
+}
+
+post_remove() {
+ update-desktop-database -q
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+}
diff --git a/testing/libofx/PKGBUILD b/testing/libofx/PKGBUILD
new file mode 100644
index 000000000..218fa0cd3
--- /dev/null
+++ b/testing/libofx/PKGBUILD
@@ -0,0 +1,44 @@
+# $Id: PKGBUILD 165083 2012-08-10 05:02:43Z eric $
+# Maintainer: Aaron Griffin <aaron@archlinux.org>
+
+pkgbase=libofx
+pkgname=('libofx' 'libofx-doc')
+pkgver=0.9.5
+pkgrel=1
+pkgdesc="API for the OFX banking standard"
+arch=('i686' 'x86_64')
+url="http://libofx.sourceforge.net"
+license=('GPL')
+depends=('opensp' 'curl' 'libxml++')
+checkdepends=('gnupg')
+source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz libofx-gcc47.patch)
+sha1sums=('7e5245d68a0f3f7efad2fd809b2afbbff6ba0e73'
+ '6c327e24543cb8ba901bfb204343a85c68264654')
+
+build() {
+ cd "$srcdir/$pkgbase-$pkgver"
+ patch -p1 -i "$srcdir/libofx-gcc47.patch"
+ ./configure --prefix=/usr
+ make
+}
+
+check() {
+ cd "$srcdir/$pkgbase-$pkgver"
+ make check
+}
+
+package_libofx() {
+ options=('!libtool' '!docs')
+
+ cd "$srcdir/$pkgbase-$pkgver"
+ make DESTDIR="$pkgdir" install
+}
+
+package_libofx-doc() {
+ pkgdesc="Documention of the OFX banking standard API"
+ depends=()
+
+ cd "$srcdir/$pkgbase-$pkgver"
+ make DESTDIR="$pkgdir" install-docDATA
+ make -C doc DESTDIR="$pkgdir" install
+}
diff --git a/testing/libofx/libofx-gcc47.patch b/testing/libofx/libofx-gcc47.patch
new file mode 100644
index 000000000..899fe09e0
--- /dev/null
+++ b/testing/libofx/libofx-gcc47.patch
@@ -0,0 +1,11 @@
+diff -Nru libofx-0.9.4/debian/patches/fix-ftbfs-gcc4.7.diff libofx-0.9.4/debian/patches/fix-ftbfs-gcc4.7.diff
+--- libofx-0.9.4.orig/ofxconnect/ofxpartner.cpp 2011-03-30 22:30:50.000000000 +0000
++++ libofx-0.9.4/ofxconnect/ofxpartner.cpp 2012-04-17 06:08:38.711940892 +0000
+@@ -37,6 +37,7 @@
+ #include <vector>
+ #include <algorithm>
+ #include <string.h>
++#include <unistd.h>
+
+ using std::string;
+ using std::vector;
diff --git a/testing/libxml2/PKGBUILD b/testing/libxml2/PKGBUILD
new file mode 100644
index 000000000..38700a682
--- /dev/null
+++ b/testing/libxml2/PKGBUILD
@@ -0,0 +1,38 @@
+# $Id: PKGBUILD 165055 2012-08-09 21:18:17Z jgc $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: John Proctor <jproctor@prium.net>
+
+pkgname=libxml2
+pkgver=2.8.0
+pkgrel=1
+pkgdesc="XML parsing library, version 2"
+arch=(i686 x86_64)
+license=('custom')
+depends=('zlib>=1.2.4' 'readline>=6.1' 'ncurses>=5.7' 'xz')
+makedepends=('python2')
+options=('!libtool')
+url="http://www.xmlsoft.org/"
+source=(ftp://ftp.xmlsoft.org/${pkgname}/${pkgname}-${pkgver}.tar.gz
+ http://www.w3.org/XML/Test/xmlts20080205.tar.gz)
+md5sums=('c62106f02ee00b6437f0fb9d370c1093'
+ 'b255be9a1c7f7021e52448e4ec8d7a0d')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ sed -e 's|/usr/bin/python -u|/usr/bin/python2 -u|g' -e 's|/usr/bin/python$|/usr/bin/python2|g' -i python/tests/*.py
+ ./configure --prefix=/usr --with-threads --with-history \
+ --with-python=/usr/bin/python2
+ make
+}
+
+check() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ mv "${srcdir}/xmlconf" .
+ make check
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
+}
diff --git a/testing/lvm2/lvm-on-crypt.service b/testing/lvm2/lvm-on-crypt.service
new file mode 100644
index 000000000..4ade6c5b0
--- /dev/null
+++ b/testing/lvm2/lvm-on-crypt.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=LVM activation of encrypted devices
+DefaultDependencies=no
+Requires=systemd-udev-settle.service
+After=systemd-udev-settle.service cryptsetup.target
+Before=shutdown.target
+Conflicts=shutdown.target
+
+[Service]
+ExecStart=/sbin/vgchange --sysinit --available y
+Type=oneshot
+TimeoutSec=0
+RemainAfterExit=yes
+
+[Install]
+WantedBy=basic.target
diff --git a/testing/net-tools/Makefile.patch b/testing/net-tools/Makefile.patch
new file mode 100644
index 000000000..aaacd6b78
--- /dev/null
+++ b/testing/net-tools/Makefile.patch
@@ -0,0 +1,17 @@
+--- Makefile.old 2012-08-07 22:07:58.235437087 +0200
++++ Makefile 2012-08-07 22:10:21.192104345 +0200
+@@ -239,12 +239,12 @@
+ install -m 0755 -d ${BASEDIR}/bin
+ install -m 0755 arp ${BASEDIR}/sbin
+ install -m 0755 hostname ${BASEDIR}/bin
+- install -m 0755 ifconfig ${BASEDIR}/bin
++ install -m 0755 ifconfig ${BASEDIR}/sbin
+ install -m 0755 nameif ${BASEDIR}/sbin
+ install -m 0755 netstat ${BASEDIR}/bin
+ install -m 0755 plipconfig $(BASEDIR)/sbin
+ install -m 0755 rarp ${BASEDIR}/sbin
+- install -m 0755 route ${BASEDIR}/bin
++ install -m 0755 route ${BASEDIR}/sbin
+ install -m 0755 slattach $(BASEDIR)/sbin
+ ifeq ($(HAVE_IP_TOOLS),1)
+ install -m 0755 ipmaddr $(BASEDIR)/sbin
diff --git a/testing/network-manager-applet/PKGBUILD b/testing/network-manager-applet/PKGBUILD
new file mode 100644
index 000000000..ff89e15c3
--- /dev/null
+++ b/testing/network-manager-applet/PKGBUILD
@@ -0,0 +1,38 @@
+# $Id: PKGBUILD 165064 2012-08-09 22:48:27Z heftig $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: Arjan Timmerman <arjan@archlinux.org>
+# Contributor: Wael Nasreddine <gandalf@siemens-mobiles.org>
+# Contributor: Tor Krill <tor@krill.nu>
+# Contributor: Will Rea <sillywilly@gmail.com>
+
+pkgname=network-manager-applet
+pkgver=0.9.6.2
+pkgrel=1
+pkgdesc="GNOME frontends to NetWorkmanager"
+arch=('i686' 'x86_64')
+license=('GPL')
+url="http://www.gnome.org/projects/NetworkManager/"
+depends=("networkmanager>=${pkgver::5}" 'libgnome-keyring' 'polkit-gnome' 'gtk3' 'libnotify'
+ 'gnome-icon-theme' 'mobile-broadband-provider-info' 'iso-codes')
+makedepends=('intltool' 'gnome-bluetooth')
+optdepends=('gnome-bluetooth: for PAN/DUN support')
+options=('!libtool' '!emptydirs')
+install=network-manager-applet.install
+source=(http://ftp.gnome.org/pub/GNOME/sources/$pkgname/0.9/$pkgname-$pkgver.tar.xz)
+sha256sums=('96c79ce199fe7770b66f2ddc5ee0a4b07a0ea1eaf5e2186b78d8dd69e38a3069')
+
+build() {
+ cd ${pkgname}-${pkgver}
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --localstatedir=/var \
+ --libexecdir=/usr/lib/networkmanager \
+ --disable-static \
+ --disable-maintainer-mode \
+ --disable-migration
+ make
+}
+
+package() {
+ cd ${pkgname}-${pkgver}
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/testing/network-manager-applet/network-manager-applet.install b/testing/network-manager-applet/network-manager-applet.install
new file mode 100644
index 000000000..255ea1f9a
--- /dev/null
+++ b/testing/network-manager-applet/network-manager-applet.install
@@ -0,0 +1,18 @@
+post_install() {
+ glib-compile-schemas /usr/share/glib-2.0/schemas
+ gtk-update-icon-cache -f -q -t /usr/share/icons/hicolor
+}
+
+pre_upgrade() {
+ if (( $(vercmp $2 0.9.6.0) < 0 )); then
+ gconfpkg --uninstall network-manager-applet
+ fi
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/testing/networkmanager-openconnect/PKGBUILD b/testing/networkmanager-openconnect/PKGBUILD
new file mode 100644
index 000000000..48d521bcf
--- /dev/null
+++ b/testing/networkmanager-openconnect/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 165062 2012-08-09 22:47:07Z heftig $
+# Maintainer: Ionut Biru <ibiru@archlinux.org>
+
+pkgname=networkmanager-openconnect
+pkgver=0.9.6.2
+pkgrel=1
+pkgdesc="NetworkManager VPN integration for openconnect"
+arch=('i686' 'x86_64')
+license=('GPL')
+url="http://www.gnome.org/projects/NetworkManager/"
+depends=("networkmanager>=${pkgver::5}" 'openconnect' 'gconf' 'libgnome-keyring')
+makedepends=('intltool')
+optdepends=('network-manager-applet: GNOME frontends to NetWorkmanager')
+options=('!libtool')
+install=$pkgname.install
+source=(http://ftp.gnome.org/pub/GNOME/sources/NetworkManager-openconnect/0.9/NetworkManager-openconnect-${pkgver}.tar.xz)
+sha256sums=('3f53d87dbeb00fc841ef5981e6f1a1a192c65d273386246d48245cca84fa41b0')
+
+build() {
+ cd NetworkManager-openconnect-${pkgver}
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --libexecdir=/usr/lib/networkmanager \
+ --disable-static
+ make
+}
+
+package() {
+ cd NetworkManager-openconnect-${pkgver}
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/testing/networkmanager-openconnect/networkmanager-openconnect.install b/testing/networkmanager-openconnect/networkmanager-openconnect.install
new file mode 100644
index 000000000..7bd4d44f9
--- /dev/null
+++ b/testing/networkmanager-openconnect/networkmanager-openconnect.install
@@ -0,0 +1,16 @@
+pkgname=networkmanager-openconnect
+
+post_install() {
+ getent group nm-openconnect >/dev/null 2>&1 || groupadd -g 104 nm-openconnect
+ getent passwd nm-openconnect > /dev/null 2>&1 || useradd -u 104 -s /sbin/nologin -d / -M -c 'NetworkManager user for OpenConnect' -g nm-openconnect nm-openconnect
+ passwd -l nm-openconnect > /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ getent passwd nm-openconnect >/dev/null 2>&1 && userdel nm-openconnect
+ getent group nm-openconnect >/dev/null 2>&1 && groupdel nm-openconnect
+}
diff --git a/testing/networkmanager-openvpn/PKGBUILD b/testing/networkmanager-openvpn/PKGBUILD
new file mode 100644
index 000000000..16f27e614
--- /dev/null
+++ b/testing/networkmanager-openvpn/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 164976 2012-08-07 18:09:27Z heftig $
+# Maintainer: Ionut Biru <ibiru@archlinux.org>
+
+pkgname=networkmanager-openvpn
+pkgver=0.9.6.0
+pkgrel=1
+pkgdesc="NetworkManager VPN plugin for OpenVPN"
+arch=('i686' 'x86_64')
+license=('GPL')
+url="http://www.gnome.org/projects/NetworkManager/"
+depends=("networkmanager>=${pkgver}" 'openvpn' 'gtk3' 'libgnome-keyring')
+makedepends=('intltool')
+optdepends=('network-manager-applet: GNOME frontends to NetWorkmanager')
+install=networkmanager-openvpn.install
+options=('!libtool')
+source=(http://ftp.gnome.org/pub/GNOME/sources/NetworkManager-openvpn/0.9/NetworkManager-openvpn-${pkgver}.tar.xz)
+sha256sums=('8fb88705793399574b3de2af93f87b63c0eae342d549a1c79bc59f6a1fad87a3')
+
+build() {
+ cd NetworkManager-openvpn-${pkgver}
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --libexecdir=/usr/lib/networkmanager \
+ --disable-static
+ make
+}
+
+package() {
+ cd NetworkManager-openvpn-${pkgver}
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/testing/networkmanager-openvpn/networkmanager-openvpn.install b/testing/networkmanager-openvpn/networkmanager-openvpn.install
new file mode 100644
index 000000000..931c0517c
--- /dev/null
+++ b/testing/networkmanager-openvpn/networkmanager-openvpn.install
@@ -0,0 +1,11 @@
+post_install() {
+ gtk-update-icon-cache -f -q -t /usr/share/icons/hicolor
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ post_install $1
+}
diff --git a/testing/networkmanager-pptp/PKGBUILD b/testing/networkmanager-pptp/PKGBUILD
new file mode 100644
index 000000000..b4f975a2c
--- /dev/null
+++ b/testing/networkmanager-pptp/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 164977 2012-08-07 18:10:19Z heftig $
+# Maintainer: Ionut Biru <ibiru@archlinux.org>
+
+pkgname=networkmanager-pptp
+pkgver=0.9.6.0
+pkgrel=1
+pkgdesc="NetworkManager VPN plugin for pptp "
+arch=('i686' 'x86_64')
+license=('GPL')
+url="http://www.gnome.org/projects/NetworkManager/"
+depends=("networkmanager>=${pkgver}" 'pptpclient' 'gtk3' 'libgnome-keyring')
+makedepends=('intltool')
+optdepends=('network-manager-applet: GNOME frontends to NetWorkmanager')
+options=('!libtool')
+install=networkmanager-pptp.install
+source=(http://ftp.gnome.org/pub/GNOME/sources/NetworkManager-pptp/0.9/NetworkManager-pptp-${pkgver}.tar.xz)
+sha256sums=('a84cbbf24827229e3dd3611bbde191398275c3b7ecd03913047197644f27a2b4')
+
+build() {
+ cd NetworkManager-pptp-${pkgver}
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --libexecdir=/usr/lib/networkmanager \
+ --disable-static
+ make
+}
+
+package() {
+ cd NetworkManager-pptp-${pkgver}
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/testing/networkmanager-pptp/networkmanager-pptp.install b/testing/networkmanager-pptp/networkmanager-pptp.install
new file mode 100644
index 000000000..931c0517c
--- /dev/null
+++ b/testing/networkmanager-pptp/networkmanager-pptp.install
@@ -0,0 +1,11 @@
+post_install() {
+ gtk-update-icon-cache -f -q -t /usr/share/icons/hicolor
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ post_install $1
+}
diff --git a/testing/networkmanager-vpnc/PKGBUILD b/testing/networkmanager-vpnc/PKGBUILD
new file mode 100644
index 000000000..db34ef9c2
--- /dev/null
+++ b/testing/networkmanager-vpnc/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 164978 2012-08-07 18:11:11Z heftig $
+# Maintainer: Ionut Biru <ibiru@archlinux.org>
+
+pkgname=networkmanager-vpnc
+pkgver=0.9.6.0
+pkgrel=1
+pkgdesc="NetworkManager VPN plugin for vpnc"
+arch=('i686' 'x86_64')
+license=('GPL')
+url="http://www.gnome.org/projects/NetworkManager/"
+depends=("networkmanager>=${pkgver}" 'vpnc' 'hicolor-icon-theme' 'gtk3' 'libgnome-keyring')
+makedepends=('intltool')
+optdepends=('network-manager-applet: GNOME frontends to NetWorkmanager')
+options=('!libtool')
+install=networkmanager-vpnc.install
+source=(http://ftp.gnome.org/pub/GNOME/sources/NetworkManager-vpnc/0.9/NetworkManager-vpnc-${pkgver}.tar.xz)
+sha256sums=('6c8e35862330e17ee8f4dc44b1ac47470da703e436d339c7b3e2dac7d1b148a2')
+
+build() {
+ cd NetworkManager-vpnc-${pkgver}
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --libexecdir=/usr/lib/networkmanager \
+ --disable-static
+ make
+}
+
+package() {
+ cd NetworkManager-vpnc-${pkgver}
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/testing/networkmanager-vpnc/networkmanager-vpnc.install b/testing/networkmanager-vpnc/networkmanager-vpnc.install
new file mode 100644
index 000000000..931c0517c
--- /dev/null
+++ b/testing/networkmanager-vpnc/networkmanager-vpnc.install
@@ -0,0 +1,11 @@
+post_install() {
+ gtk-update-icon-cache -f -q -t /usr/share/icons/hicolor
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ post_install $1
+}
diff --git a/testing/networkmanager/NetworkManager.conf b/testing/networkmanager/NetworkManager.conf
new file mode 100644
index 000000000..c37b59680
--- /dev/null
+++ b/testing/networkmanager/NetworkManager.conf
@@ -0,0 +1,2 @@
+[main]
+plugins=keyfile
diff --git a/testing/networkmanager/PKGBUILD b/testing/networkmanager/PKGBUILD
new file mode 100644
index 000000000..e4c927db3
--- /dev/null
+++ b/testing/networkmanager/PKGBUILD
@@ -0,0 +1,72 @@
+# $Id: PKGBUILD 164974 2012-08-07 18:07:41Z heftig $
+# Maintainer: Jan de Groot <jgc@archlinxu.org>
+# Contributor: Wael Nasreddine <gandalf@siemens-mobiles.org>
+# Contributor: Tor Krill <tor@krill.nu>
+# Contributor: Will Rea <sillywilly@gmail.com>
+# Contributor: Valentine Sinitsyn <e_val@inbox.ru>
+
+pkgname=networkmanager
+_pkgname=NetworkManager
+pkgver=0.9.6.0
+pkgrel=1
+pkgdesc="Network Management daemon"
+arch=('i686' 'x86_64')
+license=('GPL')
+url="http://www.gnome.org/projects/$_pkgname/"
+depends=('dbus-glib' 'iproute2' 'libnl' 'nss' 'polkit' 'udev' 'wpa_supplicant' 'ppp' 'dhcpcd'
+ 'libsoup')
+makedepends=('intltool' 'dhclient' 'iptables' 'gobject-introspection')
+optdepends=('modemmanager: for modem management service'
+ 'dhclient: alternative DHCP/DHCPv6 client'
+ 'iptables: Connection sharing'
+ 'dnsmasq: Connection sharing'
+ 'bluez: Bluetooth support'
+ 'openresolv: openresolv support')
+options=('!libtool')
+backup=('etc/NetworkManager/NetworkManager.conf')
+install=networkmanager.install
+source=(http://ftp.gnome.org/pub/gnome/sources/$_pkgname/${pkgver:0:3}/$_pkgname-$pkgver.tar.xz
+ NetworkManager.conf disable_set_hostname.patch dnsmasq-path.patch)
+sha256sums=('3982b623b7b199ac99e2ddd0840fe7d088245a49e3f680237e8baebf0cf86d07'
+ '44b048804c7c0b8b3b0c29b8632b6ad613c397d0a1635ec918e10c0fbcdadf21'
+ '25056837ea92e559f09563ed817e3e0cd9333be861b8914e45f62ceaae2e0460'
+ '65124505048cc8396daf0242c9f5d532fa669b4bbca305998c248ab2329490cb')
+
+build() {
+ cd $_pkgname-$pkgver
+
+ patch -Np1 -i ../disable_set_hostname.patch
+ patch -Np1 -i ../dnsmasq-path.patch
+
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --libexecdir=/usr/lib/networkmanager \
+ --with-crypto=nss \
+ --with-distro=arch \
+ --with-dhclient=/usr/sbin/dhclient \
+ --with-dhcpcd=/sbin/dhcpcd \
+ --with-iptables=/usr/sbin/iptables \
+ --with-systemdsystemunitdir=/usr/lib/systemd/system \
+ --with-udev-dir=/usr/lib/udev \
+ --with-resolvconf=/usr/sbin/resolvconf \
+ --with-session-tracking=ck \
+ --disable-static \
+ --enable-more-warnings=no \
+ --disable-wimax
+
+ make
+}
+
+package() {
+ cd $_pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
+
+ install -m644 ../NetworkManager.conf "$pkgdir/etc/NetworkManager/"
+
+ rm -r "$pkgdir/var/run"
+
+ # Provide native service for arch-daemons generator
+ ln -s NetworkManager.service "$pkgdir/usr/lib/systemd/system/networkmanager.service"
+}
diff --git a/testing/networkmanager/disable_set_hostname.patch b/testing/networkmanager/disable_set_hostname.patch
new file mode 100644
index 000000000..ee95dd0e1
--- /dev/null
+++ b/testing/networkmanager/disable_set_hostname.patch
@@ -0,0 +1,19 @@
+diff -Nur NetworkManager-0.9.0.orig/src/nm-policy.c NetworkManager-0.9.0/src/nm-policy.c
+--- NetworkManager-0.9.0.orig/src/nm-policy.c 2011-08-23 06:41:02.099686450 +0000
++++ NetworkManager-0.9.0/src/nm-policy.c 2011-08-23 06:43:38.227791737 +0000
+@@ -302,6 +302,7 @@
+ return;
+ }
+
++#if 0
+ /* Try automatically determined hostname from the best device's IP config */
+ if (!best4)
+ best4 = get_best_ip4_device (policy->manager, &best_req4);
+@@ -356,6 +357,7 @@
+ }
+ }
+
++#endif
+ /* If no automatically-configured hostname, try using the hostname from
+ * when NM started up.
+ */
diff --git a/testing/networkmanager/dnsmasq-path.patch b/testing/networkmanager/dnsmasq-path.patch
new file mode 100644
index 000000000..c0e713266
--- /dev/null
+++ b/testing/networkmanager/dnsmasq-path.patch
@@ -0,0 +1,30 @@
+diff -u -r NetworkManager-0.9.2.0/src/dns-manager/nm-dns-dnsmasq.c NetworkManager-0.9.2.0-dnsmasq/src/dns-manager/nm-dns-dnsmasq.c
+--- NetworkManager-0.9.2.0/src/dns-manager/nm-dns-dnsmasq.c 2011-10-10 23:38:20.000000000 +0200
++++ NetworkManager-0.9.2.0-dnsmasq/src/dns-manager/nm-dns-dnsmasq.c 2012-03-06 09:07:24.137460927 +0100
+@@ -52,8 +52,11 @@
+ find_dnsmasq (void)
+ {
+ static const char *paths[] = {
++ "/usr/local/bin/dnsmasq",
+ "/usr/local/sbin/dnsmasq",
++ "/usr/bin/dnsmasq",
+ "/usr/sbin/dnsmasq",
++ "/bin/dnsmasq",
+ "/sbin/dnsmasq",
+ NULL
+ };
+diff -u -r NetworkManager-0.9.2.0/src/dnsmasq-manager/nm-dnsmasq-manager.c NetworkManager-0.9.2.0-dnsmasq/src/dnsmasq-manager/nm-dnsmasq-manager.c
+--- NetworkManager-0.9.2.0/src/dnsmasq-manager/nm-dnsmasq-manager.c 2011-04-19 07:06:22.000000000 +0200
++++ NetworkManager-0.9.2.0-dnsmasq/src/dnsmasq-manager/nm-dnsmasq-manager.c 2012-03-06 09:07:58.603851818 +0100
+@@ -170,8 +170,11 @@
+ nm_find_dnsmasq (void)
+ {
+ static const char *dnsmasq_binary_paths[] = {
++ "/usr/local/bin/dnsmasq",
+ "/usr/local/sbin/dnsmasq",
++ "/usr/bin/dnsmasq",
+ "/usr/sbin/dnsmasq",
++ "/bin/dnsmasq",
+ "/sbin/dnsmasq",
+ NULL
+ };
diff --git a/testing/networkmanager/networkmanager.install b/testing/networkmanager/networkmanager.install
new file mode 100644
index 000000000..de40c17ed
--- /dev/null
+++ b/testing/networkmanager/networkmanager.install
@@ -0,0 +1,9 @@
+post_upgrade() {
+ (( $(vercmp 0.8.3 $2) > 0 )) && cat <<MSG
+ATTENTION:
+ /etc/NetworkManager/nm-system-settings.conf has been replaced
+ by /etc/NetworkManager/NetworkManager.conf. Make sure you move
+ any custom settings to the new config file.
+MSG
+ true
+}
diff --git a/testing/networkmanager/systemd-fallback.patch b/testing/networkmanager/systemd-fallback.patch
new file mode 100644
index 000000000..f5acc9dc6
--- /dev/null
+++ b/testing/networkmanager/systemd-fallback.patch
@@ -0,0 +1,470 @@
+diff -u -Nr NetworkManager-0.9.3.995/configure.ac NetworkManager-0.9.3.995-systemd-fallback/configure.ac
+--- NetworkManager-0.9.3.995/configure.ac 2012-03-02 01:05:21.000000000 +0100
++++ NetworkManager-0.9.3.995-systemd-fallback/configure.ac 2012-03-06 16:55:58.294793902 +0100
+@@ -344,7 +344,7 @@
+ case $with_session_tracking in
+ ck|none) ;;
+ systemd)
+- PKG_CHECK_MODULES(SYSTEMD, [libsystemd-login])
++ PKG_CHECK_MODULES(SYSTEMD, [libsystemd-daemon libsystemd-login])
+ ;;
+ *)
+ AC_MSG_ERROR(--with-session-tracking must be one of [none, ck, systemd])
+diff -u -Nr NetworkManager-0.9.3.995/src/nm-session-monitor-systemd.c NetworkManager-0.9.3.995-systemd-fallback/src/nm-session-monitor-systemd.c
+--- NetworkManager-0.9.3.995/src/nm-session-monitor-systemd.c 2012-02-27 16:57:16.000000000 +0100
++++ NetworkManager-0.9.3.995-systemd-fallback/src/nm-session-monitor-systemd.c 2012-03-06 16:55:01.285264295 +0100
+@@ -28,6 +28,10 @@
+ #include <glib/gstdio.h>
+ #include <systemd/sd-login.h>
+ #include <stdlib.h>
++#include <systemd/sd-daemon.h>
++#include <sys/stat.h>
++#include <gio/gio.h>
++#include "nm-logging.h"
+
+ #include "nm-session-utils.h"
+ #include "nm-session-monitor.h"
+@@ -107,10 +111,20 @@
+ return source;
+ }
+
++/********************************************************************/
++
++#define CKDB_PATH "/var/run/ConsoleKit/database"
++
+ struct _NMSessionMonitor {
+ GObject parent_instance;
+
+ GSource *sd_source;
++
++ GKeyFile *database;
++ GFileMonitor *database_monitor;
++ time_t database_mtime;
++ GHashTable *sessions_by_uid;
++ GHashTable *sessions_by_user;
+ };
+
+ struct _NMSessionMonitorClass {
+@@ -130,6 +144,215 @@
+
+ /* ---------------------------------------------------------------------------------------------------- */
+
++typedef struct {
++ char *user;
++ uid_t uid;
++ gboolean local;
++ gboolean active;
++} Session;
++
++static void
++session_free (Session *s)
++{
++ g_free (s->user);
++ memset (s, 0, sizeof (Session));
++ g_free (s);
++}
++
++static gboolean
++check_key (GKeyFile *keyfile, const char *group, const char *key, GError **error)
++{
++ if (g_key_file_has_key (keyfile, group, key, error))
++ return TRUE;
++
++ if (!error) {
++ g_set_error (error,
++ NM_SESSION_MONITOR_ERROR,
++ NM_SESSION_MONITOR_ERROR_MALFORMED_DATABASE,
++ "ConsoleKit database " CKDB_PATH " group '%s' had no '%s' key",
++ group, key);
++ }
++ return FALSE;
++}
++
++static Session *
++session_new (GKeyFile *keyfile, const char *group, GError **error)
++{
++ GError *local = NULL;
++ Session *s;
++ const char *uname = NULL;
++
++ s = g_new0 (Session, 1);
++ g_assert (s);
++
++ s->uid = G_MAXUINT; /* paranoia */
++ if (!check_key (keyfile, group, "uid", &local))
++ goto error;
++ s->uid = (uid_t) g_key_file_get_integer (keyfile, group, "uid", &local);
++ if (local)
++ goto error;
++
++ if (!check_key (keyfile, group, "is_active", &local))
++ goto error;
++ s->active = g_key_file_get_boolean (keyfile, group, "is_active", &local);
++ if (local)
++ goto error;
++
++ if (!check_key (keyfile, group, "is_local", &local))
++ goto error;
++ s->local = g_key_file_get_boolean (keyfile, group, "is_local", &local);
++ if (local)
++ goto error;
++
++ if (!nm_session_uid_to_user (s->uid, &uname, error))
++ return FALSE;
++ s->user = g_strdup (uname);
++
++ return s;
++
++error:
++ session_free (s);
++ g_propagate_error (error, local);
++ return NULL;
++}
++
++static void
++session_merge (Session *src, Session *dest)
++{
++ g_return_if_fail (src != NULL);
++ g_return_if_fail (dest != NULL);
++
++ g_warn_if_fail (g_strcmp0 (src->user, dest->user) == 0);
++ g_warn_if_fail (src->uid == dest->uid);
++
++ dest->local = (dest->local || src->local);
++ dest->active = (dest->active || src->active);
++}
++
++/********************************************************************/
++
++static void
++free_database (NMSessionMonitor *self)
++{
++ if (self->database != NULL) {
++ g_key_file_free (self->database);
++ self->database = NULL;
++ }
++
++ g_hash_table_remove_all (self->sessions_by_uid);
++ g_hash_table_remove_all (self->sessions_by_user);
++}
++
++static gboolean
++reload_database (NMSessionMonitor *self, GError **error)
++{
++ struct stat statbuf;
++ char **groups = NULL;
++ gsize len = 0, i;
++ Session *s;
++
++ free_database (self);
++
++ errno = 0;
++ if (stat (CKDB_PATH, &statbuf) != 0) {
++ g_set_error (error,
++ NM_SESSION_MONITOR_ERROR,
++ errno == ENOENT ? NM_SESSION_MONITOR_ERROR_NO_DATABASE : NM_SESSION_MONITOR_ERROR_IO_ERROR,
++ "Error statting file " CKDB_PATH ": %s",
++ strerror (errno));
++ goto error;
++ }
++ self->database_mtime = statbuf.st_mtime;
++
++ self->database = g_key_file_new ();
++ if (!g_key_file_load_from_file (self->database, CKDB_PATH, G_KEY_FILE_NONE, error))
++ goto error;
++
++ groups = g_key_file_get_groups (self->database, &len);
++ if (!groups) {
++ g_set_error_literal (error,
++ NM_SESSION_MONITOR_ERROR,
++ NM_SESSION_MONITOR_ERROR_IO_ERROR,
++ "Could not load groups from " CKDB_PATH "");
++ goto error;
++ }
++
++ for (i = 0; i < len; i++) {
++ Session *found;
++
++ if (!g_str_has_prefix (groups[i], "Session "))
++ continue;
++
++ s = session_new (self->database, groups[i], error);
++ if (!s)
++ goto error;
++
++ found = g_hash_table_lookup (self->sessions_by_user, (gpointer) s->user);
++ if (found) {
++ session_merge (s, found);
++ session_free (s);
++ } else {
++ /* Entirely new user */
++ g_hash_table_insert (self->sessions_by_user, (gpointer) s->user, s);
++ g_hash_table_insert (self->sessions_by_uid, GUINT_TO_POINTER (s->uid), s);
++ }
++ }
++
++ g_strfreev (groups);
++ return TRUE;
++
++error:
++ if (groups)
++ g_strfreev (groups);
++ free_database (self);
++ return FALSE;
++}
++
++static gboolean
++ensure_database (NMSessionMonitor *self, GError **error)
++{
++ gboolean ret = FALSE;
++
++ if (self->database != NULL) {
++ struct stat statbuf;
++
++ errno = 0;
++ if (stat (CKDB_PATH, &statbuf) != 0) {
++ g_set_error (error,
++ NM_SESSION_MONITOR_ERROR,
++ errno == ENOENT ? NM_SESSION_MONITOR_ERROR_NO_DATABASE : NM_SESSION_MONITOR_ERROR_IO_ERROR,
++ "Error statting file " CKDB_PATH " to check timestamp: %s",
++ strerror (errno));
++ goto out;
++ }
++
++ if (statbuf.st_mtime == self->database_mtime) {
++ ret = TRUE;
++ goto out;
++ }
++ }
++
++ ret = reload_database (self, error);
++
++out:
++ return ret;
++}
++
++static void
++on_file_monitor_changed (GFileMonitor * file_monitor,
++ GFile * file,
++ GFile * other_file,
++ GFileMonitorEvent event_type,
++ gpointer user_data)
++{
++ NMSessionMonitor *self = NM_SESSION_MONITOR (user_data);
++
++ /* throw away cache */
++ free_database (self);
++
++ g_signal_emit (self, signals[CHANGED_SIGNAL], 0);
++}
++
+ static gboolean
+ sessions_changed (gpointer user_data)
+ {
+@@ -143,9 +366,50 @@
+ static void
+ nm_session_monitor_init (NMSessionMonitor *monitor)
+ {
+- monitor->sd_source = sd_source_new ();
+- g_source_set_callback (monitor->sd_source, sessions_changed, monitor, NULL);
+- g_source_attach (monitor->sd_source, NULL);
++ if (sd_booted () > 0) {
++ monitor->sd_source = sd_source_new ();
++ g_source_set_callback (monitor->sd_source, sessions_changed, monitor, NULL);
++ g_source_attach (monitor->sd_source, NULL);
++
++ monitor->database_monitor = NULL;
++ monitor->database = NULL;
++ } else {
++ monitor->sd_source = NULL;
++
++ GError *error = NULL;
++ GFile *file;
++
++ /* Sessions-by-user is responsible for destroying the Session objects */
++ monitor->sessions_by_user = g_hash_table_new_full (g_str_hash, g_str_equal,
++ NULL, (GDestroyNotify) session_free);
++ monitor->sessions_by_uid = g_hash_table_new (g_direct_hash, g_direct_equal);
++
++
++ error = NULL;
++ if (!ensure_database (monitor, &error)) {
++ /* Ignore the first error if the CK database isn't found yet */
++ if (g_error_matches (error,
++ NM_SESSION_MONITOR_ERROR,
++ NM_SESSION_MONITOR_ERROR_NO_DATABASE) == FALSE) {
++ nm_log_err (LOGD_CORE, "Error loading " CKDB_PATH ": %s", error->message);
++ }
++ g_error_free (error);
++ }
++
++ error = NULL;
++ file = g_file_new_for_path (CKDB_PATH);
++ monitor->database_monitor = g_file_monitor_file (file, G_FILE_MONITOR_NONE, NULL, &error);
++ g_object_unref (file);
++ if (monitor->database_monitor == NULL) {
++ nm_log_err (LOGD_CORE, "Error monitoring " CKDB_PATH ": %s", error->message);
++ g_error_free (error);
++ } else {
++ g_signal_connect (monitor->database_monitor,
++ "changed",
++ G_CALLBACK (on_file_monitor_changed),
++ monitor);
++ }
++ }
+ }
+
+ static void
+@@ -158,6 +422,12 @@
+ g_source_unref (monitor->sd_source);
+ }
+
++ if (monitor->database_monitor != NULL)
++ g_object_unref (monitor->database_monitor);
++
++ if (monitor->database != NULL)
++ free_database (monitor);
++
+ if (G_OBJECT_CLASS (nm_session_monitor_parent_class)->finalize != NULL)
+ G_OBJECT_CLASS (nm_session_monitor_parent_class)->finalize (object);
+ }
+@@ -206,15 +476,36 @@
+ uid_t *out_uid,
+ GError **error)
+ {
+- uid_t uid;
++ if (monitor->sd_source != NULL) {
++ uid_t uid;
+
+- if (!nm_session_user_to_uid (username, &uid, error))
+- return FALSE;
++ if (!nm_session_user_to_uid (username, &uid, error))
++ return FALSE;
+
+- if (out_uid)
+- *out_uid = uid;
++ if (out_uid)
++ *out_uid = uid;
+
+- return nm_session_monitor_uid_has_session (monitor, uid, NULL, error);
++ return nm_session_monitor_uid_has_session (monitor, uid, NULL, error);
++ } else {
++ Session *s;
++
++ if (!ensure_database (monitor, error))
++ return FALSE;
++
++ s = g_hash_table_lookup (monitor->sessions_by_user, (gpointer) username);
++ if (!s) {
++ g_set_error (error,
++ NM_SESSION_MONITOR_ERROR,
++ NM_SESSION_MONITOR_ERROR_UNKNOWN_USER,
++ "No session found for user '%s'",
++ username);
++ return FALSE;
++ }
++
++ if (out_uid)
++ *out_uid = s->uid;
++ return TRUE;
++ }
+ }
+
+ gboolean
+@@ -222,12 +513,31 @@
+ const char *username,
+ GError **error)
+ {
+- uid_t uid;
++ if (monitor->sd_source != NULL) {
++ uid_t uid;
+
+- if (!nm_session_user_to_uid (username, &uid, error))
+- return FALSE;
++ if (!nm_session_user_to_uid (username, &uid, error))
++ return FALSE;
++
++ return nm_session_monitor_uid_active (monitor, uid, error);
++ } else {
++ Session *s;
++
++ if (!ensure_database (monitor, error))
++ return FALSE;
++
++ s = g_hash_table_lookup (monitor->sessions_by_user, (gpointer) username);
++ if (!s) {
++ g_set_error (error,
++ NM_SESSION_MONITOR_ERROR,
++ NM_SESSION_MONITOR_ERROR_UNKNOWN_USER,
++ "No session found for user '%s'",
++ username);
++ return FALSE;
++ }
+
+- return nm_session_monitor_uid_active (monitor, uid, error);
++ return s->active;
++ }
+ }
+
+ gboolean
+@@ -236,10 +546,31 @@
+ const char **out_user,
+ GError **error)
+ {
+- if (!nm_session_uid_to_user (uid, out_user, error))
+- return FALSE;
++ if (monitor->sd_source != NULL) {
++ if (!nm_session_uid_to_user (uid, out_user, error))
++ return FALSE;
+
+- return sd_uid_get_sessions (uid, FALSE, NULL) > 0;
++ return sd_uid_get_sessions (uid, FALSE, NULL) > 0;
++ } else {
++ Session *s;
++
++ if (!ensure_database (monitor, error))
++ return FALSE;
++
++ s = g_hash_table_lookup (monitor->sessions_by_uid, GUINT_TO_POINTER (uid));
++ if (!s) {
++ g_set_error (error,
++ NM_SESSION_MONITOR_ERROR,
++ NM_SESSION_MONITOR_ERROR_UNKNOWN_USER,
++ "No session found for uid %d",
++ uid);
++ return FALSE;
++ }
++
++ if (out_user)
++ *out_user = s->user;
++ return TRUE;
++ }
+ }
+
+ gboolean
+@@ -247,5 +578,24 @@
+ uid_t uid,
+ GError **error)
+ {
+- return sd_uid_get_sessions (uid, TRUE, NULL) > 0;
++ if (monitor->sd_source != NULL)
++ return sd_uid_get_sessions (uid, TRUE, NULL) > 0;
++ else {
++ Session *s;
++
++ if (!ensure_database (monitor, error))
++ return FALSE;
++
++ s = g_hash_table_lookup (monitor->sessions_by_uid, GUINT_TO_POINTER (uid));
++ if (!s) {
++ g_set_error (error,
++ NM_SESSION_MONITOR_ERROR,
++ NM_SESSION_MONITOR_ERROR_UNKNOWN_USER,
++ "No session found for uid '%d'",
++ uid);
++ return FALSE;
++ }
++
++ return s->active;
++ }
+ }
diff --git a/testing/perl/0001-Append-CFLAGS-and-LDFLAGS-to-their-Config.pm-counter.patch b/testing/perl/0001-Append-CFLAGS-and-LDFLAGS-to-their-Config.pm-counter.patch
new file mode 100644
index 000000000..1404460df
--- /dev/null
+++ b/testing/perl/0001-Append-CFLAGS-and-LDFLAGS-to-their-Config.pm-counter.patch
@@ -0,0 +1,83 @@
+From bb249b0b26c2e79a6f55355ef94889070f07fd21 Mon Sep 17 00:00:00 2001
+From: Niko Tyni <ntyni@debian.org>
+Date: Thu, 28 Apr 2011 09:18:54 +0300
+Subject: [PATCH] Append CFLAGS and LDFLAGS to their Config.pm counterparts in
+ EU::CBuilder
+
+Since ExtUtils::CBuilder 0.27_04 (bleadperl commit 06e8058f27e4),
+CFLAGS and LDFLAGS from the environment have overridden the Config.pm
+ccflags and ldflags settings. This can cause binary incompatibilities
+between the core Perl and extensions built with EU::CBuilder.
+
+Append to the Config.pm values rather than overriding them.
+---
+ .../lib/ExtUtils/CBuilder/Base.pm | 6 +++-
+ dist/ExtUtils-CBuilder/t/04-base.t | 25 +++++++++++++++++++-
+ 2 files changed, 28 insertions(+), 3 deletions(-)
+
+diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Base.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Base.pm
+index b572312..2255c51 100644
+--- a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Base.pm
++++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Base.pm
+@@ -40,11 +40,13 @@ sub new {
+ $self->{config}{$k} = $v unless exists $self->{config}{$k};
+ }
+ $self->{config}{cc} = $ENV{CC} if defined $ENV{CC};
+- $self->{config}{ccflags} = $ENV{CFLAGS} if defined $ENV{CFLAGS};
++ $self->{config}{ccflags} = join(" ", $self->{config}{ccflags}, $ENV{CFLAGS})
++ if defined $ENV{CFLAGS};
+ $self->{config}{cxx} = $ENV{CXX} if defined $ENV{CXX};
+ $self->{config}{cxxflags} = $ENV{CXXFLAGS} if defined $ENV{CXXFLAGS};
+ $self->{config}{ld} = $ENV{LD} if defined $ENV{LD};
+- $self->{config}{ldflags} = $ENV{LDFLAGS} if defined $ENV{LDFLAGS};
++ $self->{config}{ldflags} = join(" ", $self->{config}{ldflags}, $ENV{LDFLAGS})
++ if defined $ENV{LDFLAGS};
+
+ unless ( exists $self->{config}{cxx} ) {
+ my ($ccpath, $ccbase, $ccsfx ) = fileparse($self->{config}{cc}, qr/\.[^.]*/);
+diff --git a/dist/ExtUtils-CBuilder/t/04-base.t b/dist/ExtUtils-CBuilder/t/04-base.t
+index c3bf6b5..1bb15aa 100644
+--- a/dist/ExtUtils-CBuilder/t/04-base.t
++++ b/dist/ExtUtils-CBuilder/t/04-base.t
+@@ -1,7 +1,7 @@
+ #! perl -w
+
+ use strict;
+-use Test::More tests => 50;
++use Test::More tests => 64;
+ use Config;
+ use Cwd;
+ use File::Path qw( mkpath );
+@@ -326,6 +326,29 @@ is_deeply( $mksymlists_args,
+ "_prepare_mksymlists_args(): got expected arguments for Mksymlists",
+ );
+
++my %testvars = (
++ CFLAGS => 'ccflags',
++ LDFLAGS => 'ldflags',
++);
++
++while (my ($VAR, $var) = each %testvars) {
++ local $ENV{$VAR};
++ $base = ExtUtils::CBuilder::Base->new( quiet => 1 );
++ ok( $base, "ExtUtils::CBuilder::Base->new() returned true value" );
++ isa_ok( $base, 'ExtUtils::CBuilder::Base' );
++ like($base->{config}{$var}, qr/\Q$Config{$var}/,
++ "honours $var from Config.pm");
++
++ $ENV{$VAR} = "-foo -bar";
++ $base = ExtUtils::CBuilder::Base->new( quiet => 1 );
++ ok( $base, "ExtUtils::CBuilder::Base->new() returned true value" );
++ isa_ok( $base, 'ExtUtils::CBuilder::Base' );
++ like($base->{config}{$var}, qr/\Q$ENV{$VAR}/,
++ "honours $VAR from the environment");
++ like($base->{config}{$var}, qr/\Q$Config{$var}/,
++ "doesn't override $var from Config.pm with $VAR from the environment");
++}
++
+ #####
+
+ for ($source_file, $object_file, $lib_file) {
+--
+1.7.4.4
+
diff --git a/testing/perl/ChangeLog b/testing/perl/ChangeLog
new file mode 100644
index 000000000..9add39e20
--- /dev/null
+++ b/testing/perl/ChangeLog
@@ -0,0 +1,66 @@
+2011-06-22 Angel Velasquez <angvp@archlinux.org>
+ * Added a patch for ExtUtils doesnt overwrite CFLAGS and LDFLAGS
+ * Fixed #FS22197, FS#22441, FS#24767
+ * Rebuilt perl 5.14.1-2 against db 5.2.28
+
+2011-06-16 Angel Velasquez <angvp@archlinux.org>
+ * Fixed #FS24660
+ * Rebuilt against db 5.2.28
+
+2011-05-16 Angel Velasquez <angvp@archlinux.org>
+ * perl 5.14.0
+ * Removed patch for h2ph warning from 5.12.3
+ * Removed provides array, you can use corelist -v 5.14.0 to know the
+ modules included with the perl core, through Module::CoreList (thx j3nnn1
+ for the tip)
+
+2010-11-07 kevin <kevin@archlinux.org>
+
+ * perl 5.12.2-1
+ - Using /usr/bin/*_perl for script directories
+
+2010-11-06 kevin <kevin@archlinux.org>
+
+ - Removed otherlibdirs directive from Configure
+ - Removed /usr/*/perl5/site_perl/5.10.1 from INC
+ - Finally removed legacy dirs /usr/lib/perl5/current and
+ /usr/lib/perl5/site_perl/current from @INC
+
+2010-05-23 kevin <kevin@archlinux.org>
+
+ * perl 5.12.1-2
+ - Francois updated the provides array.
+
+2010-05-23 kevin <kevin@archlinux.org>
+
+ * perl 5.12.1-1
+
+2010-05-16 kevin <kevin@archlinux.org>
+
+ * perl 5.12.0-2
+
+2010-05-12 kevin <kevin@archlinux.org>
+
+ - FS#19411. Removed the for loop in perlbin.sh which didn't work on zsh.
+ This makes the loop variables unnecessary so the script no longer
+ pollutes the user's environment.
+ - FS#19427. Added /usr/*/perl5/site_perl/5.10.1 to otherlibdirs to support
+ user built modules.
+
+2010-05-09 kevin <kevin@archlinux.org>
+
+ * perl 5.12.0-1
+ - Modified perlbin.sh to only add existing dirs to PATH. Fixes FS#17402,
+ path points to non-existant directories
+
+2010-05-07 kevin <kevin@archlinux.org>
+
+ - Added this changelog.
+ - Added -Dinc_version_list=none to fix FS#19136, double entry in @INC.
+ This removes the duplicates and versioned directory entries.
+ - Change scriptdirs to /usr/lib/perl5/{core,vendor,site}_perl/bin to fix
+ Fix FS#13808, binaries don't follow FHS.
+ - Stopped using versioned directories in sitelib and sitearch.
+
+
+# vim: set ft=changelog ts=4 sw=4 et:
diff --git a/testing/perl/PKGBUILD b/testing/perl/PKGBUILD
new file mode 100644
index 000000000..f5f8fa311
--- /dev/null
+++ b/testing/perl/PKGBUILD
@@ -0,0 +1,116 @@
+# $Id: PKGBUILD 165042 2012-08-09 14:58:00Z bluewind $
+# Maintainer: Angel Velasquez <angvp@archlinux.org>
+# Contributor: kevin <kevin.archlinux.org>
+# Contributor: judd <jvinet.zeroflux.org>
+# Contributor: francois <francois.archlinux.org>
+pkgname=perl
+pkgver=5.16.1
+pkgrel=1
+pkgdesc="A highly capable, feature-rich programming language"
+arch=(i686 x86_64)
+license=('GPL' 'PerlArtistic')
+url="http://www.perl.org"
+groups=('base')
+depends=('gdbm' 'db' 'coreutils' 'glibc' 'sh')
+changelog=ChangeLog
+source=(http://www.cpan.org/src/5.0/perl-${pkgver}.tar.bz2
+perlbin.sh
+perlbin.csh
+provides.pl)
+install=perl.install
+options=('makeflags' '!purge')
+md5sums=('b87358e2c461a898cfd7c334e7dd8993'
+ '5ed2542fdb9a60682f215bd33701e61a'
+ '1f0cbbee783e8a6d32f01be5118e0d5e'
+ '999c3eea6464860704abbb055a0f0896')
+
+# workaround to let the integrity check find the correct provides array
+if [[ ${0##*/} = "parse_pkgbuilds.sh" ]]; then
+ true && provides=($(bsdtar -q -O -xf "/srv/ftp/pool/packages/$pkgname-$pkgver-$pkgrel-$CARCH.pkg.tar.xz" .PKGINFO | sed -rn 's#^provides = (.*)#\1#p'))
+fi
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ if [ "${CARCH}" = "x86_64" ]; then
+ # for x86_64
+ arch_opts="-Dcccdlflags='-fPIC'"
+ else
+ # for i686
+ arch_opts=""
+ fi
+
+ ./Configure -des -Dusethreads -Duseshrplib -Doptimize="${CFLAGS}" \
+ -Dprefix=/usr -Dinstallprefix=${pkgdir}/usr -Dvendorprefix=/usr \
+ -Dprivlib=/usr/share/perl5/core_perl \
+ -Darchlib=/usr/lib/perl5/core_perl \
+ -Dsitelib=/usr/share/perl5/site_perl \
+ -Dsitearch=/usr/lib/perl5/site_perl \
+ -Dvendorlib=/usr/share/perl5/vendor_perl \
+ -Dvendorarch=/usr/lib/perl5/vendor_perl \
+ -Dscriptdir=/usr/bin/core_perl \
+ -Dsitescript=/usr/bin/site_perl \
+ -Dvendorscript=/usr/bin/vendor_perl \
+ -Dinc_version_list=none \
+ -Dman1ext=1perl -Dman3ext=3perl ${arch_opts} \
+ -Dlddlflags="-shared ${LDFLAGS}" -Dldflags="${LDFLAGS}"
+ make
+}
+
+check() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ TEST_JOBS=$(echo $MAKEFLAGS | sed 's/.*-j\([0-9][0-9]*\).*/\1/') make test_harness
+# make test
+}
+
+package() {
+ # hack to work around makepkg running the subshell in check_sanity()
+ new_provides=($(cd "$srcdir/perl-$pkgver"; LD_PRELOAD=./libperl.so ./perl -Ilib "$srcdir/provides.pl" .))
+ provides=(${new_provides[@]})
+
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make install
+
+ ### Perl Settings ###
+ # Change man page extensions for site and vendor module builds.
+ # Use archlinux email address instead of my own.
+ sed -e '/^man1ext=/ s/1perl/1p/' -e '/^man3ext=/ s/3perl/3pm/' \
+ -e "/^cf_email=/ s/'.*'/'kevin@archlinux.org'/" \
+ -e "/^perladmin=/ s/'.*'/'kevin@archlinux.org'/" \
+ -i ${pkgdir}/usr/lib/perl5/core_perl/Config_heavy.pl
+
+ ### CPAN Settings ###
+ # Set CPAN default config to use the site directories.
+ sed -e '/(makepl_arg =>/ s/""/"INSTALLDIRS=site"/' \
+ -e '/(mbuildpl_arg =>/ s/""/"installdirs=site"/' \
+ -i ${pkgdir}/usr/share/perl5/core_perl/CPAN/FirstTime.pm
+
+ ### CPANPLUS Settings ###
+ # Set CPANPLUS default config to use the site directories.
+ sed -e "/{'makemakerflags'}/ s/'';/'INSTALLDIRS=site';/" \
+ -e "/{'buildflags'}/ s/'';/'installdirs=site';/" \
+ -i ${pkgdir}/usr/share/perl5/core_perl/CPANPLUS/Config.pm
+
+ # Profile script to set paths to perl scripts.
+ install -D -m755 ${srcdir}/perlbin.sh \
+ ${pkgdir}/etc/profile.d/perlbin.sh
+ # Profile script to set paths to perl scripts on csh. (FS#22441)
+ install -D -m755 ${srcdir}/perlbin.csh \
+ ${pkgdir}/etc/profile.d/perlbin.csh
+
+ (cd ${pkgdir}/usr/bin; mv perl${pkgver} perl)
+ (cd ${pkgdir}/usr/bin/core_perl; ln -sf c2ph pstruct; ln -sf s2p psed)
+ grep -Rl "${pkgdir}" ${pkgdir}/usr | \
+ xargs sed -i "s^${pkgdir}^^g"
+
+ # Remove all pod files *except* those under /usr/share/perl5/core_perl/pod/
+ # (FS#16488)
+ rm -f $pkgdir/usr/share/perl5/core_perl/*.pod
+ for d in $pkgdir/usr/share/perl5/core_perl/*; do
+ if [ -d $d -a $(basename $d) != "pod" ]; then
+ find $d -name *.pod -delete
+ fi
+ done
+ find $pkgdir/usr/lib -name *.pod -delete
+ find $pkgdir -name .packlist -delete
+}
diff --git a/testing/perl/digest_eval_hole.diff b/testing/perl/digest_eval_hole.diff
new file mode 100644
index 000000000..47904137b
--- /dev/null
+++ b/testing/perl/digest_eval_hole.diff
@@ -0,0 +1,61 @@
+From 4b6a7324284e7435a361c58f7ddb32fc0c635bd0 Mon Sep 17 00:00:00 2001
+From: "Michael G. Schwern" <schwern@pobox.com>
+Date: Mon, 3 Oct 2011 19:05:29 +0100
+Subject: Close the eval "require $module" security hole in
+ Digest->new($algorithm)
+
+Also the filter was incomplete.
+
+Bug-Debian: http://bugs.debian.org/644108
+
+Patch-Name: fixes/digest_eval_hole.diff
+---
+ cpan/Digest/Digest.pm | 6 ++++--
+ cpan/Digest/t/security.t | 14 ++++++++++++++
+ 2 files changed, 18 insertions(+), 2 deletions(-)
+ create mode 100644 cpan/Digest/t/security.t
+
+diff --git a/cpan/Digest/Digest.pm b/cpan/Digest/Digest.pm
+index 384dfc8..d714434 100644
+--- a/cpan/Digest/Digest.pm
++++ b/cpan/Digest/Digest.pm
+@@ -24,7 +24,7 @@ sub new
+ shift; # class ignored
+ my $algorithm = shift;
+ my $impl = $MMAP{$algorithm} || do {
+- $algorithm =~ s/\W+//;
++ $algorithm =~ s/\W+//g;
+ "Digest::$algorithm";
+ };
+ $impl = [$impl] unless ref($impl);
+@@ -35,7 +35,9 @@ sub new
+ ($class, @args) = @$class if ref($class);
+ no strict 'refs';
+ unless (exists ${"$class\::"}{"VERSION"}) {
+- eval "require $class";
++ my $pm_file = $class . ".pm";
++ $pm_file =~ s{::}{/}g;
++ eval { require $pm_file };
+ if ($@) {
+ $err ||= $@;
+ next;
+diff --git a/cpan/Digest/t/security.t b/cpan/Digest/t/security.t
+new file mode 100644
+index 0000000..5cba122
+--- /dev/null
++++ b/cpan/Digest/t/security.t
+@@ -0,0 +1,14 @@
++#!/usr/bin/env perl
++
++# Digest->new() had an exploitable eval
++
++use strict;
++use warnings;
++
++use Test::More tests => 1;
++
++use Digest;
++
++$LOL::PWNED = 0;
++eval { Digest->new(q[MD;5;$LOL::PWNED = 42]) };
++is $LOL::PWNED, 0;
diff --git a/testing/perl/fix-h2ph-and-tests.patch b/testing/perl/fix-h2ph-and-tests.patch
new file mode 100644
index 000000000..a2d176ec6
--- /dev/null
+++ b/testing/perl/fix-h2ph-and-tests.patch
@@ -0,0 +1,104 @@
+From 8d66b3f930dc6d88b524d103e304308ae73a46e7 Mon Sep 17 00:00:00 2001
+From: Robin Barker <rmbarker@cpan.org>
+Date: Thu, 22 Apr 2010 11:51:20 +0100
+Subject: [PATCH 1/1] Fix h2ph and test
+
+---
+ lib/h2ph.t | 12 ++++++++++--
+ utils/h2ph.PL | 28 +++++++++++++++++++++++-----
+ 2 files changed, 33 insertions(+), 7 deletions(-)
+
+diff --git a/lib/h2ph.t b/lib/h2ph.t
+index 27dd7b9..8d62d46 100644
+--- a/lib/h2ph.t
++++ b/lib/h2ph.t
+@@ -18,7 +18,7 @@ if (!(-e $extracted_program)) {
+ exit 0;
+ }
+
+-plan(4);
++plan(5);
+
+ # quickly compare two text files
+ sub txt_compare {
+@@ -41,8 +41,16 @@ $result = runperl( progfile => 'lib/h2ph.pht',
+ stderr => 1 );
+ like( $result, qr/syntax OK$/, "output compiles");
+
++$result = runperl( progfile => '_h2ph_pre.ph',
++ switches => ['-c'],
++ stderr => 1 );
++like( $result, qr/syntax OK$/, "preamble compiles");
++
+ $result = runperl( switches => ["-w"],
+- prog => '$SIG{__WARN__} = sub { die $_[0] }; require q(lib/h2ph.pht);');
++ stderr => 1,
++ prog => <<'PROG' );
++$SIG{__WARN__} = sub { die $_[0] }; require q(lib/h2ph.pht);
++PROG
+ is( $result, '', "output free of warnings" );
+
+ # cleanup
+diff --git a/utils/h2ph.PL b/utils/h2ph.PL
+index 8f56db4..1255807 100644
+--- a/utils/h2ph.PL
++++ b/utils/h2ph.PL
+@@ -401,7 +401,10 @@ if ($opt_e && (scalar(keys %bad_file) > 0)) {
+ exit $Exit;
+
+ sub expr {
+- $new = '"(assembly code)"' and return if /\b__asm__\b/; # freak out.
++ if (/\b__asm__\b/) { # freak out
++ $new = '"(assembly code)"';
++ return
++ }
+ my $joined_args;
+ if(keys(%curargs)) {
+ $joined_args = join('|', keys(%curargs));
+@@ -770,7 +773,7 @@ sub inc_dirs
+ sub build_preamble_if_necessary
+ {
+ # Increment $VERSION every time this function is modified:
+- my $VERSION = 2;
++ my $VERSION = 3;
+ my $preamble = "$Dest_dir/_h2ph_pre.ph";
+
+ # Can we skip building the preamble file?
+@@ -798,7 +801,16 @@ sub build_preamble_if_necessary
+ # parenthesized value: d=(v)
+ $define{$_} = $1;
+ }
+- if ($define{$_} =~ /^([+-]?(\d+)?\.\d+([eE][+-]?\d+)?)[FL]?$/) {
++ if (/^(\w+)\((\w)\)$/) {
++ my($macro, $arg) = ($1, $2);
++ my $def = $define{$_};
++ $def =~ s/$arg/\$\{$arg\}/g;
++ print PREAMBLE <<DEFINE;
++unless (defined &$macro) { sub $macro(\$) { my (\$$arg) = \@_; \"$def\" } }
++
++DEFINE
++ } elsif
++ ($define{$_} =~ /^([+-]?(\d+)?\.\d+([eE][+-]?\d+)?)[FL]?$/) {
+ # float:
+ print PREAMBLE
+ "unless (defined &$_) { sub $_() { $1 } }\n\n";
+@@ -807,8 +819,14 @@ sub build_preamble_if_necessary
+ print PREAMBLE
+ "unless (defined &$_) { sub $_() { $1 } }\n\n";
+ } elsif ($define{$_} =~ /^\w+$/) {
+- print PREAMBLE
+- "unless (defined &$_) { sub $_() { &$define{$_} } }\n\n";
++ my $def = $define{$_};
++ if ($isatype{$def}) {
++ print PREAMBLE
++ "unless (defined &$_) { sub $_() { \"$def\" } }\n\n";
++ } else {
++ print PREAMBLE
++ "unless (defined &$_) { sub $_() { &$def } }\n\n";
++ }
+ } else {
+ print PREAMBLE
+ "unless (defined &$_) { sub $_() { \"",
+--
+1.6.5.2.74.g610f9.dirty
+
diff --git a/testing/perl/perl.install b/testing/perl/perl.install
new file mode 100644
index 000000000..a355c5bbe
--- /dev/null
+++ b/testing/perl/perl.install
@@ -0,0 +1,10 @@
+# arg 1: the new package version
+post_install() {
+ for ver in 5.8.{0,1,2,3,4,5,6,7,8}; do
+ [ -h usr/lib/perl5/$ver ] && rm usr/lib/perl5/$ver
+ [ -h usr/lib/perl5/site_perl/$ver ] && rm usr/lib/perl5/site_perl/$ver
+ [ -h usr/bin/perl$ver ] && rm usr/bin/perl$ver
+ done
+ return 0
+}
+
diff --git a/testing/perl/perlbin.csh b/testing/perl/perlbin.csh
new file mode 100644
index 000000000..535f0b18d
--- /dev/null
+++ b/testing/perl/perlbin.csh
@@ -0,0 +1,15 @@
+# Set path to perl scriptdirs if they exist
+# https://wiki.archlinux.org/index.php/Perl_Policy#Binaries_and_Scripts
+# Added /usr/bin/*_perl dirs for scripts
+# Remove /usr/lib/perl5/*_perl/bin in next release
+
+[ -d /usr/bin/site_perl ] && setenv PATH ${PATH}:/usr/bin/site_perl
+[ -d /usr/lib/perl5/site_perl/bin ] && setenv PATH ${PATH}:/usr/lib/perl5/site_perl/bin
+
+[ -d /usr/bin/vendor_perl ] && setenv PATH ${PATH}:/usr/bin/vendor_perl
+[ -d /usr/lib/perl5/vendor_perl/bin ] && setenv PATH ${PATH}:/usr/lib/perl5/vendor_perl/bin
+
+[ -d /usr/bin/core_perl ] && setenv PATH ${PATH}:/usr/bin/core_perl
+
+# If you have modules in non-standard directories you can add them here.
+#export PERLLIB=dir1:dir2
diff --git a/testing/perl/perlbin.sh b/testing/perl/perlbin.sh
new file mode 100755
index 000000000..20f830436
--- /dev/null
+++ b/testing/perl/perlbin.sh
@@ -0,0 +1,18 @@
+# Set path to perl scriptdirs if they exist
+# https://wiki.archlinux.org/index.php/Perl_Policy#Binaries_and_Scripts
+# Added /usr/bin/*_perl dirs for scripts
+# Remove /usr/lib/perl5/*_perl/bin in next release
+
+[ -d /usr/bin/site_perl ] && PATH=$PATH:/usr/bin/site_perl
+[ -d /usr/lib/perl5/site_perl/bin ] && PATH=$PATH:/usr/lib/perl5/site_perl/bin
+
+[ -d /usr/bin/vendor_perl ] && PATH=$PATH:/usr/bin/vendor_perl
+[ -d /usr/lib/perl5/vendor_perl/bin ] && PATH=$PATH:/usr/lib/perl5/vendor_perl/bin
+
+[ -d /usr/bin/core_perl ] && PATH=$PATH:/usr/bin/core_perl
+
+export PATH
+
+# If you have modules in non-standard directories you can add them here.
+#export PERLLIB=dir1:dir2
+
diff --git a/testing/perl/provides.pl b/testing/perl/provides.pl
new file mode 100644
index 000000000..d2cdc762e
--- /dev/null
+++ b/testing/perl/provides.pl
@@ -0,0 +1,299 @@
+# provides.pl
+##
+# Script for printing out a provides list of every CPAN distribution
+# that is bundled with perl. You can run it before building perl
+# or you can run it after building perl. Required modules are in core
+# for perl 5.13 and above. It might be nice if this didn't require
+# HTTP::Tiny and maybe just used wget or curl.
+#
+# This script uses HTTP::Tiny to query Tatsuhiko Miyagawa's webapp at
+# cpanmetadb.plackperl.org to cross-reference module files to their
+# providing CPAN distribution. Thank you Miyagawa!
+#
+# - Justin "juster" Davis <jrcd83@gmail.com>
+
+use warnings 'FATAL' => 'all';
+use strict;
+
+package Common;
+
+sub evalver
+{
+ my ($path, $mod) = @_;
+
+ open my $fh, '<', $path or die "open $path: $!";
+
+ my $m = ($mod
+ ? qr/(?:\$${mod}::VERSION|\$VERSION)/
+ : qr/\$VERSION/);
+
+ while (my $ln = <$fh>) {
+ next unless $ln =~ /\s*$m\s*=\s*.+/;
+ chomp $ln;
+ my $ver = do { no strict; eval $ln };
+ return $ver unless $@;
+ die qq{$path:$. bad version string in "$ln"\n};
+ }
+
+ close $fh;
+ return undef;
+}
+
+
+#-----------------------------------------------------------------------------
+
+package Dists;
+
+sub maindistfile
+{
+ my ($dist, $dir) = @_;
+
+ # libpath is the modern style, installing modules under lib/
+ # with dirs matching the name components.
+ my $libpath = join q{/}, 'lib', split /-/, "${dist}.pm";
+
+ # dumbpath is an old style where there's no subdirs and just
+ # a .pm file.
+ my $dumbpath = $dist;
+ $dumbpath =~ s/\A.+-//;
+ $dumbpath .= ".pm";
+
+ my @paths = ($libpath, $dumbpath);
+ # Some modules (with simple names like XSLoader, lib, etc) are
+ # generated by Makefile.PL. Search through their generating code.
+ push @paths, "${dist}_pm.PL" if $dist =~ tr/-/-/ == 0;
+
+ for my $path (map { "$dir/$_" } @paths) { return $path if -f $path; }
+ return undef;
+}
+
+sub module_ver
+{
+ my ($dist, $dir) = @_;
+
+ my $path = maindistfile($dist, $dir) or return undef;
+
+ my $mod = $dist;
+ $mod =~ s/-/::/g;
+ my $ver = Common::evalver($path, $mod);
+ unless ($ver) {
+ warn "failed to find version in module file for $dist\n";
+ return undef;
+ }
+
+ return $ver;
+}
+
+sub changelog_ver
+{
+ my ($dist, $dir) = @_;
+
+ my $path;
+ for my $tmp (glob "$dir/{Changes,ChangeLog}") {
+ if (-f $tmp) { $path = $tmp; last; }
+ }
+ return undef unless $path;
+
+ open my $fh, '<', $path or die "open: $!";
+ while (<$fh>) {
+ return $1 if /\A\s*(?:$dist[ \t]*)?([0-9._]+)/;
+ return $1 if /\A\s*version\s+([0-9._]+)/i;
+ }
+ close $fh;
+
+ return undef;
+}
+
+# for some reason podlators has a VERSION file with perl code in it
+sub verfile_ver
+{
+ my ($dist, $dir) = @_;
+
+ my $path = "$dir/VERSION";
+ return undef unless -f $path; # no warning, only podlaters has it
+
+ return Common::evalver($path);
+}
+
+# scans a directory full of nicely separated dist. directories.
+sub scan_distroot
+{
+ my ($distroot) = @_;
+ opendir my $cpand, "$distroot" or die "failed to open $distroot";
+ my @dists = grep { !/^\./ && -d "$distroot/$_" } readdir $cpand;
+ closedir $cpand;
+
+ my @found;
+ for my $dist (@dists) {
+ my $distdir = "$distroot/$dist";
+ my $ver = (module_ver($dist, $distdir)
+ || changelog_ver($dist, $distdir)
+ || verfile_ver($dist, $distdir));
+
+ if ($ver) { push @found, [ $dist, $ver ]; }
+ else { warn "failed to find version for $dist\n"; }
+ }
+ return @found;
+}
+
+sub find
+{
+ my ($srcdir) = @_;
+ return map { scan_distroot($_) } glob "$srcdir/{cpan,dist}";
+}
+
+#-----------------------------------------------------------------------------
+
+package Modules;
+
+use HTTP::Tiny qw();
+use File::Find qw();
+use File::stat;
+
+*findfile = *File::Find::find;
+
+sub cpan_provider
+{
+ my ($module) = @_;
+ my $url = "http://cpanmetadb.plackperl.org/v1.0/package/$module";
+ my $http = HTTP::Tiny->new;
+ my $resp = $http->get($url);
+ return undef unless $resp->{'success'};
+
+ my ($cpanpath) = $resp->{'content'} =~ /^distfile: (.*)$/m
+ or return undef;
+
+ my $dist = $cpanpath;
+ $dist =~ s{\A.+/}{}; # remove author directory
+ $dist =~ s{-[^-]+\z}{}; # remove version and extension
+ return ($dist eq 'perl' ? undef : $dist);
+}
+
+sub find
+{
+ my ($srcdir) = @_;
+ my $libdir = "$srcdir/lib/";
+ die "failed to find $libdir directory" unless -d $libdir;
+
+ # Find only the module files that have not changed since perl
+ # was extracted. We don't want the files perl just recently
+ # installed into lib/. We processed those already.
+ my @modfiles;
+ my $finder = sub {
+ return unless /[.]pm\z/;
+ return if m{\Q$libdir\E[^/]+/t/}; # ignore testing modules
+ push @modfiles, $_;
+ };
+ findfile({ 'no_chdir' => 1, 'wanted' => $finder }, $libdir);
+
+ # First we have to find what the oldest ctime actually is.
+ my $oldest = time;
+ @modfiles = map {
+ my $modfile = $_;
+ my $ctime = (stat $modfile)->ctime;
+ $oldest = $ctime if $ctime < $oldest;
+ [ $modfile, $ctime ]; # save ctime for later
+ } @modfiles;
+
+ # Then we filter out any file that was created more than a
+ # few seconds after that. Process the rest.
+ my @mods;
+ for my $modfile (@modfiles) {
+ my ($mod, $ctime) = @$modfile;
+ next if $ctime - $oldest > 5; # ignore newer files
+
+ my $path = $mod;
+ $mod =~ s{[.]pm\z}{};
+ $mod =~ s{\A$libdir}{};
+ $mod =~ s{/}{::}g;
+
+ my $ver = Common::evalver($path, $mod) || q{};
+ push @mods, [ $mod, $ver ];
+ }
+
+ # Convert modules names to the dist names who provide them.
+ my %seen;
+ my @dists;
+ for my $modref (@mods) {
+ my ($mod, $ver) = @$modref;
+ my $dist = cpan_provider($mod) or next; # filter out core modules
+ next if $seen{$dist}++; # avoid duplicate dists
+ push @dists, [ $dist, $ver ];
+ }
+ return @dists;
+}
+
+#-----------------------------------------------------------------------------
+
+package Dist2Pkg;
+
+sub name
+{
+ my ($name) = @_;
+ my $orig = $name;
+
+ # Package names should be lowercase and consist of alphanumeric
+ # characters only (and hyphens!)...
+ $name =~ tr/A-Z/a-z/;
+ $name =~ tr/_+/-/; # _ and +'s converted to - (ie Tabbed-Text+Wrap)
+ $name =~ tr/-a-z0-9+//cd; # Delete all other chars.
+ $name =~ tr/-/-/s;
+
+ # Delete leading or trailing hyphens...
+ $name =~ s/\A-|-\z//g;
+
+ die qq{Dist. name '$orig' completely violates packaging standards}
+ unless $name;
+
+ return "perl-$name";
+}
+
+sub version
+{
+ my ($version) = @_;
+
+ # Package versions should be numbers and decimal points only...
+ $version =~ tr/-/./;
+ $version =~ tr/_0-9.-//cd;
+
+ # Remove developer versions because pacman has no special logic
+ # to compare them to regular versions like perl does.
+ $version =~ s/_[^_]+\z//;
+
+ $version =~ tr/_//d; # delete other underscores
+ $version =~ tr/././s; # only one period at a time
+ $version =~ s/\A[.]|[.]\z//g; # shouldn't start or stop with a period
+
+ return $version;
+}
+
+#-----------------------------------------------------------------------------
+
+package main;
+
+my %CPANNAME = ('List-Util' => 'Scalar-List-Utils',
+ 'Text-Tabs' => 'Text-Tabs+Wrap',
+ 'Cwd' => 'PathTools');
+
+my $perldir = shift or die "Usage: $0 [path to perl source directory]\n";
+die "$perldir is not a valid directory." unless -d $perldir;
+
+my @dists = (Dists::find($perldir), Modules::find($perldir));
+for my $dist (@dists) {
+ my $name = $dist->[0];
+ $dist->[0] = $CPANNAME{$name} if exists $CPANNAME{$name};
+}
+
+my @pkgs = map {
+ my ($name, $ver) = @$_;
+ $name = Dist2Pkg::name($name);
+ $ver = Dist2Pkg::version($ver);
+ [ $name, $ver ];
+} @dists;
+
+@pkgs = sort { $a->[0] cmp $b->[0] } @pkgs;
+
+for my $pkg (@pkgs) {
+ my ($name, $ver) = @$pkg;
+ print "$name=$ver\n";
+}
diff --git a/testing/systemd/0001-shutdown-recursively-mark-root-as-private-before-piv.patch b/testing/systemd/0001-shutdown-recursively-mark-root-as-private-before-piv.patch
new file mode 100644
index 000000000..5c6085c95
--- /dev/null
+++ b/testing/systemd/0001-shutdown-recursively-mark-root-as-private-before-piv.patch
@@ -0,0 +1,31 @@
+From 4bfa638d43c05e8db052cd55818765bb3575a405 Mon Sep 17 00:00:00 2001
+From: Dave Reisner <dreisner@archlinux.org>
+Date: Fri, 10 Aug 2012 11:02:03 -0400
+Subject: [PATCH] shutdown: recursively mark root as private before pivot
+
+Because root is now recursively marked as shared on bootup, we need to
+recursively mark root as private. This prevents a pivot_root failure on
+shutdown:
+
+ Cannot finalize remaining file systems and devices, giving up.
+ pivot failed: Invalid argument
+---
+ src/core/shutdown.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/core/shutdown.c b/src/core/shutdown.c
+index 105a604..0b7cbd8 100644
+--- a/src/core/shutdown.c
++++ b/src/core/shutdown.c
+@@ -109,7 +109,7 @@ static int pivot_to_new_root(void) {
+ It works for pivot_root, but the ref count for the root device
+ is not decreasing :-/
+ */
+- if (mount(NULL, "/", NULL, MS_PRIVATE, NULL) < 0) {
++ if (mount(NULL, "/", NULL, MS_REC|MS_PRIVATE, NULL) < 0) {
+ log_error("Failed to make \"/\" private mount %m");
+ return -errno;
+ }
+--
+1.7.11.4
+
diff --git a/testing/systemd/0001-systemctl-fix-issue-with-systemctl-daemon-reexec.patch b/testing/systemd/0001-systemctl-fix-issue-with-systemctl-daemon-reexec.patch
new file mode 100644
index 000000000..3aec94edc
--- /dev/null
+++ b/testing/systemd/0001-systemctl-fix-issue-with-systemctl-daemon-reexec.patch
@@ -0,0 +1,73 @@
+From c516c8d17f77a1c761447f4c40c8dfffeda2e06d Mon Sep 17 00:00:00 2001
+From: Simon Peeters <peeters.simon@gmail.com>
+Date: Fri, 10 Aug 2012 17:32:19 +0200
+Subject: [PATCH] systemctl: fix issue with systemctl daemon-reexec
+
+---
+ src/shared/dbus-common.c | 3 ++-
+ src/systemctl/systemctl.c | 11 ++++++++---
+ 2 files changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/src/shared/dbus-common.c b/src/shared/dbus-common.c
+index 7f0dce5..da2dc2e 100644
+--- a/src/shared/dbus-common.c
++++ b/src/shared/dbus-common.c
+@@ -1287,7 +1287,8 @@ int bus_method_call_with_reply(DBusConnection *bus,
+ reply = dbus_connection_send_with_reply_and_block(bus, m, -1, &error);
+ dbus_message_unref(m);
+ if (!reply) {
+- log_error("Failed to issue method call: %s", bus_error_message(&error));
++ if (!return_error)
++ log_error("Failed to issue method call: %s", bus_error_message(&error));
+ if (bus_error_is_no_service(&error))
+ r = -ENOENT;
+ else if (dbus_error_has_name(&error, DBUS_ERROR_ACCESS_DENIED))
+diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
+index 2e0aaaa..13e0f91 100644
+--- a/src/systemctl/systemctl.c
++++ b/src/systemctl/systemctl.c
+@@ -1537,11 +1537,12 @@ static int start_unit_one(
+ DBUS_TYPE_INVALID);
+ free(n);
+ if (r) {
+- if (r == -ENOENT && arg_action != ACTION_SYSTEMCTL ) {
++ if (r == -ENOENT && arg_action != ACTION_SYSTEMCTL )
+ /* There's always a fallback possible for
+ * legacy actions. */
+ r = -EADDRNOTAVAIL;
+- }
++ else
++ log_error("Failed to issue method call: %s", bus_error_message(error));
+ goto finish;
+ }
+
+@@ -3143,6 +3144,7 @@ finish:
+ static int daemon_reload(DBusConnection *bus, char **args) {
+ int r;
+ const char *method;
++ DBusError error;
+
+ if (arg_action == ACTION_RELOAD)
+ method = "Reload";
+@@ -3171,7 +3173,7 @@ static int daemon_reload(DBusConnection *bus, char **args) {
+ "org.freedesktop.systemd1.Manager",
+ method,
+ NULL,
+- NULL,
++ &error,
+ DBUS_TYPE_INVALID);
+
+ if (r == -ENOENT && arg_action != ACTION_SYSTEMCTL)
+@@ -3182,6 +3184,9 @@ static int daemon_reload(DBusConnection *bus, char **args) {
+ /* On reexecution, we expect a disconnect, not
+ * a reply */
+ r = 0;
++ else if (r)
++ log_error("Failed to issue method call: %s", bus_error_message(&error));
++ dbus_error_free(&error);
+
+ return r;
+ }
+--
+1.7.11.4
+
diff --git a/testing/xorg-server/10-quirks.conf b/testing/xorg-server/10-quirks.conf
new file mode 100644
index 000000000..7afad22dc
--- /dev/null
+++ b/testing/xorg-server/10-quirks.conf
@@ -0,0 +1,10 @@
+# Collection of quirks and blacklist/whitelists for specific devices.
+
+
+# Accelerometer device, posts data through ABS_X/ABS_Y, making X unusable
+# http://bugs.freedesktop.org/show_bug.cgi?id=22442
+Section "InputClass"
+ Identifier "ThinkPad HDAPS accelerometer blacklist"
+ MatchProduct "ThinkPad HDAPS accelerometer data"
+ Option "Ignore" "on"
+EndSection
diff --git a/testing/xorg-server/PKGBUILD b/testing/xorg-server/PKGBUILD
new file mode 100644
index 000000000..d58b4682b
--- /dev/null
+++ b/testing/xorg-server/PKGBUILD
@@ -0,0 +1,190 @@
+# $Id: PKGBUILD 165036 2012-08-09 10:16:20Z jgc $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgbase=xorg-server
+pkgname=('xorg-server' 'xorg-server-xephyr' 'xorg-server-xdmx' 'xorg-server-xvfb' 'xorg-server-xnest' 'xorg-server-common' 'xorg-server-devel')
+pkgver=1.12.3.901
+pkgrel=1
+arch=('i686' 'x86_64')
+license=('custom')
+url="http://xorg.freedesktop.org"
+makedepends=('pixman' 'libx11' 'mesa' 'libgl' 'xf86driproto' 'xcmiscproto' 'xtrans' 'bigreqsproto' 'randrproto' 'inputproto' 'fontsproto' 'videoproto'
+ 'compositeproto' 'recordproto' 'scrnsaverproto' 'resourceproto' 'xineramaproto' 'libxkbfile' 'libxfont' 'renderproto' 'libpciaccess'
+ 'libxv' 'xf86dgaproto' 'libxmu' 'libxrender' 'libxi' 'dmxproto' 'libxaw' 'libdmx' 'libxtst' 'libxres' 'xorg-xkbcomp' 'xorg-util-macros'
+ 'xorg-font-util' 'glproto' 'dri2proto' 'udev>=183' 'libgcrypt')
+options=('!libtool')
+source=(${url}/releases/individual/xserver/${pkgbase}-${pkgver}.tar.bz2
+ autoconfig-nvidia.patch
+ autoconfig-sis.patch
+ xvfb-run
+ xvfb-run.1
+ 10-quirks.conf)
+sha256sums=('5265cfe935e2ad54a287dd3026917c6bfe6191a4f943ca893d1477fdfbe94b2b'
+ '66e25f76a7496c429e0aff4b0670f168719bb0ceaeb88c6f2272f2bf3ed21162'
+ 'd027776fac1f7675b0a9ee817502290b1c45f9c09b0f0a6bb058c35f92361e84'
+ 'ff0156309470fc1d378fd2e104338020a884295e285972cc88e250e031cc35b9'
+ '2460adccd3362fefd4cdc5f1c70f332d7b578091fb9167bf88b5f91265bbd776'
+ '94612f5c0d34a3b7152915c2e285c7b462e9d8e38d3539bd551a339498eac166')
+
+build() {
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+
+ # Use nouveau/nv/nvidia drivers for nvidia devices
+ patch -Np1 -i "${srcdir}/autoconfig-nvidia.patch"
+
+ # Use unofficial imedia SiS driver for supported SiS devices
+ patch -Np0 -i "${srcdir}/autoconfig-sis.patch"
+
+ autoreconf -fi
+ ./configure --prefix=/usr \
+ --enable-ipv6 \
+ --enable-dri \
+ --enable-dmx \
+ --enable-xvfb \
+ --enable-xnest \
+ --enable-composite \
+ --enable-xcsecurity \
+ --enable-xorg \
+ --enable-xephyr \
+ --enable-glx-tls \
+ --enable-kdrive \
+ --enable-kdrive-evdev \
+ --enable-kdrive-kbd \
+ --enable-kdrive-mouse \
+ --enable-install-setuid \
+ --enable-config-udev \
+ --disable-config-dbus \
+ --enable-record \
+ --disable-xfbdev \
+ --disable-xfake \
+ --disable-static \
+ --sysconfdir=/etc/X11 \
+ --localstatedir=/var \
+ --with-xkb-path=/usr/share/X11/xkb \
+ --with-xkb-output=/var/lib/xkb \
+ --with-fontrootdir=/usr/share/fonts
+ make
+
+ # Disable subdirs for make install rule to make splitting easier
+ sed -e 's/^DMX_SUBDIRS =.*/DMX_SUBDIRS =/' \
+ -e 's/^XVFB_SUBDIRS =.*/XVFB_SUBDIRS =/' \
+ -e 's/^XNEST_SUBDIRS =.*/XNEST_SUBDIRS = /' \
+ -e 's/^KDRIVE_SUBDIRS =.*/KDRIVE_SUBDIRS =/' \
+ -i hw/Makefile
+}
+
+package_xorg-server-common() {
+ pkgdesc="Xorg server common files"
+ depends=('xkeyboard-config' 'xorg-xkbcomp' 'xorg-setxkbmap' 'xorg-fonts-misc')
+
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+ install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-common"
+ install -m644 COPYING "${pkgdir}/usr/share/licenses/xorg-server-common"
+
+ make -C xkb DESTDIR="${pkgdir}" install-data
+
+ install -m755 -d "${pkgdir}/usr/share/man/man1"
+ install -m644 man/Xserver.1 "${pkgdir}/usr/share/man/man1/"
+
+ install -m755 -d "${pkgdir}/usr/lib/xorg"
+ install -m644 dix/protocol.txt "${pkgdir}/usr/lib/xorg/"
+}
+
+package_xorg-server() {
+ pkgdesc="Xorg X server"
+ depends=(libxdmcp libxfont udev libpciaccess libdrm pixman libgcrypt libxau xorg-server-common xf86-input-evdev)
+ backup=('etc/X11/xorg.conf.d/10-evdev.conf' 'etc/X11/xorg.conf.d/10-quirks.conf')
+ provides=('x-server')
+ groups=('xorg')
+ conflicts=('nvidia-utils<=290.10')
+
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+
+ install -m755 -d "${pkgdir}/etc/X11"
+ mv "${pkgdir}/usr/share/X11/xorg.conf.d" "${pkgdir}/etc/X11/"
+ install -m644 "${srcdir}/10-quirks.conf" "${pkgdir}/etc/X11/xorg.conf.d/"
+
+ rmdir "${pkgdir}/usr/share/X11"
+
+ # Needed for non-mesa drivers, libgl will restore it
+ mv "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.so" \
+ "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.xorg"
+
+ rm -rf "${pkgdir}/var"
+
+ rm -f "${pkgdir}/usr/share/man/man1/Xserver.1"
+ rm -f "${pkgdir}/usr/lib/xorg/protocol.txt"
+
+ install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server"
+ ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server/COPYING"
+
+ rm -rf "${pkgdir}/usr/lib/pkgconfig"
+ rm -rf "${pkgdir}/usr/include"
+ rm -rf "${pkgdir}/usr/share/aclocal"
+}
+
+package_xorg-server-xephyr() {
+ pkgdesc="A nested X server that runs as an X application"
+ depends=(libxfont libgl libgcrypt libxv pixman xorg-server-common)
+
+ cd "${srcdir}/${pkgbase}-${pkgver}/hw/kdrive"
+ make DESTDIR="${pkgdir}" install
+
+ install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-xephyr"
+ ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server-xephyr/COPYING"
+}
+
+package_xorg-server-xvfb() {
+ pkgdesc="Virtual framebuffer X server"
+ depends=(libxfont libxdmcp libxau libgcrypt pixman xorg-server-common)
+
+ cd "${srcdir}/${pkgbase}-${pkgver}/hw/vfb"
+ make DESTDIR="${pkgdir}" install
+
+ install -m755 "${srcdir}/xvfb-run" "${pkgdir}/usr/bin/"
+ install -m644 "${srcdir}/xvfb-run.1" "${pkgdir}/usr/share/man/man1/"
+
+ install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-xvfb"
+ ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server-xvfb/COPYING"
+}
+
+package_xorg-server-xnest() {
+ pkgdesc="A nested X server that runs as an X application"
+ depends=(libxfont libxext libgcrypt pixman xorg-server-common)
+
+ cd "${srcdir}/${pkgbase}-${pkgver}/hw/xnest"
+ make DESTDIR="${pkgdir}" install
+
+ install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-xnest"
+ ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server-xnest/COPYING"
+}
+
+package_xorg-server-xdmx() {
+ pkgdesc="Distributed Multihead X Server and utilities"
+ depends=(libxfont libxi libgcrypt libxaw libxrender libdmx libxfixes pixman xorg-server-common)
+
+ cd "${srcdir}/${pkgbase}-${pkgver}/hw/dmx"
+ make DESTDIR="${pkgdir}" install
+
+ install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-xdmx"
+ ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server-xdmx/COPYING"
+}
+
+package_xorg-server-devel() {
+ pkgdesc="Development files for the X.Org X server"
+ depends=(xproto randrproto renderproto xextproto inputproto kbproto fontsproto videoproto dri2proto xineramaproto xorg-util-macros pixman libpciaccess)
+
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+
+ rm -rf "${pkgdir}/usr/bin"
+ rm -rf "${pkgdir}/usr/share/man"
+ rm -rf "${pkgdir}/usr/share/doc"
+ rm -rf "${pkgdir}/usr/share/X11"
+ rm -rf "${pkgdir}/usr/lib/xorg"
+ rm -rf "${pkgdir}/var"
+
+ install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-devel"
+ ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server-devel/COPYING"
+}
diff --git a/testing/xorg-server/autoconfig-nvidia.patch b/testing/xorg-server/autoconfig-nvidia.patch
new file mode 100644
index 000000000..6d5220ac7
--- /dev/null
+++ b/testing/xorg-server/autoconfig-nvidia.patch
@@ -0,0 +1,28 @@
+diff -Nur xorg-server-1.11.99.902.orig/hw/xfree86/common/xf86pciBus.c xorg-server-1.11.99.902/hw/xfree86/common/xf86pciBus.c
+--- xorg-server-1.11.99.902.orig/hw/xfree86/common/xf86pciBus.c 2012-02-10 10:10:37.583014924 +0000
++++ xorg-server-1.11.99.902/hw/xfree86/common/xf86pciBus.c 2012-02-10 11:16:07.148971317 +0000
+@@ -1144,7 +1144,23 @@
+ int idx = 0;
+
+ #ifdef __linux__
+- driverList[idx++] = "nouveau";
++ switch (dev->device_id)
++ {
++ /* NV1 */
++ case 0x0008:
++ case 0x0009:
++ driverList[idx++] = "vesa";
++ break;
++ /* NV3 */
++ case 0x0018:
++ case 0x0019:
++ driverList[idx++] = "nouveau";
++ break;
++ default:
++ driverList[idx++] = "nouveau";
++ driverList[idx++] = "nvidia";
++ break;
++ }
+ #endif
+ driverList[idx++] = "nv";
+ break;
diff --git a/testing/xorg-server/autoconfig-sis.patch b/testing/xorg-server/autoconfig-sis.patch
new file mode 100644
index 000000000..0b50049db
--- /dev/null
+++ b/testing/xorg-server/autoconfig-sis.patch
@@ -0,0 +1,21 @@
+--- hw/xfree86/common/xf86pciBus.c.orig 2011-09-24 10:53:45.421697668 +0000
++++ hw/xfree86/common/xf86pciBus.c 2011-09-24 10:55:56.416250708 +0000
+@@ -1200,9 +1200,15 @@
+ break;
+ }
+ break;
+- case 0x1039:
+- driverList[0] = "sis";
+- break;
++ case 0x1039:
++ switch (dev->device_id)
++ {
++ case 0x6350: case 0x6351:
++ driverList[0] = "sisimedia"; driverList[1] = "sis"; break;
++ default:
++ driverList[0] = "sis"; break;
++ }
++ break;
+ case 0x126f:
+ driverList[0] = "siliconmotion";
+ break;
diff --git a/testing/xorg-server/xvfb-run b/testing/xorg-server/xvfb-run
new file mode 100644
index 000000000..4c2f4e0d3
--- /dev/null
+++ b/testing/xorg-server/xvfb-run
@@ -0,0 +1,180 @@
+#!/bin/sh
+
+# $Id: xvfb-run 2027 2004-11-16 14:54:16Z branden $
+
+# This script starts an instance of Xvfb, the "fake" X server, runs a command
+# with that server available, and kills the X server when done. The return
+# value of the command becomes the return value of this script.
+#
+# If anyone is using this to build a Debian package, make sure the package
+# Build-Depends on xvfb, xbase-clients, and xfonts-base.
+
+set -e
+
+PROGNAME=xvfb-run
+SERVERNUM=99
+AUTHFILE=
+ERRORFILE=/dev/null
+STARTWAIT=3
+XVFBARGS="-screen 0 640x480x8"
+LISTENTCP="-nolisten tcp"
+XAUTHPROTO=.
+
+# Query the terminal to establish a default number of columns to use for
+# displaying messages to the user. This is used only as a fallback in the event
+# the COLUMNS variable is not set. ($COLUMNS can react to SIGWINCH while the
+# script is running, and this cannot, only being calculated once.)
+DEFCOLUMNS=$(stty size 2>/dev/null | awk '{print $2}') || true
+if ! expr "$DEFCOLUMNS" : "[[:digit:]]\+$" >/dev/null 2>&1; then
+ DEFCOLUMNS=80
+fi
+
+# Display a message, wrapping lines at the terminal width.
+message () {
+ echo "$PROGNAME: $*" | fmt -t -w ${COLUMNS:-$DEFCOLUMNS}
+}
+
+# Display an error message.
+error () {
+ message "error: $*" >&2
+}
+
+# Display a usage message.
+usage () {
+ if [ -n "$*" ]; then
+ message "usage error: $*"
+ fi
+ cat <<EOF
+Usage: $PROGNAME [OPTION ...] COMMAND
+Run COMMAND (usually an X client) in a virtual X server environment.
+Options:
+-a --auto-servernum try to get a free server number, starting at
+ --server-num
+-e FILE --error-file=FILE file used to store xauth errors and Xvfb
+ output (default: $ERRORFILE)
+-f FILE --auth-file=FILE file used to store auth cookie
+ (default: ./.Xauthority)
+-h --help display this usage message and exit
+-n NUM --server-num=NUM server number to use (default: $SERVERNUM)
+-l --listen-tcp enable TCP port listening in the X server
+-p PROTO --xauth-protocol=PROTO X authority protocol name to use
+ (default: xauth command's default)
+-s ARGS --server-args=ARGS arguments (other than server number and
+ "-nolisten tcp") to pass to the Xvfb server
+ (default: "$XVFBARGS")
+-w DELAY --wait=DELAY delay in seconds to wait for Xvfb to start
+ before running COMMAND (default: $STARTWAIT)
+EOF
+}
+
+# Find a free server number by looking at .X*-lock files in /tmp.
+find_free_servernum() {
+ # Sadly, the "local" keyword is not POSIX. Leave the next line commented in
+ # the hope Debian Policy eventually changes to allow it in /bin/sh scripts
+ # anyway.
+ #local i
+
+ i=$SERVERNUM
+ while [ -f /tmp/.X$i-lock ]; do
+ i=$(($i + 1))
+ done
+ echo $i
+}
+
+# Clean up files
+clean_up() {
+ if [ -e "$AUTHFILE" ]; then
+ XAUTHORITY=$AUTHFILE xauth remove ":$SERVERNUM" >>"$ERRORFILE" 2>&1
+ fi
+ if [ -n "$XVFB_RUN_TMPDIR" ]; then
+ if ! rm -r "$XVFB_RUN_TMPDIR"; then
+ error "problem while cleaning up temporary directory"
+ exit 5
+ fi
+ fi
+}
+
+# Parse the command line.
+ARGS=$(getopt --options +ae:f:hn:lp:s:w: \
+ --long auto-servernum,error-file:,auth-file:,help,server-num:,listen-tcp,xauth-protocol:,server-args:,wait: \
+ --name "$PROGNAME" -- "$@")
+GETOPT_STATUS=$?
+
+if [ $GETOPT_STATUS -ne 0 ]; then
+ error "internal error; getopt exited with status $GETOPT_STATUS"
+ exit 6
+fi
+
+eval set -- "$ARGS"
+
+while :; do
+ case "$1" in
+ -a|--auto-servernum) SERVERNUM=$(find_free_servernum) ;;
+ -e|--error-file) ERRORFILE="$2"; shift ;;
+ -f|--auth-file) AUTHFILE="$2"; shift ;;
+ -h|--help) SHOWHELP="yes" ;;
+ -n|--server-num) SERVERNUM="$2"; shift ;;
+ -l|--listen-tcp) LISTENTCP="" ;;
+ -p|--xauth-protocol) XAUTHPROTO="$2"; shift ;;
+ -s|--server-args) XVFBARGS="$2"; shift ;;
+ -w|--wait) STARTWAIT="$2"; shift ;;
+ --) shift; break ;;
+ *) error "internal error; getopt permitted \"$1\" unexpectedly"
+ exit 6
+ ;;
+ esac
+ shift
+done
+
+if [ "$SHOWHELP" ]; then
+ usage
+ exit 0
+fi
+
+if [ -z "$*" ]; then
+ usage "need a command to run" >&2
+ exit 2
+fi
+
+if ! which xauth >/dev/null; then
+ error "xauth command not found"
+ exit 3
+fi
+
+# tidy up after ourselves
+trap clean_up EXIT
+
+# If the user did not specify an X authorization file to use, set up a temporary
+# directory to house one.
+if [ -z "$AUTHFILE" ]; then
+ XVFB_RUN_TMPDIR="$(mktemp -d -t $PROGNAME.XXXXXX)"
+ AUTHFILE="$XVFB_RUN_TMPDIR/Xauthority"
+fi
+
+# Start Xvfb.
+MCOOKIE=$(mcookie)
+XAUTHORITY=$AUTHFILE xauth source - << EOF >>"$ERRORFILE" 2>&1
+add :$SERVERNUM $XAUTHPROTO $MCOOKIE
+EOF
+XAUTHORITY=$AUTHFILE Xvfb ":$SERVERNUM" $XVFBARGS $LISTENTCP >>"$ERRORFILE" \
+ 2>&1 &
+XVFBPID=$!
+sleep "$STARTWAIT"
+if ! kill -0 $XVFBPID 2>/dev/null; then
+ echo "Xvfb failed to start" >&2
+ exit 1
+fi
+
+# Start the command and save its exit status.
+set +e
+DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE "$@" 2>&1
+RETVAL=$?
+set -e
+
+# Kill Xvfb now that the command has exited.
+kill $XVFBPID
+
+# Return the executed command's exit status.
+exit $RETVAL
+
+# vim:set ai et sts=4 sw=4 tw=80:
diff --git a/testing/xorg-server/xvfb-run.1 b/testing/xorg-server/xvfb-run.1
new file mode 100644
index 000000000..137d3a196
--- /dev/null
+++ b/testing/xorg-server/xvfb-run.1
@@ -0,0 +1,282 @@
+.\" $Id: xvfb-run.1 2138 2005-01-17 23:40:27Z branden $
+.\"
+.\" Copyright 1998-2004 Branden Robinson <branden@debian.org>.
+.\"
+.\" This is free software; you may redistribute it and/or modify
+.\" it under the terms of the GNU General Public License as
+.\" published by the Free Software Foundation; either version 2,
+.\" or (at your option) any later version.
+.\"
+.\" This is distributed in the hope that it will be useful, but
+.\" WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public License with
+.\" the Debian operating system, in /usr/share/common-licenses/GPL; if
+.\" not, write to the Free Software Foundation, Inc., 59 Temple Place,
+.\" Suite 330, Boston, MA 02111-1307 USA
+.\"
+.\" We need the URL macro from groff's www macro package, but also want
+.\" things to work all right for people who don't have it. So we define
+.\" our own URL macro and let the www macro package override it if it's
+.\" available.
+.de URL
+\\$2 \(laURL: \\$1 \(ra\\$3
+..
+.if \n[.g] .mso www.tmac
+.TH xvfb\-run 1 "2004\-11\-12" "Debian Project"
+.SH NAME
+xvfb\-run \- run specified X client or command in a virtual X server environment
+.SH SYNOPSIS
+.B xvfb\-run
+[
+.I options
+]
+.I command
+.SH DESCRIPTION
+.B xvfb\-run
+is a wrapper for the
+.BR Xvfb (1x)
+command which simplifies the task of running commands (typically an X
+client, or a script containing a list of clients to be run) within a virtual
+X server environment.
+.PP
+.B xvfb\-run
+sets up an X authority file (or uses an existing user\-specified one),
+writes a cookie to it (see
+.BR xauth (1x))
+and then starts the
+.B Xvfb
+X server as a background process.
+The process ID of
+.B Xvfb
+is stored for later use.
+The specified
+.I command
+is then run using the X display corresponding to the
+.B Xvfb
+server
+just started and the X authority file created earlier.
+.PP
+When the
+.I command
+exits, its status is saved, the
+.B Xvfb
+server is killed (using the process ID stored earlier), the X authority
+cookie removed, and the authority file deleted (if the user did not specify
+one to use).
+.B xvfb\-run
+then exits with the exit status of
+.IR command .
+.PP
+.B xvfb\-run
+requires the
+.B xauth
+command to function.
+.SH OPTIONS
+.TP
+.B \-a\fR,\fB \-\-auto\-servernum
+Try to get a free server number, starting at 99, or the argument to
+.BR \-\-server\-num .
+.TP
+.BI \-e\ file \fR,\fB\ \-\-error\-file= file
+Store output from
+.B xauth
+and
+.B Xvfb
+in
+.IR file .
+The default is
+.IR /dev/null .
+.TP
+.BI \-f\ file \fR,\fB\ \-\-auth\-file= file
+Store X authentication data in
+.IR file .
+By default, a temporary directory called
+.IR xvfb\-run. PID
+(where PID is the process ID of
+.B xvfb\-run
+itself) is created in the directory specified by the environment variable
+.B TMPDIR
+(or
+.I /tmp
+if that variable is null or unset), and the
+.BR tempfile (1)
+command is used to create a file in that temporary directory called
+.IR Xauthority .
+.TP
+.B \-h\fR,\fB \-\-help
+Display a usage message and exit.
+.TP
+.BI \-n\ servernumber \fR,\fB\ \-\-server\-num= servernumber
+Use
+.I servernumber
+as the server number (but see the
+.B \-a\fR,\fB \-\-auto\-servernum
+option above).
+The default is 99.
+.TP
+.B \-l\fR,\fB \-\-listen\-tcp
+Enable TCP port listening in the X server.
+For security reasons (to avoid denial\-of\-service attacks or exploits),
+TCP port listening is disabled by default.
+.TP
+.BI \-p\ protocolname \fR,\fB\ \-\-xauth\-protocol= protocolname
+Use
+.I protocolname
+as the X authority protocol to use.
+The default is \(oq.\(cq, which
+.B xauth
+interprets as its own default protocol, which is MIT\-MAGIC\-COOKIE\-1.
+.TP
+.BI \-s\ arguments \fR,\fB\ \-\-server\-args= arguments
+Pass
+.I arguments
+to the
+.B Xvfb
+server.
+Be careful to quote any whitespace characters that may occur within
+.I arguments
+to prevent them from regarded as separators for
+.BR xvfb\-run 's
+own arguments.
+Also, note that specification of \(oq\-nolisten tcp\(cq in
+.I arguments
+may override the function of
+.BR xvfb\-run 's
+own
+.B \-l\fR,\fB \-\-listen\-tcp
+option, and that specification of the server number (e.g., \(oq:1\(cq) may
+be ignored because of the way the X server parses its argument list.
+Use the
+.B xvfb\-run
+option
+.BI \-n\ servernumber \fR,\fB\ \-\-server\-num= servernumber
+to achieve the latter function.
+The default is \(oq\-screen 0 640x480x8\(cq.
+.TP
+.BI \-w\ delay \fR,\fB\ \-\-wait= delay
+Wait
+.I delay
+seconds after launching
+.B Xvfb
+before attempting to start the specified command.
+The default is 3.
+.SH ENVIRONMENT
+.TP
+.B COLUMNS
+indicates the width of the terminal device in character cells.
+This value is used for formatting diagnostic messages.
+If not set, the terminal is queried using
+.BR stty (1)
+to determine its width.
+If that fails, a value of \(oq80\(cq is assumed.
+.TP
+.B TMPDIR
+specifies the directory in which to place
+.BR xvfb\-run 's
+temporary directory for storage of the X authority file; only used if the
+.B \-f
+or
+.B \-\-auth\-file
+options are not specified.
+.SH "OUTPUT FILES"
+.PP
+Unless the
+.B \-f
+or
+.B \-\-auth\-file
+options are specified, a temporary
+directory and file within it are created (and deleted) to store the X
+authority cookies used by the
+.B Xvfb
+server and client(s) run under it.
+See
+.BR tempfile (1).
+If \-f or \-\-auth\-file are used, then the specified X authority file is
+only written to, not created or deleted (though
+.B xauth
+creates an authority file itself if told to use use that does not already
+exist).
+.PP
+An error file with a user\-specified name is also created if the
+.B \-e
+or
+.B \-\-error\-file
+options are specifed; see above.
+.SH "EXIT STATUS"
+.B xvfb\-run
+uses its exit status as well as output to standard error to communicate
+diagnostics.
+The exit status of \(oq1\(cq is not used, and should be interpreted as failure
+of the specified command.
+.TP
+0
+.B xvfb\-run
+only uses this exit status if the
+.B \-h\fR,\fB \-\-help
+option is given.
+In all other situations, this may be interpreted as success of the specified
+command.
+.TP
+2
+No command to run was specified.
+.TP
+3
+The
+.B xauth
+command is not available.
+.TP
+4
+The temporary directory that was going to be used already exists; since
+.B xvfb\-run
+produces a uniquely named directory, this may indicate an attempt by another
+process on the system to exploit a temporary file race condition.
+.TP
+5
+A problem was encountered while cleaning up the temporary directory.
+.TP
+6
+A problem was encountered while using
+.BR getopt (1)
+to parse the command\-line arguments.
+.SH EXAMPLES
+.TP
+.B xvfb\-run \-\-auto\-servernum \-\-server\-num=1 xlogo
+runs the
+.BR xlogo (1x)
+demonstration client inside the
+.B Xvfb
+X server on the first available server number greater than or equal to 1.
+.TP
+.B xvfb\-run \-\-server\-args="\-screen 0 1024x768x24" ico \-faces
+runs the
+.BR ico (1x)
+demonstration client (and passes it the
+.B \-faces
+argument) inside the
+.B Xvfb
+X server, configured with a root window of 1024 by 768 pixels and a color
+depth of 24 bits.
+.PP
+Note that the demo X clients used in the above examples will not exit on
+their own, so they will have to be killed before
+.B xvfb\-run
+will exit.
+.SH BUGS
+See
+.URL "http://bugs.debian.org/xvfb" "the Debian Bug Tracking System" .
+If you wish to report a bug in
+.BR xvfb\-run ,
+please use the
+.BR reportbug (1)
+command.
+.SH AUTHOR
+.B xfvb\-run
+was written by Branden Robinson and Jeff Licquia with sponsorship from
+Progeny Linux Systems.
+.SH "SEE ALSO"
+.BR Xvfb (1x),
+.BR xauth (1x)
+.\" vim:set et tw=80: