From 0ebb6dd6bbbed2db851462bce3dc919a6528e982d5cfb1237ed2922cef06f8d6 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Wed, 8 Dec 2010 17:47:38 +0000 Subject: [PATCH] run as root on 11.3 and older, use caps on 11.4+ OBS-URL: https://build.opensuse.org/package/show/network:utilities/wireshark?expand=0&rev=28 --- wireshark-1.0.8-desktop.patch | 13 ------------- wireshark.spec | 16 +++++++++------- 2 files changed, 9 insertions(+), 20 deletions(-) delete mode 100644 wireshark-1.0.8-desktop.patch diff --git a/wireshark-1.0.8-desktop.patch b/wireshark-1.0.8-desktop.patch deleted file mode 100644 index 9d1cfc7..0000000 --- a/wireshark-1.0.8-desktop.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: wireshark.desktop -=================================================================== ---- wireshark.desktop.orig -+++ wireshark.desktop -@@ -68,7 +68,7 @@ Comment=Network traffic analyzer - Comment[fi]=Verkkoliikenne analysaattori - Comment[fr]=Analyseur de trafic réseau - Comment[sv]=Nätverkstrafikanalysator --Icon=wireshark.png -+Icon=wireshark - TryExec=wireshark - Exec=wireshark - Terminal=false diff --git a/wireshark.spec b/wireshark.spec index 9dc9876..103412c 100644 --- a/wireshark.spec +++ b/wireshark.spec @@ -11,8 +11,6 @@ Url: http://www.wireshark.org/ Group: Productivity/Networking/Diagnostic Source: http://www.wireshark.org/download/src/%{name}-%{version}.tar.bz2 Source1: include.filelist -# PATCH-FIX-OPENSUSE wireshark-1.0.8-desktop.patch bnc#349782 prusnak@suse.cz -- fix icon and run as root -Patch0: %{name}-1.0.8-desktop.patch # PATCH-FIX-OPENSUSE wireshark-1.2.0-disable-warning-dialog.patch bnc#349782 prusnak@suse.cz -- don't show warning when running as root Patch1: %{name}-1.2.0-disable-warning-dialog.patch # PATCH-FEATURE-OPENSUSE wireshark-1.2.0-geoip.patch prusnak@suse.cz -- search in /var/lib/GeoIP if user hasn't set any GeoIP folders @@ -79,12 +77,16 @@ view the reconstructed stream of a TCP session. %prep %setup -q -%patch0 -%patch1 %patch2 %patch3 -p1 %patch4 -p1 %patch5 -p1 +sed -i 's/^Icon=wireshark.png$/Icon=wireshark/' wireshark.desktop +# run as root on 11.3 and older - bnc#349782 +%if 0%{?suse_version} <= 1130 +%patch1 +sed -i 's!^Exec=wireshark!Exec=/usr/bin/xdg-su -c /usr/bin/wireshark' wireshark.desktop +%endif %build %configure @@ -144,13 +146,13 @@ getent group wireshark >/dev/null || groupadd wireshark %endif %{_bindir}/rawshark %{_libdir}/lib*.so.* -%{_libdir}/wireshark -%{_datadir}/wireshark +%{_libdir}/wireshark/ +%{_datadir}/wireshark/ %files devel %defattr(-,root,root) %doc doc/README.* -%{_includedir}/wireshark +%{_includedir}/wireshark/ %{_libdir}/*.so %{_bindir}/idl2wrs %{_mandir}/man1/idl2wrs*