From 0848c4640d60f06147a9ae273cdfd2e45584e9b5 Mon Sep 17 00:00:00 2001 From: Timothy Redaelli Date: Fri, 13 Jan 2012 08:00:32 +0000 Subject: [PATCH] updated on Fri Jan 13 08:00:32 UTC 2012 --- bumblebee-git/PKGBUILD | 6 +- bumblebee-git/bumblebee.install | 43 - divvyup/PKGBUILD | 19 + django-pipeline/PKGBUILD | 28 + emacs-xwidget-bzr/PKGBUILD | 2 +- flexibee/PKGBUILD | 4 +- gtk-youtube-viewer/PKGBUILD | 2 +- jswat/PKGBUILD | 30 + jswat/jswat | 5 + libindicator/PKGBUILD | 89 +- linux-vserver/PKGBUILD | 27 +- linux-vserver/config.x86_64 | 15 +- linux-vserver/dib0700-fix.patch | 1486 -------------------- .../iwlagn-fix-NULL-pointer-dereference.patch | 38 - linux-vserver/linux-vserver.install | 2 +- lv2-mdaepiano-git/PKGBUILD | 7 +- nux/PKGBUILD | 8 +- nvidia-bumblebee/PKGBUILD | 46 + nvidia-bumblebee/nvidia.install | 15 + nvidia-utils-bumblebee/PKGBUILD | 134 +- nvidia-utils-bumblebee/nvidia.install | 6 - rss-guard-git/PKGBUILD | 2 +- util-linux-git/PKGBUILD | 32 +- 23 files changed, 344 insertions(+), 1702 deletions(-) create mode 100644 divvyup/PKGBUILD create mode 100644 django-pipeline/PKGBUILD create mode 100644 jswat/PKGBUILD create mode 100755 jswat/jswat rewrite libindicator/PKGBUILD (81%) delete mode 100644 linux-vserver/dib0700-fix.patch delete mode 100644 linux-vserver/iwlagn-fix-NULL-pointer-dereference.patch create mode 100644 nvidia-bumblebee/PKGBUILD create mode 100644 nvidia-bumblebee/nvidia.install rewrite nvidia-utils-bumblebee/PKGBUILD (81%) delete mode 100644 nvidia-utils-bumblebee/nvidia.install diff --git a/bumblebee-git/PKGBUILD b/bumblebee-git/PKGBUILD index ee207ff6a..70bb9119b 100644 --- a/bumblebee-git/PKGBUILD +++ b/bumblebee-git/PKGBUILD @@ -3,13 +3,13 @@ # Maintainer: Samsagax pkgname=bumblebee-git -pkgver=20120111 -pkgrel=2 +pkgver=20120113 +pkgrel=1 pkgdesc="Develop branch of Bumblebee. Optimus Support for Linux Through VirtualGL. This is a driver-agnostic package, you need to install proper drivers separately. Can be used with Nouveau or Nvidia" arch=('i686' 'x86_64') makedepends=('git') depends=('virtualgl' 'libbsd' 'glib2') -optdepends=('xf86-video-nouveau: Nouveau driver' 'nouveau-dri: 3D acceleration features fo Nouveau' 'mesa: 3D acceleration features fo Nouveau' 'bbswitch: switch on/off discrete card' 'nvidia-utils-bumblebee: Nvidia driver') +optdepends=('xf86-video-nouveau: Nouveau driver' 'nouveau-dri: 3D acceleration features fo Nouveau' 'mesa: 3D acceleration features fo Nouveau' 'bbswitch: switch on/off discrete card' 'nvidia-bumblebee: Nvidia driver') if [ "$CARCH" = "x86_64" ]; then optdepends[${#optdepends[@]}]='lib32-virtualgl: run 32bit applications with optirun' fi diff --git a/bumblebee-git/bumblebee.install b/bumblebee-git/bumblebee.install index 4be36781e..e626e7ba0 100644 --- a/bumblebee-git/bumblebee.install +++ b/bumblebee-git/bumblebee.install @@ -1,32 +1,3 @@ -_replace_busid() { - NVIDIABUSID=$(lspci -d 10de: -n | grep '030[02]:' | cut -d' ' -f1 | tr . :) - - case $(wc -l <<<"$NVIDIABUSID") in - 0) - echo "The BusID of the nVidia card can't be determined." - echo "You must set that manually in $1" - ;; - 1) - NVIDIABUSID="PCI:$NVIDIABUSID" - #echo "Detected Bus ID: $NVIDIABUSID" - ;; - *) - # You'll never know. - echo "Multiple graphics cards are not supported by Bumblebee yet. The" - echo "following PCI Bus IDs have been detected:" - echo "$NVIDIABUSID" - echo "If this information is wrong, please report it to:" - echo "https://github.com/Bumblebee-Project/Bumblebee/issues" - # empty the ID so we can detect this as error - NVIDIABUSID= - ;; - esac - - re_busid='^( *BusID +")[^"]*' - - sed -E -i "$1" -e "s,${re_busid},\1${NVIDIABUSID}," -} - _backup() { cp "$1" "$1.pacsave" #echo "File $1 backed up as $1.pacsave" @@ -61,11 +32,9 @@ pre_upgrade() { post_upgrade() { if [ -f /etc/bumblebee/xorg.conf.nvidia ]; then - _replace_busid /etc/bumblebee/xorg.conf.nvidia _restore /etc/bumblebee/xorg.conf.nvidia fi if [ -f /etc/bumblebee/xorg.conf.nouveau ]; then - _replace_busid /etc/bumblebee/xorg.conf.nouveau _restore /etc/bumblebee/xorg.conf.nouveau fi groupadd bumblebee && echo "Bumblebee group created" @@ -91,17 +60,5 @@ post_remove() { } post_install() { - if [ -f /etc/bumblebee/xorg.conf.nvidia ]; then - _replace_busid /etc/bumblebee/xorg.conf.nvidia - fi - if [ -f /etc/bumblebee/xorg.conf.nouveau ]; then - _replace_busid /etc/bumblebee/xorg.conf.nouveau - fi groupadd bumblebee && echo "Bumblebee group created" - echo - echo "Installation complete..." - echo "Visit ArchWiki page on Bumblebee for documentation on how to finish setup," - echo "configure and run applications with Bumblebee:" - echo "http://wiki.archlinux.org/index.php/Bumblebee" - echo } diff --git a/divvyup/PKGBUILD b/divvyup/PKGBUILD new file mode 100644 index 000000000..76df87a3a --- /dev/null +++ b/divvyup/PKGBUILD @@ -0,0 +1,19 @@ +# Maintainer: David Couzelis + +pkgname=divvyup +pkgver=0.5 +pkgrel=1 +pkgdesc="A simple application that uses the envelope system to help you budget your money." +arch=('i686' 'x86_64') +url="http://sourceforge.net/projects/enbudget/" +license=('GPL') +depends=('wxpython') +source=(http://downloads.sourceforge.net/enbudget/${pkgname}-${pkgver}.tar.gz) +md5sums=('36fd5a2004bee5012ca90be7a4637d9b') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + python2 setup.py install --root=${pkgdir} + install -Dm644 ${pkgname}/icons/${pkgname}48x48.png ${pkgdir}/usr/share/icons/hicolor/48x48/apps/${pkgname}.png + install -Dm644 ${pkgname}.desktop ${pkgdir}/usr/share/applications/${pkgname}.desktop +} diff --git a/django-pipeline/PKGBUILD b/django-pipeline/PKGBUILD new file mode 100644 index 000000000..a70e35c80 --- /dev/null +++ b/django-pipeline/PKGBUILD @@ -0,0 +1,28 @@ +# Maintainer: Steven Allen + +pkgname='django-pipeline' +pkgver=1.1.26 +pkgrel=1 +pkgdesc="An asset packaging library for Django, providing both CSS and JavaScript concatenation and compression, built-in JavaScript template support, and optional data-URI image embedding." +arch=('any') +url="https://github.com/cyberdelia/django-pipeline" +license=('custom') +depends=('python2' 'django') +optdepends=('yuicompressor: for css and js compression') +source=("http://pypi.python.org/packages/source/d/${pkgname}/${pkgname}-${pkgver}.tar.gz") +md5sums=('6853f59f6aa09400bd7c4f03284c418d') + +check() { + cd "$srcdir/$pkgname-$pkgver" + python2 setup.py test +} +build() { + sed -i 's|#!/usr/bin/python|#!/usr/bin/env python2|' \ + "$srcdir/$pkgname-$pkgver/pipeline/compressors/jsmin/jsmin.py" +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + python2 setup.py install --root="$pkgdir/" --optimize=1 + install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} diff --git a/emacs-xwidget-bzr/PKGBUILD b/emacs-xwidget-bzr/PKGBUILD index 56efcbb77..bc6459c58 100644 --- a/emacs-xwidget-bzr/PKGBUILD +++ b/emacs-xwidget-bzr/PKGBUILD @@ -2,7 +2,7 @@ # based on a PKGBUILD of Mathias Nedrebø nedrebo.org> pkgname=emacs-xwidget-bzr -pkgver=100840 +pkgver=100851 pkgrel=1 arch=('i686' 'x86_64') pkgdesc="Emacs, bazaar-version from the xwidget branch" diff --git a/flexibee/PKGBUILD b/flexibee/PKGBUILD index b661142f9..5d710f5ff 100644 --- a/flexibee/PKGBUILD +++ b/flexibee/PKGBUILD @@ -2,7 +2,7 @@ pkgname=flexibee -pkgver=10.16.0.3 +pkgver=10.16.0.4 pkgbasever=10.16 #pkgbasever=`echo $pkgver |cut -f1,2 -d.` @@ -15,7 +15,7 @@ depends=('glibc') install=flexibee.install source=("http://download.flexibee.eu/download/$pkgbasever/flexibee-$pkgver.tar.gz" "flexibee") -md5sums=('f5a7653422d6575da920f8f9fa18d78a' +md5sums=('f143a92a04c9228881671887b71922cf' 'cac2f86b82117d63de48e48ca1dabed2') build() { diff --git a/gtk-youtube-viewer/PKGBUILD b/gtk-youtube-viewer/PKGBUILD index 7d2b4eb8f..0f234f9fd 100644 --- a/gtk-youtube-viewer/PKGBUILD +++ b/gtk-youtube-viewer/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Trizen pkgname=gtk-youtube-viewer -pkgver=20120110 +pkgver=20120113 pkgrel=1 pkgdesc="Gtk2 interface for YouTube-Viewer ( http://aur.archlinux.org/packages.php?ID=37779 )" diff --git a/jswat/PKGBUILD b/jswat/PKGBUILD new file mode 100644 index 000000000..18ce49abc --- /dev/null +++ b/jswat/PKGBUILD @@ -0,0 +1,30 @@ +# Maintainer: Marco Yuen +pkgname=jswat +pkgver=4.5 +pkgrel=1 +pkgdesc="A graphical Java debugger front-end" +arch=('i686' 'x86_64') +url="http://code.google.com/p/jswat/" +license=('CDDL') +depends=('java-environment' 'bash') +makedepend=('unzip' 'sed') +options=(!strip) + +source=(http://jswat.googlecode.com/files/jswat-4.5-installer.jar \ + jswat) +md5sums=('5fed3cb9f088b7fbc709e9922396ca59' + '866e2d5368f4df629437ed66ac4f2013') + +build() { + mkdir -p $pkgdir/opt/jswat + unzip $srcdir/jswat.zip -d $pkgdir/opt/jswat + sed -i 's|C:\\java\\jdk1.6.0|'${JAVA_HOME}'|' $pkgdir/opt/jswat/etc/jswat.conf + sed -i 's|${HOME}\\.jswat|${HOME}/.jswat|' $pkgdir/opt/jswat/etc/jswat.conf + chmod 755 $pkgdir/opt/jswat/bin/jswat + chmod 755 $pkgdir/opt/jswat/bin/jpdalaunch + + rm -f $pkgdir/opt/jswat/bin/*.exe + + mkdir -p $pkgdir/usr/bin/ + install -m 755 $srcdir/jswat $pkgdir/usr/bin +} diff --git a/jswat/jswat b/jswat/jswat new file mode 100755 index 000000000..3f1c16efc --- /dev/null +++ b/jswat/jswat @@ -0,0 +1,5 @@ +#!/bin/bash + +cd /opt/jswat/ +./bin/jswat + diff --git a/libindicator/PKGBUILD b/libindicator/PKGBUILD dissimilarity index 81% index c28723dfe..f9e56ae7e 100644 --- a/libindicator/PKGBUILD +++ b/libindicator/PKGBUILD @@ -1,26 +1,63 @@ -# Maintainer: mathieui -# Contributor: mathieui - -pkgname=libindicator -pkgver=0.4.1 -_pkgbranch=0.4 -pkgrel=1 -pkgdesc="A set of symbols and convience functions that all indicators would like to use. (Canonical Ayatana Project)" -arch=('i686' 'x86_64') -url="http://launchpad.net/libindicator/" -license=('GPL') -makedepends=('make' 'autoconf') -depends=('gnome-common') -source=(http://launchpad.net/${pkgname}/${_pkgbranch}/${pkgver}/+download/${pkgname}-${pkgver}.tar.gz) -sha512sums=('ed4aff3c045fbb43ea3534a9b147577bb4922d31623a08a7b26430accf7d80ba8b2a7eebf52e32776e33e2f0ee00c137b6a1f7d61d01fb8103c5fdee1ff7cf86') - -build() { - cd "${srcdir}"/${pkgname}-${pkgver} - ./configure --prefix=/usr --disable-static - make -} - -package() { - cd "${srcdir}"/${pkgname}-${pkgver} - make DESTDIR="${pkgdir}" install -} +# Maintainer: György Balló +pkgbase=libindicator +pkgname=libindicator +true && pkgname=(libindicator libindicator3) +pkgver=0.4.1 +pkgrel=2 +pkgdesc="A set of symbols and convience functions that all indicators would like to use" +arch=('i686' 'x86_64') +url="https://launchpad.net/libindicator" +license=('GPL') +makedepends=('gtk2>=2.18' 'gtk3>=2.91') +options=(!libtool) +source=(http://launchpad.net/$pkgbase/0.4/$pkgver/+download/$pkgbase-$pkgver.tar.gz) +md5sums=('c8f2900fa8e028bb2ea7511a0f368756') + +build() { + cd "$srcdir/$pkgbase-$pkgver" + + # Use different location for header files for GTK+3 + sed -i 's/libindicator-/libindicator3-/' libindicator/indicator3-0.4.pc.in.in + sed -i 's/libindicator-/libindicator$(VER)-/' libindicator/Makefile.in + + # Disable building tests + sed -i '/tests/ d' Makefile.in + + [[ -d build-gtk2 ]] || mkdir build-gtk2 + pushd build-gtk2 + ../configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib/$pkgbase \ + --disable-static --with-gtk=2 + make + popd + + [[ -d build-gtk3 ]] || mkdir build-gtk3 + pushd build-gtk3 + ../configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib/$pkgbase \ + --disable-static + make + popd +} + +package_libindicator() { + pkgdesc+=" (GTK+ 2 library)" + depends=('gtk2>=2.18') + + cd "$srcdir/$pkgbase-$pkgver/build-gtk2" + + make DESTDIR="$pkgdir/" install +} + +package_libindicator3(){ + pkgdesc+=" (GTK+ 3 library)" + depends=('gtk3>=2.91') + + cd "$srcdir/$pkgbase-$pkgver/build-gtk3" + + make -C libindicator DESTDIR="$pkgdir/" install + make -C tools DESTDIR="$pkgdir/" install + + rm -r "$pkgdir/usr/share" +} + +depends=('gtk2>=2.18' 'gtk3>=2.91') +true && depends=() diff --git a/linux-vserver/PKGBUILD b/linux-vserver/PKGBUILD index c92b8985b..71e26e762 100644 --- a/linux-vserver/PKGBUILD +++ b/linux-vserver/PKGBUILD @@ -5,10 +5,10 @@ pkgname=linux-vserver true && pkgname=('linux-vserver' 'linux-vserver-headers' 'linux-vserver-docs') # Build stock -ARCH kernel # pkgname=linux-custom # Build kernel with a different name _kernelname=${pkgname#linux} -_basekernel=3.1 +_basekernel=3.1.6 pkgver=${_basekernel} pkgrel=1 -_vserver=2.3.1-rc2 +_vserver=2.3.2.5 arch=('i686' 'x86_64') url="http://linux-vserver.org/" license=('GPL2') @@ -24,21 +24,17 @@ source=("http://www.kernel.org/pub/linux/kernel/v3.x/linux-${_basekernel}.tar.xz 'change-default-console-loglevel.patch' 'i915-fix-ghost-tv-output.patch' 'i915-fix-incorrect-error-message.patch' - 'iwlagn-fix-NULL-pointer-dereference.patch' - 'dib0700-fix.patch' 'usb-add-reset-resume-quirk-for-several-webcams.patch' "http://vserver.13thfloor.at/Experimental/patch-${pkgver}-vs${_vserver}.diff") -md5sums=('edbdc798f23ae0f8045c82f6fa22c536' +md5sums=('10a6ce4662e98f8aac04cb1f846e3d09' 'f3a207281babca611a3c307d8f55e12a' - 'e06fec86a2a7bd6a0dcfc1cf08a74780' + 'aa471b5466aa4c2fc66439d4064214c6' '6fbcc5826014c06677c8434763b3cc6f' '9d3c56a4b999c8bfbd4018089a62f662' '342071f852564e1ad03b79271a90b1a5' '4d1d920c7e9c084be05fe060c4d38bc1' - '644925dcc9e80e47c23f81aa22f75e12' - 'abcd7b4b5676deed0114684e555f7c0f' 'd00814b57448895e65fbbc800e8a58ba' - '1672c7189a051726f1ac1e51adb9faef') + '39c930a37896020154d67214581eb4d7') build() { cd "${srcdir}/linux-${_basekernel}" @@ -63,17 +59,6 @@ build() { # this. patch -Np1 -i "${srcdir}/i915-fix-incorrect-error-message.patch" - # iwlagn has a critical bug that hangs the system on 3.1.0. A patch - # was posted, but didn't make it into the tree in time. - # http://marc.info/?l=linux-wireless&m=131840748927629&w=2 - # FS#26674 - patch -Np1 -i "${srcdir}/iwlagn-fix-NULL-pointer-dereference.patch" - - # Fix dib0700 driver - # http://git.linuxtv.org/pb/media_tree.git/shortlog/refs/heads/for_v3.0 - # FS#25939 - patch -Np1 -i "${srcdir}/dib0700-fix.patch" - # Add the USB_QUIRK_RESET_RESUME for several webcams # FS#26528 patch -Np1 -i "${srcdir}/usb-add-reset-resume-quirk-for-several-webcams.patch" @@ -130,7 +115,7 @@ build() { } package_linux-vserver() { - pkgdesc="The Linux Kernel and modules" + pkgdesc="The Linux Kernel and modules. With vServer patch." groups=('base') depends=('coreutils' 'linux-firmware' 'module-init-tools>=3.16' 'mkinitcpio>=0.7') optdepends=('crda: to set the correct wireless channels of your country') diff --git a/linux-vserver/config.x86_64 b/linux-vserver/config.x86_64 index 56174b906..717061af3 100644 --- a/linux-vserver/config.x86_64 +++ b/linux-vserver/config.x86_64 @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/x86_64 3.1.0 Kernel Configuration +# Linux/x86_64 3.1-vs2.3.2.1 Kernel Configuration # CONFIG_64BIT=y # CONFIG_X86_32 is not set @@ -63,7 +63,7 @@ CONFIG_IRQ_WORK=y CONFIG_EXPERIMENTAL=y CONFIG_INIT_ENV_ARG_LIMIT=32 CONFIG_CROSS_COMPILE="" -CONFIG_LOCALVERSION="-ARCH" +CONFIG_LOCALVERSION="-vserver" CONFIG_LOCALVERSION_AUTO=y CONFIG_HAVE_KERNEL_GZIP=y CONFIG_HAVE_KERNEL_BZIP2=y @@ -139,7 +139,6 @@ CONFIG_BLK_CGROUP=y CONFIG_NAMESPACES=y CONFIG_UTS_NS=y CONFIG_IPC_NS=y -CONFIG_USER_NS=y CONFIG_PID_NS=y CONFIG_NET_NS=y CONFIG_SCHED_AUTOGROUP=y @@ -677,7 +676,7 @@ CONFIG_DEFAULT_CUBIC=y # CONFIG_DEFAULT_RENO is not set CONFIG_DEFAULT_TCP_CONG="cubic" # CONFIG_TCP_MD5SIG is not set -CONFIG_IPV6=m +CONFIG_IPV6=y CONFIG_IPV6_PRIVACY=y CONFIG_IPV6_ROUTER_PREF=y CONFIG_IPV6_ROUTE_INFO=y @@ -1398,6 +1397,7 @@ CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 CONFIG_BLK_DEV_CRYPTOLOOP=m CONFIG_BLK_DEV_DRBD=m # CONFIG_DRBD_FAULT_INJECTION is not set +CONFIG_BLK_DEV_VROOT=y CONFIG_BLK_DEV_NBD=m CONFIG_BLK_DEV_OSD=m CONFIG_BLK_DEV_SX8=m @@ -4071,7 +4071,7 @@ CONFIG_USB_HIDDEV=y # CONFIG_HID_A4TECH=m CONFIG_HID_ACRUX=m -CONFIG_HID_ACRUX_FF=m +CONFIG_HID_ACRUX_FF=y CONFIG_HID_APPLE=m CONFIG_HID_BELKIN=m CONFIG_HID_CHERRY=m @@ -4203,6 +4203,7 @@ CONFIG_USB_TMC=m CONFIG_USB_STORAGE=m # CONFIG_USB_STORAGE_DEBUG is not set CONFIG_USB_STORAGE_REALTEK=m +CONFIG_REALTEK_AUTOPM=y CONFIG_USB_STORAGE_DATAFAB=m CONFIG_USB_STORAGE_FREECOM=m CONFIG_USB_STORAGE_ISD200=m @@ -5381,9 +5382,6 @@ CONFIG_VSERVER_COWBL=y CONFIG_VSERVER_VTIME=y CONFIG_VSERVER_DEVICE=y CONFIG_VSERVER_PROC_SECURE=y -CONFIG_VSERVER_HARDCPU=y -CONFIG_VSERVER_IDLETIME=y -# CONFIG_VSERVER_IDLELIMIT is not set # CONFIG_TAGGING_NONE is not set # CONFIG_TAGGING_UID16 is not set # CONFIG_TAGGING_GID16 is not set @@ -5401,6 +5399,7 @@ CONFIG_QUOTES_UTF8=y # CONFIG_QUOTES_ASCII is not set CONFIG_VSERVER=y CONFIG_VSERVER_SECURITY=y +# CONFIG_VSERVER_DISABLED is not set # # Security options diff --git a/linux-vserver/dib0700-fix.patch b/linux-vserver/dib0700-fix.patch deleted file mode 100644 index cd7bc9cb3..000000000 --- a/linux-vserver/dib0700-fix.patch +++ /dev/null @@ -1,1486 +0,0 @@ -commit 198c545cd7306dc90aaae1d61e64175e70a70dc8 -Author: Patrick Boettcher -Date: Wed Aug 3 17:08:21 2011 +0200 - - [media] DiBcom: protect the I2C bufer access - - This patch protect the I2C buffer access in order to manage concurrent - access. This protection is done using mutex. - Furthermore, for the dib9000, if a pid filtering command is - received during the tuning, this pid filtering command is delayed to - avoid any concurrent access issue. - - Cc: Mauro Carvalho Chehab - Cc: Florian Mickler - Cc: stable@kernel.org - - Signed-off-by: Olivier Grenie - Signed-off-by: Patrick Boettcher - -diff --git a/drivers/media/dvb/frontends/dib0070.c b/drivers/media/dvb/frontends/dib0070.c -index 1d47d4d..dc1cb17 100644 ---- a/drivers/media/dvb/frontends/dib0070.c -+++ b/drivers/media/dvb/frontends/dib0070.c -@@ -27,6 +27,7 @@ - #include - #include - #include -+#include - - #include "dvb_frontend.h" - -@@ -78,10 +79,18 @@ struct dib0070_state { - struct i2c_msg msg[2]; - u8 i2c_write_buffer[3]; - u8 i2c_read_buffer[2]; -+ struct mutex i2c_buffer_lock; - }; - --static uint16_t dib0070_read_reg(struct dib0070_state *state, u8 reg) -+static u16 dib0070_read_reg(struct dib0070_state *state, u8 reg) - { -+ u16 ret; -+ -+ if (mutex_lock_interruptible(&state->i2c_buffer_lock) < 0) { -+ dprintk("could not acquire lock"); -+ return 0; -+ } -+ - state->i2c_write_buffer[0] = reg; - - memset(state->msg, 0, 2 * sizeof(struct i2c_msg)); -@@ -96,13 +105,23 @@ static uint16_t dib0070_read_reg(struct dib0070_state *state, u8 reg) - - if (i2c_transfer(state->i2c, state->msg, 2) != 2) { - printk(KERN_WARNING "DiB0070 I2C read failed\n"); -- return 0; -- } -- return (state->i2c_read_buffer[0] << 8) | state->i2c_read_buffer[1]; -+ ret = 0; -+ } else -+ ret = (state->i2c_read_buffer[0] << 8) -+ | state->i2c_read_buffer[1]; -+ -+ mutex_unlock(&state->i2c_buffer_lock); -+ return ret; - } - - static int dib0070_write_reg(struct dib0070_state *state, u8 reg, u16 val) - { -+ int ret; -+ -+ if (mutex_lock_interruptible(&state->i2c_buffer_lock) < 0) { -+ dprintk("could not acquire lock"); -+ return -EINVAL; -+ } - state->i2c_write_buffer[0] = reg; - state->i2c_write_buffer[1] = val >> 8; - state->i2c_write_buffer[2] = val & 0xff; -@@ -115,9 +134,12 @@ static int dib0070_write_reg(struct dib0070_state *state, u8 reg, u16 val) - - if (i2c_transfer(state->i2c, state->msg, 1) != 1) { - printk(KERN_WARNING "DiB0070 I2C write failed\n"); -- return -EREMOTEIO; -- } -- return 0; -+ ret = -EREMOTEIO; -+ } else -+ ret = 0; -+ -+ mutex_unlock(&state->i2c_buffer_lock); -+ return ret; - } - - #define HARD_RESET(state) do { \ -@@ -734,6 +756,7 @@ struct dvb_frontend *dib0070_attach(struct dvb_frontend *fe, struct i2c_adapter - state->cfg = cfg; - state->i2c = i2c; - state->fe = fe; -+ mutex_init(&state->i2c_buffer_lock); - fe->tuner_priv = state; - - if (dib0070_reset(fe) != 0) -diff --git a/drivers/media/dvb/frontends/dib0090.c b/drivers/media/dvb/frontends/dib0090.c -index c9c935a..b174d1c 100644 ---- a/drivers/media/dvb/frontends/dib0090.c -+++ b/drivers/media/dvb/frontends/dib0090.c -@@ -27,6 +27,7 @@ - #include - #include - #include -+#include - - #include "dvb_frontend.h" - -@@ -196,6 +197,7 @@ struct dib0090_state { - struct i2c_msg msg[2]; - u8 i2c_write_buffer[3]; - u8 i2c_read_buffer[2]; -+ struct mutex i2c_buffer_lock; - }; - - struct dib0090_fw_state { -@@ -208,10 +210,18 @@ struct dib0090_fw_state { - struct i2c_msg msg; - u8 i2c_write_buffer[2]; - u8 i2c_read_buffer[2]; -+ struct mutex i2c_buffer_lock; - }; - - static u16 dib0090_read_reg(struct dib0090_state *state, u8 reg) - { -+ u16 ret; -+ -+ if (mutex_lock_interruptible(&state->i2c_buffer_lock) < 0) { -+ dprintk("could not acquire lock"); -+ return 0; -+ } -+ - state->i2c_write_buffer[0] = reg; - - memset(state->msg, 0, 2 * sizeof(struct i2c_msg)); -@@ -226,14 +236,24 @@ static u16 dib0090_read_reg(struct dib0090_state *state, u8 reg) - - if (i2c_transfer(state->i2c, state->msg, 2) != 2) { - printk(KERN_WARNING "DiB0090 I2C read failed\n"); -- return 0; -- } -+ ret = 0; -+ } else -+ ret = (state->i2c_read_buffer[0] << 8) -+ | state->i2c_read_buffer[1]; - -- return (state->i2c_read_buffer[0] << 8) | state->i2c_read_buffer[1]; -+ mutex_unlock(&state->i2c_buffer_lock); -+ return ret; - } - - static int dib0090_write_reg(struct dib0090_state *state, u32 reg, u16 val) - { -+ int ret; -+ -+ if (mutex_lock_interruptible(&state->i2c_buffer_lock) < 0) { -+ dprintk("could not acquire lock"); -+ return -EINVAL; -+ } -+ - state->i2c_write_buffer[0] = reg & 0xff; - state->i2c_write_buffer[1] = val >> 8; - state->i2c_write_buffer[2] = val & 0xff; -@@ -246,13 +266,23 @@ static int dib0090_write_reg(struct dib0090_state *state, u32 reg, u16 val) - - if (i2c_transfer(state->i2c, state->msg, 1) != 1) { - printk(KERN_WARNING "DiB0090 I2C write failed\n"); -- return -EREMOTEIO; -- } -- return 0; -+ ret = -EREMOTEIO; -+ } else -+ ret = 0; -+ -+ mutex_unlock(&state->i2c_buffer_lock); -+ return ret; - } - - static u16 dib0090_fw_read_reg(struct dib0090_fw_state *state, u8 reg) - { -+ u16 ret; -+ -+ if (mutex_lock_interruptible(&state->i2c_buffer_lock) < 0) { -+ dprintk("could not acquire lock"); -+ return 0; -+ } -+ - state->i2c_write_buffer[0] = reg; - - memset(&state->msg, 0, sizeof(struct i2c_msg)); -@@ -262,13 +292,24 @@ static u16 dib0090_fw_read_reg(struct dib0090_fw_state *state, u8 reg) - state->msg.len = 2; - if (i2c_transfer(state->i2c, &state->msg, 1) != 1) { - printk(KERN_WARNING "DiB0090 I2C read failed\n"); -- return 0; -- } -- return (state->i2c_read_buffer[0] << 8) | state->i2c_read_buffer[1]; -+ ret = 0; -+ } else -+ ret = (state->i2c_read_buffer[0] << 8) -+ | state->i2c_read_buffer[1]; -+ -+ mutex_unlock(&state->i2c_buffer_lock); -+ return ret; - } - - static int dib0090_fw_write_reg(struct dib0090_fw_state *state, u8 reg, u16 val) - { -+ int ret; -+ -+ if (mutex_lock_interruptible(&state->i2c_buffer_lock) < 0) { -+ dprintk("could not acquire lock"); -+ return -EINVAL; -+ } -+ - state->i2c_write_buffer[0] = val >> 8; - state->i2c_write_buffer[1] = val & 0xff; - -@@ -279,9 +320,12 @@ static int dib0090_fw_write_reg(struct dib0090_fw_state *state, u8 reg, u16 val) - state->msg.len = 2; - if (i2c_transfer(state->i2c, &state->msg, 1) != 1) { - printk(KERN_WARNING "DiB0090 I2C write failed\n"); -- return -EREMOTEIO; -- } -- return 0; -+ ret = -EREMOTEIO; -+ } else -+ ret = 0; -+ -+ mutex_unlock(&state->i2c_buffer_lock); -+ return ret; - } - - #define HARD_RESET(state) do { if (cfg->reset) { if (cfg->sleep) cfg->sleep(fe, 0); msleep(10); cfg->reset(fe, 1); msleep(10); cfg->reset(fe, 0); msleep(10); } } while (0) -@@ -2440,6 +2484,7 @@ struct dvb_frontend *dib0090_register(struct dvb_frontend *fe, struct i2c_adapte - st->config = config; - st->i2c = i2c; - st->fe = fe; -+ mutex_init(&st->i2c_buffer_lock); - fe->tuner_priv = st; - - if (config->wbd == NULL) -@@ -2471,6 +2516,7 @@ struct dvb_frontend *dib0090_fw_register(struct dvb_frontend *fe, struct i2c_ada - st->config = config; - st->i2c = i2c; - st->fe = fe; -+ mutex_init(&st->i2c_buffer_lock); - fe->tuner_priv = st; - - if (dib0090_fw_reset_digital(fe, st->config) != 0) -diff --git a/drivers/media/dvb/frontends/dib7000m.c b/drivers/media/dvb/frontends/dib7000m.c -index 79cb1c2..dbb76d7 100644 ---- a/drivers/media/dvb/frontends/dib7000m.c -+++ b/drivers/media/dvb/frontends/dib7000m.c -@@ -11,6 +11,7 @@ - #include - #include - #include -+#include - - #include "dvb_frontend.h" - -@@ -55,6 +56,7 @@ struct dib7000m_state { - struct i2c_msg msg[2]; - u8 i2c_write_buffer[4]; - u8 i2c_read_buffer[2]; -+ struct mutex i2c_buffer_lock; - }; - - enum dib7000m_power_mode { -@@ -69,6 +71,13 @@ enum dib7000m_power_mode { - - static u16 dib7000m_read_word(struct dib7000m_state *state, u16 reg) - { -+ u16 ret; -+ -+ if (mutex_lock_interruptible(&state->i2c_buffer_lock) < 0) { -+ dprintk("could not acquire lock"); -+ return 0; -+ } -+ - state->i2c_write_buffer[0] = (reg >> 8) | 0x80; - state->i2c_write_buffer[1] = reg & 0xff; - -@@ -85,11 +94,21 @@ static u16 dib7000m_read_word(struct dib7000m_state *state, u16 reg) - if (i2c_transfer(state->i2c_adap, state->msg, 2) != 2) - dprintk("i2c read error on %d",reg); - -- return (state->i2c_read_buffer[0] << 8) | state->i2c_read_buffer[1]; -+ ret = (state->i2c_read_buffer[0] << 8) | state->i2c_read_buffer[1]; -+ mutex_unlock(&state->i2c_buffer_lock); -+ -+ return ret; - } - - static int dib7000m_write_word(struct dib7000m_state *state, u16 reg, u16 val) - { -+ int ret; -+ -+ if (mutex_lock_interruptible(&state->i2c_buffer_lock) < 0) { -+ dprintk("could not acquire lock"); -+ return -EINVAL; -+ } -+ - state->i2c_write_buffer[0] = (reg >> 8) & 0xff; - state->i2c_write_buffer[1] = reg & 0xff; - state->i2c_write_buffer[2] = (val >> 8) & 0xff; -@@ -101,7 +120,10 @@ static int dib7000m_write_word(struct dib7000m_state *state, u16 reg, u16 val) - state->msg[0].buf = state->i2c_write_buffer; - state->msg[0].len = 4; - -- return i2c_transfer(state->i2c_adap, state->msg, 1) != 1 ? -EREMOTEIO : 0; -+ ret = (i2c_transfer(state->i2c_adap, state->msg, 1) != 1 ? -+ -EREMOTEIO : 0); -+ mutex_unlock(&state->i2c_buffer_lock); -+ return ret; - } - static void dib7000m_write_tab(struct dib7000m_state *state, u16 *buf) - { -@@ -1385,6 +1407,7 @@ struct dvb_frontend * dib7000m_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr, - demod = &st->demod; - demod->demodulator_priv = st; - memcpy(&st->demod.ops, &dib7000m_ops, sizeof(struct dvb_frontend_ops)); -+ mutex_init(&st->i2c_buffer_lock); - - st->timf_default = cfg->bw->timf; - -diff --git a/drivers/media/dvb/frontends/dib7000p.c b/drivers/media/dvb/frontends/dib7000p.c -index 0c9f40c..292bc19 100644 ---- a/drivers/media/dvb/frontends/dib7000p.c -+++ b/drivers/media/dvb/frontends/dib7000p.c -@@ -10,6 +10,7 @@ - #include - #include - #include -+#include - - #include "dvb_math.h" - #include "dvb_frontend.h" -@@ -68,6 +69,7 @@ struct dib7000p_state { - struct i2c_msg msg[2]; - u8 i2c_write_buffer[4]; - u8 i2c_read_buffer[2]; -+ struct mutex i2c_buffer_lock; - }; - - enum dib7000p_power_mode { -@@ -81,6 +83,13 @@ static int dib7090_set_diversity_in(struct dvb_frontend *fe, int onoff); - - static u16 dib7000p_read_word(struct dib7000p_state *state, u16 reg) - { -+ u16 ret; -+ -+ if (mutex_lock_interruptible(&state->i2c_buffer_lock) < 0) { -+ dprintk("could not acquire lock"); -+ return 0; -+ } -+ - state->i2c_write_buffer[0] = reg >> 8; - state->i2c_write_buffer[1] = reg & 0xff; - -@@ -97,11 +106,20 @@ static u16 dib7000p_read_word(struct dib7000p_state *state, u16 reg) - if (i2c_transfer(state->i2c_adap, state->msg, 2) != 2) - dprintk("i2c read error on %d", reg); - -- return (state->i2c_read_buffer[0] << 8) | state->i2c_read_buffer[1]; -+ ret = (state->i2c_read_buffer[0] << 8) | state->i2c_read_buffer[1]; -+ mutex_unlock(&state->i2c_buffer_lock); -+ return ret; - } - - static int dib7000p_write_word(struct dib7000p_state *state, u16 reg, u16 val) - { -+ int ret; -+ -+ if (mutex_lock_interruptible(&state->i2c_buffer_lock) < 0) { -+ dprintk("could not acquire lock"); -+ return -EINVAL; -+ } -+ - state->i2c_write_buffer[0] = (reg >> 8) & 0xff; - state->i2c_write_buffer[1] = reg & 0xff; - state->i2c_write_buffer[2] = (val >> 8) & 0xff; -@@ -113,7 +131,10 @@ static int dib7000p_write_word(struct dib7000p_state *state, u16 reg, u16 val) - state->msg[0].buf = state->i2c_write_buffer; - state->msg[0].len = 4; - -- return i2c_transfer(state->i2c_adap, state->msg, 1) != 1 ? -EREMOTEIO : 0; -+ ret = (i2c_transfer(state->i2c_adap, state->msg, 1) != 1 ? -+ -EREMOTEIO : 0); -+ mutex_unlock(&state->i2c_buffer_lock); -+ return ret; - } - - static void dib7000p_write_tab(struct dib7000p_state *state, u16 * buf) -@@ -1646,6 +1667,7 @@ int dib7000p_i2c_enumeration(struct i2c_adapter *i2c, int no_of_demods, u8 defau - return -ENOMEM; - - dpst->i2c_adap = i2c; -+ mutex_init(&dpst->i2c_buffer_lock); - - for (k = no_of_demods - 1; k >= 0; k--) { - dpst->cfg = cfg[k]; -@@ -2324,6 +2346,7 @@ struct dvb_frontend *dib7000p_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr, - demod = &st->demod; - demod->demodulator_priv = st; - memcpy(&st->demod.ops, &dib7000p_ops, sizeof(struct dvb_frontend_ops)); -+ mutex_init(&st->i2c_buffer_lock); - - dib7000p_write_word(st, 1287, 0x0003); /* sram lead in, rdy */ - -@@ -2333,8 +2356,9 @@ struct dvb_frontend *dib7000p_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr, - st->version = dib7000p_read_word(st, 897); - - /* FIXME: make sure the dev.parent field is initialized, or else -- request_firmware() will hit an OOPS (this should be moved somewhere -- more common) */ -+ request_firmware() will hit an OOPS (this should be moved somewhere -+ more common) */ -+ st->i2c_master.gated_tuner_i2c_adap.dev.parent = i2c_adap->dev.parent; - - dibx000_init_i2c_master(&st->i2c_master, DIB7000P, st->i2c_adap, st->i2c_addr); - -diff --git a/drivers/media/dvb/frontends/dib8000.c b/drivers/media/dvb/frontends/dib8000.c -index 7d2ea11..fe284d5 100644 ---- a/drivers/media/dvb/frontends/dib8000.c -+++ b/drivers/media/dvb/frontends/dib8000.c -@@ -10,6 +10,8 @@ - #include - #include - #include -+#include -+ - #include "dvb_math.h" - - #include "dvb_frontend.h" -@@ -37,6 +39,7 @@ struct i2c_device { - u8 addr; - u8 *i2c_write_buffer; - u8 *i2c_read_buffer; -+ struct mutex *i2c_buffer_lock; - }; - - struct dib8000_state { -@@ -77,6 +80,7 @@ struct dib8000_state { - struct i2c_msg msg[2]; - u8 i2c_write_buffer[4]; - u8 i2c_read_buffer[2]; -+ struct mutex i2c_buffer_lock; - }; - - enum dib8000_power_mode { -@@ -86,24 +90,39 @@ enum dib8000_power_mode { - - static u16 dib8000_i2c_read16(struct i2c_device *i2c, u16 reg) - { -+ u16 ret; - struct i2c_msg msg[2] = { -- {.addr = i2c->addr >> 1, .flags = 0, -- .buf = i2c->i2c_write_buffer, .len = 2}, -- {.addr = i2c->addr >> 1, .flags = I2C_M_RD, -- .buf = i2c->i2c_read_buffer, .len = 2}, -+ {.addr = i2c->addr >> 1, .flags = 0, .len = 2}, -+ {.addr = i2c->addr >> 1, .flags = I2C_M_RD, .len = 2}, - }; - -+ if (mutex_lock_interruptible(i2c->i2c_buffer_lock) < 0) { -+ dprintk("could not acquire lock"); -+ return 0; -+ } -+ -+ msg[0].buf = i2c->i2c_write_buffer; - msg[0].buf[0] = reg >> 8; - msg[0].buf[1] = reg & 0xff; -+ msg[1].buf = i2c->i2c_read_buffer; - - if (i2c_transfer(i2c->adap, msg, 2) != 2) - dprintk("i2c read error on %d", reg); - -- return (msg[1].buf[0] << 8) | msg[1].buf[1]; -+ ret = (msg[1].buf[0] << 8) | msg[1].buf[1]; -+ mutex_unlock(i2c->i2c_buffer_lock); -+ return ret; - } - - static u16 dib8000_read_word(struct dib8000_state *state, u16 reg) - { -+ u16 ret; -+ -+ if (mutex_lock_interruptible(&state->i2c_buffer_lock) < 0) { -+ dprintk("could not acquire lock"); -+ return 0; -+ } -+ - state->i2c_write_buffer[0] = reg >> 8; - state->i2c_write_buffer[1] = reg & 0xff; - -@@ -120,7 +139,10 @@ static u16 dib8000_read_word(struct dib8000_state *state, u16 reg) - if (i2c_transfer(state->i2c.adap, state->msg, 2) != 2) - dprintk("i2c read error on %d", reg); - -- return (state->i2c_read_buffer[0] << 8) | state->i2c_read_buffer[1]; -+ ret = (state->i2c_read_buffer[0] << 8) | state->i2c_read_buffer[1]; -+ mutex_unlock(&state->i2c_buffer_lock); -+ -+ return ret; - } - - static u32 dib8000_read32(struct dib8000_state *state, u16 reg) -@@ -135,22 +157,35 @@ static u32 dib8000_read32(struct dib8000_state *state, u16 reg) - - static int dib8000_i2c_write16(struct i2c_device *i2c, u16 reg, u16 val) - { -- struct i2c_msg msg = {.addr = i2c->addr >> 1, .flags = 0, -- .buf = i2c->i2c_write_buffer, .len = 4}; -+ struct i2c_msg msg = {.addr = i2c->addr >> 1, .flags = 0, .len = 4}; - int ret = 0; - -+ if (mutex_lock_interruptible(i2c->i2c_buffer_lock) < 0) { -+ dprintk("could not acquire lock"); -+ return -EINVAL; -+ } -+ -+ msg.buf = i2c->i2c_write_buffer; - msg.buf[0] = (reg >> 8) & 0xff; - msg.buf[1] = reg & 0xff; - msg.buf[2] = (val >> 8) & 0xff; - msg.buf[3] = val & 0xff; - - ret = i2c_transfer(i2c->adap, &msg, 1) != 1 ? -EREMOTEIO : 0; -+ mutex_unlock(i2c->i2c_buffer_lock); - - return ret; - } - - static int dib8000_write_word(struct dib8000_state *state, u16 reg, u16 val) - { -+ int ret; -+ -+ if (mutex_lock_interruptible(&state->i2c_buffer_lock) < 0) { -+ dprintk("could not acquire lock"); -+ return -EINVAL; -+ } -+ - state->i2c_write_buffer[0] = (reg >> 8) & 0xff; - state->i2c_write_buffer[1] = reg & 0xff; - state->i2c_write_buffer[2] = (val >> 8) & 0xff; -@@ -162,7 +197,11 @@ static int dib8000_write_word(struct dib8000_state *state, u16 reg, u16 val) - state->msg[0].buf = state->i2c_write_buffer; - state->msg[0].len = 4; - -- return i2c_transfer(state->i2c.adap, state->msg, 1) != 1 ? -EREMOTEIO : 0; -+ ret = (i2c_transfer(state->i2c.adap, state->msg, 1) != 1 ? -+ -EREMOTEIO : 0); -+ mutex_unlock(&state->i2c_buffer_lock); -+ -+ return ret; - } - - static const s16 coeff_2k_sb_1seg_dqpsk[8] = { -@@ -2434,8 +2473,15 @@ int dib8000_i2c_enumeration(struct i2c_adapter *host, int no_of_demods, u8 defau - if (!client.i2c_read_buffer) { - dprintk("%s: not enough memory", __func__); - ret = -ENOMEM; -- goto error_memory; -+ goto error_memory_read; -+ } -+ client.i2c_buffer_lock = kzalloc(sizeof(struct mutex), GFP_KERNEL); -+ if (!client.i2c_buffer_lock) { -+ dprintk("%s: not enough memory", __func__); -+ ret = -ENOMEM; -+ goto error_memory_lock; - } -+ mutex_init(client.i2c_buffer_lock); - - for (k = no_of_demods - 1; k >= 0; k--) { - /* designated i2c address */ -@@ -2476,8 +2522,10 @@ int dib8000_i2c_enumeration(struct i2c_adapter *host, int no_of_demods, u8 defau - } - - error: -+ kfree(client.i2c_buffer_lock); -+error_memory_lock: - kfree(client.i2c_read_buffer); --error_memory: -+error_memory_read: - kfree(client.i2c_write_buffer); - - return ret; -@@ -2581,6 +2629,8 @@ struct dvb_frontend *dib8000_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr, s - state->i2c.addr = i2c_addr; - state->i2c.i2c_write_buffer = state->i2c_write_buffer; - state->i2c.i2c_read_buffer = state->i2c_read_buffer; -+ mutex_init(&state->i2c_buffer_lock); -+ state->i2c.i2c_buffer_lock = &state->i2c_buffer_lock; - state->gpio_val = cfg->gpio_val; - state->gpio_dir = cfg->gpio_dir; - -diff --git a/drivers/media/dvb/frontends/dib9000.c b/drivers/media/dvb/frontends/dib9000.c -index a085588..b931074 100644 ---- a/drivers/media/dvb/frontends/dib9000.c -+++ b/drivers/media/dvb/frontends/dib9000.c -@@ -38,6 +38,15 @@ struct i2c_device { - #define DibInitLock(lock) mutex_init(lock) - #define DibFreeLock(lock) - -+struct dib9000_pid_ctrl { -+#define DIB9000_PID_FILTER_CTRL 0 -+#define DIB9000_PID_FILTER 1 -+ u8 cmd; -+ u8 id; -+ u16 pid; -+ u8 onoff; -+}; -+ - struct dib9000_state { - struct i2c_device i2c; - -@@ -99,6 +108,10 @@ struct dib9000_state { - struct i2c_msg msg[2]; - u8 i2c_write_buffer[255]; - u8 i2c_read_buffer[255]; -+ DIB_LOCK demod_lock; -+ u8 get_frontend_internal; -+ struct dib9000_pid_ctrl pid_ctrl[10]; -+ s8 pid_ctrl_index; /* -1: empty list; -2: do not use the list */ - }; - - static const u32 fe_info[44] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -@@ -1743,19 +1756,56 @@ EXPORT_SYMBOL(dib9000_set_gpio); - int dib9000_fw_pid_filter_ctrl(struct dvb_frontend *fe, u8 onoff) - { - struct dib9000_state *state = fe->demodulator_priv; -- u16 val = dib9000_read_word(state, 294 + 1) & 0xffef; -+ u16 val; -+ int ret; -+ -+ if ((state->pid_ctrl_index != -2) && (state->pid_ctrl_index < 9)) { -+ /* postpone the pid filtering cmd */ -+ dprintk("pid filter cmd postpone"); -+ state->pid_ctrl_index++; -+ state->pid_ctrl[state->pid_ctrl_index].cmd = DIB9000_PID_FILTER_CTRL; -+ state->pid_ctrl[state->pid_ctrl_index].onoff = onoff; -+ return 0; -+ } -+ -+ DibAcquireLock(&state->demod_lock); -+ -+ val = dib9000_read_word(state, 294 + 1) & 0xffef; - val |= (onoff & 0x1) << 4; - - dprintk("PID filter enabled %d", onoff); -- return dib9000_write_word(state, 294 + 1, val); -+ ret = dib9000_write_word(state, 294 + 1, val); -+ DibReleaseLock(&state->demod_lock); -+ return ret; -+ - } - EXPORT_SYMBOL(dib9000_fw_pid_filter_ctrl); - - int dib9000_fw_pid_filter(struct dvb_frontend *fe, u8 id, u16 pid, u8 onoff) - { - struct dib9000_state *state = fe->demodulator_priv; -+ int ret; -+ -+ if (state->pid_ctrl_index != -2) { -+ /* postpone the pid filtering cmd */ -+ dprintk("pid filter postpone"); -+ if (state->pid_ctrl_index < 9) { -+ state->pid_ctrl_index++; -+ state->pid_ctrl[state->pid_ctrl_index].cmd = DIB9000_PID_FILTER; -+ state->pid_ctrl[state->pid_ctrl_index].id = id; -+ state->pid_ctrl[state->pid_ctrl_index].pid = pid; -+ state->pid_ctrl[state->pid_ctrl_index].onoff = onoff; -+ } else -+ dprintk("can not add any more pid ctrl cmd"); -+ return 0; -+ } -+ -+ DibAcquireLock(&state->demod_lock); - dprintk("Index %x, PID %d, OnOff %d", id, pid, onoff); -- return dib9000_write_word(state, 300 + 1 + id, onoff ? (1 << 13) | pid : 0); -+ ret = dib9000_write_word(state, 300 + 1 + id, -+ onoff ? (1 << 13) | pid : 0); -+ DibReleaseLock(&state->demod_lock); -+ return ret; - } - EXPORT_SYMBOL(dib9000_fw_pid_filter); - -@@ -1778,6 +1828,7 @@ static void dib9000_release(struct dvb_frontend *demod) - DibFreeLock(&state->platform.risc.mbx_lock); - DibFreeLock(&state->platform.risc.mem_lock); - DibFreeLock(&state->platform.risc.mem_mbx_lock); -+ DibFreeLock(&state->demod_lock); - dibx000_exit_i2c_master(&st->i2c_master); - - i2c_del_adapter(&st->tuner_adap); -@@ -1795,14 +1846,19 @@ static int dib9000_sleep(struct dvb_frontend *fe) - { - struct dib9000_state *state = fe->demodulator_priv; - u8 index_frontend; -- int ret; -+ int ret = 0; - -+ DibAcquireLock(&state->demod_lock); - for (index_frontend = 1; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) { - ret = state->fe[index_frontend]->ops.sleep(state->fe[index_frontend]); - if (ret < 0) -- return ret; -+ goto error; - } -- return dib9000_mbx_send(state, OUT_MSG_FE_SLEEP, NULL, 0); -+ ret = dib9000_mbx_send(state, OUT_MSG_FE_SLEEP, NULL, 0); -+ -+error: -+ DibReleaseLock(&state->demod_lock); -+ return ret; - } - - static int dib9000_fe_get_tune_settings(struct dvb_frontend *fe, struct dvb_frontend_tune_settings *tune) -@@ -1816,7 +1872,10 @@ static int dib9000_get_frontend(struct dvb_frontend *fe, struct dvb_frontend_par - struct dib9000_state *state = fe->demodulator_priv; - u8 index_frontend, sub_index_frontend; - fe_status_t stat; -- int ret; -+ int ret = 0; -+ -+ if (state->get_frontend_internal == 0) -+ DibAcquireLock(&state->demod_lock); - - for (index_frontend = 1; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) { - state->fe[index_frontend]->ops.read_status(state->fe[index_frontend], &stat); -@@ -1846,14 +1905,15 @@ static int dib9000_get_frontend(struct dvb_frontend *fe, struct dvb_frontend_par - state->fe[index_frontend]->dtv_property_cache.rolloff; - } - } -- return 0; -+ ret = 0; -+ goto return_value; - } - } - - /* get the channel from master chip */ - ret = dib9000_fw_get_channel(fe, fep); - if (ret != 0) -- return ret; -+ goto return_value; - - /* synchronize the cache with the other frontends */ - for (index_frontend = 1; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) { -@@ -1866,8 +1926,12 @@ static int dib9000_get_frontend(struct dvb_frontend *fe, struct dvb_frontend_par - state->fe[index_frontend]->dtv_property_cache.code_rate_LP = fe->dtv_property_cache.code_rate_LP; - state->fe[index_frontend]->dtv_property_cache.rolloff = fe->dtv_property_cache.rolloff; - } -+ ret = 0; - -- return 0; -+return_value: -+ if (state->get_frontend_internal == 0) -+ DibReleaseLock(&state->demod_lock); -+ return ret; - } - - static int dib9000_set_tune_state(struct dvb_frontend *fe, enum frontend_tune_state tune_state) -@@ -1912,6 +1976,10 @@ static int dib9000_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_par - dprintk("dib9000: must specify bandwidth "); - return 0; - } -+ -+ state->pid_ctrl_index = -1; /* postpone the pid filtering cmd */ -+ DibAcquireLock(&state->demod_lock); -+ - fe->dtv_property_cache.delivery_system = SYS_DVBT; - - /* set the master status */ -@@ -1974,13 +2042,18 @@ static int dib9000_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_par - /* check the tune result */ - if (exit_condition == 1) { /* tune failed */ - dprintk("tune failed"); -+ DibReleaseLock(&state->demod_lock); -+ /* tune failed; put all the pid filtering cmd to junk */ -+ state->pid_ctrl_index = -1; - return 0; - } - - dprintk("tune success on frontend%i", index_frontend_success); - - /* synchronize all the channel cache */ -+ state->get_frontend_internal = 1; - dib9000_get_frontend(state->fe[0], fep); -+ state->get_frontend_internal = 0; - - /* retune the other frontends with the found channel */ - channel_status.status = CHANNEL_STATUS_PARAMETERS_SET; -@@ -2025,6 +2098,28 @@ static int dib9000_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_par - /* turn off the diversity for the last frontend */ - dib9000_fw_set_diversity_in(state->fe[index_frontend - 1], 0); - -+ DibReleaseLock(&state->demod_lock); -+ if (state->pid_ctrl_index >= 0) { -+ u8 index_pid_filter_cmd; -+ u8 pid_ctrl_index = state->pid_ctrl_index; -+ -+ state->pid_ctrl_index = -2; -+ for (index_pid_filter_cmd = 0; -+ index_pid_filter_cmd <= pid_ctrl_index; -+ index_pid_filter_cmd++) { -+ if (state->pid_ctrl[index_pid_filter_cmd].cmd == DIB9000_PID_FILTER_CTRL) -+ dib9000_fw_pid_filter_ctrl(state->fe[0], -+ state->pid_ctrl[index_pid_filter_cmd].onoff); -+ else if (state->pid_ctrl[index_pid_filter_cmd].cmd == DIB9000_PID_FILTER) -+ dib9000_fw_pid_filter(state->fe[0], -+ state->pid_ctrl[index_pid_filter_cmd].id, -+ state->pid_ctrl[index_pid_filter_cmd].pid, -+ state->pid_ctrl[index_pid_filter_cmd].onoff); -+ } -+ } -+ /* do not postpone any more the pid filtering */ -+ state->pid_ctrl_index = -2; -+ - return 0; - } - -@@ -2041,6 +2136,7 @@ static int dib9000_read_status(struct dvb_frontend *fe, fe_status_t * stat) - u8 index_frontend; - u16 lock = 0, lock_slave = 0; - -+ DibAcquireLock(&state->demod_lock); - for (index_frontend = 1; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) - lock_slave |= dib9000_read_lock(state->fe[index_frontend]); - -@@ -2059,6 +2155,8 @@ static int dib9000_read_status(struct dvb_frontend *fe, fe_status_t * stat) - if ((lock & 0x0008) || (lock_slave & 0x0008)) - *stat |= FE_HAS_LOCK; - -+ DibReleaseLock(&state->demod_lock); -+ - return 0; - } - -@@ -2066,10 +2164,14 @@ static int dib9000_read_ber(struct dvb_frontend *fe, u32 * ber) - { - struct dib9000_state *state = fe->demodulator_priv; - u16 *c; -+ int ret = 0; - -+ DibAcquireLock(&state->demod_lock); - DibAcquireLock(&state->platform.risc.mem_mbx_lock); -- if (dib9000_fw_memmbx_sync(state, FE_SYNC_CHANNEL) < 0) -- return -EIO; -+ if (dib9000_fw_memmbx_sync(state, FE_SYNC_CHANNEL) < 0) { -+ ret = -EIO; -+ goto error; -+ } - dib9000_risc_mem_read(state, FE_MM_R_FE_MONITOR, - state->i2c_read_buffer, 16 * 2); - DibReleaseLock(&state->platform.risc.mem_mbx_lock); -@@ -2077,7 +2179,10 @@ static int dib9000_read_ber(struct dvb_frontend *fe, u32 * ber) - c = (u16 *)state->i2c_read_buffer; - - *ber = c[10] << 16 | c[11]; -- return 0; -+ -+error: -+ DibReleaseLock(&state->demod_lock); -+ return ret; - } - - static int dib9000_read_signal_strength(struct dvb_frontend *fe, u16 * strength) -@@ -2086,7 +2191,9 @@ static int dib9000_read_signal_strength(struct dvb_frontend *fe, u16 * strength) - u8 index_frontend; - u16 *c = (u16 *)state->i2c_read_buffer; - u16 val; -+ int ret = 0; - -+ DibAcquireLock(&state->demod_lock); - *strength = 0; - for (index_frontend = 1; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) { - state->fe[index_frontend]->ops.read_signal_strength(state->fe[index_frontend], &val); -@@ -2097,8 +2204,10 @@ static int dib9000_read_signal_strength(struct dvb_frontend *fe, u16 * strength) - } - - DibAcquireLock(&state->platform.risc.mem_mbx_lock); -- if (dib9000_fw_memmbx_sync(state, FE_SYNC_CHANNEL) < 0) -- return -EIO; -+ if (dib9000_fw_memmbx_sync(state, FE_SYNC_CHANNEL) < 0) { -+ ret = -EIO; -+ goto error; -+ } - dib9000_risc_mem_read(state, FE_MM_R_FE_MONITOR, (u8 *) c, 16 * 2); - DibReleaseLock(&state->platform.risc.mem_mbx_lock); - -@@ -2107,7 +2216,10 @@ static int dib9000_read_signal_strength(struct dvb_frontend *fe, u16 * strength) - *strength = 65535; - else - *strength += val; -- return 0; -+ -+error: -+ DibReleaseLock(&state->demod_lock); -+ return ret; - } - - static u32 dib9000_get_snr(struct dvb_frontend *fe) -@@ -2151,6 +2263,7 @@ static int dib9000_read_snr(struct dvb_frontend *fe, u16 * snr) - u8 index_frontend; - u32 snr_master; - -+ DibAcquireLock(&state->demod_lock); - snr_master = dib9000_get_snr(fe); - for (index_frontend = 1; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) - snr_master += dib9000_get_snr(state->fe[index_frontend]); -@@ -2161,6 +2274,8 @@ static int dib9000_read_snr(struct dvb_frontend *fe, u16 * snr) - } else - *snr = 0; - -+ DibReleaseLock(&state->demod_lock); -+ - return 0; - } - -@@ -2168,15 +2283,22 @@ static int dib9000_read_unc_blocks(struct dvb_frontend *fe, u32 * unc) - { - struct dib9000_state *state = fe->demodulator_priv; - u16 *c = (u16 *)state->i2c_read_buffer; -+ int ret = 0; - -+ DibAcquireLock(&state->demod_lock); - DibAcquireLock(&state->platform.risc.mem_mbx_lock); -- if (dib9000_fw_memmbx_sync(state, FE_SYNC_CHANNEL) < 0) -- return -EIO; -+ if (dib9000_fw_memmbx_sync(state, FE_SYNC_CHANNEL) < 0) { -+ ret = -EIO; -+ goto error; -+ } - dib9000_risc_mem_read(state, FE_MM_R_FE_MONITOR, (u8 *) c, 16 * 2); - DibReleaseLock(&state->platform.risc.mem_mbx_lock); - - *unc = c[12]; -- return 0; -+ -+error: -+ DibReleaseLock(&state->demod_lock); -+ return ret; - } - - int dib9000_i2c_enumeration(struct i2c_adapter *i2c, int no_of_demods, u8 default_addr, u8 first_addr) -@@ -2322,6 +2444,10 @@ struct dvb_frontend *dib9000_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr, c - DibInitLock(&st->platform.risc.mbx_lock); - DibInitLock(&st->platform.risc.mem_lock); - DibInitLock(&st->platform.risc.mem_mbx_lock); -+ DibInitLock(&st->demod_lock); -+ st->get_frontend_internal = 0; -+ -+ st->pid_ctrl_index = -2; - - st->fe[0] = fe; - fe->demodulator_priv = st; -diff --git a/drivers/media/dvb/frontends/dibx000_common.c b/drivers/media/dvb/frontends/dibx000_common.c -index dc5d17a..774d507 100644 ---- a/drivers/media/dvb/frontends/dibx000_common.c -+++ b/drivers/media/dvb/frontends/dibx000_common.c -@@ -1,4 +1,5 @@ - #include -+#include - - #include "dibx000_common.h" - -@@ -10,6 +11,13 @@ MODULE_PARM_DESC(debug, "turn on debugging (default: 0)"); - - static int dibx000_write_word(struct dibx000_i2c_master *mst, u16 reg, u16 val) - { -+ int ret; -+ -+ if (mutex_lock_interruptible(&mst->i2c_buffer_lock) < 0) { -+ dprintk("could not acquire lock"); -+ return -EINVAL; -+ } -+ - mst->i2c_write_buffer[0] = (reg >> 8) & 0xff; - mst->i2c_write_buffer[1] = reg & 0xff; - mst->i2c_write_buffer[2] = (val >> 8) & 0xff; -@@ -21,11 +29,21 @@ static int dibx000_write_word(struct dibx000_i2c_master *mst, u16 reg, u16 val) - mst->msg[0].buf = mst->i2c_write_buffer; - mst->msg[0].len = 4; - -- return i2c_transfer(mst->i2c_adap, mst->msg, 1) != 1 ? -EREMOTEIO : 0; -+ ret = i2c_transfer(mst->i2c_adap, mst->msg, 1) != 1 ? -EREMOTEIO : 0; -+ mutex_unlock(&mst->i2c_buffer_lock); -+ -+ return ret; - } - - static u16 dibx000_read_word(struct dibx000_i2c_master *mst, u16 reg) - { -+ u16 ret; -+ -+ if (mutex_lock_interruptible(&mst->i2c_buffer_lock) < 0) { -+ dprintk("could not acquire lock"); -+ return 0; -+ } -+ - mst->i2c_write_buffer[0] = reg >> 8; - mst->i2c_write_buffer[1] = reg & 0xff; - -@@ -42,7 +60,10 @@ static u16 dibx000_read_word(struct dibx000_i2c_master *mst, u16 reg) - if (i2c_transfer(mst->i2c_adap, mst->msg, 2) != 2) - dprintk("i2c read error on %d", reg); - -- return (mst->i2c_read_buffer[0] << 8) | mst->i2c_read_buffer[1]; -+ ret = (mst->i2c_read_buffer[0] << 8) | mst->i2c_read_buffer[1]; -+ mutex_unlock(&mst->i2c_buffer_lock); -+ -+ return ret; - } - - static int dibx000_is_i2c_done(struct dibx000_i2c_master *mst) -@@ -257,6 +278,7 @@ static int dibx000_i2c_gated_gpio67_xfer(struct i2c_adapter *i2c_adap, - struct i2c_msg msg[], int num) - { - struct dibx000_i2c_master *mst = i2c_get_adapdata(i2c_adap); -+ int ret; - - if (num > 32) { - dprintk("%s: too much I2C message to be transmitted (%i).\ -@@ -264,10 +286,15 @@ static int dibx000_i2c_gated_gpio67_xfer(struct i2c_adapter *i2c_adap, - return -ENOMEM; - } - -- memset(mst->msg, 0, sizeof(struct i2c_msg) * (2 + num)); -- - dibx000_i2c_select_interface(mst, DIBX000_I2C_INTERFACE_GPIO_6_7); - -+ if (mutex_lock_interruptible(&mst->i2c_buffer_lock) < 0) { -+ dprintk("could not acquire lock"); -+ return -EINVAL; -+ } -+ -+ memset(mst->msg, 0, sizeof(struct i2c_msg) * (2 + num)); -+ - /* open the gate */ - dibx000_i2c_gate_ctrl(mst, &mst->i2c_write_buffer[0], msg[0].addr, 1); - mst->msg[0].addr = mst->i2c_addr; -@@ -282,7 +309,11 @@ static int dibx000_i2c_gated_gpio67_xfer(struct i2c_adapter *i2c_adap, - mst->msg[num + 1].buf = &mst->i2c_write_buffer[4]; - mst->msg[num + 1].len = 4; - -- return i2c_transfer(mst->i2c_adap, mst->msg, 2 + num) == 2 + num ? num : -EIO; -+ ret = (i2c_transfer(mst->i2c_adap, mst->msg, 2 + num) == 2 + num ? -+ num : -EIO); -+ -+ mutex_unlock(&mst->i2c_buffer_lock); -+ return ret; - } - - static struct i2c_algorithm dibx000_i2c_gated_gpio67_algo = { -@@ -294,6 +325,7 @@ static int dibx000_i2c_gated_tuner_xfer(struct i2c_adapter *i2c_adap, - struct i2c_msg msg[], int num) - { - struct dibx000_i2c_master *mst = i2c_get_adapdata(i2c_adap); -+ int ret; - - if (num > 32) { - dprintk("%s: too much I2C message to be transmitted (%i).\ -@@ -301,10 +333,14 @@ static int dibx000_i2c_gated_tuner_xfer(struct i2c_adapter *i2c_adap, - return -ENOMEM; - } - -- memset(mst->msg, 0, sizeof(struct i2c_msg) * (2 + num)); -- - dibx000_i2c_select_interface(mst, DIBX000_I2C_INTERFACE_TUNER); - -+ if (mutex_lock_interruptible(&mst->i2c_buffer_lock) < 0) { -+ dprintk("could not acquire lock"); -+ return -EINVAL; -+ } -+ memset(mst->msg, 0, sizeof(struct i2c_msg) * (2 + num)); -+ - /* open the gate */ - dibx000_i2c_gate_ctrl(mst, &mst->i2c_write_buffer[0], msg[0].addr, 1); - mst->msg[0].addr = mst->i2c_addr; -@@ -319,7 +355,10 @@ static int dibx000_i2c_gated_tuner_xfer(struct i2c_adapter *i2c_adap, - mst->msg[num + 1].buf = &mst->i2c_write_buffer[4]; - mst->msg[num + 1].len = 4; - -- return i2c_transfer(mst->i2c_adap, mst->msg, 2 + num) == 2 + num ? num : -EIO; -+ ret = (i2c_transfer(mst->i2c_adap, mst->msg, 2 + num) == 2 + num ? -+ num : -EIO); -+ mutex_unlock(&mst->i2c_buffer_lock); -+ return ret; - } - - static struct i2c_algorithm dibx000_i2c_gated_tuner_algo = { -@@ -390,8 +429,18 @@ static int i2c_adapter_init(struct i2c_adapter *i2c_adap, - int dibx000_init_i2c_master(struct dibx000_i2c_master *mst, u16 device_rev, - struct i2c_adapter *i2c_adap, u8 i2c_addr) - { -- u8 tx[4]; -- struct i2c_msg m = {.addr = i2c_addr >> 1,.buf = tx,.len = 4 }; -+ int ret; -+ -+ mutex_init(&mst->i2c_buffer_lock); -+ if (mutex_lock_interruptible(&mst->i2c_buffer_lock) < 0) { -+ dprintk("could not acquire lock"); -+ return -EINVAL; -+ } -+ memset(mst->msg, 0, sizeof(struct i2c_msg)); -+ mst->msg[0].addr = i2c_addr >> 1; -+ mst->msg[0].flags = 0; -+ mst->msg[0].buf = mst->i2c_write_buffer; -+ mst->msg[0].len = 4; - - mst->device_rev = device_rev; - mst->i2c_adap = i2c_adap; -@@ -431,9 +480,12 @@ int dibx000_init_i2c_master(struct dibx000_i2c_master *mst, u16 device_rev, - "DiBX000: could not initialize the master i2c_adapter\n"); - - /* initialize the i2c-master by closing the gate */ -- dibx000_i2c_gate_ctrl(mst, tx, 0, 0); -+ dibx000_i2c_gate_ctrl(mst, mst->i2c_write_buffer, 0, 0); -+ -+ ret = (i2c_transfer(i2c_adap, mst->msg, 1) == 1); -+ mutex_unlock(&mst->i2c_buffer_lock); - -- return i2c_transfer(i2c_adap, &m, 1) == 1; -+ return ret; - } - - EXPORT_SYMBOL(dibx000_init_i2c_master); -diff --git a/drivers/media/dvb/frontends/dibx000_common.h b/drivers/media/dvb/frontends/dibx000_common.h -index f031165..5e01147 100644 ---- a/drivers/media/dvb/frontends/dibx000_common.h -+++ b/drivers/media/dvb/frontends/dibx000_common.h -@@ -33,6 +33,7 @@ struct dibx000_i2c_master { - struct i2c_msg msg[34]; - u8 i2c_write_buffer[8]; - u8 i2c_read_buffer[2]; -+ struct mutex i2c_buffer_lock; - }; - - extern int dibx000_init_i2c_master(struct dibx000_i2c_master *mst, -commit 45cbff13693d645fa5dcbba964e802e1746b2e57 -Author: Olivier Grenie -Date: Mon Aug 1 17:45:58 2011 +0200 - - [media] dib0700: protect the dib0700 buffer access - - This patch protects the common buffer access inside the dib0700 in order - to manage concurrent access. This protection is done using mutex. - - Cc: Mauro Carvalho Chehab - Cc: Florian Mickler - Cc: stable@kernel.org - - Signed-off-by: Javier Marcet - Signed-off-by: Olivier Grenie - Signed-off-by: Patrick Boettcher - -diff --git a/drivers/media/dvb/dvb-usb/dib0700_core.c b/drivers/media/dvb/dvb-usb/dib0700_core.c -index 5eb91b4..291b645 100644 ---- a/drivers/media/dvb/dvb-usb/dib0700_core.c -+++ b/drivers/media/dvb/dvb-usb/dib0700_core.c -@@ -30,6 +30,11 @@ int dib0700_get_version(struct dvb_usb_device *d, u32 *hwversion, - struct dib0700_state *st = d->priv; - int ret; - -+ if (mutex_lock_interruptible(&d->usb_mutex) < 0) { -+ dprintk("could not acquire lock"); -+ return 0; -+ } -+ - ret = usb_control_msg(d->udev, usb_rcvctrlpipe(d->udev, 0), - REQUEST_GET_VERSION, - USB_TYPE_VENDOR | USB_DIR_IN, 0, 0, -@@ -46,6 +51,7 @@ int dib0700_get_version(struct dvb_usb_device *d, u32 *hwversion, - if (fwtype != NULL) - *fwtype = (st->buf[12] << 24) | (st->buf[13] << 16) | - (st->buf[14] << 8) | st->buf[15]; -+ mutex_unlock(&d->usb_mutex); - return ret; - } - -@@ -108,7 +114,12 @@ int dib0700_ctrl_rd(struct dvb_usb_device *d, u8 *tx, u8 txlen, u8 *rx, u8 rxlen - int dib0700_set_gpio(struct dvb_usb_device *d, enum dib07x0_gpios gpio, u8 gpio_dir, u8 gpio_val) - { - struct dib0700_state *st = d->priv; -- s16 ret; -+ int ret; -+ -+ if (mutex_lock_interruptible(&d->usb_mutex) < 0) { -+ dprintk("could not acquire lock"); -+ return 0; -+ } - - st->buf[0] = REQUEST_SET_GPIO; - st->buf[1] = gpio; -@@ -116,6 +127,7 @@ int dib0700_set_gpio(struct dvb_usb_device *d, enum dib07x0_gpios gpio, u8 gpio_ - - ret = dib0700_ctrl_wr(d, st->buf, 3); - -+ mutex_unlock(&d->usb_mutex); - return ret; - } - -@@ -125,6 +137,11 @@ static int dib0700_set_usb_xfer_len(struct dvb_usb_device *d, u16 nb_ts_packets) - int ret; - - if (st->fw_version >= 0x10201) { -+ if (mutex_lock_interruptible(&d->usb_mutex) < 0) { -+ dprintk("could not acquire lock"); -+ return 0; -+ } -+ - st->buf[0] = REQUEST_SET_USB_XFER_LEN; - st->buf[1] = (nb_ts_packets >> 8) & 0xff; - st->buf[2] = nb_ts_packets & 0xff; -@@ -132,6 +149,7 @@ static int dib0700_set_usb_xfer_len(struct dvb_usb_device *d, u16 nb_ts_packets) - deb_info("set the USB xfer len to %i Ts packet\n", nb_ts_packets); - - ret = dib0700_ctrl_wr(d, st->buf, 3); -+ mutex_unlock(&d->usb_mutex); - } else { - deb_info("this firmware does not allow to change the USB xfer len\n"); - ret = -EIO; -@@ -208,6 +226,10 @@ static int dib0700_i2c_xfer_new(struct i2c_adapter *adap, struct i2c_msg *msg, - - } else { - /* Write request */ -+ if (mutex_lock_interruptible(&d->usb_mutex) < 0) { -+ dprintk("could not acquire lock"); -+ return 0; -+ } - st->buf[0] = REQUEST_NEW_I2C_WRITE; - st->buf[1] = msg[i].addr << 1; - st->buf[2] = (en_start << 7) | (en_stop << 6) | -@@ -227,6 +249,7 @@ static int dib0700_i2c_xfer_new(struct i2c_adapter *adap, struct i2c_msg *msg, - USB_TYPE_VENDOR | USB_DIR_OUT, - 0, 0, st->buf, msg[i].len + 4, - USB_CTRL_GET_TIMEOUT); -+ mutex_unlock(&d->usb_mutex); - if (result < 0) { - deb_info("i2c write error (status = %d)\n", result); - break; -@@ -249,6 +272,10 @@ static int dib0700_i2c_xfer_legacy(struct i2c_adapter *adap, - - if (mutex_lock_interruptible(&d->i2c_mutex) < 0) - return -EAGAIN; -+ if (mutex_lock_interruptible(&d->usb_mutex) < 0) { -+ dprintk("could not acquire lock"); -+ return 0; -+ } - - for (i = 0; i < num; i++) { - /* fill in the address */ -@@ -279,6 +306,7 @@ static int dib0700_i2c_xfer_legacy(struct i2c_adapter *adap, - break; - } - } -+ mutex_unlock(&d->usb_mutex); - mutex_unlock(&d->i2c_mutex); - - return i; -@@ -337,7 +365,12 @@ static int dib0700_set_clock(struct dvb_usb_device *d, u8 en_pll, - u16 pll_loopdiv, u16 free_div, u16 dsuScaler) - { - struct dib0700_state *st = d->priv; -- s16 ret; -+ int ret; -+ -+ if (mutex_lock_interruptible(&d->usb_mutex) < 0) { -+ dprintk("could not acquire lock"); -+ return 0; -+ } - - st->buf[0] = REQUEST_SET_CLOCK; - st->buf[1] = (en_pll << 7) | (pll_src << 6) | -@@ -352,6 +385,7 @@ static int dib0700_set_clock(struct dvb_usb_device *d, u8 en_pll, - st->buf[9] = dsuScaler & 0xff; /* LSB */ - - ret = dib0700_ctrl_wr(d, st->buf, 10); -+ mutex_unlock(&d->usb_mutex); - - return ret; - } -@@ -360,10 +394,16 @@ int dib0700_set_i2c_speed(struct dvb_usb_device *d, u16 scl_kHz) - { - struct dib0700_state *st = d->priv; - u16 divider; -+ int ret; - - if (scl_kHz == 0) - return -EINVAL; - -+ if (mutex_lock_interruptible(&d->usb_mutex) < 0) { -+ dprintk("could not acquire lock"); -+ return 0; -+ } -+ - st->buf[0] = REQUEST_SET_I2C_PARAM; - divider = (u16) (30000 / scl_kHz); - st->buf[1] = 0; -@@ -379,7 +419,11 @@ int dib0700_set_i2c_speed(struct dvb_usb_device *d, u16 scl_kHz) - deb_info("setting I2C speed: %04x %04x %04x (%d kHz).", - (st->buf[2] << 8) | (st->buf[3]), (st->buf[4] << 8) | - st->buf[5], (st->buf[6] << 8) | st->buf[7], scl_kHz); -- return dib0700_ctrl_wr(d, st->buf, 8); -+ -+ ret = dib0700_ctrl_wr(d, st->buf, 8); -+ mutex_unlock(&d->usb_mutex); -+ -+ return ret; - } - - -@@ -515,6 +559,11 @@ int dib0700_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff) - } - } - -+ if (mutex_lock_interruptible(&adap->dev->usb_mutex) < 0) { -+ dprintk("could not acquire lock"); -+ return 0; -+ } -+ - st->buf[0] = REQUEST_ENABLE_VIDEO; - /* this bit gives a kind of command, - * rather than enabling something or not */ -@@ -548,7 +597,10 @@ int dib0700_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff) - - deb_info("data for streaming: %x %x\n", st->buf[1], st->buf[2]); - -- return dib0700_ctrl_wr(adap->dev, st->buf, 4); -+ ret = dib0700_ctrl_wr(adap->dev, st->buf, 4); -+ mutex_unlock(&adap->dev->usb_mutex); -+ -+ return ret; - } - - int dib0700_change_protocol(struct rc_dev *rc, u64 rc_type) -@@ -557,6 +609,11 @@ int dib0700_change_protocol(struct rc_dev *rc, u64 rc_type) - struct dib0700_state *st = d->priv; - int new_proto, ret; - -+ if (mutex_lock_interruptible(&d->usb_mutex) < 0) { -+ dprintk("could not acquire lock"); -+ return 0; -+ } -+ - st->buf[0] = REQUEST_SET_RC; - st->buf[1] = 0; - st->buf[2] = 0; -@@ -567,23 +624,29 @@ int dib0700_change_protocol(struct rc_dev *rc, u64 rc_type) - else if (rc_type == RC_TYPE_NEC) - new_proto = 0; - else if (rc_type == RC_TYPE_RC6) { -- if (st->fw_version < 0x10200) -- return -EINVAL; -+ if (st->fw_version < 0x10200) { -+ ret = -EINVAL; -+ goto out; -+ } - - new_proto = 2; -- } else -- return -EINVAL; -+ } else { -+ ret = -EINVAL; -+ goto out; -+ } - - st->buf[1] = new_proto; - - ret = dib0700_ctrl_wr(d, st->buf, 3); - if (ret < 0) { - err("ir protocol setup failed"); -- return ret; -+ goto out; - } - - d->props.rc.core.protocol = rc_type; - -+out: -+ mutex_unlock(&d->usb_mutex); - return ret; - } - -commit aeb2d456b746164a4bd19e53de0a6678ca63fcad -Author: Olivier Grenie -Date: Thu Aug 4 18:10:03 2011 +0200 - - [media] dib0700: correct error message - - The goal of this patch is to correct a previous patch. In case of error, - the err() function should be used instead of dprintk() function. - - Signed-off-by: Olivier Grenie - -diff --git a/drivers/media/dvb/dvb-usb/dib0700_core.c b/drivers/media/dvb/dvb-usb/dib0700_core.c -index 291b645..b693ed1 100644 ---- a/drivers/media/dvb/dvb-usb/dib0700_core.c -+++ b/drivers/media/dvb/dvb-usb/dib0700_core.c -@@ -31,7 +31,7 @@ int dib0700_get_version(struct dvb_usb_device *d, u32 *hwversion, - int ret; - - if (mutex_lock_interruptible(&d->usb_mutex) < 0) { -- dprintk("could not acquire lock"); -+ err("could not acquire lock"); - return 0; - } - -@@ -117,7 +117,7 @@ int dib0700_set_gpio(struct dvb_usb_device *d, enum dib07x0_gpios gpio, u8 gpio_ - int ret; - - if (mutex_lock_interruptible(&d->usb_mutex) < 0) { -- dprintk("could not acquire lock"); -+ err("could not acquire lock"); - return 0; - } - -@@ -138,7 +138,7 @@ static int dib0700_set_usb_xfer_len(struct dvb_usb_device *d, u16 nb_ts_packets) - - if (st->fw_version >= 0x10201) { - if (mutex_lock_interruptible(&d->usb_mutex) < 0) { -- dprintk("could not acquire lock"); -+ err("could not acquire lock"); - return 0; - } - -@@ -227,7 +227,7 @@ static int dib0700_i2c_xfer_new(struct i2c_adapter *adap, struct i2c_msg *msg, - } else { - /* Write request */ - if (mutex_lock_interruptible(&d->usb_mutex) < 0) { -- dprintk("could not acquire lock"); -+ err("could not acquire lock"); - return 0; - } - st->buf[0] = REQUEST_NEW_I2C_WRITE; -@@ -273,7 +273,7 @@ static int dib0700_i2c_xfer_legacy(struct i2c_adapter *adap, - if (mutex_lock_interruptible(&d->i2c_mutex) < 0) - return -EAGAIN; - if (mutex_lock_interruptible(&d->usb_mutex) < 0) { -- dprintk("could not acquire lock"); -+ err("could not acquire lock"); - return 0; - } - -@@ -368,7 +368,7 @@ static int dib0700_set_clock(struct dvb_usb_device *d, u8 en_pll, - int ret; - - if (mutex_lock_interruptible(&d->usb_mutex) < 0) { -- dprintk("could not acquire lock"); -+ err("could not acquire lock"); - return 0; - } - -@@ -400,7 +400,7 @@ int dib0700_set_i2c_speed(struct dvb_usb_device *d, u16 scl_kHz) - return -EINVAL; - - if (mutex_lock_interruptible(&d->usb_mutex) < 0) { -- dprintk("could not acquire lock"); -+ err("could not acquire lock"); - return 0; - } - -@@ -560,7 +560,7 @@ int dib0700_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff) - } - - if (mutex_lock_interruptible(&adap->dev->usb_mutex) < 0) { -- dprintk("could not acquire lock"); -+ err("could not acquire lock"); - return 0; - } - -@@ -610,7 +610,7 @@ int dib0700_change_protocol(struct rc_dev *rc, u64 rc_type) - int new_proto, ret; - - if (mutex_lock_interruptible(&d->usb_mutex) < 0) { -- dprintk("could not acquire lock"); -+ err("could not acquire lock"); - return 0; - } diff --git a/linux-vserver/iwlagn-fix-NULL-pointer-dereference.patch b/linux-vserver/iwlagn-fix-NULL-pointer-dereference.patch deleted file mode 100644 index 3bb6d9f7c..000000000 --- a/linux-vserver/iwlagn-fix-NULL-pointer-dereference.patch +++ /dev/null @@ -1,38 +0,0 @@ -This fix regression introduced by commit: - -commit 15b3f3b006b42a678523cad989bfd60b76bf4403 -Author: Wey-Yi Guy -Date: Fri Jun 3 07:54:13 2011 -0700 - - iwlagn: set smps mode after assoc for 1000 device - -Also remove unneeded brackets on the way. - -Address: -https://bugzilla.redhat.com/show_bug.cgi?id=744155 - -If fix will not get 3.1 release, it should be applied in 3.1 stable. - -Cc: stable@kernel.org # 3.1+ -Signed-off-by: Stanislaw Gruszka ---- - drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c -index ca632f9..5004342 100644 ---- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c -+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c -@@ -296,8 +296,8 @@ static int iwlagn_rxon_connect(struct iwl_priv *priv, - return ret; - } - -- if ((ctx->vif && ctx->vif->type == NL80211_IFTYPE_STATION) && -- priv->cfg->ht_params->smps_mode) -+ if (ctx->vif && ctx->vif->type == NL80211_IFTYPE_STATION && -+ priv->cfg->ht_params && priv->cfg->ht_params->smps_mode) - ieee80211_request_smps(ctx->vif, - priv->cfg->ht_params->smps_mode); - --- -1.7.1 diff --git a/linux-vserver/linux-vserver.install b/linux-vserver/linux-vserver.install index 72ce9cf0a..450ec0338 100644 --- a/linux-vserver/linux-vserver.install +++ b/linux-vserver/linux-vserver.install @@ -2,7 +2,7 @@ # arg 2: the old package version KERNEL_NAME=-vserver -KERNEL_VERSION=3.1-vs2.3.1-rc2 +KERNEL_VERSION=3.1-vs2.3.2.5-vs-vserver post_install () { # updating module dependencies diff --git a/lv2-mdaepiano-git/PKGBUILD b/lv2-mdaepiano-git/PKGBUILD index adefdef3a..ce69747bb 100644 --- a/lv2-mdaepiano-git/PKGBUILD +++ b/lv2-mdaepiano-git/PKGBUILD @@ -1,13 +1,13 @@ # Maintainer: SpepS pkgname=lv2-mdaepiano-git -pkgver=20101021 +pkgver=20120113 pkgrel=1 pkgdesc="Native LV2 port of the famous mda e-piano VSTi plugin" arch=('i686' 'x86_64') url="http://github.com/rekado/lv2-mdaEPiano" license=('GPL2') -depends=('libsigc++' 'gtkmm') +depends=('lv2core') makedepends=('git' 'lv2-c++-tools') provides=('lv2-mdaepiano') conflicts=('lv2-mdaepiano') @@ -16,7 +16,6 @@ _gitroot="http://github.com/rekado/lv2-mdaEPiano.git" _gitname="lv2-mdaepiano" build() { - cd "$srcdir" msg "Connecting to GIT server...." @@ -37,12 +36,10 @@ build() { # # BUILD HERE # - make } package() { - cd "$srcdir/$_gitname-build" make INSTALL_DIR="$pkgdir/usr/lib/lv2" install diff --git a/nux/PKGBUILD b/nux/PKGBUILD index 8185679c0..4638a647c 100644 --- a/nux/PKGBUILD +++ b/nux/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: György Balló pkgname=nux -pkgver=1.16.0 -pkgrel=2 +pkgver=2.0.0 +pkgrel=1 pkgdesc="Graphical user interface toolkit for applications that mixes OpenGL hardware acceleration with high quality visual rendering" arch=('i686' 'x86_64') url="https://launchpad.net/nux" @@ -9,8 +9,8 @@ license=('LGPL') depends=('gdk-pixbuf2' 'glew' 'pango' 'libsigc++' 'libxcomposite' 'libxinerama') makedepends=('boost' 'glproto' 'dri2proto') options=('!libtool') -source=(http://launchpad.net/$pkgname/1.0/$pkgver/+download/$pkgname-$pkgver.tar.gz) -md5sums=('91dd7ce40c1aca0396449c16c9c8ddaa') +source=(http://launchpad.net/$pkgname/2.0/2.0/+download/$pkgname-$pkgver.tar.gz) +md5sums=('87dd2741cc6e90fa45288cd777b91d6c') build() { cd "$srcdir/$pkgname-$pkgver" diff --git a/nvidia-bumblebee/PKGBUILD b/nvidia-bumblebee/PKGBUILD new file mode 100644 index 000000000..106c015c6 --- /dev/null +++ b/nvidia-bumblebee/PKGBUILD @@ -0,0 +1,46 @@ +# $Id$ +# Maintainer : Samsagax +# Contributor : Thomas Baechler + +pkgname=nvidia-bumblebee +pkgver=290.10 +_extramodules=extramodules-3.1-ARCH +_kernver="$(cat /lib/modules/${_extramodules}/version || true)" +pkgrel=1 +pkgdesc="NVIDIA drivers for linux." +arch=('i686' 'x86_64') +url="http://www.nvidia.com/" +depends=('linux>=3.1' 'linux<3.2' "nvidia-utils-bumblebee=${pkgver}") +makedepends=('linux-headers>=3.1' 'linux-headers<3.2') +conflicts=('nvidia-96xx' 'nvidia-173xx') +license=('custom') +install=nvidia.install +options=(!strip) + +if [ "$CARCH" = "i686" ]; then + _arch='x86' + _pkg="NVIDIA-Linux-${_arch}-${pkgver}" + source=("ftp://download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run") + md5sums=('50319a4b3818c12c9c7243525e0e6316') +elif [ "$CARCH" = "x86_64" ]; then + _arch='x86_64' + _pkg="NVIDIA-Linux-${_arch}-${pkgver}-no-compat32" + source=("ftp://download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run") + md5sums=('cebfba9a7e91716a06c66bb5b38d9661') +fi + +build() { + cd "${srcdir}" + sh "${_pkg}.run" --extract-only + cd "${_pkg}/kernel" + make SYSSRC=/lib/modules/"${_kernver}/build" module +} + +package() { + install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \ + "${pkgdir}/lib/modules/${_extramodules}/nvidia.ko" + install -d -m755 "${pkgdir}/etc/modprobe.d" + echo "blacklist nouveau" >> "${pkgdir}/etc/modprobe.d/nouveau_blacklist.conf" + sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/nvidia.install" + gzip "${pkgdir}/lib/modules/${_extramodules}/nvidia.ko" +} diff --git a/nvidia-bumblebee/nvidia.install b/nvidia-bumblebee/nvidia.install new file mode 100644 index 000000000..099332c28 --- /dev/null +++ b/nvidia-bumblebee/nvidia.install @@ -0,0 +1,15 @@ +post_install() { + EXTRAMODULES='extramodules-3.1-ARCH' + depmod $(cat /lib/modules/$EXTRAMODULES/version) + #echo 'In order to use nvidia module, reboot the system.' +} + +post_upgrade() { + EXTRAMODULES='extramodules-3.1-ARCH' + depmod $(cat /lib/modules/$EXTRAMODULES/version) +} + +post_remove() { + EXTRAMODULES='extramodules-3.1-ARCH' + depmod $(cat /lib/modules/$EXTRAMODULES/version) +} diff --git a/nvidia-utils-bumblebee/PKGBUILD b/nvidia-utils-bumblebee/PKGBUILD dissimilarity index 81% index 1653e3894..ce99fb4f5 100644 --- a/nvidia-utils-bumblebee/PKGBUILD +++ b/nvidia-utils-bumblebee/PKGBUILD @@ -1,41 +1,93 @@ -# Maintainer: Samsagax -# Contributor: borman - -pkgname=nvidia-utils-bumblebee - -_pacman_get_key() -{ - pacman --print --print-format $1 -S nvidia-utils | grep nvidia-utils -} - -pkgver=290.10 -pkgrel=1 -pkgdesc="NVIDIA drivers utilities and libraries. Repacked and installed in different folder to be used simultaneously with libgl." -arch=('i686' 'x86_64') -url="http://www.nvidia.com/" -depends=('xorg-server' 'libxvmc' "dkms-nvidia=$pkgver" "opencl-nvidia=$pkgver") -optdepends=('gtk2: nvidia-settings' 'pkgconfig: nvidia-xconfig') -conflicts=('nvidia-utils') -provides=("nvidia-utils=$pkgver") -license=('custom') -install=nvidia.install -if [ "$CARCH" = "i686" ]; then - md5sums=('5effdd847ef219ddb0bc6464a23c2f8e') -elif [ "$CARCH" = "x86_64" ]; then - md5sums=('0651b6c5d159971bc0394250dcd1d8ef') - optdepends[${#optdepends[@]}]='lib32-nvidia-utils-bumblebee' -fi -source=$(_pacman_get_key %l) - -build() -{ - cd $srcdir - msg "Copying files..." - cp -a usr $pkgdir || return 1 - mkdir -p $pkgdir/usr/libtemp/nvidia-bumblebee - mv $pkgdir/usr/lib/* $pkgdir/usr/libtemp/nvidia-bumblebee/ - mv -T $pkgdir/usr/libtemp/ $pkgdir/usr/lib/ - # Dirty hack to use nvidia-smi - cd $pkgdir/usr/lib/ - ln -s nvidia-bumblebee/libnvidia-ml.so.1 -} +# $Id$ +# Maintainer: Samsagax +# Contributor: Thomas Baechler +# Contributor: James Rayner +pkgname=nvidia-utils-bumblebee +#pkgname=('nvidia-utils-bumblebee' 'opencl-nvidia') +pkgver=290.10 +pkgrel=2 +arch=('i686' 'x86_64') +url="http://www.nvidia.com/" +license=('custom') +options=('!strip') +provides=("nvidia-utils=${pkgver}") + +if [ "$CARCH" = "i686" ]; then + _arch='x86' + _pkg="NVIDIA-Linux-${_arch}-${pkgver}" + source=("ftp://download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run") + md5sums=('50319a4b3818c12c9c7243525e0e6316') +elif [ "$CARCH" = "x86_64" ]; then + _arch='x86_64' + _pkg="NVIDIA-Linux-${_arch}-${pkgver}-no-compat32" + source=("ftp://download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run") + md5sums=('cebfba9a7e91716a06c66bb5b38d9661') +fi + +create_links() { + # create soname links + while read -d '' _lib; do + _soname="$(dirname "${_lib}")/$(readelf -d "${_lib}" | sed -nr 's/.*Library soname: \[(.*)\].*/\1/p')" + [[ -e "${_soname}" ]] || ln -s "$(basename "${_lib}")" "${_soname}" + [[ -e "${_soname/.[0-9]*/}" ]] || ln -s "$(basename "${_soname}")" "${_soname/.[0-9]*/}" + done < <(find "${pkgdir}" -type f -name '*.so*' -print0) +} + +build() { + cd "${srcdir}" + sh "${_pkg}.run" --extract-only +} + +package() { + pkgdesc="NVIDIA drivers utilities and libraries." + depends=('xorg-server' 'libxvmc') + optdepends=('gtk2: nvidia-settings' 'pkg-config: nvidia-xconfig' + 'opencl-nvidia: OpenCL support') + #conflicts=('libgl') + #provides=('libgl') + cd "${srcdir}/${_pkg}" + + # X driver + install -D -m755 nvidia_drv.so "${pkgdir}/usr/lib/xorg/modules/drivers/nvidia_drv.so" + # GLX extension module for X + install -D -m755 "libglx.so.${pkgver}" "${pkgdir}/usr/lib/nvidia-bumblebee/xorg/modules/extensions/libglx.so.${pkgver}" + ln -s "libglx.so.${pkgver}" "${pkgdir}/usr/lib/nvidia-bumblebee/xorg/modules/extensions/libglx.so" # X doesn't find glx otherwise + # OpenGL library + install -D -m755 "libGL.so.${pkgver}" "${pkgdir}/usr/lib/nvidia-bumblebee/libGL.so.${pkgver}" + # OpenGL core library + install -D -m755 "libnvidia-glcore.so.${pkgver}" "${pkgdir}/usr/lib/libnvidia-glcore.so.${pkgver}" + # XvMC + install -D -m644 libXvMCNVIDIA.a "${pkgdir}/usr/lib/libXvMCNVIDIA.a" + install -D -m755 "libXvMCNVIDIA.so.${pkgver}" "${pkgdir}/usr/lib/libXvMCNVIDIA.so.${pkgver}" + # VDPAU + install -D -m755 "libvdpau_nvidia.so.${pkgver}" "${pkgdir}/usr/lib/vdpau/libvdpau_nvidia.so.${pkgver}" + # nvidia-tls library + install -D -m755 "tls/libnvidia-tls.so.${pkgver}" "${pkgdir}/usr/lib/libnvidia-tls.so.${pkgver}" + install -D -m755 "libnvidia-cfg.so.${pkgver}" "${pkgdir}/usr/lib/libnvidia-cfg.so.${pkgver}" + + install -D -m755 "libnvidia-ml.so.${pkgver}" "${pkgdir}/usr/lib/libnvidia-ml.so.${pkgver}" + + # nvidia-xconfig + install -D -m755 nvidia-xconfig "${pkgdir}/usr/bin/nvidia-xconfig" + install -D -m644 nvidia-xconfig.1.gz "${pkgdir}/usr/share/man/man1/nvidia-xconfig.1.gz" + # nvidia-settings + install -D -m755 nvidia-settings "${pkgdir}/usr/bin/nvidia-settings" + install -D -m644 nvidia-settings.1.gz "${pkgdir}/usr/share/man/man1/nvidia-settings.1.gz" + install -D -m644 nvidia-settings.desktop "${pkgdir}/usr/share/applications/nvidia-settings.desktop" + install -D -m644 nvidia-settings.png "${pkgdir}/usr/share/pixmaps/nvidia-settings.png" + sed -e 's:__UTILS_PATH__:/usr/bin:' -e 's:__PIXMAP_PATH__:/usr/share/pixmaps:' -i "${pkgdir}/usr/share/applications/nvidia-settings.desktop" + # nvidia-bug-report + install -D -m755 nvidia-bug-report.sh "${pkgdir}/usr/bin/nvidia-bug-report.sh" + # nvidia-smi + install -D -m755 nvidia-smi "${pkgdir}/usr/bin/nvidia-smi" + install -D -m644 nvidia-smi.1.gz "${pkgdir}/usr/share/man/man1/nvidia-smi.1.gz" + + + install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/nvidia/LICENSE" + ln -s nvidia "${pkgdir}/usr/share/licenses/nvidia-utils" + install -D -m644 README.txt "${pkgdir}/usr/share/doc/nvidia/README" + install -D -m644 NVIDIA_Changelog "${pkgdir}/usr/share/doc/nvidia/NVIDIA_Changelog" + ln -s nvidia "${pkgdir}/usr/share/doc/nvidia-utils" + + create_links +} diff --git a/nvidia-utils-bumblebee/nvidia.install b/nvidia-utils-bumblebee/nvidia.install deleted file mode 100644 index 0a878a73d..000000000 --- a/nvidia-utils-bumblebee/nvidia.install +++ /dev/null @@ -1,6 +0,0 @@ -post_install() { - echo By using this package you accept the NVIDIA license, - echo which has been installed in /usr/share/licenses/nvidia/LICENSE - echo If you do not accept this license, you must remove the package immediately. - echo Dont forget to update your /etc/X11/xorg.conf -} diff --git a/rss-guard-git/PKGBUILD b/rss-guard-git/PKGBUILD index 489b8791b..9d3195aff 100755 --- a/rss-guard-git/PKGBUILD +++ b/rss-guard-git/PKGBUILD @@ -2,7 +2,7 @@ # Contributor: Petr Vanek pkgname=rss-guard-git -pkgver=20120111 +pkgver=20120113 pkgrel=1 pkgdesc='A (very) tiny RSS & ATOM reader developed using Qt framework.' arch=('i686' 'x86_64') diff --git a/util-linux-git/PKGBUILD b/util-linux-git/PKGBUILD index ff3ae7d12..e64ec06b3 100644 --- a/util-linux-git/PKGBUILD +++ b/util-linux-git/PKGBUILD @@ -1,7 +1,7 @@ # Contributor: Dave Reisner pkgname=util-linux-git -pkgver=20120112 +pkgver=20120113 pkgrel=1 pkgdesc="Miscellaneous system utilities for Linux - the GIT version" url="http://userweb.kernel.org/~kzak/util-linux/" @@ -12,15 +12,13 @@ makedepends=('git') provides=('util-linux-ng=2.21' 'util-linux=2.21') conflicts=('util-linux-ng' 'util-linux') replaces=('util-linux-ng') -options=('!libtool' '!strip') +options=('!libtool') optdepends=('perl: for chkdupexe support') -#_gitroot="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git" -_gitroot="git://github.com/karelzak/util-linux.git" +_gitroot="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git" _gitname="util-linux" build() { - cd "$srcdir" msg "Connecting to GIT server...." if [[ -d $_gitname ]] ; then @@ -33,25 +31,29 @@ build() { msg "GIT checkout done or server timeout" rm -rf "$srcdir/$_gitname-build" - git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build" + git clone "$srcdir/$_gitname"{,-build} cd "$srcdir/$_gitname-build" + # alter location of adjtime file for FHS sed -e 's@etc/adjtime@var/lib/hwclock/adjtime@' -i hwclock/hwclock.c - CFLAGS+=' -g' - - msg "Starting configure..." + msg "Configuring..." ./autogen.sh - ./configure --enable-write --enable-raw --disable-wall --enable-partx --enable-new-mount - + ./configure \ + --enable-write \ + --enable-raw \ + --disable-wall \ + --enable-partx \ + --enable-new-mount + + msg "Starting make..." make } package() { - cd "$srcdir/$_gitname-build" - - make DESTDIR="${pkgdir}" install - install -dm755 "${pkgdir}/var/lib/hwclock" + make -C "$_gitname-build" DESTDIR="$pkgdir" install + # create adjtime file's dir + install -dm755 "$pkgdir/var/lib/hwclock" } -- 2.11.4.GIT