summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-06-11 00:02:18 +0000
committerroot <root@rshg054.dnsready.net>2012-06-11 00:02:18 +0000
commit4714cec7e8367a7618b168d0db4bc085dbfaac8a (patch)
treeb1f3049ee78988b0db6ec69637a1ee37c8b63b3f
parent7b2739f21a7ed0d52497fa381c9a2383e71ab7a8 (diff)
Mon Jun 11 00:02:18 UTC 2012
-rw-r--r--community-staging/miredo/PKGBUILD49
-rw-r--r--community-staging/miredo/isatapd.rc.d37
-rw-r--r--community-staging/miredo/miredo-server.rc.d37
-rw-r--r--community-staging/miredo/miredo.install8
-rw-r--r--community-staging/miredo/miredo.rc.d37
-rw-r--r--community-staging/miredo/miredo.service11
-rw-r--r--community-staging/oss/PKGBUILD98
-rw-r--r--community-staging/oss/oss.install30
-rw-r--r--community-staging/oss/oss.service12
-rw-r--r--community-staging/oss/rc-script30
-rw-r--r--community-staging/oss/remove-hal.patch20
-rw-r--r--community-staging/oss/rm-init-scripts.patch52
-rw-r--r--community-staging/oss/soundon.patch28
-rw-r--r--community-staging/pdnsd/PKGBUILD28
-rw-r--r--community-staging/pdnsd/pdnsd37
-rw-r--r--community-staging/pdnsd/pdnsd.service9
-rw-r--r--community-staging/prosody/ChangeLog398
-rw-r--r--community-staging/prosody/PKGBUILD60
-rw-r--r--community-staging/prosody/fix-config.patch32
-rw-r--r--community-staging/prosody/prosody.install35
-rw-r--r--community-staging/prosody/prosody.logrotated9
-rw-r--r--community-staging/prosody/prosody.rcd93
-rw-r--r--community-staging/prosody/prosody.service13
-rw-r--r--community-staging/prosody/prosody.tmpfile.d1
-rw-r--r--community/guake/PKGBUILD28
-rw-r--r--community/guake/guake-fix-notification.patch42
-rw-r--r--community/guake/guake-fix-pref.desktop.patch11
-rw-r--r--community/hostapd/PKGBUILD72
-rw-r--r--community/hostapd/hostapd.service11
-rw-r--r--community/lxdm/PKGBUILD7
-rw-r--r--community/miredo/PKGBUILD2
-rw-r--r--community/openntpd/PKGBUILD20
-rwxr-xr-xcommunity/openntpd/openntpd21
-rw-r--r--community/openntpd/openntpd.install25
-rw-r--r--community/openntpd/openntpd.service10
-rw-r--r--community/openntpd/openntpd.tmpfiles1
-rw-r--r--community/prosody/PKGBUILD2
-rw-r--r--community/prosody/prosody.service0
-rw-r--r--extra/cairo/PKGBUILD10
-rw-r--r--extra/cairo/cairo-1.12.2-reduce-broken-stopped-edge-continuation.patch275
-rw-r--r--extra/gnome-session/PKGBUILD6
-rw-r--r--extra/gnome-session/timeout.patch16
-rw-r--r--extra/hylafax/PKGBUILD8
-rw-r--r--extra/samba/PKGBUILD4
-rw-r--r--extra/samba/samba.install2
-rw-r--r--libre/iceweasel-libre/PKGBUILD4
-rw-r--r--libre/iceweasel-libre/libre.patch12
-rw-r--r--libre/linux-libre-lts/PKGBUILD4
-rw-r--r--libre/linux-libre-lts/linux-libre-lts.install4
-rw-r--r--libre/linux-libre/PKGBUILD4
-rw-r--r--libre/linux-libre/linux-libre.install2
-rw-r--r--social/gnuhealth/PKGBUILD45
-rw-r--r--social/python-relatorio/PKGBUILD21
-rw-r--r--social/python2-polib/PKGBUILD25
-rw-r--r--social/trytond/PKGBUILD30
-rw-r--r--social/trytond/trytond.install20
-rw-r--r--social/trytond/trytond.rc52
-rw-r--r--staging/bind/127.0.0.zone11
-rw-r--r--staging/bind/PKGBUILD86
-rw-r--r--staging/bind/install21
-rw-r--r--staging/bind/localhost.zone10
-rwxr-xr-xstaging/bind/named52
-rw-r--r--staging/bind/named.conf64
-rw-r--r--staging/bind/named.conf.d4
-rw-r--r--staging/bind/named.logrotate6
-rw-r--r--staging/bind/named.service10
-rw-r--r--staging/bind/remove-tools.patch12
-rw-r--r--staging/clamav/PKGBUILD70
-rw-r--r--staging/clamav/conf.d8
-rw-r--r--staging/clamav/config.patch30
-rw-r--r--staging/clamav/gcc47.patch51
-rw-r--r--staging/clamav/install14
-rw-r--r--staging/clamav/logrotate8
-rw-r--r--staging/clamav/rc.d66
-rw-r--r--staging/clamav/service10
-rw-r--r--staging/clamav/service.fresh10
-rw-r--r--staging/clamav/tmpfiles.d1
-rw-r--r--staging/cronie/PKGBUILD68
-rw-r--r--staging/cronie/cron.deny1
-rw-r--r--staging/cronie/pam.d10
-rwxr-xr-xstaging/cronie/rc.d38
-rw-r--r--staging/cronie/service10
-rw-r--r--staging/ffmpeg/PKGBUILD10
-rw-r--r--staging/glibc/PKGBUILD328
-rw-r--r--staging/glibc/glibc-2.14-libdl-crash.patch132
-rw-r--r--staging/glibc/glibc-2.14-reexport-rpc-interface.patch26
-rw-r--r--staging/glibc/glibc-2.14-reinstall-nis-rpc-headers.patch28
-rw-r--r--staging/glibc/glibc-2.15-__libc_res_nquerydomain-out-of-bounds.patch24
-rw-r--r--staging/glibc/glibc-2.15-arena.patch29
-rw-r--r--staging/glibc/glibc-2.15-avx.patch196
-rw-r--r--staging/glibc/glibc-2.15-confstr-local-buffer-extent.patch297
-rw-r--r--staging/glibc/glibc-2.15-do-not-install-timezone-files-2.patch20
-rw-r--r--staging/glibc/glibc-2.15-do-not-install-timezone-files.patch124
-rw-r--r--staging/glibc/glibc-2.15-feraiseexcept-plt.patch20
-rw-r--r--staging/glibc/glibc-2.15-fix-res_query-assert.patch51
-rw-r--r--staging/glibc/glibc-2.15-fmtmsg-locking.patch148
-rw-r--r--staging/glibc/glibc-2.15-gb18030.patch.gzbin0 -> 470126 bytes
-rw-r--r--staging/glibc/glibc-2.15-ifunc.patch262
-rw-r--r--staging/glibc/glibc-2.15-lddebug-scopes.patch27
-rw-r--r--staging/glibc/glibc-2.15-multiarch-x86-strcmp.patch39
-rw-r--r--staging/glibc/glibc-2.15-nearbyintf-rounding.patch75
-rw-r--r--staging/glibc/glibc-2.15-negative-result-cache.patch138
-rw-r--r--staging/glibc/glibc-2.15-non-signalling-comparisons.patch886
-rw-r--r--staging/glibc/glibc-2.15-regex.patch16
-rw-r--r--staging/glibc/glibc-2.15-revert-c5a0802a.patch229
-rw-r--r--staging/glibc/glibc-2.15-revert-netlink-cache.patch680
-rw-r--r--staging/glibc/glibc-2.15-rintf-rounding.patch158
-rw-r--r--staging/glibc/glibc-2.15-scanf.patch19
-rw-r--r--staging/glibc/glibc-2.15-strcasecmp-disable-avx.patch48
-rw-r--r--staging/glibc/glibc-2.15-testsuite.patch110
-rw-r--r--staging/glibc/glibc-2.15-vdso.patch40
-rw-r--r--staging/glibc/glibc-2.15-vfprintf-nargs.patch180
-rw-r--r--staging/glibc/glibc-__i686.patch31
-rw-r--r--staging/glibc/glibc.install20
-rwxr-xr-xstaging/glibc/locale-gen42
-rw-r--r--staging/glibc/locale.gen.txt23
-rwxr-xr-xstaging/glibc/nscd.rcd65
-rw-r--r--staging/glibc/nscd.service17
-rw-r--r--staging/glibc/nscd.tmpfiles1
-rw-r--r--staging/gpsd/PKGBUILD83
-rwxr-xr-xstaging/gpsd/gpsd43
-rw-r--r--staging/gpsd/gpsd.conf.d5
-rw-r--r--staging/gpsd/gpsd.install11
-rw-r--r--staging/ntp/PKGBUILD64
-rw-r--r--staging/ntp/install37
-rw-r--r--staging/ntp/logrotate.d4
-rw-r--r--staging/ntp/ntp.conf23
-rwxr-xr-xstaging/ntp/ntpd47
-rw-r--r--staging/ntp/ntpd.conf5
-rw-r--r--staging/ntp/ntpd.service12
-rwxr-xr-xstaging/ntp/ntpdate29
-rw-r--r--staging/openssh/PKGBUILD96
-rwxr-xr-xstaging/openssh/sshd45
-rw-r--r--staging/openssh/sshd.close-sessions17
-rw-r--r--staging/openssh/sshd.confd4
-rw-r--r--staging/openssh/sshd.pam13
-rw-r--r--staging/openssh/sshd.service19
-rw-r--r--staging/openssh/sshd.socket10
-rw-r--r--staging/openssh/sshdgenkeys.service18
-rw-r--r--staging/openssh/tmpfiles.d1
-rw-r--r--staging/squid/PKGBUILD94
-rw-r--r--staging/squid/squid48
-rw-r--r--staging/squid/squid.conf.d4
-rw-r--r--staging/squid/squid.cron9
-rw-r--r--staging/squid/squid.install26
-rw-r--r--staging/squid/squid.pam4
-rw-r--r--staging/squid/squid.service13
-rw-r--r--staging/yp-tools/PKGBUILD31
-rw-r--r--staging/yp-tools/domainname.service11
-rw-r--r--staging/ypbind-mt/PKGBUILD50
-rw-r--r--staging/ypbind-mt/nisdomainname.conf4
-rwxr-xr-xstaging/ypbind-mt/ypbind35
-rw-r--r--staging/ypbind-mt/ypbind.conf4
-rw-r--r--staging/ypbind-mt/ypbind.service13
-rw-r--r--testing/ethtool/PKGBUILD27
155 files changed, 8022 insertions, 107 deletions
diff --git a/community-staging/miredo/PKGBUILD b/community-staging/miredo/PKGBUILD
new file mode 100644
index 000000000..9ae82e37d
--- /dev/null
+++ b/community-staging/miredo/PKGBUILD
@@ -0,0 +1,49 @@
+# $Id: PKGBUILD 72176 2012-06-09 17:04:19Z dreisner $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+
+pkgname=miredo
+pkgver=1.2.5
+pkgrel=2
+pkgdesc="Teredo client and server."
+arch=('i686' 'x86_64')
+url="http://www.remlab.net/miredo/"
+license=('GPL')
+depends=('judy' 'iproute2' 'libcap')
+backup=('etc/miredo/miredo.conf'
+ 'etc/miredo/client-hook')
+options=('!libtool')
+source=(http://www.remlab.net/files/${pkgname}/${pkgname}-${pkgver}.tar.xz
+ isatapd.rc.d
+ miredo.install
+ miredo.rc.d
+ miredo-server.rc.d
+ miredo.service)
+md5sums=('5114debbf9fcab5d292176e4548f8cd1'
+ '51ab6d091192605ee9206944869cb2ab'
+ 'd1b655d7a851cdb46c91c3418ed1962f'
+ 'c5a9be5c3175fecec387f1710bfd2788'
+ '319aba1ae06349b76cb25fda0dba60a9'
+ '3216d47d5aa979706b17b72d8b6e19b0')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --libexecdir=/usr/lib \
+ --with-Judy
+ make
+ make DESTDIR="$pkgdir" install
+
+ install -D -m755 $srcdir/miredo.rc.d $pkgdir/etc/rc.d/miredo
+ install -D -m755 $srcdir/miredo-server.rc.d $pkgdir/etc/rc.d/miredo-server
+ install -D -m755 $srcdir/isatapd.rc.d $pkgdir/etc/rc.d/isatapd
+ sed -i 's#/sbin/ip#/usr/sbin/ip#' $pkgdir/etc/miredo/client-hook
+
+ # avoid conflict with filesystem>=2012.06
+ rmdir "$pkgdir/var/run" "$pkgdir/var"
+
+ install -Dm644 "$srcdir/miredo.service" "$pkgdir/usr/lib/systemd/system/miredo.service"
+}
diff --git a/community-staging/miredo/isatapd.rc.d b/community-staging/miredo/isatapd.rc.d
new file mode 100644
index 000000000..fa7bbd708
--- /dev/null
+++ b/community-staging/miredo/isatapd.rc.d
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/isatapd`
+case "$1" in
+ start)
+ stat_busy "Starting userspace ISATAP client"
+ if [ -z "$PID" ]; then
+ /usr/sbin/isatapd
+ fi
+ if [ ! -z "$PID" -o $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon isatapd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping userspace ISATAP client"
+ [ ! -z "$PID" ] && kill $PID &>/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon isatapd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
diff --git a/community-staging/miredo/miredo-server.rc.d b/community-staging/miredo/miredo-server.rc.d
new file mode 100644
index 000000000..d05513b23
--- /dev/null
+++ b/community-staging/miredo/miredo-server.rc.d
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/miredo-server`
+case "$1" in
+ start)
+ stat_busy "Starting teredo protocol server"
+ if [ -z "$PID" ]; then
+ /usr/sbin/miredo-server
+ fi
+ if [ ! -z "$PID" -o $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon miredo-server
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping teredo protocol server"
+ [ ! -z "$PID" ] && kill $PID &>/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon miredo-server
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
diff --git a/community-staging/miredo/miredo.install b/community-staging/miredo/miredo.install
new file mode 100644
index 000000000..338459fb3
--- /dev/null
+++ b/community-staging/miredo/miredo.install
@@ -0,0 +1,8 @@
+post_remove() {
+
+ # clean up just in case
+ rm -f /var/run/miredo.pid
+ rm -f /var/run/miredo-server.pid
+ rm -f /var/run/isatapd.pid
+}
+
diff --git a/community-staging/miredo/miredo.rc.d b/community-staging/miredo/miredo.rc.d
new file mode 100644
index 000000000..500374b12
--- /dev/null
+++ b/community-staging/miredo/miredo.rc.d
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/miredo`
+case "$1" in
+ start)
+ stat_busy "Starting teredo protocol client"
+ if [ -z "$PID" ]; then
+ /usr/sbin/miredo
+ fi
+ if [ ! -z "$PID" -o $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon miredo
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping teredo protocol client"
+ [ ! -z "$PID" ] && kill $PID &>/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon miredo
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
diff --git a/community-staging/miredo/miredo.service b/community-staging/miredo/miredo.service
new file mode 100644
index 000000000..299a887de
--- /dev/null
+++ b/community-staging/miredo/miredo.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Teredo IPv6 Tunneling Daemon
+After=network.target
+
+[Service]
+ExecStartPre=/usr/sbin/miredo-checkconf /etc/miredo/miredo.conf
+ExecStart=/usr/sbin/miredo -f
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target \ No newline at end of file
diff --git a/community-staging/oss/PKGBUILD b/community-staging/oss/PKGBUILD
new file mode 100644
index 000000000..c99ab1737
--- /dev/null
+++ b/community-staging/oss/PKGBUILD
@@ -0,0 +1,98 @@
+# $Id: PKGBUILD 72165 2012-06-09 11:25:01Z bluewind $
+# Maintainer: Florian Pritz <bluewind@xinu.at>
+# Contributor: Paulo Matias <matiasΘarchlinux-br·org>
+# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
+
+pkgbase=oss
+pkgname=(oss libflashsupport-oss)
+pkgver=4.2_2006
+pkgrel=2
+arch=('i686' 'x86_64')
+url="http://developer.opensound.com/"
+license=('GPL2')
+makedepends=('gtk2')
+source=("http://www.4front-tech.com/developer/sources/stable/gpl/oss-v${pkgver/_*}-build${pkgver/*_}-src-gpl.tar.bz2"
+ "rm-init-scripts.patch"
+ "rc-script"
+ "soundon.patch"
+ "remove-hal.patch"
+ "oss.service"
+ )
+md5sums=('ca25c06bb7d0c6495e1b6f55d1bad96c'
+ 'b9a380a0ac8896390d71ac13676f27e1'
+ 'cbcbce5c03b127df5eafa8faa091492c'
+ '65f07fe241bfbf912f76d8b6d8f276b5'
+ 'cd7f1dc6166bba8c94d96f3a28e948a5'
+ '8db0255b380dc6672993e627d1cd8ca6')
+_dir=oss-v${pkgver/_*}-build${pkgver/*_}-src-gpl
+
+build() {
+ cd "${srcdir}/${_dir}"
+
+ # Avoid these flags conflicting with OSS build system.
+ unset CFLAGS
+ unset LDFLAGS
+ unset OSFLAGS
+ unset LIBRARIES
+ export NO_WARNING_CHECKS=yes
+
+ # Compile libflashsupport.so only in packaging time, so we avoid
+ # conflicts with other packages and ease package management.
+ msg "Building libflashsupport.so."
+ cd oss/lib
+ gcc -shared -fPIC -O2 -Wall -Werror flashsupport.c -o libflashsupport.so
+
+ msg "Preparing the build environment."
+ cd "${srcdir}"
+
+ # Create build directory and configure
+ rm -rf build
+ mkdir build && cd build
+ "${srcdir}/${_dir}/configure" --enable-libsalsa=NO --regparm
+
+ msg "Building OSS."
+ make build
+
+ msg "Patching init scripts."
+ cd "${srcdir}/build/prototype"
+ rm usr/lib/oss/etc/S89oss
+ patch -p0 -i "${srcdir}/rm-init-scripts.patch"
+ patch -p0 -i "${srcdir}/soundon.patch"
+ # remove hal dependency
+ patch -p0 -i "${srcdir}/remove-hal.patch"
+ rm -rf usr/lib/oss/scripts/oss_usb-create-devices usr/lib/oss/scripts/90-oss_usb-create-device.fdi
+
+ sed -i 's#/lib/modules/$KERNEL_VERSION/kernel/#/lib/modules/$KERNEL_VERSION/extramodules/kernel/#g' usr/sbin/soundon
+ sed -i 's#/lib/modules/$UNAME/kernel/#/lib/modules/$UNAME/extramodules/kernel/#g' usr/lib/oss/build/install.sh
+ sed -i 's#mkdir /lib/modules#mkdir -p /lib/modules#' usr/lib/oss/build/install.sh
+}
+
+package_oss() {
+ pkgdesc="Open Sound System UNIX audio architecture"
+ depends=('gcc' 'make' 'linux-headers' 'libtool' 'sed')
+ optdepends=('gtk2: for graphical mixer (ossxmix)'
+ 'libflashsupport-oss: Adobe flash plugin support')
+ conflicts=('oss-linux' 'oss-linux-free' 'oss-testing')
+ backup=('usr/lib/oss/soundon.user')
+ install=oss.install
+
+ cd "${srcdir}/build/prototype"
+ cp -a * "${pkgdir}"
+
+ chmod -R a+r "${pkgdir}" # All files can have read permission (FS#13815)
+ find "${pkgdir}" -type d -exec chmod a+x '{}' \; # Make namcap happy
+ install -Dm755 "${srcdir}/rc-script" "${pkgdir}/etc/rc.d/oss"
+ install -Dm644 "$srcdir/oss.service" "$pkgdir/usr/lib/systemd/system"
+}
+
+package_libflashsupport-oss() {
+ pkgdesc="Adobe flash plugin support lib (OSSv4)"
+ conflicts=('libflashsupport' 'libflashsupport-pulse' 'libflashsupport-oss')
+ depends=('oss')
+
+ cd "${srcdir}/${_dir}"
+
+ install -dm755 "$pkgdir/usr/lib"
+ ln -s oss/lib/libflashsupport.so "$pkgdir/usr/lib/libflashsupport.so"
+}
+
diff --git a/community-staging/oss/oss.install b/community-staging/oss/oss.install
new file mode 100644
index 000000000..672d63644
--- /dev/null
+++ b/community-staging/oss/oss.install
@@ -0,0 +1,30 @@
+post_install() {
+ echo "Running OSS install script..."
+ sh /usr/lib/oss/build/install.sh &>/dev/null
+ echo
+ echo " Note that OSS can't currently work together with kernel"
+ echo " ALSA modules, so they were moved out by the OSS install"
+ echo " scripts. If you want the ALSA kernel modules back, you can"
+ echo " just remove this package using pacman."
+}
+
+post_upgrade() {
+ echo "Running OSS update script..."
+ sh /usr/lib/oss/build/install.sh &>/dev/null
+
+ if [[ $(vercmp $2 4.2_2006) == "-1" ]]; then
+ echo "libflashsupport.so has been split into a seperate package."
+ echo "If you want flash to use oss, please install libflashsupport-oss"
+ fi
+}
+
+pre_remove() {
+ # Restore any replaced ALSA drivers.
+ sh /usr/lib/oss/scripts/restore_drv.sh
+}
+
+post_remove() {
+ echo " Open Sound System was now removed, and the ALSA kernel"
+ echo " modules were restored."
+}
+
diff --git a/community-staging/oss/oss.service b/community-staging/oss/oss.service
new file mode 100644
index 000000000..107c9bf3f
--- /dev/null
+++ b/community-staging/oss/oss.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Open Sound System v4
+Before=sound.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/sbin/soundon
+ExecStop=/usr/sbin/soundoff
+
+[Install]
+WantedBy=multi-user.target
diff --git a/community-staging/oss/rc-script b/community-staging/oss/rc-script
new file mode 100644
index 000000000..5c930107c
--- /dev/null
+++ b/community-staging/oss/rc-script
@@ -0,0 +1,30 @@
+#!/bin/bash
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+ stat_busy 'Starting Open Sound System'
+ if /usr/sbin/soundon; then
+ add_daemon oss
+ stat_done
+ else
+ stat_fail
+ fi
+ ;;
+ stop)
+ stat_busy 'Stopping Open Sound System'
+ if /usr/sbin/soundoff; then
+ rm_daemon oss
+ stat_done
+ else
+ stat_fail
+ fi
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+esac
diff --git a/community-staging/oss/remove-hal.patch b/community-staging/oss/remove-hal.patch
new file mode 100644
index 000000000..27e2ef2de
--- /dev/null
+++ b/community-staging/oss/remove-hal.patch
@@ -0,0 +1,20 @@
+Date: Tue Aug 2 16:37:31 CEST 2011
+Author: Florian Pritz <bluewind@xinu.at>
+This removes all hal dependencies
+
+References:
+http://www.archlinux.org/todo/92/
+
+--- usr/lib/oss/build/install_2011-08-02_162647.sh 2011-08-02 16:26:47.000000000 +0200
++++ usr/lib/oss/build/install.sh 2011-08-02 16:27:13.000000000 +0200
+@@ -336,10 +336,4 @@
+ echo "autosave_mixer yes" > $OSSLIBDIR/etc/userdefs
+ fi
+
+-# Hal 0.5.0+ hotplug
+-mkdir -p /usr/lib/hal/scripts
+-ln -sf $OSSLIBDIR/scripts/oss_usb-create-devices /usr/lib/hal/scripts/
+-mkdir -p /usr/share/hal/fdi/policy/20thirdparty/
+-ln -sf $OSSLIBDIR/scripts/90-oss_usb-create-device.fdi /usr/share/hal/fdi/policy/20thirdparty/
+-
+ exit 0
diff --git a/community-staging/oss/rm-init-scripts.patch b/community-staging/oss/rm-init-scripts.patch
new file mode 100644
index 000000000..981ff605f
--- /dev/null
+++ b/community-staging/oss/rm-init-scripts.patch
@@ -0,0 +1,52 @@
+--- usr/lib/oss/build/install.sh.orig 2008-09-25 11:41:47.180167692 -0300
++++ usr/lib/oss/build/install.sh 2008-09-25 11:41:47.180167692 -0300
+@@ -290,38 +290,6 @@
+ echo
+ fi
+
+-if ! test -d /etc/init.d
+-then
+- mkdir /etc/init.d
+-fi
+-
+-rm -f /etc/init.d/oss /etc/rc.d/rc3.d/S89oss /etc/rc3.d/S89oss
+-cp -f $OSSLIBDIR/etc/S89oss /etc/init.d/oss
+-
+-chmod 744 /etc/init.d/oss
+-
+-if test -x /sbin/chkconfig
+-then
+- /sbin/chkconfig oss on > /dev/null 2>&1
+-else
+- if test -x /usr/sbin/update-rc.d
+- then
+- /usr/sbin/update-rc.d oss defaults > /dev/null 2>&1
+- else
+- if test -d etc/rc.d/rc3.d
+- then
+- rm -f /etc/rc.d/rc3.d/S89oss
+- ln -s /etc/init.d/oss /etc/rc.d/rc3.d/S89oss
+- else
+- if test -d /etc/rc3.d
+- then
+- rm -f /etc/rc3.d/S89oss
+- ln -s /etc/init.d/oss /etc/rc3.d/S89oss
+- fi
+- fi
+- fi
+-fi
+-
+ # Install ALSA interface module (Cuckoo)
+ #(cd $OSSLIBDIR/cuckoo && make clean) > /dev/null 2>&1
+ #if (cd $OSSLIBDIR/cuckoo && make install) > /var/log/cuckoo.log 2>&1
+--- usr/lib/oss/scripts/restore_drv.sh.orig 2008-09-25 11:41:47.210168487 -0300
++++ usr/lib/oss/scripts/restore_drv.sh 2008-09-25 11:41:47.210168487 -0300
+@@ -18,8 +18,6 @@
+ fi
+ fi
+
+-rm -f /etc/init.d/oss
+-
+ if ! test -d /lib/modules/`uname -r`/kernel/sound
+ then
+ if test -f /lib/modules/`uname -r`/sound-preoss.tar.bz2
diff --git a/community-staging/oss/soundon.patch b/community-staging/oss/soundon.patch
new file mode 100644
index 000000000..4702b8680
--- /dev/null
+++ b/community-staging/oss/soundon.patch
@@ -0,0 +1,28 @@
+--- usr/sbin/soundon.old 2009-09-04 06:35:26.000000000 +0100
++++ usr/sbin/soundon 2009-11-15 13:59:53.000000000 +0000
+@@ -255,7 +255,10 @@
+ then
+ if test "`uname -m` " = "x86_64 "
+ then
+- ln -sf $OSSLIBDIR/lib/libsalsa.so.2.0.0 /usr/lib64/libasound.so.2
++ # Fix for compatibility with Arch's directory structure
++ # Not that we use it, there is no $OSSLIBDIR/.libsalsa_installed
++ ln -sf $OSSLIBDIR/lib/libsalsa.so.2.0.0 /usr/lib/libasound.so.2
++ #ln -sf $OSSLIBDIR/lib/libsalsa.so.2.0.0 /usr/lib64/libasound.so.2
+ #ln -sf $OSSLIBDIR/lib/libOSSlib.so /usr/lib64
+ else
+ if test -s /lib/libasound.so.2
+@@ -278,8 +281,11 @@
+ then
+ if test "`uname -m` " = "x86_64 "
+ then
+- ln -sf $OSSLIBDIR/lib/libOSSlib.so /usr/lib64
+- ln -sf $OSSLIBDIR/lib/libossmix.so /usr/lib64
++ # Fix for compatibility with Arch's directory structure
++ ln -sf $OSSLIBDIR/lib/libOSSlib.so /usr/lib
++ ln -sf $OSSLIBDIR/lib/libossmix.so /usr/lib
++ #ln -sf $OSSLIBDIR/lib/libOSSlib.so /usr/lib64
++ #ln -sf $OSSLIBDIR/lib/libossmix.so /usr/lib64
+ else
+ if test -s /lib/libasound.so.2
+ then
diff --git a/community-staging/pdnsd/PKGBUILD b/community-staging/pdnsd/PKGBUILD
new file mode 100644
index 000000000..6a6526d54
--- /dev/null
+++ b/community-staging/pdnsd/PKGBUILD
@@ -0,0 +1,28 @@
+# $Id: PKGBUILD 72152 2012-06-09 06:03:43Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Henrik Nymann Jensen <h@henriknj.dk>
+
+pkgname=pdnsd
+pkgver=1.2.9
+pkgrel=2
+pkgdesc="Is a proxy DNS server with permanent caching"
+arch=(i686 x86_64)
+url="http://members.home.nl/p.a.rombouts/pdnsd/"
+license=('GPL')
+depends=('glibc')
+#backup=('etc/pdnsd.conf')
+source=(http://members.home.nl/p.a.rombouts/pdnsd/releases/pdnsd-$pkgver-par.tar.gz
+ pdnsd
+ pdnsd.service)
+md5sums=('037f79d191b98974ffc2c9649727bf66'
+ '3670bd47c9303fbb655d9216715512de'
+ 'fad5e518d126b29fc947941d57a0a494')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ ./configure --prefix=/usr --sysconfdir=/etc
+ make
+ make DESTDIR=$pkgdir install
+ install -Dm0755 $srcdir/pdnsd $pkgdir/etc/rc.d/pdnsd
+ install -Dm0644 $srcdir/pdnsd.service $pkgdir/usr/lib/systemd/system/pdnsd.service
+}
diff --git a/community-staging/pdnsd/pdnsd b/community-staging/pdnsd/pdnsd
new file mode 100644
index 000000000..34a541d18
--- /dev/null
+++ b/community-staging/pdnsd/pdnsd
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/pdnsd`
+case "$1" in
+ start)
+ stat_busy "Starting pdnsd Daemon"
+ if [ -z "$PID" ]; then
+ /usr/sbin/pdnsd -d
+ fi
+ if [ ! -z "$PID" -o $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon pdnsd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping pdnsd Daemon"
+ [ ! -z "$PID" ] && kill -TERM $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon pdnsd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
diff --git a/community-staging/pdnsd/pdnsd.service b/community-staging/pdnsd/pdnsd.service
new file mode 100644
index 000000000..5821dbcb2
--- /dev/null
+++ b/community-staging/pdnsd/pdnsd.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=proxy name server
+After=network.target
+
+[Service]
+ExecStart=/usr/sbin/pdnsd
+
+[Install]
+WantedBy=multi-user.target
diff --git a/community-staging/prosody/ChangeLog b/community-staging/prosody/ChangeLog
new file mode 100644
index 000000000..45f3a05fd
--- /dev/null
+++ b/community-staging/prosody/ChangeLog
@@ -0,0 +1,398 @@
+2009-11-23 Dwayne Bent <dbb.0@liqd.org>
+
+ * .hgtags:
+ Added tag v0.6.0-1 for changeset 6c5b7e66bee4
+ [d573d1d7a403] [tip]
+
+ * .hgtags:
+ Removed tag v0.6.0-1
+ [6c5b7e66bee4] [v0.6.0-1]
+
+ * PKGBUILD:
+ Use correct package name and version
+ [1e65e6a877d3]
+
+ * .hgtags:
+ Added tag v0.6.0-1 for changeset ad52fee15148
+ [8196689dd4c4]
+
+ * PKGBUILD, prosody.cfg.lua:
+ Included mod_compression in example configuration file
+ [ad52fee15148]
+
+ * ChangeLog:
+ Updated ChangeLog
+ [34b6046aca14]
+
+ * PKGBUILD:
+ Updated checksums
+ [3b4c28f28321]
+
+ * PKGBUILD, prosody.cfg.lua:
+ New upstream version
+ [9d201755b63d]
+
+2009-10-22 Dwayne Bent <dbb.0@liqd.org>
+
+ * .hgtags:
+ Added tag v0.6.0rc1-1 for changeset c0a99ab935a8
+ [a0e2015435b6]
+
+ * ChangeLog, PKGBUILD:
+ New upstream version
+ [c0a99ab935a8] [v0.6.0rc1-1]
+
+ * PKGBUILD:
+ Removed conflicts
+ [0f0560190a81]
+
+ * PKGBUILD:
+ Removed makedepends for gcc, the base-devel group is assumed to
+ exist
+ [4160ed469fa4]
+
+ * PKGBUILD:
+ Fix typo in PKGBUILD
+ [85d988c7e4a5]
+
+2009-09-28 Dwayne Bent <dbb.0@liqd.org>
+
+ * ChangeLog, PKGBUILD:
+ New upstream version
+ [3e4ffcdc887a]
+
+2009-07-29 Dwayne Bent <dbb.0@liqd.org>
+
+ * .hgtags:
+ Added tag v0.5.1-1 for changeset 1be51884e580
+ [74f32914279c]
+
+ * ChangeLog, PKGBUILD:
+ New upstream version
+ [1be51884e580] [v0.5.1-1]
+
+2009-07-20 Dwayne Bent <dbb.0@liqd.org>
+
+ * .hgtags:
+ Corrected tag name
+ [d9662df69ab4]
+
+ * .hgtags:
+ Added tag v0.5.0 for changeset d228983b5873
+ [a350368643eb]
+
+ * PKGBUILD:
+ New upstream version
+ [d228983b5873] [v0.5.0-1]
+
+ * ChangeLog:
+ Updated ChangeLog
+ [111cf16bfc8b]
+
+2009-07-14 Dwayne Bent <dbb.0@liqd.org>
+
+ * .hgtags:
+ Added tag v0.5.0rc2-1 for changeset 701e6c5ed639
+ [828bb0fc4e5e]
+
+ * PKGBUILD:
+ New upstream version
+ [701e6c5ed639] [v0.5.0rc2-1]
+
+ * ChangeLog:
+ Updated ChangeLog
+ [7616eaf8b835]
+
+ * prosody.cfg.lua:
+ Enabled PEP in default configuration
+ [c8a7c4d15e38]
+
+2009-07-11 Dwayne Bent <dbb.0@liqd.org>
+
+ * prosody.cfg.lua:
+ Cleaned up and added new modules to default configuration file
+ [07fdc8fd8ff9]
+
+ * PKGBUILD:
+ Added luasec back as hard dependency
+ [9506bff48c77]
+
+ * .hgtags:
+ Added tag v0.5.0rc1-2 for changeset a252809a03a3
+ [803ace20879a]
+
+ * ChangeLog, PKGBUILD:
+ New release version
+ [a252809a03a3] [v0.5.0rc1-2]
+
+ * PKGBUILD:
+ Added make before make install
+
+ This should fix Prosody not correctly reporting version.
+ [881eca5b8e0e]
+
+ * .hgtags:
+ Added tag v0.5.0rc1-1 for changeset f1d918d4779e
+ [1fc8dbc498d5]
+
+ * ChangeLog:
+ New upstream version
+ [f1d918d4779e] [v0.5.0rc1-1]
+
+ * PKGBUILD, prosody.rcd:
+ Redid indent alignment and silenced successful output of prosodyctl
+ [de9bdd756bd8]
+
+ * PKGBUILD, prosody-datadir.diff:
+ Converted to prosody-devel package
+ [92e5e98529dd]
+
+2009-06-30 Dwayne Bent <dbb.0@liqd.org>
+
+ * PKGBUILD, prosody.cfg.lua:
+ Moved luasec from depends to optdepends
+
+ Since luasec is not strictly required for Prosody to operate it is
+ now an optional dependency.
+ [7079ec87eef5]
+
+2009-06-27 Dwayne Bent <dbb.0@liqd.org>
+
+ * .hgtags:
+ Added tag v0.4.2-4 for changeset 0345a59e8495
+ [1e488e1c03eb]
+
+ * PKGBUILD:
+ New release version
+ [0345a59e8495] [v0.4.2-4]
+
+ * prosody.install:
+ Added note about ChangeLog to install script
+ [c683ef309b6a]
+
+ * PKGBUILD, prosody.rcd:
+ Use prosodyctl to start/stop daemon
+ [eaf4c26bb29f]
+
+ * PKGBUILD, prosody.rcd:
+ Refactored start, stop, reload in rc.d script
+
+ Start, stop, reload will not display a friendly error message if
+ Prosody is not running when you attempt to stop or reload, or if
+ Prosody is already running when you attempt to start. Reload also
+ now utilizes the get_pid function.
+ [9873d5256a42]
+
+ * PKGBUILD, prosody.logrotated:
+ Use explicit log filenames in logrotate script
+
+ This fixes an issue where if you do not have olddir enabled, rotated
+ logs will be rotated again.
+ [38ea11efacb9]
+
+2009-06-22 Dwayne Bent <dbb.0@liqd.org>
+
+ * PKGBUILD, prosody.rcd:
+ Added status command to rc.d usage
+ [1b31e88d992d]
+
+ * PKGBUILD, prosody.rcd:
+ Added reload command
+ [62e3cbdff1d5]
+
+ * prosody.install:
+ Updated leftover olddir path
+ [e91b3fc2a9ee]
+
+ * PKGBUILD, prosody.rcd:
+ Use explicit source command
+ [b790c098d519]
+
+ * prosody.install:
+ Removed tab characters
+ [870316274137]
+
+2009-06-20 Dwayne Bent <dbb.0@liqd.org>
+
+ * PKGBUILD:
+ Updated md5 sums
+ [74ce2ab8a96b]
+
+ * prosody.logrotated:
+ Changed default olddir path
+ [cef8226473c2]
+
+ * prosody.rcd:
+ Removed sleep delay in restart
+ [a94167e59091]
+
+2009-06-10 Dwayne Bent <dbb.0@liqd.org>
+
+ * prosody.cfg.lua:
+ Removed per-host certificate entry in example configuration
+
+ Until Issue #30
+ [http://code.google.com/p/lxmppd/issues/detail?id=30] is fixed per-
+ host certificates have no effect.
+ [d00e35979450]
+
+2009-06-05 Dwayne Bent <dbb.0@liqd.org>
+
+ * ChangeLog:
+ Added ChangeLog
+ [7298c4da135a]
+
+2009-06-03 Dwayne Bent <dbb.0@liqd.org>
+
+ * .hgtags:
+ Added tag v0.4.2-3 for changeset 028183ffeba8
+ [7dbfd040e908]
+
+ * PKGBUILD:
+ New release version
+ [028183ffeba8] [v0.4.2-3]
+
+ * PKGBUILD:
+ Removed superfluous make command
+ [3d96c98bac26]
+
+ * PKGBUILD:
+ More consistent use of quote marks
+ [f6bd5b595b2d]
+
+ * PKGBUILD, prosody.logrotated:
+ Correct PID file location in logrotate script
+ [cec60904c739]
+
+2009-05-30 Dwayne Bent <dbb.0@liqd.org>
+
+ * .hgtags:
+ Added tag v0.4.2-2 for changeset 37268dd0d4fd
+ [a8a197635bb6]
+
+ * PKGBUILD:
+ New release version
+ [37268dd0d4fd] [v0.4.2-2]
+
+ * PKGBUILD:
+ Use install instead of mkdir in PKGBUILD
+ [8e48108bbe9a]
+
+ * PKGBUILD, prosody-datadir.diff:
+ Apply patch to fix world-readable data directory
+ [2c706dda941c]
+
+2009-05-23 Dwayne Bent <dbb.0@liqd.org>
+
+ * .hgtags:
+ Added tag v0.4.2-1 for changeset 1d29ea2dc519
+ [e2d2962de3f7]
+
+ * PKGBUILD:
+ New upstream release
+ [1d29ea2dc519] [v0.4.2-1]
+
+ * prosody.cfg.lua:
+ Aesthetic changes to the configuration file
+ [d5d848a58965]
+
+2009-05-22 Dwayne Bent <dbb.0@liqd.org>
+
+ * prosody.cfg.lua:
+ Removed extraneous semicolon in configuration file
+ [9a002c74edc2]
+
+ * PKGBUILD:
+ Cleaned up PKGBUILD license
+ [82cb66a84de8]
+
+2009-05-21 Dwayne Bent <dbb.0@liqd.org>
+
+ * prosody.install:
+ Changed formatting of leftover path messages.
+ [ac6069de93c9]
+
+ * prosody.install:
+ Moved prosody user removal to post_remove.
+ [2c60e27d0c13]
+
+ * PKGBUILD, prosody.cfg.lua:
+ Added comment about pidfile in prosody configuration file.
+ [8b9fa4da48ca]
+
+ * .hgtags:
+ Added tag v0.4.1-5 for changeset 69962178bcae
+ [01812099521b]
+
+ * PKGBUILD:
+ New release version.
+ [69962178bcae] [v0.4.1-5]
+
+ * PKGBUILD, prosody.cfg.lua, prosody.install, prosody.rcd:
+ Refactored rc.d daemon script.
+
+ Prosody now writes its own PID file to /var/run/prosody/prosody.pid.
+ rc.d script now uses '/bin/kill -0' to check for running process
+ instead of awkward combination of 'ps' and 'awk'.
+ [4f0e937c5148]
+
+ * prosody.install:
+ Added post_install message with link to Arch Wiki documentation.
+ [88d99267ad19]
+
+2009-05-19 Dwayne Bent <dbb.0@liqd.org>
+
+ * PKGBUILD:
+ Add logrotate script to backup array.
+ [d4f5445707f7]
+
+2009-05-11 Dwayne Bent <dbb.0@liqd.org>
+
+ * prosody.install:
+ Fixed install script attempting to add prosody group when it already
+ exists.
+ [7d7807aa5d30]
+
+ * .hgtags:
+ Added tag v0.4.1-4 for changeset 442f62077f30
+ [389c885a35c5]
+
+ * PKGBUILD:
+ New release version.
+ [442f62077f30] [v0.4.1-4]
+
+ * PKGBUILD:
+ Generated correct checksums for source files.
+ [162859c9e287]
+
+ * .hgtags:
+ Added tag v0.4.1-3 for changeset b629392e4716
+ [f3d11fbd0b45]
+
+ * PKGBUILD:
+ New release version.
+ [b629392e4716] [v0.4.1-3]
+
+ * prosody.logrotated:
+ Fixed wrong PID file path in logrotate script.
+ [0871a4a12392]
+
+2009-05-07 Dwayne Bent <dbb.0@liqd.org>
+
+ * prosody.cfg.lua, prosody.rcd:
+ Removed trailing whitespace.
+ [7c86c073650e]
+
+ * prosody.cfg.lua:
+ Added logging timestamps to default configuration.
+ [46f9111d47ce]
+
+ * .hgtags:
+ Added tag v0.4.1-2 for changeset 24b9dee19e65
+ [5240b39d76d7]
+
+ * PKGBUILD, prosody.cfg.lua, prosody.install, prosody.logrotated,
+ prosody.rcd:
+ Initial commit.
+ [24b9dee19e65] [v0.4.1-2]
+
diff --git a/community-staging/prosody/PKGBUILD b/community-staging/prosody/PKGBUILD
new file mode 100644
index 000000000..09eb15073
--- /dev/null
+++ b/community-staging/prosody/PKGBUILD
@@ -0,0 +1,60 @@
+# $Id: PKGBUILD 72153 2012-06-09 06:05:00Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Maintainer: Dwayne Bent <dbb.0@liqd.org>
+# Contributor: Paul-Sebastian Manole <brokenthorn@gmail.com>
+
+pkgname=prosody
+pkgver=0.8.2
+pkgrel=4
+pkgdesc="Lightweight and extensible Jabber/XMPP server written in Lua."
+arch=('i686' 'x86_64')
+url="http://prosody.im/"
+license=('MIT')
+depends=('lua>=5.1' 'luasocket' 'luaexpat' 'luafilesystem' 'libidn>=0.5.18' 'openssl')
+optdepends=('luasec: TLS encryption support'
+ 'lua-zlib: compression support'
+ 'luadbi: SQL storage support')
+install=prosody.install
+backup=('etc/logrotate.d/prosody'
+ 'etc/prosody/prosody.cfg.lua')
+source=("http://prosody.im/depot/${pkgver}/prosody-${pkgver}.tar.gz"
+ 'prosody.rcd'
+ 'prosody.logrotated'
+ 'fix-config.patch'
+ 'prosody.tmpfile.d'
+ 'prosody.service')
+md5sums=('6e907bf0d0acf24f1011083020ba6ffb'
+ 'd2b5f9c8e42bb31819e715eb1756ee53'
+ '26466fdbea87963a3ca6f48f76fe4a29'
+ '59a1bf2dfd0bd386cef6fa646e2a3752'
+ 'e2f5a1df410b05696a30dcb058841084'
+ 'e74045f27cb60908d535969906781f75')
+
+build() {
+ cd "$srcdir/prosody-$pkgver"
+ patch -p1 <$srcdir/fix-config.patch
+ ./configure --prefix=/usr --sysconfdir=/etc/prosody \
+ --datadir=/var/lib/prosody
+ make
+}
+
+package() {
+ cd "$srcdir/prosody-$pkgver"
+
+ make DESTDIR="$pkgdir" install
+
+ rm $pkgdir/etc/prosody/certs/*
+
+ install -d "$pkgdir/etc/rc.d"
+ install -d "$pkgdir/etc/logrotate.d"
+ install -d "$pkgdir/var/log/prosody"
+
+ install -o root -g root -m 755 "$srcdir/prosody.rcd" \
+ "$pkgdir/etc/rc.d/prosody"
+ install -o root -g root -m 644 "$srcdir/prosody.logrotated" \
+ "$pkgdir/etc/logrotate.d/prosody"
+
+ install -Dm0644 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING
+ install -Dm0644 $srcdir/prosody.tmpfile.d $pkgdir//usr/lib/tmpfiles.d/prosody.conf
+ install -Dm0644 $srcdir/prosody.service $pkgdir/usr/lib/systemd/system/prosody.service
+}
diff --git a/community-staging/prosody/fix-config.patch b/community-staging/prosody/fix-config.patch
new file mode 100644
index 000000000..8856bfb92
--- /dev/null
+++ b/community-staging/prosody/fix-config.patch
@@ -0,0 +1,32 @@
+diff -wbBur prosody-0.8.0/prosody.cfg.lua.dist prosody-0.8.0.my/prosody.cfg.lua.dist
+--- prosody-0.8.0/prosody.cfg.lua.dist 2011-04-05 13:47:06.000000000 +0000
++++ prosody-0.8.0.my/prosody.cfg.lua.dist 2011-04-07 16:03:42.000000000 +0000
+@@ -21,6 +21,8 @@
+ -- (see http://prosody.im/doc/creating_accounts for info)
+ -- Example: admins = { "user1@example.com", "user2@example.net" }
+ admins = { }
++daemonize = true
++pidfile = "/var/run/prosody/prosody.pid"
+
+ -- Enable use of libevent for better performance under high load
+ -- For more information see: http://prosody.im/doc/libevent
+@@ -59,7 +61,7 @@
+ --"admin_telnet"; -- Opens telnet console interface on localhost port 5582
+
+ -- Other specific functionality
+- --"posix"; -- POSIX functionality, sends server to background, enables syslog, etc.
++ "posix"; -- POSIX functionality, sends server to background, enables syslog, etc.
+ --"bosh"; -- Enable BOSH clients, aka "Jabber over HTTP"
+ --"httpserver"; -- Serve static files from a directory over HTTP
+ --"groups"; -- Shared roster support
+@@ -123,8 +125,8 @@
+ -- Logging configuration
+ -- For advanced logging see http://prosody.im/doc/logging
+ log = {
+- info = "prosody.log"; -- Change 'info' to 'debug' for verbose logging
+- error = "prosody.err";
++ info = "/var/log/prosody/prosody.log"; -- Change 'info' to 'debug' for verbose logging
++ error = "/var/log/prosody/prosody.err";
+ -- "*syslog"; -- Uncomment this for logging to syslog
+ -- "*console"; -- Log to the console, useful for debugging with daemonize=false
+ }
diff --git a/community-staging/prosody/prosody.install b/community-staging/prosody/prosody.install
new file mode 100644
index 000000000..f935e3d63
--- /dev/null
+++ b/community-staging/prosody/prosody.install
@@ -0,0 +1,35 @@
+post_install() {
+ if [ -z "`grep '^prosody:' /etc/group`" ]; then
+ groupadd -g 412 prosody
+ fi
+ if [ -z "`grep '^prosody:' /etc/passwd`" ]; then
+ useradd -u 412 -d /var/lib/prosody -g prosody -s /bin/false prosody
+ fi
+
+ chown prosody:prosody var/lib/prosody
+ chown prosody:prosody var/log/prosody
+
+ echo ">> Documentation: http://wiki.archlinux.org/index.php/Prosody"
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ userdel prosody
+
+ paths=(/etc/prosody /var/lib/prosody /var/log/prosody
+ /var/log/old/prosody)
+
+ first=true
+ for path in ${paths[@]}; do
+ if [ -d $path ]; then
+ if $first; then
+ first=false
+ echo "==> Leftover Paths:"
+ fi
+ echo "==> $path"
+ fi
+ done
+}
diff --git a/community-staging/prosody/prosody.logrotated b/community-staging/prosody/prosody.logrotated
new file mode 100644
index 000000000..5659ba01f
--- /dev/null
+++ b/community-staging/prosody/prosody.logrotated
@@ -0,0 +1,9 @@
+/var/log/prosody/prosody.log /var/log/prosody/prosody.err {
+ # olddir /var/log/old/prosody
+ create 644 prosody prosody
+ sharedscripts
+ missingok
+ postrotate
+ /bin/kill -HUP `cat /var/run/prosody/prosody.pid 2> /dev/null` 2> /dev/null || true
+ endscript
+}
diff --git a/community-staging/prosody/prosody.rcd b/community-staging/prosody/prosody.rcd
new file mode 100644
index 000000000..afaf77903
--- /dev/null
+++ b/community-staging/prosody/prosody.rcd
@@ -0,0 +1,93 @@
+#!/bin/bash
+
+daemon_name=prosody
+pid_file=/var/run/$daemon_name/$daemon_name.pid
+
+source /etc/rc.conf
+source /etc/rc.d/functions
+
+get_pid() {
+ if [ -f $pid_file ]; then
+ /bin/kill -0 $(cat $pid_file)
+ if [ $? == 0 ]; then
+ cat $pid_file
+ fi
+ fi
+}
+
+case "$1" in
+ start)
+ stat_busy "Starting $daemon_name daemon"
+
+ [ -d /var/run/$daemon_name ] || { mkdir -p /var/run/$daemon_name ; chown prosody:prosody /var/run/prosody; }
+ PID=$(get_pid)
+ if [ -z "$PID" ]; then
+ [ -f $pid_file ] && rm -f $pid_file
+ mkdir -p `dirname $pid_file`
+ prosodyctl start 1>/dev/null 2>/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ exit 1
+ else
+ add_daemon $daemon_name
+ stat_done
+ fi
+ else
+ stat_fail
+ printhl "$daemon_name is already running"
+ exit 1
+ fi
+ ;;
+
+ stop)
+ stat_busy "Stopping $daemon_name daemon"
+ PID=$(get_pid)
+ if [ ! -z "$PID" ]; then
+ prosodyctl stop 1>/dev/null 2>/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ exit 1
+ else
+ rm -f $pid_file &> /dev/null
+ rm_daemon $daemon_name
+ stat_done
+ fi
+ else
+ stat_fail
+ printhl "$daemon_name is not running"
+ exit 1
+ fi
+ ;;
+
+ restart)
+ $0 stop
+ $0 start
+ ;;
+
+ reload)
+ stat_busy "Reloading $daemon_name"
+ PID=$(get_pid)
+ if [ ! -z "$PID" ]; then
+ /bin/kill -HUP $PID 2> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ exit 1
+ else
+ stat_done
+ fi
+ else
+ stat_fail
+ printhl "$daemon_name is not running"
+ fi
+ ;;
+
+ status)
+ stat_busy "Checking $daemon_name status";
+ ck_status $daemon_name
+ ;;
+
+ *)
+ echo "usage: $0 {start|stop|restart|reload|status}"
+ esac
+
+exit 0
diff --git a/community-staging/prosody/prosody.service b/community-staging/prosody/prosody.service
new file mode 100644
index 000000000..f54159f55
--- /dev/null
+++ b/community-staging/prosody/prosody.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=XMPP (Jabber) Server
+After=network.target
+
+[Service]
+Type=forking
+PIDFile=/run/prosody/prosody.pid
+ExecStart=/usr/bin/prosodyctl start
+ExecStop=/usr/bin/prosodyctl stop
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/community-staging/prosody/prosody.tmpfile.d b/community-staging/prosody/prosody.tmpfile.d
new file mode 100644
index 000000000..5f6de657d
--- /dev/null
+++ b/community-staging/prosody/prosody.tmpfile.d
@@ -0,0 +1 @@
+d /run/prosody 0755 412 412
diff --git a/community/guake/PKGBUILD b/community/guake/PKGBUILD
index 9bd937c0e..96de81dee 100644
--- a/community/guake/PKGBUILD
+++ b/community/guake/PKGBUILD
@@ -1,34 +1,36 @@
-# $Id: PKGBUILD 68559 2012-03-28 06:25:01Z bgyorgy $
+# $Id: PKGBUILD 72161 2012-06-09 09:50:29Z bgyorgy $
# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Angel Velasquez <angvp@archlinux.org>
# Contributor: Wilson Pinto Júnior (N3RD3X) <n3rd3x@linuxmail.org>
pkgname=guake
-pkgver=0.4.2
-pkgrel=7
+pkgver=0.4.3
+pkgrel=1
pkgdesc='Drop-down terminal for GNOME'
arch=('i686' 'x86_64')
url="http://guake.org/"
license=('GPL')
-depends=('python-notify' 'vte' 'python2-gconf' 'dbus-python')
+depends=('python-notify' 'vte' 'python2-gconf' 'dbus-python' 'pyxdg')
makedepends=('intltool')
options=('!libtool')
install=$pkgname.install
source=(http://guake.org/files/$pkgname-$pkgver.tar.gz
- http://guake.org/raw-attachment/ticket/246/0001-Retrieve-port-as-int.2.patch
- guake-glib2.32.patch)
-md5sums=('1f0feff3bfc15c998147dbf07d9d8a8e'
- '9aca6ba8e46ae1b69958cda0e03320ff'
- 'ac692391e2fa171f6f96e5ceb2284c2d')
+ guake-fix-notification.patch
+ guake-fix-pref.desktop.patch)
+md5sums=('951e42f3c6b24912baab2f4f6c84e658'
+ '0b57227e6869dd84dd4fb0794ed0d082'
+ '0e042a6ac89f5e77c45a96c42494bc3d')
build() {
cd "$srcdir/$pkgname-$pkgver"
sed -i 's|schemadir = $(sysconfdir)/gconf/schemas|schemadir = $(GCONF_SCHEMA_FILE_DIR)|' data/Makefile.in
- sed -i 's|PYTHON="/usr/bin/python"|PYTHON="/usr/bin/python2"|' src/guake{,-prefs}.in
- patch -Np1 -i "$srcdir/guake-glib2.32.patch"
+ sed -i 's|/usr/bin/env python|/usr/bin/python2|' src/{guake{,-prefs},prefs.py}
- # Patch to import proxy port setting as int (http://guake.org/ticket/246)
- patch -Np1 -i "$srcdir/0001-Retrieve-port-as-int.2.patch"
+ # http://guake.org/ticket/416
+ patch -Np1 -i "$srcdir/guake-fix-notification.patch"
+
+ # http://guake.org/ticket/448
+ patch -Np1 -i "$srcdir/guake-fix-pref.desktop.patch"
# Do not disable autostart in GNOME
sed -i '/X-GNOME-Autostart-enabled/ d' data/guake.desktop.in
diff --git a/community/guake/guake-fix-notification.patch b/community/guake/guake-fix-notification.patch
new file mode 100644
index 000000000..847dac10e
--- /dev/null
+++ b/community/guake/guake-fix-notification.patch
@@ -0,0 +1,42 @@
+--- a/src/guake 2011-02-09 20:00:35.000000000 +0100
++++ b/src/guake 2012-02-25 00:55:28.513075769 +0100
+@@ -46,7 +46,10 @@
+ TERMINAL_MATCH_EXPRS, TERMINAL_MATCH_TAGS, \
+ ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTER
+
+-pynotify.init('Guake!')
++popup_works = True
++if not pynotify.init('Guake!') or pynotify.get_server_info() == None :
++ popup_works = False
++ print "WARNING: could not use popup notification"
+
+ GNOME_FONT_PATH = '/desktop/gnome/interface/monospace_font_name'
+
+@@ -637,7 +640,12 @@
+ 'Please use Guake Preferences dialog to choose another '
+ 'key (The trayicon was enabled)') % label, filename)
+ self.client.set_bool(KEY('/general/use_trayicon'), True)
+- notification.show()
++ if popup_works :
++ notification.show()
++ else :
++ print _('A problem happened when binding <b>%s</b> key.\n'
++ 'Please use Guake Preferences dialog to choose another '
++ 'key (The trayicon was enabled)') % label
+
+ elif self.client.get_bool(KEY('/general/use_popup')):
+ # Pop-up that shows that guake is working properly (if not
+@@ -646,7 +654,11 @@
+ _('Guake!'),
+ _('Guake is now running,\n'
+ 'press <b>%s</b> to use it.') % label, filename)
+- notification.show()
++ if popup_works :
++ notification.show()
++ else :
++ print _('Guake is now running,\n'
++ 'press <b>%s</b> to use it.') % label
+
+ def execute_command(self, command, tab=None):
+ """Execute the `command' in the `tab'. If tab is None, the
+
diff --git a/community/guake/guake-fix-pref.desktop.patch b/community/guake/guake-fix-pref.desktop.patch
new file mode 100644
index 000000000..6bd256d28
--- /dev/null
+++ b/community/guake/guake-fix-pref.desktop.patch
@@ -0,0 +1,11 @@
+--- guake-0.4.2-orig/data/guake-prefs.desktop.in 2009-12-01 12:51:08.000000000 +0100
++++ guake-0.4.2/data/guake-prefs.desktop.in 2012-05-21 17:07:05.982022360 +0200
+@@ -2,7 +2,7 @@
+ Encoding=UTF-8
+ Name=Guake Preferences
+ Name[pt_BR]=Preferências do Guake
+-Comment=Comment=Configure your Guake sessions
++Comment=Configure your Guake sessions
+ Comment[pt_BR]=Configurações do terminal Guake
+ TryExec=guake-prefs
+ Exec=guake-prefs
diff --git a/community/hostapd/PKGBUILD b/community/hostapd/PKGBUILD
index 02d9efcfd..f9d8ccebf 100644
--- a/community/hostapd/PKGBUILD
+++ b/community/hostapd/PKGBUILD
@@ -1,62 +1,68 @@
-# $Id: PKGBUILD 70872 2012-05-18 10:00:26Z spupykin $
+# $Id: PKGBUILD 72181 2012-06-09 21:54:04Z heftig $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
pkgname=hostapd
pkgver=1.0
-pkgrel=1
-pkgdesc="daemon for wireless software access points"
+pkgrel=2
+pkgdesc="IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator"
arch=('i686' 'x86_64')
url="http://hostap.epitest.fi/hostapd/"
license=('custom')
depends=('openssl' 'libnl')
-makedepends=()
-provides=('hostapd')
-conflicts=('hostapd')
backup=('etc/hostapd/hostapd.conf'
- 'etc/conf.d/hostapd'
- 'etc/hostapd/hlr_auc_gw.milenage_db'
- 'etc/hostapd/hostapd.accept'
- 'etc/hostapd/hostapd.deny'
- 'etc/hostapd/hostapd.eap_user'
- 'etc/hostapd/hostapd.radius_clients'
- 'etc/hostapd/hostapd.sim_db'
- 'etc/hostapd/hostapd.vlan'
- 'etc/hostapd/hostapd.wpa_psk'
- 'etc/hostapd/wired.conf')
+ 'etc/conf.d/hostapd'
+ 'etc/hostapd/hlr_auc_gw.milenage_db'
+ 'etc/hostapd/hostapd.accept'
+ 'etc/hostapd/hostapd.deny'
+ 'etc/hostapd/hostapd.eap_user'
+ 'etc/hostapd/hostapd.radius_clients'
+ 'etc/hostapd/hostapd.sim_db'
+ 'etc/hostapd/hostapd.vlan'
+ 'etc/hostapd/hostapd.wpa_psk'
+ 'etc/hostapd/wired.conf')
install=hostapd.install
source=(http://hostap.epitest.fi/releases/$pkgname-$pkgver.tar.gz
- config
- hostapd
- hostapd.conf.d)
+ config hostapd hostapd.conf.d hostapd.service)
md5sums=('236247a7bbd4f60d5fa3e99849d1ffc9'
'5d7ee10b04e33f22c37be56a4c33dddb'
'd570327c385f34a4af24d3a0d61cea19'
- 'f169534b0f59b341f6df1a21e0344511')
+ 'f169534b0f59b341f6df1a21e0344511'
+ 'a0a16879eed5e4e41ae6b225a4809955')
build() {
- cd "$srcdir/$pkgname-$pkgver"/hostapd
- cp "$srcdir/config" ./.config
+ cd $pkgname-$pkgver/hostapd
+ cp ../../config .config
sed -i 's#/etc/hostapd#/etc/hostapd/hostapd#' hostapd.conf
- export CFLAGS="$CFLAGS `pkg-config --cflags libnl-3.0`"
+ export CFLAGS="$CFLAGS $(pkg-config --cflags libnl-3.0)"
make
}
package() {
- cd "$srcdir/$pkgname-$pkgver/hostapd"
+ # RC script
+ install -D hostapd "$pkgdir/etc/rc.d/hostapd"
+ install -Dm644 hostapd.conf.d "$pkgdir/etc/conf.d/hostapd"
- install -D hostapd "$pkgdir/usr/bin/hostapd"
- install hostapd_cli "$pkgdir/usr/bin/hostapd_cli"
+ # Systemd unit
+ install -Dm644 hostapd.service "$pkgdir/usr/lib/systemd/system/hostapd.service"
- install -Dm644 hlr_auc_gw.milenage_db "$pkgdir/etc/hostapd/hlr_auc_gw.milenage_db"
+ cd $pkgname-$pkgver
+
+ # License
+ install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
+
+ cd hostapd
+
+ # Binaries
+ install -d "$pkgdir/usr/bin"
+ install -t "$pkgdir/usr/bin" hostapd hostapd_cli
+
+ # Configuration
+ install -d "$pkgdir/etc/hostapd"
install -m644 -t "$pkgdir/etc/hostapd" \
hostapd.{accept,conf,deny,eap_user,radius_clients,sim_db,vlan,wpa_psk} \
- wired.conf
+ wired.conf hlr_auc_gw.milenage_db
+ # Man pages
install -Dm644 hostapd.8 "$pkgdir/usr/share/man/man8/hostapd.8"
install -Dm644 hostapd_cli.1 "$pkgdir/usr/share/man/man1/hostapd_cli.1"
-
- install -D "$srcdir/hostapd" "$pkgdir/etc/rc.d/hostapd"
- install -Dm644 "$srcdir/hostapd.conf.d" "$pkgdir/etc/conf.d/hostapd"
-
- install -Dm644 ../COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}
diff --git a/community/hostapd/hostapd.service b/community/hostapd/hostapd.service
new file mode 100644
index 000000000..f278bf793
--- /dev/null
+++ b/community/hostapd/hostapd.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
+After=network.target
+
+[Service]
+Type=forking
+PIDFile=/run/hostapd.pid
+ExecStart=/usr/bin/hostapd /etc/hostapd/hostapd.conf -P /run/hostapd.pid -B
+
+[Install]
+WantedBy=multi-user.target
diff --git a/community/lxdm/PKGBUILD b/community/lxdm/PKGBUILD
index 0b729267c..1a9e48db5 100644
--- a/community/lxdm/PKGBUILD
+++ b/community/lxdm/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 70485 2012-05-09 14:58:36Z bpiotrowski $
+# $Id: PKGBUILD 72159 2012-06-09 08:34:59Z bpiotrowski $
# Maintainer: Bartłomiej Piotrowski
# Contributor: AndyRTR <andyrtr@archlinux.org>
# Contributor: kiefer <jorgelmadrid@gmail.com>
pkgname=lxdm
pkgver=0.4.1
-pkgrel=10
+pkgrel=11
pkgdesc="Lightweight Display Manager (part of LXDE)"
arch=('i686' 'x86_64')
url="http://sourceforge.net/projects/lxdm/"
@@ -54,4 +54,7 @@ package() {
# fix the greeter location
sed -i -e "s/local\/libexec/lib\/lxdm/" ${pkgdir}/etc/lxdm/lxdm.conf
+
+ # avoid conflict with filesystem>=2012.06
+ rm -r "$pkgdir/var/run"
}
diff --git a/community/miredo/PKGBUILD b/community/miredo/PKGBUILD
index 8499bfcd8..7e4715c96 100644
--- a/community/miredo/PKGBUILD
+++ b/community/miredo/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 72132 2012-06-08 23:58:54Z dreisner $
+# $Id: PKGBUILD 72149 2012-06-09 06:02:05Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
pkgname=miredo
diff --git a/community/openntpd/PKGBUILD b/community/openntpd/PKGBUILD
index 3d82658ca..5bddf7dca 100644
--- a/community/openntpd/PKGBUILD
+++ b/community/openntpd/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 68196 2012-03-18 22:40:01Z arodseth $
+# $Id: PKGBUILD 72171 2012-06-09 14:07:36Z dreisner $
# Maintainer: Vesa Kaihlavirta <vegai@iki.fi>
# Contributor: Mark Rosenstand <mark@borkware.net>
# Contributor: Giorgio Lando <patroclo7@gmail.com> (adjtimex patch)
@@ -6,7 +6,7 @@
pkgname=openntpd
pkgver=3.9p1
-pkgrel=14
+pkgrel=15
pkgdesc="Free, easy to use implementation of the Network Time Protocol."
url="http://www.openntpd.org/"
arch=('x86_64' 'i686')
@@ -15,11 +15,13 @@ depends=('openssl')
backup=('etc/ntpd.conf' 'etc/conf.d/openntpd')
install=$pkgname.install
source=(ftp://ftp.openbsd.org/pub/OpenBSD/OpenNTPD/$pkgname-$pkgver.tar.gz
- 'openntpd' 'openntpd.conf' 'linux-adjtimex.patch')
+ 'openntpd' 'openntpd.conf' 'linux-adjtimex.patch' 'openntpd.tmpfiles' 'openntpd.service')
sha256sums=('83dd7c1e8ec8b4567afe49af539271b5a73562fb7a3ca51df73eccba89ec8c49'
- '14b08ad387b4e16293c43386f25758699461b8b57afe41a49cc795a5e517f71e'
+ 'b486b7034b8d3d790b6bc1793dd8a44c68b82c8dc833b617c60674b0a7c9d98f'
'77a0d1f3439d779c2ce259becf3fa583c21a16682a4f5327094da2e9837f6f96'
- '3abcec94c072b5913ef7156a22049d796ff04e19105befe1ea81a66522928fd2')
+ '3abcec94c072b5913ef7156a22049d796ff04e19105befe1ea81a66522928fd2'
+ 'fe12841110c3c080519e248988c4b6334f54bd9646b015753c7e15de2a9600c5'
+ 'b54b88cb0fe35636405e2b09744633cd815edb3e8c864035bcdb05f727858f53')
build() {
cd "$srcdir/$pkgname-$pkgver"
@@ -30,7 +32,7 @@ build() {
--prefix=/usr \
--sysconfdir=/etc \
--with-privsep-user=ntp \
- --with-privsep-path=/var/run/openntpd/ \
+ --with-privsep-path=/run/openntpd/ \
--with-adjtimex
make
}
@@ -44,6 +46,12 @@ package() {
install -Dm644 "$srcdir/$pkgname-$pkgver/LICENCE" \
"$pkgdir/usr/share/licenses/$pkgname/LICENCE"
sed -i 's/\*/0.0.0.0/' $pkgdir/etc/ntpd.conf
+
+ install -Dm644 "$srcdir/openntpd.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/openntpd.conf"
+ install -Dm644 "$srcdir/openntpd.service" "$pkgdir/usr/lib/systemd/system/openntpd.service"
+
+ # avoid conflict with filesystem>=2012.06
+ rm -r "$pkgdir/run"
}
# vim:set ts=2 sw=2 et:
diff --git a/community/openntpd/openntpd b/community/openntpd/openntpd
index 0e630736c..59fa8107d 100755
--- a/community/openntpd/openntpd
+++ b/community/openntpd/openntpd
@@ -1,32 +1,27 @@
#!/bin/bash
CONF=/etc/conf.d/openntpd
-RUNDIR=/var/run/openntpd
. /etc/rc.conf
. /etc/rc.d/functions
+[[ -f $CONF ]] && . "$CONF"
-[ -f $CONF ] && . $CONF
-
-PID=`pidof -o %PPID /usr/sbin/ntpd`
-case "$1" in
+PID=$(pidof -o %PPID /usr/sbin/ntpd)
+case $1 in
start)
stat_busy "Starting OpenNTPD"
- [ -d $RUNDIR ] || mkdir $RUNDIR
- [ -z "$PID" ] && /usr/sbin/ntpd $PARAMS
- if [ $? -gt 0 ]; then
+ [[ -d /run/openntpd ]] || mkdir /run/openntpd
+ if [[ $PID ]] || ! /usr/sbin/ntpd $PARAMS; then
stat_fail
else
- PID=`pidof -o %PPID /usr/sbin/ntpd`
- echo $PID >/var/run/openntpd.pid
+ pidof -o %PPID /usr/sbin/ntpd >/run/openntpd.pid
add_daemon openntpd
stat_done
fi
;;
stop)
stat_busy "Stopping OpenNTPD"
- [ ! -z "$PID" ] && kill $PID &>/dev/null
- if [ $? -gt 0 ]; then
+ if [[ -z $PID ]] || ! kill $PID &>/dev/null; then
stat_fail
else
rm_daemon openntpd
@@ -38,6 +33,6 @@ case "$1" in
$0 start
;;
*)
- echo "usage: $0 {start|stop|restart}"
+ echo "usage: $0 {start|stop|restart}"
esac
exit 0
diff --git a/community/openntpd/openntpd.install b/community/openntpd/openntpd.install
index 99223f355..42063ef21 100644
--- a/community/openntpd/openntpd.install
+++ b/community/openntpd/openntpd.install
@@ -1,17 +1,24 @@
-post_install() {
- if [ ! "`grep ^ntp /etc/group`" ]; then
- echo "adding new group: ntp"
- /usr/sbin/groupadd -g 87 ntp
+createuser() {
+ if ! getent group ntp >/dev/null; then
+ groupadd -g 87 ntp
fi
-
- if [ ! "`grep ^ntp /etc/passwd`" ]; then
- echo "adding new user: ntp"
- /usr/sbin/useradd -g ntp -u 87 -d /var/empty -s /bin/false -c 'Network Time Protocol' ntp
+
+ if ! getent passwd ntp >/dev/null; then
+ useradd -g ntp -u 87 -d /var/empty -s /bin/false -c 'Network Time Protocol' ntp
fi
}
+post_install() {
+ createuser
+ systemd-tmpfiles --create /usr/lib/tmpfiles.d/openntpd.conf
+}
+
post_upgrade() {
- post_install $1
+ createuser
+}
+
+post_remove() {
+ userdel ntp >/dev/null
}
# vim: ts=2 sw=2 et ft=sh
diff --git a/community/openntpd/openntpd.service b/community/openntpd/openntpd.service
new file mode 100644
index 000000000..db76531d1
--- /dev/null
+++ b/community/openntpd/openntpd.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=OpenNTP Daemon
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/ntpd
+
+[Install]
+WantedBy=multi-user.target
diff --git a/community/openntpd/openntpd.tmpfiles b/community/openntpd/openntpd.tmpfiles
new file mode 100644
index 000000000..3a34146fc
--- /dev/null
+++ b/community/openntpd/openntpd.tmpfiles
@@ -0,0 +1 @@
+d /run/openntpd 0755 root root -
diff --git a/community/prosody/PKGBUILD b/community/prosody/PKGBUILD
index 1955b7069..1eb5bc5c2 100644
--- a/community/prosody/PKGBUILD
+++ b/community/prosody/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 70828 2012-05-17 10:16:37Z spupykin $
+# $Id: PKGBUILD 72148 2012-06-09 06:00:05Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Dwayne Bent <dbb.0@liqd.org>
# Contributor: Paul-Sebastian Manole <brokenthorn@gmail.com>
diff --git a/community/prosody/prosody.service b/community/prosody/prosody.service
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/community/prosody/prosody.service
diff --git a/extra/cairo/PKGBUILD b/extra/cairo/PKGBUILD
index d57a5c8b6..52ff6100b 100644
--- a/extra/cairo/PKGBUILD
+++ b/extra/cairo/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 158854 2012-05-12 13:09:25Z andyrtr $
+# $Id: PKGBUILD 161326 2012-06-09 14:55:04Z foutrelis $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Brice Carpentier <brice@daknet.org>
@@ -6,7 +6,7 @@ pkgname=cairo
#_gitdate=20120426
#_gitver=957a9cc619965178a8927d114fe852034fc2385c
pkgver=1.12.2
-pkgrel=1
+pkgrel=2
pkgdesc="Cairo vector graphics library"
arch=(i686 x86_64)
license=('LGPL' 'MPL')
@@ -20,15 +20,19 @@ options=('!libtool')
source=(http://cairographics.org/releases/$pkgname-$pkgver.tar.xz
#$pkgname-$pkgver.tar.gz::http://cgit.freedesktop.org/cairo/snapshot/cairo-${_gitver}.tar.gz
cairo-1.10.0-buggy_gradients.patch
+ cairo-1.12.2-reduce-broken-stopped-edge-continuation.patch
#git_fixes.patch
)
md5sums=('87649eb75789739d517c743e94879e51'
- '9b323790dab003e228c6955633cb888e')
+ '9b323790dab003e228c6955633cb888e'
+ '75ec73746cfaefcbed0e9b2a9f76bf00')
build() {
cd "$srcdir/$pkgname-$pkgver"
#cd ${srcdir}/${pkgname}-${_gitver}
patch -Np1 -i ${srcdir}/cairo-1.10.0-buggy_gradients.patch
+ # https://bugs.freedesktop.org/show_bug.cgi?id=50852
+ patch -Np1 -i ${srcdir}/cairo-1.12.2-reduce-broken-stopped-edge-continuation.patch
# status is 2012-04-26 last commit: image: Fix typo in _blit_spans()
#patch -Np1 -i ${srcdir}/git_fixes.patch
autoreconf -vfi
diff --git a/extra/cairo/cairo-1.12.2-reduce-broken-stopped-edge-continuation.patch b/extra/cairo/cairo-1.12.2-reduce-broken-stopped-edge-continuation.patch
new file mode 100644
index 000000000..e3bb30580
--- /dev/null
+++ b/extra/cairo/cairo-1.12.2-reduce-broken-stopped-edge-continuation.patch
@@ -0,0 +1,275 @@
+From f228769dfe5a8b5d73c49a41e95e31ed73a77fb3 Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Fri, 08 Jun 2012 16:22:41 +0000
+Subject: polygon-reduce: Reduce broken stopped-edge continuation
+
+This is hopefully a lesser used path and the attempted optimisation to
+continue a stopped edge with a colinear stopped edge highly unlikely and
+lost in the noise of the general inefficiency of the routine. As it was
+broken, rather than attempt to rectify the "optimisation" remove it.
+
+Reported-by: Evangelos Foutras <evangelos@foutrelis.com>
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50852
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+---
+diff --git a/src/cairo-polygon-reduce.c b/src/cairo-polygon-reduce.c
+index 8758070..ea457fe 100644
+--- a/src/cairo-polygon-reduce.c
++++ b/src/cairo-polygon-reduce.c
+@@ -42,6 +42,8 @@
+ #include "cairo-freelist-private.h"
+ #include "cairo-combsort-inline.h"
+
++#define DEBUG_POLYGON 0
++
+ typedef cairo_point_t cairo_bo_point32_t;
+
+ typedef struct _cairo_bo_intersect_ordinate {
+@@ -114,7 +116,6 @@ typedef struct _cairo_bo_event_queue {
+
+ typedef struct _cairo_bo_sweep_line {
+ cairo_bo_edge_t *head;
+- cairo_bo_edge_t *stopped;
+ int32_t current_y;
+ cairo_bo_edge_t *current_edge;
+ } cairo_bo_sweep_line_t;
+@@ -476,8 +477,8 @@ edges_compare_x_for_y (const cairo_bo_edge_t *a,
+ static inline int
+ _line_equal (const cairo_line_t *a, const cairo_line_t *b)
+ {
+- return a->p1.x == b->p1.x && a->p1.y == b->p1.y &&
+- a->p2.x == b->p2.x && a->p2.y == b->p2.y;
++ return (a->p1.x == b->p1.x && a->p1.y == b->p1.y &&
++ a->p2.x == b->p2.x && a->p2.y == b->p2.y);
+ }
+
+ static int
+@@ -1024,7 +1025,6 @@ static void
+ _cairo_bo_sweep_line_init (cairo_bo_sweep_line_t *sweep_line)
+ {
+ sweep_line->head = NULL;
+- sweep_line->stopped = NULL;
+ sweep_line->current_y = INT32_MIN;
+ sweep_line->current_edge = NULL;
+ }
+@@ -1139,6 +1139,8 @@ edges_colinear (const cairo_bo_edge_t *a, const cairo_bo_edge_t *b)
+ */
+ if (a->edge.line.p1.y == b->edge.line.p1.y) {
+ return a->edge.line.p1.x == b->edge.line.p1.x;
++ } else if (a->edge.line.p2.y == b->edge.line.p2.y) {
++ return a->edge.line.p2.x == b->edge.line.p2.x;
+ } else if (a->edge.line.p1.y < b->edge.line.p1.y) {
+ return edge_compare_for_y_against_x (b,
+ a->edge.line.p1.y,
+@@ -1205,82 +1207,48 @@ _active_edges_to_polygon (cairo_bo_edge_t *left,
+ cairo_polygon_t *polygon)
+ {
+ cairo_bo_edge_t *right;
++ unsigned int mask;
+
+- if (fill_rule == CAIRO_FILL_RULE_WINDING) {
+- while (left != NULL) {
+- int in_out = left->edge.dir;
+-
+- right = left->next;
+- if (left->deferred.right == NULL) {
+- while (right != NULL && right->deferred.right == NULL)
+- right = right->next;
+-
+- if (right != NULL && edges_colinear (left, right)) {
+- /* continuation on left */
+- left->deferred = right->deferred;
+- right->deferred.right = NULL;
+- }
+- }
+-
+- right = left->next;
+- while (right != NULL) {
+- if (right->deferred.right != NULL)
+- _cairo_bo_edge_end (right, top, polygon);
+-
+- in_out += right->edge.dir;
+- if (in_out == 0) {
+- cairo_bo_edge_t *next;
+- cairo_bool_t skip = FALSE;
+-
+- /* skip co-linear edges */
+- next = right->next;
+- if (next != NULL)
+- skip = edges_colinear (right, next);
++ if (fill_rule == CAIRO_FILL_RULE_WINDING)
++ mask = ~0;
++ else
++ mask = 1;
+
+- if (! skip)
+- break;
+- }
++ while (left != NULL) {
++ int in_out = left->edge.dir;
+
++ right = left->next;
++ if (left->deferred.right == NULL) {
++ while (right != NULL && right->deferred.right == NULL)
+ right = right->next;
+- }
+-
+- _cairo_bo_edge_start_or_continue (left, right, top, polygon);
+
+- left = right;
+- if (left != NULL)
+- left = left->next;
++ if (right != NULL && edges_colinear (left, right)) {
++ /* continuation on left */
++ left->deferred = right->deferred;
++ right->deferred.right = NULL;
++ }
+ }
+- } else {
+- while (left != NULL) {
+- int in_out = 0;
+
+- right = left->next;
+- while (right != NULL) {
+- if (right->deferred.right != NULL)
+- _cairo_bo_edge_end (right, top, polygon);
++ right = left->next;
++ while (right != NULL) {
++ if (right->deferred.right != NULL)
++ _cairo_bo_edge_end (right, top, polygon);
+
+- if ((in_out++ & 1) == 0) {
+- cairo_bo_edge_t *next;
+- cairo_bool_t skip = FALSE;
+-
+- /* skip co-linear edges */
+- next = right->next;
+- if (next != NULL)
+- skip = edges_colinear (right, next);
+-
+- if (! skip)
+- break;
+- }
+-
+- right = right->next;
++ in_out += right->edge.dir;
++ if ((in_out & mask) == 0) {
++ /* skip co-linear edges */
++ if (right->next == NULL || !edges_colinear (right, right->next))
++ break;
+ }
+
+- _cairo_bo_edge_start_or_continue (left, right, top, polygon);
+-
+- left = right;
+- if (left != NULL)
+- left = left->next;
++ right = right->next;
+ }
++
++ _cairo_bo_edge_start_or_continue (left, right, top, polygon);
++
++ left = right;
++ if (left != NULL)
++ left = left->next;
+ }
+ }
+
+@@ -1303,12 +1271,6 @@ _cairo_bentley_ottmann_tessellate_bo_edges (cairo_bo_event_t **start_events,
+
+ while ((event = _cairo_bo_event_dequeue (&event_queue))) {
+ if (event->point.y != sweep_line.current_y) {
+- for (e1 = sweep_line.stopped; e1; e1 = e1->next) {
+- if (e1->deferred.right != NULL)
+- _cairo_bo_edge_end (e1, e1->edge.bottom, polygon);
+- }
+- sweep_line.stopped = NULL;
+-
+ _active_edges_to_polygon (sweep_line.head,
+ sweep_line.current_y,
+ fill_rule, polygon);
+@@ -1328,23 +1290,6 @@ _cairo_bentley_ottmann_tessellate_bo_edges (cairo_bo_event_t **start_events,
+ if (unlikely (status))
+ goto unwind;
+
+- /* check to see if this is a continuation of a stopped edge */
+- /* XXX change to an infinitesimal lengthening rule */
+- for (left = sweep_line.stopped; left; left = left->next) {
+- if (e1->edge.top <= left->edge.bottom &&
+- edges_colinear (e1, left))
+- {
+- e1->deferred = left->deferred;
+- if (left->prev != NULL)
+- left->prev = left->next;
+- else
+- sweep_line.stopped = left->next;
+- if (left->next != NULL)
+- left->next->prev = left->prev;
+- break;
+- }
+- }
+-
+ left = e1->prev;
+ right = e1->next;
+
+@@ -1371,14 +1316,8 @@ _cairo_bentley_ottmann_tessellate_bo_edges (cairo_bo_event_t **start_events,
+
+ _cairo_bo_sweep_line_delete (&sweep_line, e1);
+
+- /* first, check to see if we have a continuation via a fresh edge */
+- if (e1->deferred.right != NULL) {
+- e1->next = sweep_line.stopped;
+- if (sweep_line.stopped != NULL)
+- sweep_line.stopped->prev = e1;
+- sweep_line.stopped = e1;
+- e1->prev = NULL;
+- }
++ if (e1->deferred.right != NULL)
++ _cairo_bo_edge_end (e1, e1->edge.bottom, polygon);
+
+ if (left != NULL && right != NULL) {
+ status = _cairo_bo_event_queue_insert_if_intersect_below_current_y (&event_queue, left, right);
+@@ -1420,10 +1359,6 @@ _cairo_bentley_ottmann_tessellate_bo_edges (cairo_bo_event_t **start_events,
+ }
+ }
+
+- for (e1 = sweep_line.stopped; e1; e1 = e1->next) {
+- if (e1->deferred.right != NULL)
+- _cairo_bo_edge_end (e1, e1->edge.bottom, polygon);
+- }
+ unwind:
+ _cairo_bo_event_queue_fini (&event_queue);
+
+@@ -1447,6 +1382,12 @@ _cairo_polygon_reduce (cairo_polygon_t *polygon,
+ if (unlikely (0 == num_events))
+ return CAIRO_STATUS_SUCCESS;
+
++ if (DEBUG_POLYGON) {
++ FILE *file = fopen ("reduce_in.txt", "w");
++ _cairo_debug_print_polygon (file, polygon);
++ fclose (file);
++ }
++
+ events = stack_events;
+ event_ptrs = stack_event_ptrs;
+ if (num_events > ARRAY_LENGTH (stack_events)) {
+@@ -1482,10 +1423,16 @@ _cairo_polygon_reduce (cairo_polygon_t *polygon,
+ num_events,
+ fill_rule,
+ polygon);
+- polygon->num_limits = num_limits;
++ polygon->num_limits = num_limits;
+
+ if (events != stack_events)
+ free (events);
+
++ if (DEBUG_POLYGON) {
++ FILE *file = fopen ("reduce_out.txt", "w");
++ _cairo_debug_print_polygon (file, polygon);
++ fclose (file);
++ }
++
+ return status;
+ }
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/extra/gnome-session/PKGBUILD b/extra/gnome-session/PKGBUILD
index 071a2bf69..da5e34292 100644
--- a/extra/gnome-session/PKGBUILD
+++ b/extra/gnome-session/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 160794 2012-06-05 23:43:39Z heftig $
+# $Id: PKGBUILD 161341 2012-06-10 01:43:11Z heftig $
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
pkgname=gnome-session
pkgver=3.4.2
-pkgrel=2
+pkgrel=3
pkgdesc="The GNOME Session Handler"
arch=(i686 x86_64)
license=('GPL' 'LGPL')
@@ -19,7 +19,7 @@ source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$p
gnome-session-3.3.1-llvmpipe.patch timeout.patch)
sha256sums=('6c2cbc86b63bb4869f4f95e7771ec6eee0c02965b732d634de5c8122607c4356'
'59ea58012febe48a67dabd944dc638400637ad4d296d63b63b585f10eea4f85e'
- '1942c8144711cf4bc0e776edd366579849e266a446b48cca0205d7ab82241782')
+ '9eaf31857b41db417475c3b14adc11b10c8226ed76978cdf96dd648fa6e505fc')
build() {
cd $pkgname-$pkgver
diff --git a/extra/gnome-session/timeout.patch b/extra/gnome-session/timeout.patch
index 20500206b..a26b0dcf5 100644
--- a/extra/gnome-session/timeout.patch
+++ b/extra/gnome-session/timeout.patch
@@ -1,12 +1,24 @@
+diff -u -r gnome-session-3.4.2/gnome-session/gsm-session-fill.c gnome-session-3.4.2-timeout/gnome-session/gsm-session-fill.c
+--- gnome-session-3.4.2/gnome-session/gsm-session-fill.c 2012-02-02 15:33:01.000000000 +0100
++++ gnome-session-3.4.2-timeout/gnome-session/gsm-session-fill.c 2012-06-10 02:39:46.184348462 +0200
+@@ -36,7 +36,7 @@
+ #define GSM_KEYFILE_DEFAULT_PROVIDER_PREFIX "DefaultProvider"
+
+ /* See https://bugzilla.gnome.org/show_bug.cgi?id=641992 for discussion */
+-#define GSM_RUNNABLE_HELPER_TIMEOUT 3000 /* ms */
++#define GSM_RUNNABLE_HELPER_TIMEOUT 10000 /* ms */
+
+ typedef void (*GsmFillHandleProvider) (const char *provides,
+ const char *default_provider,
diff -u -r gnome-session-3.4.2/tools/gnome-session-check-accelerated.c gnome-session-3.4.2-timeout/tools/gnome-session-check-accelerated.c
--- gnome-session-3.4.2/tools/gnome-session-check-accelerated.c 2011-03-22 21:31:43.000000000 +0100
-+++ gnome-session-3.4.2-timeout/tools/gnome-session-check-accelerated.c 2012-06-04 11:06:35.911690067 +0200
++++ gnome-session-3.4.2-timeout/tools/gnome-session-check-accelerated.c 2012-06-10 02:42:08.013218006 +0200
@@ -30,7 +30,7 @@
#include <X11/Xatom.h>
/* Wait up to this long for a running check to finish */
-#define PROPERTY_CHANGE_TIMEOUT 5000
-+#define PROPERTY_CHANGE_TIMEOUT 10000
++#define PROPERTY_CHANGE_TIMEOUT 12000
/* Values used for the _GNOME_SESSION_ACCELERATED root window property */
#define NO_ACCEL 0
diff --git a/extra/hylafax/PKGBUILD b/extra/hylafax/PKGBUILD
index 3b46ce518..1eff95fe7 100644
--- a/extra/hylafax/PKGBUILD
+++ b/extra/hylafax/PKGBUILD
@@ -1,8 +1,8 @@
-# $Id: PKGBUILD 157340 2012-04-27 07:14:13Z tpowa $
+# $Id: PKGBUILD 161318 2012-06-09 06:49:32Z tpowa $
# Maintainer: Paul Mattal <paul@archlinux.org>
pkgname=hylafax
pkgver=6.0.5
-pkgrel=5
+pkgrel=6
pkgdesc="Fax Server"
arch=('i686' 'x86_64')
install='hylafax.install'
@@ -50,8 +50,8 @@ package () {
# add missing awk file for notify-4.1 script
install -D -m 755 "$srcdir"/${pkgname}-${pkgver}/util/notify.awk \
"$pkgdir"/var/spool/hylafax/bin/notify.awk
- # fix permission on /var/lock
- chmod 1777 "$pkgdir"/var/lock
+ # remove /var/lock
+ rm -r "$pkgdir"/var/lock
# add systemd files
install -D -m644 $srcdir/hfaxd.service $pkgdir/usr/lib/systemd/system/hfaxd.service
install -D -m644 $srcdir/faxq.service $pkgdir/usr/lib/systemd/system/faxq.service
diff --git a/extra/samba/PKGBUILD b/extra/samba/PKGBUILD
index e3f7f1997..1eee0763a 100644
--- a/extra/samba/PKGBUILD
+++ b/extra/samba/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 161297 2012-06-09 01:08:52Z tomegun $
+# $Id: PKGBUILD 161314 2012-06-09 06:35:50Z tpowa $
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
# Contributor: judd <jvinet@zeroflux.org>
pkgbase=samba
@@ -8,7 +8,7 @@ pkgver=3.6.5
# to append 'a','b',etc to their subsequent releases, which pamcan
# misconstrues as alpha, beta, etc. Bad samba!
_realver=3.6.5
-pkgrel=2
+pkgrel=3
arch=(i686 x86_64)
url="http://www.samba.org"
license=('GPL3')
diff --git a/extra/samba/samba.install b/extra/samba/samba.install
index 09439743a..d9baeac90 100644
--- a/extra/samba/samba.install
+++ b/extra/samba/samba.install
@@ -1,7 +1,7 @@
#!/bin/sh
post_install() {
- systemd-tmpfiles --create /usr/lib/tmpfiles.d/smbd.conf
+ systemd-tmpfiles --create /usr/lib/tmpfiles.d/samba.conf
}
# vim:set ts=2 sw=2 et:
diff --git a/libre/iceweasel-libre/PKGBUILD b/libre/iceweasel-libre/PKGBUILD
index 3875bbc3d..28b96bcdd 100644
--- a/libre/iceweasel-libre/PKGBUILD
+++ b/libre/iceweasel-libre/PKGBUILD
@@ -21,7 +21,7 @@ debfile() { echo $@|sed -r 's@(.).*@\1/&/&@'; }
_pkgname=iceweasel
pkgname=iceweasel-libre
pkgver=${_debver}.${_debrel}
-pkgrel=1
+pkgrel=2
if [ -z "$pkgname" ]; then pkgname=$_pkgname; fi
if $_pgo; then
@@ -58,7 +58,7 @@ md5sums=('e440446bb92dc1c0311346c68024590b'
'eab149c1994ab14392e55af3abb08e80'
'ac29b01c189f20abae2f3eef1618ffc0'
'a485a2b5dc544a8a2bd40c985d2e5813'
- '1c23b150a9c2eeb378f167a1dfa09d89'
+ 'bd7d322d89001e39b1f11972507063c7'
'e529742c0a425648087bc3ce537fe4c5'
'f1c76e7e244257856a386ca2de69bdf0'
'0d053487907de4376d67d8f499c5502b'
diff --git a/libre/iceweasel-libre/libre.patch b/libre/iceweasel-libre/libre.patch
index 7b4e6a395..88a06741e 100644
--- a/libre/iceweasel-libre/libre.patch
+++ b/libre/iceweasel-libre/libre.patch
@@ -228,3 +228,15 @@ diff -urN iceweasel-13.0.orig/browser/locales/generic/profile/bookmarks.html.in
+ <DT><a href="http://www.gnu.org/software/gnuzilla/addons.html">Free addons</A>
</DL><p>
</DL><p>
+diff -urN iceweasel-13.0.orig/browser/base/content/abouthome/aboutHome.js iceweasel-13.0/browser/base/content/abouthome/aboutHome.js
+--- mozilla-release.orig/browser/base/content/abouthome/aboutHome.js 2012-06-01 09:03:47.000000000 -0300
++++ mozilla-release/browser/base/content/abouthome/aboutHome.js 2012-06-10 03:18:01.897259931 -0300
+@@ -143,7 +143,7 @@
+ // The <a/> part of the snippet will be linked to the corresponding url.
+ const DEFAULT_SNIPPETS_URLS = [
+ "http://www.mozilla.com/firefox/features/?WT.mc_ID=default1"
+-, "https://addons.mozilla.org/firefox/?src=snippet&WT.mc_ID=default2"
++, "http://www.gnu.org/software/gnuzilla/addons.html?src=snippet&WT.mc_ID=default2"
+ ];
+
+ const SNIPPETS_UPDATE_INTERVAL_MS = 86400000; // 1 Day.
diff --git a/libre/linux-libre-lts/PKGBUILD b/libre/linux-libre-lts/PKGBUILD
index 6ca3d1e8b..ac7ab36e8 100644
--- a/libre/linux-libre-lts/PKGBUILD
+++ b/libre/linux-libre-lts/PKGBUILD
@@ -9,7 +9,7 @@ pkgname=('linux-libre-lts' 'linux-libre-lts-headers') # Build stock -LIBRE kerne
# pkgname=linux-custom # Build kernel with a different name
_kernelname=-LIBRE-LTS
_basekernel=3.0
-_sublevel=33
+_sublevel=34
pkgver=${_basekernel}.${_sublevel}
_lxopkgver=${_basekernel}.32 # nearly always the same as pkgver
pkgrel=1
@@ -32,7 +32,7 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-gn
'ext4-options.patch'
"http://www.linux-libre.fsfla.org/pub/linux-libre/lemote/gnewsense/pool/linux-patches-${_lxopkgver}-gnu_0loongsonlibre_mipsel.tar.bz2")
md5sums=('5f64180fe7df4e574dac5911b78f5067'
- '3076be33631914b638eb9f313dc17d08'
+ '627ea698f9e8613f5d239ac2e6622c4e'
'9cfcf3807201ce44aa720571232a10ce'
'8bb5c5aa217202c3ac3798ba7798e07d'
'c072b17032e80debc6a8626299245d46'
diff --git a/libre/linux-libre-lts/linux-libre-lts.install b/libre/linux-libre-lts/linux-libre-lts.install
index b6a6f731c..55ed9e496 100644
--- a/libre/linux-libre-lts/linux-libre-lts.install
+++ b/libre/linux-libre-lts/linux-libre-lts.install
@@ -2,7 +2,7 @@
# arg 2: the old package version
KERNEL_NAME=-lts
-KERNEL_VERSION=3.0.33-1-LIBRE-LTS
+KERNEL_VERSION=3.0.34-1-LIBRE-LTS
post_install () {
# updating module dependencies
@@ -28,7 +28,7 @@ post_install () {
post_upgrade() {
pacman -Q grub &>/dev/null
hasgrub=$?
- pacman -Q grub2 &>/dev/null
+ pacman -Q grub2-common &>/dev/null
hasgrub2=$?
pacman -Q lilo &>/dev/null
haslilo=$?
diff --git a/libre/linux-libre/PKGBUILD b/libre/linux-libre/PKGBUILD
index 219659c25..4f10a211a 100644
--- a/libre/linux-libre/PKGBUILD
+++ b/libre/linux-libre/PKGBUILD
@@ -12,7 +12,7 @@ pkgname=('linux-libre' 'linux-libre-headers' 'linux-libre-docs') # Build stock -
# pkgname=linux-custom # Build kernel with a different name
_kernelname=-LIBRE
_basekernel=3.4
-_sublevel=1
+_sublevel=2
pkgver=${_basekernel}.${_sublevel}
_lxopkgver=${_basekernel}.1 # nearly always the same as pkgver
pkgrel=1
@@ -34,7 +34,7 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-gn
'i915-fix-ghost-tv-output.patch'
"http://www.linux-libre.fsfla.org/pub/linux-libre/lemote/gnewsense/pool/linux-patches-${_lxopkgver}-gnu_0loongsonlibre_mipsel.tar.bz2")
md5sums=('a5e128ca059cceb8b69148b41ff4ac6f'
- '9b5bcbc2f77807f66a50d5e34d4ce42e'
+ 'ea827952923c8a926c0831ad3f124190'
'669c3f9d5c6a2109bad8e511287826c3'
'454231e14419e56a5281eb7bc6fde83e'
'e49ac236dfeef709f91a3d993ea7b62c'
diff --git a/libre/linux-libre/linux-libre.install b/libre/linux-libre/linux-libre.install
index 74143e1cd..584f0f645 100644
--- a/libre/linux-libre/linux-libre.install
+++ b/libre/linux-libre/linux-libre.install
@@ -2,7 +2,7 @@
# arg 2: the old package version
KERNEL_NAME=
-KERNEL_VERSION=3.4.1-1-LIBRE
+KERNEL_VERSION=3.4.2-1-LIBRE
post_install () {
# updating module dependencies
diff --git a/social/gnuhealth/PKGBUILD b/social/gnuhealth/PKGBUILD
new file mode 100644
index 000000000..f1da528ff
--- /dev/null
+++ b/social/gnuhealth/PKGBUILD
@@ -0,0 +1,45 @@
+# Maintainer: SpepS <dreamspepser at yahoo dot it>
+
+pkgname=gnuhealth
+pkgver=1.6.1
+pkgrel=1
+pkgdesc="A free Health and Hospital Information System"
+arch=(any)
+url="http://health.gnu.org/"
+license=('GPL3')
+depends=('trytond')
+source=("http://ftp.gnu.org/gnu/health/$pkgname-$pkgver.tar.gz")
+md5sums=('fef8c811ca6de3fdd6e2430d644e13c9')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ # python2 fixes
+ export PYTHON=python2
+ sed -i '/TRYTON_PATH/s/python/&2/' configure
+
+ # makefile fixes
+ sed -e '/install:/a\\tinstall -d $(DESTDIR)$(tryton_modules)/' \
+ -e 's/$(tryton/$(DESTDIR)&/' -i Makefile.in
+
+ # mv man file
+ mv health/man .
+
+ ./configure --prefix=/usr
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make MANTARGET="$pkgdir/usr/share/man/man1" \
+ DESTDIR="$pkgdir/" install
+
+ # man
+ install -Dm644 man/$pkgname.1 \
+ "$pkgdir/usr/share/man/man1/$pkgname.1"
+
+ # python2 fix
+ sed -i 's/env python/&2/' \
+ `grep -rl 'env python' "$pkgdir"`
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/social/python-relatorio/PKGBUILD b/social/python-relatorio/PKGBUILD
new file mode 100644
index 000000000..6255eeee5
--- /dev/null
+++ b/social/python-relatorio/PKGBUILD
@@ -0,0 +1,21 @@
+# Contributor: Florian Walch <florian.walch@gmx.at>
+# Maintainer: Thomas Bahn <Thomas-Bahn@gmx.net>
+pkgname=python-relatorio
+pkgver=0.5.6
+pkgrel=1
+pkgdesc="A templating library able to output odt and pdf files"
+arch=('i686' 'x86_64')
+url="http://relatorio.openhex.org"
+license=('GPL')
+depends=('python-genshi>=0.5' 'python-lxml>=1.3.6')
+makedepends=('python2-distribute')
+source=("http://pypi.python.org/packages/source/r/relatorio/relatorio-$pkgver.tar.gz")
+
+build() {
+ cd $srcdir/relatorio-$pkgver
+ chmod 644 relatorio.egg-info/*
+ python2 setup.py install --root=$pkgdir
+}
+
+
+md5sums=('944fb60fadaff451ab6ee8818de516ad')
diff --git a/social/python2-polib/PKGBUILD b/social/python2-polib/PKGBUILD
new file mode 100644
index 000000000..fc346ec97
--- /dev/null
+++ b/social/python2-polib/PKGBUILD
@@ -0,0 +1,25 @@
+# Maintainer: Esteban V. Carnevale <evcarnevale@gmail.com>
+
+pkgname=python2-polib
+_pkgname='polib'
+pkgver=0.7.0
+pkgrel=1
+pkgdesc='A library to manipulate gettext files'
+url='http://polib.readthedocs.org/en/latest/index.html'
+arch=('any')
+license=('MIT')
+depends=('python2')
+
+source=("https://bitbucket.org/izi/polib/downloads/polib-${pkgver}.tar.gz")
+md5sums=('958f8f81ade7d2484edc25b3989fe247')
+
+build() {
+ cd "${srcdir}/${_pkgname}-${pkgver}"
+ python2 setup.py build
+}
+
+package() {
+ cd "${srcdir}/${_pkgname}-${pkgver}"
+ python2 setup.py install --root="${pkgdir}" --optimize=1
+ install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+}
diff --git a/social/trytond/PKGBUILD b/social/trytond/PKGBUILD
new file mode 100644
index 000000000..9f8348f06
--- /dev/null
+++ b/social/trytond/PKGBUILD
@@ -0,0 +1,30 @@
+# Maintainer: Robin Baumgartner <robin@baumgartners.ch>
+pkgname=trytond
+pkgver=2.4.0
+_pkgdir=2.4
+pkgrel=1
+pkgdesc="A three-tiers high-level general purpose application platform (server application)"
+arch=('any')
+url="http://www.tryton.org/"
+license=('GPL3')
+depends=('python2>=2.4' 'python-lxml' 'python-egenix-mx-base' 'python-relatorio>=0.2.0' 'python-genshi>=0.5' 'python2-polib')
+optdepends=('python-psycopg2: support for PostgreSQL database'
+ 'python-pywebdav: support for WebDAV feature'
+ 'pydot: support for displaying workflow graphs'
+ 'python-pytz: timezone support'
+ 'pyopenssl: support for SSL connection')
+makedepends=('python2-distribute')
+install="trytond.install"
+source=("http://downloads.tryton.org/$_pkgdir/$pkgname-$pkgver.tar.gz"
+ 'trytond.install'
+ 'trytond.rc')
+md5sums=('ce0bbb8fcd0ef6a02c575823712e29e4'
+ '768e68c01cb5913e36ea89c67fc98038'
+ '3ca6aff9b30a52bcf159be7ca630fb6e')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ python2 setup.py install --root=$pkgdir
+ install -D -m644 etc/trytond.conf $pkgdir/etc/trytond.conf
+ install -D -m755 $startdir/trytond.rc $pkgdir/etc/rc.d/trytond
+}
diff --git a/social/trytond/trytond.install b/social/trytond/trytond.install
new file mode 100644
index 000000000..46d6daaba
--- /dev/null
+++ b/social/trytond/trytond.install
@@ -0,0 +1,20 @@
+post_install() {
+ echo
+ echo "Adding tryton group... "
+ groupadd tryton
+ echo
+ echo "Adding tryton user... "
+ useradd -c "Tryton Server Daemon" -g tryton -s /bin/false tryton
+
+ echo "Note:"
+ echo "==> Please don't forget to configure your PostgreSQL database for the program."
+}
+
+post_remove() {
+ echo "Removing tryton system user... "
+ userdel tryton && echo "trytond [done]"
+}
+
+op=$1
+shift
+[ "$(type -t "$op")" = "function" ] && $op "$@"
diff --git a/social/trytond/trytond.rc b/social/trytond/trytond.rc
new file mode 100644
index 000000000..a93172a58
--- /dev/null
+++ b/social/trytond/trytond.rc
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/bin/python /usr/bin/trytond`
+case "$1" in
+ start)
+ stat_busy "Starting Tryton server"
+ # handling log file
+ if [ ! -e /var/log/trytond/trytond.log ]; then
+ mkdir -p /var/log/trytond
+ touch /var/log/trytond/trytond.log
+ chown -R trytond:trytond /var/log/trytond
+ fi
+ # starting the daemon
+ if [ -z "$PID" ]; then
+ su - trytond -s /bin/bash -c "/usr/bin/python2 /usr/bin/trytond \
+ --logfile=/var/log/trytond/trytond.log &> /dev/null &"
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon trytond
+ stat_done
+ fi
+ else
+ stat_fail
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Tryton server"
+ if [ ! -z "$PID" ]; then
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ kill $PID &> /dev/null &
+ rm_daemon trytond
+ stat_done
+ fi
+ else
+ stat_fail
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 3
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/staging/bind/127.0.0.zone b/staging/bind/127.0.0.zone
new file mode 100644
index 000000000..509c311f6
--- /dev/null
+++ b/staging/bind/127.0.0.zone
@@ -0,0 +1,11 @@
+$ORIGIN 0.0.127.in-addr.arpa.
+
+@ 1D IN SOA localhost. root.localhost. (
+ 42 ; serial (yyyymmdd##)
+ 3H ; refresh
+ 15M ; retry
+ 1W ; expiry
+ 1D ) ; minimum ttl
+
+ 1D IN NS localhost.
+1 1D IN PTR localhost.
diff --git a/staging/bind/PKGBUILD b/staging/bind/PKGBUILD
new file mode 100644
index 000000000..99bbd00d4
--- /dev/null
+++ b/staging/bind/PKGBUILD
@@ -0,0 +1,86 @@
+# $Id: PKGBUILD 161312 2012-06-09 06:22:34Z bisson $
+# Maintainer: Gaetan Bisson <bisson@archlinux.org>
+# Contributor: judd <jvinet@zeroflux.org>
+# Contributor: Mario Vazquez <mario_vazq@hotmail.com>
+
+pkgname=bind
+
+# Use a period and not a hyphen before the patch level for proper versioning.
+pkgver=9.9.1.P1
+_pkgver=9.9.1-P1
+pkgrel=2
+
+pkgdesc='Berkeley Internet Name Daemon is the reference implementation of the DNS protocols'
+url='http://www.isc.org/software/bind/'
+license=('custom:ISC')
+arch=('i686' 'x86_64')
+options=('!makeflags' '!libtool')
+depends=('openssl' 'krb5' 'libxml2')
+source=("http://ftp.isc.org/isc/bind9/${_pkgver}/bind-${_pkgver}.tar.gz"
+ 'root.hint::http://www.internic.net/zones/named.root'
+ 'remove-tools.patch'
+ 'named'
+ 'named.conf'
+ 'named.conf.d'
+ 'named.service'
+ 'named.logrotate'
+ 'localhost.zone'
+ '127.0.0.zone')
+sha1sums=('a2263b96ccd8a143ea54b39958142c542bf605a8'
+ 'cbdecd1ea8e7b612b33b63d66bc57273795d1f54'
+ '18f477f510df31e6c6f547ee2d5fc46e973479bf'
+ '46232e9db243c6c05e170a1781d7a7f413be5d03'
+ '5ca7a5f2a132548a090a045a2df3acea6b35d9eb'
+ '7848edbfb9a848843f57c11c02b0289eefd42d00'
+ '05fb2346a30dee2f99c40914dd23708729839b64'
+ '9ffb5c3f72390a517aeae557e32349d5d278cb63'
+ '76a0d4cd1b913db177a5a375bebc47e5956866ec'
+ '53be0f1437ebe595240d8dbdd819939582b97fb9')
+
+provides=('dns-server')
+
+install=install
+backup=('etc/logrotate.d/named'
+ 'etc/conf.d/named'
+ 'etc/named.conf')
+
+build() {
+ cd "${srcdir}/bind-${_pkgver}"
+
+ patch -p1 -i ../remove-tools.patch
+
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --disable-static \
+ --disable-linux-caps \
+ --with-openssl \
+ --with-libxml2 \
+ --with-libtool \
+
+ make
+}
+
+package() {
+ cd "${srcdir}/bind-${_pkgver}"
+
+ install -Dm644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+ make DESTDIR="${pkgdir}" install
+
+ rmdir "${pkgdir}/var/run"
+ install -d "${pkgdir}"/usr/share/doc/bind
+ install doc/arm/*.html "${pkgdir}"/usr/share/doc/bind
+
+ install -D -m755 ../named "${pkgdir}"/etc/rc.d/named
+ install -D -m644 ../named.conf.d "${pkgdir}"/etc/conf.d/named
+ install -D -m644 ../named.service "${pkgdir}"/usr/lib/systemd/system/named.service
+ install -D -m600 ../named.logrotate "${pkgdir}"/etc/logrotate.d/named
+ install -D -m640 -o 0 -g 40 ../named.conf "${pkgdir}"/etc/named.conf
+
+ install -d -m750 -o 0 -g 40 "${pkgdir}"/var/named
+ install -m640 -o 0 -g 40 ../root.hint "${pkgdir}"/var/named
+ install -m640 -o 0 -g 40 ../127.0.0.zone "${pkgdir}"/var/named
+ install -m640 -o 0 -g 40 ../localhost.zone "${pkgdir}"/var/named
+}
diff --git a/staging/bind/install b/staging/bind/install
new file mode 100644
index 000000000..287d0e05b
--- /dev/null
+++ b/staging/bind/install
@@ -0,0 +1,21 @@
+post_install() {
+ getent group named &>/dev/null || groupadd -g 40 named
+ getent passwd named &>/dev/null || useradd -u 40 -c "BIND DNS Server" -g named -d /var/named -s /bin/false named
+ passwd -l named &>/dev/null
+
+ touch var/log/named.log
+ chown named:named var/log/named.log
+
+ # create an rndc.key if it doesn't already exist
+ if [[ ! -s etc/rndc.key ]]; then
+ usr/sbin/rndc-confgen -r /dev/urandom -b 256 | head -n 5 >>etc/rndc.key
+ chown root:named etc/rndc.key
+ chmod 640 etc/rndc.key
+ fi
+}
+
+pre_remove() {
+ getent passwd named &>/dev/null && userdel named >/dev/null
+ getent group named &>/dev/null && groupdel named >/dev/null
+ return 0
+}
diff --git a/staging/bind/localhost.zone b/staging/bind/localhost.zone
new file mode 100644
index 000000000..e3ff9641c
--- /dev/null
+++ b/staging/bind/localhost.zone
@@ -0,0 +1,10 @@
+$ORIGIN localhost.
+@ 1D IN SOA @ root (
+ 42 ; serial (yyyymmdd##)
+ 3H ; refresh
+ 15M ; retry
+ 1W ; expiry
+ 1D ) ; minimum ttl
+
+ 1D IN NS @
+ 1D IN A 127.0.0.1
diff --git a/staging/bind/named b/staging/bind/named
new file mode 100755
index 000000000..7907f9983
--- /dev/null
+++ b/staging/bind/named
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/named
+
+[[ -d /var/run/named ]] || mkdir -p /var/run/named
+chown named:named /var/run/named
+
+PIDFILE=/var/run/named/named.pid
+PID=$(cat $PIDFILE 2>/dev/null)
+readlink -q /proc/$PID/exe | grep -q '^/usr/sbin/named' || { PID=; rm $PIDFILE 2>/dev/null; }
+
+case "$1" in
+ start)
+ stat_busy "Starting BIND"
+ [ -z "$PID" ] && /usr/sbin/named ${NAMED_ARGS}
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon named
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping BIND"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon named
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ reload)
+ stat_busy "Reloading BIND"
+ [ ! -z "$PID" ] && rndc reload &>/dev/null || kill -HUP $PID &>/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ stat_done
+ fi
+ ;;
+ *)
+ echo "usage: $0 {start|stop|reload|restart}"
+esac
+exit 0
diff --git a/staging/bind/named.conf b/staging/bind/named.conf
new file mode 100644
index 000000000..38fb12cbe
--- /dev/null
+++ b/staging/bind/named.conf
@@ -0,0 +1,64 @@
+//
+// /etc/named.conf
+//
+
+options {
+ directory "/var/named";
+ pid-file "/var/run/named/named.pid";
+ auth-nxdomain yes;
+ datasize default;
+// Uncomment these to enable IPv6 connections support
+// IPv4 will still work:
+// listen-on-v6 { any; };
+// Add this for no IPv4:
+// listen-on { none; };
+
+ // Default security settings.
+ allow-recursion { 127.0.0.1; };
+ allow-transfer { none; };
+ allow-update { none; };
+ version none;
+ hostname none;
+ server-id none;
+};
+
+zone "localhost" IN {
+ type master;
+ file "localhost.zone";
+ allow-transfer { any; };
+};
+
+zone "0.0.127.in-addr.arpa" IN {
+ type master;
+ file "127.0.0.zone";
+ allow-transfer { any; };
+};
+
+zone "." IN {
+ type hint;
+ file "root.hint";
+};
+
+//zone "example.org" IN {
+// type slave;
+// file "example.zone";
+// masters {
+// 192.168.1.100;
+// };
+// allow-query { any; };
+// allow-transfer { any; };
+//};
+
+logging {
+ channel xfer-log {
+ file "/var/log/named.log";
+ print-category yes;
+ print-severity yes;
+ print-time yes;
+ severity info;
+ };
+ category xfer-in { xfer-log; };
+ category xfer-out { xfer-log; };
+ category notify { xfer-log; };
+};
+
diff --git a/staging/bind/named.conf.d b/staging/bind/named.conf.d
new file mode 100644
index 000000000..aecbd2307
--- /dev/null
+++ b/staging/bind/named.conf.d
@@ -0,0 +1,4 @@
+#
+# Parameters to be passed to BIND
+#
+NAMED_ARGS="-u named"
diff --git a/staging/bind/named.logrotate b/staging/bind/named.logrotate
new file mode 100644
index 000000000..ef1a2d032
--- /dev/null
+++ b/staging/bind/named.logrotate
@@ -0,0 +1,6 @@
+/var/log/named.log {
+ missingok
+ postrotate
+ /bin/kill -HUP `cat /var/run/named/named.pid 2>/dev/null` 2>/dev/null || true
+ endscript
+}
diff --git a/staging/bind/named.service b/staging/bind/named.service
new file mode 100644
index 000000000..77196f785
--- /dev/null
+++ b/staging/bind/named.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Internet domain name server
+
+[Service]
+ExecStart=/usr/sbin/named -f -u named
+ExecReload=/usr/sbin/rndc reload
+ExecStop=/usr/sbin/rndc stop
+
+[Install]
+WantedBy=multi-user.target
diff --git a/staging/bind/remove-tools.patch b/staging/bind/remove-tools.patch
new file mode 100644
index 000000000..cbd1c53ad
--- /dev/null
+++ b/staging/bind/remove-tools.patch
@@ -0,0 +1,12 @@
+diff -aur old/bin/Makefile.in new/bin/Makefile.in
+--- old/bin/Makefile.in 2009-10-05 05:07:08.000000000 -0700
++++ new/bin/Makefile.in 2011-08-28 19:14:17.025674400 -0700
+@@ -19,7 +19,7 @@
+ VPATH = @srcdir@
+ top_srcdir = @top_srcdir@
+
+-SUBDIRS = named rndc dig dnssec tests tools nsupdate \
++SUBDIRS = named rndc dnssec tests tools nsupdate \
+ check confgen @PKCS11_TOOLS@
+ TARGETS =
+
diff --git a/staging/clamav/PKGBUILD b/staging/clamav/PKGBUILD
new file mode 100644
index 000000000..a1585a011
--- /dev/null
+++ b/staging/clamav/PKGBUILD
@@ -0,0 +1,70 @@
+# $Id: PKGBUILD 161310 2012-06-09 06:06:31Z bisson $
+# Contributor: Dale Blount <dale@archlinux.org>
+# Contributor: Gregor Ibic <gregor.ibic@intelicom.si>
+# Maintainer: Gaetan Bisson <bisson@archlinux.org>
+
+pkgname=clamav
+pkgver=0.97.4
+pkgrel=3
+pkgdesc='Anti-virus toolkit for Unix'
+url='http://www.clamav.net/'
+license=('GPL')
+options=('!libtool')
+arch=('i686' 'x86_64')
+depends=('bzip2' 'libltdl')
+backup=('etc/clamav/clamd.conf' 'etc/clamav/freshclam.conf' 'etc/conf.d/clamav')
+source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz"
+ 'rc.d'
+ 'conf.d'
+ 'service'
+ 'service.fresh'
+ 'logrotate'
+ 'tmpfiles.d'
+ 'gcc47.patch'
+ 'config.patch')
+sha1sums=('56f90cf8a73acba8f97beca86b42c65c3923935d'
+ 'c9d508c1e5972f0f849d8694c1872455fa9e74de'
+ 'cb116cdab49a810381a515cbcfb6a6c148547f07'
+ 'df522b0488f3901e491f148c9300f6bae348c605'
+ 'cda9a087e5593992150cb456e34c5f6f589aca82'
+ '7cace58743a36dae3e63e5e0c6cc73ea5ef9a6ee'
+ 'a224ea9b4d0f4f196827347d54bed51e11c197ea'
+ 'db6e090d540fe96fda71bd421aa9b699f0cc497b'
+ '1c8ef193919b041135115170acd6313f008de808')
+
+install=install
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ patch -p1 -i ../config.patch
+ patch -p1 -i ../gcc47.patch
+
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc/clamav \
+ --with-dbdir=/var/lib/clamav \
+ --disable-clamav \
+
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+
+ # Make sure conf files get installed, because make install
+ # doesn't do that if clamav is already installed upon building.
+ install -Dm644 etc/clamd.conf "${pkgdir}"/etc/clamav/clamd.conf
+ install -Dm644 etc/freshclam.conf "${pkgdir}"/etc/clamav/freshclam.conf
+
+ install -Dm644 ../service.fresh "${pkgdir}"/usr/lib/systemd/system/freshclamd.service
+ install -Dm644 ../service "${pkgdir}"/usr/lib/systemd/system/clamd.service
+ install -Dm644 ../tmpfiles.d "${pkgdir}"/usr/lib/tmpfiles.d/clamav.conf
+ install -Dm644 ../logrotate "${pkgdir}"/etc/logrotate.d/clamav
+ install -Dm644 ../conf.d "${pkgdir}"/etc/conf.d/clamav
+ install -Dm755 ../rc.d "${pkgdir}"/etc/rc.d/clamav
+
+ # Un-distribute databases to require freshclam.
+ rm "${pkgdir}"/var/lib/clamav/*.cvd
+}
diff --git a/staging/clamav/conf.d b/staging/clamav/conf.d
new file mode 100644
index 000000000..9cd44d9f8
--- /dev/null
+++ b/staging/clamav/conf.d
@@ -0,0 +1,8 @@
+# clamav startup script config options
+
+# change these to "yes" to start
+START_FRESHCLAM="no"
+START_CLAMD="no"
+
+# Options to pass to freshclam (man freshclam for more info).
+FRESHCLAM_OPTS="-c 12"
diff --git a/staging/clamav/config.patch b/staging/clamav/config.patch
new file mode 100644
index 000000000..0640df2c3
--- /dev/null
+++ b/staging/clamav/config.patch
@@ -0,0 +1,30 @@
+diff -arU 0 old/etc/clamd.conf new/etc/clamd.conf
+--- old/etc/clamd.conf 2010-12-02 19:31:21.773357389 +0100
++++ new/etc/clamd.conf 2010-12-02 19:31:45.873357389 +0100
+@@ -14 +14 @@
+-#LogFile /tmp/clamd.log
++LogFile /var/log/clamav/clamd.log
+@@ -34 +34 @@
+-#LogTime yes
++LogTime yes
+@@ -61 +61 @@
+-#PidFile /var/run/clamd.pid
++PidFile /run/clamav/clamd.pid
+@@ -65 +65 @@
+-#TemporaryDirectory /var/tmp
++TemporaryDirectory /tmp
+@@ -80 +80 @@
+-#LocalSocket /tmp/clamd.socket
++LocalSocket /var/lib/clamav/clamd.sock
+@@ -190 +190 @@
+-#User clamav
++User clamav
+diff -arU 0 old/etc/freshclam.conf new/etc/freshclam.conf
+--- old/etc/freshclam.conf 2010-12-02 19:31:21.773357389 +0100
++++ new/etc/freshclam.conf 2010-12-02 19:31:51.190024057 +0100
+@@ -17 +17 @@
+-#UpdateLogFile /var/log/freshclam.log
++UpdateLogFile /var/log/clamav/freshclam.log
+@@ -121 +121 @@
+-#NotifyClamd /path/to/clamd.conf
++NotifyClamd /etc/clamav/clamd.conf
diff --git a/staging/clamav/gcc47.patch b/staging/clamav/gcc47.patch
new file mode 100644
index 000000000..17fc924d9
--- /dev/null
+++ b/staging/clamav/gcc47.patch
@@ -0,0 +1,51 @@
+From 8b6757e866d1480c997d5ae497e0512000d82b35 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?T=C3=B6r=C3=B6k=20Edvin?= <edwin@clamav.net>
+Date: Mon, 14 May 2012 20:13:21 +0300
+Subject: [PATCH 1/2] Fix build with gcc-4.7
+
+---
+ .../c++/llvm/lib/ExecutionEngine/JIT/Intercept.cpp | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/libclamav/c++/llvm/lib/ExecutionEngine/JIT/Intercept.cpp b/libclamav/c++/llvm/lib/ExecutionEngine/JIT/Intercept.cpp
+index 274f816..a4e7eee 100644
+--- a/libclamav/c++/llvm/lib/ExecutionEngine/JIT/Intercept.cpp
++++ b/libclamav/c++/llvm/lib/ExecutionEngine/JIT/Intercept.cpp
+@@ -19,6 +19,7 @@
+ #include "llvm/Support/ErrorHandling.h"
+ #include "llvm/System/DynamicLibrary.h"
+ #include "llvm/Config/config.h"
++#include <unistd.h>
+ using namespace llvm;
+
+ // AtExitHandlers - List of functions to call when the program exits,
+--
+1.7.2.3
+
+
+From c609c8ea0409b2882aa3e6ef4dc48c210cf2d292 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?T=C3=B6r=C3=B6k=20Edvin?= <edwin@clamav.net>
+Date: Tue, 15 May 2012 23:36:29 +0300
+Subject: [PATCH 2/2] wrap unistd in ifdef
+
+---
+ .../c++/llvm/lib/ExecutionEngine/JIT/Intercept.cpp | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/libclamav/c++/llvm/lib/ExecutionEngine/JIT/Intercept.cpp b/libclamav/c++/llvm/lib/ExecutionEngine/JIT/Intercept.cpp
+index a4e7eee..c1cd5e8 100644
+--- a/libclamav/c++/llvm/lib/ExecutionEngine/JIT/Intercept.cpp
++++ b/libclamav/c++/llvm/lib/ExecutionEngine/JIT/Intercept.cpp
+@@ -19,7 +19,9 @@
+ #include "llvm/Support/ErrorHandling.h"
+ #include "llvm/System/DynamicLibrary.h"
+ #include "llvm/Config/config.h"
++#ifdef HAVE_UNISTD_H
+ #include <unistd.h>
++#endif
+ using namespace llvm;
+
+ // AtExitHandlers - List of functions to call when the program exits,
+--
+1.7.2.3
+
diff --git a/staging/clamav/install b/staging/clamav/install
new file mode 100644
index 000000000..a2092e815
--- /dev/null
+++ b/staging/clamav/install
@@ -0,0 +1,14 @@
+post_install() {
+ getent group clamav &>/dev/null || groupadd -r -g 64 clamav >/dev/null
+ getent passwd clamav &>/dev/null || useradd -r -u 64 -g clamav -d /dev/null -s /bin/false -c "Clam AntiVirus" clamav >/dev/null
+
+ chown -R clamav:clamav /var/lib/clamav
+ install -o clamav -g clamav -d /run/clamav
+ install -o clamav -g clamav -d /var/log/clamav
+}
+
+post_remove() {
+ getent passwd clamav &>/dev/null && userdel clamav >/dev/null
+ getent group clamav &>/dev/null && groupdel clamav >/dev/null
+ return 0
+}
diff --git a/staging/clamav/logrotate b/staging/clamav/logrotate
new file mode 100644
index 000000000..6a9051bed
--- /dev/null
+++ b/staging/clamav/logrotate
@@ -0,0 +1,8 @@
+/var/log/clamav/clamd.log /var/log/clamav/freshclam.log {
+ create 644 clamav clamav
+ sharedscripts
+ postrotate
+ /bin/kill -HUP `cat /run/clamav/clamd.pid 2>/dev/null` 2> /dev/null || true
+ /bin/kill -HUP `cat /run/clamav/freshclam.pid 2>/dev/null` 2> /dev/null || true
+ endscript
+}
diff --git a/staging/clamav/rc.d b/staging/clamav/rc.d
new file mode 100644
index 000000000..127c86c0f
--- /dev/null
+++ b/staging/clamav/rc.d
@@ -0,0 +1,66 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+[[ -f /etc/conf.d/clamav ]] && source /etc/conf.d/clamav
+
+PID_FC=$(pidof -o %PPID /usr/bin/freshclam)
+PID_CD=$(pidof -o %PPID /usr/sbin/clamd)
+
+case "$1" in
+ start)
+ if [[ $START_CLAMD = yes ]]; then
+ stat_busy "Starting ClamD"
+ [[ -z $PID_CD ]] && /usr/sbin/clamd
+ if [[ $? -gt 0 ]]; then
+ stat_fail
+ else
+ add_daemon clamav
+ stat_done
+ fi
+ fi
+ sleep 1
+ if [[ $START_FRESHCLAM = yes ]]; then
+ stat_busy "Starting FreshClam"
+ [[ -z $PID_FC ]] && /usr/bin/freshclam -p /run/clamav/freshclam.pid -d $FRESHCLAM_OPTS
+ if [[ $? -gt 0 ]]; then
+ stat_fail
+ else
+ add_daemon clamav
+ stat_done
+ fi
+ fi
+ ;;
+ stop)
+ if [[ $START_CLAMD = yes ]]; then
+ stat_busy "Stopping ClamD"
+ [[ -n $PID_CD ]] && kill $PID_CD &> /dev/null
+ if [[ $? -gt 0 ]]; then
+ stat_fail
+ else
+ rm_daemon clamav
+ stat_done
+ fi
+ fi
+
+ if [[ $START_FRESHCLAM = yes ]]; then
+ stat_busy "Stopping FreshClam"
+ [[ -n $PID_FC ]] && kill $PID_FC &> /dev/null
+ if [[ $? -gt 0 ]]; then
+ stat_fail
+ else
+ rm_daemon clamav
+ stat_done
+ fi
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 2
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/staging/clamav/service b/staging/clamav/service
new file mode 100644
index 000000000..5bf9eb14e
--- /dev/null
+++ b/staging/clamav/service
@@ -0,0 +1,10 @@
+[Unit]
+Description=clamav daemon
+
+[Service]
+Type=forking
+PIDFile=/run/clamav/clamd.pid
+ExecStart=/usr/sbin/clamd
+
+[Install]
+WantedBy=multi-user.target
diff --git a/staging/clamav/service.fresh b/staging/clamav/service.fresh
new file mode 100644
index 000000000..a0a72c2e6
--- /dev/null
+++ b/staging/clamav/service.fresh
@@ -0,0 +1,10 @@
+[Unit]
+Description=clamav updater
+
+[Service]
+Type=forking
+PIDFile=/run/clamav/freshclam.pid
+ExecStart=/usr/bin/freshclam -d -p /run/clamav/freshclam.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/staging/clamav/tmpfiles.d b/staging/clamav/tmpfiles.d
new file mode 100644
index 000000000..22d29941e
--- /dev/null
+++ b/staging/clamav/tmpfiles.d
@@ -0,0 +1 @@
+d /run/clamav 0755 clamav clamav
diff --git a/staging/cronie/PKGBUILD b/staging/cronie/PKGBUILD
new file mode 100644
index 000000000..65386def0
--- /dev/null
+++ b/staging/cronie/PKGBUILD
@@ -0,0 +1,68 @@
+# Contributor: Kaiting Chen <kaiting.chen@kiwilight.com>
+# Maintainer: Gaetan Bisson <bisson@archlinux.org>
+
+pkgname='cronie'
+pkgver=1.4.8
+pkgrel=2
+pkgdesc='Daemon that runs specified programs at scheduled times and related tools'
+url='https://fedorahosted.org/cronie/'
+license=('custom:BSD')
+arch=('i686' 'x86_64')
+depends=('pam' 'bash' 'run-parts')
+optdepends=('smtp-server: sending cron job output via email')
+
+source=("https://fedorahosted.org/releases/c/r/${pkgname}/${pkgname}-${pkgver}.tar.gz"
+ 'cron.deny'
+ 'service'
+ 'pam.d'
+ 'rc.d')
+sha1sums=('1d2ce3a6ca2a6f96ff31921e4060be3199dc10f3'
+ '0f279b8fb820340267d578dc85511c980715f91e'
+ '3038a05476829f72fc4918bee9176b273ce10340'
+ '5eff7fb31f6bc0a924243ff046704726cf20c221'
+ 'c08c040ed5cb12bc4fd15639a5242d31ec247ef5')
+
+backup=('etc/anacrontab'
+ 'etc/conf.d/crond'
+ 'etc/pam.d/crond'
+ 'etc/cron.deny')
+
+conflicts=('cron')
+provides=('cron')
+groups=('base')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --enable-anacron \
+ --with-inotify \
+ --with-pam \
+
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make DESTDIR="${pkgdir}" install
+
+ chmod u+s "${pkgdir}"/usr/bin/crontab
+ install -d "${pkgdir}"/var/spool/{ana,}cron
+ install -d "${pkgdir}"/etc/cron.{d,hourly,daily,weekly,monthly}
+
+ install -Dm755 ../rc.d "${pkgdir}"/etc/rc.d/crond
+ install -Dm644 ../pam.d "${pkgdir}"/etc/pam.d/crond
+ install -Dm644 ../cron.deny "${pkgdir}"/etc/cron.deny
+ install -Dm644 ../service "${pkgdir}"/usr/lib/systemd/system/cronie.service
+
+ install -Dm644 crond.sysconfig "${pkgdir}"/etc/conf.d/crond
+ install -Dm644 contrib/anacrontab "${pkgdir}"/etc/anacrontab
+ install -Dm644 contrib/0hourly "${pkgdir}"/etc/cron.d/0hourly
+ install -Dm755 contrib/0anacron "${pkgdir}"/etc/cron.hourly/0anacron
+
+ install -Dm644 COPYING "${pkgdir}"/usr/share/licenses/cronie/COPYING
+}
diff --git a/staging/cronie/cron.deny b/staging/cronie/cron.deny
new file mode 100644
index 000000000..06e685cc8
--- /dev/null
+++ b/staging/cronie/cron.deny
@@ -0,0 +1 @@
+# without this file, only users listed in /etc/cron.allow can use crontab
diff --git a/staging/cronie/pam.d b/staging/cronie/pam.d
new file mode 100644
index 000000000..9a254ebc0
--- /dev/null
+++ b/staging/cronie/pam.d
@@ -0,0 +1,10 @@
+auth required pam_unix.so
+auth required pam_env.so
+
+account required pam_access.so
+account required pam_unix.so
+account required pam_time.so
+
+session required pam_loginuid.so
+session required pam_limits.so
+session required pam_unix.so
diff --git a/staging/cronie/rc.d b/staging/cronie/rc.d
new file mode 100755
index 000000000..d0659685c
--- /dev/null
+++ b/staging/cronie/rc.d
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+name=crond
+. /etc/conf.d/crond
+PID=$(pidof -o %PPID /usr/sbin/crond)
+
+case "$1" in
+start)
+ stat_busy "Starting $name daemon"
+ [[ -z "$PID" ]] && /usr/sbin/crond $CRONDARGS &>/dev/null \
+ && { add_daemon $name; stat_done; } \
+ || { stat_fail; exit 1; }
+ ;;
+stop)
+ stat_busy "Stopping $name daemon"
+ [[ -n "$PID" ]] && kill $PID &>/dev/null \
+ && { rm_daemon $name; stat_done; } \
+ || { stat_fail; exit 1; }
+ ;;
+reload)
+ stat_busy "Reloading $name daemon"
+ [[ -n "$PID" ]] && kill -HUP $PID &>/dev/null \
+ && { stat_done; } \
+ || { stat_fail; exit 1; }
+ ;;
+restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+*)
+ echo "usage: $0 {start|stop|restart|reload}"
+ ;;
+esac
+exit 0
diff --git a/staging/cronie/service b/staging/cronie/service
new file mode 100644
index 000000000..5ae193bfc
--- /dev/null
+++ b/staging/cronie/service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Periodic Command Scheduler
+
+[Service]
+ExecStart=/usr/sbin/crond -n
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/staging/ffmpeg/PKGBUILD b/staging/ffmpeg/PKGBUILD
index 4de7bdd65..1021dc3ab 100644
--- a/staging/ffmpeg/PKGBUILD
+++ b/staging/ffmpeg/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 160671 2012-06-03 15:50:03Z ibiru $
+# $Id: PKGBUILD 161328 2012-06-09 17:10:50Z ibiru $
# Maintainer : Ionut Biru <ibiru@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
# Contributor: Paul Mattal <paul@archlinux.org>
pkgname=ffmpeg
-pkgver=0.11
+pkgver=0.11.1
pkgrel=1
epoch=1
pkgdesc="Complete and free Internet live audio and video broadcasting solution for Linux/Unix"
@@ -14,10 +14,10 @@ license=('GPL')
depends=(alsa-lib bzip2 gsm lame libpulse libtheora libva libvorbis libvpx opencore-amr openjpeg rtmpdump schroedinger sdl speex v4l-utils x264 xvidcore zlib)
makedepends=('yasm' 'git' 'libvdpau')
source=(http://ffmpeg.org/releases/$pkgname-$pkgver.tar.bz2)
-md5sums=('101e1092582bbfca8f2a204cbcecb8fc')
+md5sums=('ff8cb914f657e164dd60ea1008b555a8')
build() {
- cd "$pkgname-$pkgver"
+ cd $pkgname-$pkgver
./configure \
--prefix=/usr \
@@ -51,7 +51,7 @@ build() {
}
package() {
- cd "$pkgname-$pkgver"
+ cd $pkgname-$pkgver
make DESTDIR="$pkgdir" install install-man
install -D -m755 tools/qt-faststart "$pkgdir/usr/bin/qt-faststart"
}
diff --git a/staging/glibc/PKGBUILD b/staging/glibc/PKGBUILD
new file mode 100644
index 000000000..0cf078e34
--- /dev/null
+++ b/staging/glibc/PKGBUILD
@@ -0,0 +1,328 @@
+# $Id: PKGBUILD 161319 2012-06-09 07:38:36Z allan $
+# Maintainer: Allan McRae <allan@archlinux.org>
+
+# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
+# NOTE: valgrind requires rebuilt with each major glibc version
+
+pkgname=glibc
+pkgver=2.15
+pkgrel=12
+_glibcdate=20111227
+pkgdesc="GNU C Library"
+arch=('i686' 'x86_64')
+url="http://www.gnu.org/software/libc"
+license=('GPL' 'LGPL')
+groups=('base')
+depends=('linux-api-headers>=3.3' 'tzdata')
+makedepends=('gcc>=4.6')
+backup=(etc/gai.conf
+ etc/locale.gen
+ etc/nscd.conf)
+options=('!strip')
+install=glibc.install
+source=(ftp://ftp.archlinux.org/other/glibc/${pkgname}-${pkgver}_${_glibcdate}.tar.xz
+ glibc-2.15-do-not-install-timezone-files.patch
+ glibc-2.15-do-not-install-timezone-files-2.patch
+ glibc-__i686.patch
+ glibc-2.14-libdl-crash.patch
+ glibc-2.14-reexport-rpc-interface.patch
+ glibc-2.14-reinstall-nis-rpc-headers.patch
+ glibc-2.15-fix-res_query-assert.patch
+ glibc-2.15-regex.patch
+ glibc-2.15-lddebug-scopes.patch
+ glibc-2.15-revert-c5a0802a.patch
+ glibc-2.15-scanf.patch
+ glibc-2.15-ifunc.patch
+ glibc-2.15-avx.patch
+ glibc-2.15-strcasecmp-disable-avx.patch
+ glibc-2.15-gb18030.patch.gz
+ glibc-2.15-revert-netlink-cache.patch
+ glibc-2.15-arena.patch
+ glibc-2.15-negative-result-cache.patch
+ glibc-2.15-multiarch-x86-strcmp.patch
+ glibc-2.15-vdso.patch
+ glibc-2.15-feraiseexcept-plt.patch
+ glibc-2.15-vfprintf-nargs.patch
+ glibc-2.15-__libc_res_nquerydomain-out-of-bounds.patch
+ glibc-2.15-fmtmsg-locking.patch
+ glibc-2.15-non-signalling-comparisons.patch
+ glibc-2.15-rintf-rounding.patch
+ glibc-2.15-nearbyintf-rounding.patch
+ glibc-2.15-confstr-local-buffer-extent.patch
+ glibc-2.15-testsuite.patch
+ nscd.rcd
+ nscd.service
+ nscd.tmpfiles
+ locale.gen.txt
+ locale-gen)
+md5sums=('6ffdf5832192b92f98bdd125317c0dfc'
+ '7ef69c530a15106de93e4de2df2d393e'
+ 'b6c619e5cf91829a15ce34dccef676d5'
+ 'addfddd648a4bf832eb126aba944ebae'
+ '6970bcfeb3bf88913436d5112d16f588'
+ 'c5de2a946215d647c8af5432ec4b0da0'
+ '55febbb72139ac7b65757df085024b83'
+ '31f415b41197d85d3bbee3d1eecd06a3'
+ 'b3526cbd5e29773560dba725db99af5a'
+ '3c219ddfb619b6df903cac4cc42c611d'
+ '7ae3e426251ae33e73dbad71f9c91378'
+ 'f0782ddbf38e0b30ec6b85348816046f'
+ '3d844b53b2dbb7c996e39c7ad932f55d'
+ '41ae047ac88e8f6f547c70b0a0bc3b72'
+ 'fccb89f6628f59752278e125c35941f8'
+ '001a4044ac3d59aca6ee144eaca57ab2'
+ '94b61302a7ca6c5764d013dc7738fcfe'
+ 'a9ffadcfd2d357f91fee0b861fd4a7c6'
+ '2c46b8e294de24c531f2253ff69aeef3'
+ '7a2998a04ebfcf8bf820540f490ce714'
+ '0d77d20fa7fe2f87ad945cb9edb4d91d'
+ 'bfdefac3d705f41fbf84b1de1dc945af'
+ '3443e89c1e98089cd6c3e3c23f0c3d85'
+ '340deaa582a95ddde86edb624c3bfea0'
+ '6bbac50e6ff82187654e6a0a7bd849e7'
+ 'c483504cf404ed0b44480af627813a97'
+ '1419d61fd1dbc6cdc48bb59da86fa66f'
+ '7ff501435078b1a2622124fbeaafc921'
+ '8d1023a51e0932681b46440d5f8551ee'
+ '6962c3fa29306bfbf6f0d22b19cb825d'
+ '589d79041aa767a5179eaa4e2737dd3f'
+ 'ad8a9af15ab7eeaa23dc7ee85024af9f'
+ 'bccbe5619e75cf1d97312ec3681c605c'
+ '07ac979b6ab5eeb778d55f041529d623'
+ '476e9113489f93b348b21e144b6a8fcf')
+
+
+mksource() {
+ git clone git://sourceware.org/git/glibc.git
+ pushd glibc
+ #git checkout -b glibc-2.15-arch origin/release/2.15/master
+ git checkout -b glibc-2.15-arch origin/master
+ popd
+ tar -cvJf glibc-${pkgver}_${_glibcdate}.tar.xz glibc/*
+}
+
+
+build() {
+ cd ${srcdir}/glibc
+
+ # timezone data is in separate package (tzdata)
+ # http://sourceware.org/git/?p=glibc.git;a=commit;h=482ff4da
+ patch -p1 -i ${srcdir}/glibc-2.15-do-not-install-timezone-files.patch
+ # http://sourceware.org/git/?p=glibc.git;a=commit;h=a458e7fe
+ patch -p1 -i ${srcdir}/glibc-2.15-do-not-install-timezone-files-2.patch
+
+ # undefine __i686
+ # http://sourceware.org/glibc/wiki/Release/2.15#Build_Failures
+ patch -p1 -i ${srcdir}/glibc-__i686.patch
+
+ # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=675155e9 (fedora branch)
+ # http://sourceware.org/ml/libc-alpha/2011-06/msg00006.html
+ patch -p1 -i ${srcdir}/glibc-2.14-libdl-crash.patch
+
+ # re-export RPC interface until libtirpc is ready as a replacement
+ # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=acee4873 (fedora branch)
+ patch -p1 -i ${srcdir}/glibc-2.14-reexport-rpc-interface.patch
+ # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=bdd816a3 (fedora branch)
+ patch -p1 -i ${srcdir}/glibc-2.14-reinstall-nis-rpc-headers.patch
+
+ # fix res_query assertion
+ # http://sourceware.org/bugzilla/show_bug.cgi?id=13013
+ patch -p1 -i ${srcdir}/glibc-2.15-fix-res_query-assert.patch
+
+ # fix up regcomp/regexec
+ # http://sourceware.org/git/?p=glibc.git;a=commit;h=2ba92745
+ patch -p1 -i ${srcdir}/glibc-2.15-regex.patch
+
+ # propriety nvidia crash - https://bugzilla.redhat.com/show_bug.cgi?id=737223
+ # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=0c95ab64 (fedora branch)
+ patch -p1 -i ${srcdir}/glibc-2.15-lddebug-scopes.patch
+
+ # revert commit c5a0802a - causes various hangs
+ # https://bugzilla.redhat.com/show_bug.cgi?id=769421
+ # Note: fedora may have actual fix (not submitted upstream yet...)
+ # http://pkgs.fedoraproject.org/gitweb/?p=glibc.git;a=blob_plain;f=glibc-rh552960-2.patch
+ patch -p1 -i ${srcdir}/glibc-2.15-revert-c5a0802a.patch
+
+ # fix realloc usage in vfscanf
+ # http://sourceware.org/git/?p=glibc.git;a=commit;h=20b38e03
+ patch -p1 -i ${srcdir}/glibc-2.15-scanf.patch
+
+ # fix ifunc relocations
+ # http://sourceware.org/git/?p=glibc.git;a=commit;h=6ee65ed6
+ patch -p1 -i ${srcdir}/glibc-2.15-ifunc.patch
+
+ # fix AVX detection
+ # http://sourceware.org/git/?p=glibc.git;a=commit;h=afc5ed09
+ # http://sourceware.org/git/?p=glibc.git;a=commit;h=08cf777f
+ patch -p1 -i ${srcdir}/glibc-2.15-avx.patch
+ # and "fix" strcasecmp
+ patch -p1 -i ${srcdir}/glibc-2.15-strcasecmp-disable-avx.patch
+
+ # fix GB18030 charmap
+ # http://sourceware.org/bugzilla/show_bug.cgi?id=11837
+ # http://sourceware.org/git/?p=glibc.git;a=commit;h=2a57bd79 (fedora branch)
+ # http://sourceware.org/git/?p=glibc.git;a=commit;h=3d828a61 (fedora branch)
+ patch -p1 -i ${srcdir}/glibc-2.15-gb18030.patch
+
+ # fix crash in __nscd_get_mapping if nscd not running
+ # http://sourceware.org/bugzilla/show_bug.cgi?id=13594 (potential fix in comment)
+ # reverts commit 3a2c0242 and other necessary following changes...
+ patch -p1 -i ${srcdir}/glibc-2.15-revert-netlink-cache.patch
+
+ # handle ARENA_TEST correctly
+ # http://sourceware.org/git/?p=glibc.git;a=commit;h=41b81892
+ patch -p1 -i ${srcdir}/glibc-2.15-arena.patch
+
+ # Do not cache negative results in nscd if these are transient
+ # http://sourceware.org/git/?p=glibc.git;a=commit;h=3e1aa84e
+ patch -p1 -i ${srcdir}/glibc-2.15-negative-result-cache.patch
+
+ # strcasecmp_l, strncasecmp_l act as strcmp for multiarch x86
+ # http://sourceware.org/git/?p=glibc.git;a=commit;h=0bab47b6
+ patch -p1 -i ${srcdir}/glibc-2.15-multiarch-x86-strcmp.patch
+
+ # always set l_used for vDSO.
+ # http://sourceware.org/git/?p=glibc.git;a=commit;h=1f393a11
+ patch -p1 -i ${srcdir}/glibc-2.15-vdso.patch
+
+ # fix x86 PLT slot usage for feraiseexcept
+ # http://sourceware.org/git/?p=glibc.git;a=commit;h=7c35ffed
+ patch -p1 -i ${srcdir}/glibc-2.15-feraiseexcept-plt.patch
+
+ # vfprintf nargs overflow - CVE-2012-0864
+ # http://sourceware.org/git/?p=glibc.git;a=commit;h=7c1f4834
+ patch -p1 -i ${srcdir}/glibc-2.15-vfprintf-nargs.patch
+
+ # avoid out ouf bounds read in __libc_res_nquerydomain
+ # http://sourceware.org/git/?p=glibc.git;a=commit;h=8fdceb2e
+ patch -p1 -i ${srcdir}/glibc-2.15-__libc_res_nquerydomain-out-of-bounds.patch
+
+ # make fmtmsg function thread-safe
+ # http://sourceware.org/git/?p=glibc.git;a=commit;h=7724defc
+ patch -p1 -i ${srcdir}/glibc-2.15-fmtmsg-locking.patch
+
+ # use non-signaling floating-point comparisons in math functions
+ # http://sourceware.org/git/?p=glibc.git;a=commit;h=92221550
+ patch -p1 -i ${srcdir}/glibc-2.15-non-signalling-comparisons.patch
+
+ # fix rintf rounding.
+ # http://sourceware.org/git/?p=glibc.git;a=commit;h=fe45ce09
+ patch -p1 -i ${srcdir}/glibc-2.15-rintf-rounding.patch
+
+ # fix nearbyintf rounding
+ # http://sourceware.org/git/?p=glibc.git;a=commit;h=6cbeae47
+ patch -p1 -i ${srcdir}/glibc-2.15-nearbyintf-rounding.patch
+
+ # fix varaible scope issue in confstr
+ # http://sourceware.org/git/?p=glibc.git;a=commit;h=ac4c54f0
+ # http://sourceware.org/git/?p=glibc.git;a=commit;h=d6a403f9
+ patch -p1 -i ${srcdir}/glibc-2.15-confstr-local-buffer-extent.patch
+
+ # fix testsuite failures with --as-needed
+ # http://sourceware.org/git/?p=glibc.git;a=commit;h=d4c2917f
+ patch -p1 -i ${srcdir}/glibc-2.15-testsuite.patch
+
+ install -dm755 ${pkgdir}/etc
+ touch ${pkgdir}/etc/ld.so.conf
+
+ cd ${srcdir}
+ mkdir glibc-build
+ cd glibc-build
+
+ if [[ ${CARCH} = "i686" ]]; then
+ # Hack to fix NPTL issues with Xen, only required on 32bit platforms
+ # TODO: make separate glibc-xen package for i686
+ export CFLAGS="${CFLAGS} -mno-tls-direct-seg-refs"
+ fi
+
+ echo "slibdir=/lib" >> configparms
+
+ # remove hardening options from CFLAGS for building libraries
+ CFLAGS=${CFLAGS/-fstack-protector/}
+ CFLAGS=${CFLAGS/-D_FORTIFY_SOURCE=2/}
+
+ ${srcdir}/glibc/configure --prefix=/usr \
+ --libdir=/usr/lib --libexecdir=/usr/lib \
+ --with-headers=/usr/include \
+ --enable-add-ons=nptl,libidn \
+ --enable-kernel=2.6.32 \
+ --enable-bind-now --disable-profile \
+ --enable-multi-arch
+
+ # build libraries with hardening disabled
+ echo "build-programs=no" >> configparms
+ make
+
+ # re-enable hardening for programs
+ sed -i "/build-programs=/s#no#yes#" configparms
+ echo "CC += -fstack-protector -D_FORTIFY_SOURCE=2" >> configparms
+ echo "CXX += -fstack-protector -D_FORTIFY_SOURCE=2" >> configparms
+ make
+
+ # remove harding in preparation to run test-suite
+ sed -i '2,4d' configparms
+}
+
+check() {
+ cd ${srcdir}/glibc-build
+ make -k check
+}
+
+package() {
+ cd ${srcdir}/glibc-build
+ make install_root=${pkgdir} install
+
+ rm -f ${pkgdir}/etc/ld.so.{cache,conf}
+
+ install -dm755 ${pkgdir}/{etc/rc.d,usr/{sbin,lib/{,locale,systemd/system,tmpfiles.d}}}
+
+ install -m644 ${srcdir}/glibc/nscd/nscd.conf ${pkgdir}/etc/nscd.conf
+ sed -i -e 's/^\tserver-user/#\tserver-user/' ${pkgdir}/etc/nscd.conf
+ install -m755 ${srcdir}/nscd.rcd ${pkgdir}/etc/rc.d/nscd
+ install -m644 ${srcdir}/nscd.service ${pkgdir}/usr/lib/systemd/system
+ install -m644 ${srcdir}/nscd.tmpfiles ${pkgdir}/usr/lib/tmpfiles.d/nscd.conf
+
+ install -m644 ${srcdir}/glibc/posix/gai.conf ${pkgdir}/etc/gai.conf
+
+ install -m755 ${srcdir}/locale-gen ${pkgdir}/usr/sbin
+
+ # create /etc/locale.gen
+ install -m644 ${srcdir}/locale.gen.txt ${pkgdir}/etc/locale.gen
+ sed -i "s|/| |g" ${srcdir}/glibc/localedata/SUPPORTED
+ sed -i 's|\\| |g' ${srcdir}/glibc/localedata/SUPPORTED
+ sed -i "s|SUPPORTED-LOCALES=||" ${srcdir}/glibc/localedata/SUPPORTED
+ cat ${srcdir}/glibc/localedata/SUPPORTED >> ${pkgdir}/etc/locale.gen
+ sed -i "s|^|#|g" ${pkgdir}/etc/locale.gen
+
+ if [[ ${CARCH} = "x86_64" ]]; then
+ # fix for the linker
+ sed -i '/RTLDLIST/s%lib64%lib%' ${pkgdir}/usr/bin/ldd
+ # Comply with multilib binaries, they look for the linker in /lib64
+ mkdir ${pkgdir}/lib64
+ cd ${pkgdir}/lib64
+ ln -v -s ../lib/ld* .
+ fi
+
+ # Do not strip the following files for improved debugging support
+ # ("improved" as in not breaking gdb and valgrind...):
+ # ld-${pkgver}.so
+ # libc-${pkgver}.so
+ # libpthread-${pkgver}.so
+ # libthread_db-1.0.so
+
+ cd $pkgdir
+ strip $STRIP_BINARIES sbin/{ldconfig,sln} \
+ usr/bin/{gencat,getconf,getent,iconv,locale,localedef} \
+ usr/bin/{makedb,pcprofiledump,pldd,rpcgen,sprof} \
+ usr/lib/getconf/* \
+ usr/sbin/{iconvconfig,nscd}
+ [[ $CARCH = "i686" ]] && strip $STRIP_BINARIES usr/bin/lddlibc4
+
+ strip $STRIP_STATIC usr/lib/*.a
+
+ strip $STRIP_SHARED lib/{libanl,libBrokenLocale,libcidn,libcrypt}-${pkgver}.so \
+ lib/libnss_{compat,db,dns,files,hesiod,nis,nisplus}-${pkgver}.so \
+ lib/{libdl,libm,libnsl,libresolv,librt,libutil}-${pkgver}.so \
+ lib/{libmemusage,libpcprofile,libSegFault}.so \
+ usr/lib/{pt_chown,{audit,gconv}/*.so}
+}
diff --git a/staging/glibc/glibc-2.14-libdl-crash.patch b/staging/glibc/glibc-2.14-libdl-crash.patch
new file mode 100644
index 000000000..6c9d2718e
--- /dev/null
+++ b/staging/glibc/glibc-2.14-libdl-crash.patch
@@ -0,0 +1,132 @@
+diff --git a/elf/dl-close.c b/elf/dl-close.c
+index 73b2a2f..9bd91e3 100644
+--- a/elf/dl-close.c
++++ b/elf/dl-close.c
+@@ -1,5 +1,5 @@
+ /* Close a shared object opened by `_dl_open'.
+- Copyright (C) 1996-2007, 2009, 2010, 2011 Free Software Foundation, Inc.
++ Copyright (C) 1996-2007, 2009, 2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+@@ -119,17 +119,8 @@ _dl_close_worker (struct link_map *map)
+ if (map->l_direct_opencount > 0 || map->l_type != lt_loaded
+ || dl_close_state != not_pending)
+ {
+- if (map->l_direct_opencount == 0)
+- {
+- if (map->l_type == lt_loaded)
+- dl_close_state = rerun;
+- else if (map->l_type == lt_library)
+- {
+- struct link_map **oldp = map->l_initfini;
+- map->l_initfini = map->l_orig_initfini;
+- _dl_scope_free (oldp);
+- }
+- }
++ if (map->l_direct_opencount == 0 && map->l_type == lt_loaded)
++ dl_close_state = rerun;
+
+ /* There are still references to this object. Do nothing more. */
+ if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0))
+diff --git a/elf/dl-deps.c b/elf/dl-deps.c
+index 9e30594..3890d00 100644
+--- a/elf/dl-deps.c
++++ b/elf/dl-deps.c
+@@ -478,6 +478,7 @@ _dl_map_object_deps (struct link_map *map,
+ nneeded * sizeof needed[0]);
+ atomic_write_barrier ();
+ l->l_initfini = l_initfini;
++ l->l_free_initfini = 1;
+ }
+
+ /* If we have no auxiliary objects just go on to the next map. */
+@@ -681,6 +682,7 @@ Filters not supported with LD_TRACE_PRELINKING"));
+ l_initfini[nlist] = NULL;
+ atomic_write_barrier ();
+ map->l_initfini = l_initfini;
++ map->l_free_initfini = 1;
+ if (l_reldeps != NULL)
+ {
+ atomic_write_barrier ();
+@@ -689,5 +691,5 @@ Filters not supported with LD_TRACE_PRELINKING"));
+ _dl_scope_free (old_l_reldeps);
+ }
+ if (old_l_initfini != NULL)
+- map->l_orig_initfini = old_l_initfini;
++ _dl_scope_free (old_l_initfini);
+
+diff --git a/elf/dl-libc.c b/elf/dl-libc.c
+index 7be9483..a13fce3 100644
+--- a/elf/dl-libc.c
++++ b/elf/dl-libc.c
+@@ -265,13 +265,13 @@ libc_freeres_fn (free_mem)
+
+ for (Lmid_t ns = 0; ns < GL(dl_nns); ++ns)
+ {
+- /* Remove all additional names added to the objects. */
+ for (l = GL(dl_ns)[ns]._ns_loaded; l != NULL; l = l->l_next)
+ {
+ struct libname_list *lnp = l->l_libname->next;
+
+ l->l_libname->next = NULL;
+
++ /* Remove all additional names added to the objects. */
+ while (lnp != NULL)
+ {
+ struct libname_list *old = lnp;
+@@ -279,6 +279,10 @@ libc_freeres_fn (free_mem)
+ if (! old->dont_free)
+ free (old);
+ }
++
++ /* Free the initfini dependency list. */
++ if (l->l_free_initfini)
++ free (l->l_initfini);
+ }
+
+ if (__builtin_expect (GL(dl_ns)[ns]._ns_global_scope_alloc, 0) != 0
+diff --git a/elf/rtld.c b/elf/rtld.c
+index 4a9109e..617e30e 100644
+--- a/elf/rtld.c
++++ b/elf/rtld.c
+@@ -2251,6 +2251,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
+ lnp->dont_free = 1;
+ lnp = lnp->next;
+ }
++ l->l_free_initfini = 0;
+
+ if (l != &GL(dl_rtld_map))
+ _dl_relocate_object (l, l->l_scope, GLRO(dl_lazy) ? RTLD_LAZY : 0,
+diff --git a/include/link.h b/include/link.h
+index e877104..051b99a 100644
+--- a/include/link.h
++++ b/include/link.h
+@@ -1,6 +1,6 @@
+ /* Data structure for communication from the run-time dynamic linker for
+ loaded ELF shared objects.
+- Copyright (C) 1995-2006, 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
++ Copyright (C) 1995-2006, 2007, 2009, 2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+@@ -192,6 +192,9 @@ struct link_map
+ during LD_TRACE_PRELINKING=1
+ contains any DT_SYMBOLIC
+ libraries. */
++ unsigned int l_free_initfini:1; /* Nonzero if l_initfini can be
++ freed, ie. not allocated with
++ the dummy malloc in ld.so. */
+
+ /* Collected information about own RPATH directories. */
+ struct r_search_path_struct l_rpath_dirs;
+@@ -240,9 +243,6 @@ struct link_map
+
+ /* List of object in order of the init and fini calls. */
+ struct link_map **l_initfini;
+- /* The init and fini list generated at startup, saved when the
+- object is also loaded dynamically. */
+- struct link_map **l_orig_initfini;
+
+ /* List of the dependencies introduced through symbol binding. */
+ struct link_map_reldeps
diff --git a/staging/glibc/glibc-2.14-reexport-rpc-interface.patch b/staging/glibc/glibc-2.14-reexport-rpc-interface.patch
new file mode 100644
index 000000000..e2beea881
--- /dev/null
+++ b/staging/glibc/glibc-2.14-reexport-rpc-interface.patch
@@ -0,0 +1,26 @@
+diff --git a/include/libc-symbols.h b/include/libc-symbols.h
+index 67e1ca2..5e7cca5 100644
+--- a/include/libc-symbols.h
++++ b/include/libc-symbols.h
+@@ -635,7 +635,7 @@ for linking")
+ # define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
+ # define libc_hidden_def(name) hidden_def (name)
+ # define libc_hidden_weak(name) hidden_weak (name)
+-# define libc_hidden_nolink(name, version) hidden_nolink (name, libc, version)
++# define libc_hidden_nolink(name, version) hidden_def (name)
+ # define libc_hidden_ver(local, name) hidden_ver (local, name)
+ # define libc_hidden_data_def(name) hidden_data_def (name)
+ # define libc_hidden_data_weak(name) hidden_data_weak (name)
+diff --git a/sunrpc/Makefile b/sunrpc/Makefile
+index 5134ce9..40c73d1 100644
+--- a/sunrpc/Makefile
++++ b/sunrpc/Makefile
+@@ -53,7 +53,7 @@ headers-in-tirpc = $(addprefix rpc/,auth.h auth_unix.h clnt.h pmap_clnt.h \
+ des_crypt.h)
+ headers-not-in-tirpc = $(addprefix rpc/,key_prot.h rpc_des.h) \
+ $(rpcsvc:%=rpcsvc/%) rpcsvc/bootparam.h
+-headers = rpc/netdb.h
++headers = rpc/netdb.h $(headers-in-tirpc) $(headers-not-in-tirpc)
+ install-others = $(inst_sysconfdir)/rpc
+ generated = $(rpcsvc:%.x=rpcsvc/%.h) $(rpcsvc:%.x=x%.c) $(rpcsvc:%.x=x%.stmp) \
+ $(rpcsvc:%.x=rpcsvc/%.stmp) rpcgen
diff --git a/staging/glibc/glibc-2.14-reinstall-nis-rpc-headers.patch b/staging/glibc/glibc-2.14-reinstall-nis-rpc-headers.patch
new file mode 100644
index 000000000..eb0fd822d
--- /dev/null
+++ b/staging/glibc/glibc-2.14-reinstall-nis-rpc-headers.patch
@@ -0,0 +1,28 @@
+From bdd816a366c4e5bba5de7157d948e0c0737fb4fb Mon Sep 17 00:00:00 2001
+From: Andreas Schwab <schwab@redhat.com>
+Date: Tue, 17 May 2011 17:42:30 +0200
+Subject: [PATCH] Reinstall NIS RPC headers
+
+---
+ nis/Makefile | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/nis/Makefile b/nis/Makefile
+index b5c9609..d2934d9 100644
+--- a/nis/Makefile
++++ b/nis/Makefile
+@@ -23,9 +23,9 @@ subdir := nis
+
+ aux := nis_hash
+
++headers := $(wildcard rpcsvc/*.[hx])
+ distribute := nss-nis.h nss-nisplus.h nis_intern.h Banner \
+- nisplus-parser.h nis_xdr.h nss \
+- $(wildcard rpcsvc/*.[hx])
++ nisplus-parser.h nis_xdr.h nss
+
+ # These are the databases available for the nis (and perhaps later nisplus)
+ # service. This must be a superset of the services in nss.
+--
+1.7.5.4
+
diff --git a/staging/glibc/glibc-2.15-__libc_res_nquerydomain-out-of-bounds.patch b/staging/glibc/glibc-2.15-__libc_res_nquerydomain-out-of-bounds.patch
new file mode 100644
index 000000000..6f0a0398f
--- /dev/null
+++ b/staging/glibc/glibc-2.15-__libc_res_nquerydomain-out-of-bounds.patch
@@ -0,0 +1,24 @@
+diff --git a/resolv/res_query.c b/resolv/res_query.c
+index 947c651..abccd4a 100644
+--- a/resolv/res_query.c
++++ b/resolv/res_query.c
+@@ -556,12 +556,16 @@ __libc_res_nquerydomain(res_state statp,
+ * copy without '.' if present.
+ */
+ n = strlen(name);
+- if (n >= MAXDNAME) {
++
++ /* Decrement N prior to checking it against MAXDNAME
++ so that we detect a wrap to SIZE_MAX and return
++ a reasonable error. */
++ n--;
++ if (n >= MAXDNAME - 1) {
+ RES_SET_H_ERRNO(statp, NO_RECOVERY);
+ return (-1);
+ }
+- n--;
+- if (n >= 0 && name[n] == '.') {
++ if (name[n] == '.') {
+ strncpy(nbuf, name, n);
+ nbuf[n] = '\0';
+ } else
diff --git a/staging/glibc/glibc-2.15-arena.patch b/staging/glibc/glibc-2.15-arena.patch
new file mode 100644
index 000000000..46f52e98d
--- /dev/null
+++ b/staging/glibc/glibc-2.15-arena.patch
@@ -0,0 +1,29 @@
+diff --git a/malloc/arena.c b/malloc/arena.c
+index d3cf4b9..b1c9469 100644
+--- a/malloc/arena.c
++++ b/malloc/arena.c
+@@ -828,7 +828,7 @@ arena_get2(mstate a_tsd, size_t size)
+ {
+ if (mp_.arena_max != 0)
+ narenas_limit = mp_.arena_max;
+- else
++ else if (narenas > mp_.arena_test)
+ {
+ int n = __get_nprocs ();
+
+@@ -842,7 +842,14 @@ arena_get2(mstate a_tsd, size_t size)
+ }
+ repeat:;
+ size_t n = narenas;
+- if (__builtin_expect (n <= mp_.arena_test || n < narenas_limit, 0))
++ /* NB: the following depends on the fact that (size_t)0 - 1 is a
++ very large number and that the underflow is OK. If arena_max
++ is set the value of arena_test is irrelevant. If arena_test
++ is set but narenas is not yet larger or equal to arena_test
++ narenas_limit is 0. There is no possibility for narenas to
++ be too big for the test to always fail since there is not
++ enough address space to create that many arenas. */
++ if (__builtin_expect (n <= narenas_limit - 1, 0))
+ {
+ if (catomic_compare_and_exchange_bool_acq (&narenas, n + 1, n))
+ goto repeat;
diff --git a/staging/glibc/glibc-2.15-avx.patch b/staging/glibc/glibc-2.15-avx.patch
new file mode 100644
index 000000000..5439da8d0
--- /dev/null
+++ b/staging/glibc/glibc-2.15-avx.patch
@@ -0,0 +1,196 @@
+diff --git a/sysdeps/x86_64/fpu/multiarch/e_atan2.c b/sysdeps/x86_64/fpu/multiarch/e_atan2.c
+index 6867c6e..3a615fc 100644
+--- a/sysdeps/x86_64/fpu/multiarch/e_atan2.c
++++ b/sysdeps/x86_64/fpu/multiarch/e_atan2.c
+@@ -14,7 +14,7 @@ extern double __ieee754_atan2_fma4 (double, double);
+
+ libm_ifunc (__ieee754_atan2,
+ HAS_FMA4 ? __ieee754_atan2_fma4
+- : (HAS_AVX ? __ieee754_atan2_avx : __ieee754_atan2_sse2));
++ : (HAS_YMM_USABLE ? __ieee754_atan2_avx : __ieee754_atan2_sse2));
+ strong_alias (__ieee754_atan2, __atan2_finite)
+
+ # define __ieee754_atan2 __ieee754_atan2_sse2
+diff --git a/sysdeps/x86_64/fpu/multiarch/e_exp.c b/sysdeps/x86_64/fpu/multiarch/e_exp.c
+index 3c65028..7b2320a 100644
+--- a/sysdeps/x86_64/fpu/multiarch/e_exp.c
++++ b/sysdeps/x86_64/fpu/multiarch/e_exp.c
+@@ -14,7 +14,7 @@ extern double __ieee754_exp_fma4 (double);
+
+ libm_ifunc (__ieee754_exp,
+ HAS_FMA4 ? __ieee754_exp_fma4
+- : (HAS_AVX ? __ieee754_exp_avx : __ieee754_exp_sse2));
++ : (HAS_YMM_USABLE ? __ieee754_exp_avx : __ieee754_exp_sse2));
+ strong_alias (__ieee754_exp, __exp_finite)
+
+ # define __ieee754_exp __ieee754_exp_sse2
+diff --git a/sysdeps/x86_64/fpu/multiarch/e_log.c b/sysdeps/x86_64/fpu/multiarch/e_log.c
+index 3b468d0..ab277d6 100644
+--- a/sysdeps/x86_64/fpu/multiarch/e_log.c
++++ b/sysdeps/x86_64/fpu/multiarch/e_log.c
+@@ -14,7 +14,7 @@ extern double __ieee754_log_fma4 (double);
+
+ libm_ifunc (__ieee754_log,
+ HAS_FMA4 ? __ieee754_log_fma4
+- : (HAS_AVX ? __ieee754_log_avx
++ : (HAS_YMM_USABLE ? __ieee754_log_avx
+ : __ieee754_log_sse2));
+ strong_alias (__ieee754_log, __log_finite)
+
+diff --git a/sysdeps/x86_64/fpu/multiarch/s_atan.c b/sysdeps/x86_64/fpu/multiarch/s_atan.c
+index 3160201..78c7e09 100644
+--- a/sysdeps/x86_64/fpu/multiarch/s_atan.c
++++ b/sysdeps/x86_64/fpu/multiarch/s_atan.c
+@@ -12,7 +12,8 @@ extern double __atan_fma4 (double);
+ # define __atan_fma4 ((void *) 0)
+ # endif
+
+-libm_ifunc (atan, HAS_FMA4 ? __atan_fma4 : HAS_AVX ? __atan_avx : __atan_sse2);
++libm_ifunc (atan, (HAS_FMA4 ? __atan_fma4 :
++ HAS_YMM_USABLE ? __atan_avx : __atan_sse2));
+
+ # define atan __atan_sse2
+ #endif
+diff --git a/sysdeps/x86_64/fpu/multiarch/s_sin.c b/sysdeps/x86_64/fpu/multiarch/s_sin.c
+index 1ba9dbc..417acd0 100644
+--- a/sysdeps/x86_64/fpu/multiarch/s_sin.c
++++ b/sysdeps/x86_64/fpu/multiarch/s_sin.c
+@@ -17,10 +17,12 @@ extern double __sin_fma4 (double);
+ # define __sin_fma4 ((void *) 0)
+ # endif
+
+-libm_ifunc (__cos, HAS_FMA4 ? __cos_fma4 : HAS_AVX ? __cos_avx : __cos_sse2);
++libm_ifunc (__cos, (HAS_FMA4 ? __cos_fma4 :
++ HAS_YMM_USABLE ? __cos_avx : __cos_sse2));
+ weak_alias (__cos, cos)
+
+-libm_ifunc (__sin, HAS_FMA4 ? __sin_fma4 : HAS_AVX ? __sin_avx : __sin_sse2);
++libm_ifunc (__sin, (HAS_FMA4 ? __sin_fma4 :
++ HAS_YMM_USABLE ? __sin_avx : __sin_sse2));
+ weak_alias (__sin, sin)
+
+ # define __cos __cos_sse2
+diff --git a/sysdeps/x86_64/fpu/multiarch/s_tan.c b/sysdeps/x86_64/fpu/multiarch/s_tan.c
+index 8f6601e..3047155 100644
+--- a/sysdeps/x86_64/fpu/multiarch/s_tan.c
++++ b/sysdeps/x86_64/fpu/multiarch/s_tan.c
+@@ -12,7 +12,8 @@ extern double __tan_fma4 (double);
+ # define __tan_fma4 ((void *) 0)
+ # endif
+
+-libm_ifunc (tan, HAS_FMA4 ? __tan_fma4 : HAS_AVX ? __tan_avx : __tan_sse2);
++libm_ifunc (tan, (HAS_FMA4 ? __tan_fma4 :
++ HAS_YMM_USABLE ? __tan_avx : __tan_sse2));
+
+ # define tan __tan_sse2
+ #endif
+diff --git a/sysdeps/x86_64/multiarch/init-arch.c b/sysdeps/x86_64/multiarch/init-arch.c
+index 65b0ee9..76d146c 100644
+--- a/sysdeps/x86_64/multiarch/init-arch.c
++++ b/sysdeps/x86_64/multiarch/init-arch.c
+@@ -1,6 +1,6 @@
+ /* Initialize CPU feature data.
+ This file is part of the GNU C Library.
+- Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
++ Copyright (C) 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+ Contributed by Ulrich Drepper <drepper@redhat.com>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+@@ -144,6 +144,18 @@ __init_cpu_features (void)
+ else
+ kind = arch_kind_other;
+
++ if (__cpu_features.cpuid[COMMON_CPUID_INDEX_1].ecx & bit_AVX)
++ {
++ /* Reset the AVX bit in case OSXSAVE is disabled. */
++ if ((__cpu_features.cpuid[COMMON_CPUID_INDEX_1].ecx & bit_OSXSAVE) != 0
++ && ({ unsigned int xcrlow;
++ unsigned int xcrhigh;
++ asm ("xgetbv"
++ : "=a" (xcrlow), "=d" (xcrhigh) : "c" (0));
++ (xcrlow & 6) == 6; }))
++ __cpu_features.feature[index_YMM_Usable] |= bit_YMM_Usable;
++ }
++
+ __cpu_features.family = family;
+ __cpu_features.model = model;
+ atomic_write_barrier ();
+diff --git a/sysdeps/x86_64/multiarch/init-arch.h b/sysdeps/x86_64/multiarch/init-arch.h
+index 2a1df39..2dc75ab 100644
+--- a/sysdeps/x86_64/multiarch/init-arch.h
++++ b/sysdeps/x86_64/multiarch/init-arch.h
+@@ -1,5 +1,5 @@
+ /* This file is part of the GNU C Library.
+- Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
++ Copyright (C) 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+@@ -22,11 +22,13 @@
+ #define bit_Prefer_SSE_for_memop (1 << 3)
+ #define bit_Fast_Unaligned_Load (1 << 4)
+ #define bit_Prefer_PMINUB_for_stringop (1 << 5)
++#define bit_YMM_Usable (1 << 6)
+
+ #define bit_SSE2 (1 << 26)
+ #define bit_SSSE3 (1 << 9)
+ #define bit_SSE4_1 (1 << 19)
+ #define bit_SSE4_2 (1 << 20)
++#define bit_OSXSAVE (1 << 27)
+ #define bit_AVX (1 << 28)
+ #define bit_POPCOUNT (1 << 23)
+ #define bit_FMA (1 << 12)
+@@ -48,6 +50,7 @@
+ # define index_Prefer_SSE_for_memop FEATURE_INDEX_1*FEATURE_SIZE
+ # define index_Fast_Unaligned_Load FEATURE_INDEX_1*FEATURE_SIZE
+ # define index_Prefer_PMINUB_for_stringop FEATURE_INDEX_1*FEATURE_SIZE
++# define index_YMM_Usable FEATURE_INDEX_1*FEATURE_SIZE
+
+ #else /* __ASSEMBLER__ */
+
+@@ -92,7 +95,7 @@ extern struct cpu_features
+
+
+ extern void __init_cpu_features (void) attribute_hidden;
+-#define INIT_ARCH()\
++# define INIT_ARCH() \
+ do \
+ if (__cpu_features.kind == arch_kind_unknown) \
+ __init_cpu_features (); \
+@@ -125,23 +128,21 @@ extern const struct cpu_features *__get_cpu_features (void)
+ # define index_Slow_BSF FEATURE_INDEX_1
+ # define index_Prefer_SSE_for_memop FEATURE_INDEX_1
+ # define index_Fast_Unaligned_Load FEATURE_INDEX_1
++# define index_YMM_Usable FEATURE_INDEX_1
+
+-#define HAS_ARCH_FEATURE(idx, bit) \
+- ((__get_cpu_features ()->feature[idx] & (bit)) != 0)
++# define HAS_ARCH_FEATURE(name) \
++ ((__get_cpu_features ()->feature[index_##name] & (bit_##name)) != 0)
+
+-#define HAS_FAST_REP_STRING \
+- HAS_ARCH_FEATURE (index_Fast_Rep_String, bit_Fast_Rep_String)
++# define HAS_FAST_REP_STRING HAS_ARCH_FEATURE (Fast_Rep_String)
+
+-#define HAS_FAST_COPY_BACKWARD \
+- HAS_ARCH_FEATURE (index_Fast_Copy_Backward, bit_Fast_Copy_Backward)
++# define HAS_FAST_COPY_BACKWARD HAS_ARCH_FEATURE (Fast_Copy_Backward)
+
+-#define HAS_SLOW_BSF \
+- HAS_ARCH_FEATURE (index_Slow_BSF, bit_Slow_BSF)
++# define HAS_SLOW_BSF HAS_ARCH_FEATURE (Slow_BSF)
+
+-#define HAS_PREFER_SSE_FOR_MEMOP \
+- HAS_ARCH_FEATURE (index_Prefer_SSE_for_memop, bit_Prefer_SSE_for_memop)
++# define HAS_PREFER_SSE_FOR_MEMOP HAS_ARCH_FEATURE (Prefer_SSE_for_memop)
+
+-#define HAS_FAST_UNALIGNED_LOAD \
+- HAS_ARCH_FEATURE (index_Fast_Unaligned_Load, bit_Fast_Unaligned_Load)
++# define HAS_FAST_UNALIGNED_LOAD HAS_ARCH_FEATURE (Fast_Unaligned_Load)
++
++# define HAS_YMM_USABLE HAS_ARCH_FEATURE (YMM_Usable)
+
+ #endif /* __ASSEMBLER__ */
+--
+1.7.9
+
diff --git a/staging/glibc/glibc-2.15-confstr-local-buffer-extent.patch b/staging/glibc/glibc-2.15-confstr-local-buffer-extent.patch
new file mode 100644
index 000000000..483b28532
--- /dev/null
+++ b/staging/glibc/glibc-2.15-confstr-local-buffer-extent.patch
@@ -0,0 +1,297 @@
+diff --git a/posix/confstr.c b/posix/confstr.c
+index 3c9566d..cad6561 100644
+--- a/posix/confstr.c
++++ b/posix/confstr.c
+@@ -35,6 +34,10 @@ confstr (name, buf, len)
+ const char *string = "";
+ size_t string_len = 1;
+
++ /* Note that this buffer must be large enough for the longest strings
++ used below. */
++ char restenvs[4 * sizeof "POSIX_V7_LPBIG_OFFBIG"];
++
+ switch (name)
+ {
+ case _CS_PATH:
+@@ -53,59 +56,55 @@ confstr (name, buf, len)
+ wint_t types are no greater than the width of type long.
+
+ Currently this means all environment which the system allows. */
+- {
+- char restenvs[4 * sizeof "POSIX_V7_LPBIG_OFFBIG"];
+-
+- string_len = 0;
++ string_len = 0;
+ #ifndef _POSIX_V7_ILP32_OFF32
+- if (__sysconf (_SC_V7_ILP32_OFF32) > 0)
++ if (__sysconf (_SC_V7_ILP32_OFF32) > 0)
+ #endif
+ #if !defined _POSIX_V7_ILP32_OFF32 || _POSIX_V7_ILP32_OFF32 > 0
+- {
+- memcpy (restenvs + string_len, "POSIX_V7_ILP32_OFF32",
+- sizeof "POSIX_V7_ILP32_OFF32" - 1);
+- string_len += sizeof "POSIX_V7_ILP32_OFF32" - 1;
+- }
++ {
++ memcpy (restenvs + string_len, "POSIX_V7_ILP32_OFF32",
++ sizeof "POSIX_V7_ILP32_OFF32" - 1);
++ string_len += sizeof "POSIX_V7_ILP32_OFF32" - 1;
++ }
+ #endif
+ #ifndef _POSIX_V7_ILP32_OFFBIG
+- if (__sysconf (_SC_V7_ILP32_OFFBIG) > 0)
++ if (__sysconf (_SC_V7_ILP32_OFFBIG) > 0)
+ #endif
+ #if !defined _POSIX_V7_ILP32_OFFBIG || _POSIX_V7_ILP32_OFFBIG > 0
+- {
+- if (string_len)
+- restenvs[string_len++] = '\n';
+- memcpy (restenvs + string_len, "POSIX_V7_ILP32_OFFBIG",
+- sizeof "POSIX_V7_ILP32_OFFBIG" - 1);
+- string_len += sizeof "POSIX_V7_ILP32_OFFBIG" - 1;
+- }
++ {
++ if (string_len)
++ restenvs[string_len++] = '\n';
++ memcpy (restenvs + string_len, "POSIX_V7_ILP32_OFFBIG",
++ sizeof "POSIX_V7_ILP32_OFFBIG" - 1);
++ string_len += sizeof "POSIX_V7_ILP32_OFFBIG" - 1;
++ }
+ #endif
+ #ifndef _POSIX_V7_LP64_OFF64
+- if (__sysconf (_SC_V7_LP64_OFF64) > 0)
++ if (__sysconf (_SC_V7_LP64_OFF64) > 0)
+ #endif
+ #if !defined _POSIX_V7_LP64_OFF64 || _POSIX_V7_LP64_OFF64 > 0
+- {
+- if (string_len)
+- restenvs[string_len++] = '\n';
+- memcpy (restenvs + string_len, "POSIX_V7_LP64_OFF64",
+- sizeof "POSIX_V7_LP64_OFF64" - 1);
+- string_len += sizeof "POSIX_V7_LP64_OFF64" - 1;
+- }
++ {
++ if (string_len)
++ restenvs[string_len++] = '\n';
++ memcpy (restenvs + string_len, "POSIX_V7_LP64_OFF64",
++ sizeof "POSIX_V7_LP64_OFF64" - 1);
++ string_len += sizeof "POSIX_V7_LP64_OFF64" - 1;
++ }
+ #endif
+ #ifndef _POSIX_V7_LPBIG_OFFBIG
+- if (__sysconf (_SC_V7_LPBIG_OFFBIG) > 0)
++ if (__sysconf (_SC_V7_LPBIG_OFFBIG) > 0)
+ #endif
+ #if !defined _POSIX_V7_LPBIG_OFFBIG || _POSIX_V7_LPBIG_OFFBIG > 0
+- {
+- if (string_len)
+- restenvs[string_len++] = '\n';
+- memcpy (restenvs + string_len, "POSIX_V7_LPBIG_OFFBIG",
+- sizeof "POSIX_V7_LPBIG_OFFBIG" - 1);
+- string_len += sizeof "POSIX_V7_LPBIG_OFFBIG" - 1;
+- }
+-#endif
+- restenvs[string_len++] = '\0';
+- string = restenvs;
+- }
++ {
++ if (string_len)
++ restenvs[string_len++] = '\n';
++ memcpy (restenvs + string_len, "POSIX_V7_LPBIG_OFFBIG",
++ sizeof "POSIX_V7_LPBIG_OFFBIG" - 1);
++ string_len += sizeof "POSIX_V7_LPBIG_OFFBIG" - 1;
++ }
++#endif
++ restenvs[string_len++] = '\0';
++ string = restenvs;
+ break;
+
+ case _CS_V6_WIDTH_RESTRICTED_ENVS:
+@@ -116,59 +115,55 @@ confstr (name, buf, len)
+ wint_t types are no greater than the width of type long.
+
+ Currently this means all environment which the system allows. */
+- {
+- char restenvs[4 * sizeof "POSIX_V6_LPBIG_OFFBIG"];
+-
+- string_len = 0;
++ string_len = 0;
+ #ifndef _POSIX_V6_ILP32_OFF32
+- if (__sysconf (_SC_V6_ILP32_OFF32) > 0)
++ if (__sysconf (_SC_V6_ILP32_OFF32) > 0)
+ #endif
+ #if !defined _POSIX_V6_ILP32_OFF32 || _POSIX_V6_ILP32_OFF32 > 0
+- {
+- memcpy (restenvs + string_len, "POSIX_V6_ILP32_OFF32",
+- sizeof "POSIX_V6_ILP32_OFF32" - 1);
+- string_len += sizeof "POSIX_V6_ILP32_OFF32" - 1;
+- }
++ {
++ memcpy (restenvs + string_len, "POSIX_V6_ILP32_OFF32",
++ sizeof "POSIX_V6_ILP32_OFF32" - 1);
++ string_len += sizeof "POSIX_V6_ILP32_OFF32" - 1;
++ }
+ #endif
+ #ifndef _POSIX_V6_ILP32_OFFBIG
+- if (__sysconf (_SC_V6_ILP32_OFFBIG) > 0)
++ if (__sysconf (_SC_V6_ILP32_OFFBIG) > 0)
+ #endif
+ #if !defined _POSIX_V6_ILP32_OFFBIG || _POSIX_V6_ILP32_OFFBIG > 0
+- {
+- if (string_len)
+- restenvs[string_len++] = '\n';
+- memcpy (restenvs + string_len, "POSIX_V6_ILP32_OFFBIG",
+- sizeof "POSIX_V6_ILP32_OFFBIG" - 1);
+- string_len += sizeof "POSIX_V6_ILP32_OFFBIG" - 1;
+- }
++ {
++ if (string_len)
++ restenvs[string_len++] = '\n';
++ memcpy (restenvs + string_len, "POSIX_V6_ILP32_OFFBIG",
++ sizeof "POSIX_V6_ILP32_OFFBIG" - 1);
++ string_len += sizeof "POSIX_V6_ILP32_OFFBIG" - 1;
++ }
+ #endif
+ #ifndef _POSIX_V6_LP64_OFF64
+- if (__sysconf (_SC_V6_LP64_OFF64) > 0)
++ if (__sysconf (_SC_V6_LP64_OFF64) > 0)
+ #endif
+ #if !defined _POSIX_V6_LP64_OFF64 || _POSIX_V6_LP64_OFF64 > 0
+- {
+- if (string_len)
+- restenvs[string_len++] = '\n';
+- memcpy (restenvs + string_len, "POSIX_V6_LP64_OFF64",
+- sizeof "POSIX_V6_LP64_OFF64" - 1);
+- string_len += sizeof "POSIX_V6_LP64_OFF64" - 1;
+- }
++ {
++ if (string_len)
++ restenvs[string_len++] = '\n';
++ memcpy (restenvs + string_len, "POSIX_V6_LP64_OFF64",
++ sizeof "POSIX_V6_LP64_OFF64" - 1);
++ string_len += sizeof "POSIX_V6_LP64_OFF64" - 1;
++ }
+ #endif
+ #ifndef _POSIX_V6_LPBIG_OFFBIG
+- if (__sysconf (_SC_V6_LPBIG_OFFBIG) > 0)
++ if (__sysconf (_SC_V6_LPBIG_OFFBIG) > 0)
+ #endif
+ #if !defined _POSIX_V6_LPBIG_OFFBIG || _POSIX_V6_LPBIG_OFFBIG > 0
+- {
+- if (string_len)
+- restenvs[string_len++] = '\n';
+- memcpy (restenvs + string_len, "POSIX_V6_LPBIG_OFFBIG",
+- sizeof "POSIX_V6_LPBIG_OFFBIG" - 1);
+- string_len += sizeof "POSIX_V6_LPBIG_OFFBIG" - 1;
+- }
+-#endif
+- restenvs[string_len++] = '\0';
+- string = restenvs;
+- }
++ {
++ if (string_len)
++ restenvs[string_len++] = '\n';
++ memcpy (restenvs + string_len, "POSIX_V6_LPBIG_OFFBIG",
++ sizeof "POSIX_V6_LPBIG_OFFBIG" - 1);
++ string_len += sizeof "POSIX_V6_LPBIG_OFFBIG" - 1;
++ }
++#endif
++ restenvs[string_len++] = '\0';
++ string = restenvs;
+ break;
+
+ case _CS_V5_WIDTH_RESTRICTED_ENVS:
+@@ -179,59 +174,55 @@ confstr (name, buf, len)
+ wint_t types are no greater than the width of type long.
+
+ Currently this means all environment which the system allows. */
+- {
+- char restenvs[4 * sizeof "XBS5_LPBIG_OFFBIG"];
+-
+- string_len = 0;
++ string_len = 0;
+ #ifndef _XBS5_ILP32_OFF32
+- if (__sysconf (_SC_XBS5_ILP32_OFF32) > 0)
++ if (__sysconf (_SC_XBS5_ILP32_OFF32) > 0)
+ #endif
+ #if !defined _XBS5_ILP32_OFF32 || _XBS5_ILP32_OFF32 > 0
+- {
+- memcpy (restenvs + string_len, "XBS5_ILP32_OFF32",
+- sizeof "XBS5_ILP32_OFF32" - 1);
+- string_len += sizeof "XBS5_ILP32_OFF32" - 1;
+- }
++ {
++ memcpy (restenvs + string_len, "XBS5_ILP32_OFF32",
++ sizeof "XBS5_ILP32_OFF32" - 1);
++ string_len += sizeof "XBS5_ILP32_OFF32" - 1;
++ }
+ #endif
+ #ifndef _XBS5_ILP32_OFFBIG
+- if (__sysconf (_SC_XBS5_ILP32_OFFBIG) > 0)
++ if (__sysconf (_SC_XBS5_ILP32_OFFBIG) > 0)
+ #endif
+ #if !defined _XBS5_ILP32_OFFBIG || _XBS5_ILP32_OFFBIG > 0
+- {
+- if (string_len)
+- restenvs[string_len++] = '\n';
+- memcpy (restenvs + string_len, "XBS5_ILP32_OFFBIG",
+- sizeof "XBS5_ILP32_OFFBIG" - 1);
+- string_len += sizeof "XBS5_ILP32_OFFBIG" - 1;
+- }
++ {
++ if (string_len)
++ restenvs[string_len++] = '\n';
++ memcpy (restenvs + string_len, "XBS5_ILP32_OFFBIG",
++ sizeof "XBS5_ILP32_OFFBIG" - 1);
++ string_len += sizeof "XBS5_ILP32_OFFBIG" - 1;
++ }
+ #endif
+ #ifndef _XBS5_LP64_OFF64
+- if (__sysconf (_SC_XBS5_LP64_OFF64) > 0)
++ if (__sysconf (_SC_XBS5_LP64_OFF64) > 0)
+ #endif
+ #if !defined _XBS5_LP64_OFF64 || _XBS5_LP64_OFF64 > 0
+- {
+- if (string_len)
+- restenvs[string_len++] = '\n';
+- memcpy (restenvs + string_len, "XBS5_LP64_OFF64",
+- sizeof "XBS5_LP64_OFF64" - 1);
+- string_len += sizeof "XBS5_LP64_OFF64" - 1;
+- }
++ {
++ if (string_len)
++ restenvs[string_len++] = '\n';
++ memcpy (restenvs + string_len, "XBS5_LP64_OFF64",
++ sizeof "XBS5_LP64_OFF64" - 1);
++ string_len += sizeof "XBS5_LP64_OFF64" - 1;
++ }
+ #endif
+ #ifndef _XBS5_LPBIG_OFFBIG
+- if (__sysconf (_SC_XBS5_LPBIG_OFFBIG) > 0)
++ if (__sysconf (_SC_XBS5_LPBIG_OFFBIG) > 0)
+ #endif
+ #if !defined _XBS5_LPBIG_OFFBIG || _XBS5_LPBIG_OFFBIG > 0
+- {
+- if (string_len)
+- restenvs[string_len++] = '\n';
+- memcpy (restenvs + string_len, "XBS5_LPBIG_OFFBIG",
+- sizeof "XBS5_LPBIG_OFFBIG" - 1);
+- string_len += sizeof "XBS5_LPBIG_OFFBIG" - 1;
+- }
+-#endif
+- restenvs[string_len++] = '\0';
+- string = restenvs;
+- }
++ {
++ if (string_len)
++ restenvs[string_len++] = '\n';
++ memcpy (restenvs + string_len, "XBS5_LPBIG_OFFBIG",
++ sizeof "XBS5_LPBIG_OFFBIG" - 1);
++ string_len += sizeof "XBS5_LPBIG_OFFBIG" - 1;
++ }
++#endif
++ restenvs[string_len++] = '\0';
++ string = restenvs;
+ break;
+
+ case _CS_XBS5_ILP32_OFF32_CFLAGS:
diff --git a/staging/glibc/glibc-2.15-do-not-install-timezone-files-2.patch b/staging/glibc/glibc-2.15-do-not-install-timezone-files-2.patch
new file mode 100644
index 000000000..d28237f85
--- /dev/null
+++ b/staging/glibc/glibc-2.15-do-not-install-timezone-files-2.patch
@@ -0,0 +1,20 @@
+diff --git a/timezone/Makefile b/timezone/Makefile
+index 00bfba6..9e55a6a 100644
+--- a/timezone/Makefile
++++ b/timezone/Makefile
+@@ -45,7 +45,6 @@ include ../Makeconfig # Get objpfx defined so we can use it below.
+ CPPFLAGS-zic = -DNOT_IN_libc
+
+ ifeq ($(have-ksh),yes)
+-install-others += $(inst_zonedir)/iso3166.tab $(inst_zonedir)/zone.tab
+ install-bin-script = tzselect
+ generated += tzselect
+ endif
+@@ -111,7 +110,3 @@ $(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make
+ -e 's%@TZDIR@%$(zonedir)%g' < $< > $@.new
+ chmod 555 $@.new
+ mv -f $@.new $@
+-
+-$(addprefix $(inst_zonedir)/,iso3166.tab zone.tab): \
+- $(inst_zonedir)/%: % $(+force)
+- $(do-install)
diff --git a/staging/glibc/glibc-2.15-do-not-install-timezone-files.patch b/staging/glibc/glibc-2.15-do-not-install-timezone-files.patch
new file mode 100644
index 000000000..e4f29bc1a
--- /dev/null
+++ b/staging/glibc/glibc-2.15-do-not-install-timezone-files.patch
@@ -0,0 +1,124 @@
+diff --git a/timezone/Makefile b/timezone/Makefile
+index e8fb716..d5ea538 100644
+--- a/timezone/Makefile
++++ b/timezone/Makefile
+@@ -1,4 +1,4 @@
+-# Copyright (C) 1998,1999,2000,2002,2005,2007 Free Software Foundation, Inc.
++# Copyright (C) 1998-2000,2002,2005,2007,2012 Free Software Foundation, Inc.
+ # This file is part of the GNU C Library.
+
+ # The GNU C Library is free software; you can redistribute it and/or
+@@ -49,33 +49,6 @@ include ../Makeconfig # Get objpfx defined so we can use it below.
+
+ CPPFLAGS-zic = -DNOT_IN_libc
+
+-# z.* use this variable.
+-define nl
+-
+-
+-endef
+-ifndef avoid-generated
+-ifndef inhibit_timezone_rules
+--include $(addprefix $(objpfx)z.,$(tzfiles))
+-endif
+-endif
+-
+-# Make these absolute file names.
+-installed-localtime-file := $(firstword $(filter /%,$(inst_localtime-file)) \
+- $(addprefix $(inst_zonedir)/, \
+- $(localtime-file)))
+-installed-posixrules-file := $(firstword $(filter /%,$(posixrules-file)) \
+- $(addprefix $(inst_zonedir)/, \
+- $(posixrules-file)))
+-
+-ifeq ($(cross-compiling),no)
+-# Don't try to install the zoneinfo files since we can't run zic.
+-install-others = $(addprefix $(inst_zonedir)/,$(zonenames) \
+- $(zonenames:%=posix/%) \
+- $(zonenames:%=right/%)) \
+- $(installed-localtime-file) $(installed-posixrules-file)
+-endif
+-
+ ifeq ($(have-ksh),yes)
+ install-others += $(inst_zonedir)/iso3166.tab $(inst_zonedir)/zone.tab
+ install-bin-script = tzselect
+@@ -85,79 +58,6 @@ endif
+ include ../Rules
+
+
+-$(tzfiles:%=$(objpfx)z.%): $(objpfx)z.%: % Makefile
+-# Kludge alert: we use an implicit rule (in what we are generating here)
+-# because that is the only way to tell Make that the one command builds all
+-# the files.
+-# The extra kludge for the $(tzlinks) files is necessary since running zic
+-# this file requires all other files to exist. Blech!
+- $(make-target-directory)
+- (echo 'define $*-zones' ;\
+- $(AWK) '$$1 == "Zone" { print $$2 } $$1 == "Link" { print $$3 }' $^ ;\
+- echo 'endef' ;\
+- echo '$*-zones := $$(subst $$(nl), ,$$($*-zones))' ;\
+- echo 'ifdef $*-zones' ;\
+- if test x$(findstring $*, $(tzlinks)) != x; then \
+- echo '$$(addprefix $$(inst_zonedir)/right/,$$($*-zones)): \';\
+- echo '$$(foreach t,$$(tzbases),$$(addprefix $$(inst_zonedir)/right/,$$($$t-zones)))' ;\
+- echo '$$(addprefix $$(inst_zonedir)/posix/,$$($*-zones)): \';\
+- echo '$$(foreach t,$$(tzbases),$$(addprefix $$(inst_zonedir)/posix/,$$($$t-zones)))' ;\
+- echo '$$(addprefix $$(inst_zonedir)/,$$($*-zones)): \' ;\
+- echo '$$(foreach t,$$(tzbases),$$(addprefix $$(inst_zonedir)/,$$($$t-zones)))' ;\
+- fi ;\
+- echo '$$(addprefix $$(dir $$(inst_zonedir))zone%/right/,$$($*-zones)): \' ;\
+- echo '$< $$(objpfx)zic leapseconds yearistype' ;\
+- echo ' $$(tzcompile)' ;\
+- echo '$$(addprefix $$(dir $$(inst_zonedir))zone%/posix/,$$($*-zones)): \' ;\
+- echo '$< $$(objpfx)zic /dev/null yearistype' ;\
+- echo ' $$(tzcompile)' ;\
+- echo '$$(addprefix $$(dir $$(inst_zonedir))zone%/,$$($*-zones)): \' ;\
+- echo '$< $$(objpfx)zic $$(leapseconds) yearistype' ;\
+- echo ' $$(tzcompile)' ;\
+- echo 'endif' ;\
+- echo 'zonenames := $$(zonenames) $$($*-zones)' ;\
+- ) > $@.new
+- mv $@.new $@
+-
+-.PHONY: echo-zonenames
+-echo-zonenames:
+- @echo 'Known zones: $(zonenames)'
+-
+-
+-# We have to use `-d $(inst_zonedir)' to explictly tell zic where to
+-# place the output files although $(zonedir) is compiled in. But the
+-# user might have set $(install_root) on the command line of `make install'.
+-zic-cmd = $(built-program-cmd) -d $(inst_zonedir)
+-tzcompile = $(zic-cmd)$(target-zone-flavor) -L $(word 3,$^) \
+- -y $(dir $(word 4,$^))$(notdir $(word 4,$^)) $<
+-
+-# The source files specify the zone names relative to the -d directory,
+-# so for the posix/ and right/ flavors we need to pass -d $(inst_zonedir)/posix
+-# and the like. This magic extracts /posix or /right if it's the first
+-# component after $(inst_zonedir) in the target name $@.
+-target-zone-flavor = $(filter /posix /right, \
+- /$(firstword $(subst /, , \
+- $(patsubst $(inst_zonedir)/%,%,$@))))
+-
+-ifdef localtime
+-$(installed-localtime-file): $(inst_zonedir)/$(localtime) $(objpfx)zic \
+- $(+force)
+- $(make-target-directory)
+- if test -r $@; then \
+- echo Site timezone NOT reset to Factory.; \
+- else \
+- rm -f $@T; \
+- $(SHELL) $(..)scripts/rellns-sh $< $@T; \
+- mv -f $@T $@; \
+- fi
+-endif
+-ifdef posixrules
+-$(installed-posixrules-file): $(inst_zonedir)/$(posixrules) $(objpfx)zic \
+- $(+force)
+- $(zic-cmd) -p $(posixrules)
+-endif
+-
+-
+ $(objpfx)zic: $(objpfx)scheck.o $(objpfx)ialloc.o
+
+ tz-cflags = -DTZDIR='"$(zonedir)"' \
diff --git a/staging/glibc/glibc-2.15-feraiseexcept-plt.patch b/staging/glibc/glibc-2.15-feraiseexcept-plt.patch
new file mode 100644
index 000000000..c41acc169
--- /dev/null
+++ b/staging/glibc/glibc-2.15-feraiseexcept-plt.patch
@@ -0,0 +1,20 @@
+diff --git a/sysdeps/i386/fpu/feupdateenv.c b/sysdeps/i386/fpu/feupdateenv.c
+index 70f9ee2..6e2ce35 100644
+--- a/sysdeps/i386/fpu/feupdateenv.c
++++ b/sysdeps/i386/fpu/feupdateenv.c
+@@ -1,5 +1,5 @@
+ /* Install given floating-point environment and raise exceptions.
+- Copyright (C) 1997,99,2000,01,07,2010 Free Software Foundation, Inc.
++ Copyright (C) 1997,99,2000,01,07,2010,2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+@@ -44,7 +44,7 @@ __feupdateenv (const fenv_t *envp)
+ /* Raise the saved exception. Incidently for us the implementation
+ defined format of the values in objects of type fexcept_t is the
+ same as the ones specified using the FE_* constants. */
+- feraiseexcept ((int) temp);
++ __feraiseexcept ((int) temp);
+
+ /* Success. */
+ return 0;
diff --git a/staging/glibc/glibc-2.15-fix-res_query-assert.patch b/staging/glibc/glibc-2.15-fix-res_query-assert.patch
new file mode 100644
index 000000000..a894da9c7
--- /dev/null
+++ b/staging/glibc/glibc-2.15-fix-res_query-assert.patch
@@ -0,0 +1,51 @@
+--- a/resolv/res_query.c
++++ a/resolv/res_query.c
+@@ -122,6 +122,7 @@ __libc_res_nquery(res_state statp,
+ int *resplen2)
+ {
+ HEADER *hp = (HEADER *) answer;
++ HEADER *hp2;
+ int n, use_malloc = 0;
+ u_int oflags = statp->_flags;
+
+@@ -239,26 +240,25 @@ __libc_res_nquery(res_state statp,
+ /* __libc_res_nsend might have reallocated the buffer. */
+ hp = (HEADER *) *answerp;
+
+- /* We simplify the following tests by assigning HP to HP2. It
+- is easy to verify that this is the same as ignoring all
+- tests of HP2. */
+- HEADER *hp2 = answerp2 ? (HEADER *) *answerp2 : hp;
+-
+- if (n < (int) sizeof (HEADER) && answerp2 != NULL
+- && *resplen2 > (int) sizeof (HEADER))
++ /* We simplify the following tests by assigning HP to HP2 or
++ vice versa. It is easy to verify that this is the same as
++ ignoring all tests of HP or HP2. */
++ if (answerp2 == NULL || *resplen2 < (int) sizeof (HEADER))
+ {
+- /* Special case of partial answer. */
+- assert (hp != hp2);
+- hp = hp2;
++ hp2 = hp;
+ }
+- else if (answerp2 != NULL && *resplen2 < (int) sizeof (HEADER)
+- && n > (int) sizeof (HEADER))
++ else
+ {
+- /* Special case of partial answer. */
+- assert (hp != hp2);
+- hp2 = hp;
++ hp2 = (HEADER *) *answerp2;
++ if (n < (int) sizeof (HEADER))
++ {
++ hp = hp2;
++ }
+ }
+
++ /* Make sure both hp and hp2 are defined */
++ assert((hp != NULL) && (hp2 != NULL));
++
+ if ((hp->rcode != NOERROR || ntohs(hp->ancount) == 0)
+ && (hp2->rcode != NOERROR || ntohs(hp2->ancount) == 0)) {
+ #ifdef DEBUG
diff --git a/staging/glibc/glibc-2.15-fmtmsg-locking.patch b/staging/glibc/glibc-2.15-fmtmsg-locking.patch
new file mode 100644
index 000000000..f5976abd9
--- /dev/null
+++ b/staging/glibc/glibc-2.15-fmtmsg-locking.patch
@@ -0,0 +1,148 @@
+diff --git a/stdlib/fmtmsg.c b/stdlib/fmtmsg.c
+index 9203317..4c02302 100644
+--- a/stdlib/fmtmsg.c
++++ b/stdlib/fmtmsg.c
+@@ -103,7 +103,6 @@ fmtmsg (long int classification, const char *label, int severity,
+ const char *text, const char *action, const char *tag)
+ {
+ __libc_once_define (static, once);
+- int result = MM_OK;
+ struct severity_info *severity_rec;
+
+ /* Make sure everything is initialized. */
+@@ -124,17 +123,6 @@ fmtmsg (long int classification, const char *label, int severity,
+ return MM_NOTOK;
+ }
+
+- for (severity_rec = severity_list; severity_rec != NULL;
+- severity_rec = severity_rec->next)
+- if (severity == severity_rec->severity)
+- /* Bingo. */
+- break;
+-
+- /* If we don't know anything about the severity level return an error. */
+- if (severity_rec == NULL)
+- return MM_NOTOK;
+-
+-
+ #ifdef __libc_ptf_call
+ /* We do not want this call to be cut short by a thread
+ cancellation. Therefore disable cancellation for now. */
+@@ -143,54 +131,73 @@ fmtmsg (long int classification, const char *label, int severity,
+ 0);
+ #endif
+
+- /* Now we can print. */
+- if (classification & MM_PRINT)
+- {
+- int do_label = (print & label_mask) && label != MM_NULLLBL;
+- int do_severity = (print & severity_mask) && severity != MM_NULLSEV;
+- int do_text = (print & text_mask) && text != MM_NULLTXT;
+- int do_action = (print & action_mask) && action != MM_NULLACT;
+- int do_tag = (print & tag_mask) && tag != MM_NULLTAG;
+-
+- if (__fxprintf (stderr, "%s%s%s%s%s%s%s%s%s%s\n",
+- do_label ? label : "",
+- do_label && (do_severity | do_text | do_action | do_tag)
+- ? ": " : "",
+- do_severity ? severity_rec->string : "",
+- do_severity && (do_text | do_action | do_tag)
+- ? ": " : "",
+- do_text ? text : "",
+- do_text && (do_action | do_tag) ? "\n" : "",
+- do_action ? "TO FIX: " : "",
+- do_action ? action : "",
+- do_action && do_tag ? " " : "",
+- do_tag ? tag : "") < 0)
+- /* Oh, oh. An error occurred during the output. */
+- result = MM_NOMSG;
+- }
++ __libc_lock_lock (lock);
+
+- if (classification & MM_CONSOLE)
++ for (severity_rec = severity_list; severity_rec != NULL;
++ severity_rec = severity_rec->next)
++ if (severity == severity_rec->severity)
++ /* Bingo. */
++ break;
++
++ /* If we don't know anything about the severity level return an error. */
++ int result = MM_NOTOK;
++ if (severity_rec != NULL)
+ {
+- int do_label = label != MM_NULLLBL;
+- int do_severity = severity != MM_NULLSEV;
+- int do_text = text != MM_NULLTXT;
+- int do_action = action != MM_NULLACT;
+- int do_tag = tag != MM_NULLTAG;
+-
+- syslog (LOG_ERR, "%s%s%s%s%s%s%s%s%s%s\n",
+- do_label ? label : "",
+- do_label && (do_severity | do_text | do_action | do_tag)
+- ? ": " : "",
+- do_severity ? severity_rec->string : "",
+- do_severity && (do_text | do_action | do_tag) ? ": " : "",
+- do_text ? text : "",
+- do_text && (do_action | do_tag) ? "\n" : "",
+- do_action ? "TO FIX: " : "",
+- do_action ? action : "",
+- do_action && do_tag ? " " : "",
+- do_tag ? tag : "");
++ result = MM_OK;
++
++ /* Now we can print. */
++ if (classification & MM_PRINT)
++ {
++ int do_label = (print & label_mask) && label != MM_NULLLBL;
++ int do_severity = (print & severity_mask) && severity != MM_NULLSEV;
++ int do_text = (print & text_mask) && text != MM_NULLTXT;
++ int do_action = (print & action_mask) && action != MM_NULLACT;
++ int do_tag = (print & tag_mask) && tag != MM_NULLTAG;
++ int need_colon = (do_label
++ && (do_severity | do_text | do_action | do_tag));
++
++ if (__fxprintf (stderr, "%s%s%s%s%s%s%s%s%s%s\n",
++ do_label ? label : "",
++ need_colon ? ": " : "",
++ do_severity ? severity_rec->string : "",
++ do_severity && (do_text | do_action | do_tag)
++ ? ": " : "",
++ do_text ? text : "",
++ do_text && (do_action | do_tag) ? "\n" : "",
++ do_action ? "TO FIX: " : "",
++ do_action ? action : "",
++ do_action && do_tag ? " " : "",
++ do_tag ? tag : "") < 0)
++ /* Oh, oh. An error occurred during the output. */
++ result = MM_NOMSG;
++ }
++
++ if (classification & MM_CONSOLE)
++ {
++ int do_label = label != MM_NULLLBL;
++ int do_severity = severity != MM_NULLSEV;
++ int do_text = text != MM_NULLTXT;
++ int do_action = action != MM_NULLACT;
++ int do_tag = tag != MM_NULLTAG;
++ int need_colon = (do_label
++ && (do_severity | do_text | do_action | do_tag));
++
++ syslog (LOG_ERR, "%s%s%s%s%s%s%s%s%s%s\n",
++ do_label ? label : "",
++ need_colon ? ": " : "",
++ do_severity ? severity_rec->string : "",
++ do_severity && (do_text | do_action | do_tag) ? ": " : "",
++ do_text ? text : "",
++ do_text && (do_action | do_tag) ? "\n" : "",
++ do_action ? "TO FIX: " : "",
++ do_action ? action : "",
++ do_action && do_tag ? " " : "",
++ do_tag ? tag : "");
++ }
+ }
+
++ __libc_lock_unlock (lock);
++
+ #ifdef __libc_ptf_call
+ __libc_ptf_call (pthread_setcancelstate, (state, NULL), 0);
+ #endif
diff --git a/staging/glibc/glibc-2.15-gb18030.patch.gz b/staging/glibc/glibc-2.15-gb18030.patch.gz
new file mode 100644
index 000000000..dde59c056
--- /dev/null
+++ b/staging/glibc/glibc-2.15-gb18030.patch.gz
Binary files differ
diff --git a/staging/glibc/glibc-2.15-ifunc.patch b/staging/glibc/glibc-2.15-ifunc.patch
new file mode 100644
index 000000000..115afa02a
--- /dev/null
+++ b/staging/glibc/glibc-2.15-ifunc.patch
@@ -0,0 +1,262 @@
+diff --git a/Makeconfig b/Makeconfig
+index 2db2821..68547b2 100644
+--- a/Makeconfig
++++ b/Makeconfig
+@@ -900,6 +900,12 @@ else
+ libdl = $(common-objpfx)dlfcn/libdl.a
+ endif
+
++ifeq ($(build-shared),yes)
++libm = $(common-objpfx)math/libm.so$(libm.so-version)
++else
++libm = $(common-objpfx)math/libm.a
++endif
++
+ # These are the subdirectories containing the library source. The order
+ # is more or less arbitrary. The sorting step will take care of the
+ # dependencies.
+diff --git a/elf/Makefile b/elf/Makefile
+index 052e763..3f1772a 100644
+--- a/elf/Makefile
++++ b/elf/Makefile
+@@ -124,7 +124,8 @@ distribute := rtld-Rules \
+ tst-initordera1.c tst-initordera2.c tst-initorderb1.c \
+ tst-initorderb2.c tst-initordera3.c tst-initordera4.c \
+ tst-initorder.c \
+- tst-initorder2.c
++ tst-initorder2.c \
++ tst-relsort1.c tst-relsort1mod1.c tst-relsort1mod2.c
+
+ CFLAGS-dl-runtime.c = -fexceptions -fasynchronous-unwind-tables
+ CFLAGS-dl-lookup.c = -fexceptions -fasynchronous-unwind-tables
+@@ -227,7 +228,7 @@ tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \
+ tst-audit1 tst-audit2 \
+ tst-stackguard1 tst-addr1 tst-thrlock \
+ tst-unique1 tst-unique2 tst-unique3 tst-unique4 \
+- tst-initorder tst-initorder2
++ tst-initorder tst-initorder2 tst-relsort1
+ # reldep9
+ test-srcs = tst-pathopt
+ selinux-enabled := $(shell cat /selinux/enforce 2> /dev/null)
+@@ -290,7 +291,9 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
+ tst-initordera1 tst-initorderb1 \
+ tst-initordera2 tst-initorderb2 \
+ tst-initordera3 tst-initordera4 \
+- tst-initorder2a tst-initorder2b tst-initorder2c tst-initorder2d
++ tst-initorder2a tst-initorder2b tst-initorder2c \
++ tst-initorder2d \
++ tst-relsort1mod1 tst-relsort1mod2
+ ifeq (yes,$(have-initfini-array))
+ modules-names += tst-array2dep tst-array5dep
+ endif
+@@ -1195,3 +1198,9 @@ CFLAGS-tst-auditmod6b.c += $(AVX-CFLAGS)
+ CFLAGS-tst-auditmod6c.c += $(AVX-CFLAGS)
+ CFLAGS-tst-auditmod7b.c += $(AVX-CFLAGS)
+ endif
++
++$(objpfx)tst-relsort1: $(libdl)
++$(objpfx)tst-relsort1mod1.so: $(libm) $(objpfx)tst-relsort1mod2.so
++$(objpfx)tst-relsort1mod2.so: $(libm)
++$(objpfx)tst-relsort1.out: $(objpfx)tst-relsort1mod1.so \
++ $(objpfx)tst-relsort1mod2.so
+diff --git a/elf/dl-open.c b/elf/dl-open.c
+index a0b5c50..a56bdc1 100644
+--- a/elf/dl-open.c
++++ b/elf/dl-open.c
+@@ -1,5 +1,5 @@
+ /* Load a shared object at runtime, relocate it, and run its initializer.
+- Copyright (C) 1996-2007, 2009, 2010, 2011 Free Software Foundation, Inc.
++ Copyright (C) 1996-2007, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+@@ -302,45 +302,109 @@ dl_open_worker (void *a)
+ if (GLRO(dl_lazy))
+ reloc_mode |= mode & RTLD_LAZY;
+
+- /* Relocate the objects loaded. We do this in reverse order so that copy
+- relocs of earlier objects overwrite the data written by later objects. */
+-
++ /* Sort the objects by dependency for the relocation process. This
++ allows IFUNC relocations to work and it also means copy
++ relocation of dependencies are if necessary overwritten. */
++ size_t nmaps = 0;
+ struct link_map *l = new;
+- while (l->l_next)
+- l = l->l_next;
+- while (1)
++ do
++ {
++ if (! l->l_real->l_relocated)
++ ++nmaps;
++ l = l->l_next;
++ }
++ while (l != NULL);
++ struct link_map *maps[nmaps];
++ nmaps = 0;
++ l = new;
++ do
+ {
+ if (! l->l_real->l_relocated)
++ maps[nmaps++] = l;
++ l = l->l_next;
++ }
++ while (l != NULL);
++ if (nmaps > 1)
++ {
++ char seen[nmaps];
++ memset (seen, '\0', nmaps);
++ size_t i = 0;
++ while (1)
+ {
+-#ifdef SHARED
+- if (__builtin_expect (GLRO(dl_profile) != NULL, 0))
++ ++seen[i];
++ struct link_map *thisp = maps[i];
++
++ /* Find the last object in the list for which the current one is
++ a dependency and move the current object behind the object
++ with the dependency. */
++ size_t k = nmaps - 1;
++ while (k > i)
+ {
+- /* If this here is the shared object which we want to profile
+- make sure the profile is started. We can find out whether
+- this is necessary or not by observing the `_dl_profile_map'
+- variable. If was NULL but is not NULL afterwars we must
+- start the profiling. */
+- struct link_map *old_profile_map = GL(dl_profile_map);
++ struct link_map **runp = maps[k]->l_initfini;
++ if (runp != NULL)
++ /* Look through the dependencies of the object. */
++ while (*runp != NULL)
++ if (__builtin_expect (*runp++ == thisp, 0))
++ {
++ /* Move the current object to the back past the last
++ object with it as the dependency. */
++ memmove (&maps[i], &maps[i + 1],
++ (k - i) * sizeof (maps[0]));
++ maps[k] = thisp;
++
++ if (seen[i + 1] > 1)
++ {
++ ++i;
++ goto next_clear;
++ }
++
++ char this_seen = seen[i];
++ memmove (&seen[i], &seen[i + 1],
++ (k - i) * sizeof (seen[0]));
++ seen[k] = this_seen;
++
++ goto next;
++ }
++
++ --k;
++ }
+
+- _dl_relocate_object (l, l->l_scope, reloc_mode | RTLD_LAZY, 1);
++ if (++i == nmaps)
++ break;
++ next_clear:
++ memset (&seen[i], 0, (nmaps - i) * sizeof (seen[0]));
++ next:;
++ }
++ }
+
+- if (old_profile_map == NULL && GL(dl_profile_map) != NULL)
+- {
+- /* We must prepare the profiling. */
+- _dl_start_profile ();
++ for (size_t i = nmaps; i-- > 0; )
++ {
++ l = maps[i];
+
+- /* Prevent unloading the object. */
+- GL(dl_profile_map)->l_flags_1 |= DF_1_NODELETE;
+- }
++#ifdef SHARED
++ if (__builtin_expect (GLRO(dl_profile) != NULL, 0))
++ {
++ /* If this here is the shared object which we want to profile
++ make sure the profile is started. We can find out whether
++ this is necessary or not by observing the `_dl_profile_map'
++ variable. If it was NULL but is not NULL afterwars we must
++ start the profiling. */
++ struct link_map *old_profile_map = GL(dl_profile_map);
++
++ _dl_relocate_object (l, l->l_scope, reloc_mode | RTLD_LAZY, 1);
++
++ if (old_profile_map == NULL && GL(dl_profile_map) != NULL)
++ {
++ /* We must prepare the profiling. */
++ _dl_start_profile ();
++
++ /* Prevent unloading the object. */
++ GL(dl_profile_map)->l_flags_1 |= DF_1_NODELETE;
+ }
+- else
+-#endif
+- _dl_relocate_object (l, l->l_scope, reloc_mode, 0);
+ }
+-
+- if (l == new)
+- break;
+- l = l->l_prev;
++ else
++#endif
++ _dl_relocate_object (l, l->l_scope, reloc_mode, 0);
+ }
+
+ /* If the file is not loaded now as a dependency, add the search
+diff --git a/elf/tst-relsort1.c b/elf/tst-relsort1.c
+new file mode 100644
+index 0000000..972100c
+--- /dev/null
++++ b/elf/tst-relsort1.c
+@@ -0,0 +1,19 @@
++#include <dlfcn.h>
++#include <stdio.h>
++
++
++static int
++do_test ()
++{
++ const char lib[] = "$ORIGIN/tst-relsort1mod1.so";
++ void *h = dlopen (lib, RTLD_NOW);
++ if (h == NULL)
++ {
++ puts (dlerror ());
++ return 1;
++ }
++ return 0;
++}
++
++#define TEST_FUNCTION do_test ()
++#include "../test-skeleton.c"
+diff --git a/elf/tst-relsort1mod1.c b/elf/tst-relsort1mod1.c
+new file mode 100644
+index 0000000..9e4a943
+--- /dev/null
++++ b/elf/tst-relsort1mod1.c
+@@ -0,0 +1,7 @@
++extern int foo (double);
++
++int
++bar (void)
++{
++ return foo (1.2);
++}
+diff --git a/elf/tst-relsort1mod2.c b/elf/tst-relsort1mod2.c
+new file mode 100644
+index 0000000..a2c3e55
+--- /dev/null
++++ b/elf/tst-relsort1mod2.c
+@@ -0,0 +1,7 @@
++#include <math.h>
++
++int
++foo (double d)
++{
++ return floor (d) != 0.0;
++}
diff --git a/staging/glibc/glibc-2.15-lddebug-scopes.patch b/staging/glibc/glibc-2.15-lddebug-scopes.patch
new file mode 100644
index 000000000..808cf8d7c
--- /dev/null
+++ b/staging/glibc/glibc-2.15-lddebug-scopes.patch
@@ -0,0 +1,27 @@
+From 0c95ab64cb4ec0d22bb222647d9d20c7b4903e38 Mon Sep 17 00:00:00 2001
+From: Andreas Schwab <schwab@redhat.com>
+Date: Fri, 7 Oct 2011 09:31:27 +0200
+Subject: [PATCH] Horrible workaround for horribly broken software
+
+---
+ elf/rtld.c | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/elf/rtld.c b/elf/rtld.c
+index 978c609..8422b9f 100644
+--- a/elf/rtld.c
++++ b/elf/rtld.c
+@@ -1393,7 +1393,9 @@ of this helper program; chances are you did not intend to run this program.\n\
+ char *copy = malloc (len);
+ if (copy == NULL)
+ _dl_fatal_printf ("out of memory\n");
+- l->l_libname->name = l->l_name = memcpy (copy, dsoname, len);
++ l->l_libname->name = memcpy (copy, dsoname, len);
++ if (GLRO(dl_debug_mask))
++ l->l_name = copy;
+ }
+
+ /* Add the vDSO to the object list. */
+--
+1.7.3.4
+
diff --git a/staging/glibc/glibc-2.15-multiarch-x86-strcmp.patch b/staging/glibc/glibc-2.15-multiarch-x86-strcmp.patch
new file mode 100644
index 000000000..38c9e617f
--- /dev/null
+++ b/staging/glibc/glibc-2.15-multiarch-x86-strcmp.patch
@@ -0,0 +1,39 @@
+diff --git a/sysdeps/i386/i686/multiarch/strcasecmp_l-c.c b/sysdeps/i386/i686/multiarch/strcasecmp_l-c.c
+index d10e872..d4fcd2b 100644
+--- a/sysdeps/i386/i686/multiarch/strcasecmp_l-c.c
++++ b/sysdeps/i386/i686/multiarch/strcasecmp_l-c.c
+@@ -6,6 +6,8 @@ extern __typeof (strcasecmp_l) __strcasecmp_l_nonascii;
+ #define USE_IN_EXTENDED_LOCALE_MODEL 1
+ #include <string/strcasecmp.c>
+
++strong_alias (__strcasecmp_l_nonascii, __strcasecmp_l_ia32)
++
+ /* The needs of strcasecmp in libc are minimal, no need to go through
+ the IFUNC. */
+ strong_alias (__strcasecmp_l_nonascii, __GI___strcasecmp_l)
+diff --git a/sysdeps/i386/i686/multiarch/strcmp.S b/sysdeps/i386/i686/multiarch/strcmp.S
+index 5410d17..b3b9eb8 100644
+--- a/sysdeps/i386/i686/multiarch/strcmp.S
++++ b/sysdeps/i386/i686/multiarch/strcmp.S
+@@ -111,6 +111,7 @@ END(STRCMP)
+ # endif
+ #endif
+
+-#ifndef USE_AS_STRNCMP
++#if !defined USE_AS_STRNCMP && !defined USE_AS_STRCASECMP_L \
++ && !defined USE_AS_STRNCASECMP_L
+ # include "../strcmp.S"
+ #endif
+diff --git a/sysdeps/i386/i686/multiarch/strncase_l-c.c b/sysdeps/i386/i686/multiarch/strncase_l-c.c
+index 0c68b8d..7e601af 100644
+--- a/sysdeps/i386/i686/multiarch/strncase_l-c.c
++++ b/sysdeps/i386/i686/multiarch/strncase_l-c.c
+@@ -6,6 +6,8 @@ extern __typeof (strncasecmp_l) __strncasecmp_l_nonascii;
+ #define USE_IN_EXTENDED_LOCALE_MODEL 1
+ #include <string/strncase.c>
+
++strong_alias (__strncasecmp_l_nonascii, __strncasecmp_l_ia32)
++
+ /* The needs of strcasecmp in libc are minimal, no need to go through
+ the IFUNC. */
+ strong_alias (__strncasecmp_l_nonascii, __GI___strncasecmp_l)
diff --git a/staging/glibc/glibc-2.15-nearbyintf-rounding.patch b/staging/glibc/glibc-2.15-nearbyintf-rounding.patch
new file mode 100644
index 000000000..b2bb9caac
--- /dev/null
+++ b/staging/glibc/glibc-2.15-nearbyintf-rounding.patch
@@ -0,0 +1,75 @@
+diff --git a/math/libm-test.inc b/math/libm-test.inc
+index c8186c8..1016753 100644
+--- a/math/libm-test.inc
++++ b/math/libm-test.inc
+@@ -4632,6 +4632,29 @@ nearbyint_test (void)
+ TEST_f_f (nearbyint, 524286.75, 524287.0);
+ TEST_f_f (nearbyint, 524288.75, 524289.0);
+
++ TEST_f_f (nearbyint, 1048576.75, 1048577.0);
++ TEST_f_f (nearbyint, 2097152.75, 2097153.0);
++ TEST_f_f (nearbyint, 2492472.75, 2492473.0);
++ TEST_f_f (nearbyint, 2886220.75, 2886221.0);
++ TEST_f_f (nearbyint, 3058792.75, 3058793.0);
++ TEST_f_f (nearbyint, -1048576.75, -1048577.0);
++ TEST_f_f (nearbyint, -2097152.75, -2097153.0);
++ TEST_f_f (nearbyint, -2492472.75, -2492473.0);
++ TEST_f_f (nearbyint, -2886220.75, -2886221.0);
++ TEST_f_f (nearbyint, -3058792.75, -3058793.0);
++#ifndef TEST_FLOAT
++ TEST_f_f (nearbyint, 70368744177664.75, 70368744177665.0);
++ TEST_f_f (nearbyint, 140737488355328.75, 140737488355329.0);
++ TEST_f_f (nearbyint, 281474976710656.75, 281474976710657.0);
++ TEST_f_f (nearbyint, 562949953421312.75, 562949953421313.0);
++ TEST_f_f (nearbyint, 1125899906842624.75, 1125899906842625.0);
++ TEST_f_f (nearbyint, -70368744177664.75, -70368744177665.0);
++ TEST_f_f (nearbyint, -140737488355328.75, -140737488355329.0);
++ TEST_f_f (nearbyint, -281474976710656.75, -281474976710657.0);
++ TEST_f_f (nearbyint, -562949953421312.75, -562949953421313.0);
++ TEST_f_f (nearbyint, -1125899906842624.75, -1125899906842625.0);
++#endif
++
+ END (nearbyint);
+ }
+
+diff --git a/sysdeps/ieee754/flt-32/s_nearbyintf.c b/sysdeps/ieee754/flt-32/s_nearbyintf.c
+index 04ef9ab..a6d602b 100644
+--- a/sysdeps/ieee754/flt-32/s_nearbyintf.c
++++ b/sysdeps/ieee754/flt-32/s_nearbyintf.c
+@@ -30,18 +30,12 @@ __nearbyintf(float x)
+ {
+ fenv_t env;
+ int32_t i0,j0,sx;
+- u_int32_t i,i1;
+ float w,t;
+ GET_FLOAT_WORD(i0,x);
+ sx = (i0>>31)&1;
+ j0 = ((i0>>23)&0xff)-0x7f;
+ if(j0<23) {
+ if(j0<0) {
+- if((i0&0x7fffffff)==0) return x;
+- i1 = (i0&0x07fffff);
+- i0 &= 0xfff00000;
+- i0 |= ((i1|-i1)>>9)&0x400000;
+- SET_FLOAT_WORD(x,i0);
+ libc_feholdexceptf (&env);
+ w = TWO23[sx]+x;
+ t = w-TWO23[sx];
+@@ -49,17 +43,11 @@ __nearbyintf(float x)
+ GET_FLOAT_WORD(i0,t);
+ SET_FLOAT_WORD(t,(i0&0x7fffffff)|(sx<<31));
+ return t;
+- } else {
+- i = (0x007fffff)>>j0;
+- if((i0&i)==0) return x; /* x is integral */
+- i>>=1;
+- if((i0&i)!=0) i0 = (i0&(~i))|((0x100000)>>j0);
+ }
+ } else {
+ if(__builtin_expect(j0==0x80, 0)) return x+x; /* inf or NaN */
+ else return x; /* x is integral */
+ }
+- SET_FLOAT_WORD(x,i0);
+ libc_feholdexceptf (&env);
+ w = TWO23[sx]+x;
+ t = w-TWO23[sx];
diff --git a/staging/glibc/glibc-2.15-negative-result-cache.patch b/staging/glibc/glibc-2.15-negative-result-cache.patch
new file mode 100644
index 000000000..c09e79a17
--- /dev/null
+++ b/staging/glibc/glibc-2.15-negative-result-cache.patch
@@ -0,0 +1,138 @@
+diff --git a/nscd/aicache.c b/nscd/aicache.c
+index aaaf80d..e1f1244 100644
+--- a/nscd/aicache.c
++++ b/nscd/aicache.c
+@@ -1,5 +1,5 @@
+ /* Cache handling for host lookup.
+- Copyright (C) 2004-2008, 2009, 2010, 2011 Free Software Foundation, Inc.
++ Copyright (C) 2004-2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@redhat.com>, 2004.
+
+@@ -514,8 +514,9 @@ next_nip:
+ if (fd != -1)
+ TEMP_FAILURE_RETRY (send (fd, &notfound, total, MSG_NOSIGNAL));
+
+- /* If we cannot permanently store the result, so be it. */
+- if (__builtin_expect (db->negtimeout == 0, 0))
++ /* If we have a transient error or cannot permanently store the
++ result, so be it. */
++ if (rc4 == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
+ {
+ /* Mark the old entry as obsolete. */
+ if (dh != NULL)
+diff --git a/nscd/grpcache.c b/nscd/grpcache.c
+index e9607c6..a698f36 100644
+--- a/nscd/grpcache.c
++++ b/nscd/grpcache.c
+@@ -1,5 +1,5 @@
+ /* Cache handling for group lookup.
+- Copyright (C) 1998-2008, 2009, 2011 Free Software Foundation, Inc.
++ Copyright (C) 1998-2008, 2009, 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
+
+@@ -120,8 +120,9 @@ cache_addgr (struct database_dyn *db, int fd, request_header *req,
+ else
+ written = total;
+
+- /* If we cannot permanently store the result, so be it. */
+- if (db->negtimeout == 0)
++ /* If we have a transient error or cannot permanently store
++ the result, so be it. */
++ if (errno == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
+ {
+ /* Mark the old entry as obsolete. */
+ if (dh != NULL)
+diff --git a/nscd/hstcache.c b/nscd/hstcache.c
+index 4d68ade..c72feaa 100644
+--- a/nscd/hstcache.c
++++ b/nscd/hstcache.c
+@@ -1,5 +1,5 @@
+ /* Cache handling for host lookup.
+- Copyright (C) 1998-2008, 2009, 2011 Free Software Foundation, Inc.
++ Copyright (C) 1998-2008, 2009, 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
+
+@@ -141,8 +141,9 @@ cache_addhst (struct database_dyn *db, int fd, request_header *req,
+ MSG_NOSIGNAL)) != total)
+ all_written = false;
+
+- /* If we cannot permanently store the result, so be it. */
+- if (__builtin_expect (db->negtimeout == 0, 0))
++ /* If we have a transient error or cannot permanently store
++ the result, so be it. */
++ if (errval == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
+ {
+ /* Mark the old entry as obsolete. */
+ if (dh != NULL)
+diff --git a/nscd/initgrcache.c b/nscd/initgrcache.c
+index 4ac9942..2019991 100644
+--- a/nscd/initgrcache.c
++++ b/nscd/initgrcache.c
+@@ -1,5 +1,5 @@
+ /* Cache handling for host lookup.
+- Copyright (C) 2004-2006, 2008, 2009, 2011 Free Software Foundation, Inc.
++ Copyright (C) 2004-2006, 2008, 2009, 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@redhat.com>, 2004.
+
+@@ -202,8 +202,9 @@ addinitgroupsX (struct database_dyn *db, int fd, request_header *req,
+ written = TEMP_FAILURE_RETRY (send (fd, &notfound, total,
+ MSG_NOSIGNAL));
+
+- /* If we cannot permanently store the result, so be it. */
+- if (__builtin_expect (db->negtimeout == 0, 0))
++ /* If we have a transient error or cannot permanently store
++ the result, so be it. */
++ if (all_tryagain || __builtin_expect (db->negtimeout == 0, 0))
+ {
+ /* Mark the old entry as obsolete. */
+ if (dh != NULL)
+diff --git a/nscd/pwdcache.c b/nscd/pwdcache.c
+index 49e130c..e2ba09d 100644
+--- a/nscd/pwdcache.c
++++ b/nscd/pwdcache.c
+@@ -1,5 +1,5 @@
+ /* Cache handling for passwd lookup.
+- Copyright (C) 1998-2008, 2009, 2011 Free Software Foundation, Inc.
++ Copyright (C) 1998-2008, 2009, 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
+
+@@ -124,8 +124,9 @@ cache_addpw (struct database_dyn *db, int fd, request_header *req,
+ written = TEMP_FAILURE_RETRY (send (fd, &notfound, total,
+ MSG_NOSIGNAL));
+
+- /* If we cannot permanently store the result, so be it. */
+- if (__builtin_expect (db->negtimeout == 0, 0))
++ /* If we have a transient error or cannot permanently store
++ the result, so be it. */
++ if (errno == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
+ {
+ /* Mark the old entry as obsolete. */
+ if (dh != NULL)
+diff --git a/nscd/servicescache.c b/nscd/servicescache.c
+index d3d5dce..a6337e3 100644
+--- a/nscd/servicescache.c
++++ b/nscd/servicescache.c
+@@ -1,5 +1,5 @@
+ /* Cache handling for services lookup.
+- Copyright (C) 2007, 2008, 2009, 2011 Free Software Foundation, Inc.
++ Copyright (C) 2007, 2008, 2009, 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@drepper.com>, 2007.
+
+@@ -108,8 +108,9 @@ cache_addserv (struct database_dyn *db, int fd, request_header *req,
+ written = TEMP_FAILURE_RETRY (send (fd, &notfound, total,
+ MSG_NOSIGNAL));
+
+- /* If we cannot permanently store the result, so be it. */
+- if (__builtin_expect (db->negtimeout == 0, 0))
++ /* If we have a transient error or cannot permanently store
++ the result, so be it. */
++ if (errval == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
+ {
+ /* Mark the old entry as obsolete. */
+ if (dh != NULL)
diff --git a/staging/glibc/glibc-2.15-non-signalling-comparisons.patch b/staging/glibc/glibc-2.15-non-signalling-comparisons.patch
new file mode 100644
index 000000000..874f8b4cb
--- /dev/null
+++ b/staging/glibc/glibc-2.15-non-signalling-comparisons.patch
@@ -0,0 +1,886 @@
+diff --git a/math/w_acos.c b/math/w_acos.c
+index 3138408..0490933 100644
+--- a/math/w_acos.c
++++ b/math/w_acos.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -25,7 +25,8 @@
+ double
+ __acos (double x)
+ {
+- if (__builtin_expect (fabs (x) > 1.0, 0) && _LIB_VERSION != _IEEE_)
++ if (__builtin_expect (isgreater (fabs (x), 1.0), 0)
++ && _LIB_VERSION != _IEEE_)
+ {
+ /* acos(|x|>1) */
+ feraiseexcept (FE_INVALID);
+diff --git a/math/w_acosf.c b/math/w_acosf.c
+index 0e41a2c..2500a7d 100644
+--- a/math/w_acosf.c
++++ b/math/w_acosf.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -25,7 +25,8 @@
+ float
+ __acosf (float x)
+ {
+- if (__builtin_expect (fabsf (x) > 1.0f, 0) && _LIB_VERSION != _IEEE_)
++ if (__builtin_expect (isgreater (fabsf (x), 1.0f), 0)
++ && _LIB_VERSION != _IEEE_)
+ {
+ /* acos(|x|>1) */
+ feraiseexcept (FE_INVALID);
+diff --git a/math/w_acosh.c b/math/w_acosh.c
+index 0bd2686..d632987 100644
+--- a/math/w_acosh.c
++++ b/math/w_acosh.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -24,7 +24,7 @@
+ double
+ __acosh (double x)
+ {
+- if (__builtin_expect (x < 1.0, 0) && _LIB_VERSION != _IEEE_)
++ if (__builtin_expect (isless (x, 1.0), 0) && _LIB_VERSION != _IEEE_)
+ /* acosh(x<1) */
+ return __kernel_standard (x, x, 29);
+
+diff --git a/math/w_acoshf.c b/math/w_acoshf.c
+index c59bf94..f77df2b 100644
+--- a/math/w_acoshf.c
++++ b/math/w_acoshf.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -24,7 +24,7 @@
+ float
+ __acoshf (float x)
+ {
+- if (__builtin_expect (x < 1.0f, 0) && _LIB_VERSION != _IEEE_)
++ if (__builtin_expect (isless (x, 1.0f), 0) && _LIB_VERSION != _IEEE_)
+ /* acosh(x<1) */
+ return __kernel_standard_f (x, x, 129);
+
+diff --git a/math/w_acoshl.c b/math/w_acoshl.c
+index 819bdfc..cc823b8 100644
+--- a/math/w_acoshl.c
++++ b/math/w_acoshl.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -24,7 +24,7 @@
+ long double
+ __acoshl (long double x)
+ {
+- if (__builtin_expect (x < 1.0L, 0) && _LIB_VERSION != _IEEE_)
++ if (__builtin_expect (isless (x, 1.0L), 0) && _LIB_VERSION != _IEEE_)
+ /* acosh(x<1) */
+ return __kernel_standard (x, x, 229);
+
+diff --git a/math/w_acosl.c b/math/w_acosl.c
+index 6417068..05023b4 100644
+--- a/math/w_acosl.c
++++ b/math/w_acosl.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -25,7 +25,8 @@
+ long double
+ __acosl (long double x)
+ {
+- if (__builtin_expect (fabsl (x) > 1.0L, 0) && _LIB_VERSION != _IEEE_)
++ if (__builtin_expect (isgreater (fabsl (x), 1.0L), 0)
++ && _LIB_VERSION != _IEEE_)
+ {
+ /* acos(|x|>1) */
+ feraiseexcept (FE_INVALID);
+diff --git a/math/w_asin.c b/math/w_asin.c
+index d4e89ce..0fa9487 100644
+--- a/math/w_asin.c
++++ b/math/w_asin.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -25,7 +25,8 @@
+ double
+ __asin (double x)
+ {
+- if (__builtin_expect (fabs (x) > 1.0, 0) && _LIB_VERSION != _IEEE_)
++ if (__builtin_expect (isgreater (fabs (x), 1.0), 0)
++ && _LIB_VERSION != _IEEE_)
+ {
+ /* asin(|x|>1) */
+ feraiseexcept (FE_INVALID);
+diff --git a/math/w_asinf.c b/math/w_asinf.c
+index 270961f..c28edab 100644
+--- a/math/w_asinf.c
++++ b/math/w_asinf.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -25,7 +25,8 @@
+ float
+ __asinf (float x)
+ {
+- if (__builtin_expect (fabsf (x) > 1.0f, 0) && _LIB_VERSION != _IEEE_)
++ if (__builtin_expect (isgreater (fabsf (x), 1.0f), 0)
++ && _LIB_VERSION != _IEEE_)
+ {
+ /* asin(|x|>1) */
+ feraiseexcept (FE_INVALID);
+diff --git a/math/w_asinl.c b/math/w_asinl.c
+index 32e5273..e4036d8 100644
+--- a/math/w_asinl.c
++++ b/math/w_asinl.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -25,7 +25,8 @@
+ long double
+ __asinl (long double x)
+ {
+- if (__builtin_expect (fabsl (x) > 1.0L, 0) && _LIB_VERSION != _IEEE_)
++ if (__builtin_expect (isgreater (fabsl (x), 1.0L), 0)
++ && _LIB_VERSION != _IEEE_)
+ {
+ /* asin(|x|>1) */
+ feraiseexcept (FE_INVALID);
+diff --git a/math/w_atanh.c b/math/w_atanh.c
+index 1022bd5..190d2e9 100644
+--- a/math/w_atanh.c
++++ b/math/w_atanh.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -24,7 +24,8 @@
+ double
+ __atanh (double x)
+ {
+- if (__builtin_expect (fabs (x) >= 1.0, 0) && _LIB_VERSION != _IEEE_)
++ if (__builtin_expect (isgreaterequal (fabs (x), 1.0), 0)
++ && _LIB_VERSION != _IEEE_)
+ return __kernel_standard (x, x,
+ fabs (x) > 1.0
+ ? 30 /* atanh(|x|>1) */
+diff --git a/math/w_atanhf.c b/math/w_atanhf.c
+index 3c8cf83..e0c5dc3 100644
+--- a/math/w_atanhf.c
++++ b/math/w_atanhf.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -24,7 +24,8 @@
+ float
+ __atanhf (float x)
+ {
+- if (__builtin_expect (fabsf (x) >= 1.0f, 0) && _LIB_VERSION != _IEEE_)
++ if (__builtin_expect (isgreaterequal (fabsf (x), 1.0f), 0)
++ && _LIB_VERSION != _IEEE_)
+ return __kernel_standard_f (x, x,
+ fabsf (x) > 1.0f
+ ? 130 /* atanh(|x|>1) */
+diff --git a/math/w_atanhl.c b/math/w_atanhl.c
+index f582acf..319535d 100644
+--- a/math/w_atanhl.c
++++ b/math/w_atanhl.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -24,7 +24,8 @@
+ long double
+ __atanhl (long double x)
+ {
+- if (__builtin_expect (fabsl (x) >= 1.0L, 0) && _LIB_VERSION != _IEEE_)
++ if (__builtin_expect (isgreaterequal (fabsl (x), 1.0L), 0)
++ && _LIB_VERSION != _IEEE_)
+ return __kernel_standard (x, x,
+ fabsl (x) > 1.0L
+ ? 230 /* atanh(|x|>1) */
+diff --git a/math/w_exp2.c b/math/w_exp2.c
+index bf22326..7a3b0af 100644
+--- a/math/w_exp2.c
++++ b/math/w_exp2.c
+@@ -12,7 +12,8 @@ static const double u_threshold = (double) (DBL_MIN_EXP - DBL_MANT_DIG - 1);
+ double
+ __exp2 (double x)
+ {
+- if (__builtin_expect (x <= u_threshold || x > o_threshold, 0)
++ if (__builtin_expect (islessequal (x, u_threshold)
++ || isgreater (x, o_threshold), 0)
+ && _LIB_VERSION != _IEEE_ && __finite (x))
+ /* exp2 overflow: 44, exp2 underflow: 45 */
+ return __kernel_standard (x, x, 44 + (x <= o_threshold));
+diff --git a/math/w_exp2f.c b/math/w_exp2f.c
+index 7215fca..c4e9e94 100644
+--- a/math/w_exp2f.c
++++ b/math/w_exp2f.c
+@@ -12,7 +12,8 @@ static const float u_threshold = (float) (FLT_MIN_EXP - FLT_MANT_DIG - 1);
+ float
+ __exp2f (float x)
+ {
+- if (__builtin_expect (x <= u_threshold || x > o_threshold, 0)
++ if (__builtin_expect (islessequal (x, u_threshold)
++ || isgreater (x, o_threshold), 0)
+ && _LIB_VERSION != _IEEE_ && __finitef (x))
+ /* exp2 overflow: 144, exp2 underflow: 145 */
+ return __kernel_standard_f (x, x, 144 + (x <= o_threshold));
+diff --git a/math/w_exp2l.c b/math/w_exp2l.c
+index ac8d231..442a637 100644
+--- a/math/w_exp2l.c
++++ b/math/w_exp2l.c
+@@ -13,7 +13,8 @@ static const long double u_threshold
+ long double
+ __exp2l (long double x)
+ {
+- if (__builtin_expect (x <= u_threshold || x > o_threshold, 0)
++ if (__builtin_expect (islessequal (x, u_threshold)
++ || isgreater (x, o_threshold), 0)
+ && _LIB_VERSION != _IEEE_ && __finitel (x))
+ /* exp2 overflow: 244, exp2 underflow: 245 */
+ return __kernel_standard (x, x, 244 + (x <= o_threshold));
+diff --git a/math/w_j0.c b/math/w_j0.c
+index 1dff8b4..f8d3724 100644
+--- a/math/w_j0.c
++++ b/math/w_j0.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -25,7 +25,8 @@
+ double
+ j0 (double x)
+ {
+- if (__builtin_expect (fabs (x) > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
++ if (__builtin_expect (isgreater (fabs (x), X_TLOSS), 0)
++ && _LIB_VERSION != _IEEE_)
+ /* j0(|x|>X_TLOSS) */
+ return __kernel_standard (x, x, 34);
+
+@@ -40,7 +41,8 @@ strong_alias (j0, j0l)
+ double
+ y0 (double x)
+ {
+- if (__builtin_expect (x <= 0.0 || x > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
++ if (__builtin_expect (islessequal (x, 0.0) || isgreater (x, X_TLOSS), 0)
++ && _LIB_VERSION != _IEEE_)
+ {
+ if (x < 0.0)
+ {
+diff --git a/math/w_j0f.c b/math/w_j0f.c
+index fc52f26..cef36aa 100644
+--- a/math/w_j0f.c
++++ b/math/w_j0f.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -25,7 +25,7 @@
+ float
+ j0f (float x)
+ {
+- if (__builtin_expect (fabsf (x) > (float) X_TLOSS, 0)
++ if (__builtin_expect (isgreater (fabsf (x), (float) X_TLOSS), 0)
+ && _LIB_VERSION != _IEEE_)
+ /* j0(|x|>X_TLOSS) */
+ return __kernel_standard_f (x, x, 134);
+@@ -38,7 +38,8 @@ j0f (float x)
+ float
+ y0f (float x)
+ {
+- if (__builtin_expect (x <= 0.0f || x > (float) X_TLOSS, 0)
++ if (__builtin_expect (islessequal (x, 0.0f)
++ || isgreater (x, (float) X_TLOSS), 0)
+ && _LIB_VERSION != _IEEE_)
+ {
+ if (x < 0.0f)
+diff --git a/math/w_j0l.c b/math/w_j0l.c
+index 8d72d50..144f33c 100644
+--- a/math/w_j0l.c
++++ b/math/w_j0l.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -25,7 +25,8 @@
+ long double
+ __j0l (long double x)
+ {
+- if (__builtin_expect (fabsl (x) > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
++ if (__builtin_expect (isgreater (fabsl (x), X_TLOSS), 0)
++ && _LIB_VERSION != _IEEE_)
+ /* j0(|x|>X_TLOSS) */
+ return __kernel_standard (x, x, 234);
+
+@@ -38,7 +39,8 @@ weak_alias (__j0l, j0l)
+ long double
+ __y0l (long double x)
+ {
+- if (__builtin_expect (x <= 0.0L || x > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
++ if (__builtin_expect (islessequal (x, 0.0L) || isgreater (x, X_TLOSS), 0)
++ && _LIB_VERSION != _IEEE_)
+ {
+ if (x < 0.0L)
+ {
+diff --git a/math/w_j1.c b/math/w_j1.c
+index 358e0e1..e9a5357 100644
+--- a/math/w_j1.c
++++ b/math/w_j1.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -25,7 +25,8 @@
+ double
+ j1 (double x)
+ {
+- if (__builtin_expect (fabs (x) > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
++ if (__builtin_expect (isgreater (fabs (x), X_TLOSS), 0)
++ && _LIB_VERSION != _IEEE_)
+ /* j1(|x|>X_TLOSS) */
+ return __kernel_standard (x, x, 36);
+
+@@ -40,7 +41,8 @@ strong_alias (j1, j1l)
+ double
+ y1 (double x)
+ {
+- if (__builtin_expect (x <= 0.0 || x > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
++ if (__builtin_expect (islessequal (x, 0.0) || isgreater (x, X_TLOSS), 0)
++ && _LIB_VERSION != _IEEE_)
+ {
+ if (x < 0.0)
+ {
+diff --git a/math/w_j1f.c b/math/w_j1f.c
+index 096fdf5..29bd949 100644
+--- a/math/w_j1f.c
++++ b/math/w_j1f.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -25,7 +25,8 @@
+ float
+ j1f (float x)
+ {
+- if (__builtin_expect (fabsf (x) > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
++ if (__builtin_expect (isgreater (fabsf (x), X_TLOSS), 0)
++ && _LIB_VERSION != _IEEE_)
+ /* j1(|x|>X_TLOSS) */
+ return __kernel_standard_f (x, x, 136);
+
+@@ -37,7 +38,8 @@ j1f (float x)
+ float
+ y1f (float x)
+ {
+- if (__builtin_expect (x <= 0.0f || x > (float) X_TLOSS, 0)
++ if (__builtin_expect (islessequal (x, 0.0f)
++ || isgreater (x, (float) X_TLOSS), 0)
+ && _LIB_VERSION != _IEEE_)
+ {
+ if (x < 0.0f)
+diff --git a/math/w_j1l.c b/math/w_j1l.c
+index 93e4ee4..01b8551 100644
+--- a/math/w_j1l.c
++++ b/math/w_j1l.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -25,7 +25,8 @@
+ long double
+ __j1l (long double x)
+ {
+- if (__builtin_expect (fabsl (x) > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
++ if (__builtin_expect (isgreater (fabsl (x), X_TLOSS), 0)
++ && _LIB_VERSION != _IEEE_)
+ /* j1(|x|>X_TLOSS) */
+ return __kernel_standard (x, x, 236);
+
+@@ -38,7 +39,8 @@ weak_alias (__j1l, j1l)
+ long double
+ __y1l (long double x)
+ {
+- if (__builtin_expect (x <= 0.0L || x > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
++ if (__builtin_expect (islessequal (x, 0.0L) || isgreater (x, X_TLOSS), 0)
++ && _LIB_VERSION != _IEEE_)
+ {
+ if (x < 0.0L)
+ {
+diff --git a/math/w_jn.c b/math/w_jn.c
+index f0dd8c6..fd3fb16 100644
+--- a/math/w_jn.c
++++ b/math/w_jn.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -25,7 +25,8 @@
+ double
+ jn (int n, double x)
+ {
+- if (__builtin_expect (fabs (x) > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
++ if (__builtin_expect (isgreater (fabs (x), X_TLOSS), 0)
++ && _LIB_VERSION != _IEEE_)
+ /* jn(n,|x|>X_TLOSS) */
+ return __kernel_standard (n, x, 38);
+
+@@ -40,7 +41,8 @@ strong_alias (jn, jnl)
+ double
+ yn (int n, double x)
+ {
+- if (__builtin_expect (x <= 0.0 || x > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
++ if (__builtin_expect (islessequal (x, 0.0) || isgreater (x, X_TLOSS), 0)
++ && _LIB_VERSION != _IEEE_)
+ {
+ if (x < 0.0)
+ {
+diff --git a/math/w_jnf.c b/math/w_jnf.c
+index ef29eb4..36d6f6d 100644
+--- a/math/w_jnf.c
++++ b/math/w_jnf.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -25,7 +25,7 @@
+ float
+ jnf (int n, float x)
+ {
+- if (__builtin_expect (fabsf (x) > (float) X_TLOSS, 0)
++ if (__builtin_expect (isgreater (fabsf (x), (float) X_TLOSS), 0)
+ && _LIB_VERSION != _IEEE_)
+ /* jn(n,|x|>X_TLOSS) */
+ return __kernel_standard_f (n, x, 138);
+@@ -38,7 +38,8 @@ jnf (int n, float x)
+ float
+ ynf (int n, float x)
+ {
+- if (__builtin_expect (x <= 0.0f || x > (float) X_TLOSS, 0)
++ if (__builtin_expect (islessequal (x, 0.0f)
++ || isgreater (x, (float) X_TLOSS), 0)
+ && _LIB_VERSION != _IEEE_)
+ {
+ if (x < 0.0f)
+diff --git a/math/w_log.c b/math/w_log.c
+index efc1c4c..ec33605 100644
+--- a/math/w_log.c
++++ b/math/w_log.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -25,7 +25,7 @@
+ double
+ __log (double x)
+ {
+- if (__builtin_expect (x <= 0.0, 0) && _LIB_VERSION != _IEEE_)
++ if (__builtin_expect (islessequal (x, 0.0), 0) && _LIB_VERSION != _IEEE_)
+ {
+ if (x == 0.0)
+ {
+diff --git a/math/w_log10.c b/math/w_log10.c
+index 2717ade..fe799ad 100644
+--- a/math/w_log10.c
++++ b/math/w_log10.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -25,7 +25,7 @@
+ double
+ __log10 (double x)
+ {
+- if (__builtin_expect (x <= 0.0, 0) && _LIB_VERSION != _IEEE_)
++ if (__builtin_expect (islessequal (x, 0.0), 0) && _LIB_VERSION != _IEEE_)
+ {
+ if (x == 0.0)
+ {
+diff --git a/math/w_log10f.c b/math/w_log10f.c
+index 60737ca..4b821f7 100644
+--- a/math/w_log10f.c
++++ b/math/w_log10f.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -25,7 +25,7 @@
+ float
+ __log10f (float x)
+ {
+- if (__builtin_expect (x <= 0.0f, 0) && _LIB_VERSION != _IEEE_)
++ if (__builtin_expect (islessequal (x, 0.0f), 0) && _LIB_VERSION != _IEEE_)
+ {
+ if (x == 0.0f)
+ {
+diff --git a/math/w_log10l.c b/math/w_log10l.c
+index b26f18c..0e5a137 100644
+--- a/math/w_log10l.c
++++ b/math/w_log10l.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -25,7 +25,7 @@
+ long double
+ __log10l (long double x)
+ {
+- if (__builtin_expect (x <= 0.0L, 0) && _LIB_VERSION != _IEEE_)
++ if (__builtin_expect (islessequal (x, 0.0L), 0) && _LIB_VERSION != _IEEE_)
+ {
+ if (x == 0.0L)
+ {
+diff --git a/math/w_log2.c b/math/w_log2.c
+index 998e5d9..e58e109 100644
+--- a/math/w_log2.c
++++ b/math/w_log2.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -25,7 +25,7 @@
+ double
+ __log2 (double x)
+ {
+- if (__builtin_expect (x <= 0.0, 0) && _LIB_VERSION != _IEEE_)
++ if (__builtin_expect (islessequal (x, 0.0), 0) && _LIB_VERSION != _IEEE_)
+ {
+ if (x == 0.0)
+ {
+diff --git a/math/w_log2f.c b/math/w_log2f.c
+index 6d91bf4..6963ed2 100644
+--- a/math/w_log2f.c
++++ b/math/w_log2f.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -25,7 +25,7 @@
+ float
+ __log2f (float x)
+ {
+- if (__builtin_expect (x <= 0.0f, 0) && _LIB_VERSION != _IEEE_)
++ if (__builtin_expect (islessequal (x, 0.0f), 0) && _LIB_VERSION != _IEEE_)
+ {
+ if (x == 0.0)
+ {
+diff --git a/math/w_log2l.c b/math/w_log2l.c
+index e51c1bc..eed04ff6c 100644
+--- a/math/w_log2l.c
++++ b/math/w_log2l.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -25,7 +25,7 @@
+ long double
+ __log2l (long double x)
+ {
+- if (__builtin_expect (x <= 0.0L, 0) && _LIB_VERSION != _IEEE_)
++ if (__builtin_expect (islessequal (x, 0.0L), 0) && _LIB_VERSION != _IEEE_)
+ {
+ if (x == 0.0L)
+ {
+diff --git a/math/w_logf.c b/math/w_logf.c
+index 8aa27c8..38d408f 100644
+--- a/math/w_logf.c
++++ b/math/w_logf.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -25,7 +25,7 @@
+ float
+ __logf (float x)
+ {
+- if (__builtin_expect (x <= 0.0f, 0) && _LIB_VERSION != _IEEE_)
++ if (__builtin_expect (islessequal (x, 0.0f), 0) && _LIB_VERSION != _IEEE_)
+ {
+ if (x == 0.0f)
+ {
+diff --git a/math/w_logl.c b/math/w_logl.c
+index a3139ff..593b37d 100644
+--- a/math/w_logl.c
++++ b/math/w_logl.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -25,7 +25,7 @@
+ long double
+ __logl (long double x)
+ {
+- if (__builtin_expect (x <= 0.0L, 0) && _LIB_VERSION != _IEEE_)
++ if (__builtin_expect (islessequal (x, 0.0L), 0) && _LIB_VERSION != _IEEE_)
+ {
+ if (x == 0.0L)
+ {
+diff --git a/math/w_sqrt.c b/math/w_sqrt.c
+index 409a6df..f6ba542 100644
+--- a/math/w_sqrt.c
++++ b/math/w_sqrt.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -24,7 +24,7 @@
+ double
+ __sqrt (double x)
+ {
+- if (__builtin_expect (x < 0.0, 0) && _LIB_VERSION != _IEEE_)
++ if (__builtin_expect (isless (x, 0.0), 0) && _LIB_VERSION != _IEEE_)
+ return __kernel_standard (x, x, 26); /* sqrt(negative) */
+
+ return __ieee754_sqrt (x);
+diff --git a/math/w_sqrtf.c b/math/w_sqrtf.c
+index 3c3d2f8..c128e9b 100644
+--- a/math/w_sqrtf.c
++++ b/math/w_sqrtf.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -24,7 +24,7 @@
+ float
+ __sqrtf (float x)
+ {
+- if (__builtin_expect (x < 0.0f, 0) && _LIB_VERSION != _IEEE_)
++ if (__builtin_expect (isless (x, 0.0f), 0) && _LIB_VERSION != _IEEE_)
+ return __kernel_standard_f (x, x, 126); /* sqrt(negative) */
+
+ return __ieee754_sqrtf (x);
+diff --git a/math/w_sqrtl.c b/math/w_sqrtl.c
+index 5e18f44..2a4a048 100644
+--- a/math/w_sqrtl.c
++++ b/math/w_sqrtl.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -24,7 +24,7 @@
+ long double
+ __sqrtl (long double x)
+ {
+- if (__builtin_expect (x < 0.0L, 0) && _LIB_VERSION != _IEEE_)
++ if (__builtin_expect (isless (x, 0.0L), 0) && _LIB_VERSION != _IEEE_)
+ return __kernel_standard (x, x, 226); /* sqrt(negative) */
+
+ return __ieee754_sqrtl (x);
+diff --git a/sysdeps/ieee754/dbl-64/e_atanh.c b/sysdeps/ieee754/dbl-64/e_atanh.c
+index 9fc21ab..5f471b1 100644
+--- a/sysdeps/ieee754/dbl-64/e_atanh.c
++++ b/sysdeps/ieee754/dbl-64/e_atanh.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -46,7 +46,7 @@ __ieee754_atanh (double x)
+ {
+ double xa = fabs (x);
+ double t;
+- if (xa < 0.5)
++ if (isless (xa, 0.5))
+ {
+ if (__builtin_expect (xa < 0x1.0p-28, 0))
+ {
+@@ -57,11 +57,11 @@ __ieee754_atanh (double x)
+ t = xa + xa;
+ t = 0.5 * __log1p (t + t * xa / (1.0 - xa));
+ }
+- else if (__builtin_expect (xa < 1.0, 1))
++ else if (__builtin_expect (isless (xa, 1.0), 1))
+ t = 0.5 * __log1p ((xa + xa) / (1.0 - xa));
+ else
+ {
+- if (xa > 1.0)
++ if (isgreater (xa, 1.0))
+ return (x - x) / (x - x);
+
+ return x / 0.0;
+diff --git a/sysdeps/ieee754/dbl-64/w_exp.c b/sysdeps/ieee754/dbl-64/w_exp.c
+index ee42587..b584ed8 100644
+--- a/sysdeps/ieee754/dbl-64/w_exp.c
++++ b/sysdeps/ieee754/dbl-64/w_exp.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -28,12 +28,12 @@ u_threshold= -7.45133219101941108420e+02; /* 0xc0874910, 0xD52D3051 */
+ double
+ __exp (double x)
+ {
+- if (__builtin_expect (x > o_threshold, 0))
++ if (__builtin_expect (isgreater (x, o_threshold), 0))
+ {
+ if (_LIB_VERSION != _IEEE_)
+ return __kernel_standard_f (x, x, 6);
+ }
+- else if (__builtin_expect (x < u_threshold, 0))
++ else if (__builtin_expect (isless (x, u_threshold), 0))
+ {
+ if (_LIB_VERSION != _IEEE_)
+ return __kernel_standard_f (x, x, 7);
+diff --git a/sysdeps/ieee754/flt-32/e_atanhf.c b/sysdeps/ieee754/flt-32/e_atanhf.c
+index 75ed691..7af2f6c 100644
+--- a/sysdeps/ieee754/flt-32/e_atanhf.c
++++ b/sysdeps/ieee754/flt-32/e_atanhf.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -46,7 +46,7 @@ __ieee754_atanhf (float x)
+ {
+ float xa = fabsf (x);
+ float t;
+- if (xa < 0.5f)
++ if (isless (xa, 0.5f))
+ {
+ if (__builtin_expect (xa < 0x1.0p-28f, 0))
+ {
+@@ -57,11 +57,11 @@ __ieee754_atanhf (float x)
+ t = xa + xa;
+ t = 0.5f * __log1pf (t + t * xa / (1.0f - xa));
+ }
+- else if (__builtin_expect (xa < 1.0f, 1))
++ else if (__builtin_expect (isless (xa, 1.0f), 1))
+ t = 0.5f * __log1pf ((xa + xa) / (1.0f - xa));
+ else
+ {
+- if (xa > 1.0f)
++ if (isgreater (xa, 1.0f))
+ return (x - x) / (x - x);
+
+ return x / 0.0f;
+diff --git a/sysdeps/ieee754/flt-32/w_expf.c b/sysdeps/ieee754/flt-32/w_expf.c
+index 5500872..bc3b2f6 100644
+--- a/sysdeps/ieee754/flt-32/w_expf.c
++++ b/sysdeps/ieee754/flt-32/w_expf.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -28,12 +28,12 @@ u_threshold= -1.0397208405e+02; /* 0xc2cff1b5 */
+ float
+ __expf (float x)
+ {
+- if (__builtin_expect (x > o_threshold, 0))
++ if (__builtin_expect (isgreater (x, o_threshold), 0))
+ {
+ if (_LIB_VERSION != _IEEE_)
+ return __kernel_standard_f (x, x, 106);
+ }
+- else if (__builtin_expect (x < u_threshold, 0))
++ else if (__builtin_expect (isless (x, u_threshold), 0))
+ {
+ if (_LIB_VERSION != _IEEE_)
+ return __kernel_standard_f (x, x, 107);
+diff --git a/sysdeps/ieee754/ldbl-96/w_expl.c b/sysdeps/ieee754/ldbl-96/w_expl.c
+index ec9d8a7..d61c0a3 100644
+--- a/sysdeps/ieee754/ldbl-96/w_expl.c
++++ b/sysdeps/ieee754/ldbl-96/w_expl.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
++/* Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+@@ -30,12 +30,12 @@ u_threshold= -1.140019167866942050398521670162263001513e4;
+ long double
+ __expl (long double x)
+ {
+- if (__builtin_expect (x > o_threshold, 0))
++ if (__builtin_expect (isgreater (x, o_threshold), 0))
+ {
+ if (_LIB_VERSION != _IEEE_)
+ return __kernel_standard (x, x, 206);
+ }
+- else if (__builtin_expect (x < u_threshold, 0))
++ else if (__builtin_expect (isless (x, u_threshold), 0))
+ {
+ if (_LIB_VERSION != _IEEE_)
+ return __kernel_standard (x, x, 207);
diff --git a/staging/glibc/glibc-2.15-regex.patch b/staging/glibc/glibc-2.15-regex.patch
new file mode 100644
index 000000000..6385f2c08
--- /dev/null
+++ b/staging/glibc/glibc-2.15-regex.patch
@@ -0,0 +1,16 @@
+diff --git a/posix/regex_internal.c b/posix/regex_internal.c
+index bc19243..124f8cc 100644
+--- a/posix/regex_internal.c
++++ b/posix/regex_internal.c
+@@ -868,7 +868,7 @@ re_string_peek_byte_case (const re_string_t *pstr, int idx)
+ }
+
+ static unsigned char
+-internal_function __attribute ((pure))
++internal_function
+ re_string_fetch_byte_case (re_string_t *pstr)
+ {
+ if (BE (!pstr->mbs_allocated, 1))
+--
+1.7.3.4
+
diff --git a/staging/glibc/glibc-2.15-revert-c5a0802a.patch b/staging/glibc/glibc-2.15-revert-c5a0802a.patch
new file mode 100644
index 000000000..f532b95e8
--- /dev/null
+++ b/staging/glibc/glibc-2.15-revert-c5a0802a.patch
@@ -0,0 +1,229 @@
+diff -rup a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
+--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2011-12-22 18:04:12.937212834 +0000
++++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2011-12-22 18:04:42.104222278 +0000
+@@ -137,7 +137,6 @@ __pthread_cond_wait:
+ cmpl $PI_BIT, %eax
+ jne 18f
+
+-90:
+ movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %ecx
+ movl %ebp, %edx
+ xorl %esi, %esi
+@@ -151,9 +150,6 @@ __pthread_cond_wait:
+ sete 16(%esp)
+ je 19f
+
+- cmpl $-EAGAIN, %eax
+- je 91f
+-
+ /* Normal and PI futexes dont mix. Use normal futex functions only
+ if the kernel does not support the PI futex functions. */
+ cmpl $-ENOSYS, %eax
+@@ -398,78 +394,6 @@ __pthread_cond_wait:
+ #endif
+ call __lll_unlock_wake
+ jmp 11b
+-
+-91:
+-.LcleanupSTART2:
+- /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to
+- call it again. */
+-
+- /* Get internal lock. */
+- movl $1, %edx
+- xorl %eax, %eax
+- LOCK
+-#if cond_lock == 0
+- cmpxchgl %edx, (%ebx)
+-#else
+- cmpxchgl %edx, cond_lock(%ebx)
+-#endif
+- jz 92f
+-
+-#if cond_lock == 0
+- movl %ebx, %edx
+-#else
+- leal cond_lock(%ebx), %edx
+-#endif
+-#if (LLL_SHARED-LLL_PRIVATE) > 255
+- xorl %ecx, %ecx
+-#endif
+- cmpl $-1, dep_mutex(%ebx)
+- setne %cl
+- subl $1, %ecx
+- andl $(LLL_SHARED-LLL_PRIVATE), %ecx
+-#if LLL_PRIVATE != 0
+- addl $LLL_PRIVATE, %ecx
+-#endif
+- call __lll_lock_wait
+-
+-92:
+- /* Increment the cond_futex value again, so it can be used as a new
+- expected value. */
+- addl $1, cond_futex(%ebx)
+- movl cond_futex(%ebx), %ebp
+-
+- /* Unlock. */
+- LOCK
+-#if cond_lock == 0
+- subl $1, (%ebx)
+-#else
+- subl $1, cond_lock(%ebx)
+-#endif
+- je 93f
+-#if cond_lock == 0
+- movl %ebx, %eax
+-#else
+- leal cond_lock(%ebx), %eax
+-#endif
+-#if (LLL_SHARED-LLL_PRIVATE) > 255
+- xorl %ecx, %ecx
+-#endif
+- cmpl $-1, dep_mutex(%ebx)
+- setne %cl
+- subl $1, %ecx
+- andl $(LLL_SHARED-LLL_PRIVATE), %ecx
+-#if LLL_PRIVATE != 0
+- addl $LLL_PRIVATE, %ecx
+-#endif
+- call __lll_unlock_wake
+-
+-93:
+- /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
+- xorl %ecx, %ecx
+- movl dep_mutex(%ebx), %edi
+- jmp 90b
+-.LcleanupEND2:
+-
+ .size __pthread_cond_wait, .-__pthread_cond_wait
+ versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
+ GLIBC_2_3_2)
+@@ -642,10 +566,6 @@ __condvar_w_cleanup:
+ .long .LcleanupEND-.Lsub_cond_futex
+ .long __condvar_w_cleanup-.LSTARTCODE
+ .uleb128 0
+- .long .LcleanupSTART2-.LSTARTCODE
+- .long .LcleanupEND2-.LcleanupSTART2
+- .long __condvar_w_cleanup-.LSTARTCODE
+- .uleb128 0
+ .long .LcallUR-.LSTARTCODE
+ .long .LENDCODE-.LcallUR
+ .long 0
+Only in b/nptl/sysdeps/unix/sysv/linux/i386/i486: pthread_cond_wait.S.orig
+diff -rup a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
+--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2011-12-22 18:04:12.941212837 +0000
++++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2011-12-22 18:05:05.155229737 +0000
+@@ -23,7 +23,6 @@
+ #include <lowlevelcond.h>
+ #include <tcb-offsets.h>
+ #include <pthread-pi-defines.h>
+-#include <pthread-errnos.h>
+
+ #include <kernel-features.h>
+
+@@ -137,14 +136,11 @@ __pthread_cond_wait:
+ cmpl $PI_BIT, %eax
+ jne 61f
+
+-90:
+ movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %esi
+ movl $SYS_futex, %eax
+ syscall
+
+ movl $1, %r8d
+- cmpq $-EAGAIN, %rax
+- je 91f
+ #ifdef __ASSUME_REQUEUE_PI
+ jmp 62f
+ #else
+@@ -331,70 +327,6 @@ __pthread_cond_wait:
+
+ 13: movq %r10, %rax
+ jmp 14b
+-
+-91:
+-.LcleanupSTART2:
+- /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to
+- call it again. */
+- movq 8(%rsp), %rdi
+-
+- /* Get internal lock. */
+- movl $1, %esi
+- xorl %eax, %eax
+- LOCK
+-#if cond_lock == 0
+- cmpxchgl %esi, (%rdi)
+-#else
+- cmpxchgl %esi, cond_lock(%rdi)
+-#endif
+- jz 92f
+-
+-#if cond_lock != 0
+- addq $cond_lock, %rdi
+-#endif
+- cmpq $-1, dep_mutex-cond_lock(%rdi)
+- movl $LLL_PRIVATE, %eax
+- movl $LLL_SHARED, %esi
+- cmovne %eax, %esi
+- callq __lll_lock_wait
+-#if cond_lock != 0
+- subq $cond_lock, %rdi
+-#endif
+-92:
+- /* Increment the cond_futex value again, so it can be used as a new
+- expected value. */
+- incl cond_futex(%rdi)
+- movl cond_futex(%rdi), %edx
+-
+- /* Release internal lock. */
+- LOCK
+-#if cond_lock == 0
+- decl (%rdi)
+-#else
+- decl cond_lock(%rdi)
+-#endif
+- jz 93f
+-
+-#if cond_lock != 0
+- addq $cond_lock, %rdi
+-#endif
+- cmpq $-1, dep_mutex-cond_lock(%rdi)
+- movl $LLL_PRIVATE, %eax
+- movl $LLL_SHARED, %esi
+- cmovne %eax, %esi
+- /* The call preserves %rdx. */
+- callq __lll_unlock_wake
+-#if cond_lock != 0
+- subq $cond_lock, %rdi
+-#endif
+-93:
+- /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
+- xorq %r10, %r10
+- movq dep_mutex(%rdi), %r8
+- leaq cond_futex(%rdi), %rdi
+- jmp 90b
+-.LcleanupEND2:
+-
+ .size __pthread_cond_wait, .-__pthread_cond_wait
+ versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
+ GLIBC_2_3_2)
+@@ -547,15 +479,11 @@ __condvar_cleanup1:
+ .uleb128 .LcleanupSTART-.LSTARTCODE
+ .uleb128 .LcleanupEND-.LcleanupSTART
+ .uleb128 __condvar_cleanup1-.LSTARTCODE
+- .uleb128 0
+- .uleb128 .LcleanupSTART2-.LSTARTCODE
+- .uleb128 .LcleanupEND2-.LcleanupSTART2
+- .uleb128 __condvar_cleanup1-.LSTARTCODE
+- .uleb128 0
++ .uleb128 0
+ .uleb128 .LcallUR-.LSTARTCODE
+ .uleb128 .LENDCODE-.LcallUR
+ .uleb128 0
+- .uleb128 0
++ .uleb128 0
+ .Lcstend:
+
+
+Only in b/nptl/sysdeps/unix/sysv/linux/x86_64: pthread_cond_wait.S.orig
+Only in b/nptl/sysdeps/unix/sysv/linux/x86_64: pthread_cond_wait.S.rej
diff --git a/staging/glibc/glibc-2.15-revert-netlink-cache.patch b/staging/glibc/glibc-2.15-revert-netlink-cache.patch
new file mode 100644
index 000000000..87d04c794
--- /dev/null
+++ b/staging/glibc/glibc-2.15-revert-netlink-cache.patch
@@ -0,0 +1,680 @@
+diff --git a/include/ifaddrs.h b/include/ifaddrs.h
+index e1c6cac..50e4c48 100644
+--- a/include/ifaddrs.h
++++ b/include/ifaddrs.h
+@@ -21,13 +21,8 @@ struct in6addrinfo
+ extern void __check_pf (bool *seen_ipv4, bool *seen_ipv6,
+ struct in6addrinfo **in6ai, size_t *in6ailen)
+ attribute_hidden;
+-extern void __free_in6ai (struct in6addrinfo *in6ai) attribute_hidden;
+ extern void __check_native (uint32_t a1_index, int *a1_native,
+ uint32_t a2_index, int *a2_native)
+ attribute_hidden;
+
+-#ifdef IS_IN_nscd
+-extern uint32_t __bump_nl_timestamp (void) attribute_hidden;
+-#endif
+-
+ #endif /* ifaddrs.h */
+diff --git a/inet/check_pf.c b/inet/check_pf.c
+index 0fa34cc..b015432 100644
+--- a/inet/check_pf.c
++++ b/inet/check_pf.c
+@@ -1,5 +1,5 @@
+ /* Determine protocol families for which interfaces exist. Generic version.
+- Copyright (C) 2003, 2006, 2011 Free Software Foundation, Inc.
++ Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+@@ -54,19 +54,3 @@ __check_pf (bool *seen_ipv4, bool *seen_ipv6,
+
+ (void) freeifaddrs (ifa);
+ }
+-
+-
+-void
+-__free_in6ai (struct in6addrinfo *in6ai)
+-{
+- /* Nothing to do. */
+-}
+-
+-
+-#ifdef IS_IN_nscd
+-uint32_t
+-__bump_nl_timestamp (void)
+-{
+- return 0;
+-}
+-#endif
+diff --git a/nscd/connections.c b/nscd/connections.c
+index c741996..2b5c7ef 100644
+--- a/nscd/connections.c
++++ b/nscd/connections.c
+@@ -24,7 +24,6 @@
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <grp.h>
+-#include <ifaddrs.h>
+ #include <libintl.h>
+ #include <pthread.h>
+ #include <pwd.h>
+@@ -33,10 +32,6 @@
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <arpa/inet.h>
+-#ifdef HAVE_NETLINK
+-# include <linux/netlink.h>
+-# include <linux/rtnetlink.h>
+-#endif
+ #ifdef HAVE_EPOLL
+ # include <sys/epoll.h>
+ #endif
+@@ -252,11 +247,6 @@ static int sock;
+ int inotify_fd = -1;
+ #endif
+
+-#ifdef HAVE_NETLINK
+-/* Descriptor for netlink status updates. */
+-static int nl_status_fd = -1;
+-#endif
+-
+ #ifndef __ASSUME_SOCK_CLOEXEC
+ /* Negative if SOCK_CLOEXEC is not supported, positive if it is, zero
+ before be know the result. */
+@@ -913,65 +903,6 @@ cannot set socket to close on exec: %s; disabling paranoia mode"),
+ exit (1);
+ }
+
+-#ifdef HAVE_NETLINK
+- if (dbs[hstdb].enabled)
+- {
+- /* Try to open netlink socket to monitor network setting changes. */
+- nl_status_fd = socket (AF_NETLINK,
+- SOCK_RAW | SOCK_CLOEXEC | SOCK_NONBLOCK,
+- NETLINK_ROUTE);
+- if (nl_status_fd != -1)
+- {
+- struct sockaddr_nl snl;
+- memset (&snl, '\0', sizeof (snl));
+- snl.nl_family = AF_NETLINK;
+- /* XXX Is this the best set to use? */
+- snl.nl_groups = (RTMGRP_IPV4_IFADDR | RTMGRP_TC | RTMGRP_IPV4_MROUTE
+- | RTMGRP_IPV4_ROUTE | RTMGRP_IPV4_RULE
+- | RTMGRP_IPV6_IFADDR | RTMGRP_IPV6_MROUTE
+- | RTMGRP_IPV6_ROUTE | RTMGRP_IPV6_IFINFO
+- | RTMGRP_IPV6_PREFIX);
+-
+- if (bind (nl_status_fd, (struct sockaddr *) &snl, sizeof (snl)) != 0)
+- {
+- close (nl_status_fd);
+- nl_status_fd = -1;
+- }
+- else
+- {
+- /* Start the timestamp process. */
+- dbs[hstdb].head->extra_data[NSCD_HST_IDX_CONF_TIMESTAMP]
+- = __bump_nl_timestamp ();
+-
+-# ifndef __ASSUME_SOCK_CLOEXEC
+- if (have_sock_cloexec < 0)
+- {
+- /* We don't want to get stuck on accept. */
+- int fl = fcntl (nl_status_fd, F_GETFL);
+- if (fl == -1
+- || fcntl (nl_status_fd, F_SETFL, fl | O_NONBLOCK) == -1)
+- {
+- dbg_log (_("\
+-cannot change socket to nonblocking mode: %s"),
+- strerror (errno));
+- exit (1);
+- }
+-
+- /* The descriptor needs to be closed on exec. */
+- if (paranoia
+- && fcntl (nl_status_fd, F_SETFD, FD_CLOEXEC) == -1)
+- {
+- dbg_log (_("cannot set socket to close on exec: %s"),
+- strerror (errno));
+- exit (1);
+- }
+- }
+-# endif
+- }
+- }
+- }
+-#endif
+-
+ /* Change to unprivileged uid/gid/groups if specified in config file */
+ if (server_user != NULL)
+ finish_drop_privileges ();
+@@ -1895,18 +1826,6 @@ main_loop_poll (void)
+ }
+ #endif
+
+-#ifdef HAVE_NETLINK
+- size_t idx_nl_status_fd = 0;
+- if (nl_status_fd != -1)
+- {
+- idx_nl_status_fd = nused;
+- conns[nused].fd = nl_status_fd;
+- conns[nused].events = POLLRDNORM;
+- ++nused;
+- firstfree = nused;
+- }
+-#endif
+-
+ while (1)
+ {
+ /* Wait for any event. We wait at most a couple of seconds so
+@@ -2049,20 +1968,6 @@ disabled inotify after read error %d"),
+ }
+ #endif
+
+-#ifdef HAVE_NETLINK
+- if (idx_nl_status_fd != 0 && conns[idx_nl_status_fd].revents != 0)
+- {
+- char buf[4096];
+- /* Read all the data. We do not interpret it here. */
+- while (TEMP_FAILURE_RETRY (read (nl_status_fd, buf,
+- sizeof (buf))) != -1)
+- ;
+-
+- dbs[hstdb].head->extra_data[NSCD_HST_IDX_CONF_TIMESTAMP]
+- = __bump_nl_timestamp ();
+- }
+-#endif
+-
+ for (size_t cnt = first; cnt < nused && n > 0; ++cnt)
+ if (conns[cnt].revents != 0)
+ {
+@@ -2141,17 +2046,6 @@ main_loop_epoll (int efd)
+ }
+ # endif
+
+-# ifdef HAVE_NETLINK
+- if (nl_status_fd != -1)
+- {
+- ev.events = EPOLLRDNORM;
+- ev.data.fd = nl_status_fd;
+- if (epoll_ctl (efd, EPOLL_CTL_ADD, nl_status_fd, &ev) == -1)
+- /* We cannot use epoll. */
+- return;
+- }
+-# endif
+-
+ while (1)
+ {
+ struct epoll_event revs[100];
+@@ -2268,18 +2162,6 @@ main_loop_epoll (int efd)
+ }
+ }
+ # endif
+-# ifdef HAVE_NETLINK
+- else if (revs[cnt].data.fd == nl_status_fd)
+- {
+- char buf[4096];
+- /* Read all the data. We do not interpret it here. */
+- while (TEMP_FAILURE_RETRY (read (nl_status_fd, buf,
+- sizeof (buf))) != -1)
+- ;
+-
+- __bump_nl_timestamp ();
+- }
+-# endif
+ else
+ {
+ /* Remove the descriptor from the epoll descriptor. */
+@@ -2303,7 +2185,6 @@ main_loop_epoll (int efd)
+ time_t laststart = now - ACCEPT_TIMEOUT;
+ assert (starttime[sock] == 0);
+ assert (inotify_fd == -1 || starttime[inotify_fd] == 0);
+- assert (nl_status_fd == -1 || starttime[nl_status_fd] == 0);
+ for (int cnt = highest; cnt > STDERR_FILENO; --cnt)
+ if (starttime[cnt] != 0 && starttime[cnt] < laststart)
+ {
+diff --git a/nscd/nscd-client.h b/nscd/nscd-client.h
+index b5cd2d2..caad26a 100644
+--- a/nscd/nscd-client.h
++++ b/nscd/nscd-client.h
+@@ -260,17 +260,12 @@ struct hashentry
+
+
+ /* Current persistent database version. */
+-#define DB_VERSION 2
++#define DB_VERSION 1
+
+ /* Maximum time allowed between updates of the timestamp. */
+ #define MAPPING_TIMEOUT (5 * 60)
+
+
+-/* Used indices for the EXTRA_DATA element of 'database_pers_head'.
+- Each database has its own indices. */
+-#define NSCD_HST_IDX_CONF_TIMESTAMP 0
+-
+-
+ /* Header of persistent database file. */
+ struct database_pers_head
+ {
+@@ -279,8 +274,6 @@ struct database_pers_head
+ volatile int32_t gc_cycle;
+ volatile int32_t nscd_certainly_running;
+ volatile nscd_time_t timestamp;
+- /* Room for extensions. */
+- volatile uint32_t extra_data[4];
+
+ nscd_ssize_t module;
+ nscd_ssize_t data_size;
+@@ -329,12 +322,6 @@ extern int __nscd_open_socket (const char *key, size_t keylen,
+ request_type type, void *response,
+ size_t responselen) attribute_hidden;
+
+-/* Try to get a file descriptor for the shared meory segment
+- containing the database. */
+-extern struct mapped_database *__nscd_get_mapping (request_type type,
+- const char *key,
+- struct mapped_database **mappedp) attribute_hidden;
+-
+ /* Get reference of mapping. */
+ extern struct mapped_database *__nscd_get_map_ref (request_type type,
+ const char *name,
+@@ -384,7 +371,4 @@ extern ssize_t writeall (int fd, const void *buf, size_t len)
+ extern ssize_t sendfileall (int tofd, int fromfd, off_t off, size_t len)
+ attribute_hidden;
+
+-/* Get netlink timestamp counter from mapped area or zero. */
+-extern uint32_t __nscd_get_nl_timestamp (void);
+-
+ #endif /* nscd.h */
+diff --git a/nscd/nscd_gethst_r.c b/nscd/nscd_gethst_r.c
+index 6ee142d..70631fa 100644
+--- a/nscd/nscd_gethst_r.c
++++ b/nscd/nscd_gethst_r.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 1998-2005, 2006, 2007, 2008, 2009, 2011
++/* Copyright (C) 1998-2005, 2006, 2007, 2008, 2009
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
+@@ -98,27 +98,6 @@ libc_freeres_fn (hst_map_free)
+ }
+
+
+-uint32_t
+-__nscd_get_nl_timestamp (void)
+-{
+- if (__nss_not_use_nscd_hosts != 0)
+- return 0;
+-
+- struct mapped_database *map = __hst_map_handle.mapped;
+-
+- if (map == NULL
+- || (map != NO_MAPPING
+- && map->head->nscd_certainly_running == 0
+- && map->head->timestamp + MAPPING_TIMEOUT < time (NULL)))
+- map = __nscd_get_mapping (GETFDHST, "hosts", &__hst_map_handle.mapped);
+-
+- if (map == NO_MAPPING)
+- return 0;
+-
+- return map->head->extra_data[NSCD_HST_IDX_CONF_TIMESTAMP];
+-}
+-
+-
+ int __nss_have_localdomain attribute_hidden;
+
+ static int
+diff --git a/nscd/nscd_helper.c b/nscd/nscd_helper.c
+index 365b599..fe63f9a 100644
+--- a/nscd/nscd_helper.c
++++ b/nscd/nscd_helper.c
+@@ -277,9 +277,9 @@ __nscd_unmap (struct mapped_database *mapped)
+
+ /* Try to get a file descriptor for the shared meory segment
+ containing the database. */
+-struct mapped_database *
+-__nscd_get_mapping (request_type type, const char *key,
+- struct mapped_database **mappedp)
++static struct mapped_database *
++get_mapping (request_type type, const char *key,
++ struct mapped_database **mappedp)
+ {
+ struct mapped_database *result = NO_MAPPING;
+ #ifdef SCM_RIGHTS
+@@ -449,8 +449,8 @@ __nscd_get_map_ref (request_type type, const char *name,
+ || (cur->head->nscd_certainly_running == 0
+ && cur->head->timestamp + MAPPING_TIMEOUT < time (NULL))
+ || cur->head->data_size > cur->datasize)
+- cur = __nscd_get_mapping (type, name,
+- (struct mapped_database **) &mapptr->mapped);
++ cur = get_mapping (type, name,
++ (struct mapped_database **) &mapptr->mapped);
+
+ if (__builtin_expect (cur != NO_MAPPING, 1))
+ {
+diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
+index 1a023f9..4979805 100644
+--- a/sysdeps/posix/getaddrinfo.c
++++ b/sysdeps/posix/getaddrinfo.c
+@@ -2386,7 +2386,7 @@ getaddrinfo (const char *name, const char *service,
+ || (hints->ai_family == PF_INET6 && ! seen_ipv6))
+ {
+ /* We cannot possibly return a valid answer. */
+- __free_in6ai (in6ai);
++ free (in6ai);
+ return EAI_NONAME;
+ }
+ }
+@@ -2400,7 +2400,7 @@ getaddrinfo (const char *name, const char *service,
+ {
+ if (hints->ai_flags & AI_NUMERICSERV)
+ {
+- __free_in6ai (in6ai);
++ free (in6ai);
+ return EAI_NONAME;
+ }
+
+@@ -2422,7 +2422,7 @@ getaddrinfo (const char *name, const char *service,
+ if (last_i != 0)
+ {
+ freeaddrinfo (p);
+- __free_in6ai (in6ai);
++ free (in6ai);
+
+ return -(last_i & GAIH_EAI);
+ }
+@@ -2434,7 +2434,7 @@ getaddrinfo (const char *name, const char *service,
+ }
+ else
+ {
+- __free_in6ai (in6ai);
++ free (in6ai);
+ return EAI_FAMILY;
+ }
+
+@@ -2622,7 +2622,7 @@ getaddrinfo (const char *name, const char *service,
+ p->ai_canonname = canonname;
+ }
+
+- __free_in6ai (in6ai);
++ free (in6ai);
+
+ if (p)
+ {
+diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
+index e684b16..c907af4 100644
+--- a/sysdeps/unix/sysv/linux/Makefile
++++ b/sysdeps/unix/sysv/linux/Makefile
+@@ -173,6 +173,6 @@ CFLAGS-mq_receive.c += -fexceptions
+ endif
+
+ ifeq ($(subdir),nscd)
+-sysdep-CFLAGS += -DHAVE_EPOLL -DHAVE_SENDFILE -DHAVE_INOTIFY -DHAVE_NETLINK
++sysdep-CFLAGS += -DHAVE_EPOLL -DHAVE_SENDFILE -DHAVE_INOTIFY
+ CFLAGS-gai.c += -DNEED_NETLINK
+ endif
+diff --git a/sysdeps/unix/sysv/linux/check_pf.c b/sysdeps/unix/sysv/linux/check_pf.c
+index 0738a70..d5ad7ea 100644
+--- a/sysdeps/unix/sysv/linux/check_pf.c
++++ b/sysdeps/unix/sysv/linux/check_pf.c
+@@ -1,5 +1,5 @@
+ /* Determine protocol families for which interfaces exist. Linux version.
+- Copyright (C) 2003, 2006-2008, 2010, 2011 Free Software Foundation, Inc.
++ Copyright (C) 2003, 2006, 2007, 2008, 2010, 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+@@ -33,9 +33,6 @@
+
+ #include <not-cancel.h>
+ #include <kernel-features.h>
+-#include <bits/libc-lock.h>
+-#include <atomic.h>
+-#include <nscd/nscd-client.h>
+
+
+ #ifndef IFA_F_HOMEADDRESS
+@@ -46,42 +43,9 @@
+ #endif
+
+
+-struct cached_data
+-{
+- uint32_t timestamp;
+- uint32_t usecnt;
+- bool seen_ipv4;
+- bool seen_ipv6;
+- size_t in6ailen;
+- struct in6addrinfo in6ai[0];
+-};
+-
+-static struct cached_data noai6ai_cached =
+- {
+- .usecnt = 1, /* Make sure we never try to delete this entry. */
+- .in6ailen = 0
+- };
+-
+-static struct cached_data *cache;
+-__libc_lock_define_initialized (static, lock);
+-
+-
+-#ifdef IS_IN_nscd
+-static uint32_t nl_timestamp;
+-
+-uint32_t
+-__bump_nl_timestamp (void)
+-{
+- if (atomic_increment_val (&nl_timestamp) == 0)
+- atomic_increment (&nl_timestamp);
+-
+- return nl_timestamp;
+-}
+-#endif
+-
+-
+-static struct cached_data *
+-make_request (int fd, pid_t pid)
++static int
++make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6,
++ struct in6addrinfo **in6ai, size_t *in6ailen)
+ {
+ struct req
+ {
+@@ -135,6 +99,9 @@ make_request (int fd, pid_t pid)
+ sizeof (nladdr))) < 0)
+ goto out_fail;
+
++ *seen_ipv4 = false;
++ *seen_ipv6 = false;
++
+ bool done = false;
+ struct in6ailist
+ {
+@@ -142,8 +109,6 @@ make_request (int fd, pid_t pid)
+ struct in6ailist *next;
+ } *in6ailist = NULL;
+ size_t in6ailistlen = 0;
+- bool seen_ipv4 = false;
+- bool seen_ipv6 = false;
+
+ do
+ {
+@@ -207,12 +172,12 @@ make_request (int fd, pid_t pid)
+ {
+ if (*(const in_addr_t *) address
+ != htonl (INADDR_LOOPBACK))
+- seen_ipv4 = true;
++ *seen_ipv4 = true;
+ }
+ else
+ {
+ if (!IN6_IS_ADDR_LOOPBACK (address))
+- seen_ipv6 = true;
++ *seen_ipv6 = true;
+ }
+ }
+
+@@ -246,47 +211,30 @@ make_request (int fd, pid_t pid)
+ }
+ while (! done);
+
+- struct cached_data *result;
+- if (seen_ipv6 && in6ailist != NULL)
++ if (*seen_ipv6 && in6ailist != NULL)
+ {
+- result = malloc (sizeof (*result)
+- + in6ailistlen * sizeof (struct in6addrinfo));
+- if (result == NULL)
++ *in6ai = malloc (in6ailistlen * sizeof (**in6ai));
++ if (*in6ai == NULL)
+ goto out_fail;
+
+-#ifdef IS_IN_nscd
+- result->timestamp = nl_timestamp;
+-#else
+- result->timestamp = __nscd_get_nl_timestamp ();
+-#endif
+- result->usecnt = 2;
+- result->seen_ipv4 = seen_ipv4;
+- result->seen_ipv6 = true;
+- result->in6ailen = in6ailistlen;
++ *in6ailen = in6ailistlen;
+
+ do
+ {
+- result->in6ai[--in6ailistlen] = in6ailist->info;
++ (*in6ai)[--in6ailistlen] = in6ailist->info;
+ in6ailist = in6ailist->next;
+ }
+ while (in6ailist != NULL);
+ }
+- else
+- {
+- atomic_add (&noai6ai_cached.usecnt, 2);
+- noai6ai_cached.seen_ipv4 = seen_ipv4;
+- noai6ai_cached.seen_ipv6 = seen_ipv6;
+- result = &noai6ai_cached;
+- }
+
+ if (use_malloc)
+ free (buf);
+- return result;
++ return 0;
+
+ out_fail:
+ if (use_malloc)
+ free (buf);
+- return NULL;
++ return -1;
+ }
+
+
+@@ -310,65 +258,28 @@ __check_pf (bool *seen_ipv4, bool *seen_ipv6,
+
+ if (! __no_netlink_support)
+ {
+- struct cached_data *olddata = NULL;
+- struct cached_data *data = NULL;
++ int fd = __socket (PF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
+
+- __libc_lock_lock (lock);
+-
+-#ifdef IS_IN_nscd
+-# define cache_valid() nl_timestamp != 0 && cache->timestamp == nl_timestamp
+-#else
+-# define cache_valid() \
+- ({ uint32_t val = __nscd_get_nl_timestamp (); \
+- val != 0 && cache->timestamp == val; })
+-#endif
+- if (cache != NULL && cache_valid ())
+- {
+- data = cache;
+- atomic_increment (&cache->usecnt);
+- }
+- else
++ if (__builtin_expect (fd >= 0, 1))
+ {
+- int fd = __socket (PF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
++ struct sockaddr_nl nladdr;
++ memset (&nladdr, '\0', sizeof (nladdr));
++ nladdr.nl_family = AF_NETLINK;
+
+- if (__builtin_expect (fd >= 0, 1))
+- {
+- struct sockaddr_nl nladdr;
+- memset (&nladdr, '\0', sizeof (nladdr));
+- nladdr.nl_family = AF_NETLINK;
+-
+- socklen_t addr_len = sizeof (nladdr);
+-
+- if(__bind (fd, (struct sockaddr *) &nladdr, sizeof (nladdr)) == 0
+- && __getsockname (fd, (struct sockaddr *) &nladdr,
+- &addr_len) == 0)
+- data = make_request (fd, nladdr.nl_pid);
+-
+- close_not_cancel_no_status (fd);
+- }
+-
+- if (data != NULL)
+- {
+- olddata = cache;
+- cache = data;
+- }
+- }
++ socklen_t addr_len = sizeof (nladdr);
+
+- __libc_lock_unlock (lock);
++ bool success
++ = (__bind (fd, (struct sockaddr *) &nladdr, sizeof (nladdr)) == 0
++ && __getsockname (fd, (struct sockaddr *) &nladdr,
++ &addr_len) == 0
++ && make_request (fd, nladdr.nl_pid, seen_ipv4, seen_ipv6,
++ in6ai, in6ailen) == 0);
+
+- if (data != NULL)
+- {
+- /* It worked. */
+- *seen_ipv4 = data->seen_ipv4;
+- *seen_ipv6 = data->seen_ipv6;
+- *in6ailen = data->in6ailen;
+- *in6ai = data->in6ai;
+-
+- if (olddata != NULL && olddata->usecnt > 0
+- && atomic_add_zero (&olddata->usecnt, -1))
+- free (olddata);
++ close_not_cancel_no_status (fd);
+
+- return;
++ if (success)
++ /* It worked. */
++ return;
+ }
+
+ #if __ASSUME_NETLINK_SUPPORT == 0
+@@ -407,26 +318,3 @@ __check_pf (bool *seen_ipv4, bool *seen_ipv6,
+ (void) freeifaddrs (ifa);
+ #endif
+ }
+-
+-
+-void
+-__free_in6ai (struct in6addrinfo *ai)
+-{
+- if (ai != NULL)
+- {
+- struct cached_data *data =
+- (struct cached_data *) ((char *) ai
+- - offsetof (struct cached_data, in6ai));
+-
+- if (atomic_add_zero (&data->usecnt, -1))
+- {
+- __libc_lock_lock (lock);
+-
+- if (data->usecnt == 0)
+- /* Still unused. */
+- free (data);
+-
+- __libc_lock_unlock (lock);
+- }
+- }
+-}
diff --git a/staging/glibc/glibc-2.15-rintf-rounding.patch b/staging/glibc/glibc-2.15-rintf-rounding.patch
new file mode 100644
index 000000000..e0240ac6c
--- /dev/null
+++ b/staging/glibc/glibc-2.15-rintf-rounding.patch
@@ -0,0 +1,158 @@
+diff --git a/math/libm-test.inc b/math/libm-test.inc
+index 6243e1e..c8186c8 100644
+--- a/math/libm-test.inc
++++ b/math/libm-test.inc
+@@ -5037,6 +5037,22 @@ rint_test (void)
+ TEST_f_f (rint, 262142.75, 262143.0);
+ TEST_f_f (rint, 524286.75, 524287.0);
+ TEST_f_f (rint, 524288.75, 524289.0);
++ TEST_f_f (rint, 1048576.75, 1048577.0);
++ TEST_f_f (rint, 2097152.75, 2097153.0);
++ TEST_f_f (rint, -1048576.75, -1048577.0);
++ TEST_f_f (rint, -2097152.75, -2097153.0);
++#ifndef TEST_FLOAT
++ TEST_f_f (rint, 70368744177664.75, 70368744177665.0);
++ TEST_f_f (rint, 140737488355328.75, 140737488355329.0);
++ TEST_f_f (rint, 281474976710656.75, 281474976710657.0);
++ TEST_f_f (rint, 562949953421312.75, 562949953421313.0);
++ TEST_f_f (rint, 1125899906842624.75, 1125899906842625.0);
++ TEST_f_f (rint, -70368744177664.75, -70368744177665.0);
++ TEST_f_f (rint, -140737488355328.75, -140737488355329.0);
++ TEST_f_f (rint, -281474976710656.75, -281474976710657.0);
++ TEST_f_f (rint, -562949953421312.75, -562949953421313.0);
++ TEST_f_f (rint, -1125899906842624.75, -1125899906842625.0);
++#endif
+ #ifdef TEST_LDOUBLE
+ /* The result can only be represented in long double. */
+ TEST_f_f (rint, 4503599627370495.5L, 4503599627370496.0L);
+@@ -5137,6 +5153,22 @@ rint_test_tonearest (void)
+ TEST_f_f (rint, -0.1, -0.0);
+ TEST_f_f (rint, -0.25, -0.0);
+ TEST_f_f (rint, -0.625, -1.0);
++ TEST_f_f (rint, 1048576.75, 1048577.0);
++ TEST_f_f (rint, 2097152.75, 2097153.0);
++ TEST_f_f (rint, -1048576.75, -1048577.0);
++ TEST_f_f (rint, -2097152.75, -2097153.0);
++#ifndef TEST_FLOAT
++ TEST_f_f (rint, 70368744177664.75, 70368744177665.0);
++ TEST_f_f (rint, 140737488355328.75, 140737488355329.0);
++ TEST_f_f (rint, 281474976710656.75, 281474976710657.0);
++ TEST_f_f (rint, 562949953421312.75, 562949953421313.0);
++ TEST_f_f (rint, 1125899906842624.75, 1125899906842625.0);
++ TEST_f_f (rint, -70368744177664.75, -70368744177665.0);
++ TEST_f_f (rint, -140737488355328.75, -140737488355329.0);
++ TEST_f_f (rint, -281474976710656.75, -281474976710657.0);
++ TEST_f_f (rint, -562949953421312.75, -562949953421313.0);
++ TEST_f_f (rint, -1125899906842624.75, -1125899906842625.0);
++#endif
+ #ifdef TEST_LDOUBLE
+ /* The result can only be represented in long double. */
+ TEST_f_f (rint, 4503599627370495.5L, 4503599627370496.0L);
+@@ -5207,6 +5239,22 @@ rint_test_towardzero (void)
+ TEST_f_f (rint, -0.1, -0.0);
+ TEST_f_f (rint, -0.25, -0.0);
+ TEST_f_f (rint, -0.625, -0.0);
++ TEST_f_f (rint, 1048576.75, 1048576.0);
++ TEST_f_f (rint, 2097152.75, 2097152.0);
++ TEST_f_f (rint, -1048576.75, -1048576.0);
++ TEST_f_f (rint, -2097152.75, -2097152.0);
++#ifndef TEST_FLOAT
++ TEST_f_f (rint, 70368744177664.75, 70368744177664.0);
++ TEST_f_f (rint, 140737488355328.75, 140737488355328.0);
++ TEST_f_f (rint, 281474976710656.75, 281474976710656.0);
++ TEST_f_f (rint, 562949953421312.75, 562949953421312.0);
++ TEST_f_f (rint, 1125899906842624.75, 1125899906842624.0);
++ TEST_f_f (rint, -70368744177664.75, -70368744177664.0);
++ TEST_f_f (rint, -140737488355328.75, -140737488355328.0);
++ TEST_f_f (rint, -281474976710656.75, -281474976710656.0);
++ TEST_f_f (rint, -562949953421312.75, -562949953421312.0);
++ TEST_f_f (rint, -1125899906842624.75, -1125899906842624.0);
++#endif
+ #ifdef TEST_LDOUBLE
+ /* The result can only be represented in long double. */
+ TEST_f_f (rint, 4503599627370495.5L, 4503599627370495.0L);
+@@ -5277,6 +5325,22 @@ rint_test_downward (void)
+ TEST_f_f (rint, -0.1, -1.0);
+ TEST_f_f (rint, -0.25, -1.0);
+ TEST_f_f (rint, -0.625, -1.0);
++ TEST_f_f (rint, 1048576.75, 1048576.0);
++ TEST_f_f (rint, 2097152.75, 2097152.0);
++ TEST_f_f (rint, -1048576.75, -1048577.0);
++ TEST_f_f (rint, -2097152.75, -2097153.0);
++#ifndef TEST_FLOAT
++ TEST_f_f (rint, 70368744177664.75, 70368744177664.0);
++ TEST_f_f (rint, 140737488355328.75, 140737488355328.0);
++ TEST_f_f (rint, 281474976710656.75, 281474976710656.0);
++ TEST_f_f (rint, 562949953421312.75, 562949953421312.0);
++ TEST_f_f (rint, 1125899906842624.75, 1125899906842624.0);
++ TEST_f_f (rint, -70368744177664.75, -70368744177665.0);
++ TEST_f_f (rint, -140737488355328.75, -140737488355329.0);
++ TEST_f_f (rint, -281474976710656.75, -281474976710657.0);
++ TEST_f_f (rint, -562949953421312.75, -562949953421313.0);
++ TEST_f_f (rint, -1125899906842624.75, -1125899906842625.0);
++#endif
+ #ifdef TEST_LDOUBLE
+ /* The result can only be represented in long double. */
+ TEST_f_f (rint, 4503599627370495.5L, 4503599627370495.0L);
+@@ -5347,6 +5411,22 @@ rint_test_upward (void)
+ TEST_f_f (rint, -0.1, -0.0);
+ TEST_f_f (rint, -0.25, -0.0);
+ TEST_f_f (rint, -0.625, -0.0);
++ TEST_f_f (rint, 1048576.75, 1048577.0);
++ TEST_f_f (rint, 2097152.75, 2097153.0);
++ TEST_f_f (rint, -1048576.75, -1048576.0);
++ TEST_f_f (rint, -2097152.75, -2097152.0);
++#ifndef TEST_FLOAT
++ TEST_f_f (rint, 70368744177664.75, 70368744177665.0);
++ TEST_f_f (rint, 140737488355328.75, 140737488355329.0);
++ TEST_f_f (rint, 281474976710656.75, 281474976710657.0);
++ TEST_f_f (rint, 562949953421312.75, 562949953421313.0);
++ TEST_f_f (rint, 1125899906842624.75, 1125899906842625.0);
++ TEST_f_f (rint, -70368744177664.75, -70368744177664.0);
++ TEST_f_f (rint, -140737488355328.75, -140737488355328.0);
++ TEST_f_f (rint, -281474976710656.75, -281474976710656.0);
++ TEST_f_f (rint, -562949953421312.75, -562949953421312.0);
++ TEST_f_f (rint, -1125899906842624.75, -1125899906842624.0);
++#endif
+ #ifdef TEST_LDOUBLE
+ /* The result can only be represented in long double. */
+ TEST_f_f (rint, 4503599627370495.5L, 4503599627370496.0L);
+diff --git a/sysdeps/ieee754/flt-32/s_rintf.c b/sysdeps/ieee754/flt-32/s_rintf.c
+index 9ea9b6f..9ba6b57 100644
+--- a/sysdeps/ieee754/flt-32/s_rintf.c
++++ b/sysdeps/ieee754/flt-32/s_rintf.c
+@@ -26,34 +26,22 @@ float
+ __rintf(float x)
+ {
+ int32_t i0,j0,sx;
+- u_int32_t i,i1;
+ float w,t;
+ GET_FLOAT_WORD(i0,x);
+ sx = (i0>>31)&1;
+ j0 = ((i0>>23)&0xff)-0x7f;
+ if(j0<23) {
+ if(j0<0) {
+- if((i0&0x7fffffff)==0) return x;
+- i1 = (i0&0x07fffff);
+- i0 &= 0xfff00000;
+- i0 |= ((i1|-i1)>>9)&0x400000;
+- SET_FLOAT_WORD(x,i0);
+ w = TWO23[sx]+x;
+ t = w-TWO23[sx];
+ GET_FLOAT_WORD(i0,t);
+ SET_FLOAT_WORD(t,(i0&0x7fffffff)|(sx<<31));
+ return t;
+- } else {
+- i = (0x007fffff)>>j0;
+- if((i0&i)==0) return x; /* x is integral */
+- i>>=1;
+- if((i0&i)!=0) i0 = (i0&(~i))|((0x100000)>>j0);
+ }
+ } else {
+ if(j0==0x80) return x+x; /* inf or NaN */
+ else return x; /* x is integral */
+ }
+- SET_FLOAT_WORD(x,i0);
+ w = TWO23[sx]+x;
+ return w-TWO23[sx];
+ }
diff --git a/staging/glibc/glibc-2.15-scanf.patch b/staging/glibc/glibc-2.15-scanf.patch
new file mode 100644
index 000000000..a2561b232
--- /dev/null
+++ b/staging/glibc/glibc-2.15-scanf.patch
@@ -0,0 +1,19 @@
+diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c
+index 0e71deb..e18a6c3 100644
+--- a/stdio-common/vfscanf.c
++++ b/stdio-common/vfscanf.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 1991-2006, 2007, 2010, 2011 Free Software Foundation, Inc.
++/* Copyright (C) 1991-2007, 2010, 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+@@ -274,7 +274,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
+ CHAR_T *old = wp; \
+ size_t newsize = (UCHAR_MAX + 1 > 2 * wpmax \
+ ? UCHAR_MAX + 1 : 2 * wpmax); \
+- if (use_malloc || __libc_use_alloca (newsize)) \
++ if (use_malloc || !__libc_use_alloca (newsize)) \
+ { \
+ wp = realloc (use_malloc ? wp : NULL, newsize); \
+ if (wp == NULL) \
diff --git a/staging/glibc/glibc-2.15-strcasecmp-disable-avx.patch b/staging/glibc/glibc-2.15-strcasecmp-disable-avx.patch
new file mode 100644
index 000000000..4c104fa55
--- /dev/null
+++ b/staging/glibc/glibc-2.15-strcasecmp-disable-avx.patch
@@ -0,0 +1,48 @@
+diff --git a/sysdeps/x86_64/multiarch/strcmp.S b/sysdeps/x86_64/multiarch/strcmp.S
+index f93c83d..d8aa889 100644
+--- a/sysdeps/x86_64/multiarch/strcmp.S
++++ b/sysdeps/x86_64/multiarch/strcmp.S
+@@ -105,11 +105,6 @@ ENTRY(__strcasecmp)
+ jne 1f
+ call __init_cpu_features
+ 1:
+-# ifdef HAVE_AVX_SUPPORT
+- leaq __strcasecmp_avx(%rip), %rax
+- testl $bit_AVX, __cpu_features+CPUID_OFFSET+index_AVX(%rip)
+- jnz 2f
+-# endif
+ leaq __strcasecmp_sse42(%rip), %rax
+ testl $bit_SSE4_2, __cpu_features+CPUID_OFFSET+index_SSE4_2(%rip)
+ jnz 2f
+@@ -128,11 +123,6 @@ ENTRY(__strncasecmp)
+ jne 1f
+ call __init_cpu_features
+ 1:
+-# ifdef HAVE_AVX_SUPPORT
+- leaq __strncasecmp_avx(%rip), %rax
+- testl $bit_AVX, __cpu_features+CPUID_OFFSET+index_AVX(%rip)
+- jnz 2f
+-# endif
+ leaq __strncasecmp_sse42(%rip), %rax
+ testl $bit_SSE4_2, __cpu_features+CPUID_OFFSET+index_SSE4_2(%rip)
+ jnz 2f
+@@ -152,19 +142,6 @@ weak_alias (__strncasecmp, strncasecmp)
+ # include "strcmp-sse42.S"
+
+
+-# ifdef HAVE_AVX_SUPPORT
+-# if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+-# define LABEL(l) .L##l##_avx
+-# define GLABEL(l) l##_avx
+-# define USE_AVX 1
+-# undef STRCMP_SSE42
+-# define STRCMP_SSE42 STRCMP_AVX
+-# define SECTION avx
+-# include "strcmp-sse42.S"
+-# endif
+-# endif
+-
+-
+ # undef ENTRY
+ # define ENTRY(name) \
+ .type STRCMP_SSE2, @function; \
diff --git a/staging/glibc/glibc-2.15-testsuite.patch b/staging/glibc/glibc-2.15-testsuite.patch
new file mode 100644
index 000000000..7eaeaed65
--- /dev/null
+++ b/staging/glibc/glibc-2.15-testsuite.patch
@@ -0,0 +1,110 @@
+From d4c2917fc5091dae7ab1b30c165becb70d3c3453 Mon Sep 17 00:00:00 2001
+From: Allan McRae <allan@archlinux.org>
+Date: Mon, 16 Apr 2012 14:06:47 +1000
+Subject: [PATCH] Fix test-suite failues with -Wl,--as-needed
+
+Signed-off-by: Allan McRae <allan@archlinux.org>
+---
+ ChangeLog | 24 ++++++++++++++++++++++++
+ elf/Makefile | 21 ++++++++++++++++++++-
+ nptl/ChangeLog | 5 +++++
+ nptl/Makefile | 3 ++-
+ stdlib/Makefile | 1 +
+ 5 files changed, 52 insertions(+), 2 deletions(-)
+
+diff --git a/elf/Makefile b/elf/Makefile
+index 57dcab0..47729c3 100644
+--- a/elf/Makefile
++++ b/elf/Makefile
+@@ -500,6 +500,18 @@ $(objpfx)tst-initordera3.so: $(objpfx)tst-initorderb2.so $(objpfx)tst-initorderb
+ $(objpfx)tst-initordera4.so: $(objpfx)tst-initordera3.so
+ $(objpfx)tst-initorder: $(objpfx)tst-initordera4.so $(objpfx)tst-initordera1.so $(objpfx)tst-initorderb2.so
+
++LDFLAGS-nodel2mod3.so = $(no-as-needed)
++LDFLAGS-reldepmod5.so = $(no-as-needed)
++LDFLAGS-reldep6mod1.so = $(no-as-needed)
++LDFLAGS-reldep6mod4.so = $(no-as-needed)
++LDFLAGS-reldep8mod3.so = $(no-as-needed)
++LDFLAGS-unload4mod1.so = $(no-as-needed)
++LDFLAGS-unload4mod2.so = $(no-as-needed)
++LDFLAGS-tst-initorder = $(no-as-needed)
++LDFLAGS-tst-initordera2.so = $(no-as-needed)
++LDFLAGS-tst-initordera3.so = $(no-as-needed)
++LDFLAGS-tst-initordera4.so = $(no-as-needed)
++LDFLAGS-tst-initorderb2.so = $(no-as-needed)
+ LDFLAGS-tst-tlsmod5.so = -nostdlib
+ LDFLAGS-tst-tlsmod6.so = -nostdlib
+
+@@ -633,7 +645,7 @@ $(objpfx)vismain.out: $(addprefix $(objpfx),vismod3.so)
+ vismain-ENV = LD_PRELOAD=$(addprefix $(objpfx),vismod3.so)
+
+ $(objpfx)noload: $(objpfx)testobj1.so $(common-objpfx)dlfcn/libdl.so
+-LDFLAGS-noload = -rdynamic
++LDFLAGS-noload = -rdynamic $(no-as-needed)
+ $(objpfx)noload.out: $(objpfx)testobj5.so
+
+ $(objpfx)noload-mem: $(objpfx)noload.out
+@@ -678,6 +690,7 @@ $(objpfx)reldep4: $(libdl)
+ $(objpfx)reldep4.out: $(objpfx)reldep4mod1.so $(objpfx)reldep4mod2.so
+
+ $(objpfx)next: $(objpfx)nextmod1.so $(objpfx)nextmod2.so $(libdl)
++LDFLAGS-next = $(no-as-needed)
+
+ $(objpfx)unload2: $(libdl)
+ $(objpfx)unload2.out: $(objpfx)unload2mod.so $(objpfx)unload2dep.so
+@@ -1025,6 +1038,8 @@ $(objpfx)order2mod1.so: $(objpfx)order2mod4.so
+ $(objpfx)order2mod4.so: $(objpfx)order2mod3.so
+ $(objpfx)order2mod2.so: $(objpfx)order2mod3.so
+ order2mod2.so-no-z-defs = yes
++LDFLAGS-order2mod1.so = $(no-as-needed)
++LDFLAGS-order2mod2.so = $(no-as-needed)
+
+ tst-stackguard1-ARGS = --command "$(built-program-cmd) --child"
+ tst-stackguard1-static-ARGS = --command "$(objpfx)tst-stackguard1-static --child"
+@@ -1113,6 +1128,10 @@ $(objpfx)tst-initorder2: $(objpfx)tst-initorder2a.so $(objpfx)tst-initorder2d.so
+ $(objpfx)tst-initorder2a.so: $(objpfx)tst-initorder2b.so
+ $(objpfx)tst-initorder2b.so: $(objpfx)tst-initorder2c.so
+ $(objpfx)tst-initorder2c.so: $(objpfx)tst-initorder2d.so
++LDFLAGS-tst-initorder2 = $(no-as-needed)
++LDFLAGS-tst-initorder2a.so = $(no-as-needed)
++LDFLAGS-tst-initorder2b.so = $(no-as-needed)
++LDFLAGS-tst-initorder2c.so = $(no-as-needed)
+ define o-iterator-doit
+ $(objpfx)tst-initorder2$o.os: tst-initorder2.c; \
+ $$(compile-command.c) -DNAME=\"$o\"
+diff --git a/nptl/Makefile b/nptl/Makefile
+index 09acd8a..07a1022 100644
+--- a/nptl/Makefile
++++ b/nptl/Makefile
+@@ -458,6 +458,7 @@ $(objpfx)tst-tls4: $(libdl) $(shared-thread-library)
+ $(objpfx)tst-tls4.out: $(objpfx)tst-tls4moda.so $(objpfx)tst-tls4modb.so
+
+ $(objpfx)tst-tls5: $(objpfx)tst-tls5mod.so $(shared-thread-library)
++LDFLAGS-tst-tls5 = $(no-as-needed)
+ LDFLAGS-tst-tls5mod.so = -Wl,-soname,tst-tls5mod.so
+
+ ifeq ($(build-shared),yes)
+@@ -503,7 +504,7 @@ $(objpfx)tst-clock2: $(common-objpfx)rt/librt.a
+ $(objpfx)tst-rwlock14: $(common-objpfx)rt/librt.a
+ endif
+
+-LDFLAGS-tst-cancel24 = -lstdc++
++LDFLAGS-tst-cancel24 = $(no-as-needed) -lstdc++
+
+ extra-B-pthread.so = -B$(common-objpfx)nptl/
+ $(objpfx)libpthread.so: $(addprefix $(objpfx),$(crti-objs) $(crtn-objs))
+diff --git a/stdlib/Makefile b/stdlib/Makefile
+index 44eb20d..f7811c5 100644
+--- a/stdlib/Makefile
++++ b/stdlib/Makefile
+@@ -138,6 +138,7 @@ $(objpfx)tst-fmtmsg.out: tst-fmtmsg.sh $(objpfx)tst-fmtmsg
+ $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)stdlib/
+
+ $(objpfx)tst-putenv: $(objpfx)tst-putenvmod.so
++LDFLAGS-tst-putenv = $(no-as-needed)
+
+ $(objpfx)tst-putenvmod.so: $(objpfx)tst-putenvmod.os
+ $(build-module)
+--
+1.7.3.4
+
diff --git a/staging/glibc/glibc-2.15-vdso.patch b/staging/glibc/glibc-2.15-vdso.patch
new file mode 100644
index 000000000..7fd394f90
--- /dev/null
+++ b/staging/glibc/glibc-2.15-vdso.patch
@@ -0,0 +1,40 @@
+diff --git a/elf/Makefile b/elf/Makefile
+index 8234ba7..25ffc57 100644
+--- a/elf/Makefile
++++ b/elf/Makefile
+@@ -1203,3 +1203,14 @@ $(objpfx)tst-relsort1mod1.so: $(libm) $(objpfx)tst-relsort1mod2.so
+ $(objpfx)tst-relsort1mod2.so: $(libm)
+ $(objpfx)tst-relsort1.out: $(objpfx)tst-relsort1mod1.so \
+ $(objpfx)tst-relsort1mod2.so
++
++tests: $(objpfx)tst-unused-dep.out
++
++$(objpfx)tst-unused-dep.out: $(objpfx)testobj1.so
++ LD_TRACE_LOADED_OBJECTS=1 \
++ LD_DEBUG=unused \
++ LD_PRELOAD= \
++ $(elf-objpfx)${rtld-installed-name} \
++ --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \
++ $< > $@
++ cmp $@ /dev/null > /dev/null
+diff --git a/elf/rtld.c b/elf/rtld.c
+index 2e4f97f..3e15447 100644
+--- a/elf/rtld.c
++++ b/elf/rtld.c
+@@ -1,5 +1,5 @@
+ /* Run time dynamic linker.
+- Copyright (C) 1995-2010, 2011 Free Software Foundation, Inc.
++ Copyright (C) 1995-2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+@@ -1375,6 +1375,9 @@ of this helper program; chances are you did not intend to run this program.\n\
+ _dl_setup_hash (l);
+ l->l_relocated = 1;
+
++ /* The vDSO is always used. */
++ l->l_used = 1;
++
+ /* Initialize l_local_scope to contain just this map. This allows
+ the use of dl_lookup_symbol_x to resolve symbols within the vdso.
+ So we create a single entry list pointing to l_real as its only
diff --git a/staging/glibc/glibc-2.15-vfprintf-nargs.patch b/staging/glibc/glibc-2.15-vfprintf-nargs.patch
new file mode 100644
index 000000000..f8dde53f5
--- /dev/null
+++ b/staging/glibc/glibc-2.15-vfprintf-nargs.patch
@@ -0,0 +1,180 @@
+diff --git a/stdio-common/Makefile b/stdio-common/Makefile
+index a847b28..080badc 100644
+--- a/stdio-common/Makefile
++++ b/stdio-common/Makefile
+@@ -59,7 +59,8 @@ tests := tstscanf test_rdwr test-popen tstgetln test-fseek \
+ tst-popen tst-unlockedio tst-fmemopen2 tst-put-error tst-fgets \
+ tst-fwrite bug16 bug17 tst-swscanf tst-sprintf2 bug18 bug18a \
+ bug19 bug19a tst-popen2 scanf13 scanf14 scanf15 bug20 bug21 bug22 \
+- scanf16 scanf17 tst-setvbuf1 tst-grouping bug23 bug24
++ scanf16 scanf17 tst-setvbuf1 tst-grouping bug23 bug24 \
++ bug-vfprintf-nargs
+
+ test-srcs = tst-unbputc tst-printf
+
+diff --git a/stdio-common/bug-vfprintf-nargs.c b/stdio-common/bug-vfprintf-nargs.c
+new file mode 100644
+index 0000000..13c66c0
+--- /dev/null
++++ b/stdio-common/bug-vfprintf-nargs.c
+@@ -0,0 +1,78 @@
++/* Test for vfprintf nargs allocation overflow (BZ #13656).
++ Copyright (C) 2012 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++ Contributed by Kees Cook <keescook@chromium.org>, 2012.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <stdint.h>
++#include <unistd.h>
++#include <inttypes.h>
++#include <string.h>
++#include <signal.h>
++
++static int
++format_failed (const char *fmt, const char *expected)
++{
++ char output[80];
++
++ printf ("%s : ", fmt);
++
++ memset (output, 0, sizeof output);
++ /* Having sprintf itself detect a failure is good. */
++ if (sprintf (output, fmt, 1, 2, 3, "test") > 0
++ && strcmp (output, expected) != 0)
++ {
++ printf ("FAIL (output '%s' != expected '%s')\n", output, expected);
++ return 1;
++ }
++ puts ("ok");
++ return 0;
++}
++
++static int
++do_test (void)
++{
++ int rc = 0;
++ char buf[64];
++
++ /* Regular positionals work. */
++ if (format_failed ("%1$d", "1") != 0)
++ rc = 1;
++
++ /* Regular width positionals work. */
++ if (format_failed ("%1$*2$d", " 1") != 0)
++ rc = 1;
++
++ /* Positional arguments are constructed via read_int, so nargs can only
++ overflow on 32-bit systems. On 64-bit systems, it will attempt to
++ allocate a giant amount of memory and possibly crash, which is the
++ expected situation. Since the 64-bit behavior is arch-specific, only
++ test this on 32-bit systems. */
++ if (sizeof (long int) == 4)
++ {
++ sprintf (buf, "%%1$d %%%" PRIdPTR "$d", UINT32_MAX / sizeof (int));
++ if (format_failed (buf, "1 %$d") != 0)
++ rc = 1;
++ }
++
++ return rc;
++}
++
++#define TEST_FUNCTION do_test ()
++#include "../test-skeleton.c"
+diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c
+index 863cd5d..c802e46 100644
+--- a/stdio-common/vfprintf.c
++++ b/stdio-common/vfprintf.c
+@@ -235,6 +235,9 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
+ 0 if unknown. */
+ int readonly_format = 0;
+
++ /* For the argument descriptions, which may be allocated on the heap. */
++ void *args_malloced = NULL;
++
+ /* This table maps a character into a number representing a
+ class. In each step there is a destination label for each
+ class. */
+@@ -1647,9 +1650,10 @@ do_positional:
+ determine the size of the array needed to store the argument
+ attributes. */
+ size_t nargs = 0;
+- int *args_type;
+- union printf_arg *args_value = NULL;
++ size_t bytes_per_arg;
++ union printf_arg *args_value;
+ int *args_size;
++ int *args_type;
+
+ /* Positional parameters refer to arguments directly. This could
+ also determine the maximum number of arguments. Track the
+@@ -1698,13 +1702,38 @@ do_positional:
+
+ /* Determine the number of arguments the format string consumes. */
+ nargs = MAX (nargs, max_ref_arg);
++ /* Calculate total size needed to represent a single argument across
++ all three argument-related arrays. */
++ bytes_per_arg = sizeof (*args_value) + sizeof (*args_size)
++ + sizeof (*args_type);
++
++ /* Check for potential integer overflow. */
++ if (__builtin_expect (nargs > SIZE_MAX / bytes_per_arg, 0))
++ {
++ __set_errno (ERANGE);
++ done = -1;
++ goto all_done;
++ }
+
+- /* Allocate memory for the argument descriptions. */
+- args_type = alloca (nargs * sizeof (int));
++ /* Allocate memory for all three argument arrays. */
++ if (__libc_use_alloca (nargs * bytes_per_arg))
++ args_value = alloca (nargs * bytes_per_arg);
++ else
++ {
++ args_value = args_malloced = malloc (nargs * bytes_per_arg);
++ if (args_value == NULL)
++ {
++ done = -1;
++ goto all_done;
++ }
++ }
++
++ /* Set up the remaining two arrays to each point past the end of the
++ prior array, since space for all three has been allocated now. */
++ args_size = &args_value[nargs].pa_int;
++ args_type = &args_size[nargs];
+ memset (args_type, s->_flags2 & _IO_FLAGS2_FORTIFY ? '\xff' : '\0',
+- nargs * sizeof (int));
+- args_value = alloca (nargs * sizeof (union printf_arg));
+- args_size = alloca (nargs * sizeof (int));
++ nargs * sizeof (*args_type));
+
+ /* XXX Could do sanity check here: If any element in ARGS_TYPE is
+ still zero after this loop, format is invalid. For now we
+@@ -1973,8 +2002,8 @@ do_positional:
+ }
+
+ all_done:
+- if (__builtin_expect (workstart != NULL, 0))
+- free (workstart);
++ free (args_malloced);
++ free (workstart);
+ /* Unlock the stream. */
+ _IO_funlockfile (s);
+ _IO_cleanup_region_end (0);
diff --git a/staging/glibc/glibc-__i686.patch b/staging/glibc/glibc-__i686.patch
new file mode 100644
index 000000000..16f84c536
--- /dev/null
+++ b/staging/glibc/glibc-__i686.patch
@@ -0,0 +1,31 @@
+diff --git a/nptl/sysdeps/pthread/pt-initfini.c b/nptl/sysdeps/pthread/pt-initfini.c
+index 9c00dc0..f5d4df8 100644
+--- a/nptl/sysdeps/pthread/pt-initfini.c
++++ b/nptl/sysdeps/pthread/pt-initfini.c
+@@ -45,6 +45,11 @@
+ /* Embed an #include to pull in the alignment and .end directives. */
+ asm ("\n#include \"defs.h\"");
+
++asm ("\n#if defined __i686 && defined __ASSEMBLER__");
++asm ("\n#undef __i686");
++asm ("\n#define __i686 __i686");
++asm ("\n#endif");
++
+ /* The initial common code ends here. */
+ asm ("\n/*@HEADER_ENDS*/");
+
+diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h
+index 64ef400..726b1df 100644
+--- a/sysdeps/unix/sysv/linux/i386/sysdep.h
++++ b/sysdeps/unix/sysv/linux/i386/sysdep.h
+@@ -29,6 +29,10 @@
+ #include <dl-sysdep.h>
+ #include <tls.h>
+
++#if defined __i686 && defined __ASSEMBLER__
++#undef __i686
++#define __i686 __i686
++#endif
+
+ /* For Linux we can use the system call table in the header file
+ /usr/include/asm/unistd.h
diff --git a/staging/glibc/glibc.install b/staging/glibc/glibc.install
new file mode 100644
index 000000000..7f85ade96
--- /dev/null
+++ b/staging/glibc/glibc.install
@@ -0,0 +1,20 @@
+infodir=usr/share/info
+filelist=(libc.info{,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11})
+
+post_upgrade() {
+ sbin/ldconfig -r .
+ [ -x sbin/init ] && sbin/init u
+ usr/sbin/locale-gen
+
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ usr/bin/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
+ usr/bin/install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
+}
diff --git a/staging/glibc/locale-gen b/staging/glibc/locale-gen
new file mode 100755
index 000000000..5aff344c4
--- /dev/null
+++ b/staging/glibc/locale-gen
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+set -e
+
+LOCALEGEN=/etc/locale.gen
+LOCALES=/usr/share/i18n/locales
+if [ -n "$POSIXLY_CORRECT" ]; then
+ unset POSIXLY_CORRECT
+fi
+
+
+[ -f $LOCALEGEN -a -s $LOCALEGEN ] || exit 0;
+
+# Remove all old locale dir and locale-archive before generating new
+# locale data.
+rm -rf /usr/lib/locale/* || true
+
+umask 022
+
+is_entry_ok() {
+ if [ -n "$locale" -a -n "$charset" ] ; then
+ true
+ else
+ echo "error: Bad entry '$locale $charset'"
+ false
+ fi
+}
+
+echo "Generating locales..."
+while read locale charset; do \
+ case $locale in \#*) continue;; "") continue;; esac; \
+ is_entry_ok || continue
+ echo -n " `echo $locale | sed 's/\([^.\@]*\).*/\1/'`"; \
+ echo -n ".$charset"; \
+ echo -n `echo $locale | sed 's/\([^\@]*\)\(\@.*\)*/\2/'`; \
+ echo -n '...'; \
+ if [ -f $LOCALES/$locale ]; then input=$locale; else \
+ input=`echo $locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; fi; \
+ localedef -i $input -c -f $charset -A /usr/share/locale/locale.alias $locale; \
+ echo ' done'; \
+done < $LOCALEGEN
+echo "Generation complete."
diff --git a/staging/glibc/locale.gen.txt b/staging/glibc/locale.gen.txt
new file mode 100644
index 000000000..ccdd81734
--- /dev/null
+++ b/staging/glibc/locale.gen.txt
@@ -0,0 +1,23 @@
+# Configuration file for locale-gen
+#
+# lists of locales that are to be generated by the locale-gen command.
+#
+# Each line is of the form:
+#
+# <locale> <charset>
+#
+# where <locale> is one of the locales given in /usr/share/i18n/locales
+# and <charset> is one of the character sets listed in /usr/share/i18n/charmaps
+#
+# Examples:
+# en_US ISO-8859-1
+# en_US.UTF-8 UTF-8
+# de_DE ISO-8859-1
+# de_DE@euro ISO-8859-15
+#
+# The locale-gen command will generate all the locales,
+# placing them in /usr/lib/locale.
+#
+# A list of supported locales is included in this file.
+# Uncomment the ones you need.
+#
diff --git a/staging/glibc/nscd.rcd b/staging/glibc/nscd.rcd
new file mode 100755
index 000000000..4b48ab002
--- /dev/null
+++ b/staging/glibc/nscd.rcd
@@ -0,0 +1,65 @@
+#!/bin/bash
+
+daemon_name="nscd"
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+
+get_pid() {
+ pidof -o %PPID $daemon_name
+}
+
+case "$1" in
+ start)
+ stat_busy "Starting $daemon_name daemon"
+ PID=$(get_pid)
+ if [[ -z $PID ]]; then
+ rm -f /run/$daemon_name.pid
+ mkdir -p /run/nscd /var/db/nscd
+ rm -f /run/nscd/* /var/db/nscd/*
+ $daemon_name
+ if (( $? > 0 )); then
+ stat_fail
+ exit 1
+ else
+ echo $(get_pid) > /var/run/$daemon_name.pid
+ add_daemon $daemon_name
+ stat_done
+ fi
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+
+ stop)
+ stat_busy "Stopping $daemon_name daemon"
+ PID=$(get_pid)
+ [[ -n $PID ]] && nscd --shutdown &> /dev/null
+ if (( $? > 0 )); then
+ stat_fail
+ exit 1
+ else
+ rm -f /run/$daemon_name.pid &> /dev/null
+ rm_daemon $daemon_name
+ stat_done
+ fi
+ ;;
+
+ restart)
+ $0 stop
+ sleep 3
+ $0 start
+ ;;
+
+ status)
+ stat_busy "Checking $daemon_name status";
+ ck_status $daemon_name
+ ;;
+
+ *)
+ echo "usage: $0 {start|stop|restart|status}"
+esac
+
+exit 0
diff --git a/staging/glibc/nscd.service b/staging/glibc/nscd.service
new file mode 100644
index 000000000..de5315e9b
--- /dev/null
+++ b/staging/glibc/nscd.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=Name Service Cache Daemon
+After=syslog.target
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/nscd
+ExecStop=/usr/sbin/nscd --shutdown
+ExecReload=/usr/sbin/nscd -i passwd
+ExecReload=/usr/sbin/nscd -i group
+ExecReload=/usr/sbin/nscd -i hosts
+ExecReload=/usr/sbin/nscd -i service
+Restart=always
+PIDFile=/run/nscd/nscd.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/staging/glibc/nscd.tmpfiles b/staging/glibc/nscd.tmpfiles
new file mode 100644
index 000000000..8a24a785e
--- /dev/null
+++ b/staging/glibc/nscd.tmpfiles
@@ -0,0 +1 @@
+d /run/nscd 0755 root root
diff --git a/staging/gpsd/PKGBUILD b/staging/gpsd/PKGBUILD
new file mode 100644
index 000000000..0bdb7e748
--- /dev/null
+++ b/staging/gpsd/PKGBUILD
@@ -0,0 +1,83 @@
+# $Id: PKGBUILD 161333 2012-06-09 19:56:32Z tomegun $
+# Maintainer: Tom Gundersen <teg@jklm.no>
+# Contributor: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Giacomo Rizzo <alt@free-os.it>
+
+pkgname=gpsd
+pkgver=3.6
+pkgrel=1
+pkgdesc="GPS daemon and library to support USB/serial GPS devices"
+arch=('i686' 'x86_64')
+url="http://catb.org/gpsd/"
+license=('BSD')
+depends=('python2' 'libusb' 'bluez' 'desktop-file-utils')
+optdepends=('php: generate a PHP status page for your GPS'
+ 'php-gd: image support for the PHP status page'
+ 'pygtk: GUI frontends')
+makedepends=('scons' 'docbook-xsl' 'chrpath')
+backup=('etc/conf.d/gpsd')
+options=('!libtool')
+install="${pkgname}.install"
+source=("http://download.savannah.gnu.org/releases/${pkgname}/${pkgname}-${pkgver}.tar.gz"{,.sig}
+ 'gpsd' 'gpsd.conf.d')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ # fix python 2.7 path
+ sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
+ -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
+ $(find . -name '*.py')
+ sed -i 's|/usr/bin/env python|/usr/bin/env python2|' gegps \
+ gpscat gpsfake gpsprof xgps xgpsspeed
+
+ scons prefix=/usr \
+ systemd=yes \
+ libQgpsmm=no \
+ PYTHONPATH=/usr/bin/python2
+ scons build
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ # Fix man pages path (FS#21715)
+ sed -i 's|.so gps.1|.so man1/gps.1|' cgps.1 lcdgps.1 xgps.1 xgpsspeed.1
+
+ export DESTDIR="${pkgdir}"
+ scons install
+
+ install -D -m644 "${srcdir}/gpsd.conf.d" "${pkgdir}/etc/conf.d/gpsd"
+
+ sed -i 's|/lib/udev/gpsd|/usr/lib/udev/gpsd|' gpsd.rules
+
+ install -D -m644 "gpsd.rules" "${pkgdir}/usr/lib/udev/rules.d/99-gpsd-usb.rules"
+
+ sed -i 's|/etc/default/gpsd|/etc/conf.d/gpsd|' gpsd.hotplug
+ install -D -m755 gpsd.hotplug "${pkgdir}/usr/lib/udev/gpsd.hotplug"
+
+ # GPSD needs RPATH
+ chrpath -r /usr/lib/ "${pkgdir}"/usr/lib/libgps{,d}.so.20.0.0
+ chrpath -r /usr/lib/ "${pkgdir}"/usr/bin/{gpsdecode,gpsctl,gpspipe,gpxlogger,lcdgps}
+ chrpath -r /usr/lib/ "${pkgdir}"/usr/sbin/{gpsd,gpsdctl}
+ chrpath -r /usr/lib/ "${pkgdir}"/usr/lib/python2.7/site-packages/gps/{clienthelpers,packet}.so
+
+ install -D -m644 packaging/X11/xgps.desktop \
+ "${pkgdir}/usr/share/applications/xgps.desktop"
+ install -D -m644 packaging/X11/xgpsspeed.desktop \
+ "${pkgdir}/usr/share/applications/xgpsspeed.desktop"
+ install -D -m644 packaging/X11/gpsd-logo.png \
+ "${pkgdir}/usr/share/gpsd/gpsd-logo.png"
+
+ install -D -m755 "${srcdir}/gpsd" "${pkgdir}/etc/rc.d/gpsd"
+
+ install -D -m644 systemd/gpsd.service "${pkgdir}/usr/lib/systemd/system/gpsd.service"
+ install -D -m644 systemd/gpsd.socket "${pkgdir}/usr/lib/systemd/system/gpsd.socket"
+
+ install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
+md5sums=('064a5ad75593f8c3ea3fe85010647832'
+ '6473da46f6bad52d38f88670f84cd92b'
+ '6602d04bb037bc500424f00f24f58837'
+ '3e963df3f9f7ef3572ecc648ae829315')
diff --git a/staging/gpsd/gpsd b/staging/gpsd/gpsd
new file mode 100755
index 000000000..2ca7efe26
--- /dev/null
+++ b/staging/gpsd/gpsd
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+[ -f /etc/conf.d/gpsd ] && . /etc/conf.d/gpsd
+
+NAME=gpsd
+DAEMON=/usr/sbin/gpsd
+PIDFILE=/run/gpsd.pid
+PID=$(cat $PIDFILE 2>/dev/null)
+
+case "$1" in
+ start)
+ stat_busy "Starting gpsd"
+ [ -z "$PID" ] && "$DAEMON" -P $PIDFILE -F /run/gpsd.sock ${GPSD_OPTIONS} ${DEVICES}
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon $NAME
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping $NAME"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm -f $PIDFILE &>/dev/null
+ rm_daemon $NAME
+ stat_done
+ fi
+ ;;
+
+ restart)
+ $0 stop
+ sleep 2
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/staging/gpsd/gpsd.conf.d b/staging/gpsd/gpsd.conf.d
new file mode 100644
index 000000000..9fef72cb9
--- /dev/null
+++ b/staging/gpsd/gpsd.conf.d
@@ -0,0 +1,5 @@
+# Default settings for gpsd.
+START_DAEMON="true"
+GPSD_OPTIONS=""
+DEVICES=""
+USBAUTO="true"
diff --git a/staging/gpsd/gpsd.install b/staging/gpsd/gpsd.install
new file mode 100644
index 000000000..8f20cf484
--- /dev/null
+++ b/staging/gpsd/gpsd.install
@@ -0,0 +1,11 @@
+post_install() {
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ update-desktop-database -q
+}
+
+post_remove() {
+ update-desktop-database -q
+}
diff --git a/staging/ntp/PKGBUILD b/staging/ntp/PKGBUILD
new file mode 100644
index 000000000..b758ce06d
--- /dev/null
+++ b/staging/ntp/PKGBUILD
@@ -0,0 +1,64 @@
+# $Id: PKGBUILD 161303 2012-06-09 05:27:03Z bisson $
+# Maintainer: Gaetan Bisson <bisson@archlinux.org>
+# Contributor: kevin <kevin@archlinux.org>
+
+pkgname=ntp
+pkgver=4.2.6.p5
+_realver=4.2.6p5
+pkgrel=7
+pkgdesc='Network Time Protocol reference implementation'
+url='http://www.ntp.org/'
+license=('custom')
+arch=('i686' 'x86_64')
+makedepends=('perl-html-parser')
+depends=('openssl' 'readline' 'libcap')
+backup=('etc/ntp.conf' 'etc/conf.d/ntpd.conf')
+source=("http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${_realver}.tar.gz"
+ 'ntpd'
+ 'ntpdate'
+ 'ntp.conf'
+ 'ntpd.conf'
+ 'logrotate.d'
+ 'ntpd.service')
+sha1sums=('4a5353a4791b6f4315a66c28d504ec6c7926b192'
+ '4e324e625c1f080b5c028be5092aa71adbf9bd99'
+ '01394b8a952f5edc85d19df8335eeac3980320f4'
+ 'eb1f63814b9adbd3d518e880fa3b38c375f0fe91'
+ '4537d1f58b299d463db5048129cb264511474b0b'
+ '4f76f7f9ffc8315ff9924f793f272d4f6939b816'
+ '81df5c4d51cb69bc29363625ff49e2bd388d1fa9')
+
+install=install
+
+build() {
+ cd "${srcdir}/${pkgname}-${_realver}"
+
+ ./configure \
+ --prefix=/usr \
+ --mandir=/usr/share/man \
+ --enable-linuxcaps \
+
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-$_realver"
+
+ make DESTDIR="${pkgdir}" install
+
+ rmdir "${pkgdir}"/usr/{lib,sbin}
+ install -d -o 87 "${pkgdir}"/var/lib/ntp
+ install -Dm755 ../ntpd "${pkgdir}"/etc/rc.d/ntpd
+ install -Dm755 ../ntpdate "${pkgdir}"/etc/rc.d/ntpdate
+ install -Dm644 ../ntp.conf "${pkgdir}"/etc/ntp.conf
+ install -Dm644 ../ntpd.conf "${pkgdir}"/etc/conf.d/ntpd.conf
+ install -Dm644 ../logrotate.d "${pkgdir}"/etc/logrotate.d/ntpd
+ install -Dm644 ../ntpd.service "${pkgdir}"/usr/lib/systemd/system/ntpd.service
+ install -Dm644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+ cd html
+ ../scripts/html2man
+ install -d "${pkgdir}"/usr/share/man
+ mv man/man* "${pkgdir}"/usr/share/man
+ mv "${pkgdir}/usr/share/man/man8/ntpd.8" "${pkgdir}/usr/share/man/man8/ntp-ntpd.8" # we should ditch openntpd
+}
diff --git a/staging/ntp/install b/staging/ntp/install
new file mode 100644
index 000000000..e6eddf8a4
--- /dev/null
+++ b/staging/ntp/install
@@ -0,0 +1,37 @@
+post_install() {
+ getent group ntp &>/dev/null || groupadd -g 87 ntp >/dev/null
+ getent passwd ntp &>/dev/null || useradd -u 87 -g ntp -d /var/lib/ntp -c 'Network Time Protocol' -s /bin/false ntp >/dev/null
+ true
+}
+
+post_upgrade() {
+ if [[ $(vercmp $2 4.2.6.p3) -le 0 ]]; then
+ cat <<EOF
+
+==> The file /etc/conf.d/ntp-client.conf has been renamed /etc/conf.d/ntpd.conf
+==> If you made changes to the former, please update the latter.
+
+EOF
+ fi
+ if [[ $(vercmp $2 4.2.6.p5-1) -le 0 ]]; then
+ cat <<EOF
+
+==> The PID file /var/run/ntpd.pid has been renamed /run/ntpd.pid
+==> and the new rc.d script only takes the latter into account.
+==> To stop your old ntpd process, please kill it manually.
+
+EOF
+ fi
+ if [[ $(vercmp $2 4.2.6.p5-3) -le 0 ]]; then
+ post_install
+ fi
+ if [[ $(vercmp $2 4.2.6.p5-5) -le 0 ]]; then
+ chown -R ntp /var/lib/ntp
+ fi
+}
+
+post_remove() {
+ getent passwd ntp &>/dev/null && userdel ntp >/dev/null
+ getent group ntp &>/dev/null && groupdel ntp >/dev/null
+ true
+}
diff --git a/staging/ntp/logrotate.d b/staging/ntp/logrotate.d
new file mode 100644
index 000000000..8a9f066c3
--- /dev/null
+++ b/staging/ntp/logrotate.d
@@ -0,0 +1,4 @@
+/var/log/ntp.log {
+ missingok
+ copytruncate
+}
diff --git a/staging/ntp/ntp.conf b/staging/ntp/ntp.conf
new file mode 100644
index 000000000..a27b22820
--- /dev/null
+++ b/staging/ntp/ntp.conf
@@ -0,0 +1,23 @@
+# With the default settings below, ntpd will only synchronize your clock.
+#
+# For details, see:
+# - the ntp.conf man page
+# - http://support.ntp.org/bin/view/Support/GettingStarted
+# - https://wiki.archlinux.org/index.php/Network_Time_Protocol_daemon
+
+# Associate to public NTP pool servers; see http://www.pool.ntp.org/
+server 0.pool.ntp.org
+server 1.pool.ntp.org
+server 2.pool.ntp.org
+
+# Only allow read-only access from localhost
+restrict default noquery nopeer
+restrict 127.0.0.1
+restrict ::1
+
+# Location of drift and log files
+driftfile /var/lib/ntp/ntp.drift
+logfile /var/log/ntp.log
+
+# NOTE: If you run dhcpcd and have lines like 'restrict' and 'fudge' appearing
+# here, be sure to add '-Y -N' to the dhcpcd_ethX variables in /etc/conf.d/net
diff --git a/staging/ntp/ntpd b/staging/ntp/ntpd
new file mode 100755
index 000000000..480fa1088
--- /dev/null
+++ b/staging/ntp/ntpd
@@ -0,0 +1,47 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/ntpd.conf
+
+unset PID
+PIDFILE='/run/ntpd.pid'
+
+if [[ -r ${PIDFILE} ]]; then
+ read -r PID <"${PIDFILE}"
+ if [[ -n ${PID} && ! -d /proc/${PID} ]]; then
+ rm -f "${PIDFILE}"
+ unset PID
+ fi
+fi
+
+case "$1" in
+ start)
+ stat_busy "Starting NTP Daemon"
+ if [[ -z ${PID} ]] && /usr/bin/ntpd ${NTPD_ARGS} -p "${PIDFILE}" &>/dev/null; then
+ add_daemon ntpd
+ stat_done
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping NTP Daemon"
+ if [[ -n ${PID} ]] && kill "${PID}" &>/dev/null; then
+ rm ${PIDFILE}
+ rm_daemon ntpd
+ stat_done
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
diff --git a/staging/ntp/ntpd.conf b/staging/ntp/ntpd.conf
new file mode 100644
index 000000000..047961fde
--- /dev/null
+++ b/staging/ntp/ntpd.conf
@@ -0,0 +1,5 @@
+# client options for "ntpd -q" - ntpdate equivalent
+NTP_CLIENT_OPTION="-g -u ntp"
+
+# arguments passed to ntpd when started
+NTPD_ARGS="-g -u ntp"
diff --git a/staging/ntp/ntpd.service b/staging/ntp/ntpd.service
new file mode 100644
index 000000000..e0cbf879e
--- /dev/null
+++ b/staging/ntp/ntpd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Network Time Service
+After=network.target
+
+[Service]
+Type=forking
+PIDFile=/run/ntpd.pid
+EnvironmentFile=/etc/conf.d/ntpd.conf
+ExecStart=/usr/bin/ntpd $NTPD_ARGS -p /run/ntpd.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/staging/ntp/ntpdate b/staging/ntp/ntpdate
new file mode 100755
index 000000000..a8e746785
--- /dev/null
+++ b/staging/ntp/ntpdate
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/ntpd.conf
+
+case "$1" in
+ start)
+ stat_busy "Starting NTP Client"
+ if /usr/bin/ntpd -q ${NTP_CLIENT_OPTION} &>/dev/null; then
+ add_daemon ntpdate
+ stat_done
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping NTP Client"
+ rm_daemon ntpdate
+ stat_done
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
diff --git a/staging/openssh/PKGBUILD b/staging/openssh/PKGBUILD
new file mode 100644
index 000000000..e921291d4
--- /dev/null
+++ b/staging/openssh/PKGBUILD
@@ -0,0 +1,96 @@
+# $Id: PKGBUILD 161305 2012-06-09 05:45:18Z bisson $
+# Maintainer: Gaetan Bisson <bisson@archlinux.org>
+# Contributor: Aaron Griffin <aaron@archlinux.org>
+# Contributor: judd <jvinet@zeroflux.org>
+
+pkgname=openssh
+pkgver=6.0p1
+pkgrel=3
+pkgdesc='Free version of the SSH connectivity tools'
+url='http://www.openssh.org/portable.html'
+license=('custom:BSD')
+arch=('i686' 'x86_64')
+depends=('krb5' 'openssl' 'libedit' 'ldns')
+optdepends=('xorg-xauth: X11 forwarding'
+ 'x11-ssh-askpass: input passphrase in X')
+source=("ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/${pkgname}-${pkgver}.tar.gz"
+ 'sshd.close-sessions'
+ 'sshdgenkeys.service'
+ 'sshd@.service'
+ 'sshd.service'
+ 'sshd.socket'
+ 'tmpfiles.d'
+ 'sshd.confd'
+ 'sshd.pam'
+ 'sshd')
+sha1sums=('f691e53ef83417031a2854b8b1b661c9c08e4422'
+ '954bf1660aa32620c37034320877f4511b767ccb'
+ '6c71de2c2ca9622aa8e863acd94b135555e11125'
+ 'bd6eae36c7ef9efb7147778baad7858b81f2d660'
+ '83a257b8f6a62237383262cb0e2583e5609ddac0'
+ 'a30fb5fda6d0143345bae47684edaffb8d0a92a7'
+ 'b5cf44205e8f4365c00bfbee110d7c0e563627aa'
+ 'ec102deb69cad7d14f406289d2fc11fee6eddbdd'
+ '659e3ee95c269014783ff8b318c6f50bf7496fbd'
+ 'ed36e3a522f619ff6b13e253526596e4cca11e9f')
+
+backup=('etc/ssh/ssh_config' 'etc/ssh/sshd_config' 'etc/pam.d/sshd' 'etc/conf.d/sshd')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ ./configure \
+ --prefix=/usr \
+ --libexecdir=/usr/lib/ssh \
+ --sysconfdir=/etc/ssh \
+ --with-ldns \
+ --with-libedit \
+ --with-ssl-engine \
+ --with-pam \
+ --with-privsep-user=nobody \
+ --with-kerberos5=/usr \
+ --with-xauth=/usr/bin/xauth \
+ --with-mantype=man \
+ --with-md5-passwords \
+ --with-pid-dir=/run \
+
+ make
+}
+
+check() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ # The connect.sh test must be run by a user with a decent login shell;
+ # chroot builds use nobody with /bin/false.
+ make tests || true
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+
+ rm "${pkgdir}"/usr/share/man/man1/slogin.1
+ ln -sf ssh.1.gz "${pkgdir}"/usr/share/man/man1/slogin.1.gz
+
+ install -Dm644 LICENCE "${pkgdir}/usr/share/licenses/${pkgname}/LICENCE"
+
+ install -Dm644 ../sshdgenkeys.service "${pkgdir}"/usr/lib/systemd/system/sshdgenkeys.service
+ install -Dm644 ../sshd@.service "${pkgdir}"/usr/lib/systemd/system/sshd@.service
+ install -Dm644 ../sshd.service "${pkgdir}"/usr/lib/systemd/system/sshd.service
+ install -Dm644 ../sshd.socket "${pkgdir}"/usr/lib/systemd/system/sshd.socket
+ install -Dm644 ../tmpfiles.d "${pkgdir}"/usr/lib/tmpfiles.d/openssh.conf
+
+ install -Dm755 ../sshd.close-sessions "${pkgdir}/etc/rc.d/functions.d/sshd-close-sessions" # FS#17389
+ install -Dm644 ../sshd.confd "${pkgdir}"/etc/conf.d/sshd
+ install -Dm644 ../sshd.pam "${pkgdir}"/etc/pam.d/sshd
+ install -Dm755 ../sshd "${pkgdir}"/etc/rc.d/sshd
+
+ install -Dm755 contrib/findssl.sh "${pkgdir}"/usr/bin/findssl.sh
+ install -Dm755 contrib/ssh-copy-id "${pkgdir}"/usr/bin/ssh-copy-id
+ install -Dm644 contrib/ssh-copy-id.1 "${pkgdir}"/usr/share/man/man1/ssh-copy-id.1
+
+ sed \
+ -e '/^#ChallengeResponseAuthentication yes$/c ChallengeResponseAuthentication no' \
+ -e '/^#UsePAM no$/c UsePAM yes' \
+ -i "${pkgdir}"/etc/ssh/sshd_config
+}
diff --git a/staging/openssh/sshd b/staging/openssh/sshd
new file mode 100755
index 000000000..4bf4780f5
--- /dev/null
+++ b/staging/openssh/sshd
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/sshd
+
+PIDFILE=/run/sshd.pid
+PID=$(cat $PIDFILE 2>/dev/null)
+if ! readlink -q /proc/$PID/exe | grep -q '^/usr/sbin/sshd'; then
+ PID=
+ rm $PIDFILE 2>/dev/null
+fi
+
+case "$1" in
+ start)
+ stat_busy 'Starting Secure Shell Daemon'
+ /usr/bin/ssh-keygen -A
+ [[ -d /var/empty ]] || mkdir -p /var/empty
+ [[ -z $PID ]] && /usr/sbin/sshd $SSHD_ARGS
+ if [[ $? -gt 0 ]]; then
+ stat_fail
+ else
+ add_daemon sshd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy 'Stopping Secure Shell Daemon'
+ [[ ! -z $PID ]] && kill $PID &> /dev/null
+ if [[ $? -gt 0 ]]; then
+ stat_fail
+ else
+ rm_daemon sshd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/staging/openssh/sshd.close-sessions b/staging/openssh/sshd.close-sessions
new file mode 100644
index 000000000..be2a709fc
--- /dev/null
+++ b/staging/openssh/sshd.close-sessions
@@ -0,0 +1,17 @@
+# Close sshd sessions before shutting down the network; see FS#17389.
+
+sshd_close_sessions () {
+ if ck_daemon sshd; then
+ return
+ fi
+ /etc/rc.d/sshd stop
+ stat_busy "Stopping Secure Shell Sessions"
+ for i in $(pgrep sshd); do
+ if readlink -q /proc/$i/exe | grep -q '^/usr/sbin/sshd'; then
+ kill $i
+ fi
+ done &>/dev/null
+ stat_done
+}
+
+add_hook shutdown_start sshd_close_sessions
diff --git a/staging/openssh/sshd.confd b/staging/openssh/sshd.confd
new file mode 100644
index 000000000..5ce7c0079
--- /dev/null
+++ b/staging/openssh/sshd.confd
@@ -0,0 +1,4 @@
+#
+# Parameters to be passed to sshd
+#
+SSHD_ARGS=""
diff --git a/staging/openssh/sshd.pam b/staging/openssh/sshd.pam
new file mode 100644
index 000000000..aeef8be27
--- /dev/null
+++ b/staging/openssh/sshd.pam
@@ -0,0 +1,13 @@
+#%PAM-1.0
+#auth required pam_securetty.so #Disable remote root
+auth required pam_unix.so
+auth required pam_env.so
+account required pam_nologin.so
+account required pam_unix.so
+account required pam_time.so
+password required pam_unix.so
+session required pam_unix_session.so
+session required pam_limits.so
+session optional pam_loginuid.so
+-session optional pam_ck_connector.so nox11
+-session optional pam_systemd.so
diff --git a/staging/openssh/sshd.service b/staging/openssh/sshd.service
new file mode 100644
index 000000000..7c8f88372
--- /dev/null
+++ b/staging/openssh/sshd.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=OpenSSH Daemon
+After=sshdgenkeys.service
+
+[Service]
+ExecStart=/usr/sbin/sshd -D
+ExecReload=/bin/kill -HUP $MAINPID
+KillMode=process
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
+Also=sshdgenkeys.service
+
+# Note that this is the service file for running a single SSH server for all
+# incoming connections, suitable only for systems with a large amount of SSH
+# traffic. In almost all other cases it is a better idea to use sshd.socket +
+# sshd@.service (i.e. the on-demand spawning version for one instance per
+# connection).
diff --git a/staging/openssh/sshd.socket b/staging/openssh/sshd.socket
new file mode 100644
index 000000000..6a67bfe86
--- /dev/null
+++ b/staging/openssh/sshd.socket
@@ -0,0 +1,10 @@
+[Unit]
+Conflicts=sshd.service
+
+[Socket]
+ListenStream=22
+Accept=yes
+
+[Install]
+WantedBy=sockets.target
+Also=sshdgenkeys.service
diff --git a/staging/openssh/sshdgenkeys.service b/staging/openssh/sshdgenkeys.service
new file mode 100644
index 000000000..47c1c3fd6
--- /dev/null
+++ b/staging/openssh/sshdgenkeys.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=SSH Key Generation
+ConditionPathExists=|!/etc/ssh/ssh_host_key
+ConditionPathExists=|!/etc/ssh/ssh_host_key.pub
+ConditionPathExists=|!/etc/ssh/ssh_host_ecdsa_key
+ConditionPathExists=|!/etc/ssh/ssh_host_ecdsa_key.pub
+ConditionPathExists=|!/etc/ssh/ssh_host_dsa_key
+ConditionPathExists=|!/etc/ssh/ssh_host_dsa_key.pub
+ConditionPathExists=|!/etc/ssh/ssh_host_rsa_key
+ConditionPathExists=|!/etc/ssh/ssh_host_rsa_key.pub
+
+[Service]
+ExecStart=/usr/bin/ssh-keygen -A
+Type=oneshot
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/staging/openssh/tmpfiles.d b/staging/openssh/tmpfiles.d
new file mode 100644
index 000000000..7c5b26100
--- /dev/null
+++ b/staging/openssh/tmpfiles.d
@@ -0,0 +1 @@
+d /var/empty 0755 root root -
diff --git a/staging/squid/PKGBUILD b/staging/squid/PKGBUILD
new file mode 100644
index 000000000..0741b7bb7
--- /dev/null
+++ b/staging/squid/PKGBUILD
@@ -0,0 +1,94 @@
+# $Id: PKGBUILD 161335 2012-06-09 22:30:45Z dreisner $
+# Maintainer: Kevin Piche <kevin@archlinux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+
+pkgname=squid
+pkgver=3.1.20
+pkgrel=2
+pkgdesc="A full-featured Web proxy cache server."
+arch=('i686' 'x86_64')
+url="http://www.squid-cache.org"
+depends=('openssl' 'pam' 'cron' 'perl' 'libltdl')
+makedepends=('libcap')
+license=('GPL')
+backup=('etc/squid/squid.conf'
+ 'etc/squid/mime.conf'
+ 'etc/conf.d/squid')
+install=squid.install
+source=("http://www.squid-cache.org/Versions/v3/3.1/$pkgname-$pkgver.tar.bz2"
+ 'squid'
+ 'squid.conf.d'
+ 'squid.pam'
+ 'squid.cron'
+ 'squid.service')
+md5sums=('c4d733a383c0508fd0746d64a2d7278a'
+ '02f7b5bd793f778e40834fd6457d2199'
+ '2383772ef94efddc7b920628bc7ac5b0'
+ '270977cdd9b47ef44c0c427ab9034777'
+ 'b499c2b725aefd7bd60bec2f1a9de392'
+ '20e00e1aa1198786795f3da32db3c1d8')
+
+build() {
+ cd "$pkgname-$pkgver"
+
+ # gcc 4.6 doesn't support -fhuge-objects.
+ sed '/^ HUGE_OBJECT_FLAG=/ s/"-fhuge-objects"//' -i configure
+
+ # fix cache_dir, cache_dir size, and effective group.
+ sed '/^DEFAULT_SWAP_DIR/ s@/cache@/cache/squid@' -i src/Makefile.in
+ sed '/^#cache_dir/ s/100/256/
+ /^NAME: cache_effective_group/ {n;n;s/none/proxy/}' -i src/cf.data.pre
+
+ ./configure \
+ --prefix=/usr \
+ --datadir=/usr/share/squid \
+ --sysconfdir=/etc/squid \
+ --libexecdir=/usr/lib/squid \
+ --localstatedir=/var \
+ --with-logdir=/var/log/squid \
+ --with-pidfile=/run/squid.pid \
+ --enable-auth="basic,digest,ntlm" \
+ --enable-removal-policies="lru,heap" \
+ --enable-digest-auth-helpers="password" \
+ --enable-storeio="aufs,ufs,diskd" \
+ --enable-basic-auth-helpers="getpwnam,YP,NCSA,SMB,MSNT,PAM,multi-domain-NTLM" \
+ --enable-external-acl-helpers="ip_user,unix_group,wbinfo_group" \
+ --enable-ntlm-auth-helpers="smb_lm,fakeauth,no_check" \
+ --enable-delay-pools \
+ --enable-arp-acl \
+ --enable-ssl \
+ --enable-snmp \
+ --enable-linux-netfilter \
+ --enable-ident-lookups \
+ --enable-useragent-log \
+ --enable-cache-digests \
+ --enable-referer-log \
+ --enable-arp-acl \
+ --enable-htcp \
+ --enable-carp \
+ --enable-epoll \
+ --with-filedescriptors=4096 \
+ --with-large-files \
+ --enable-arp-acl \
+ --with-default-user=proxy \
+ --enable-async-io \
+ --enable-truncate
+
+ make
+}
+
+package() {
+ make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install
+
+ install -Dm755 "$srcdir"/squid "$pkgdir"/etc/rc.d/squid
+ install -Dm755 "$srcdir"/squid.cron "$pkgdir"/etc/cron.weekly/squid
+ install -Dm644 "$srcdir"/squid.conf.d "$pkgdir"/etc/conf.d/squid
+ install -Dm644 "$srcdir"/squid.pam "$pkgdir"/etc/pam.d/squid
+
+ install -Dm644 "$srcdir/squid.service" "$pkgdir/usr/lib/systemd/system/squid.service"
+
+ # random unneeded empty dir...
+ rmdir "$pkgdir/usr/include"
+}
+
+# vim: ts=2 sw=2 et ft=sh
diff --git a/staging/squid/squid b/staging/squid/squid
new file mode 100644
index 000000000..da5534427
--- /dev/null
+++ b/staging/squid/squid
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+# source application-specific settings
+[[ -f /etc/conf.d/squid ]] && . /etc/conf.d/squid
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+pidfile=/run/squid.pid
+{ read -r PID </run/squid.pid; } 2>/dev/null
+if [[ $pid && ! /proc/$pid/exe -ef /usr/sbin/squid ]]; then
+ rm /run/squid.pid
+fi
+
+case $1 in
+ start)
+ stat_busy "Starting squid"
+ if [[ $PID ]] || ! squid $SQUID_ARGS; then
+ stat_fail
+ else
+ add_daemon squid
+ stat_done
+ fi
+ ;;
+
+ stop)
+ stat_busy "Stopping squid"
+ if [[ -z $PID ]] || ! squid -k shutdown &>/dev/null; then
+ stat_fail
+ else
+ # squid takes forever to shutdown all its listening FDs
+ while [[ /proc/$PID/exe -ef /usr/sbin/squid ]]; do
+ stat_append "."
+ sleep 3
+ done
+ rm_daemon squid
+ stat_done
+ fi
+ ;;
+
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/staging/squid/squid.conf.d b/staging/squid/squid.conf.d
new file mode 100644
index 000000000..ea248b76c
--- /dev/null
+++ b/staging/squid/squid.conf.d
@@ -0,0 +1,4 @@
+#
+# Parameters to be passed to squid
+#
+SQUID_ARGS="-sYC"
diff --git a/staging/squid/squid.cron b/staging/squid/squid.cron
new file mode 100644
index 000000000..c78e51105
--- /dev/null
+++ b/staging/squid/squid.cron
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# exit without error if no pidfile exists
+{ read pid </run/squid.pid; } 2>/dev/null || exit 0
+
+# make sure found PID really is a squid process
+if [ /proc/$pid/exec -ef /usr/sbin/squid ]; then
+ /usr/sbin/squid -k rotate
+fi
diff --git a/staging/squid/squid.install b/staging/squid/squid.install
new file mode 100644
index 000000000..e7aa5ff68
--- /dev/null
+++ b/staging/squid/squid.install
@@ -0,0 +1,26 @@
+post_install() {
+ if [ -z "$(grep ^proxy: /etc/group)" ]; then
+ usr/sbin/groupadd -g 15 proxy &>/dev/null
+ fi
+
+ id proxy &>/dev/null || \
+ usr/sbin/useradd -u 15 -g proxy -d /var/empty proxy
+
+ chown proxy.proxy var/{cache,log}/squid
+
+# cat << EOF
+#Release notes: http://www.squid-cache.org/Versions/v3/3.1/RELEASENOTES.html
+#EOF
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ usr/sbin/userdel proxy &> /dev/null
+ if [ ! -z "$(grep ^proxy: /etc/group)" ]; then
+ usr/sbin/groupdel proxy &>/dev/null
+ fi
+}
+
diff --git a/staging/squid/squid.pam b/staging/squid/squid.pam
new file mode 100644
index 000000000..df8a8104f
--- /dev/null
+++ b/staging/squid/squid.pam
@@ -0,0 +1,4 @@
+#/etc/pam.d/squid
+#
+auth required pam_unix.so
+account required pam_unix.so
diff --git a/staging/squid/squid.service b/staging/squid/squid.service
new file mode 100644
index 000000000..9d41cc243
--- /dev/null
+++ b/staging/squid/squid.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Web Proxy Cache Server
+After=network.target
+
+[Service]
+Type=forking
+PIDFile=/run/squid.pid
+ExecStart=/usr/sbin/squid -sYC
+ExecStop=/usr/sbin/squid -k shutdown
+ExecReload=/usr/sbin/squid -k reconfigure
+
+[Install]
+WantedBy=multi-user.target
diff --git a/staging/yp-tools/PKGBUILD b/staging/yp-tools/PKGBUILD
new file mode 100644
index 000000000..8fde2326b
--- /dev/null
+++ b/staging/yp-tools/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 161337 2012-06-10 01:13:12Z tomegun $
+# Mantainer: Tom Gundersen <teg@jklm.no>
+# Contributor: Gaetan Bisson <bisson@archlinux.org>
+# Contributor: dorphell <dorphell@archlinux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+
+pkgname=yp-tools
+pkgver=2.12
+pkgrel=3
+pkgdesc='Linux NIS Tools'
+arch=('i686' 'x86_64')
+url='http://www.linux-nis.org/nis/yp-tools/'
+license=('GPL2')
+depends=('ypbind-mt')
+#source=("ftp://ftp.kernel.org/pub/linux/utils/net/NIS/$pkgname-$pkgver.tar.gz")
+source=("ftp://ftp.archlinux.org/other/${pkgname}/${pkgname}-${pkgver}.tar.bz2"
+ 'domainname.service')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+ install -D -m644 ../domainname.service "${pkgdir}/usr/lib/systemd/service/domainname.service"
+}
+md5sums=('ce1e06d86caa285fa8cd76fdf103f51e'
+ '8d354b76eb0df9a3b06637bfff87453b')
diff --git a/staging/yp-tools/domainname.service b/staging/yp-tools/domainname.service
new file mode 100644
index 000000000..035f767c8
--- /dev/null
+++ b/staging/yp-tools/domainname.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=NIS Domainname
+
+[Service]
+Type=oneshot
+EnvironmentFile=/etc/conf.d/nisdomainname
+ExecStart=/usr/bin/nisdomainname $NISDOMAINNAME
+RemainAfterExit=true
+
+[Install]
+WantedBy=multi-user.target
diff --git a/staging/ypbind-mt/PKGBUILD b/staging/ypbind-mt/PKGBUILD
new file mode 100644
index 000000000..267ab3c3e
--- /dev/null
+++ b/staging/ypbind-mt/PKGBUILD
@@ -0,0 +1,50 @@
+# $Id: PKGBUILD 161339 2012-06-10 01:25:30Z tomegun $
+# Maintainer: Tom Gundersen <teg@jklm.no>
+# Contributor: Gaetan Bisson <bisson@archlinux.org>
+# Contributor: judd <jvinet@zeroflux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+
+pkgname=ypbind-mt
+pkgver=1.33
+pkgrel=5
+pkgdesc='Linux NIS daemon'
+url='http://www.linux-nis.org/nis/ypbind-mt/'
+license=('GPL2')
+arch=('i686' 'x86_64')
+makedepends=('networkmanager')
+depends=('rpcbind' 'openslp' 'dbus-glib' 'yp-tools')
+backup=('etc/yp.conf' 'etc/conf.d/ypbind' 'etc/conf.d/nisdomainname')
+#source=("ftp://ftp.kernel.org/pub/linux/utils/net/NIS/${pkgname}-${pkgver}.tar.gz"
+source=("ftp://ftp.archlinux.org/other/${pkgname}/${pkgname}-${pkgver}.tar.bz2"
+ 'nisdomainname.conf'
+ 'ypbind.conf'
+ 'ypbind'
+ 'ypbind.service')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ ./configure \
+ --prefix=/usr \
+ --enable-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 -m644 ../nisdomainname.conf "${pkgdir}"/etc/conf.d/nisdomainname
+ install -D -m644 ../ypbind.service "${pkgdir}"/usr/lib/systemd/system/ypbind.service
+ install -d -m755 "${pkgdir}"/var/yp/binding
+}
+md5sums=('692f68ed0476762be4228ce543a5b791'
+ 'e83a85291ea2ee152a78f2c16b0b1185'
+ '229309a989abad27703ac2e6d07dc7ae'
+ '1f7a4c80414d580c9afb3a08267beed0'
+ '88a721095e334cd442f4649a151ba9be')
diff --git a/staging/ypbind-mt/nisdomainname.conf b/staging/ypbind-mt/nisdomainname.conf
new file mode 100644
index 000000000..bbbbf8fc7
--- /dev/null
+++ b/staging/ypbind-mt/nisdomainname.conf
@@ -0,0 +1,4 @@
+#
+# NIS domain to be set in /etc/rc.d/ypbind
+#
+NISDOMAINNAME=""
diff --git a/staging/ypbind-mt/ypbind b/staging/ypbind-mt/ypbind
new file mode 100755
index 000000000..6a5ef11e3
--- /dev/null
+++ b/staging/ypbind-mt/ypbind
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+. /etc/conf.d/ypbind
+. /etc/conf.d/nisdomainname
+
+name=ypbind
+PID=$(pidof -o %PPID /usr/sbin/ypbind)
+
+case "$1" in
+start)
+ stat_busy "Starting $name daemon"
+ [[ -n $NISDOMAINNAME ]] && /usr/bin/domainname "$NISDOMAINNAME" &>/dev/null
+ [[ -z "$PID" ]] && /usr/sbin/ypbind $YPBIND_ARGS &>/dev/null \
+ && { add_daemon $name; stat_done; } \
+ || { stat_fail; exit 1; }
+ ;;
+stop)
+ stat_busy "Stopping $name daemon"
+ [[ -n "$PID" ]] && kill $PID &>/dev/null \
+ && { rm_daemon $name; stat_done; } \
+ || { stat_fail; exit 1; }
+ ;;
+restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+*)
+ echo "usage: $0 {start|stop|restart}"
+ exit 1
+ ;;
+esac
diff --git a/staging/ypbind-mt/ypbind.conf b/staging/ypbind-mt/ypbind.conf
new file mode 100644
index 000000000..fd0ebd491
--- /dev/null
+++ b/staging/ypbind-mt/ypbind.conf
@@ -0,0 +1,4 @@
+#
+# Parameters to be passed to ypbind
+#
+YPBIND_ARGS=""
diff --git a/staging/ypbind-mt/ypbind.service b/staging/ypbind-mt/ypbind.service
new file mode 100644
index 000000000..c59231000
--- /dev/null
+++ b/staging/ypbind-mt/ypbind.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=YP Bind
+Requires=rpcbind.service domainname.service
+After=rpcbind.service domainname.service network.target
+Before=systemd-user-sessions.service
+
+[Service]
+Type=forking
+PIDFile=/run/ypbind.pid
+ExecStart=/usr/sbin/ypbind
+
+[Install]
+WantedBy=multi-user.target
diff --git a/testing/ethtool/PKGBUILD b/testing/ethtool/PKGBUILD
new file mode 100644
index 000000000..09ab12239
--- /dev/null
+++ b/testing/ethtool/PKGBUILD
@@ -0,0 +1,27 @@
+# $Id: PKGBUILD 161331 2012-06-09 18:33:39Z ibiru $
+# Maintainer : Ionut Biru <ibiru@archlinux.org>
+# Contributor: Paul Mattal <paul@archlinux.org>
+# Contributor: Martin Kemp <mdkemp@elys.com>
+
+pkgname=ethtool
+pkgver=3.4
+pkgrel=1
+epoch=1
+pkgdesc="Utility for controlling network drivers and hardware"
+arch=('i686' 'x86_64')
+url="http://www.kernel.org/pub/software/network/ethtool/"
+license=('GPL')
+depends=('glibc')
+source=(http://www.kernel.org/pub/software/network/$pkgname/$pkgname-$pkgver.tar.xz)
+md5sums=('cc4c4cf3ac086a53cd24f17d426f2b8f')
+
+build() {
+ cd $pkgname-$pkgver
+ ./configure --prefix=/usr --mandir=/usr/share/man
+ make
+}
+
+package() {
+ cd $pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
+}