From f7a5886fa9fe4cbd52d8f17df785ac8e4d0b80df Mon Sep 17 00:00:00 2001 From: Michał Masłowski Date: Tue, 14 Feb 2012 18:27:16 +0100 Subject: Rebuild gimp-gap for lib32. --- extra/gimp-gap/PKGBUILD | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'extra') diff --git a/extra/gimp-gap/PKGBUILD b/extra/gimp-gap/PKGBUILD index 41f576c52..4e1226000 100644 --- a/extra/gimp-gap/PKGBUILD +++ b/extra/gimp-gap/PKGBUILD @@ -4,7 +4,7 @@ pkgname=gimp-gap pkgver=2.6.0 -pkgrel=3 +pkgrel=3.1 pkgdesc="A Plug-In collection to edit and create animations for the Gimp" arch=('i686' 'x86_64' 'mips64el') license=('GPL') @@ -17,7 +17,8 @@ md5sums=('249ed829de8b78675c0fe4ef4212089f') build() { cd "$srcdir/$pkgname-$pkgver" - [ "$CARCH" = "x86_64" ] && CFLAGS+="-fPIC" + [ "$CARCH" != "i686" ] && CFLAGS+=" -fPIC" + sed -ri 's/^gap_(plugins|morph)_LDADD .+$/& -lm/' gap/Makefile.in ./configure --prefix=/usr make } -- cgit v1.2.3-54-g00ecf From 2216fe3d6784df5cda95befcada5885a7099edb4 Mon Sep 17 00:00:00 2001 From: Michał Masłowski Date: Tue, 14 Feb 2012 20:01:55 +0100 Subject: Rebuild apr for grep move. --- extra/apr/PKGBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'extra') diff --git a/extra/apr/PKGBUILD b/extra/apr/PKGBUILD index 717f31bd8..52e386797 100644 --- a/extra/apr/PKGBUILD +++ b/extra/apr/PKGBUILD @@ -5,7 +5,7 @@ pkgname=apr pkgver=1.4.5 -pkgrel=2 +pkgrel=2.1 pkgdesc="The Apache Portable Runtime" arch=('i686' 'x86_64' 'mips64el') url="http://apr.apache.org/" -- cgit v1.2.3-54-g00ecf From b71d5073741581206df880b70696680e743abbeb Mon Sep 17 00:00:00 2001 From: Michał Masłowski Date: Tue, 14 Feb 2012 23:09:03 +0100 Subject: Rebuild libglade for new libpng. --- extra/libglade/PKGBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'extra') diff --git a/extra/libglade/PKGBUILD b/extra/libglade/PKGBUILD index e1c71bf59..53dce90a0 100644 --- a/extra/libglade/PKGBUILD +++ b/extra/libglade/PKGBUILD @@ -3,7 +3,7 @@ pkgname=libglade pkgver=2.6.4 -pkgrel=2 +pkgrel=2.1 pkgdesc="Allows you to load glade interface files in a program at runtime" arch=(i686 x86_64 'mips64el') license=('LGPL') -- cgit v1.2.3-54-g00ecf From 812b715ebd89fb9049df7000c721990084b525c6 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 14 Feb 2012 23:14:55 +0000 Subject: Tue Feb 14 23:14:55 UTC 2012 --- community/freerdp/PKGBUILD | 8 +- community/gsoap/PKGBUILD | 6 +- community/pari/PKGBUILD | 10 +- community/pigeonhole/PKGBUILD | 16 +- community/remmina/PKGBUILD | 4 +- community/virtviewer/PKGBUILD | 8 +- core/dhcpcd/PKGBUILD | 11 +- extra/basket/PKGBUILD | 14 +- extra/basket/basket.install | 1 + extra/brltty/PKGBUILD | 28 +- extra/brltty/brltty.install | 20 + extra/dovecot/PKGBUILD | 9 +- extra/garcon/PKGBUILD | 6 +- extra/maxima/PKGBUILD | 8 +- extra/octave/PKGBUILD | 8 +- extra/qscintilla/PKGBUILD | 9 +- extra/xfce4-mpc-plugin/PKGBUILD | 27 +- extra/xfce4-session/PKGBUILD | 8 +- multilib-testing/lib32-libxcb/PKGBUILD | 41 + .../lib32-libxcb/libxcb-1.1-no-pthread-stubs.patch | 12 + staging/libnova/PKGBUILD | 27 + staging/sip/PKGBUILD | 54 + ...ule-probe-fix-infinite-loop-with-softdeps.patch | 39 + testing/kmod/PKGBUILD | 11 +- testing/shadow/LICENSE | 31 + testing/shadow/PKGBUILD | 116 ++ testing/shadow/adduser | 399 +++++ testing/shadow/chgpasswd | 4 + testing/shadow/chpasswd | 6 + testing/shadow/defaults.pam | 6 + testing/shadow/login | 21 + testing/shadow/login.defs | 197 +++ testing/shadow/newusers | 6 + testing/shadow/passwd | 4 + testing/shadow/shadow-add-missing-include.patch | 11 + testing/shadow/shadow-strncpy-usage.patch | 25 + testing/shadow/shadow.cron.daily | 6 + testing/shadow/shadow.install | 9 + testing/shadow/useradd.defaults | 9 + testing/shadow/xstrdup.patch | 9 + testing/xf86-video-sis/PKGBUILD | 19 +- testing/xf86-video-sis/git-f5dafa24.patch | 1654 ++++++++++++++++++++ 42 files changed, 2817 insertions(+), 100 deletions(-) create mode 100644 extra/brltty/brltty.install create mode 100644 multilib-testing/lib32-libxcb/PKGBUILD create mode 100644 multilib-testing/lib32-libxcb/libxcb-1.1-no-pthread-stubs.patch create mode 100644 staging/libnova/PKGBUILD create mode 100644 staging/sip/PKGBUILD create mode 100644 testing/kmod/0001-libkmod-module-probe-fix-infinite-loop-with-softdeps.patch create mode 100644 testing/shadow/LICENSE create mode 100644 testing/shadow/PKGBUILD create mode 100644 testing/shadow/adduser create mode 100644 testing/shadow/chgpasswd create mode 100644 testing/shadow/chpasswd create mode 100644 testing/shadow/defaults.pam create mode 100644 testing/shadow/login create mode 100644 testing/shadow/login.defs create mode 100644 testing/shadow/newusers create mode 100644 testing/shadow/passwd create mode 100644 testing/shadow/shadow-add-missing-include.patch create mode 100644 testing/shadow/shadow-strncpy-usage.patch create mode 100755 testing/shadow/shadow.cron.daily create mode 100644 testing/shadow/shadow.install create mode 100644 testing/shadow/useradd.defaults create mode 100644 testing/shadow/xstrdup.patch create mode 100644 testing/xf86-video-sis/git-f5dafa24.patch (limited to 'extra') diff --git a/community/freerdp/PKGBUILD b/community/freerdp/PKGBUILD index 1d53ff9d9..7667c43d3 100644 --- a/community/freerdp/PKGBUILD +++ b/community/freerdp/PKGBUILD @@ -1,17 +1,17 @@ -# $Id: PKGBUILD 64418 2012-02-13 04:02:27Z spupykin $ +# $Id: PKGBUILD 64460 2012-02-14 00:48:20Z spupykin $ # Maintainer: Sergej Pupykin # Contributor: Stijn Segers pkgname=freerdp pkgver=1.0.1 -pkgrel=1 +pkgrel=3 pkgdesc="Free RDP client" arch=('i686' 'x86_64') url="http://freerdp.sourceforge.net" license=('GPL') depends=('openssl' 'libxcursor' 'libcups' 'alsa-lib' 'libxext' 'libxdamage' 'ffmpeg' 'libxkbfile' 'libxinerama' 'libxv') -makedepends=('krb5' 'cmake' 'damageproto') +makedepends=('krb5' 'cmake' 'damageproto' 'xmlto' 'docbook-xsl') conflicts=('freerdp-git') changelog=${pkgname}.changelog options=('!libtool') @@ -20,7 +20,7 @@ md5sums=('1282189a87893bf196da20382e45f6c1') build() { cd `find ${srcdir}/ -type d -name FreeRDP-\*` - cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib . + cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib . make } diff --git a/community/gsoap/PKGBUILD b/community/gsoap/PKGBUILD index 0e8d448c8..da3ed0a7e 100644 --- a/community/gsoap/PKGBUILD +++ b/community/gsoap/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 60745 2011-12-17 14:07:20Z spupykin $ +# $Id: PKGBUILD 64430 2012-02-13 06:18:52Z spupykin $ # Maintainer: Sergej Pupykin # Contributor: Tor Krill # Contributor: Lee.MaRS pkgname=gsoap -pkgver=2.8.6 +pkgver=2.8.7 pkgrel=1 pkgdesc="Offers an XML language binding to ease the development of SOAP/XML Web services in C and C/C++" url="http://www.cs.fsu.edu/~engelen/soap.html" @@ -14,7 +14,7 @@ depends=('openssl' 'zlib' 'gcc-libs') makedepends=('autoconf' 'automake') source=(http://prdownloads.sourceforge.net/gsoap2/${pkgname}_${pkgver}.zip LICENSE) -md5sums=('c0b962c6216bcf59255dc4288783252f' +md5sums=('48a8dfddffd8f10b3ca82a6a9583e206' '27aaa3f5166db94d44044c11a7b2c37b') build() { diff --git a/community/pari/PKGBUILD b/community/pari/PKGBUILD index 770b1133c..35f4fe186 100644 --- a/community/pari/PKGBUILD +++ b/community/pari/PKGBUILD @@ -1,18 +1,18 @@ -# $Id: PKGBUILD 56828 2011-10-14 00:16:01Z bisson $ +# $Id: PKGBUILD 64451 2012-02-13 22:53:47Z bisson $ # Maintainer: Gaetan Bisson pkgname=pari -pkgver=2.5.0 -pkgrel=2 +pkgver=2.5.1 +pkgrel=1 pkgdesc='Computer algebra system designed for fast computations in number theory' -arch=('i686' 'x86_64') url='http://pari.math.u-bordeaux.fr/' license=('GPL') +arch=('i686' 'x86_64') depends=('gmp' 'readline' 'libx11') makedepends=('perl' 'texlive-core') optdepends=('perl: gphelp, tex2mail') source=("${url}pub/pari/unix/${pkgname}-${pkgver}.tar.gz") -sha1sums=('d96250cd8b3e426f548a832f2f44fdfd30fd32b6') +sha1sums=('c83314bb993161a60e1e46ae7616072858414354') build() { cd "${srcdir}/${pkgname}-${pkgver}" diff --git a/community/pigeonhole/PKGBUILD b/community/pigeonhole/PKGBUILD index 745d29a9c..547694360 100644 --- a/community/pigeonhole/PKGBUILD +++ b/community/pigeonhole/PKGBUILD @@ -4,12 +4,12 @@ # This must be built against the version of dovecot being used, # else mail delivery will fail. # Specify the version of dovecot to be used here: -_dcpkgver=2.0.17 +_dcpkgver=2.0.18 # Make sure to bump pkgrel if changing this. pkgname=pigeonhole -pkgver=0.2.5 -pkgrel=2 +pkgver=0.2.6 +pkgrel=1 pkgdesc="Fully rewritten Sieve implementation for Dovecot v2.0" arch=('i686' 'x86_64') url="http://pigeonhole.dovecot.org/" @@ -18,10 +18,10 @@ depends=('dovecot='$_dcpkgver) makedepends=() conflicts=('dovecot-sieve' 'pigeonhole-hg') source=("http://www.rename-it.nl/dovecot/2.0/dovecot-2.0-$pkgname-$pkgver.tar.gz" - "dovecot.conf") + "dovecot.conf") options=('!libtool') -md5sums=('f50151dd20eb5acbac2b546e586f2d43' - '564b771c339f69a477c06babf53e11c2') +sha256sums=('49829e4aed763848b63b2bf9e288d4bc94020c924ce0621bc850e0a4bf4821ab' + 'a457a1691cfa82495fc0503bfa4b61e54b149e63400fe0f568dff2c24a3f7858') build() { cd "$srcdir/dovecot-2.0-$pkgname-$pkgver" @@ -32,9 +32,9 @@ build() { package() { cd "$srcdir/dovecot-2.0-$pkgname-$pkgver" - + make DESTDIR="$pkgdir/" install install -m 644 -D "$srcdir/dovecot.conf" "$pkgdir/etc/ld.so.conf.d/dovecot.conf" -} +} diff --git a/community/remmina/PKGBUILD b/community/remmina/PKGBUILD index fb0ec9527..594599ac9 100644 --- a/community/remmina/PKGBUILD +++ b/community/remmina/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 64408 2012-02-13 02:27:42Z spupykin $ +# $Id: PKGBUILD 64462 2012-02-14 00:49:08Z spupykin $ # Maintainer: Sergej Pupykin pkgname=remmina pkgver=1.0.0 -pkgrel=1 +pkgrel=2 pkgdesc="Remmina is a remote desktop client written in GTK+. " arch=(i686 x86_64) url="http://sourceforge.net/projects/remmina/" diff --git a/community/virtviewer/PKGBUILD b/community/virtviewer/PKGBUILD index 1798634b9..d4cd88bc5 100644 --- a/community/virtviewer/PKGBUILD +++ b/community/virtviewer/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 63765 2012-02-05 12:13:04Z ibiru $ +# $Id: PKGBUILD 64445 2012-02-13 15:08:55Z spupykin $ # Maintainer: Sergej Pupykin # Maintainer: Jonathan Wiersma pkgname=virtviewer -pkgver=0.4.1 -pkgrel=2 +pkgver=0.4.2 +pkgrel=1 pkgdesc="A lightweight interface for interacting with the graphical display of virtualized guest OS." depends=('gtk-vnc' 'libglade>=2.6.0' 'libvirt') makedepends=('intltool') @@ -12,7 +12,7 @@ url="http://virt-manager.et.redhat.com" arch=('i686' 'x86_64') license=('GPL') source=("http://virt-manager.et.redhat.com/download/sources/virt-viewer/virt-viewer-$pkgver.tar.gz") -md5sums=('1cc86ed3fbbe37a56faa6476b2e6dbcd') +md5sums=('4fc003cb655aa45b77c9f2ee45ba6d4f') build() { cd $srcdir/virt-viewer-$pkgver diff --git a/core/dhcpcd/PKGBUILD b/core/dhcpcd/PKGBUILD index 500de0241..3cc3378cc 100644 --- a/core/dhcpcd/PKGBUILD +++ b/core/dhcpcd/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 142553 2011-11-12 07:19:26Z allan $ +# $Id: PKGBUILD 150154 2012-02-13 15:50:03Z ronald $ # Maintainer: Ronald van Haren # Contributor: Tom Killian # Contributor: Judd Vinet pkgname=dhcpcd -pkgver=5.2.12 -pkgrel=4 +pkgver=5.5.4 +pkgrel=1 pkgdesc="RFC2131 compliant DHCP client daemon" url="http://roy.marples.name/dhcpcd/" arch=('i686' 'x86_64') @@ -17,7 +17,7 @@ options=('emptydirs') # We Need the Empty /var/lib/dhcpcd Directory source=("http://roy.marples.name/downloads/$pkgname/$pkgname-$pkgver.tar.bz2" \ 'dhcpcd.conf.d' '0001-Set-hostname-via-proc-if-file-is-available.patch' \ '0001-set-MTU-via-sysfs-if-file-is-available.patch') -sha1sums=('27378a251705c7888332e6d60eea7805d1f8aeb5' +sha1sums=('8aa42abd28d49cce5b179998490c36f6c490e338' 'b67b9ce6a2faaca75fea356966a16be2283b7db0' 'ee85adac972a8172a9d9b3a1bdd46e0430301582' 'afbed18dc5544f7d0b81e2266b322ca12becf9a4') @@ -30,7 +30,8 @@ build() { patch -Np1 -i ${srcdir}/0001-set-MTU-via-sysfs-if-file-is-available.patch # configure variables - ./configure --libexecdir=/usr/lib/dhcpcd --dbdir=/var/lib/dhcpcd + ./configure --libexecdir=/usr/lib/dhcpcd --dbdir=/var/lib/dhcpcd \ + --rundir=/run # Build make diff --git a/extra/basket/PKGBUILD b/extra/basket/PKGBUILD index 66df7774e..fd46016ed 100644 --- a/extra/basket/PKGBUILD +++ b/extra/basket/PKGBUILD @@ -1,23 +1,23 @@ -# $Id: PKGBUILD 149623 2012-02-08 20:36:29Z pierre $ +# $Id: PKGBUILD 150150 2012-02-13 15:03:16Z ronald $ # Maintainer: Ronald van Haren # Contributor: James Rayner # Contributor: lucke pkgname=basket pkgver=1.81 -pkgrel=2 +pkgrel=3 pkgdesc="All-purpose notes taker for KDE." arch=('i686' 'x86_64') url="http://basket.kde.org/" -depends=('kdelibs' 'gpgme' 'qimageblitz' 'hicolor-icon-theme') +depends=('kdelibs' 'gpgme' 'qimageblitz' 'hicolor-icon-theme' 'kdebase-runtime') makedepends=('cmake' 'automoc4') install=$pkgname.install license=('GPL') source=(http://basket.kde.org/downloads/$pkgname-$pkgver.tar.bz2) -md5sums=('cbb1bc5ca7c2ad1485c433c00a8f65a1') +sha1sums=('209d92048523f341259d79510fa56977690e5dfc') build() { - cd $srcdir/$pkgname-$pkgver + cd ${srcdir}/${pkgname}-${pkgver} cmake ../${pkgbase}-${pkgver} \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_SKIP_RPATH=ON \ @@ -27,6 +27,6 @@ build() { } package() { - cd $srcdir/$pkgname-$pkgver - make DESTDIR=$startdir/pkg install + cd $srcdir/${pkgname}-${pkgver} + make DESTDIR=${pkgdir} install } diff --git a/extra/basket/basket.install b/extra/basket/basket.install index 3e1f2f1f5..2308e6e3e 100644 --- a/extra/basket/basket.install +++ b/extra/basket/basket.install @@ -1,5 +1,6 @@ post_install() { xdg-icon-resource forceupdate --theme hicolor &> /dev/null + update-desktop-database -q } post_upgrade() { diff --git a/extra/brltty/PKGBUILD b/extra/brltty/PKGBUILD index b645f13e3..663eff676 100644 --- a/extra/brltty/PKGBUILD +++ b/extra/brltty/PKGBUILD @@ -1,49 +1,47 @@ -# $Id: PKGBUILD 142442 2011-11-09 21:20:39Z guillaume $ +# $Id: PKGBUILD 150160 2012-02-13 19:59:22Z ibiru $ # Maintainer: # Contributor: Jan de Groot # Contributor: Giovanni Scafora pkgname=brltty pkgver=4.3 -pkgrel=1 +pkgrel=4 pkgdesc="Braille display driver for Linux/Unix" arch=('i686' 'x86_64') url="http://mielke.cc/brltty" license=('GPL' 'LGPL') -depends=('libxaw' 'at-spi' 'gpm' 'icu' 'python2' 'tcl' 'atk' 'libxtst') -makedepends=('pyrex' 'bluez') +depends=('libxaw' 'at-spi2-core' 'gpm' 'icu' 'python2' 'tcl' 'atk' 'libxtst' 'pyrex') +makedepends=('bluez') optdepends=('bluez: bluetooth support') backup=(etc/brltty.conf etc/conf.d/brltty.conf) options=('!makeflags' '!emptydirs') -source=(http://mielke.cc/${pkgname}/releases/${pkgname}-${pkgver}.tar.gz +install=brltty.install +source=(http://mielke.cc/$pkgname/releases/$pkgname-$pkgver.tar.gz 'brltty' 'brltty.conf') -# 'brltty-4.2-S_ISCHR.patch' md5sums=('5ada573f88df32b6150db3b9a620e20b' '831ebaf0c56091702929c68805d20c4f' 'a8ab8b3dd059e96e1734bc9cdcf844fc') -# '5954b289efaf2ff17676d06de9a88854' build() { - cd "${srcdir}/${pkgname}-${pkgver}" - CFLAGS+="${CFLAGS} -D_GNU_SOURCE" \ + cd "$srcdir/$pkgname-$pkgver" ./configure --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --localstatedir=/var \ + --with-screen-driver=a2 \ --enable-gpm \ --disable-java-bindings \ --disable-caml-bindings \ PYTHON=/usr/bin/python2 -# patch -Np1 -i ${srcdir}/brltty-4.2-S_ISCHR.patch make } package() { - cd "${srcdir}/${pkgname}-${pkgver}" - make INSTALL_ROOT="${pkgdir}" install - install -D -m755 ${srcdir}/brltty ${pkgdir}/etc/rc.d/brltty - install -D -m644 ${srcdir}/brltty.conf ${pkgdir}/etc/conf.d/brltty.conf - install -D -m644 Documents/brltty.conf ${pkgdir}/etc/brltty.conf + cd "$srcdir/$pkgname-$pkgver" + make INSTALL_ROOT="$pkgdir" install + install -D -m755 "$srcdir/brltty" "$pkgdir/etc/rc.d/brltty" + install -D -m644 "$srcdir/brltty.conf" "$pkgdir/etc/conf.d/brltty.conf" + install -D -m644 Documents/brltty.conf "$pkgdir/etc/brltty.conf" } diff --git a/extra/brltty/brltty.install b/extra/brltty/brltty.install new file mode 100644 index 000000000..952ae58ff --- /dev/null +++ b/extra/brltty/brltty.install @@ -0,0 +1,20 @@ +post_install () { + getent group brlapi &>/dev/null || groupadd -r brlapi + if [ ! -e /etc/brlapi.key ]; then + mcookie >/etc/brlapi.key + chmod 0640 /etc/brlapi.key + chgrp brlapi /etc/brlapi.key + echo "Please add your user to the brlapi group." + fi +} + +post_upgrade () { + post_install +} + +post_remove () { + getent group brlapi >/dev/null 2>&1 && groupdel brlapi + if [ -e /etc/brlapi.key ]; then + rm -f /etc/brlapi.key + fi +} diff --git a/extra/dovecot/PKGBUILD b/extra/dovecot/PKGBUILD index 1c4d2107e..c71137bf8 100644 --- a/extra/dovecot/PKGBUILD +++ b/extra/dovecot/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 146277 2012-01-07 21:39:13Z andyrtr $ +# $Id: PKGBUILD 150139 2012-02-13 12:13:16Z andyrtr $ # Maintainer: Andreas Radke # Contributor: Paul Mattal # Contributor: Federico Quagliata (quaqo) # Contributor: GARETTE Emmanuel pkgname=dovecot -pkgver=2.0.17 +pkgver=2.0.18 pkgrel=1 pkgdesc="An IMAP and POP3 server written with security primarily in mind" arch=('i686' 'x86_64') @@ -24,8 +24,9 @@ backup=(etc/dovecot/dovecot.conf etc/dovecot/conf.d/auth-{checkpassword,deny,ldap,master,passwdfile,sql,static,system,vpopmail}.conf.ext etc/ssl/dovecot-openssl.cnf) install=$pkgname.install -source=(http://dovecot.org/releases/2.0/${pkgname}-${pkgver}.tar.gz dovecot.sh) -md5sums=('41c10dffa56e228b9176833db2efaac5' +source=(http://dovecot.org/releases/2.0/${pkgname}-${pkgver}.tar.gz{,.sig} dovecot.sh) +md5sums=('4fdee96b390a287d75b51ffcf6abe30f' + 'c317125fd613a6ed207fbaf7d7543163' '587159e84e2da6f83d70b3c706ba87cc') build() { diff --git a/extra/garcon/PKGBUILD b/extra/garcon/PKGBUILD index 636d7eda8..564fe802f 100644 --- a/extra/garcon/PKGBUILD +++ b/extra/garcon/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 143709 2011-11-28 15:22:07Z foutrelis $ +# $Id: PKGBUILD 150129 2012-02-13 08:08:25Z foutrelis $ # Maintainer: Evangelos Foutras # Contributor: Xavier Devlamynck pkgname=garcon -pkgver=0.1.9 +pkgver=0.1.10 pkgrel=1 pkgdesc="Implementation of the freedesktop.org menu specification" arch=('i686' 'x86_64') @@ -15,7 +15,7 @@ makedepends=('pkgconfig' 'intltool' 'xfce4-dev-tools') replaces=('libxfce4menu') options=('!libtool' '!makeflags') source=(http://archive.xfce.org/src/xfce/garcon/0.1/garcon-$pkgver.tar.bz2) -sha256sums=('485e23c8ec1af0d3af423aa244e05467dd2f96afbb66efc70ca7689222cf31d5') +sha256sums=('c2497a2991101fc1e621dc712ef72aba7c238f6e5f5a1733c9572f9b23761316') build() { cd "$srcdir/garcon-$pkgver" diff --git a/extra/maxima/PKGBUILD b/extra/maxima/PKGBUILD index af30b54f4..85d561ddc 100644 --- a/extra/maxima/PKGBUILD +++ b/extra/maxima/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 144879 2011-12-08 21:06:55Z juergen $ +# $Id: PKGBUILD 150146 2012-02-13 14:36:40Z ronald $ # Maintainer: Ronald van Haren # Contributor: Damir Perisa pkgname=maxima -pkgver=5.25.1 -pkgrel=3 +pkgver=5.26.0 +pkgrel=1 pkgdesc="Maxima - a sophisticated computer algebra system" arch=('i686' 'x86_64') license=('GPL') @@ -17,7 +17,7 @@ optdepends=('gnuplot: plotting capabilities' 'rlwrap: readline support via /usr/ options=('!makeflags' '!zipman') # don't zip info pages or they won't work inside maxima install=maxima.install source=("http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz" "$pkgname.desktop") -sha1sums=('9c9ea66434c9ca96549092c3640c3ba5a4fba44b' +sha1sums=('bc7448486478b217c333605c6d8f6c0bbdd3526c' '4398ebb1ec85ccfa12f37516a56d60c26f74b18b') build() { diff --git a/extra/octave/PKGBUILD b/extra/octave/PKGBUILD index 753aa49a4..d8d9648cf 100644 --- a/extra/octave/PKGBUILD +++ b/extra/octave/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 149964 2012-02-11 23:31:17Z allan $ +# $Id: PKGBUILD 150143 2012-02-13 14:12:46Z ronald $ # Maintainer: Ronald van Haren # Contributor : shining # Contributor : cyberdune pkgname=octave -pkgver=3.4.3 -pkgrel=2 +pkgver=3.6.0 +pkgrel=1 pkgdesc="A high-level language, primarily intended for numerical computations." arch=('i686' 'x86_64') url="http://www.octave.org" @@ -19,7 +19,7 @@ optdepends=('texinfo: for help-support in octave' source=("ftp://ftp.gnu.org/gnu/octave/octave-$pkgver.tar.bz2") options=('!emptydirs') install=octave.install -sha1sums=('fe622c28a38f8730c59e46211bc7b18e7f51a679') +sha1sums=('62116e090d257a601e9d605f969dd87b7de1ffce') build() { cd ${srcdir}/${pkgname}-${pkgver} diff --git a/extra/qscintilla/PKGBUILD b/extra/qscintilla/PKGBUILD index c7c37e755..dbdc5aa25 100644 --- a/extra/qscintilla/PKGBUILD +++ b/extra/qscintilla/PKGBUILD @@ -1,22 +1,21 @@ -# $Id: PKGBUILD 145611 2011-12-23 20:54:15Z andrea $ +# $Id: PKGBUILD 150137 2012-02-13 11:40:55Z eric $ # Maintainer: # Contributor: Andrea Scarpino # Contributor: Douglas Soares de Andrade pkgbase=qscintilla pkgname=('qscintilla' 'python-qscintilla' 'python2-qscintilla') -pkgver=2.6 -pkgrel=2 +pkgver=2.6.1 +pkgrel=1 license=('GPL') arch=('i686' 'x86_64') url="http://www.riverbankcomputing.co.uk/software/qscintilla/intro" makedepends=('python2-pyqt' 'chrpath') source=("http://riverbankcomputing.com/static/Downloads/QScintilla2/QScintilla-gpl-${pkgver}.tar.gz" 'configure.py-objdir-support.diff') -md5sums=('0605a8006ea752ec2d1d7fc4791d1c75' +md5sums=('39a1d0567a20b416177eb1a8afe225a7' '8cf9c06252e2f11ab00e62848e322fd3') - build() { cd "${srcdir}/QScintilla-gpl-${pkgver}" patch -Np1 -i "${srcdir}/configure.py-objdir-support.diff" diff --git a/extra/xfce4-mpc-plugin/PKGBUILD b/extra/xfce4-mpc-plugin/PKGBUILD index 65307a384..ef3c4088b 100644 --- a/extra/xfce4-mpc-plugin/PKGBUILD +++ b/extra/xfce4-mpc-plugin/PKGBUILD @@ -1,24 +1,24 @@ -# $Id: PKGBUILD 149252 2012-02-06 16:30:37Z foutrelis $ +# $Id: PKGBUILD 150133 2012-02-13 10:09:13Z eric $ # Maintainer: Andreas Radke # Contributor: aurelien # Contributor: Tobias Kieslich pkgname=xfce4-mpc-plugin -pkgver=0.3.6 -pkgrel=2 -pkgdesc="plugin to control the music player daemon from the xfce4-panel" -arch=(i686 x86_64) -license=('GPL2') +pkgver=0.4.0 +pkgrel=1 +pkgdesc="A plugin to control the music player daemon from the xfce4-panel" +arch=('i686' 'x86_64') +license=('BSD') url="http://goodies.xfce.org/projects/panel-plugins/xfce4-mpc-plugin" groups=('xfce4-goodies') -depends=('xfce4-panel' 'libxfcegui4' 'libmpd>=0.16.1') +depends=('xfce4-panel' 'libmpd>=0.16.1') makedepends=('intltool') -options=(!libtool) -source=(http://archive.xfce.org/src/panel-plugins/${pkgname}/0.3/${pkgname}-${pkgver}.tar.bz2) -md5sums=('a6366662885d803dcebd82bbb91ed3c7') +options=('!libtool') +source=(http://archive.xfce.org/src/panel-plugins/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.bz2) +md5sums=('ae9b285e24385e27cfd797ab605a1b7f') build() { - cd ${srcdir}/${pkgname}-${pkgver} + cd "${srcdir}/${pkgname}-${pkgver}" ./configure --prefix=/usr \ --sysconfdir=/etc \ --libexecdir=/usr/lib \ @@ -29,6 +29,7 @@ build() { } package(){ - cd ${srcdir}/${pkgname}-${pkgver} - make DESTDIR=${pkgdir} install + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install + install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } diff --git a/extra/xfce4-session/PKGBUILD b/extra/xfce4-session/PKGBUILD index 1d17cce0c..14a18a066 100644 --- a/extra/xfce4-session/PKGBUILD +++ b/extra/xfce4-session/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 141722 2011-11-02 15:10:56Z foutrelis $ +# $Id: PKGBUILD 150131 2012-02-13 08:12:40Z foutrelis $ # Maintainer: Evangelos Foutras # Contributor: tobias pkgname=xfce4-session -pkgver=4.8.2 -pkgrel=2 +pkgver=4.8.3 +pkgrel=1 pkgdesc="A session manager for Xfce" arch=('i686' 'x86_64') url="http://www.xfce.org/" @@ -20,7 +20,7 @@ replaces=('xfce4-toys') options=('!libtool') install=$pkgname.install source=(http://archive.xfce.org/src/xfce/$pkgname/4.8/$pkgname-$pkgver.tar.bz2) -sha256sums=('31bca2a559e05a8a859f150394a901517e5842414ef171a85c5da234e344c0d0') +sha256sums=('f0801b8c0ffa7e5d41b29b8df281ac127adf467bf50e8ded8aebe5a02bd99338') build() { cd "$srcdir/$pkgname-$pkgver" diff --git a/multilib-testing/lib32-libxcb/PKGBUILD b/multilib-testing/lib32-libxcb/PKGBUILD new file mode 100644 index 000000000..141b91b96 --- /dev/null +++ b/multilib-testing/lib32-libxcb/PKGBUILD @@ -0,0 +1,41 @@ +# $Id: PKGBUILD 64458 2012-02-14 00:06:32Z bluewind $ +# Maintainer: Alexander Baldeck +# Contributor: Jan de Groot +_pkgbasename=libxcb +pkgname=lib32-$_pkgbasename +pkgver=1.8 +pkgrel=1 +pkgdesc="X11 client-side library (32-bit)" +arch=(x86_64) +url="http://xcb.freedesktop.org/" +depends=('xcb-proto>=1.7' 'lib32-libxdmcp' 'lib32-libxau' + $_pkgbasename) +makedepends=('pkgconfig' 'libxslt' 'python2' 'gcc-multilib' + 'autoconf') +options=('!libtool') +license=('custom') +source=(${url}/dist/${_pkgbasename}-${pkgver}.tar.bz2 + libxcb-1.1-no-pthread-stubs.patch) +sha1sums=('18b76759d5bbb863777f37bf3aec23ebaa31d5be' + '3455e84642283bc91c8313af319002a20bbcbdf4') + +build() { + cd "${srcdir}/${_pkgbasename}-${pkgver}" + patch -Np1 -i "${srcdir}/libxcb-1.1-no-pthread-stubs.patch" + + export CC="gcc -m32" + export PKG_CONFIG_PATH="/usr/lib32/pkgconfig" + + PYTHON=/usr/bin/python2 ./autogen.sh --prefix=/usr --enable-xinput --libdir=/usr/lib32 + make +} + +package() { + cd "${srcdir}/${_pkgbasename}-${pkgver}" + make DESTDIR="${pkgdir}" install + + rm -rf "${pkgdir}"/usr/{include,share} + + mkdir -p "$pkgdir/usr/share/licenses" + ln -s $_pkgbasename "$pkgdir/usr/share/licenses/$pkgname" +} diff --git a/multilib-testing/lib32-libxcb/libxcb-1.1-no-pthread-stubs.patch b/multilib-testing/lib32-libxcb/libxcb-1.1-no-pthread-stubs.patch new file mode 100644 index 000000000..f17de1b1d --- /dev/null +++ b/multilib-testing/lib32-libxcb/libxcb-1.1-no-pthread-stubs.patch @@ -0,0 +1,12 @@ +diff -up libxcb-1.1/configure.ac.pthread-stubs libxcb-1.1/configure.ac +--- libxcb-1.1/configure.ac.pthread-stubs 2007-11-04 18:17:11.000000000 -0500 ++++ libxcb-1.1/configure.ac 2007-11-12 10:27:06.000000000 -0500 +@@ -31,7 +31,7 @@ AC_SUBST(HTML_CHECK_RESULT) + + # Checks for pkg-config packages + PKG_CHECK_MODULES(XCBPROTO, xcb-proto >= 1.6) +-NEEDED="pthread-stubs xau >= 0.99.2" ++NEEDED="xau >= 0.99.2" + PKG_CHECK_MODULES(NEEDED, $NEEDED) + + have_xdmcp="no" diff --git a/staging/libnova/PKGBUILD b/staging/libnova/PKGBUILD new file mode 100644 index 000000000..27c98df9d --- /dev/null +++ b/staging/libnova/PKGBUILD @@ -0,0 +1,27 @@ +# $Id: PKGBUILD 150152 2012-02-13 15:39:56Z ronald $ +# Maintainer: Ronald van Haren +# Contributor: Tobias Powalowski + +pkgname=libnova +pkgver=0.14.0 +pkgrel=1 +pkgdesc="A general purpose, double precision, celestial mechanics, astrometry and astrodynamics library." +url="http://libnova.sourceforge.net/" +license=('GPL2') +arch=('i686' 'x86_64') +depends=('glibc') +makedepends=('pkgconfig') +source=(http://downloads.sourceforge.net/sourceforge/libnova/$pkgname-$pkgver.tar.gz) +options=(!libtool) +sha1sums=('4ea7034a907d0578646b0d12fc4a095de8b23f51') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + ./configure --prefix=/usr + make +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + make DESTDIR=${pkgdir} install +} diff --git a/staging/sip/PKGBUILD b/staging/sip/PKGBUILD new file mode 100644 index 000000000..e29f99793 --- /dev/null +++ b/staging/sip/PKGBUILD @@ -0,0 +1,54 @@ +# $Id: PKGBUILD 150156 2012-02-13 17:15:18Z andrea $ +# Maintainer: Andrea Scarpino +# Contributor: Douglas Soares de Andrade +# Contributor: riai , Ben + +pkgbase=sip +pkgname=('sip' 'python2-sip') +pkgver=4.13.2 +pkgrel=1 +arch=('i686' 'x86_64') +url="http://www.riverbankcomputing.com/software/sip/" +license=('custom:"sip"') +makedepends=('python' 'python2') +source=("http://www.riverbankcomputing.com/static/Downloads/sip4/${pkgbase}-${pkgver}.tar.gz") +md5sums=('5a12ea8e8a09b879ed2b3817e30fbc84') + +build() { + cd "${srcdir}" + cp -r ${pkgbase}-${pkgver} python2-${pkgbase}-${pkgver} + + cd "${srcdir}/${pkgbase}-${pkgver}" + python configure.py CFLAGS="${CFLAGS}" LFLAGS="${LDFLAGS}" + make + + ### Python2 version ### + cd "${srcdir}/python2-${pkgbase}-${pkgver}" + python2 configure.py CFLAGS="${CFLAGS}" LFLAGS="${LDFLAGS}" + make +} + +package_sip() { + pkgdesc="A tool that makes it easy to create Python bindings for C and C++ libraries" + depends=('python') + replaces=('python-sip') + provides=('python-sip') + + cd "${srcdir}/${pkgbase}-${pkgver}" + make DESTDIR="${pkgdir}" install + + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} + +package_python2-sip() { + pkgdesc="A tool that makes it easy to create Python2 bindings for C and C++ libraries" + depends=('sip' 'python2') + + cd "${srcdir}/python2-${pkgbase}-${pkgver}" + make DESTDIR="${pkgdir}" install + + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + + # Provided by sip + rm "${pkgdir}/usr/bin/sip" +} diff --git a/testing/kmod/0001-libkmod-module-probe-fix-infinite-loop-with-softdeps.patch b/testing/kmod/0001-libkmod-module-probe-fix-infinite-loop-with-softdeps.patch new file mode 100644 index 000000000..95e7f859a --- /dev/null +++ b/testing/kmod/0001-libkmod-module-probe-fix-infinite-loop-with-softdeps.patch @@ -0,0 +1,39 @@ +From 8cd0f9e4f9f5c093136a7a2c0c2998b9dd203161 Mon Sep 17 00:00:00 2001 +From: Lucas De Marchi +Date: Sat, 11 Feb 2012 19:45:29 -0200 +Subject: [PATCH] libkmod-module: probe: fix infinite loop with softdeps + +If a softdep depends on a module in the dependency list of the module +being inserted, we would enter and infinite loop. + +Move the "mod->visited = true" assignment to the proper place, hoping it +didn't break other use cases. This is a bug that comes and goes every +now and then. Since we have a testsuite now, a test for this should be +written. +--- + libkmod/libkmod-module.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c +index b5eb7c9..835896f 100644 +--- a/libkmod/libkmod-module.c ++++ b/libkmod/libkmod-module.c +@@ -1013,7 +1013,6 @@ static int __kmod_module_fill_softdep(struct kmod_module *mod, + goto fail; + } + *list = l; +- mod->visited = true; + mod->ignorecmd = (pre != NULL || post != NULL); + + kmod_list_foreach(l, post) { +@@ -1043,6 +1042,7 @@ static int __kmod_module_get_probe_list(struct kmod_module *mod, + mod->name); + return 0; + } ++ mod->visited = true; + + dep = kmod_module_get_dependencies(mod); + kmod_list_foreach(l, dep) { +-- +1.7.9 + diff --git a/testing/kmod/PKGBUILD b/testing/kmod/PKGBUILD index 678db471d..64017dd1a 100644 --- a/testing/kmod/PKGBUILD +++ b/testing/kmod/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 149778 2012-02-10 19:09:35Z dreisner $ +# $Id: PKGBUILD 150158 2012-02-13 18:05:27Z dreisner $ # Maintainer: Dave Reisner pkgname=kmod pkgver=5 -pkgrel=2 +pkgrel=3 pkgdesc="Linux kernel module handling" arch=('i686' 'x86_64') url="http://git.profusion.mobi/cgit.cgi/kmod.git" @@ -15,9 +15,11 @@ conflicts=('module-init-tools') replaces=('module-init-tools') source=("http://packages.profusion.mobi/$pkgname/$pkgname-$pkgver.tar.xz" '0001-libkmod-module-probe-Fix-ignore-loaded-flag-not-bein.patch' + '0001-libkmod-module-probe-fix-infinite-loop-with-softdeps.patch' "depmod-search.conf") md5sums=('b271c2ec54aba1c67bda63c8579d8c15' '81545a1509b43008f85c03fb980f0e86' + '662a85dbe420f04c1ef24f9cd4e4c990' '4b8cbcbc54b9029c99fd730e257d4436') build() { @@ -26,7 +28,10 @@ build() { # fix modprobe --show-depends failures on loaded modules patch -Np1 <"$srcdir/0001-libkmod-module-probe-Fix-ignore-loaded-flag-not-bein.patch" - CFLAGS+=' -g -O0' ./configure \ + # fix infinite loop with softdeps + patch -Np1 <"$srcdir/0001-libkmod-module-probe-fix-infinite-loop-with-softdeps.patch" + + ./configure \ --sysconfdir=/etc \ --with-rootprefix= \ --with-zlib diff --git a/testing/shadow/LICENSE b/testing/shadow/LICENSE new file mode 100644 index 000000000..c5ab15a56 --- /dev/null +++ b/testing/shadow/LICENSE @@ -0,0 +1,31 @@ +/* + * Copyright (c) 1990 - 1994, Julianne Frances Haugh + * Copyright (c) 1996 - 2000, Marek Michałkiewicz + * Copyright (c) 2001 - 2006, Tomasz Kłoczko + * Copyright (c) 2007 - 2009, Nicolas François + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the copyright holders or contributors may not be used to + * endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ diff --git a/testing/shadow/PKGBUILD b/testing/shadow/PKGBUILD new file mode 100644 index 000000000..7409f0f9f --- /dev/null +++ b/testing/shadow/PKGBUILD @@ -0,0 +1,116 @@ +# $Id: PKGBUILD 150166 2012-02-14 01:55:53Z dreisner $ +# Maintainer: Dave Reisner +# Maintainer: Aaron Griffin + +pkgname=shadow +pkgver=4.1.5 +pkgrel=2 +pkgdesc="Password and account management tool suite with support for shadow files and PAM" +arch=('i686' 'x86_64') +url='http://pkg-shadow.alioth.debian.org/' +license=('BSD') +groups=('base') +depends=('bash' 'pam' 'acl') +backup=(etc/login.defs + etc/pam.d/{chage,login,passwd,shadow,useradd,usermod,userdel} + etc/pam.d/{chpasswd,newusers,groupadd,groupdel,groupmod} + etc/pam.d/{chfn,chgpasswd,groupmems,chsh} + etc/default/useradd) +options=('!libtool') +install='shadow.install' +source=("http://pkg-shadow.alioth.debian.org/releases/$pkgname-$pkgver.tar.bz2"{,.sig} + LICENSE + adduser + chgpasswd + chpasswd + defaults.pam + login + login.defs + newusers + passwd + shadow.cron.daily + useradd.defaults + xstrdup.patch + shadow-strncpy-usage.patch + shadow-add-missing-include.patch) +sha1sums=('3ab1ae0e30af36d04445314fcb5a079bdf05de41' + '0a31aafceb948a91fe7370a6378cafd6fd883145' + '33a6cf1e44a1410e5c9726c89e5de68b78f5f922' + '78ec184a499f9708adcfcf0b7a3b22a60bf39f91' + '4ad0e059406a305c8640ed30d93c2a1f62c2f4ad' + '12427b1ca92a9b85ca8202239f0d9f50198b818f' + '0e56fed7fc93572c6bf0d8f3b099166558bb46f1' + '895aad07c192b288b457e19dd7b8c55841b4ad22' + 'e5cab2118ecb1e61874cde842d7d04d1003f35cb' + '12427b1ca92a9b85ca8202239f0d9f50198b818f' + '611be25d91c3f8f307c7fe2485d5f781e5dee75f' + '5d83ba7e11c765c951867cbe00b0ae7ff57148fa' + '9ae93de5987dd0ae428f0cc1a5a5a5cd53583f19' + '6010fffeed1fc6673ad9875492e1193b1a847b53' + '21e12966a6befb25ec123b403cd9b5c492fe5b16' + '0697a21f7519de30821da7772677035652df4ad2') + +build() { + cd "$pkgname-$pkgver" + + # avoid transitive linking issues with binutils 2.22 + sed -i '/^user\(mod\|add\)_LDADD/s|$| -lattr|' src/Makefile.am + + # link to glibc's crypt(3) + LDFLAGS+=" -lcrypt" + + patch -Np1 <"$srcdir/xstrdup.patch" + patch -Np1 <"$srcdir/shadow-strncpy-usage.patch" + patch -Np1 <"$srcdir/shadow-add-missing-include.patch" + + # supress etc/pam.d/*, we provide our own + sed -i '/^SUBDIRS/s/pam.d//' etc/Makefile.in + + ./configure \ + --prefix=/usr \ + --libdir=/lib \ + --mandir=/usr/share/man \ + --sysconfdir=/etc \ + --with-libpam \ + --without-selinux + + make +} + +package() { + cd "$pkgname-$pkgver" + + make DESTDIR="$pkgdir" install + + # license + install -Dm644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/shadow/LICENSE" + + # interactive useradd + install -Dm755 "$srcdir/adduser" "$pkgdir/usr/sbin/adduser" + + # useradd defaults + install -Dm644 "$srcdir/useradd.defaults" "$pkgdir/etc/default/useradd" + + # cron job + install -Dm744 "$srcdir/shadow.cron.daily" "$pkgdir/etc/cron.daily/shadow" + + # login.defs + install -Dm644 "$srcdir/login.defs" "$pkgdir/etc/login.defs" + + # PAM config - custom + install -dm755 "$pkgdir/etc/pam.d" + install -t "$pkgdir/etc/pam.d" -m644 "$srcdir"/{login,passwd,chgpasswd,chpasswd,newusers} + + # PAM config - from tarball + install -Dm644 etc/pam.d/groupmems "$pkgdir/etc/pam.d/groupmems" + + # we use the 'useradd' PAM file for other similar utilities + for file in chage chfn chsh groupadd groupdel groupmod shadow \ + useradd usermod userdel; do + install -Dm644 "$srcdir/defaults.pam" "$pkgdir/etc/pam.d/$file" + done + + # Remove su - using su from coreutils instead + rm "$pkgdir/bin/su" + find "$pkgdir/usr/share/man" -name 'su.1' -delete +} diff --git a/testing/shadow/adduser b/testing/shadow/adduser new file mode 100644 index 000000000..a5d7fd4fa --- /dev/null +++ b/testing/shadow/adduser @@ -0,0 +1,399 @@ +#!/bin/bash +# +# Copyright 1995 Hrvoje Dogan, Croatia. +# Copyright 2002, 2003, 2004 Stuart Winter, West Midlands, England, UK. +# Copyright 2004 Slackware Linux, Inc., Concord, CA, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# +########################################################################## +# Program: /usr/sbin/adduser +# Purpose: Interactive front end to /usr/sbin/useradd for Slackware Linux +# Author : Stuart Winter +# Based on the original Slackware adduser by Hrvoje Dogan +# with modifications by Patrick Volkerding +# Version: 1.09 +########################################################################## +# Usage..: adduser [] +########################################################################## +# History # +########### +# v1.09 - 07/06/04 +# * Added standard Slackware script licence to the head of this file. +# v1.08 - 25/04/04 +# * Disallow user names that begin with a numeric because useradd +# (from shadow v4.03) does not allow them. +# v1.07 - 07/03/03 +# * When supplying a null string for the uid (meaning 'Choose next available'), +# if there were file names in the range 'a-z' in the pwd then the +# egrep command considered these files rather than the null string. +# The egrep expression is now in quotes. +# Reported & fixed by Vadim O. Ustiansky +# v1.06 - 31/03/03 +# * Ask to chown user.group the home directory if it already exists. +# This helps reduce later confusion when adding users whose home dir +# already exists (mounted partition for example) and is owned +# by a user other than the user to which the directory is being +# assigned as home. Default is not to chown. +# Brought to my attention by mRgOBLIN. +# v1.05 - 04/01/03 +# * Advise & prevent users from creating logins with '.' characters +# in the user name. +# * Made pending account creation info look neater +# v1.04 - 09/06/02 +# * Catered for shadow-4.0.3's 'useradd' binary that no longer +# will let you create a user that has any uppercase chars in it +# This was reported on the userlocal.org forums +# by 'xcp' - thanks. +# v1.03 - 20/05/02 +# * Support 'broken' (null lines in) /etc/passwd and +# /etc/group files +# * For recycling UIDs (default still 'off'), we now look in +# /etc/login.defs for the UID_MIN value and use it +# If not found then default to 1000 +# v1.02 - 10/04/02 +# * Fix user-specified UID bug. +# v1.01 - 23/03/02 +# * Match Slackware indenting style, simplify. +# v1.00 - 22/03/02 +# * Created +####################################################################### + +# Path to files +pfile=/etc/passwd +gfile=/etc/group +sfile=/etc/shells + +# Paths to binaries +useradd=/usr/sbin/useradd +chfn=/usr/bin/chfn +passwd=/usr/bin/passwd + +# Defaults +defhome=/home +defshell=/bin/bash +defgroup=users + +# Determine what the minimum UID is (for UID recycling) +# (we ignore it if it's not at the beginning of the line (i.e. commented out with #)) +export recycleUIDMIN="$(grep ^UID_MIN /etc/login.defs | awk '{print $2}' 2>/dev/null)" +# If we couldn't find it, set it to the default of 1000 +if [ -z "$recycleUIDMIN" ]; then + export recycleUIDMIN=1000 # this is the default from Slackware's /etc/login.defs +fi + + +# This setting enables the 'recycling' of older unused UIDs. +# When you userdel a user, it removes it from passwd and shadow but it will +# never get used again unless you specify it expliticly -- useradd (appears to) just +# look at the last line in passwd and increment the uid. I like the idea of +# recycling uids but you may have very good reasons not to (old forgotten +# confidential files still on the system could then be owned by this new user). +# We'll set this to no because this is what the original adduser shell script +# did and it's what users expect. +recycleuids=no + +# Function to read keyboard input. +# bash1 is broken (even ash will take read -ep!), so we work around +# it (even though bash1 is no longer supported on Slackware). +function get_input() { + local output + if [ "`echo $BASH_VERSION | cut -b1`" = "1" ]; then + echo -n "${1} " >&2 # fudge for use with bash v1 + read output + else # this should work with any other /bin/sh + read -ep "${1} " output + fi + echo $output +} + +# Function to display the account info +function display () { + local goose + goose="$(echo $2 | cut -d ' ' -f 2-)" # lop off the prefixed argument useradd needs + echo -n "$1 " + # If it's null then display the 'other' information + if [ -z "$goose" -a ! -z "$3" ]; then + echo "$3" + else + echo "$goose" + fi +} + +# Function to check whether groups exist in the /etc/group file +function check_group () { + local got_error group + if [ ! -z "$@" ]; then + for group in $@ ; do + local uid_not_named="" uid_not_num="" + grep -v "$^" $gfile | awk -F: '{print $1}' | grep "^${group}$" >/dev/null 2>&1 || uid_not_named=yes + grep -v "$^" $gfile | awk -F: '{print $3}' | grep "^${group}$" >/dev/null 2>&1 || uid_not_num=yes + if [ ! -z "$uid_not_named" -a ! -z "$uid_not_num" ]; then + echo "- Group '$group' does not exist" + got_error=yes + fi + done + fi + # Return exit code of 1 if at least one of the groups didn't exist + if [ ! -z "$got_error" ]; then + return 1 + fi +} + +#: Read the login name for the new user :# +# +# Remember that most Mail Transfer Agents are case independant, so having +# 'uSer' and 'user' may cause confusion/things to break. Because of this, +# useradd from shadow-4.0.3 no longer accepts usernames containing uppercase, +# and we must reject them, too. + +# Set the login variable to the command line param +echo +LOGIN="$1" +needinput=yes +while [ ! -z $needinput ]; do + if [ -z "$LOGIN" ]; then + while [ -z "$LOGIN" ]; do LOGIN="$(get_input "Login name for new user []:")" ; done + fi + grep "^${LOGIN}:" $pfile >/dev/null 2>&1 # ensure it's not already used + if [ $? -eq 0 ]; then + echo "- User '$LOGIN' already exists; please choose another" + unset LOGIN + elif [ ! -z "$( echo $LOGIN | grep "^[0-9]" )" ]; then + echo "- User names cannot begin with a number; please choose another" + unset LOGIN + elif [ ! "$LOGIN" = "`echo $LOGIN | tr A-Z a-z`" ]; then # useradd does not allow uppercase + echo "- User '$LOGIN' contains illegal characters (uppercase); please choose another" + unset LOGIN + elif [ ! -z "$( echo $LOGIN | grep '\.' )" ]; then + echo "- User '$LOGIN' contains illegal characters (period/dot); please choose another" + unset LOGIN + else + unset needinput + fi +done + +# Display the user name passed from the shell if it hasn't changed +if [ "$1" = "$LOGIN" ]; then + echo "Login name for new user: $LOGIN" +fi + +#: Get the UID for the user & ensure it's not already in use :# +# +# Whilst we _can_ allow users with identical UIDs, it's not a 'good thing' because +# when you change password for the uid, it finds the first match in /etc/passwd +# which isn't necessarily the correct user +# +echo +needinput=yes +while [ ! -z "$needinput" ]; do + _UID="$(get_input "User ID ('UID') [ defaults to next available ]:")" + grep -v "^$" $pfile | awk -F: '{print $3}' | grep "^${_UID}$" >/dev/null 2>&1 + if [ $? -eq 0 ]; then + echo "- That UID is already in use; please choose another" + elif [ ! -z "$(echo $_UID | egrep '[A-Za-z]')" ]; then + echo "- UIDs are numerics only" + else + unset needinput + fi +done +# If we were given a UID, then syntax up the variable to pass to useradd +if [ ! -z "$_UID" ]; then + U_ID="-u ${_UID}" +else + # Will we be recycling UIDs? + if [ "$recycleuids" = "yes" ]; then + U_ID="-u $(awk -F: '{uid[$3]=1} END { for (i=ENVIRON["recycleUIDMIN"];i in uid;i++);print i}' $pfile)" + fi +fi + +#: Get the initial group for the user & ensure it exists :# +# +# We check /etc/group for both the text version and the group ID number +echo +needinput=yes +while [ ! -z "$needinput" ]; do + GID="$(get_input "Initial group [ ${defgroup} ]:")" + check_group "$GID" + if [ $? -gt 0 ]; then + echo "- Please choose another" + else + unset needinput + fi +done +# Syntax the variable ready for useradd +if [ -z "$GID" ]; then + GID="-g ${defgroup}" +else + GID="-g ${GID}" +fi + +#: Get additional groups for the user :# +# +echo +needinput=yes +while [ ! -z "$needinput" ]; do + AGID="$(get_input "Additional groups (comma separated) []:")" + AGID="$(echo "$AGID" | tr -d ' ' | tr , ' ')" # fix up for parsing + if [ ! -z "$AGID" ]; then + check_group "$AGID" # check all groups at once (treated as N # of params) + if [ $? -gt 0 ]; then + echo "- Please re-enter the group(s)" + else + unset needinput # we found all groups specified + AGID="-G $(echo "$AGID" | tr ' ' ,)" + fi + else + unset needinput # we don't *have* to have additional groups + fi +done + +#: Get the new user's home dir :# +# +echo +needinput=yes +while [ ! -z "$needinput" ]; do + HME="$(get_input "Home directory [ ${defhome}/${LOGIN} ]")" + if [ -z "$HME" ]; then + HME="${defhome}/${LOGIN}" + fi + # Warn the user if the home dir already exists + if [ -d "$HME" ]; then + echo "- Warning: '$HME' already exists !" + getyn="$(get_input " Do you wish to change the home directory path ? (Y/n) ")" + if [ "$(echo $getyn | grep -i "n")" ]; then + unset needinput + # You're most likely going to only do this if you have the dir *mounted* for this user's $HOME + getyn="$(get_input " Do you want to chown $LOGIN.$( echo $GID | awk '{print $2}') $HME ? (y/N) ")" + if [ "$(echo $getyn | grep -i "y")" ]; then + CHOWNHOMEDIR=$HME # set this to the home directory + fi + fi + else + unset needinput + fi +done +HME="-d ${HME}" + +#: Get the new user's shell :# +echo +needinput=yes +while [ ! -z "$needinput" ]; do + unset got_error + SHL="$(get_input "Shell [ ${defshell} ]")" + if [ -z "$SHL" ]; then + SHL="${defshell}" + fi + # Warn the user if the shell doesn't exist in /etc/shells or as a file + if [ -z "$(grep "^${SHL}$" $sfile)" ]; then + echo "- Warning: ${SHL} is not in ${sfile} (potential problem using FTP)" + got_error=yes + fi + if [ ! -f "$SHL" ]; then + echo "- Warning: ${SHL} does not exist as a file" + got_error=yes + fi + if [ ! -z "$got_error" ]; then + getyn="$(get_input " Do you wish to change the shell ? (Y/n) ")" + if [ "$(echo $getyn | grep -i "n")" ]; then + unset needinput + fi + else + unset needinput + fi +done +SHL="-s ${SHL}" + +#: Get the expiry date :# +echo +needinput=yes +while [ ! -z "$needinput" ]; do + EXP="$(get_input "Expiry date (YYYY-MM-DD) []:")" + if [ ! -z "$EXP" ]; then + # Check to see whether the expiry date is in the valid format + if [ -z "$(echo "$EXP" | grep "^[[:digit:]]\{4\}[-]\?[[:digit:]]\{2\}[-]\?[[:digit:]]\{2\}$")" ]; then + echo "- That is not a valid expiration date" + else + unset needinput + EXP="-e ${EXP}" + fi + else + unset needinput + fi +done + +# Display the info about the new impending account +echo +echo "New account will be created as follows:" +echo +echo "---------------------------------------" +display "Login name.......: " "$LOGIN" +display "UID..............: " "$_UID" "[ Next available ]" +display "Initial group....: " "$GID" +display "Additional groups: " "$AGID" "[ None ]" +display "Home directory...: " "$HME" +display "Shell............: " "$SHL" +display "Expiry date......: " "$EXP" "[ Never ]" +echo + +echo "This is it... if you want to bail out, hit Control-C. Otherwise, press" +echo "ENTER to go ahead and make the account." +read junk + +echo +echo "Creating new account..." +echo +echo + +# Add the account to the system +CMD="$useradd "$HME" -m "$EXP" "$U_ID" "$GID" "$AGID" "$SHL" "$LOGIN"" +$CMD + +if [ $? -gt 0 ]; then + echo "- Error running useradd command -- account not created!" + echo "(cmd: $CMD)" + exit 1 +fi + +# chown the home dir ? We can only do this once the useradd has +# completed otherwise the user name doesn't exist. +if [ ! -z "${CHOWNHOMEDIR}" ]; then + chown "$LOGIN"."$( echo $GID | awk '{print $2}')" "${CHOWNHOMEDIR}" +fi + +# Set the finger information +$chfn "$LOGIN" +if [ $? -gt 0 ]; then + echo "- Warning: an error occurred while setting finger information" +fi + +# Set a password +$passwd "$LOGIN" +if [ $? -gt 0 ]; then + echo "* WARNING: An error occured while setting the password for" + echo " this account. Please manually investigate this *" + exit 1 +fi + +echo +echo +echo "Account setup complete." +exit 0 + diff --git a/testing/shadow/chgpasswd b/testing/shadow/chgpasswd new file mode 100644 index 000000000..8f49f5cc8 --- /dev/null +++ b/testing/shadow/chgpasswd @@ -0,0 +1,4 @@ +#%PAM-1.0 +auth sufficient pam_rootok.so +account required pam_permit.so +password include system-auth diff --git a/testing/shadow/chpasswd b/testing/shadow/chpasswd new file mode 100644 index 000000000..5d447985a --- /dev/null +++ b/testing/shadow/chpasswd @@ -0,0 +1,6 @@ +#%PAM-1.0 +auth sufficient pam_rootok.so +auth required pam_unix.so +account required pam_unix.so +session required pam_unix.so +password required pam_unix.so sha512 shadow diff --git a/testing/shadow/defaults.pam b/testing/shadow/defaults.pam new file mode 100644 index 000000000..a7bf8a4a5 --- /dev/null +++ b/testing/shadow/defaults.pam @@ -0,0 +1,6 @@ +#%PAM-1.0 +auth sufficient pam_rootok.so +auth required pam_unix.so +account required pam_unix.so +session required pam_unix.so +password required pam_permit.so diff --git a/testing/shadow/login b/testing/shadow/login new file mode 100644 index 000000000..b8555f89c --- /dev/null +++ b/testing/shadow/login @@ -0,0 +1,21 @@ +#%PAM-1.0 +auth required pam_securetty.so +auth requisite pam_nologin.so +auth required pam_unix.so nullok +auth required pam_tally.so onerr=succeed file=/var/log/faillog +# use this to lockout accounts for 10 minutes after 3 failed attempts +#auth required pam_tally.so deny=2 unlock_time=600 onerr=succeed file=/var/log/faillog +account required pam_access.so +account required pam_time.so +account required pam_unix.so +#password required pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3 +#password required pam_unix.so sha512 shadow use_authtok +session required pam_unix.so +session required pam_env.so +session required pam_motd.so +session required pam_limits.so +session optional pam_mail.so dir=/var/spool/mail standard +session optional pam_lastlog.so +session optional pam_loginuid.so +-session optional pam_ck_connector.so nox11 +-session optional pam_systemd.so diff --git a/testing/shadow/login.defs b/testing/shadow/login.defs new file mode 100644 index 000000000..2500ee447 --- /dev/null +++ b/testing/shadow/login.defs @@ -0,0 +1,197 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# +# Delay in seconds before being allowed another attempt after a login failure +# +FAIL_DELAY 3 + +# +# Enable display of unknown usernames when login failures are recorded. +# +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +CONSOLE /etc/securetty +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# *REQUIRED* +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define both, MAIL_DIR takes precedence. +# QMAIL_DIR is for Qmail +# +#QMAIL_DIR Maildir +MAIL_DIR /var/spool/mail + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/sbin:/bin:/usr/sbin:/usr/bin +ENV_PATH PATH=/bin:/usr/bin + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# The ULIMIT is used only if the system supports it. +# (now it works with setrlimit too; ulimit is in 512-byte units) +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 077 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +SYS_UID_MIN 500 +SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +SYS_GID_MIN 500 +SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# This also enables userdel to remove user groups if no members exist. +# +USERGROUPS_ENAB yes + diff --git a/testing/shadow/newusers b/testing/shadow/newusers new file mode 100644 index 000000000..5d447985a --- /dev/null +++ b/testing/shadow/newusers @@ -0,0 +1,6 @@ +#%PAM-1.0 +auth sufficient pam_rootok.so +auth required pam_unix.so +account required pam_unix.so +session required pam_unix.so +password required pam_unix.so sha512 shadow diff --git a/testing/shadow/passwd b/testing/shadow/passwd new file mode 100644 index 000000000..ab56da496 --- /dev/null +++ b/testing/shadow/passwd @@ -0,0 +1,4 @@ +#%PAM-1.0 +#password required pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3 +#password required pam_unix.so sha512 shadow use_authtok +password required pam_unix.so sha512 shadow nullok diff --git a/testing/shadow/shadow-add-missing-include.patch b/testing/shadow/shadow-add-missing-include.patch new file mode 100644 index 000000000..5c9e946ef --- /dev/null +++ b/testing/shadow/shadow-add-missing-include.patch @@ -0,0 +1,11 @@ +diff -Naur shadow-4.1.4.2+svn3283/libmisc/copydir.c shadow-4.1.4.2+svn3283.new/libmisc/copydir.c +--- shadow-4.1.4.2+svn3283/libmisc/copydir.c 2010-09-05 11:35:26.000000000 -0400 ++++ shadow-4.1.4.2+svn3283.new/libmisc/copydir.c 2011-06-26 01:26:52.000000000 -0400 +@@ -34,6 +34,7 @@ + + #ident "$Id: copydir.c 3283 2010-09-05 15:34:42Z nekral-guest $" + ++#include + #include + #include + #include diff --git a/testing/shadow/shadow-strncpy-usage.patch b/testing/shadow/shadow-strncpy-usage.patch new file mode 100644 index 000000000..5aba8fa01 --- /dev/null +++ b/testing/shadow/shadow-strncpy-usage.patch @@ -0,0 +1,25 @@ +diff -u shadow-4.1.5/src/usermod.c.orig shadow-4.1.5/src/usermod.c +--- shadow-4.1.5/src/usermod.c.orig 2012-02-13 08:19:43.792146449 -0500 ++++ shadow-4.1.5/src/usermod.c 2012-02-13 08:21:19.375114500 -0500 +@@ -182,7 +182,7 @@ + struct tm *tp; + + if (date < 0) { +- strncpy (buf, "never", maxsize); ++ strncpy (buf, "never", maxsize - 1); + } else { + time_t t = (time_t) date; + tp = gmtime (&t); +diff -u shadow-4.1.5/src/login.c.orig shadow-4.1.5/src/login.c +--- shadow-4.1.5/src/login.c.orig 2012-02-13 08:19:50.951994454 -0500 ++++ shadow-4.1.5/src/login.c 2012-02-13 08:21:04.490430937 -0500 +@@ -752,7 +752,8 @@ + _("%s login: "), hostn); + } else { + strncpy (loginprompt, _("login: "), +- sizeof (loginprompt)); ++ sizeof (loginprompt) - 1); ++ loginprompt[sizeof (loginprompt) - 1] = '\0'; + } + + retcode = pam_set_item (pamh, PAM_USER_PROMPT, loginprompt); diff --git a/testing/shadow/shadow.cron.daily b/testing/shadow/shadow.cron.daily new file mode 100755 index 000000000..1931a793e --- /dev/null +++ b/testing/shadow/shadow.cron.daily @@ -0,0 +1,6 @@ +#!/bin/sh + +# Verify integrity of password and group files +/usr/sbin/pwck -r +/usr/sbin/grpck -r + diff --git a/testing/shadow/shadow.install b/testing/shadow/shadow.install new file mode 100644 index 000000000..14384c333 --- /dev/null +++ b/testing/shadow/shadow.install @@ -0,0 +1,9 @@ +post_upgrade() { + grpck -r >/dev/null 2>&1 + if [ $? -eq 2 ]; then + printf '%s\n' \ + "==> Warning: /etc/group or /etc/gshadow are inconsistent." \ + " Run 'grpck' to correct this." + fi + return 0 +} diff --git a/testing/shadow/useradd.defaults b/testing/shadow/useradd.defaults new file mode 100644 index 000000000..b800b1777 --- /dev/null +++ b/testing/shadow/useradd.defaults @@ -0,0 +1,9 @@ +# useradd defaults file for ArchLinux +# original changes by TomK +GROUP=100 +HOME=/home +INACTIVE=-1 +EXPIRE= +SHELL=/bin/bash +SKEL=/etc/skel +CREATE_MAIL_SPOOL=no diff --git a/testing/shadow/xstrdup.patch b/testing/shadow/xstrdup.patch new file mode 100644 index 000000000..bce434264 --- /dev/null +++ b/testing/shadow/xstrdup.patch @@ -0,0 +1,9 @@ +--- shadow-4.1.2.1/libmisc/xmalloc.c 2008-08-30 21:55:44.000000000 -0500 ++++ shadow-4.1.2.1/libmisc/xmalloc.c.new 2008-08-30 21:55:36.000000000 -0500 +@@ -61,5 +61,6 @@ + + char *xstrdup (const char *str) + { ++ if(str == NULL) return NULL; + return strcpy (xmalloc (strlen (str) + 1), str); + } diff --git a/testing/xf86-video-sis/PKGBUILD b/testing/xf86-video-sis/PKGBUILD index 0795269e5..04bb1d6a0 100644 --- a/testing/xf86-video-sis/PKGBUILD +++ b/testing/xf86-video-sis/PKGBUILD @@ -1,27 +1,32 @@ -# $Id: PKGBUILD 150071 2012-02-12 09:45:41Z andyrtr $ +# $Id: PKGBUILD 150127 2012-02-13 07:58:15Z jgc $ # Maintainer: Jan de Groot pkgname=xf86-video-sis pkgver=0.10.3 -pkgrel=6 +pkgrel=7 pkgdesc="X.org SiS video driver" arch=(i686 x86_64) url="http://xorg.freedesktop.org/" license=('custom') depends=('glibc') -makedepends=('xorg-server-devel>=1.11.99.903' 'xf86dgaproto' 'libdrm' 'xf86driproto' 'mesa>=8.0') # 'glproto') +makedepends=('xorg-server-devel>=1.11.99.903' 'xf86dgaproto') conflicts=('xorg-server<1.11.99.903') options=('!libtool') groups=('xorg-drivers' 'xorg') source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2 - sis-0.10.3-git.patch) + git-f5dafa24.patch) sha1sums=('158673747e240b0c33499685a32d46bdaead7cd5' - '9078c02e9d10384cafb75d675bade8644726c811') + 'b61c6a78723aa59f8c82152fec42475b611cd1e7') build() { cd "${srcdir}/${pkgname}-${pkgver}" - patch -Np1 -i ${srcdir}/sis-0.10.3-git.patch - ./configure --prefix=/usr #--enable-dri + patch -Np1 -i "${srcdir}/git-f5dafa24.patch" + libtoolize --force --copy + aclocal + autoconf + automake + + ./configure --prefix=/usr --disable-dri make } diff --git a/testing/xf86-video-sis/git-f5dafa24.patch b/testing/xf86-video-sis/git-f5dafa24.patch new file mode 100644 index 000000000..8c15b974b --- /dev/null +++ b/testing/xf86-video-sis/git-f5dafa24.patch @@ -0,0 +1,1654 @@ +diff --git a/configure.ac b/configure.ac +index 33c0d65..62ad933 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -20,54 +20,53 @@ + # + # Process this file with autoconf to produce a configure script + +-AC_PREREQ(2.57) ++# Initialize Autoconf ++AC_PREREQ([2.60]) + AC_INIT([xf86-video-sis], +- 0.10.3, ++ [0.10.3], + [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], +- xf86-video-sis) +- ++ [xf86-video-sis]) + AC_CONFIG_SRCDIR([Makefile.am]) +-AM_CONFIG_HEADER([config.h]) ++AC_CONFIG_HEADERS([config.h]) + AC_CONFIG_AUX_DIR(.) + ++# Initialize Automake + AM_INIT_AUTOMAKE([foreign dist-bzip2]) +- + AM_MAINTAINER_MODE + +-# Require xorg-macros: XORG_DEFAULT_OPTIONS ++# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS + m4_ifndef([XORG_MACROS_VERSION], +- [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])]) +-XORG_MACROS_VERSION(1.3) ++ [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) ++XORG_MACROS_VERSION(1.8) + XORG_DEFAULT_OPTIONS + +-# Checks for programs. ++# Initialize libtool + AC_DISABLE_STATIC + AC_PROG_LIBTOOL +-AC_PROG_CC +-XORG_PROG_RAWCPP + + AH_TOP([#include "xorg-server.h"]) + ++# Define a configure option for an alternate module directory + AC_ARG_WITH(xorg-module-dir, +- AC_HELP_STRING([--with-xorg-module-dir=DIR], ++ AS_HELP_STRING([--with-xorg-module-dir=DIR], + [Default xorg module directory [[default=$libdir/xorg/modules]]]), + [moduledir="$withval"], + [moduledir="$libdir/xorg/modules"]) + +-AC_ARG_ENABLE(dri, AC_HELP_STRING([--disable-dri], ++AC_ARG_ENABLE(dri, AS_HELP_STRING([--disable-dri], + [Disable DRI support [[default=auto]]]), + [DRI="$enableval"], + [DRI=auto]) + +-# Checks for extensions ++# Store the list of server defined optional extensions in REQUIRED_MODULES + XORG_DRIVER_CHECK_EXT(XINERAMA, xineramaproto) + XORG_DRIVER_CHECK_EXT(RANDR, randrproto) + XORG_DRIVER_CHECK_EXT(RENDER, renderproto) + XORG_DRIVER_CHECK_EXT(XV, videoproto) + XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto) + +-# Checks for pkg-config packages +-PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901 xproto fontsproto xf86dgaproto $REQUIRED_MODULES]) ++# Obtain compiler/linker options for the driver dependencies ++PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901 xproto fontsproto xf86dgaproto >= 2.1 $REQUIRED_MODULES]) + PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1], + HAVE_XEXTPROTO_71="yes"; AC_DEFINE(HAVE_XEXTPROTO_71, 1, [xextproto 7.1 available]), + HAVE_XEXTPROTO_71="no") +@@ -76,9 +75,6 @@ sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server` + + # Checks for libraries. + +-# Checks for header files. +-AC_HEADER_STDC +- + if test "$DRI" != no; then + AC_CHECK_FILE([${sdkdir}/dri.h], + [have_dri_h="yes"], [have_dri_h="no"]) +@@ -103,8 +99,8 @@ AC_MSG_RESULT([$DRI]) + AM_CONDITIONAL(DRI, test x$DRI = xyes) + if test "$DRI" = yes; then + PKG_CHECK_MODULES(DRI, [libdrm >= 2.0 xf86driproto]) +- AC_DEFINE(XF86DRI,1,[Enable DRI driver support]) +- AC_DEFINE(XF86DRI_DEVEL,1,[Enable developmental DRI driver support]) ++ AC_DEFINE(SISDRI,1,[Enable DRI driver support]) ++ AC_DEFINE(SISDRI_DEVEL,1,[Enable developmental DRI driver support]) + fi + + # technically this should be a configure flag. meh. +@@ -118,20 +114,19 @@ AC_CHECK_DECL(XSERVER_LIBPCIACCESS, + CPPFLAGS="$SAVE_CPPFLAGS" + + if test "x$XSERVER_LIBPCIACCESS" = xyes; then +- PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.10]) ++ PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.12.901]) + XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS" + fi + AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes) + +-AC_SUBST([DRI_CFLAGS]) +-AC_SUBST([XORG_CFLAGS]) + AC_SUBST([moduledir]) + + DRIVER_NAME=sis + AC_SUBST([DRIVER_NAME]) + +-AC_OUTPUT([ +- Makefile +- src/Makefile +- man/Makefile ++AC_CONFIG_FILES([ ++ Makefile ++ src/Makefile ++ man/Makefile + ]) ++AC_OUTPUT +diff --git a/man/Makefile.am b/man/Makefile.am +index 1b26ac2..9ceb36f 100644 +--- a/man/Makefile.am ++++ b/man/Makefile.am +@@ -31,39 +31,9 @@ EXTRA_DIST = @DRIVER_NAME@.man + + CLEANFILES = $(driverman_DATA) + +-SED = sed +- +-# Strings to replace in man pages +-XORGRELSTRING = @PACKAGE_STRING@ +- XORGMANNAME = X Version 11 +- +-MANDEFS = \ +- -D__vendorversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ +- -D__appmansuffix__=$(APP_MAN_SUFFIX) \ +- -D__filemansuffix__=$(FILE_MAN_SUFFIX) \ +- -D__libmansuffix__=$(LIB_MAN_SUFFIX) \ +- -D__miscmansuffix__=$(MISC_MAN_SUFFIX) \ +- -D__drivermansuffix__=$(DRIVER_MAN_SUFFIX) \ +- -D__adminmansuffix__=$(ADMIN_MAN_SUFFIX) \ +- -D__xconfigfile__=xorg.conf \ +- -D__xservername__=Xorg +- +-# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM +-# to cpp, because that trick does not work on all ANSI C preprocessors. +-# Delete line numbers from the cpp output (-P is not portable, I guess). +-# Allow XCOMM to be preceded by whitespace and provide a means of generating +-# output lines with trailing backslashes. +-# Allow XHASH to always be substituted, even in cases where XCOMM isn't. +- +-CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ +- -e '/^\#line *[0-9][0-9]* *.*$$/d' \ +- -e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \ +- -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \ +- -e '/^[ ]*XHASH/s/XHASH/\#/' \ +- -e '/\@\@$$/s/\@\@$$/\\/' +- + SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man + ++# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure + .man.$(DRIVER_MAN_SUFFIX): +- $(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@ ++ $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ + +diff --git a/man/sis.man b/man/sis.man +index 9ae4a1b..578bb68 100644 +--- a/man/sis.man ++++ b/man/sis.man +@@ -1,17 +1,5 @@ +-.\" $XFree86$ +-.\" $XdotOrg$ + .\" shorthand for double quote that works everywhere. + .ds q \N'34' +-#ifdef __xservername__ +-#define __myservername__ __xservername__ +-#else +-#define __myservername__ XFree86 +-#endif +-#ifdef __xconfigfile__ +-#define __myxconfigfile__ __xconfigfile__ +-#else +-#define __myxconfigfile__ XF86Config +-#endif + .TH SIS __drivermansuffix__ __vendorversion__ + .SH NAME + sis \- SiS and XGI video driver +@@ -25,7 +13,7 @@ sis \- SiS and XGI video driver + .fi + .SH DESCRIPTION + .B sis +-is an __myservername__ driver for SiS (Silicon Integrated Systems) and XGI video ++is an __xservername__ driver for SiS (Silicon Integrated Systems) and XGI video + chips. The driver is accelerated and provides support for colordepths of 8, 16 + and 24 bpp. XVideo, Render and other extensions are supported as well. + .SH SUPPORTED HARDWARE +@@ -60,7 +48,7 @@ for SiS315, 55x, 330, 661/741/76x (plus M, FX, MX, GX variants thereof), 340 + and all XGI chips. + .PP + .SH CONFIGURATION DETAILS +-Please refer to __myxconfigfile__(__filemansuffix__) for general configuration ++Please refer to __xconfigfile__(__filemansuffix__) for general configuration + details. This section only covers configuration details specific to this + driver. + .PP +@@ -428,11 +416,7 @@ The amount is to be specified in megabyte, the default is 8. + .SH "KNOWN BUGS" + none. + .SH "SEE ALSO" +-#ifdef __xservername__ + __xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__) +-#else +-XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(__miscmansuffix__) +-#endif + .PP + .B "http://www.winischhofer.eu/linuxsisvga.shtml" + for more information and updates +diff --git a/src/initextx.c b/src/initextx.c +index 5c00398..1e84d0f 100644 +--- a/src/initextx.c ++++ b/src/initextx.c +@@ -238,10 +238,10 @@ SiSBuildBuiltInModeList(ScrnInfoPtr pScrn, BOOLEAN includelcdmodes, BOOLEAN isfo + continue; + } + +- if(!(new = xalloc(sizeof(DisplayModeRec)))) return first; ++ if(!(new = malloc(sizeof(DisplayModeRec)))) return first; + memset(new, 0, sizeof(DisplayModeRec)); +- if(!(new->name = xalloc(10))) { +- xfree(new); ++ if(!(new->name = malloc(10))) { ++ free(new); + return first; + } + if(!first) first = new; +@@ -385,11 +385,11 @@ SiSBuildBuiltInModeList(ScrnInfoPtr pScrn, BOOLEAN includelcdmodes, BOOLEAN isfo + } + } + +- if(!(new = xalloc(sizeof(DisplayModeRec)))) return first; ++ if(!(new = malloc(sizeof(DisplayModeRec)))) return first; + + memset(new, 0, sizeof(DisplayModeRec)); +- if(!(new->name = xalloc(12))) { +- xfree(new); ++ if(!(new->name = malloc(12))) { ++ free(new); + return first; + } + if(!first) first = new; +@@ -470,11 +470,11 @@ SiSBuildBuiltInModeList(ScrnInfoPtr pScrn, BOOLEAN includelcdmodes, BOOLEAN isfo + + if(pSiS->SiS_Pr->CP_DataValid[i]) { + +- if(!(new = xalloc(sizeof(DisplayModeRec)))) return first; ++ if(!(new = malloc(sizeof(DisplayModeRec)))) return first; + + memset(new, 0, sizeof(DisplayModeRec)); +- if(!(new->name = xalloc(10))) { +- xfree(new); ++ if(!(new->name = malloc(10))) { ++ free(new); + return first; + } + if(!first) first = new; +diff --git a/src/osdef.h b/src/osdef.h +index cd6b907..5776910 100644 +--- a/src/osdef.h ++++ b/src/osdef.h +@@ -110,12 +110,12 @@ + #warning sisfb will not work! + #endif + +-#define OutPortByte(p,v) outb((u8)(v),(IOADDRESS)(p)) +-#define OutPortWord(p,v) outw((u16)(v),(IOADDRESS)(p)) +-#define OutPortLong(p,v) outl((u32)(v),(IOADDRESS)(p)) +-#define InPortByte(p) inb((IOADDRESS)(p)) +-#define InPortWord(p) inw((IOADDRESS)(p)) +-#define InPortLong(p) inl((IOADDRESS)(p)) ++#define OutPortByte(p,v) outb((u8)(v),(unsigned long)(p)) ++#define OutPortWord(p,v) outw((u16)(v),(unsigned long)(p)) ++#define OutPortLong(p,v) outl((u32)(v),(unsigned long)(p)) ++#define InPortByte(p) inb((unsigned long)(p)) ++#define InPortWord(p) inw((unsigned long)(p)) ++#define InPortLong(p) inl((unsigned long)(p)) + #define SiS_SetMemory(MemoryAddress,MemorySize,value) memset_io(MemoryAddress, value, MemorySize) + + #endif /* LINUX_KERNEL */ +@@ -129,12 +129,12 @@ + #define SIS300 + #define SIS315H + +-#define OutPortByte(p,v) outSISREG((IOADDRESS)(p),(CARD8)(v)) +-#define OutPortWord(p,v) outSISREGW((IOADDRESS)(p),(CARD16)(v)) +-#define OutPortLong(p,v) outSISREGL((IOADDRESS)(p),(CARD32)(v)) +-#define InPortByte(p) inSISREG((IOADDRESS)(p)) +-#define InPortWord(p) inSISREGW((IOADDRESS)(p)) +-#define InPortLong(p) inSISREGL((IOADDRESS)(p)) ++#define OutPortByte(p,v) outSISREG((unsigned long)(p),(CARD8)(v)) ++#define OutPortWord(p,v) outSISREGW((unsigned long)(p),(CARD16)(v)) ++#define OutPortLong(p,v) outSISREGL((unsigned long)(p),(CARD32)(v)) ++#define InPortByte(p) inSISREG((unsigned long)(p)) ++#define InPortWord(p) inSISREGW((unsigned long)(p)) ++#define InPortLong(p) inSISREGL((unsigned long)(p)) + #define SiS_SetMemory(MemoryAddress,MemorySize,value) memset(MemoryAddress, value, MemorySize) + + #endif /* XF86 */ +diff --git a/src/sis.h b/src/sis.h +index 400b83f..f2ca3a9 100644 +--- a/src/sis.h ++++ b/src/sis.h +@@ -86,6 +86,14 @@ + #include "xf86cmap.h" + #include "vbe.h" + ++#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12 ++#define _swapl(x, n) swapl(x,n) ++#define _swaps(x, n) swaps(x,n) ++#else ++#define _swapl(x, n) swapl(x) ++#define _swaps(x, n) swaps(x) ++#endif ++ + #define SIS_HaveDriverFuncs 0 + + #undef SISISXORG6899900 +@@ -173,7 +181,13 @@ + + #undef SISHAVEDRMWRITE + #undef SISNEWDRI +-#ifdef XF86DRI ++ ++/* if the server was built without DRI support, force-disable DRI */ ++#ifndef XF86DRI ++#undef SISDRI ++#endif ++ ++#ifdef SISDRI + #if XF86_VERSION_CURRENT >= XF86_VERSION_NUMERIC(4,2,99,3,0) + #define SISHAVEDRMWRITE + #endif +@@ -187,7 +201,7 @@ + #include "dri.h" + #include "GL/glxint.h" + #include "sis_dri.h" +-#endif /* XF86DRI */ ++#endif /* SISDRI */ + + /* Configurable stuff: ------------------------------------- */ + +@@ -251,7 +265,6 @@ + #endif + + /* Need that for SiSCtrl and Pseudo-Xinerama */ +-#define NEED_REPLIES /* ? */ + #define EXTENSION_PROC_ARGS void * + #include "extnsionst.h" /* required */ + #include /* required */ +@@ -805,7 +818,7 @@ typedef struct { + ScrnInfoPtr pScrn_2; + UChar *BIOS; + struct SiS_Private *SiS_Pr; +-#ifdef XF86DRI ++#ifdef SISDRI + SISAGPHTYPE agpHandle; + ULong agpAddr; + UChar *agpBase; +@@ -971,7 +984,7 @@ typedef struct { + void *RealFbBase; /* Real VRAM virtual linear address (for DHM and SiS76x UMA skipping) */ + CARD32 IOAddress; /* MMIO physical address */ + void *IOBase; /* MMIO linear address */ +- IOADDRESS IODBase; /* Base of PIO memory area */ ++ unsigned long IODBase; /* Base of PIO memory area */ + #ifdef __alpha__ + void *IOBaseDense; /* MMIO for Alpha platform */ + #endif +@@ -1085,7 +1098,7 @@ typedef struct { + unsigned int cmdQueueSize_div2; + unsigned int cmdQueueSize_div4; + unsigned int cmdQueueSize_4_3; +-#ifdef XF86DRI ++#ifdef SISDRI + SISAGPHTYPE agpHandle; + ULong agpAddr; + UChar *agpBase; +@@ -1144,7 +1157,7 @@ typedef struct { + + /* DRI */ + Bool loadDRI; +-#ifdef XF86DRI ++#ifdef SISDRI + Bool directRenderingEnabled; + DRIInfoPtr pDRIInfo; + int drmSubFD; +@@ -1348,7 +1361,7 @@ typedef struct { + Bool skipswitchcheck; + unsigned int VBFlagsInit; + DisplayModePtr currentModeLast; +- IOADDRESS MyPIOOffset; ++ unsigned long MyPIOOffset; + Bool OverruleRanges; + Bool BenchMemCpy; + Bool NeedCopyFastVidCpy; +diff --git a/src/sis6326_video.c b/src/sis6326_video.c +index c6b18e2..66352b7 100644 +--- a/src/sis6326_video.c ++++ b/src/sis6326_video.c +@@ -170,7 +170,7 @@ void SIS6326InitVideo(ScreenPtr pScreen) + adaptors = &newAdaptor; + } else { + /* need to free this someplace */ +- newAdaptors = xalloc((num_adaptors + 1) * sizeof(XF86VideoAdaptorPtr*)); ++ newAdaptors = malloc((num_adaptors + 1) * sizeof(XF86VideoAdaptorPtr*)); + if(newAdaptors) { + memcpy(newAdaptors, adaptors, num_adaptors * + sizeof(XF86VideoAdaptorPtr)); +@@ -185,7 +185,7 @@ void SIS6326InitVideo(ScreenPtr pScreen) + xf86XVScreenInit(pScreen, adaptors, num_adaptors); + + if(newAdaptors) +- xfree(newAdaptors); ++ free(newAdaptors); + } + + /* client libraries expect an encoding */ +@@ -531,7 +531,7 @@ SIS6326SetupImageVideo(ScreenPtr pScreen) + return NULL; + #endif + +- if(!(adapt = xcalloc(1, sizeof(XF86VideoAdaptorRec) + ++ if(!(adapt = calloc(1, sizeof(XF86VideoAdaptorRec) + + sizeof(SISPortPrivRec) + + sizeof(DevUnion)))) + return NULL; +diff --git a/src/sis_dga.c b/src/sis_dga.c +index d358645..16b0ee4 100644 +--- a/src/sis_dga.c ++++ b/src/sis_dga.c +@@ -150,18 +150,18 @@ SISSetupDGAMode( + + if(pMode->HDisplay != otherPitch) { + +- newmodes = xrealloc(modes, (*num + 2) * sizeof(DGAModeRec)); ++ newmodes = realloc(modes, (*num + 2) * sizeof(DGAModeRec)); + oneMore = TRUE; + + } else { + +- newmodes = xrealloc(modes, (*num + 1) * sizeof(DGAModeRec)); ++ newmodes = realloc(modes, (*num + 1) * sizeof(DGAModeRec)); + oneMore = FALSE; + + } + + if(!newmodes) { +- xfree(modes); ++ free(modes); + return NULL; + } + modes = newmodes; +diff --git a/src/sis_dri.c b/src/sis_dri.c +index 3a476a2..97ed951 100644 +--- a/src/sis_dri.c ++++ b/src/sis_dri.c +@@ -149,19 +149,19 @@ SISInitVisualConfigs(ScreenPtr pScreen) + case 32: + numConfigs = (useZ16) ? 8 : 16; + +- if(!(pConfigs = (__GLXvisualConfig*)xcalloc(sizeof(__GLXvisualConfig), ++ if(!(pConfigs = (__GLXvisualConfig*)calloc(sizeof(__GLXvisualConfig), + numConfigs))) { + return FALSE; + } +- if(!(pSISConfigs = (SISConfigPrivPtr)xcalloc(sizeof(SISConfigPrivRec), ++ if(!(pSISConfigs = (SISConfigPrivPtr)calloc(sizeof(SISConfigPrivRec), + numConfigs))) { +- xfree(pConfigs); ++ free(pConfigs); + return FALSE; + } +- if(!(pSISConfigPtrs = (SISConfigPrivPtr*)xcalloc(sizeof(SISConfigPrivPtr), ++ if(!(pSISConfigPtrs = (SISConfigPrivPtr*)calloc(sizeof(SISConfigPrivPtr), + numConfigs))) { +- xfree(pConfigs); +- xfree(pSISConfigs); ++ free(pConfigs); ++ free(pSISConfigs); + return FALSE; + } + for(i=0; ibusIdString = DRICreatePCIBusID(pSIS->PciInfo); + } else { + #endif +- pDRIInfo->busIdString = xalloc(64); ++ pDRIInfo->busIdString = malloc(64); + sprintf(pDRIInfo->busIdString, "PCI:%d:%d:%d", + pSIS->PciBus, pSIS->PciDevice, pSIS->PciFunc); + #ifdef SISHAVECREATEBUSID +@@ -383,7 +383,7 @@ SISDRIScreenInit(ScreenPtr pScreen) + pDRIInfo->SAREASize = SAREA_MAX; + #endif + +- if(!(pSISDRI = (SISDRIPtr)xcalloc(sizeof(SISDRIRec), 1))) { ++ if(!(pSISDRI = (SISDRIPtr)calloc(sizeof(SISDRIRec), 1))) { + DRIDestroyInfoRec(pSIS->pDRIInfo); + pSIS->pDRIInfo = 0; + return FALSE; +@@ -401,7 +401,7 @@ SISDRIScreenInit(ScreenPtr pScreen) + + if(!DRIScreenInit(pScreen, pDRIInfo, &pSIS->drmSubFD)) { + xf86DrvMsg(pScreen->myNum, X_ERROR, "[dri] DRIScreenInit failed. Disabling the DRI.\n"); +- xfree(pDRIInfo->devPrivate); ++ free(pDRIInfo->devPrivate); + pDRIInfo->devPrivate = 0; + DRIDestroyInfoRec(pSIS->pDRIInfo); + pSIS->pDRIInfo = 0; +@@ -794,7 +794,7 @@ SISDRICloseScreen(ScreenPtr pScreen) + + if(pSIS->pDRIInfo) { + if(pSIS->pDRIInfo->devPrivate) { +- xfree(pSIS->pDRIInfo->devPrivate); ++ free(pSIS->pDRIInfo->devPrivate); + pSIS->pDRIInfo->devPrivate = NULL; + } + DRIDestroyInfoRec(pSIS->pDRIInfo); +@@ -802,12 +802,12 @@ SISDRICloseScreen(ScreenPtr pScreen) + } + + if(pSIS->pVisualConfigs) { +- xfree(pSIS->pVisualConfigs); ++ free(pSIS->pVisualConfigs); + pSIS->pVisualConfigs = NULL; + } + + if(pSIS->pVisualConfigsPriv) { +- xfree(pSIS->pVisualConfigsPriv); ++ free(pSIS->pVisualConfigsPriv); + pSIS->pVisualConfigsPriv = NULL; + } + +diff --git a/src/sis_driver.c b/src/sis_driver.c +index d95b5f1..7a5be4e 100644 +--- a/src/sis_driver.c ++++ b/src/sis_driver.c +@@ -74,8 +74,7 @@ + + #include "sis_driver.h" + +-#define _XF86DGA_SERVER_ +-#include ++#include + + #include "globals.h" + +@@ -86,11 +85,35 @@ + #include + #endif + ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 5 ++#include /* for inputInfo */ ++#endif ++ + +-#ifdef XF86DRI ++#ifdef SISDRI + #include "dri.h" + #endif + ++/* ++ * LookupWindow was removed with video abi 11. ++ */ ++#if (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 4) ++#ifndef DixGetAttrAccess ++#define DixGetAttrAccess (1<<4) ++#endif ++#endif ++ ++#if (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 2) ++static inline int ++dixLookupWindow(WindowPtr *pWin, XID id, ClientPtr client, Mask access) ++{ ++ *pWin = LookupWindow(id, client); ++ if (!*pWin) ++ return BadWindow; ++ return Success; ++} ++#endif ++ + /* Globals (yes, these ARE really required to be global) */ + + #ifdef SISUSEDEVPORT +@@ -299,9 +322,9 @@ SISFreeRec(ScrnInfoPtr pScrn) + pSiSEnt = pSiS->entityPrivate; + #endif + +- if(pSiS->pstate) xfree(pSiS->pstate); ++ if(pSiS->pstate) free(pSiS->pstate); + pSiS->pstate = NULL; +- if(pSiS->fonts) xfree(pSiS->fonts); ++ if(pSiS->fonts) free(pSiS->fonts); + pSiS->fonts = NULL; + + #ifdef SISDUALHEAD +@@ -312,11 +335,11 @@ SISFreeRec(ScrnInfoPtr pScrn) + * and we need the BIOS image and SiS_Private for the first + * head. + */ +- if(pSiSEnt->BIOS) xfree(pSiSEnt->BIOS); ++ if(pSiSEnt->BIOS) free(pSiSEnt->BIOS); + pSiSEnt->BIOS = pSiS->BIOS = NULL; +- if(pSiSEnt->SiS_Pr) xfree(pSiSEnt->SiS_Pr); ++ if(pSiSEnt->SiS_Pr) free(pSiSEnt->SiS_Pr); + pSiSEnt->SiS_Pr = pSiS->SiS_Pr = NULL; +- if(pSiSEnt->RenderAccelArray) xfree(pSiSEnt->RenderAccelArray); ++ if(pSiSEnt->RenderAccelArray) free(pSiSEnt->RenderAccelArray); + pSiSEnt->RenderAccelArray = pSiS->RenderAccelArray = NULL; + pSiSEnt->pScrn_1 = NULL; + } else { +@@ -327,21 +350,21 @@ SISFreeRec(ScrnInfoPtr pScrn) + } + } else { + #endif +- if(pSiS->BIOS) xfree(pSiS->BIOS); ++ if(pSiS->BIOS) free(pSiS->BIOS); + pSiS->BIOS = NULL; +- if(pSiS->SiS_Pr) xfree(pSiS->SiS_Pr); ++ if(pSiS->SiS_Pr) free(pSiS->SiS_Pr); + pSiS->SiS_Pr = NULL; +- if(pSiS->RenderAccelArray) xfree(pSiS->RenderAccelArray); ++ if(pSiS->RenderAccelArray) free(pSiS->RenderAccelArray); + pSiS->RenderAccelArray = NULL; + #ifdef SISDUALHEAD + } + #endif + #ifdef SISMERGED +- if(pSiS->CRT2HSync) xfree(pSiS->CRT2HSync); ++ if(pSiS->CRT2HSync) free(pSiS->CRT2HSync); + pSiS->CRT2HSync = NULL; +- if(pSiS->CRT2VRefresh) xfree(pSiS->CRT2VRefresh); ++ if(pSiS->CRT2VRefresh) free(pSiS->CRT2VRefresh); + pSiS->CRT2VRefresh = NULL; +- if(pSiS->MetaModes) xfree(pSiS->MetaModes); ++ if(pSiS->MetaModes) free(pSiS->MetaModes); + pSiS->MetaModes = NULL; + if(pSiS->CRT2pScrn) { + if(pSiS->CRT2pScrn->modes) { +@@ -353,10 +376,10 @@ SISFreeRec(ScrnInfoPtr pScrn) + while(pSiS->CRT2pScrn->monitor->Modes) + xf86DeleteMode(&pSiS->CRT2pScrn->monitor->Modes, pSiS->CRT2pScrn->monitor->Modes); + } +- if(pSiS->CRT2pScrn->monitor->DDC) xfree(pSiS->CRT2pScrn->monitor->DDC); +- xfree(pSiS->CRT2pScrn->monitor); ++ if(pSiS->CRT2pScrn->monitor->DDC) free(pSiS->CRT2pScrn->monitor->DDC); ++ free(pSiS->CRT2pScrn->monitor); + } +- xfree(pSiS->CRT2pScrn); ++ free(pSiS->CRT2pScrn); + pSiS->CRT2pScrn = NULL; + } + if(pSiS->CRT1Modes) { +@@ -366,8 +389,8 @@ SISFreeRec(ScrnInfoPtr pScrn) + do { + DisplayModePtr p = pScrn->currentMode->next; + if(pScrn->currentMode->Private) +- xfree(pScrn->currentMode->Private); +- xfree(pScrn->currentMode); ++ free(pScrn->currentMode->Private); ++ free(pScrn->currentMode); + pScrn->currentMode = p; + } while(pScrn->currentMode != pScrn->modes); + } +@@ -380,7 +403,7 @@ SISFreeRec(ScrnInfoPtr pScrn) + #endif + while(pSiS->SISVESAModeList) { + sisModeInfoPtr mp = pSiS->SISVESAModeList->next; +- xfree(pSiS->SISVESAModeList); ++ free(pSiS->SISVESAModeList); + pSiS->SISVESAModeList = mp; + } + if(pSiS->pVbe) vbeFree(pSiS->pVbe); +@@ -392,7 +415,7 @@ SISFreeRec(ScrnInfoPtr pScrn) + + if(pScrn->driverPrivate == NULL) + return; +- xfree(pScrn->driverPrivate); ++ free(pScrn->driverPrivate); + pScrn->driverPrivate = NULL; + } + +@@ -501,7 +524,7 @@ SISProbe(DriverPtr drv, int flags) + numDevSections, drv, &usedChipsXGI); + + /* Free it since we don't need that list after this */ +- xfree(devSections); ++ free(devSections); + + numUsed = numUsedSiS + numUsedXGI; + +@@ -577,8 +600,8 @@ SISProbe(DriverPtr drv, int flags) + + } + +- if(usedChipsSiS) xfree(usedChipsSiS); +- if(usedChipsXGI) xfree(usedChipsXGI); ++ if(usedChipsSiS) free(usedChipsSiS); ++ if(usedChipsXGI) free(usedChipsXGI); + + return foundScreen; + } +@@ -642,10 +665,10 @@ SISCalculateGammaRamp(ScreenPtr pScreen, ScrnInfoPtr pScrn) + if(!(nramp = xf86GetGammaRampSize(pScreen))) return; + + for(i=0; i<3; i++) { +- ramp[i] = (UShort *)xalloc(nramp * sizeof(UShort)); ++ ramp[i] = (UShort *)malloc(nramp * sizeof(UShort)); + if(!ramp[i]) { +- if(ramp[0]) { xfree(ramp[0]); ramp[0] = NULL; } +- if(ramp[1]) { xfree(ramp[1]); ramp[1] = NULL; } ++ if(ramp[0]) { free(ramp[0]); ramp[0] = NULL; } ++ if(ramp[1]) { free(ramp[1]); ramp[1] = NULL; } + return; + } + } +@@ -705,9 +728,9 @@ SISCalculateGammaRamp(ScreenPtr pScreen, ScrnInfoPtr pScrn) + + xf86ChangeGammaRamp(pScreen, nramp, ramp[0], ramp[1], ramp[2]); + +- xfree(ramp[0]); +- xfree(ramp[1]); +- xfree(ramp[2]); ++ free(ramp[0]); ++ free(ramp[1]); ++ free(ramp[2]); + ramp[0] = ramp[1] = ramp[2] = NULL; + } + #endif +@@ -1135,10 +1158,10 @@ SiSCopyModeNLink(ScrnInfoPtr pScrn, DisplayModePtr dest, + DisplayModePtr mode; + int dx = 0,dy = 0; + +- if(!((mode = xalloc(sizeof(DisplayModeRec))))) return dest; ++ if(!((mode = malloc(sizeof(DisplayModeRec))))) return dest; + memcpy(mode, i, sizeof(DisplayModeRec)); +- if(!((mode->Private = xalloc(sizeof(SiSMergedDisplayModeRec))))) { +- xfree(mode); ++ if(!((mode->Private = malloc(sizeof(SiSMergedDisplayModeRec))))) { ++ free(mode); + return dest; + } + ((SiSMergedDisplayModePtr)mode->Private)->CRT1 = i; +@@ -1223,8 +1246,8 @@ SiSCopyModeNLink(ScrnInfoPtr pScrn, DisplayModePtr dest, + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Skipped \"%s\" (%dx%d), not enough video RAM or beyond hardware specs\n", + mode->name, mode->HDisplay, mode->VDisplay); +- xfree(mode->Private); +- xfree(mode); ++ free(mode->Private); ++ free(mode); + + return dest; + } +@@ -2131,10 +2154,10 @@ SiSProcXineramaQueryVersion(ClientPtr client) + rep.majorVersion = SIS_XINERAMA_MAJOR_VERSION; + rep.minorVersion = SIS_XINERAMA_MINOR_VERSION; + if(client->swapped) { +- swaps(&rep.sequenceNumber, n); +- swapl(&rep.length, n); +- swaps(&rep.majorVersion, n); +- swaps(&rep.minorVersion, n); ++ _swaps(&rep.sequenceNumber, n); ++ _swapl(&rep.length, n); ++ _swaps(&rep.majorVersion, n); ++ _swaps(&rep.minorVersion, n); + } + WriteToClient(client, sizeof(xPanoramiXQueryVersionReply), (char *)&rep); + return (client->noClientException); +@@ -2147,19 +2170,20 @@ SiSProcXineramaGetState(ClientPtr client) + WindowPtr pWin; + xPanoramiXGetStateReply rep; + register int n; ++ int rc; + + REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); +- pWin = LookupWindow(stuff->window, client); +- if(!pWin) return BadWindow; ++ rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); ++ if (rc != Success) ++ return rc; + + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.state = !SiSnoPanoramiXExtension; + if(client->swapped) { +- swaps (&rep.sequenceNumber, n); +- swapl (&rep.length, n); +- swaps (&rep.state, n); ++ _swaps (&rep.sequenceNumber, n); ++ _swapl (&rep.length, n); + } + WriteToClient(client, sizeof(xPanoramiXGetStateReply), (char *)&rep); + return client->noClientException; +@@ -2172,19 +2196,20 @@ SiSProcXineramaGetScreenCount(ClientPtr client) + WindowPtr pWin; + xPanoramiXGetScreenCountReply rep; + register int n; ++ int rc; + + REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); +- pWin = LookupWindow(stuff->window, client); +- if(!pWin) return BadWindow; ++ rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); ++ if (rc != Success) ++ return rc; + + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.ScreenCount = SiSXineramaNumScreens; + if(client->swapped) { +- swaps(&rep.sequenceNumber, n); +- swapl(&rep.length, n); +- swaps(&rep.ScreenCount, n); ++ _swaps(&rep.sequenceNumber, n); ++ _swapl(&rep.length, n); + } + WriteToClient(client, sizeof(xPanoramiXGetScreenCountReply), (char *)&rep); + return client->noClientException; +@@ -2197,10 +2222,12 @@ SiSProcXineramaGetScreenSize(ClientPtr client) + WindowPtr pWin; + xPanoramiXGetScreenSizeReply rep; + register int n; ++ int rc; + + REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); +- pWin = LookupWindow (stuff->window, client); +- if(!pWin) return BadWindow; ++ rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); ++ if (rc != Success) ++ return rc; + + rep.type = X_Reply; + rep.length = 0; +@@ -2208,10 +2235,10 @@ SiSProcXineramaGetScreenSize(ClientPtr client) + rep.width = SiSXineramadataPtr[stuff->screen].width; + rep.height = SiSXineramadataPtr[stuff->screen].height; + if(client->swapped) { +- swaps(&rep.sequenceNumber, n); +- swapl(&rep.length, n); +- swaps(&rep.width, n); +- swaps(&rep.height, n); ++ _swaps(&rep.sequenceNumber, n); ++ _swapl(&rep.length, n); ++ _swapl(&rep.width, n); ++ _swapl(&rep.height, n); + } + WriteToClient(client, sizeof(xPanoramiXGetScreenSizeReply), (char *)&rep); + return client->noClientException; +@@ -2230,9 +2257,9 @@ SiSProcXineramaIsActive(ClientPtr client) + rep.state = !SiSnoPanoramiXExtension; + if(client->swapped) { + register int n; +- swaps(&rep.sequenceNumber, n); +- swapl(&rep.length, n); +- swapl(&rep.state, n); ++ _swaps(&rep.sequenceNumber, n); ++ _swapl(&rep.length, n); ++ _swapl(&rep.state, n); + } + WriteToClient(client, sizeof(xXineramaIsActiveReply), (char *) &rep); + return client->noClientException; +@@ -2251,9 +2278,9 @@ SiSProcXineramaQueryScreens(ClientPtr client) + rep.length = rep.number * sz_XineramaScreenInfo >> 2; + if(client->swapped) { + register int n; +- swaps(&rep.sequenceNumber, n); +- swapl(&rep.length, n); +- swapl(&rep.number, n); ++ _swaps(&rep.sequenceNumber, n); ++ _swapl(&rep.length, n); ++ _swapl(&rep.number, n); + } + WriteToClient(client, sizeof(xXineramaQueryScreensReply), (char *)&rep); + +@@ -2268,10 +2295,10 @@ SiSProcXineramaQueryScreens(ClientPtr client) + scratch.height = SiSXineramadataPtr[i].height; + if(client->swapped) { + register int n; +- swaps(&scratch.x_org, n); +- swaps(&scratch.y_org, n); +- swaps(&scratch.width, n); +- swaps(&scratch.height, n); ++ _swaps(&scratch.x_org, n); ++ _swaps(&scratch.y_org, n); ++ _swaps(&scratch.width, n); ++ _swaps(&scratch.height, n); + } + WriteToClient(client, sz_XineramaScreenInfo, (char *)&scratch); + } +@@ -2308,7 +2335,7 @@ SiSSProcXineramaQueryVersion (ClientPtr client) + { + REQUEST(xPanoramiXQueryVersionReq); + register int n; +- swaps(&stuff->length,n); ++ _swaps(&stuff->length,n); + REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq); + return SiSProcXineramaQueryVersion(client); + } +@@ -2318,7 +2345,7 @@ SiSSProcXineramaGetState(ClientPtr client) + { + REQUEST(xPanoramiXGetStateReq); + register int n; +- swaps (&stuff->length, n); ++ _swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); + return SiSProcXineramaGetState(client); + } +@@ -2328,7 +2355,7 @@ SiSSProcXineramaGetScreenCount(ClientPtr client) + { + REQUEST(xPanoramiXGetScreenCountReq); + register int n; +- swaps (&stuff->length, n); ++ _swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); + return SiSProcXineramaGetScreenCount(client); + } +@@ -2338,7 +2365,7 @@ SiSSProcXineramaGetScreenSize(ClientPtr client) + { + REQUEST(xPanoramiXGetScreenSizeReq); + register int n; +- swaps (&stuff->length, n); ++ _swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); + return SiSProcXineramaGetScreenSize(client); + } +@@ -2348,7 +2375,7 @@ SiSSProcXineramaIsActive(ClientPtr client) + { + REQUEST(xXineramaIsActiveReq); + register int n; +- swaps (&stuff->length, n); ++ _swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xXineramaIsActiveReq); + return SiSProcXineramaIsActive(client); + } +@@ -2358,7 +2385,7 @@ SiSSProcXineramaQueryScreens(ClientPtr client) + { + REQUEST(xXineramaQueryScreensReq); + register int n; +- swaps (&stuff->length, n); ++ _swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xXineramaQueryScreensReq); + return SiSProcXineramaQueryScreens(client); + } +@@ -2389,7 +2416,7 @@ SiSXineramaResetProc(ExtensionEntry* extEntry) + { + /* Called by CloseDownExtensions() */ + if(SiSXineramadataPtr) { +- Xfree(SiSXineramadataPtr); ++ free(SiSXineramadataPtr); + SiSXineramadataPtr = NULL; + } + } +@@ -2454,7 +2481,7 @@ SiSXineramaExtensionInit(ScrnInfoPtr pScrn) + if(!pSiS->XineramaExtEntry) break; + + if(!(SiSXineramadataPtr = (SiSXineramaData *) +- xcalloc(SiSXineramaNumScreens, sizeof(SiSXineramaData)))) break; ++ calloc(SiSXineramaNumScreens, sizeof(SiSXineramaData)))) break; + + SiSXineramaGeneration = serverGeneration; + success = TRUE; +@@ -2493,10 +2520,10 @@ SiSFreeCRT2Structs(SISPtr pSiS) + while(pSiS->CRT2pScrn->monitor->Modes) + xf86DeleteMode(&pSiS->CRT2pScrn->monitor->Modes, pSiS->CRT2pScrn->monitor->Modes); + } +- if(pSiS->CRT2pScrn->monitor->DDC) xfree(pSiS->CRT2pScrn->monitor->DDC); +- xfree(pSiS->CRT2pScrn->monitor); ++ if(pSiS->CRT2pScrn->monitor->DDC) free(pSiS->CRT2pScrn->monitor->DDC); ++ free(pSiS->CRT2pScrn->monitor); + } +- xfree(pSiS->CRT2pScrn); ++ free(pSiS->CRT2pScrn); + pSiS->CRT2pScrn = NULL; + } + } +@@ -2902,22 +2929,22 @@ SiS_CheckKernelFB(ScrnInfoPtr pScrn) + Bool gotit = FALSE; + + if(!ioctl(fd, SISFB_GET_INFO_SIZE, &sisfbinfosize)) { +- if((mysisfbinfo = xalloc(sisfbinfosize))) { ++ if((mysisfbinfo = malloc(sisfbinfosize))) { + if(!ioctl(fd, (SISFB_GET_INFO | (sisfbinfosize << 16)), mysisfbinfo)) { + gotit = TRUE; + } else { +- xfree(mysisfbinfo); ++ free(mysisfbinfo); + mysisfbinfo = NULL; + } + } + } else { +- if((mysisfbinfo = xalloc(sizeof(*mysisfbinfo) + 16))) { ++ if((mysisfbinfo = malloc(sizeof(*mysisfbinfo) + 16))) { + if(!ioctl(fd, SISFB_GET_INFO_OLD, mysisfbinfo)) { + gotit = TRUE; + xf86DrvMsg(pScrn->scrnIndex, X_WARNING, + "Possibly old version of sisfb detected. Please update.\n"); + } else { +- xfree(mysisfbinfo); ++ free(mysisfbinfo); + mysisfbinfo = NULL; + } + } +@@ -3056,7 +3083,7 @@ SiS_CheckKernelFB(ScrnInfoPtr pScrn) + } + } + } +- xfree(mysisfbinfo); ++ free(mysisfbinfo); + mysisfbinfo = NULL; + } + close (fd); +@@ -3216,7 +3243,7 @@ SISPreInit(ScrnInfoPtr pScrn, int flags) + pSiS->pInt = NULL; + + /* Save PCI Domain Base */ +-#if XF86_VERSION_CURRENT < XF86_VERSION_NUMERIC(4,2,99,0,0) ++#if XF86_VERSION_CURRENT < XF86_VERSION_NUMERIC(4,2,99,0,0) || GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 12 + pSiS->IODBase = 0; + #else + pSiS->IODBase = pScrn->domainIOBase; +@@ -4078,7 +4105,7 @@ SISPreInit(ScrnInfoPtr pScrn, int flags) + } + #endif + if(!pSiS->BIOS) { +- if(!(pSiS->BIOS = xcalloc(1, BIOS_SIZE))) { ++ if(!(pSiS->BIOS = calloc(1, BIOS_SIZE))) { + xf86DrvMsg(pScrn->scrnIndex, X_WARNING, + "Could not allocate memory for video BIOS image\n"); + } else { +@@ -4173,7 +4200,7 @@ SISPreInit(ScrnInfoPtr pScrn, int flags) + } else { + xf86DrvMsg(pScrn->scrnIndex, X_WARNING, + "Could not find/read video BIOS\n"); +- xfree(pSiS->BIOS); ++ free(pSiS->BIOS); + pSiS->BIOS = NULL; + } + } +@@ -5559,7 +5586,7 @@ SISPreInit(ScrnInfoPtr pScrn, int flags) + /* Do some MergedFB mode initialisation */ + #ifdef SISMERGED + if(pSiS->MergedFB) { +- pSiS->CRT2pScrn = xalloc(sizeof(ScrnInfoRec)); ++ pSiS->CRT2pScrn = malloc(sizeof(ScrnInfoRec)); + if(!pSiS->CRT2pScrn) { + SISErrorLog(pScrn, "Failed to allocate memory for 2nd pScrn, %s\n", mergeddisstr); + pSiS->MergedFB = FALSE; +@@ -5592,7 +5619,7 @@ SISPreInit(ScrnInfoPtr pScrn, int flags) + } else { + SISErrorLog(pScrn, mergednocrt1, mergeddisstr); + } +- if(pSiS->CRT2pScrn) xfree(pSiS->CRT2pScrn); ++ if(pSiS->CRT2pScrn) free(pSiS->CRT2pScrn); + pSiS->CRT2pScrn = NULL; + pSiS->MergedFB = FALSE; + } +@@ -5639,7 +5666,7 @@ SISPreInit(ScrnInfoPtr pScrn, int flags) + } else { + SISErrorLog(pScrn, mergednocrt2, mergeddisstr); + } +- if(pSiS->CRT2pScrn) xfree(pSiS->CRT2pScrn); ++ if(pSiS->CRT2pScrn) free(pSiS->CRT2pScrn); + pSiS->CRT2pScrn = NULL; + pSiS->MergedFB = FALSE; + } +@@ -6016,7 +6043,7 @@ SISPreInit(ScrnInfoPtr pScrn, int flags) + + #ifdef SISMERGED + if(pSiS->MergedFB) { +- pSiS->CRT2pScrn->monitor = xalloc(sizeof(MonRec)); ++ pSiS->CRT2pScrn->monitor = malloc(sizeof(MonRec)); + if(pSiS->CRT2pScrn->monitor) { + DisplayModePtr tempm = NULL, currentm = NULL, newm = NULL; + memcpy(pSiS->CRT2pScrn->monitor, pScrn->monitor, sizeof(MonRec)); +@@ -6025,10 +6052,10 @@ SISPreInit(ScrnInfoPtr pScrn, int flags) + pSiS->CRT2pScrn->monitor->id = (char *)crt2monname; + tempm = pScrn->monitor->Modes; + while(tempm) { +- if(!(newm = xalloc(sizeof(DisplayModeRec)))) break; ++ if(!(newm = malloc(sizeof(DisplayModeRec)))) break; + memcpy(newm, tempm, sizeof(DisplayModeRec)); +- if(!(newm->name = xalloc(strlen(tempm->name) + 1))) { +- xfree(newm); ++ if(!(newm->name = malloc(strlen(tempm->name) + 1))) { ++ free(newm); + break; + } + strcpy(newm->name, tempm->name); +@@ -6070,7 +6097,7 @@ SISPreInit(ScrnInfoPtr pScrn, int flags) + } else { + SISErrorLog(pScrn, "Failed to allocate memory for CRT2 monitor, %s.\n", + mergeddisstr); +- if(pSiS->CRT2pScrn) xfree(pSiS->CRT2pScrn); ++ if(pSiS->CRT2pScrn) free(pSiS->CRT2pScrn); + pSiS->CRT2pScrn = NULL; + pSiS->MergedFB = FALSE; + } +@@ -6835,8 +6862,10 @@ SISPreInit(ScrnInfoPtr pScrn, int flags) + #ifdef SIS_USE_XAA + if(!pSiS->useEXA) { + if (!xf86LoadSubModule(pScrn, "xaa")) { +- SISErrorLog(pScrn, "Could not load xaa module\n"); +- goto my_error_1; ++ xf86DrvMsg(pScrn->scrnIndex, X_INFO, ++ "Falling back to shadowfb\n"); ++ pSiS->NoAccel = 1; ++ pSiS->ShadowFB = 1; + } + } + #endif +@@ -6855,7 +6884,6 @@ SISPreInit(ScrnInfoPtr pScrn, int flags) + } + } + #endif +- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "2D acceleration enabled\n"); + } + + /* Load shadowfb (if needed) */ +@@ -6867,7 +6895,7 @@ SISPreInit(ScrnInfoPtr pScrn, int flags) + } + + /* Load the dri and glx modules if requested. */ +-#ifdef XF86DRI ++#ifdef SISDRI + if(pSiS->loadDRI) { + if(!xf86LoaderCheckSymbol("DRIScreenInit")) { + if(xf86LoadSubModule(pScrn, "dri")) { +@@ -7454,7 +7482,7 @@ SISVESASaveRestore(ScrnInfoPtr pScrn, vbeSaveRestoreFunction function) + (function == MODE_SAVE)) { + /* don't rely on the memory not being touched */ + if(!pSiS->pstate) { +- pSiS->pstate = xalloc(pSiS->stateSize); ++ pSiS->pstate = malloc(pSiS->stateSize); + } + memcpy(pSiS->pstate, pSiS->state, pSiS->stateSize); + } +@@ -8675,7 +8703,7 @@ SISScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) + + if(pSiS->ShadowFB) { + pSiS->ShadowPitch = BitmapBytePad(pScrn->bitsPerPixel * width); +- pSiS->ShadowPtr = xalloc(pSiS->ShadowPitch * height); ++ pSiS->ShadowPtr = malloc(pSiS->ShadowPitch * height); + displayWidth = pSiS->ShadowPitch / (pScrn->bitsPerPixel >> 3); + FBStart = pSiS->ShadowPtr; + } else { +@@ -8703,7 +8731,7 @@ SISScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) + + pSiS->cmdQueueLen = 0; /* Force an EngineIdle() at start */ + +-#ifdef XF86DRI ++#ifdef SISDRI + if(pSiS->loadDRI) { + #ifdef SISDUALHEAD + /* No DRI in dual head mode */ +@@ -8849,14 +8877,14 @@ SISScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) + + pSiS->CRT2ColNum = 1 << pScrn->rgbBits; + +- if((pSiS->crt2gcolortable = xalloc(pSiS->CRT2ColNum * 2 * sizeof(LOCO)))) { ++ if((pSiS->crt2gcolortable = malloc(pSiS->CRT2ColNum * 2 * sizeof(LOCO)))) { + pSiS->crt2colors = &pSiS->crt2gcolortable[pSiS->CRT2ColNum]; +- if((pSiS->crt2cindices = xalloc(256 * sizeof(int)))) { ++ if((pSiS->crt2cindices = malloc(256 * sizeof(int)))) { + int i = pSiS->CRT2ColNum; + SISCalculateGammaRampCRT2(pScrn); + while(i--) pSiS->crt2cindices[i] = i; + } else { +- xfree(pSiS->crt2gcolortable); ++ free(pSiS->crt2gcolortable); + pSiS->crt2gcolortable = NULL; + pSiS->CRT2SepGamma = FALSE; + } +@@ -9016,7 +9044,7 @@ SISScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) + } + #endif + +-#ifdef XF86DRI ++#ifdef SISDRI + if(pSiS->loadDRI) { + if(pSiS->directRenderingEnabled) { + /* Now that mi, drm and others have done their thing, +@@ -9322,9 +9350,22 @@ SISMergedPointerMoved(int scrnIndex, int x, int y) + } + } + if(doit) { +- UpdateCurrentTime(); + sigstate = xf86BlockSIGIO(); ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 15 ++ { ++ double dx = x, dy = y; ++ miPointerSetPosition(inputInfo.pointer, Absolute, &dx, &dy); ++ x = (int)dx; ++ y = (int)dy; ++ } ++#elif GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 13 ++ miPointerSetPosition(inputInfo.pointer, Absolute, x, y); ++#elif GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 5 ++ miPointerSetPosition(inputInfo.pointer, x, y); ++#else ++ UpdateCurrentTime(); + miPointerAbsoluteCursor(x, y, currentTime.milliseconds); ++#endif + xf86UnblockSIGIO(sigstate); + return; + } +@@ -9737,7 +9778,7 @@ SISEnterVT(int scrnIndex, int flags) + + SISAdjustFrame(scrnIndex, pScrn->frameX0, pScrn->frameY0, 0); + +-#ifdef XF86DRI ++#ifdef SISDRI + if(pSiS->directRenderingEnabled) { + DRIUnlock(screenInfo.screens[scrnIndex]); + } +@@ -9763,7 +9804,7 @@ SISLeaveVT(int scrnIndex, int flags) + { + ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + SISPtr pSiS = SISPTR(pScrn); +-#ifdef XF86DRI ++#ifdef SISDRI + ScreenPtr pScreen; + + if(pSiS->directRenderingEnabled) { +@@ -9847,7 +9888,7 @@ SISCloseScreen(int scrnIndex, ScreenPtr pScreen) + SiSCtrlExtUnregister(pSiS, pScrn->scrnIndex); + } + +-#ifdef XF86DRI ++#ifdef SISDRI + if(pSiS->directRenderingEnabled) { + SISDRICloseScreen(pScreen); + pSiS->directRenderingEnabled = FALSE; +@@ -9941,7 +9982,7 @@ SISCloseScreen(int scrnIndex, ScreenPtr pScreen) + if(pSiS->useEXA) { + if(pSiS->EXADriverPtr) { + exaDriverFini(pScreen); +- xfree(pSiS->EXADriverPtr); ++ free(pSiS->EXADriverPtr); + pSiS->EXADriverPtr = NULL; + pSiS->exa_scratch = NULL; + } +@@ -9954,33 +9995,33 @@ SISCloseScreen(int scrnIndex, ScreenPtr pScreen) + } + + if(pSiS->ShadowPtr) { +- xfree(pSiS->ShadowPtr); ++ free(pSiS->ShadowPtr); + pSiS->ShadowPtr = NULL; + } + + if(pSiS->DGAModes) { +- xfree(pSiS->DGAModes); ++ free(pSiS->DGAModes); + pSiS->DGAModes = NULL; + } + + if(pSiS->adaptor) { +- xfree(pSiS->adaptor); ++ free(pSiS->adaptor); + pSiS->adaptor = NULL; + pSiS->ResetXv = pSiS->ResetXvGamma = pSiS->ResetXvDisplay = NULL; + } + + if(pSiS->blitadaptor) { +- xfree(pSiS->blitadaptor); ++ free(pSiS->blitadaptor); + pSiS->blitadaptor = NULL; + } + + if(pSiS->crt2gcolortable) { +- xfree(pSiS->crt2gcolortable); ++ free(pSiS->crt2gcolortable); + pSiS->crt2gcolortable = NULL; + } + + if(pSiS->crt2cindices) { +- xfree(pSiS->crt2cindices); ++ free(pSiS->crt2cindices); + pSiS->crt2cindices = NULL; + } + +diff --git a/src/sis_memcpy.c b/src/sis_memcpy.c +index 6ad62e8..3634401 100644 +--- a/src/sis_memcpy.c ++++ b/src/sis_memcpy.c +@@ -638,13 +638,13 @@ SiS_AllocBuffers(ScrnInfoPtr pScrn, UChar **buf1, UChar **buf2, UChar **buf3) + (*buf1) = (UChar *)pSiS->FbBase + offset; + (*buf1) = (UChar *)(((ULong)(*buf1) + 31) & ~31); + +- if(!((*buf2) = (UChar *)xalloc(BUFFERSIZE + 15))) { ++ if(!((*buf2) = (UChar *)malloc(BUFFERSIZE + 15))) { + SISFreeFBMemory(pScrn, &handle); + return NULL; + } + +- if(!((*buf3) = (UChar *)xalloc(BUFFERSIZE + 15))) { +- xfree((*buf2)); ++ if(!((*buf3) = (UChar *)malloc(BUFFERSIZE + 15))) { ++ free((*buf2)); + SISFreeFBMemory(pScrn, &handle); + return NULL; + } +@@ -1098,8 +1098,8 @@ SiSVidCopyInitGen(ScreenPtr pScreen, SISMCFuncData *MCFunctions, vidCopyFunc *UM + + /* Free buffers */ + SISFreeFBMemory(pScrn, &fbhandle); +- xfree(buf2); +- xfree(buf3); ++ free(buf2); ++ free(buf3); + + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, + "Using %s method for aligned data transfers %s video RAM\n", +diff --git a/src/sis_opt.c b/src/sis_opt.c +index 3517549..3fa12c9 100644 +--- a/src/sis_opt.c ++++ b/src/sis_opt.c +@@ -448,7 +448,7 @@ SiSOptions(ScrnInfoPtr pScrn) + xf86CollectOptions(pScrn, NULL); + + /* Process the options */ +- if(!(pSiS->Options = xalloc(sizeof(SISOptions)))) return; ++ if(!(pSiS->Options = malloc(sizeof(SISOptions)))) return; + + memcpy(pSiS->Options, SISOptions, sizeof(SISOptions)); + +@@ -480,7 +480,7 @@ SiSOptions(ScrnInfoPtr pScrn) + #endif + pSiS->ShadowFB = FALSE; + pSiS->loadDRI = FALSE; +-#ifdef XF86DRI ++#ifdef SISDRI + pSiS->agpWantedPages = AGP_PAGES; + #endif + pSiS->VESA = -1; +@@ -888,7 +888,7 @@ SiSOptions(ScrnInfoPtr pScrn) + if((strptr = (char *)xf86GetOptValString(pSiS->Options, OPTION_CRT2POS))) { + int result; + Bool valid = FALSE; +- char *tempstr = xalloc(strlen(strptr) + 1); ++ char *tempstr = malloc(strlen(strptr) + 1); + result = sscanf(strptr, "%s %d", tempstr, &ival); + if(result >= 1) { + if(!xf86NameCmp(tempstr,"LeftOf")) { +@@ -946,18 +946,18 @@ SiSOptions(ScrnInfoPtr pScrn) + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Except for \"Clone\", the parameter may be followed by an integer.\n"); + } +- xfree(tempstr); ++ free(tempstr); + } + if((strptr = (char *)xf86GetOptValString(pSiS->Options, OPTION_METAMODES))) { +- pSiS->MetaModes = xalloc(strlen(strptr) + 1); ++ pSiS->MetaModes = malloc(strlen(strptr) + 1); + if(pSiS->MetaModes) memcpy(pSiS->MetaModes, strptr, strlen(strptr) + 1); + } + if((strptr = (char *)xf86GetOptValString(pSiS->Options, OPTION_CRT2HSYNC))) { +- pSiS->CRT2HSync = xalloc(strlen(strptr) + 1); ++ pSiS->CRT2HSync = malloc(strlen(strptr) + 1); + if(pSiS->CRT2HSync) memcpy(pSiS->CRT2HSync, strptr, strlen(strptr) + 1); + } + if((strptr = (char *)xf86GetOptValString(pSiS->Options, OPTION_CRT2VREFRESH))) { +- pSiS->CRT2VRefresh = xalloc(strlen(strptr) + 1); ++ pSiS->CRT2VRefresh = malloc(strlen(strptr) + 1); + if(pSiS->CRT2VRefresh) memcpy(pSiS->CRT2VRefresh, strptr, strlen(strptr) + 1); + } + if((strptr = (char *)xf86GetOptValString(pSiS->Options, OPTION_MERGEDDPI))) { +@@ -2034,7 +2034,7 @@ SiSOptions(ScrnInfoPtr pScrn) + } + } + +-#ifdef XF86DRI ++#ifdef SISDRI + /* DRI */ + from = X_DEFAULT; + if(xf86GetOptValBool(pSiS->Options, OPTION_DRI, &pSiS->loadDRI)) { +diff --git a/src/sis_utility.c b/src/sis_utility.c +index a9bcd2b..eda194f 100644 +--- a/src/sis_utility.c ++++ b/src/sis_utility.c +@@ -34,8 +34,6 @@ + #endif + + #include "sis.h" +-#define NEED_REPLIES +-#define NEED_EVENTS + #include + #include "dixstruct.h" + +@@ -1882,10 +1880,10 @@ SiSProcSiSCtrlQueryVersion(ClientPtr client) + rep.majorVersion = SISCTRL_MAJOR_VERSION; + rep.minorVersion = SISCTRL_MINOR_VERSION; + if(client->swapped) { +- swaps(&rep.sequenceNumber, n); +- swapl(&rep.length, n); +- swaps(&rep.majorVersion, n); +- swaps(&rep.minorVersion, n); ++ _swaps(&rep.sequenceNumber, n); ++ _swapl(&rep.length, n); ++ _swaps(&rep.majorVersion, n); ++ _swaps(&rep.minorVersion, n); + } + WriteToClient(client, sizeof(xSiSCtrlQueryVersionReply), (char *)&rep); + return (client->noClientException); +@@ -1926,15 +1924,15 @@ SiSProcSiSCtrlCommand(ClientPtr client) + rep.sequenceNumber = client->sequence; + + if(client->swapped) { +- swaps(&rep.sequenceNumber, n); +- swapl(&rep.length, n); +- swapl(&rep.screen, n); +- swapl(&rep.sdc_id, n); +- swapl(&rep.sdc_command, n); +- swapl(&rep.sdc_result_header, n); ++ _swaps(&rep.sequenceNumber, n); ++ _swapl(&rep.length, n); ++ _swapl(&rep.screen, n); ++ _swapl(&rep.sdc_id, n); ++ _swapl(&rep.sdc_command, n); ++ _swapl(&rep.sdc_result_header, n); + for(i = 0; i < SDC_NUM_PARM_RESULT; i++) { +- swapl(&rep.sdc_parm[i], n); +- swapl(&rep.sdc_result[i], n); ++ _swapl(&rep.sdc_parm[i], n); ++ _swapl(&rep.sdc_result[i], n); + } + } + WriteToClient(client, sizeof(xSiSCtrlCommandReply), (char *)&rep); +@@ -1961,7 +1959,7 @@ SiSSProcSiSCtrlQueryVersion(ClientPtr client) + { + REQUEST(xSiSCtrlQueryVersionReq); + register int n; +- swaps(&stuff->length, n); ++ _swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xSiSCtrlQueryVersionReq); + return SiSProcSiSCtrlQueryVersion(client); + } +@@ -1972,14 +1970,14 @@ SiSSProcSiSCtrlCommand(ClientPtr client) + REQUEST(xSiSCtrlCommandReq); + register int n; + int i; +- swaps(&stuff->length, n); +- swapl(&stuff->screen, n); +- swapl(&stuff->sdc_id, n); +- swapl(&stuff->sdc_command, n); +- swapl(&stuff->sdc_result_header, n); ++ _swaps(&stuff->length, n); ++ _swapl(&stuff->screen, n); ++ _swapl(&stuff->sdc_id, n); ++ _swapl(&stuff->sdc_command, n); ++ _swapl(&stuff->sdc_result_header, n); + for(i = 0; i < SDC_NUM_PARM_RESULT; i++) { +- swapl(&stuff->sdc_parm[i], n); +- swapl(&stuff->sdc_result[i], n); ++ _swapl(&stuff->sdc_parm[i], n); ++ _swapl(&stuff->sdc_result[i], n); + } + REQUEST_SIZE_MATCH(xSiSCtrlCommandReq); + return SiSProcSiSCtrlCommand(client); +@@ -2007,7 +2005,7 @@ SiSCtrlResetProc(ExtensionEntry* extEntry) + * in SiSCtrlExtUnregister()) + */ + if(extEntry->extPrivate) { +- xfree(extEntry->extPrivate); ++ free(extEntry->extPrivate); + extEntry->extPrivate = NULL; + } + } +@@ -2028,7 +2026,7 @@ SiSCtrlExtInit(ScrnInfoPtr pScrn) + + if(!(myext = CheckExtension(SISCTRL_PROTOCOL_NAME))) { + +- if(!(myctrl = xcalloc(sizeof(xSiSCtrlScreenTable), 1))) ++ if(!(myctrl = calloc(sizeof(xSiSCtrlScreenTable), 1))) + return; + + if(!(myext = AddExtension(SISCTRL_PROTOCOL_NAME, 0, 0, +@@ -2038,7 +2036,7 @@ SiSCtrlExtInit(ScrnInfoPtr pScrn) + StandardMinorOpcode))) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Failed to add SISCTRL extension\n"); +- xfree(myctrl); ++ free(myctrl); + return; + } + +diff --git a/src/sis_vga.c b/src/sis_vga.c +index 3f6219b..4c887b8 100644 +--- a/src/sis_vga.c ++++ b/src/sis_vga.c +@@ -1429,7 +1429,7 @@ SiSVGASaveFonts(ScrnInfoPtr pScrn) + attr10 = SiS_ReadAttr(pSiS, 0x10); + if(attr10 & 0x01) return; + +- if(!(pSiS->fonts = xalloc(SIS_FONTS_SIZE * 2))) { ++ if(!(pSiS->fonts = malloc(SIS_FONTS_SIZE * 2))) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Could not save console fonts, mem allocation failed\n"); + return; +@@ -1716,8 +1716,8 @@ SiSVGAMapMem(ScrnInfoPtr pScrn) + + #if XF86_VERSION_CURRENT >= XF86_VERSION_NUMERIC(4,3,0,0,0) + #if XSERVER_LIBPCIACCESS +- pSiS->VGAMemBase = xf86MapDomainMemory(pScrn->scrnIndex, VIDMEM_MMIO_32BIT, +- pSiS->PciInfo, pSiS->VGAMapPhys, pSiS->VGAMapSize); ++ (void) pci_device_map_legacy(pSiS->PciInfo, pSiS->VGAMapPhys, pSiS->VGAMapSize, ++ PCI_DEV_MAP_FLAG_WRITABLE, &pSiS->VGAMemBase); + #else + pSiS->VGAMemBase = xf86MapDomainMemory(pScrn->scrnIndex, VIDMEM_MMIO_32BIT, + pSiS->PciTag, pSiS->VGAMapPhys, pSiS->VGAMapSize); +@@ -1737,7 +1737,12 @@ SiSVGAUnmapMem(ScrnInfoPtr pScrn) + + if(pSiS->VGAMemBase == NULL) return; + ++#if XSERVER_LIBPCIACCESS ++ (void) pci_device_unmap_legacy(pSiS->PciInfo, pSiS->VGAMemBase, pSiS->VGAMapSize); ++#else + xf86UnMapVidMem(pScrn->scrnIndex, pSiS->VGAMemBase, pSiS->VGAMapSize); ++#endif ++ + pSiS->VGAMemBase = NULL; + } + #endif +diff --git a/src/sis_video.c b/src/sis_video.c +index 7322efb..2006858 100644 +--- a/src/sis_video.c ++++ b/src/sis_video.c +@@ -326,7 +326,7 @@ SISInitVideo(ScreenPtr pScreen) + if(newAdaptor) size++; + if(newBlitAdaptor) size++; + +- newAdaptors = xalloc(size * sizeof(XF86VideoAdaptorPtr*)); ++ newAdaptors = malloc(size * sizeof(XF86VideoAdaptorPtr*)); + if(newAdaptors) { + if(num_adaptors) { + memcpy(newAdaptors, adaptors, num_adaptors * sizeof(XF86VideoAdaptorPtr)); +@@ -356,7 +356,7 @@ SISInitVideo(ScreenPtr pScreen) + } + + if(newAdaptors) { +- xfree(newAdaptors); ++ free(newAdaptors); + } + } + +@@ -877,7 +877,7 @@ SISSetupImageVideo(ScreenPtr pScreen) + } + #endif + +- if(!(adapt = xcalloc(1, sizeof(XF86VideoAdaptorRec) + ++ if(!(adapt = calloc(1, sizeof(XF86VideoAdaptorRec) + + sizeof(SISPortPrivRec) + + sizeof(DevUnion)))) { + return NULL; +@@ -4067,7 +4067,7 @@ SISSetupBlitVideo(ScreenPtr pScreen) + } + #endif + +- if(!(adapt = xcalloc(1, sizeof(XF86VideoAdaptorRec) + ++ if(!(adapt = calloc(1, sizeof(XF86VideoAdaptorRec) + + (sizeof(DevUnion) * NUM_BLIT_PORTS) + + sizeof(SISBPortPrivRec)))) { + return NULL; +diff --git a/src/sispcirename.h b/src/sispcirename.h +index c4beac6..a354ac4 100644 +--- a/src/sispcirename.h ++++ b/src/sispcirename.h +@@ -29,11 +29,40 @@ + #ifndef SISPCIRENAME_H + #define SISPCIRENAME_H + ++#include ++ + enum region_type { + REGION_MEM, + REGION_IO + }; + ++#include "xf86Module.h" ++ ++#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 12 ++ ++#if (defined(__alpha__) || defined(__ia64__)) && defined (linux) ++#define PCI_DOM_MASK 0x01fful ++#else ++#define PCI_DOM_MASK 0x0ffu ++#endif ++ ++#ifndef PCI_DOM_MASK ++# define PCI_DOM_MASK 0x0ffu ++#endif ++#define PCI_DOMBUS_MASK (((PCI_DOM_MASK) << 8) | 0x0ffu) ++ ++static inline uint32_t ++pciTag(int busnum, int devnum, int funcnum) ++{ ++ uint32_t tag; ++ tag = (busnum & (PCI_DOMBUS_MASK)) << 16; ++ tag |= (devnum & 0x00001fu) << 11; ++ tag |= (funcnum & 0x000007u) << 8; ++ ++ return tag; ++} ++#endif /* GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 12 */ ++ + #ifndef XSERVER_LIBPCIACCESS + + /* pciVideoPtr */ +diff --git a/src/vgatypes.h b/src/vgatypes.h +index 4be31e4..d6e7b6e 100644 +--- a/src/vgatypes.h ++++ b/src/vgatypes.h +@@ -69,8 +69,9 @@ typedef unsigned int BOOLEAN; + + #define SISIOMEMTYPE + +-#ifdef SIS_LINUX_KERNEL + typedef unsigned long SISIOADDRESS; ++ ++#ifdef SIS_LINUX_KERNEL + #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,8) + #include /* Need __iomem */ + #undef SISIOMEMTYPE +@@ -78,15 +79,6 @@ typedef unsigned long SISIOADDRESS; + #endif + #endif + +-#ifdef SIS_XORG_XF86 +-#if XF86_VERSION_CURRENT < XF86_VERSION_NUMERIC(4,2,0,0,0) +-typedef unsigned long IOADDRESS; +-typedef unsigned long SISIOADDRESS; +-#else +-typedef IOADDRESS SISIOADDRESS; +-#endif +-#endif +- + typedef enum _SIS_CHIP_TYPE { + SIS_VGALegacy = 0, + SIS_530, -- cgit v1.2.3-54-g00ecf