summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--community-testing/gedit-plugins/PKGBUILD31
-rw-r--r--community-testing/gedit-plugins/gedit-plugins.install23
-rw-r--r--community-testing/shotwell/PKGBUILD8
-rw-r--r--community/autocutsel/PKGBUILD14
-rw-r--r--community/autocutsel/autocutsel.sh2
-rw-r--r--community/dev86/PKGBUILD35
-rw-r--r--community/medit/PKGBUILD11
-rw-r--r--community/medit/medit.install1
-rw-r--r--community/nemesis/PKGBUILD33
-rw-r--r--community/tellico/PKGBUILD6
-rw-r--r--community/vhba-module/PKGBUILD14
-rw-r--r--core/fakeroot/PKGBUILD11
-rw-r--r--core/mlocate/PKGBUILD14
-rw-r--r--core/ncurses/PKGBUILD6
-rw-r--r--core/sudo/PKGBUILD23
-rw-r--r--core/xz/PKGBUILD12
-rw-r--r--extra/dovecot/PKGBUILD8
-rw-r--r--extra/oxygen-gtk/PKGBUILD6
-rw-r--r--extra/qjackctl/PKGBUILD4
-rw-r--r--testing/bin86/PKGBUILD30
-rw-r--r--testing/bin86/bin86-0.16.17-x86_64-1.patch44
-rw-r--r--testing/coreutils/PKGBUILD69
-rw-r--r--testing/coreutils/coreutils-pam.patch428
-rw-r--r--testing/coreutils/coreutils-uname.patch173
-rw-r--r--testing/coreutils/coreutils.install21
-rw-r--r--testing/coreutils/su.pam9
-rw-r--r--testing/cups-pk-helper/PKGBUILD28
-rw-r--r--testing/gnome-control-center/PKGBUILD6
-rw-r--r--testing/less/PKGBUILD30
-rw-r--r--testing/less/zless9
-rw-r--r--testing/man-db/PKGBUILD6
-rw-r--r--testing/man-db/man-db.install6
-rw-r--r--testing/mdadm/PKGBUILD24
-rw-r--r--testing/mdadm/segfault-3.2.1.patch68
-rw-r--r--testing/mpd/PKGBUILD56
-rwxr-xr-xtesting/mpd/mpd36
-rw-r--r--testing/mpd/mpd.install18
-rw-r--r--testing/opencv/PKGBUILD78
-rw-r--r--testing/opencv/gcc46.patch10
-rw-r--r--testing/opencv/libpng-1.4.patch12
-rw-r--r--testing/opencv/nov4l1.patch25
-rw-r--r--testing/opencv/ptrcvcapture.patch17
-rw-r--r--testing/opencv/v4l-mmap.patch14
-rw-r--r--testing/python2/PKGBUILD90
-rw-r--r--testing/python2/python-2.7-db51.diff42
-rw-r--r--testing/python2/python-2.7.1-fix-decimal-in-turkish-locale.patch48
46 files changed, 1535 insertions, 124 deletions
diff --git a/community-testing/gedit-plugins/PKGBUILD b/community-testing/gedit-plugins/PKGBUILD
new file mode 100644
index 000000000..e03f6650a
--- /dev/null
+++ b/community-testing/gedit-plugins/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 44982 2011-04-13 22:04:45Z ibiru $
+#Maintainer: Ionut Biru <ibiru@archlinux.org>
+#Contributor: Hugo Doria <hugo@archlinux.org>
+#Contributor: Sergej Chodarev <sergejx@centrum.sk>
+#Contributor: zhuqin <zhuqin83@gmail.com>
+
+pkgname=gedit-plugins
+pkgver=3.0.1
+pkgrel=1
+pkgdesc="Set of plugins for gedit"
+arch=('i686' 'x86_64')
+license=('GPL')
+url="http://live.gnome.org/GeditPlugins"
+depends=('gedit' 'dbus-python')
+makedepends=('intltool' 'gnome-doc-utils')
+options=('!libtool' '!emptydirs')
+install=gedit-plugins.install
+source=(ftp://ftp.gnome.org/pub/gnome/sources/gedit-plugins/3.0/$pkgname-$pkgver.tar.bz2)
+sha256sums=('39599b743ad3ebb1320832a78f2e7bfcbeb32393e990298756be2405a92bc29f')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ ./configure --prefix=/usr --sysconfdir=/etc --with-plugins=all
+
+ make
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+ make DESTDIR=$pkgdir install
+}
diff --git a/community-testing/gedit-plugins/gedit-plugins.install b/community-testing/gedit-plugins/gedit-plugins.install
new file mode 100644
index 000000000..d5bcc00ae
--- /dev/null
+++ b/community-testing/gedit-plugins/gedit-plugins.install
@@ -0,0 +1,23 @@
+pkgname=gedit-plugins
+
+post_install() {
+ usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas
+}
+
+pre_upgrade() {
+ if [ -f usr/share/gconf/schemas/${pkgname}.schemas ]; then
+ usr/sbin/gconfpkg --uninstall ${pkgname}
+ fi
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+
+post_remove() {
+ post_install $1
+}
+
+
+# vim:set ts=2 sw=2 et:
diff --git a/community-testing/shotwell/PKGBUILD b/community-testing/shotwell/PKGBUILD
index e705a08d8..0d7632363 100644
--- a/community-testing/shotwell/PKGBUILD
+++ b/community-testing/shotwell/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 44464 2011-04-07 16:32:05Z spupykin $
+# $Id: PKGBUILD 44941 2011-04-13 08:58:03Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer : Ionut Biru <ibiru@archlinux.org>
# Contributor: Joeny Ang <ang(dot)joeny(at)gmail(dot)com>
pkgname=shotwell
-pkgver=0.9.1
-pkgrel=2
+pkgver=0.9.2
+pkgrel=1
pkgdesc="A digital photo organizer designed for the GNOME desktop environment"
arch=('i686' 'x86_64')
url="http://yorba.org/shotwell/"
@@ -15,7 +15,7 @@ depends=('gconf' 'libgee' 'libgphoto2' 'libunique' 'libwebkit' 'libgexiv2'
makedepends=('intltool' 'vala')
install=shotwell.install
source=(http://yorba.org/download/shotwell/0.9/${pkgname}-${pkgver}.tar.bz2)
-md5sums=('1a98d1da59424a67b310cc39e8ad3368')
+md5sums=('070e5792b450a1ada130f31da4829ac7')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
diff --git a/community/autocutsel/PKGBUILD b/community/autocutsel/PKGBUILD
index fd5e25b0c..6d0ea71be 100644
--- a/community/autocutsel/PKGBUILD
+++ b/community/autocutsel/PKGBUILD
@@ -1,16 +1,17 @@
-# $Id: PKGBUILD 19645 2010-06-26 12:32:35Z shusmann $
+# $Id: PKGBUILD 44972 2011-04-13 15:14:58Z shusmann $
# Contributor: Tom Killian <tom@archlinux.org>
# Contributor: Nikos Kouremenos (zeppelin) kourem at gmail dot com
# Maintainer: Stefan Husmann <stefan-husmann@t-online.de>
pkgname=autocutsel
pkgver=0.9.0
-pkgrel=3
+pkgrel=5
pkgdesc="synchronizes the two copy/paste buffers mainly used by X applications"
arch=('i686' 'x86_64')
-depends=('libxaw')
-source=(http://lepton.fr/tools/autocutsel/autocutsel-$pkgver.tar.gz)
-md5sums=('ba4a6f632cb4815ae4e5c3027c24cfc5')
+depends=('libxaw' 'sh')
+source=(http://lepton.fr/tools/$pkgname/$pkgname-$pkgver.tar.gz $pkgname.sh)
+md5sums=('ba4a6f632cb4815ae4e5c3027c24cfc5'
+ '27a15ab10e2988a8a479e3f015cabd00')
url="http://lepton.fr/tools/autocutsel/"
license=('GPL')
build() {
@@ -20,5 +21,6 @@ build() {
}
package() {
cd $srcdir/$pkgname-$pkgver
- make prefix=$pkgdir/usr install
+ make prefix=$pkgdir/usr install
+ install -Dm755 $srcdir/$pkgname.sh $pkgdir/etc/X11/xinit/xinitrc.d/40-$pkgname
}
diff --git a/community/autocutsel/autocutsel.sh b/community/autocutsel/autocutsel.sh
new file mode 100644
index 000000000..82fe19124
--- /dev/null
+++ b/community/autocutsel/autocutsel.sh
@@ -0,0 +1,2 @@
+autocutsel -fork &
+autocutsel -selection PRIMARY -fork &
diff --git a/community/dev86/PKGBUILD b/community/dev86/PKGBUILD
index 4428a54a8..28d31b13e 100644
--- a/community/dev86/PKGBUILD
+++ b/community/dev86/PKGBUILD
@@ -1,37 +1,42 @@
-# $Id: PKGBUILD 25323 2010-09-03 22:29:35Z spupykin $
+# $Id: PKGBUILD 44944 2011-04-13 08:59:01Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Alessio 'mOLOk' Bolognino <themolok@gmail.com>
# Contributor: Suat SARIALP <muhendis.suat@gmail.com>
pkgname=dev86
-pkgver=0.16.17
-pkgrel=5.1
+pkgver=0.16.18
+pkgrel=1
pkgdesc="Simple C compiler to generate 8086 code"
arch=('i686' 'x86_64')
-url="http://homepage.ntlworld.com/robert.debath/dev86"
+#url="http://homepage.ntlworld.com/robert.debath/dev86"
+url="http://www.debath.co.uk/dev86/"
license=(GPL)
makedepends=('bin86')
options=('!libtool' '!strip' '!makeflags')
-source=(http://homepage.ntlworld.com/robert.debath/dev86/Dev86src-0.16.17.tar.gz dev86-pic.patch)
-md5sums=('e7bbfdbe61c2fb964994a087e29b0087' '1b750c5561a4bde5f83f65e5827feb73')
+source=(http://www.debath.co.uk/dev86/Dev86src-$pkgver.tar.gz
+# http://homepage.ntlworld.com/robert.debath/dev86/Dev86src-$pkgver.tar.gz
+ dev86-pic.patch)
+md5sums=('f2e06b547397383b2b2650b9c4fd9bab'
+ '1b750c5561a4bde5f83f65e5827feb73')
build() {
- cd $startdir/src/$pkgname-$pkgver
- patch -Np0 -i ${startdir}/src/dev86-pic.patch
+ cd $srcdir/$pkgname-$pkgver
+ patch -Np0 -i $srcdir/dev86-pic.patch
if [ "${CARCH}" = "x86_64" ]; then
# x86_64 fix
sed -i.orig -e 's,alt-libs elksemu,alt-libs,' \
-e 's,install-lib install-emu,install-lib,' \
- $startdir/src/$pkgname-$pkgver/makefile.in
+ $srcdir/$pkgname-$pkgver/makefile.in
fi
# use our CFLAGS
sed -i -e "s/-O2 -g/${CFLAGS}/" makefile.in
- make PREFIX=/usr DIST="$startdir/pkg" || return 1
- make install-all DIST="$startdir/pkg"
- mkdir -p $startdir/pkg/usr/share
- mv $startdir/pkg/usr/man $startdir/pkg/usr/share
+ make PREFIX=/usr DIST="$pkgdir" || return 1
+ make install-all DIST="$pkgdir"
+ mkdir -p $pkgdir/usr/share
+ mv $pkgdir/usr/man $pkgdir/usr/share
# remove all the stuff supplied by bin86
- rm $startdir/pkg/usr/bin/{as,ld,nm,objdump,size}86
- rm $startdir/pkg/usr/share/man/man1/{as,ld}86.1
+ rm $pkgdir/usr/bin/{as,ld,nm,objdump,size}86
+ rm $pkgdir/usr/share/man/man1/{as,ld}86.1
}
diff --git a/community/medit/PKGBUILD b/community/medit/PKGBUILD
index 797667386..3664e3001 100644
--- a/community/medit/PKGBUILD
+++ b/community/medit/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 40816 2011-02-28 12:02:36Z spupykin $
+# $Id: PKGBUILD 44959 2011-04-13 12:32:32Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: William Rea <sillywilly@gmail.com>
pkgname=medit
-pkgver=1.0.1
+pkgver=1.0.2
pkgrel=1
pkgdesc="A GTK text editor"
arch=('i686' 'x86_64')
@@ -16,25 +16,22 @@ makedepends=(pkgconfig perlxml intltool gcc-objc)
install=medit.install
source=(http://downloads.sourceforge.net/mooedit/medit-$pkgver.tar.bz2
capsule.diff)
-md5sums=('2f1a73d6e5a2d180d7634ce1f98c4821'
+md5sums=('331701a1e0255ec3cd1899c7a6f6818b'
'd3386ca02ba598c73c581bf983a15f23')
build() {
cd $srcdir/medit-$pkgver
export PYTHON=/usr/bin/python2
- patch -Np1 -i $srcdir/capsule.diff
+# patch -Np1 -i $srcdir/capsule.diff
[ -f Makefile ] || ./configure --prefix=/usr
make
}
package() {
cd $srcdir/medit-$pkgver
-
make DESTDIR=${pkgdir} install
-
cd ${pkgdir}/usr/share/medit-1/language-specs
sed -i "s|*.sh|*.sh;PKGBUILD|" sh.lang
-
rm -rf $pkgdir/usr/share/mime
rm -rf $pkgdir/usr/share/icons/hicolor/icon-theme.cache
}
diff --git a/community/medit/medit.install b/community/medit/medit.install
index b4ee8556f..b95cc069d 100644
--- a/community/medit/medit.install
+++ b/community/medit/medit.install
@@ -9,4 +9,3 @@ post_upgrade() {
post_remove() {
which xdg-icon-resource 1>/dev/null 2>/dev/null && xdg-icon-resource forceupdate || true
}
-
diff --git a/community/nemesis/PKGBUILD b/community/nemesis/PKGBUILD
index 53e81480a..c299d0158 100644
--- a/community/nemesis/PKGBUILD
+++ b/community/nemesis/PKGBUILD
@@ -1,18 +1,18 @@
-# $Id: PKGBUILD 11512 2010-02-12 23:38:30Z spupykin $
+# $Id: PKGBUILD 44947 2011-04-13 08:59:35Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
pkgname=nemesis
pkgver=1.4
-pkgrel=3
+pkgrel=4
pkgdesc="command-line network packet crafting and injection utility"
arch=(i686 x86_64)
url="http://nemesis.sourceforge.net/"
-license=('GPL')
-depends=(glibc)
+license=('BSD')
+depends=()
options=('!libtool')
-source=(http://downloads.sourceforge.net/sourceforge/nemesis/nemesis-$pkgver.tar.gz \
- http://archlinux-stuff.googlecode.com/files/libnet-1.0.2a.tar.gz \
+source=(http://downloads.sourceforge.net/sourceforge/nemesis/nemesis-$pkgver.tar.gz
+ http://archlinux-stuff.googlecode.com/files/libnet-1.0.2a.tar.gz
nemesis-proto_tcp.c.diff)
md5sums=('acd7de57798a7f90f445f80d4d4a6e61'
'ddf53f0f484184390e8c2a1bd0853667'
@@ -20,28 +20,23 @@ md5sums=('acd7de57798a7f90f445f80d4d4a6e61'
build() {
# build libnet
- cd ${startdir}/src/Libnet-1.0.2a
-
+ cd $srcdir/Libnet-1.0.2a
# very dirty hack
sed -i 's#malloc(p_size)#malloc(p_size*2)#' src/libnet_packet_mem.c
-
- [ $NOEXTRACT -eq 1 ] || ./configure --prefix=$srcdir/libnet
- make || return 1
- make MAN_PREFIX=$srcdir/libnet/usr/man/man3 install || return 1
+ [ -f Makefile ] || ./configure --prefix=$srcdir/libnet
+ make
+ make MAN_PREFIX=$srcdir/libnet/usr/man/man3 install
# build nemesis
- cd ${startdir}/src/nemesis-$pkgver
-
+ cd $srcdir/nemesis-$pkgver
export PATH="$srcdir/libnet/bin:$PATH"
export CFLAGS="-D__GLIBC__=0 -I$srcdir/libnet/include -DLIBNET_LIL_ENDIAN"
export LDFLAGS="-L$srcdir/libnet/lib"
-
patch -Np1 <$srcdir/nemesis-proto_tcp.c.diff
-
- [ $NOEXTRACT -eq 1 ] || ./configure --prefix=/usr --mandir=/usr/share/man \
+ [ -f Makefile ] || ./configure --prefix=/usr --mandir=/usr/share/man \
--with-libnet-includes=$srcdir/libnet/include \
--with-libnet-libraries=$srcdir/libnet/lib
- make || return 1
+ make
make DESTDIR=$pkgdir install
+ install -D -m0644 LICENSE $pkgdir/usr/share/licenses/nemesis/LICENSE
}
-
diff --git a/community/tellico/PKGBUILD b/community/tellico/PKGBUILD
index 181181404..0854c6eaf 100644
--- a/community/tellico/PKGBUILD
+++ b/community/tellico/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 34947 2010-12-13 22:02:05Z schiv $
+# $Id: PKGBUILD 44985 2011-04-13 23:48:59Z schiv $
# Maintainer: Ray Rashif <schiv@archlinux.org
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Douglas Soares de Andrade <dsa@aur.archlinux.org>
# Contributor: mdv
pkgname=tellico
-pkgver=2.3.2
+pkgver=2.3.3
pkgrel=1
pkgdesc="A collection manager for KDE"
arch=('i686' 'x86_64')
@@ -16,7 +16,7 @@ depends=('kdebase-workspace' 'yaz' 'exempi' 'kdegraphics-libs' 'taglib'
makedepends=('automoc4' 'cmake' 'docbook-xsl')
install=$pkgname.install
source=("http://tellico-project.org/files/${pkgname}-${pkgver}.tar.bz2")
-md5sums=('3425c12055ae7ea512cd7242de73575e')
+md5sums=('7e3da69119324995308fca7ddf8ea6a9')
build() {
cd "$srcdir/$pkgname-$pkgver"
diff --git a/community/vhba-module/PKGBUILD b/community/vhba-module/PKGBUILD
index 6f59b394e..f75e3f1bd 100644
--- a/community/vhba-module/PKGBUILD
+++ b/community/vhba-module/PKGBUILD
@@ -1,22 +1,22 @@
-# $Id: PKGBUILD 37578 2011-01-14 16:46:23Z mherych $
+# $Id: PKGBUILD 44936 2011-04-13 05:20:34Z schiv $
# Maintainer: Mateusz Herych <heniekk@gmail.com>
# Contributor: Charles Lindsay <charles@chaoslizard.org>
pkgname=vhba-module
pkgver=20100822
-_kernver='2.6.37-ARCH'
-pkgrel=3
+_kernver='2.6.38-ARCH'
+pkgrel=4
pkgdesc="Kernel module that emulates SCSI devices"
arch=('i686' 'x86_64')
url="http://cdemu.sourceforge.net/"
license=('GPL2')
-depends=('kernel26>=2.6.37' 'kernel26<2.6.38')
-makedepends=('kernel26-headers>=2.6.37' 'git')
+depends=('kernel26>=2.6.38' 'kernel26<2.6.39')
+makedepends=('kernel26-headers>=2.6.38' 'git')
install=vhba-module.install
source=(http://downloads.sourceforge.net/cdemu/$pkgname-$pkgver.tar.gz
- vhba-kernel2.6.37.patch)
+ vhba-kernel2.6.37.patch)
md5sums=('1d2f06ae33c5d15b7c29e467e4658aa2'
- 'f0499fc54f6ef9b8d6ca0b9e940c5906')
+ 'f0499fc54f6ef9b8d6ca0b9e940c5906')
build() {
cd "$srcdir/$pkgname-$pkgver"
diff --git a/core/fakeroot/PKGBUILD b/core/fakeroot/PKGBUILD
index c3962c2f8..e9d642574 100644
--- a/core/fakeroot/PKGBUILD
+++ b/core/fakeroot/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 102182 2010-12-06 14:43:36Z allan $
+# $Id: PKGBUILD 118918 2011-04-09 11:49:09Z allan $
# Maintainer: Allan McRae <allan@archlinux.org>
# Contributor: Jochem Kossen <j.kossen@home.nl>
pkgname=fakeroot
-pkgver=1.14.5
+pkgver=1.15.1
pkgrel=1
pkgdesc="Gives a fake root environment, useful for building packages as a non-privileged user"
arch=('i686' 'x86_64')
@@ -11,16 +11,15 @@ license=('GPL')
url="http://packages.debian.org/fakeroot"
groups=('base-devel')
install=fakeroot.install
-depends=('glibc' 'filesystem' 'grep' 'sed' 'sh')
+depends=('glibc' 'filesystem' 'sed' 'util-linux' 'sh')
options=('!libtool')
source=(http://ftp.debian.org/debian/pool/main/f/${pkgname}/${pkgname}_${pkgver}.orig.tar.bz2)
-md5sums=('659a1f3a36554abfc2a3eaad2fdc0604')
+md5sums=('248c408b1e06e776c5739871b49bd968')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
./configure --prefix=/usr --libdir=/usr/lib/libfakeroot \
- --disable-static --with-ipc=sysv
- # --with-ipc=tcp is currently broken and no option on smp systems
+ --disable-static --with-ipc=sysv
make
}
diff --git a/core/mlocate/PKGBUILD b/core/mlocate/PKGBUILD
index 62f7864c3..d6f1f0be4 100644
--- a/core/mlocate/PKGBUILD
+++ b/core/mlocate/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 97017 2010-10-26 01:53:05Z allan $
+# $Id: PKGBUILD 118924 2011-04-09 12:46:47Z allan $
# Maintainer: Allan McRae <allan@archlinux.org>
# Contributor: lydgate
pkgname=mlocate
-pkgver=0.23.1
-pkgrel=2
+pkgver=0.24
+pkgrel=1
pkgdesc="Faster merging drop-in for slocate"
arch=('i686' 'x86_64')
url="http://carolina.mff.cuni.cz/~trmac/blog/mlocate"
@@ -19,17 +19,21 @@ install=mlocate.install
source=(https://fedorahosted.org/releases/m/l/mlocate/mlocate-$pkgver.tar.xz
updatedb.conf
updatedb.cron.daily)
-md5sums=('db48f27fae91c754c46d8046919803c5'
+md5sums=('a9c221e5bc489a2ed710c943990137bd'
'c374ff223f2e07b5e602ba22359f2335'
'cde5da81bebad2de556ef2e43d895e13')
build() {
cd $srcdir/$pkgname-$pkgver
- # Build!
sed -i '/^groupname /s/mlocate/locate/' Makefile.in
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib
make
+
+}
+
+check() {
+ cd $srcdir/$pkgname-$pkgver
make check
}
diff --git a/core/ncurses/PKGBUILD b/core/ncurses/PKGBUILD
index abe1cede5..1b387c6b1 100644
--- a/core/ncurses/PKGBUILD
+++ b/core/ncurses/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 111464 2011-02-27 00:26:17Z allan $
+# $Id: PKGBUILD 118921 2011-04-09 12:39:04Z allan $
# Maintainer: Allan McRae <allan@archlinux.org>
# Contributor: judd <jvinet@zeroflux.org>
pkgname=ncurses
-pkgver=5.8
+pkgver=5.9
pkgrel=1
pkgdesc="System V Release 4.0 curses emulation library"
arch=('i686' 'x86_64')
@@ -11,7 +11,7 @@ url="http://www.gnu.org/software/ncurses/"
license=('MIT')
depends=('glibc')
source=(ftp://ftp.gnu.org/pub/gnu/${pkgname}/${pkgname}-${pkgver}.tar.gz)
-md5sums=('20ed3fa7599937f0ca268d9088837a64')
+md5sums=('8cb9c412e5f2d96bc6f459aa8c6282a1')
build() {
cd ${srcdir}/
diff --git a/core/sudo/PKGBUILD b/core/sudo/PKGBUILD
index 7281b56b0..185413419 100644
--- a/core/sudo/PKGBUILD
+++ b/core/sudo/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 113374 2011-03-08 13:08:35Z allan $
+# $Id: PKGBUILD 118993 2011-04-09 21:57:35Z allan $
# Maintainer: Allan McRae <allan@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
pkgname=sudo
-_ver=1.8.0
+_ver=1.8.1
pkgver=${_ver/[a-z]/.${_ver//[0-9.]/}}
-pkgrel=4
+pkgrel=1
pkgdesc="Give certain users the ability to run some commands as root"
arch=('i686' 'x86_64')
url="http://www.sudo.ws/sudo/"
@@ -13,29 +13,14 @@ license=('custom')
depends=('glibc' 'pam')
backup=('etc/sudoers' 'etc/pam.d/sudo')
source=(ftp://ftp.sudo.ws/pub/sudo/$pkgname-$_ver.tar.gz
- sudo_l.patch
- sudo_validate_exitval.patch
- sudo_noninteractive.patch
sudo.pam)
options=('!libtool' '!makeflags')
-md5sums=('fa0a35330691af14cb1869f64a65aebc'
- '29656b2f2365e14fa0f8eb94e61f3690'
- '4751aa5557fe43fd8e03e0c7b5affcfc'
- '47d152ade2c9a726684fa1227e46bfe3'
+md5sums=('e4402f24cccc3c6697b1eeab496053dd'
'4e7ad4ec8f2fe6a40e12bcb2c0b256e3')
build() {
cd $srcdir/$pkgname-$_ver
- # http://www.sudo.ws/bugs/show_bug.cgi?id=474
- patch -Np1 -i $srcdir/sudo_l.patch
-
- # http://www.sudo.ws/bugs/show_bug.cgi?id=479
- patch -Np1 -i $srcdir/sudo_validate_exitval.patch
-
- # http://www.sudo.ws/bugs/show_bug.cgi?id=478
- patch -Np1 -i $srcdir/sudo_noninteractive.patch
-
./configure --prefix=/usr --with-pam --libexecdir=/usr/lib \
--with-env-editor --with-all-insults --with-logfac=auth
make
diff --git a/core/xz/PKGBUILD b/core/xz/PKGBUILD
index 98dbf5c9c..3f85f5aa0 100644
--- a/core/xz/PKGBUILD
+++ b/core/xz/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 117398 2011-04-01 14:53:42Z pierre $
+# $Id: PKGBUILD 117397 2011-04-01 14:53:10Z pierre $
# Maintainer: Pierre Schmitz <pierre@archlinux.de>
# Contributor: François Charette <firmicus@gmx.net>
pkgname=xz
-pkgver=5.0.1
+pkgver=5.0.2
pkgrel=1
pkgdesc='Library and command line tools for XZ and LZMA compressed files'
arch=('i686' 'x86_64')
@@ -15,7 +15,7 @@ replaces=('lzma' 'lzma-utils' 'xz-utils')
conflicts=('lzma' 'lzma-utils' 'xz-utils')
options=('!libtool')
source=("http://tukaani.org/${pkgname}/${pkgname}-${pkgver}.tar.xz")
-md5sums=('85d15b01a405616a888d09e19fb40f31')
+md5sums=('870d0e6fec3b710903371defb48a2fad')
# keep an upgrade path for older installations
PKGEXT='.pkg.tar.gz'
@@ -26,9 +26,11 @@ build() {
./configure --prefix=/usr \
--disable-rpath \
--enable-werror
- sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
- sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make
+}
+
+check() {
+ cd ${srcdir}/${pkgname}-${pkgver}
make check
}
diff --git a/extra/dovecot/PKGBUILD b/extra/dovecot/PKGBUILD
index c8f87f1e9..5c37e7454 100644
--- a/extra/dovecot/PKGBUILD
+++ b/extra/dovecot/PKGBUILD
@@ -1,12 +1,12 @@
-# $Id: PKGBUILD 115180 2011-03-17 10:58:18Z andrea $
+# $Id: PKGBUILD 119695 2011-04-13 19:29:24Z andyrtr $
# Contributor: Paul Mattal <paul@mattal.com>
# Contributor: Federico Quagliata (quaqo) <quaqo@despammed.com>
# Contributor: GARETTE Emmanuel <gnunux at laposte dot net>
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
pkgname=dovecot
-pkgver=2.0.11
-pkgrel=2
+pkgver=2.0.12
+pkgrel=1
pkgdesc="An IMAP and POP3 server written with security primarily in mind"
arch=('i686' 'x86_64')
url="http://dovecot.org/"
@@ -25,7 +25,7 @@ backup=(etc/dovecot/dovecot.conf
etc/ssl/dovecot-openssl.cnf)
install=$pkgname.install
source=(http://dovecot.org/releases/2.0/${pkgname}-${pkgver}.tar.gz dovecot.sh)
-md5sums=('088a850d6583a7ec0a8074ce929b3496'
+md5sums=('689e1a8863d4fb2fd252e1a6121dd181'
'd020d43eab4ded6fb379dadc570a9490')
build() {
diff --git a/extra/oxygen-gtk/PKGBUILD b/extra/oxygen-gtk/PKGBUILD
index b5cb2b2fa..a059d53bd 100644
--- a/extra/oxygen-gtk/PKGBUILD
+++ b/extra/oxygen-gtk/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 114425 2011-03-13 14:07:20Z andrea $
+# $Id: PKGBUILD 119675 2011-04-13 12:39:30Z andrea $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
# Contributor: birdflesh <antkoul at gmail dot com>
pkgname=oxygen-gtk
-pkgver=1.0.3
+pkgver=1.0.4
pkgrel=1
pkgdesc="Port of the default KDE widget theme (Oxygen) to GTK"
arch=('i686' 'x86_64')
@@ -12,7 +12,7 @@ license=('LGPL')
depends=('gtk2')
makedepends=('cmake')
source=("http://download.kde.org/stable/${pkgname}/${pkgver}/src/${pkgname}-${pkgver}.tar.bz2")
-md5sums=('df17f4a9b233a9c9e028932f11d05058')
+md5sums=('0aed63523f8abe79860e6b934a9d6210')
build() {
cd ${srcdir}
diff --git a/extra/qjackctl/PKGBUILD b/extra/qjackctl/PKGBUILD
index 9916f3d5c..71cbf6664 100644
--- a/extra/qjackctl/PKGBUILD
+++ b/extra/qjackctl/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 101735 2010-12-01 12:16:41Z schiv $
+# $Id: PKGBUILD 119703 2011-04-13 22:27:56Z schiv $
# Maintainer: Ray Rashif <schiv@archlinux.org>
# Contributor: Tobias Kieslich <tobias@archlinux.org>
pkgname=qjackctl
pkgver=0.3.7
-pkgrel=1
+pkgrel=2
pkgdesc="A Qt front-end for the JACK low-latency audio server"
url="http://qjackctl.sourceforge.net/"
arch=('i686' 'x86_64')
diff --git a/testing/bin86/PKGBUILD b/testing/bin86/PKGBUILD
new file mode 100644
index 000000000..c3865a24e
--- /dev/null
+++ b/testing/bin86/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 119692 2011-04-13 17:22:23Z andyrtr $
+# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+# Contributor: judd <jvinet@zeroflux.org>
+
+pkgname=bin86
+pkgver=0.16.18
+pkgrel=1
+pkgdesc="A complete 8086 assembler and loader"
+arch=(i686 x86_64)
+license=('GPL')
+url="http://www.debath.co.uk/"
+depends=('glibc')
+source=(http://www.debath.co.uk/dev86//$pkgname-$pkgver.tar.gz
+ bin86-0.16.17-x86_64-1.patch)
+md5sums=('914068fb649b93642d1cf21857b75699'
+ '92bdce7b0655cd2e9f83c83fc56d128e')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ if [ "$CARCH" = "x86_64" ]; then
+ patch -Np1 -i ../bin86-0.16.17-x86_64-1.patch
+ fi
+ make PREFIX=/usr
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+ mkdir -p $pkgdir/usr/bin $pkgdir/usr/share/man/man1
+ make PREFIX=$pkgdir/usr MANDIR=$pkgdir/usr/share/man/man1 install
+}
diff --git a/testing/bin86/bin86-0.16.17-x86_64-1.patch b/testing/bin86/bin86-0.16.17-x86_64-1.patch
new file mode 100644
index 000000000..152413ee7
--- /dev/null
+++ b/testing/bin86/bin86-0.16.17-x86_64-1.patch
@@ -0,0 +1,44 @@
+Submitted By: Ken Moffat <ken@kenmoffat.uklinux.net>
+Date: 2005-06-28
+Initial Package Version: 0.16.14
+Upstream Status: Submitted Upstream
+Origin: from ROCK Linux
+Description: Allows bin86 to compile on x86_64, which permits lilo to
+ be used in a 64-bit system. I'm dubious about ROCK's attempts to
+ automatically add dual-licensing to all their patches, but bin86 is
+ already GPL'd. I've heard from the maintainer that this will be
+ included in the next upload.
+
+
+# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
+#
+# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
+# Please add additional copyright information _after_ the line containing
+# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
+# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
+#
+# ROCK Linux: rock-src/package/x86/bin86/x86_64.patch
+# ROCK Linux is Copyright (C) 1998 - 2005 Clifford Wolf
+#
+# This patch file is dual-licensed. It is available under the license the
+# patched project is licensed under, as long as it is an OpenSource license
+# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
+# of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# --- ROCK-COPYRIGHT-NOTE-END ---
+
+diff -urN bin86-0.16.14-orig/ld/x86_aout.h bin86-0.16.14/ld/x86_aout.h
+--- bin86-0.16.14-orig/ld/x86_aout.h 2004-11-07 20:07:31.506442000 +0100
++++ bin86-0.16.14/ld/x86_aout.h 2004-11-07 20:07:41.106982496 +0100
+@@ -12,6 +12,9 @@
+ #if defined(i386) || defined(__BCC__) || defined(MSDOS)
+ typedef long Long;
+ #define __OUT_OK 1
++#elif defined(__x86_64__)
++typedef int Long;
++#define __OUT_OK 1
+ #else
+ typedef char Long[4];
+ #endif
diff --git a/testing/coreutils/PKGBUILD b/testing/coreutils/PKGBUILD
new file mode 100644
index 000000000..78b74c33f
--- /dev/null
+++ b/testing/coreutils/PKGBUILD
@@ -0,0 +1,69 @@
+# $Id: PKGBUILD 119714 2011-04-14 01:48:09Z allan $
+# Maintainer: Allan McRae <allan@archlinux.org>
+# Contributor: judd <jvinet@zeroflux.org>
+
+pkgname=coreutils
+pkgver=8.11
+pkgrel=1
+pkgdesc="The basic file, shell and text manipulation utilities of the GNU operating system"
+arch=('i686' 'x86_64')
+license=('GPL3')
+url="http://www.gnu.org/software/coreutils"
+groups=('base')
+depends=('glibc' 'shadow' 'pam' 'acl' 'gmp' 'libcap')
+replaces=('mktemp')
+backup=('etc/pam.d/su')
+install=${pkgname}.install
+options=('!emptydirs')
+source=(ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz
+ coreutils-uname.patch
+ coreutils-pam.patch
+ su.pam)
+md5sums=('b623ee9b1b768a14e40dfd35ff446f4c'
+ 'c4fcca138b6abf6d443d48a6f0cd8833'
+ 'aad79a2aa6d566c375d7bdd1b0767278'
+ 'fa85e5cce5d723275b14365ba71a8aad')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ # added su wheel group pam patch (from fedora git)
+ patch -Np1 -i ${srcdir}/coreutils-pam.patch
+
+ # linux specific uname improvement (from gentoo portage)
+ patch -Np1 -i ${srcdir}/coreutils-uname.patch
+
+ autoreconf -v
+ ./configure --prefix=/usr \
+ --enable-install-program=su \
+ --enable-no-install-program=groups,hostname,kill,uptime \
+ --enable-pam
+ make
+}
+
+check() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make RUN_EXPENSIVE_TESTS=yes check
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make DESTDIR=${pkgdir} install
+
+ cd ${pkgdir}/usr/bin
+ install -dm755 ${pkgdir}/{bin,usr/sbin}
+
+ # binaries required by FHS
+ _fhs="cat chgrp chmod chown cp date dd df echo false ln ls \
+ mkdir mknod mv pwd rm rmdir stty su sync true uname"
+ mv ${_fhs} ${pkgdir}/bin
+
+ # binaries required by various Arch scripts
+ _bin="cut dir dircolors du install mkfifo readlink shred \
+ sleep touch tr vdir"
+ mv ${_bin} ${pkgdir}/bin
+ ln -sf /bin/sleep ${pkgdir}/usr/bin/sleep
+
+ mv chroot ${pkgdir}/usr/sbin
+ install -Dm644 ${srcdir}/su.pam ${pkgdir}/etc/pam.d/su
+}
diff --git a/testing/coreutils/coreutils-pam.patch b/testing/coreutils/coreutils-pam.patch
new file mode 100644
index 000000000..e61908f3f
--- /dev/null
+++ b/testing/coreutils/coreutils-pam.patch
@@ -0,0 +1,428 @@
+diff -urNp coreutils-8.4-orig/configure.ac coreutils-8.4/configure.ac
+--- coreutils-8.4-orig/configure.ac 2010-01-11 18:20:42.000000000 +0100
++++ coreutils-8.4/configure.ac 2010-02-12 10:17:46.000000000 +0100
+@@ -126,6 +126,13 @@ if test "$gl_gcc_warnings" = yes; then
+ AC_SUBST([GNULIB_WARN_CFLAGS])
+ fi
+
++dnl Give the chance to enable PAM
++AC_ARG_ENABLE(pam, dnl
++[ --enable-pam Enable use of the PAM libraries],
++[AC_DEFINE(USE_PAM, 1, [Define if you want to use PAM])
++LIB_PAM="-ldl -lpam -lpam_misc"
++AC_SUBST(LIB_PAM)])
++
+ AC_FUNC_FORK
+
+ optional_bin_progs=
+diff -urNp coreutils-8.4-orig/doc/coreutils.texi coreutils-8.4/doc/coreutils.texi
+--- coreutils-8.4-orig/doc/coreutils.texi 2010-01-03 18:06:20.000000000 +0100
++++ coreutils-8.4/doc/coreutils.texi 2010-02-12 10:17:46.000000000 +0100
+@@ -15081,8 +15081,11 @@ to certain shells, etc.).
+ @findex syslog
+ @command{su} can optionally be compiled to use @code{syslog} to report
+ failed, and optionally successful, @command{su} attempts. (If the system
+-supports @code{syslog}.) However, GNU @command{su} does not check if the
+-user is a member of the @code{wheel} group; see below.
++supports @code{syslog}.)
++
++This version of @command{su} has support for using PAM for
++authentication. You can edit @file{/etc/pam.d/su} to customize its
++behaviour.
+
+ The program accepts the following options. Also see @ref{Common options}.
+
+@@ -15124,6 +15127,8 @@ environment variables except @env{TERM},
+ @env{PATH} to a compiled-in default value. Change to @var{user}'s home
+ directory. Prepend @samp{-} to the shell's name, intended to make it
+ read its login startup file(s).
++Additionaly @env{DISPLAY} and @env{XAUTHORITY} environment variables
++are preserved as well for PAM functionality.
+
+ @item -m
+ @itemx -p
+@@ -15163,33 +15168,6 @@ Exit status:
+ the exit status of the subshell otherwise
+ @end display
+
+-@cindex wheel group, not supported
+-@cindex group wheel, not supported
+-@cindex fascism
+-@subsection Why GNU @command{su} does not support the @samp{wheel} group
+-
+-(This section is by Richard Stallman.)
+-
+-@cindex Twenex
+-@cindex MIT AI lab
+-Sometimes a few of the users try to hold total power over all the
+-rest. For example, in 1984, a few users at the MIT AI lab decided to
+-seize power by changing the operator password on the Twenex system and
+-keeping it secret from everyone else. (I was able to thwart this coup
+-and give power back to the users by patching the kernel, but I
+-wouldn't know how to do that in Unix.)
+-
+-However, occasionally the rulers do tell someone. Under the usual
+-@command{su} mechanism, once someone learns the root password who
+-sympathizes with the ordinary users, he or she can tell the rest. The
+-``wheel group'' feature would make this impossible, and thus cement the
+-power of the rulers.
+-
+-I'm on the side of the masses, not that of the rulers. If you are
+-used to supporting the bosses and sysadmins in whatever they do, you
+-might find this idea strange at first.
+-
+-
+ @node timeout invocation
+ @section @command{timeout}: Run a command with a time limit
+
+diff -urNp coreutils-8.4-orig/src/Makefile.am coreutils-8.4/src/Makefile.am
+--- coreutils-8.4-orig/src/Makefile.am 2010-01-03 18:06:20.000000000 +0100
++++ coreutils-8.4/src/Makefile.am 2010-02-12 10:17:46.000000000 +0100
+@@ -361,7 +361,7 @@ factor_LDADD += $(LIB_GMP)
+ uptime_LDADD += $(GETLOADAVG_LIBS)
+
+ # for crypt
+-su_LDADD += $(LIB_CRYPT)
++su_LDADD += $(LIB_CRYPT) @LIB_PAM@
+
+ # for various ACL functions
+ copy_LDADD += $(LIB_ACL)
+diff -urNp coreutils-8.4-orig/src/su.c coreutils-8.4/src/su.c
+--- coreutils-8.4-orig/src/su.c 2010-02-12 10:15:15.000000000 +0100
++++ coreutils-8.4/src/su.c 2010-02-12 10:24:29.000000000 +0100
+@@ -37,6 +37,16 @@
+ restricts who can su to UID 0 accounts. RMS considers that to
+ be fascist.
+
++#ifdef USE_PAM
++
++ Actually, with PAM, su has nothing to do with whether or not a
++ wheel group is enforced by su. RMS tries to restrict your access
++ to a su which implements the wheel group, but PAM considers that
++ to be fascist, and gives the user/sysadmin the opportunity to
++ enforce a wheel group by proper editing of /etc/pam.conf
++
++#endif
++
+ Compile-time options:
+ -DSYSLOG_SUCCESS Log successful su's (by default, to root) with syslog.
+ -DSYSLOG_FAILURE Log failed su's (by default, to root) with syslog.
+@@ -53,6 +63,15 @@
+ #include <pwd.h>
+ #include <grp.h>
+
++#ifdef USE_PAM
++# include <signal.h>
++# include <sys/wait.h>
++# include <sys/fsuid.h>
++# include <unistd.h>
++# include <security/pam_appl.h>
++# include <security/pam_misc.h>
++#endif /* USE_PAM */
++
+ #include "system.h"
+ #include "getpass.h"
+
+@@ -120,10 +139,17 @@
+ /* The user to become if none is specified. */
+ #define DEFAULT_USER "root"
+
++#ifndef USE_PAM
+ char *crypt (char const *key, char const *salt);
++#endif
+
+-static void run_shell (char const *, char const *, char **, size_t)
++static void run_shell (char const *, char const *, char **, size_t,
++ const struct passwd *)
++#ifdef USE_PAM
++ ;
++#else
+ ATTRIBUTE_NORETURN;
++#endif
+
+ /* If true, pass the `-f' option to the subshell. */
+ static bool fast_startup;
+@@ -209,7 +235,26 @@ log_su (struct passwd const *pw, bool su
+ }
+ #endif
+
++#ifdef USE_PAM
++static pam_handle_t *pamh = NULL;
++static int retval;
++static struct pam_conv conv = {
++ misc_conv,
++ NULL
++};
++
++#define PAM_BAIL_P if (retval) { \
++ pam_end(pamh, PAM_SUCCESS); \
++ return 0; \
++}
++#define PAM_BAIL_P_VOID if (retval) { \
++ pam_end(pamh, PAM_SUCCESS); \
++return; \
++}
++#endif
++
+ /* Ask the user for a password.
++ If PAM is in use, let PAM ask for the password if necessary.
+ Return true if the user gives the correct password for entry PW,
+ false if not. Return true without asking for a password if run by UID 0
+ or if PW has an empty password. */
+@@ -217,6 +262,44 @@ log_su (struct passwd const *pw, bool su
+ static bool
+ correct_password (const struct passwd *pw)
+ {
++#ifdef USE_PAM
++ struct passwd *caller;
++ char *tty_name, *ttyn;
++ retval = pam_start(PROGRAM_NAME, pw->pw_name, &conv, &pamh);
++ PAM_BAIL_P;
++
++ if (getuid() != 0 && !isatty(0)) {
++ fprintf(stderr, "standard in must be a tty\n");
++ exit(1);
++ }
++
++ caller = getpwuid(getuid());
++ if(caller != NULL && caller->pw_name != NULL) {
++ retval = pam_set_item(pamh, PAM_RUSER, caller->pw_name);
++ PAM_BAIL_P;
++ }
++
++ ttyn = ttyname(0);
++ if (ttyn) {
++ if (strncmp(ttyn, "/dev/", 5) == 0)
++ tty_name = ttyn+5;
++ else
++ tty_name = ttyn;
++ retval = pam_set_item(pamh, PAM_TTY, tty_name);
++ PAM_BAIL_P;
++ }
++ retval = pam_authenticate(pamh, 0);
++ PAM_BAIL_P;
++ retval = pam_acct_mgmt(pamh, 0);
++ if (retval == PAM_NEW_AUTHTOK_REQD) {
++ /* password has expired. Offer option to change it. */
++ retval = pam_chauthtok(pamh, PAM_CHANGE_EXPIRED_AUTHTOK);
++ PAM_BAIL_P;
++ }
++ PAM_BAIL_P;
++ /* must be authenticated if this point was reached */
++ return 1;
++#else /* !USE_PAM */
+ char *unencrypted, *encrypted, *correct;
+ #if HAVE_GETSPNAM && HAVE_STRUCT_SPWD_SP_PWDP
+ /* Shadow passwd stuff for SVR3 and maybe other systems. */
+@@ -241,6 +324,7 @@ correct_password (const struct passwd *p
+ encrypted = crypt (unencrypted, correct);
+ memset (unencrypted, 0, strlen (unencrypted));
+ return STREQ (encrypted, correct);
++#endif /* !USE_PAM */
+ }
+
+ /* Update `environ' for the new shell based on PW, with SHELL being
+@@ -254,12 +338,18 @@ modify_environment (const struct passwd
+ /* Leave TERM unchanged. Set HOME, SHELL, USER, LOGNAME, PATH.
+ Unset all other environment variables. */
+ char const *term = getenv ("TERM");
++ char const *display = getenv ("DISPLAY");
++ char const *xauthority = getenv ("XAUTHORITY");
+ if (term)
+ term = xstrdup (term);
+ environ = xmalloc ((6 + !!term) * sizeof (char *));
+ environ[0] = NULL;
+ if (term)
+ xsetenv ("TERM", term);
++ if (display)
++ xsetenv ("DISPLAY", display);
++ if (xauthority)
++ xsetenv ("XAUTHORITY", xauthority);
+ xsetenv ("HOME", pw->pw_dir);
+ xsetenv ("SHELL", shell);
+ xsetenv ("USER", pw->pw_name);
+@@ -292,8 +382,13 @@ change_identity (const struct passwd *pw
+ {
+ #ifdef HAVE_INITGROUPS
+ errno = 0;
+- if (initgroups (pw->pw_name, pw->pw_gid) == -1)
++ if (initgroups (pw->pw_name, pw->pw_gid) == -1) {
++#ifdef USE_PAM
++ pam_close_session(pamh, 0);
++ pam_end(pamh, PAM_ABORT);
++#endif
+ error (EXIT_CANCELED, errno, _("cannot set groups"));
++ }
+ endgrent ();
+ #endif
+ if (setgid (pw->pw_gid))
+@@ -302,6 +397,31 @@ change_identity (const struct passwd *pw
+ error (EXIT_CANCELED, errno, _("cannot set user id"));
+ }
+
++#ifdef USE_PAM
++static int caught=0;
++/* Signal handler for parent process later */
++static void su_catch_sig(int sig)
++{
++ ++caught;
++}
++
++int
++pam_copyenv (pam_handle_t *pamh)
++{
++ char **env;
++
++ env = pam_getenvlist(pamh);
++ if(env) {
++ while(*env) {
++ if (putenv (*env))
++ xalloc_die ();
++ env++;
++ }
++ }
++ return(0);
++}
++#endif
++
+ /* Run SHELL, or DEFAULT_SHELL if SHELL is empty.
+ If COMMAND is nonzero, pass it to the shell with the -c option.
+ Pass ADDITIONAL_ARGS to the shell as more arguments; there
+@@ -309,17 +429,49 @@ change_identity (const struct passwd *pw
+
+ static void
+ run_shell (char const *shell, char const *command, char **additional_args,
+- size_t n_additional_args)
++ size_t n_additional_args, const struct passwd *pw)
+ {
+ size_t n_args = 1 + fast_startup + 2 * !!command + n_additional_args + 1;
+ char const **args = xnmalloc (n_args, sizeof *args);
+ size_t argno = 1;
++#ifdef USE_PAM
++ int child;
++ sigset_t ourset;
++ int status;
++
++ retval = pam_open_session(pamh,0);
++ if (retval != PAM_SUCCESS) {
++ fprintf (stderr, "could not open session\n");
++ exit (1);
++ }
++
++/* do this at the last possible moment, because environment variables may
++ be passed even in the session phase
++*/
++ if(pam_copyenv(pamh) != PAM_SUCCESS)
++ fprintf (stderr, "error copying PAM environment\n");
++
++ /* Credentials should be set in the parent */
++ if (pam_setcred(pamh, PAM_ESTABLISH_CRED) != PAM_SUCCESS) {
++ pam_close_session(pamh, 0);
++ fprintf(stderr, "could not set PAM credentials\n");
++ exit(1);
++ }
++
++ child = fork();
++ if (child == 0) { /* child shell */
++ change_identity (pw);
++ pam_end(pamh, 0);
++#endif
+
+ if (simulate_login)
+ {
+ char *arg0;
+ char *shell_basename;
+
++ if(chdir(pw->pw_dir))
++ error(0, errno, _("warning: cannot change directory to %s"), pw->pw_dir);
++
+ shell_basename = last_component (shell);
+ arg0 = xmalloc (strlen (shell_basename) + 2);
+ arg0[0] = '-';
+@@ -344,6 +496,67 @@ run_shell (char const *shell, char const
+ error (0, errno, "%s", shell);
+ exit (exit_status);
+ }
++#ifdef USE_PAM
++ } else if (child == -1) {
++ fprintf(stderr, "can not fork user shell: %s", strerror(errno));
++ pam_setcred(pamh, PAM_DELETE_CRED | PAM_SILENT);
++ pam_close_session(pamh, 0);
++ pam_end(pamh, PAM_ABORT);
++ exit(1);
++ }
++ /* parent only */
++ sigfillset(&ourset);
++ if (sigprocmask(SIG_BLOCK, &ourset, NULL)) {
++ fprintf(stderr, "%s: signal malfunction\n", PROGRAM_NAME);
++ caught = 1;
++ }
++ if (!caught) {
++ struct sigaction action;
++ action.sa_handler = su_catch_sig;
++ sigemptyset(&action.sa_mask);
++ action.sa_flags = 0;
++ sigemptyset(&ourset);
++ if (sigaddset(&ourset, SIGTERM)
++ || sigaddset(&ourset, SIGALRM)
++ || sigaction(SIGTERM, &action, NULL)
++ || sigprocmask(SIG_UNBLOCK, &ourset, NULL)) {
++ fprintf(stderr, "%s: signal masking malfunction\n", PROGRAM_NAME);
++ caught = 1;
++ }
++ }
++ if (!caught) {
++ do {
++ int pid;
++
++ pid = waitpid(-1, &status, WUNTRACED);
++
++ if (((pid_t)-1 != pid) && (0 != WIFSTOPPED (status))) {
++ kill(getpid(), WSTOPSIG(status));
++ /* once we get here, we must have resumed */
++ kill(pid, SIGCONT);
++ }
++ } while (0 != WIFSTOPPED(status));
++ }
++
++ if (caught) {
++ fprintf(stderr, "\nSession terminated, killing shell...");
++ kill (child, SIGTERM);
++ }
++ /* Not checking retval on this because we need to call close session */
++ pam_setcred(pamh, PAM_DELETE_CRED | PAM_SILENT);
++ retval = pam_close_session(pamh, 0);
++ PAM_BAIL_P_VOID;
++ retval = pam_end(pamh, PAM_SUCCESS);
++ PAM_BAIL_P_VOID;
++ if (caught) {
++ sleep(2);
++ kill(child, SIGKILL);
++ fprintf(stderr, " ...killed.\n");
++ exit(-1);
++ }
++ exit ((0 != WIFEXITED (status)) ? WEXITSTATUS (status)
++ : WTERMSIG (status) + 128);
++#endif /* USE_PAM */
+ }
+
+ /* Return true if SHELL is a restricted shell (one not returned by
+@@ -511,9 +724,9 @@ main (int argc, char **argv)
+ shell = xstrdup (shell ? shell : pw->pw_shell);
+ modify_environment (pw, shell);
+
++#ifndef USE_PAM
+ change_identity (pw);
+- if (simulate_login && chdir (pw->pw_dir) != 0)
+- error (0, errno, _("warning: cannot change directory to %s"), pw->pw_dir);
++#endif
+
+ /* error() flushes stderr, but does not check for write failure.
+ Normally, we would catch this via our atexit() hook of
+@@ -523,5 +736,5 @@ main (int argc, char **argv)
+ if (ferror (stderr))
+ exit (EXIT_CANCELED);
+
+- run_shell (shell, command, argv + optind, MAX (0, argc - optind));
++ run_shell (shell, command, argv + optind, MAX (0, argc - optind), pw);
+ }
diff --git a/testing/coreutils/coreutils-uname.patch b/testing/coreutils/coreutils-uname.patch
new file mode 100644
index 000000000..b458abeba
--- /dev/null
+++ b/testing/coreutils/coreutils-uname.patch
@@ -0,0 +1,173 @@
+On linux platforms, grok /proc/cpuinfo for the CPU/vendor info.
+
+Prob not suitable for upstream seeing as how it's 100% linux-specific
+http://lists.gnu.org/archive/html/bug-coreutils/2005-09/msg00063.html
+
+Patch originally by Carlos E. Gorges <carlos@techlinux.com.br>, but
+heavily reworked to suck less.
+
+To add support for additional platforms, check out the show_cpuinfo()
+func in the linux/arch/<ARCH>/ source tree of the kernel.
+
+--- coreutils/src/uname.c
++++ coreutils/src/uname.c
+@@ -50,6 +50,11 @@
+ # include <mach-o/arch.h>
+ #endif
+
++#if defined(__linux__)
++# define USE_PROCINFO
++# define UNAME_HARDWARE_PLATFORM
++#endif
++
+ #include "system.h"
+ #include "error.h"
+ #include "quote.h"
+@@ -138,6 +143,117 @@
+ exit (status);
+ }
+
++#if defined(USE_PROCINFO)
++
++# if defined(__s390__) || defined(__s390x__)
++# define CPUINFO_FILE "/proc/sysinfo"
++# define CPUINFO_FORMAT "%64[^\t :]%*[ :]%256[^\n]%c"
++# else
++# define CPUINFO_FILE "/proc/cpuinfo"
++# define CPUINFO_FORMAT "%64[^\t:]\t:%256[^\n]%c"
++# endif
++
++# define PROCINFO_PROCESSOR 0
++# define PROCINFO_HARDWARE_PLATFORM 1
++
++static void __eat_cpuinfo_space(char *buf)
++{
++ /* first eat trailing space */
++ char *tmp = buf + strlen(buf) - 1;
++ while (tmp > buf && isspace(*tmp))
++ *tmp-- = '\0';
++ /* then eat leading space */
++ tmp = buf;
++ while (*tmp && isspace(*tmp))
++ tmp++;
++ if (tmp != buf)
++ memmove(buf, tmp, strlen(tmp)+1);
++ /* finally collapse whitespace */
++ tmp = buf;
++ while (tmp[0] && tmp[1]) {
++ if (isspace(tmp[0]) && isspace(tmp[1])) {
++ memmove(tmp, tmp+1, strlen(tmp));
++ continue;
++ }
++ ++tmp;
++ }
++}
++
++static int __linux_procinfo(int x, char *fstr, size_t s)
++{
++ FILE *fp;
++
++ char *procinfo_keys[] = {
++ /* --processor --hardware-platform */
++ #if defined(__alpha__)
++ "cpu model", "system type"
++ #elif defined(__arm__)
++ "Processor", "Hardware"
++ #elif defined(__avr32__)
++ "processor", "cpu family"
++ #elif defined(__bfin__)
++ "CPU", "BOARD Name"
++ #elif defined(__cris__)
++ "cpu", "cpu model"
++ #elif defined(__frv__)
++ "CPU-Core", "System"
++ #elif defined(__i386__) || defined(__x86_64__)
++ "model name", "vendor_id"
++ #elif defined(__ia64__)
++ "family", "vendor"
++ #elif defined(__hppa__)
++ "cpu", "model"
++ #elif defined(__m68k__)
++ "CPU", "MMU"
++ #elif defined(__mips__)
++ "cpu model", "system type"
++ #elif defined(__powerpc__) || defined(__powerpc64__)
++ "cpu", "machine"
++ #elif defined(__s390__) || defined(__s390x__)
++ "Type", "Manufacturer"
++ #elif defined(__sh__)
++ "cpu type", "machine"
++ #elif defined(sparc) || defined(__sparc__)
++ "type", "cpu"
++ #elif defined(__vax__)
++ "cpu type", "cpu"
++ #else
++ "unknown", "unknown"
++ #endif
++ };
++
++ if ((fp = fopen(CPUINFO_FILE, "r")) != NULL) {
++ char key[65], value[257], eol, *ret = NULL;
++
++ while (fscanf(fp, CPUINFO_FORMAT, key, value, &eol) != EOF) {
++ __eat_cpuinfo_space(key);
++ if (!strcmp(key, procinfo_keys[x])) {
++ __eat_cpuinfo_space(value);
++ ret = value;
++ break;
++ }
++ if (eol != '\n') {
++ /* we need two fscanf's here in case the previous
++ * length limit caused us to read right up to the
++ * newline ... doing "%*[^\n]\n" wont eat the newline
++ */
++ fscanf(fp, "%*[^\n]");
++ fscanf(fp, "\n");
++ }
++ }
++ fclose(fp);
++
++ if (ret) {
++ strncpy(fstr, ret, s);
++ return 0;
++ }
++ }
++
++ return -1;
++}
++
++#endif
++
+ /* Print ELEMENT, preceded by a space if something has already been
+ printed. */
+
+@@ -250,10 +344,14 @@ main (int argc, char **argv)
+ if (toprint & PRINT_PROCESSOR)
+ {
+ char const *element = unknown;
+-#if HAVE_SYSINFO && defined SI_ARCHITECTURE
++#if ( HAVE_SYSINFO && defined SI_ARCHITECTURE ) || defined(USE_PROCINFO)
+ {
+ static char processor[257];
++#if defined(USE_PROCINFO)
++ if (0 <= __linux_procinfo (PROCINFO_PROCESSOR, processor, sizeof processor))
++#else
+ if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor))
++#endif
+ element = processor;
+ }
+ #endif
+@@ -306,9 +404,13 @@ main (int argc, char **argv)
+ if (element == unknown)
+ {
+ static char hardware_platform[257];
++#if defined(USE_PROCINFO)
++ if (0 <= __linux_procinfo (PROCINFO_HARDWARE_PLATFORM, hardware_platform, sizeof hardware_platform))
++#else
+ size_t s = sizeof hardware_platform;
+ static int mib[] = { CTL_HW, UNAME_HARDWARE_PLATFORM };
+ if (sysctl (mib, 2, hardware_platform, &s, 0, 0) >= 0)
++#endif
+ element = hardware_platform;
+ }
+ #endif
diff --git a/testing/coreutils/coreutils.install b/testing/coreutils/coreutils.install
new file mode 100644
index 000000000..8caae6686
--- /dev/null
+++ b/testing/coreutils/coreutils.install
@@ -0,0 +1,21 @@
+infodir=usr/share/info
+filelist=(coreutils.info)
+
+post_install() {
+ [ -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
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+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/testing/coreutils/su.pam b/testing/coreutils/su.pam
new file mode 100644
index 000000000..cf15f40f1
--- /dev/null
+++ b/testing/coreutils/su.pam
@@ -0,0 +1,9 @@
+#%PAM-1.0
+auth sufficient pam_rootok.so
+# Uncomment the following line to implicitly trust users in the "wheel" group.
+#auth sufficient pam_wheel.so trust use_uid
+# Uncomment the following line to require a user to be in the "wheel" group.
+#auth required pam_wheel.so use_uid
+auth required pam_unix.so
+account required pam_unix.so
+session required pam_unix.so
diff --git a/testing/cups-pk-helper/PKGBUILD b/testing/cups-pk-helper/PKGBUILD
new file mode 100644
index 000000000..aaeec33b6
--- /dev/null
+++ b/testing/cups-pk-helper/PKGBUILD
@@ -0,0 +1,28 @@
+#$Id: PKGBUILD 119655 2011-04-13 10:39:02Z ibiru $
+# Maintainer: Ionut Biru <ibiru@archlinux.org>
+pkgname=cups-pk-helper
+pkgver=0.1.2
+pkgrel=1
+pkgdesc="A helper that makes system-config-printer use PolicyKit"
+arch=(i686 x86_64)
+url="http://www.freedesktop.org/software/cups-pk-helper/releases/"
+license=('GPL')
+depends=(dbus-glib polkit libcups)
+makedepends=(intltool)
+install=
+source=(http://www.freedesktop.org/software/${pkgname}/releases/${pkgname}-${pkgver}.tar.bz2)
+sha256sums=('ccc5f35c5232b83c16929431b352775dd4c63cb92759ec45a525edb6fcb805df')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --libexecdir=/usr/lib/cups-pk-helper
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/testing/gnome-control-center/PKGBUILD b/testing/gnome-control-center/PKGBUILD
index ee94e2b08..019d63290 100644
--- a/testing/gnome-control-center/PKGBUILD
+++ b/testing/gnome-control-center/PKGBUILD
@@ -1,12 +1,12 @@
-# $Id: PKGBUILD 118383 2011-04-06 14:33:42Z heftig $
+# $Id: PKGBUILD 119658 2011-04-13 10:50:33Z ibiru $
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgname=gnome-control-center
pkgver=3.0.0.1
-pkgrel=1
+pkgrel=2
pkgdesc="The Control Center for GNOME"
arch=('i686' 'x86_64')
-depends=('gtk3' 'gsettings-desktop-schemas' 'gconf' 'gnome-menus' 'gnome-desktop' 'gnome-settings-daemon' 'upower' 'libgtop')
+depends=('gtk3' 'gsettings-desktop-schemas' 'gconf' 'gnome-menus' 'gnome-desktop' 'gnome-settings-daemon' 'upower' 'libgtop' 'cups-pk-helper')
makedepends=('gnome-doc-utils' 'intltool' 'networkmanager')
url="http://www.gnome.org"
groups=('gnome')
diff --git a/testing/less/PKGBUILD b/testing/less/PKGBUILD
new file mode 100644
index 000000000..707787bbb
--- /dev/null
+++ b/testing/less/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 119700 2011-04-13 21:50:08Z allan $
+# Maintainer: Allan McRae <allan@archlinux.org>
+# Contributor: judd <jvinet@zeroflux.org>
+
+pkgname=less
+pkgver=443
+pkgrel=1
+pkgdesc="A terminal based program for viewing text files"
+license=('GPL3')
+arch=('i686' 'x86_64')
+url="http://www.greenwoodsoftware.com/less"
+groups=('base')
+depends=('ncurses' 'pcre')
+source=(http://www.greenwoodsoftware.com/$pkgname/$pkgname-$pkgver.tar.gz)
+md5sums=('47db098fb3cdaf847b3c4be05ee954fc')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ ./configure --prefix=/usr --with-regex=pcre
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make prefix=${pkgdir}/usr install
+ install -dm755 ${pkgdir}/bin
+ mv ${pkgdir}/usr/bin/${pkgname} ${pkgdir}/bin
+}
diff --git a/testing/less/zless b/testing/less/zless
new file mode 100644
index 000000000..93d560bc5
--- /dev/null
+++ b/testing/less/zless
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+: ${PAGER=less}
+export PAGER
+
+PATH="/usr/bin:$PATH"
+export PATH
+
+exec zmore ${1+"$@"}
diff --git a/testing/man-db/PKGBUILD b/testing/man-db/PKGBUILD
index f3f681169..0c4b05652 100644
--- a/testing/man-db/PKGBUILD
+++ b/testing/man-db/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 119509 2011-04-11 20:08:00Z andyrtr $
+# $Id: PKGBUILD 119687 2011-04-13 16:45:31Z andyrtr $
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
# Contributor: Sergej Pupykin <sergej@aur.archlinux.org>
pkgname=man-db
-pkgver=2.6.0.1
+pkgver=2.6.0.2
pkgrel=1
pkgdesc="A utility for reading man pages"
arch=('i686' 'x86_64')
@@ -21,7 +21,7 @@ install=${pkgname}.install
source=(http://savannah.nongnu.org/download/man-db/$pkgname-$pkgver.tar.gz
#http://launchpad.net/man-db/main/${pkgver}/+download/${pkgname}-${pkgver}.tar.gz
convert-mans man-db.cron.daily)
-md5sums=('664519fbee417dc4934f94caf6627fc3'
+md5sums=('2b41c96efec032d2b74ccbf2e401f93e'
'2b7662a7d5b33fe91f9f3e034361a2f6'
'd30c39ae47560304471b5461719e0f03')
options=('!libtool')
diff --git a/testing/man-db/man-db.install b/testing/man-db/man-db.install
index 6a0f36b67..f6f0f27a6 100644
--- a/testing/man-db/man-db.install
+++ b/testing/man-db/man-db.install
@@ -10,9 +10,13 @@ post_upgrade() {
echo "run \"userdel man\". please also"
echo "chown root:root /var/cache/man"
fi
+ # force database rebuild to get rid off badly imported pages
+ if [ "`vercmp $2 2.6.0.2`" -lt 0 ]; then
+ echo "(re)building database..."
+ mandb -c --quiet
+ fi
}
post_remove() {
rm -rf /var/cache/man
}
-
diff --git a/testing/mdadm/PKGBUILD b/testing/mdadm/PKGBUILD
index d6c56b553..b9296a91f 100644
--- a/testing/mdadm/PKGBUILD
+++ b/testing/mdadm/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 117346 2011-03-31 06:36:59Z tpowa $
+# $Id: PKGBUILD 119650 2011-04-13 07:07:09Z tpowa $
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
# Contributor: Judd Vinet <jvinet@zeroflux.org>
pkgname=mdadm
pkgver=3.2.1
-pkgrel=1
+pkgrel=2
pkgdesc="A tool for managing/monitoring Linux md device arrays, also known as Software RAID"
arch=(i686 x86_64)
license=('GPL')
@@ -16,17 +16,14 @@ source=(ftp://ftp.kernel.org/pub/linux/utils/raid/mdadm/mdadm-$pkgver.tar.bz2
mdadm
mdadm.conf
mdadm_install
- mdadm_hook)
+ mdadm_hook
+ segfault-3.2.1.patch)
install=mdadm.install
replaces=('raidtools')
-md5sums=('d1e2549202bd79d9e99f1498d1109530'
- '7bff0e506fb6017510c8ec4a01896952'
- '00cbed931db4f15b6ce49e3e7d433966'
- '865c3d39e5f5dae58388160b563981f1'
- '1a3eb63832cecd6550f5b0a21d58cfdb')
build() {
cd $srcdir/$pkgname-$pkgver
+ patch -Np1 -i ../segfault-3.2.1.patch
make CXFLAGS="$CFLAGS"
}
@@ -43,3 +40,14 @@ package() {
make MDASSEMBLE_AUTO=1 mdassemble
install -D -m755 mdassemble $pkgdir/sbin/mdassemble
}
+md5sums=('5af65c32193fe0aea1aac4c4d44ac383'
+ '7bff0e506fb6017510c8ec4a01896952'
+ '00cbed931db4f15b6ce49e3e7d433966'
+ '865c3d39e5f5dae58388160b563981f1'
+ '1a3eb63832cecd6550f5b0a21d58cfdb')
+md5sums=('d1e2549202bd79d9e99f1498d1109530'
+ '7bff0e506fb6017510c8ec4a01896952'
+ '00cbed931db4f15b6ce49e3e7d433966'
+ '865c3d39e5f5dae58388160b563981f1'
+ '1a3eb63832cecd6550f5b0a21d58cfdb'
+ '2fd25605bd1836a33c689ac442cb73ed')
diff --git a/testing/mdadm/segfault-3.2.1.patch b/testing/mdadm/segfault-3.2.1.patch
new file mode 100644
index 000000000..6042d86c2
--- /dev/null
+++ b/testing/mdadm/segfault-3.2.1.patch
@@ -0,0 +1,68 @@
+From 4019ad07013a5d8618b867f724d1c4a13c5cb05d Mon Sep 17 00:00:00 2001
+From: Jonathan Liu <net147@gmail.com>
+Date: Tue, 12 Apr 2011 18:28:01 +1000
+Subject: [PATCH] Monitor: avoid NULL dereference with 0.90 metadata
+
+0.90 array do not report the metadata type in /proc/mdstat, so
+we cannot assume that mse->metadata_version is non-NULL.
+
+So add an appropriate check.
+
+This adds an additional check missed by commit
+eb28e119b03fd5149886ed516fa4bb006ad3602e.
+
+Signed-off-by: NeilBrown <neilb@suse.de>
+---
+ Monitor.c | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/Monitor.c b/Monitor.c
+index a3ea724..55aebeb 100644
+--- a/Monitor.c
++++ b/Monitor.c
+@@ -577,7 +577,8 @@ static int check_array(struct state *st, struct mdstat_ent *mdstat,
+ info[i].major = info[i].minor = 0;
+ }
+
+- if (strncmp(mse->metadata_version, "external:", 9) == 0 &&
++ if (mse->metadata_version &&
++ strncmp(mse->metadata_version, "external:", 9) == 0 &&
+ is_subarray(mse->metadata_version+9))
+ st->parent_dev =
+ devname2devnum(mse->metadata_version+10);
+--
+1.7.2.3
+
+From eb28e119b03fd5149886ed516fa4bb006ad3602e Mon Sep 17 00:00:00 2001
+From: NeilBrown <neilb@suse.de>
+Date: Tue, 5 Apr 2011 09:16:57 +1000
+Subject: [PATCH] Monitor: avoid NULL dereference with 0.90 metadata
+
+0.90 array do not report the metadata type in /proc/mdstat, so
+we cannot assume that mse->metadata_version is non-NULL.
+
+So add an appropriate check.
+
+Reported-by: Eugene <hdejin@yahoo.com>
+Signed-off-by: NeilBrown <neilb@suse.de>
+---
+ Monitor.c | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/Monitor.c b/Monitor.c
+index 291e465..337785d 100644
+--- a/Monitor.c
++++ b/Monitor.c
+@@ -688,7 +688,8 @@ static int add_new_arrays(struct mdstat_ent *mdstat, struct state **statelist,
+ st->devnum = mse->devnum;
+ st->percent = -2;
+ st->expected_spares = -1;
+- if (strncmp(mse->metadata_version, "external:", 9) == 0 &&
++ if (mse->metadata_version &&
++ strncmp(mse->metadata_version, "external:", 9) == 0 &&
+ is_subarray(mse->metadata_version+9))
+ st->parent_dev =
+ devname2devnum(mse->metadata_version+10);
+--
+1.7.2.3
+
diff --git a/testing/mpd/PKGBUILD b/testing/mpd/PKGBUILD
new file mode 100644
index 000000000..1ef47737e
--- /dev/null
+++ b/testing/mpd/PKGBUILD
@@ -0,0 +1,56 @@
+# $Id: PKGBUILD 119708 2011-04-13 22:45:29Z schiv $
+# Maintainer: Angel Velasquez <angvp@archlinux.org>
+# Contributor: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Damir Perisa <damir.perisa@bluewin.ch>
+# Contributor: Ben <ben@benmazer.net>
+
+pkgname=mpd
+pkgver=0.16.2
+pkgrel=2
+pkgdesc="Music daemon that plays MP3, FLAC, and Ogg Vorbis files"
+arch=('i686' 'x86_64')
+license=('GPL')
+url="http://mpd.wikia.com/wiki/Server"
+depends=('libao' 'ffmpeg' 'libmodplug' 'audiofile' 'libshout' 'libmad' 'curl' 'faad2'
+ 'sqlite3' 'libsamplerate' 'libmms' 'wavpack' 'libmpcdec' 'avahi' 'libid3tag'
+ 'libpulse')
+makedepends=('pkgconfig' 'doxygen' 'jack')
+install=${pkgname}.install
+source=("http://downloads.sourceforge.net/musicpd/${pkgname}-${pkgver}.tar.bz2"
+ 'mpd')
+md5sums=('dedb75cef8e489f3de5231031876fb77'
+ 'e5669c2bff4031928531e52475addeb1')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --enable-lastfm \
+ --enable-jack \
+ --enable-pulse \
+ --enable-documentation \
+ --disable-libwrap \
+ --disable-cue \
+ --disable-sidplay
+ make
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make DESTDIR=${pkgdir} install
+
+ # set ours dirs in mpd.conf file
+ sed -i 's|^music_directory.*$|#music_directory "path_to_your_music_collection"|1' doc/mpdconf.example
+ sed -i 's|playlist_directory.*$|playlist_directory "/var/lib/mpd/playlists"|1' doc/mpdconf.example
+ sed -i 's|db_file.*$|db_file "/var/lib/mpd/mpd.db"|1' doc/mpdconf.example
+ sed -i 's|log_file.*$|log_file "/var/log/mpd/mpd.log"|1' doc/mpdconf.example
+ sed -i 's|error_file.*$|error_file "/var/log/mpd/mpd.error"|1' doc/mpdconf.example
+ sed -i 's|#pid_file.*$|pid_file "/var/run/mpd/mpd.pid"|1' doc/mpdconf.example
+ sed -i 's|#state_file.*$|state_file "/var/lib/mpd/mpdstate"|1' doc/mpdconf.example
+ sed -i 's|#user.*$|user "mpd"|1' doc/mpdconf.example
+
+ install -Dm644 doc/mpdconf.example ${pkgdir}/usr/share/mpd/mpd.conf.example
+
+ install -Dm755 ${srcdir}/mpd ${pkgdir}/etc/rc.d/mpd
+ install -d ${pkgdir}/var/{lib/mpd/playlists,log/mpd}
+}
diff --git a/testing/mpd/mpd b/testing/mpd/mpd
new file mode 100755
index 000000000..6134e2ed4
--- /dev/null
+++ b/testing/mpd/mpd
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+ stat_busy "Starting Music Player Daemon"
+ [ ! -d /var/run/mpd ] && install -d -g 45 -o 45 /var/run/mpd
+ /usr/bin/mpd /etc/mpd.conf &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon mpd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Music Player Daemon"
+ /usr/bin/mpd --kill /etc/mpd.conf &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon mpd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/testing/mpd/mpd.install b/testing/mpd/mpd.install
new file mode 100644
index 000000000..885505a07
--- /dev/null
+++ b/testing/mpd/mpd.install
@@ -0,0 +1,18 @@
+post_install() {
+ post_upgrade
+ echo "==> Create a configuration file /etc/mpd.conf before using MPD (example: /usr/share/mpd/mpd.conf.example)"
+}
+
+post_upgrade() {
+ getent group "mpd" &>/dev/null || groupadd -r -g 45 mpd 1>/dev/null
+ getent passwd "mpd" &>/dev/null || useradd -r -u 45 -g mpd -d "/var/lib/mpd" -s "/bin/true" -G "audio" mpd 1>/dev/null
+ for dir in /var/{lib,log}/mpd; do
+ chown -R mpd:mpd "$dir" 1>/dev/null
+ done
+}
+
+post_remove() {
+ getent passwd "mpd" &>/dev/null && userdel mpd 1>/dev/null
+ getent group "mpd" &>/dev/null && groupdel mpd 1>/dev/null
+ [ -f etc/mpd.conf ] && mv etc/mpd.conf etc/mpd.conf.pacsave 1>/dev/null
+}
diff --git a/testing/opencv/PKGBUILD b/testing/opencv/PKGBUILD
new file mode 100644
index 000000000..b371f6930
--- /dev/null
+++ b/testing/opencv/PKGBUILD
@@ -0,0 +1,78 @@
+# $Id: PKGBUILD 119711 2011-04-13 23:48:14Z schiv $
+# Maintainer: Ray Rashif <schiv@archlinux.org>
+# Contributor: Tobias Powalowski <tpowa@archlinux.org>
+
+pkgname=opencv
+_realname=OpenCV
+pkgver=2.2.0
+pkgrel=4
+pkgdesc="Open Source Computer Vision Library"
+arch=('i686' 'x86_64')
+license=('BSD')
+url="http://opencv.willowgarage.com"
+depends=('jasper' 'gstreamer0.10-base' 'openexr'
+ 'gtk2' 'xine-lib' 'libdc1394' 'v4l-utils')
+makedepends=('pkg-config' 'cmake' 'doxygen'
+ 'python2-numpy' 'eigen')
+optdepends=('eigen'
+ 'python2-numpy')
+options=('!libtool')
+source=(http://downloads.sourceforge.net/opencvlibrary/$_realname-$pkgver.tar.bz2
+ ptrcvcapture.patch
+ gcc46.patch
+ nov4l1.patch)
+md5sums=('122c9ac793a46854ef2819fedbbd6b1b'
+ '461a8b1b0f2264521e13d9ae051d13be'
+ 'b5fb8d6786578ae7bf272615279e8865'
+ '0164bdbd54ee28b1f6cba20fcfd53812')
+
+build() {
+ cd "$srcdir/$_realname-$pkgver"
+
+ # Please do not remove any patches from trunk #
+
+ # libpng 1.4 compatibility
+ #patch -Np1 -i "$srcdir/libpng-1.4.patch"
+
+ # fix v4l issue
+ #patch -Np0 -i "$srcdir/v4l-mmap.patch"
+
+ # fix ffmpeg-related C++ issue
+ # see http://code.google.com/p/ffmpegsource/source/detail?r=311
+ #export CXXFLAGS="$CXXFLAGS -D__STDC_CONSTANT_MACROS"
+
+ # fix linking against highgui
+ # see https://bugs.archlinux.org/task/22841
+ patch -Np0 -i "$srcdir/ptrcvcapture.patch"
+
+ # gcc 4.6 compatibility
+ # see https://bugs.archlinux.org/task/23741
+ patch -Np3 -i "$srcdir/gcc46.patch"
+
+ # distro kernel no longer has v4l1
+ # see https://code.ros.org/trac/opencv/ticket/862
+ patch -Np1 -i "$srcdir/nov4l1.patch"
+
+ cmake . -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DWITH_XINE=ON \
+ -DWITH_UNICAP=OFF \
+ -DBUILD_EXAMPLES=ON \
+ -DBUILD_TESTS=OFF \
+ -DINSTALL_C_EXAMPLES=ON \
+ -DINSTALL_PYTHON_EXAMPLES=ON
+ make
+}
+
+package() {
+ cd "$srcdir/$_realname-$pkgver"
+
+ make DESTDIR="$pkgdir/" install
+
+ # install license file
+ install -Dm644 "$srcdir/$_realname-$pkgver/doc/license.txt" \
+ "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/testing/opencv/gcc46.patch b/testing/opencv/gcc46.patch
new file mode 100644
index 000000000..a69499b4f
--- /dev/null
+++ b/testing/opencv/gcc46.patch
@@ -0,0 +1,10 @@
+Index: /trunk/opencv/modules/core/include/opencv2/core/core.hpp
+===================================================================
+--- /trunk/opencv/modules/core/include/opencv2/core/core.hpp (revision 4804)
++++ /trunk/opencv/modules/core/include/opencv2/core/core.hpp (revision 4861)
+@@ -56,4 +56,5 @@
+ #include <algorithm>
+ #include <cmath>
++#include <cstddef>
+ #include <complex>
+ #include <map>
diff --git a/testing/opencv/libpng-1.4.patch b/testing/opencv/libpng-1.4.patch
new file mode 100644
index 000000000..c34c5a58a
--- /dev/null
+++ b/testing/opencv/libpng-1.4.patch
@@ -0,0 +1,12 @@
+diff -Naur OpenCV-2.0.0-orig/src/highgui/grfmt_png.cpp OpenCV-2.0.0/src/highgui/grfmt_png.cpp
+--- OpenCV-2.0.0-orig/src/highgui/grfmt_png.cpp 2010-01-21 01:08:46.000000000 -0500
++++ OpenCV-2.0.0/src/highgui/grfmt_png.cpp 2010-01-21 01:13:11.000000000 -0500
+@@ -223,7 +223,7 @@
+ png_set_palette_to_rgb( png_ptr );
+
+ if( m_color_type == PNG_COLOR_TYPE_GRAY && m_bit_depth < 8 )
+- png_set_gray_1_2_4_to_8( png_ptr );
++ png_set_expand_gray_1_2_4_to_8( png_ptr );
+
+ if( CV_MAT_CN(m_type) > 1 && color )
+ png_set_bgr( png_ptr ); // convert RGB to BGR
diff --git a/testing/opencv/nov4l1.patch b/testing/opencv/nov4l1.patch
new file mode 100644
index 000000000..cacdd77b7
--- /dev/null
+++ b/testing/opencv/nov4l1.patch
@@ -0,0 +1,25 @@
+diff -up OpenCV-2.2.0/modules/highgui/src/cap_v4l.cpp.nov4l1 OpenCV-2.2.0/modules/highgui/src/cap_v4l.cpp
+--- OpenCV-2.2.0/modules/highgui/src/cap_v4l.cpp.nov4l1 2011-02-02 16:55:22.844244001 +0100
++++ OpenCV-2.2.0/modules/highgui/src/cap_v4l.cpp 2011-02-02 16:53:22.224244002 +0100
+@@ -214,7 +214,9 @@ make & enjoy!
+ #include <sys/types.h>
+ #include <sys/mman.h>
+
++#ifdef HAVE_CAMV4L
+ #include <linux/videodev.h>
++#endif
+
+ #include <string.h>
+ #include <stdlib.h>
+diff -up OpenCV-2.2.0/modules/highgui/src/cap.cpp.nov4l1 OpenCV-2.2.0/modules/highgui/src/cap.cpp
+--- OpenCV-2.2.0/modules/highgui/src/cap.cpp.nov4l1 2011-02-04 15:10:51.461243999 +0100
++++ OpenCV-2.2.0/modules/highgui/src/cap.cpp 2011-02-04 15:11:22.040244001 +0100
+@@ -171,7 +171,7 @@ CV_IMPL CvCapture * cvCreateCameraCaptur
+ if (capture)
+ return capture;
+ #endif
+- #if defined (HAVE_CAMV4L) || defined (HAVE_CAMV4L2)
++ #if defined (HAVE_CAMV4L)
+ capture = cvCreateCameraCapture_V4L (index);
+ if (capture)
+ return capture;
diff --git a/testing/opencv/ptrcvcapture.patch b/testing/opencv/ptrcvcapture.patch
new file mode 100644
index 000000000..c1316f0ea
--- /dev/null
+++ b/testing/opencv/ptrcvcapture.patch
@@ -0,0 +1,17 @@
+Index: modules/highgui/src/cap.cpp
+===================================================================
+--- modules/highgui/src/cap.cpp (revision 4283)
++++ modules/highgui/src/cap.cpp (working copy)
+@@ -52,10 +52,10 @@
+ namespace cv
+ {
+
+-template<> inline void Ptr<CvCapture>::delete_obj()
++template<> void Ptr<CvCapture>::delete_obj()
+ { cvReleaseCapture(&obj); }
+
+-template<> inline void Ptr<CvVideoWriter>::delete_obj()
++template<> void Ptr<CvVideoWriter>::delete_obj()
+ { cvReleaseVideoWriter(&obj); }
+
+ }
diff --git a/testing/opencv/v4l-mmap.patch b/testing/opencv/v4l-mmap.patch
new file mode 100644
index 000000000..b7bbc9b74
--- /dev/null
+++ b/testing/opencv/v4l-mmap.patch
@@ -0,0 +1,14 @@
+http://code.ros.org/trac/opencv/ticket/141
+http://bugs.gentoo.org/313649
+
+--- src/highgui/cvcap_libv4l.cpp
++++ src/highgui/cvcap_libv4l.cpp
+@@ -782,7 +782,7 @@
+
+ capture->buffers[n_buffers].length = buf.length;
+ capture->buffers[n_buffers].start =
+- mmap (NULL /* start anywhere */,
++ v4l2_mmap (NULL /* start anywhere */,
+ buf.length,
+ PROT_READ | PROT_WRITE /* required */,
+ MAP_SHARED /* recommended */,
diff --git a/testing/python2/PKGBUILD b/testing/python2/PKGBUILD
new file mode 100644
index 000000000..2dadb1ec3
--- /dev/null
+++ b/testing/python2/PKGBUILD
@@ -0,0 +1,90 @@
+# $Id: PKGBUILD 119684 2011-04-13 16:35:24Z stephane $
+# Maintainer: Allan McRae <allan@archlinux.org>
+# Contributer: Stéphane Gaudreault <stephane@archlinux.org>
+# Contributer: Jason Chu <jason@archlinux.org>
+
+pkgname=python2
+pkgver=2.7.1
+pkgrel=8
+_pybasever=2.7
+pkgdesc="A high-level scripting language"
+arch=('i686' 'x86_64')
+license=('PSF')
+url="http://www.python.org/"
+depends=('db' 'bzip2' 'gdbm' 'openssl' 'zlib' 'expat' 'sqlite3' 'libffi')
+makedepends=('tk')
+optdepends=('tk: for IDLE')
+conflicts=('python<3')
+options=('!makeflags')
+source=(http://www.python.org/ftp/python/${pkgver}/Python-${pkgver}.tar.bz2
+ python-2.7-db51.diff
+ python-2.7.1-fix-decimal-in-turkish-locale.patch)
+md5sums=('aa27bc25725137ba155910bd8e5ddc4f'
+ 'd9b8161568ce17a305c1b71e61ccd4b5'
+ '5032449f1ff2abfe18d14cc674165b23')
+
+build() {
+ cd "${srcdir}/Python-${pkgver}"
+
+ patch -Np1 -i ../python-2.7-db51.diff
+
+ # Fix "import decimal" in the Turkish locale
+ # cf : https://bugzilla.redhat.com/show_bug.cgi?id=694928
+ patch -Np1 -i ../python-2.7.1-fix-decimal-in-turkish-locale.patch
+
+ # Temporary workaround for FS#22322
+ # See http://bugs.python.org/issue10835 for upstream report
+ sed -i "/progname =/s/python/python${_pybasever}/" Python/pythonrun.c
+
+ # Enable built-in SQLite3 module to load extensions (fix FS#22122)
+ sed -i "/SQLITE_OMIT_LOAD_EXTENSION/d" setup.py
+
+ # Ensure that we are using the system copy of various libraries (expat, zlib and libffi),
+ # rather than copies shipped in the tarball
+ rm -r Modules/expat
+ rm -r Modules/zlib
+ rm -r Modules/_ctypes/{darwin,libffi}*
+
+ export OPT="${CFLAGS}"
+ ./configure --prefix=/usr --enable-shared --with-threads --enable-ipv6 \
+ --enable-unicode=ucs4 --with-system-expat --with-system-ffi
+
+ make
+}
+
+package() {
+ cd "${srcdir}/Python-${pkgver}"
+ make DESTDIR="${pkgdir}" altinstall maninstall
+
+ ln -sf python${_pybasever} "${pkgdir}/usr/bin/python2"
+ ln -sf python${_pybasever}-config "${pkgdir}/usr/bin/python2-config"
+ ln -sf python${_pybasever}.1 "${pkgdir}/usr/share/man/man1/python2.1"
+
+ ln -sf ../../libpython${_pybasever}.so \
+ "${pkgdir}/usr/lib/python${_pybasever}/config/libpython${_pybasever}.so"
+
+ mv "${pkgdir}/usr/bin/smtpd.py" "${pkgdir}/usr/lib/python${_pybasever}/"
+
+ # some useful "stuff"
+ install -dm755 "${pkgdir}"/usr/lib/python${_pybasever}/Tools/{i18n,scripts}
+ install -m755 Tools/i18n/{msgfmt,pygettext}.py \
+ "${pkgdir}/usr/lib/python${_pybasever}/Tools/i18n/"
+ install -m755 Tools/scripts/{README,*py} \
+ "${pkgdir}/usr/lib/python${_pybasever}/Tools/scripts/"
+
+ # fix conflicts with python
+ mv "${pkgdir}"/usr/bin/idle{,2}
+ mv "${pkgdir}"/usr/bin/pydoc{,2}
+ mv "${pkgdir}"/usr/bin/2to3{,-2.7}
+
+ # clean up #!s
+ find "${pkgdir}/usr/lib/python${_pybasever}/" -name '*.py' | \
+ xargs sed -i "s|#[ ]*![ ]*/usr/bin/env python$|#!/usr/bin/env python2|"
+
+ # clean-up reference to build directory
+ sed -i "s#${srcdir}/Python-${pkgver}:##" \
+ "${pkgdir}/usr/lib/python${_pybasever}/config/Makefile"
+
+ # license
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/testing/python2/python-2.7-db51.diff b/testing/python2/python-2.7-db51.diff
new file mode 100644
index 000000000..2da95c375
--- /dev/null
+++ b/testing/python2/python-2.7-db51.diff
@@ -0,0 +1,42 @@
+diff -Naur Python-2.7-orig//Modules/_bsddb.c Python-2.7/Modules/_bsddb.c
+--- Python-2.7-orig//Modules/_bsddb.c 2010-05-10 00:46:46.000000000 +1000
++++ Python-2.7/Modules/_bsddb.c 2010-10-20 13:19:26.436669911 +1000
+@@ -9765,8 +9765,11 @@
+
+ ADD_INT(d, DB_REP_PERMANENT);
+
+-#if (DBVER >= 44)
++#if (DBVER >= 44) && (DBVER <= 48)
+ ADD_INT(d, DB_REP_CONF_NOAUTOINIT);
++#endif
++
++#if (DBVER >= 44)
+ ADD_INT(d, DB_REP_CONF_DELAYCLIENT);
+ ADD_INT(d, DB_REP_CONF_BULK);
+ ADD_INT(d, DB_REP_CONF_NOWAIT);
+diff -Naur Python-2.7-orig//setup.py Python-2.7/setup.py
+--- Python-2.7-orig//setup.py 2010-06-27 22:36:16.000000000 +1000
++++ Python-2.7/setup.py 2010-10-20 13:10:48.256670026 +1000
+@@ -765,7 +765,7 @@
+ # a release. Most open source OSes come with one or more
+ # versions of BerkeleyDB already installed.
+
+- max_db_ver = (4, 8)
++ max_db_ver = (5, 1)
+ min_db_ver = (4, 1)
+ db_setup_debug = False # verbose debug prints from this script?
+
+@@ -787,8 +787,12 @@
+ return True
+
+ def gen_db_minor_ver_nums(major):
+- if major == 4:
++ if major == 5:
+ for x in range(max_db_ver[1]+1):
++ if allow_db_ver((5, x)):
++ yield x
++ if major == 4:
++ for x in range(9):
+ if allow_db_ver((4, x)):
+ yield x
+ elif major == 3:
diff --git a/testing/python2/python-2.7.1-fix-decimal-in-turkish-locale.patch b/testing/python2/python-2.7.1-fix-decimal-in-turkish-locale.patch
new file mode 100644
index 000000000..57f527f40
--- /dev/null
+++ b/testing/python2/python-2.7.1-fix-decimal-in-turkish-locale.patch
@@ -0,0 +1,48 @@
+diff -up Python-2.7.1/Lib/decimal.py.fix-decimal-in-turkish-locale Python-2.7.1/Lib/decimal.py
+--- Python-2.7.1/Lib/decimal.py.fix-decimal-in-turkish-locale 2010-07-08 17:22:54.000000000 -0400
++++ Python-2.7.1/Lib/decimal.py 2011-04-12 11:30:40.850350842 -0400
+@@ -1720,8 +1720,6 @@ class Decimal(object):
+ # here self was representable to begin with; return unchanged
+ return Decimal(self)
+
+- _pick_rounding_function = {}
+-
+ # for each of the rounding functions below:
+ # self is a finite, nonzero Decimal
+ # prec is an integer satisfying 0 <= prec < len(self._int)
+@@ -1788,6 +1786,17 @@ class Decimal(object):
+ else:
+ return -self._round_down(prec)
+
++ _pick_rounding_function = dict(
++ ROUND_DOWN = '_round_down',
++ ROUND_UP = '_round_up',
++ ROUND_HALF_UP = '_round_half_up',
++ ROUND_HALF_DOWN = '_round_half_down',
++ ROUND_HALF_EVEN = '_round_half_even',
++ ROUND_CEILING = '_round_ceiling',
++ ROUND_FLOOR = '_round_floor',
++ ROUND_05UP = '_round_05up',
++ )
++
+ def fma(self, other, third, context=None):
+ """Fused multiply-add.
+
+@@ -3705,18 +3714,6 @@ _numbers.Number.register(Decimal)
+
+ ##### Context class #######################################################
+
+-
+-# get rounding method function:
+-rounding_functions = [name for name in Decimal.__dict__.keys()
+- if name.startswith('_round_')]
+-for name in rounding_functions:
+- # name is like _round_half_even, goes to the global ROUND_HALF_EVEN value.
+- globalname = name[1:].upper()
+- val = globals()[globalname]
+- Decimal._pick_rounding_function[val] = name
+-
+-del name, val, globalname, rounding_functions
+-
+ class _ContextManager(object):
+ """Context manager class to support localcontext().