Date: Thursday, June 10, 2010 @ 15:08:59 Author: ibiru Revision: 82391
upgpkg: wireshark 1.2.9-1 enable zlib support, adding wireshark group and setcap dumpcap to run as user Added: wireshark/trunk/wireshark.install Modified: wireshark/trunk/PKGBUILD -------------------+ PKGBUILD | 11 +++++++---- wireshark.install | 17 +++++++++++++++++ 2 files changed, 24 insertions(+), 4 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2010-06-10 16:13:50 UTC (rev 82390) +++ PKGBUILD 2010-06-10 19:08:59 UTC (rev 82391) @@ -2,7 +2,7 @@ # Maintainer: Hugo Doria <h...@archlinux.org> pkgname=wireshark -pkgver=1.2.8 +pkgver=1.2.9 pkgrel=1 pkgdesc="A free network protocol analyzer for Unix/Linux and Windows" arch=('i686' 'x86_64') @@ -10,7 +10,7 @@ depends=('gtk2' 'heimdal' 'libpcap' 'bash' 'gnutls' 'libcap') makedepends=('bison' 'flex') url="http://www.wireshark.org/" -replaces=('ethereal') +install=wireshark.install options=(!libtool) source=(http://www.wireshark.org/download/src/${pkgname}-${pkgver}.tar.gz wireshark.desktop wireshark.png wireshark-1.1.2--as-needed.patch) @@ -21,14 +21,17 @@ patch -Np1 -i $srcdir/wireshark-1.1.2--as-needed.patch || return 1 autoreconf -f -i || return 1 - ./configure --prefix=/usr --with-ssl --without-zlib || return 1 + ./configure --prefix=/usr --with-ssl || return 1 make all || return 1 make DESTDIR=${pkgdir} install || return 1 install -Dm644 ${srcdir}/wireshark.png ${pkgdir}/usr/share/icons/wireshark.png install -Dm644 ${srcdir}/wireshark.desktop ${pkgdir}/usr/share/applications/wireshark.desktop + #wireshark uid group is 150 + chgrp 150 "${pkgdir}/usr/bin/dumpcap" || return 1 + chmod 754 "${pkgdir}/usr/bin/dumpcap" || return 1 } -md5sums=('0ccd311769ee3e290d285cbd979bff76' +md5sums=('582fe8d14a6e7c66851e5148a2f6e5d8' '504ede44c02b2a52f6cbd3bffdf93b8d' 'e771800a8c977fe223583a453bc27397' 'cc87d7eb31f256df751b3371b1c426e9') Added: wireshark.install =================================================================== --- wireshark.install (rev 0) +++ wireshark.install 2010-06-10 19:08:59 UTC (rev 82391) @@ -0,0 +1,17 @@ +post_install() { + getent group wireshark >/dev/null 2>&1 || groupadd -g 150 wireshark &>/dev/null + setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' usr/bin/dumpcap + echo "NOTE: To run wireshark as normal user you have to add yourself into wireshark group" +} + + +post_upgrade() { + post_install $1 + +} + +post_remove() { + if getent group wireshark >/dev/null 2>&1; then + groupdel wireshark + fi +}