Accepting request 605180 from home:AndreasStieger:branches:network:utilities
- Turn on ssh, maxminddb, c-ares, snappy, lz4, HTTP2 support - Use capabilities to be able to run capture as a non-root user bsc#957624 Needs a change to the permission package to become effective OBS-URL: https://build.opensuse.org/request/show/605180 OBS-URL: https://build.opensuse.org/package/show/network:utilities/wireshark?expand=0&rev=248
This commit is contained in:
parent
0fa001e1fb
commit
12921aa5af
@ -1,42 +0,0 @@
|
||||
---
|
||||
ui/gtk/main.c | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: wireshark-1.12.0/ui/gtk/main.c
|
||||
===================================================================
|
||||
--- wireshark-1.12.0.orig/ui/gtk/main.c 2014-08-04 23:46:11.000000000 +0100
|
||||
+++ wireshark-1.12.0/ui/gtk/main.c 2014-08-04 23:51:21.000000000 +0100
|
||||
@@ -1378,11 +1378,13 @@ main_colorize_changed(gboolean packet_li
|
||||
|
||||
static GtkWidget *close_dlg = NULL;
|
||||
|
||||
+/*
|
||||
static void
|
||||
priv_warning_dialog_cb(gpointer dialog, gint btn _U_, gpointer data _U_)
|
||||
{
|
||||
recent.privs_warn_if_elevated = !simple_dialog_check_get(dialog);
|
||||
}
|
||||
+*/
|
||||
|
||||
#ifdef _WIN32
|
||||
static void
|
||||
@@ -2074,9 +2076,10 @@ check_and_warn_user_startup(gchar *cf_na
|
||||
#endif
|
||||
{
|
||||
gchar *cur_user, *cur_group;
|
||||
- gpointer priv_warning_dialog;
|
||||
+// gpointer priv_warning_dialog;
|
||||
|
||||
/* Tell the user not to run as root. */
|
||||
+/*
|
||||
if (running_with_special_privs() && recent.privs_warn_if_elevated) {
|
||||
cur_user = get_cur_username();
|
||||
cur_group = get_cur_groupname();
|
||||
@@ -2091,6 +2094,7 @@ check_and_warn_user_startup(gchar *cf_na
|
||||
simple_dialog_check_set(priv_warning_dialog, "Don't show this message again.");
|
||||
simple_dialog_set_cb(priv_warning_dialog, priv_warning_dialog_cb, NULL);
|
||||
}
|
||||
+*/
|
||||
|
||||
#ifdef _WIN32
|
||||
/* Warn the user if npf.sys isn't loaded. */
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon May 7 20:43:35 UTC 2018 - astieger@suse.com
|
||||
|
||||
- Turn on ssh, maxminddb, c-ares, snappy, lz4, HTTP2 support
|
||||
- Use capabilities to be able to run capture as a non-root user.
|
||||
Users must be added to the wireshark group to capture. bsc#957624
|
||||
Drop wireshark-1.2.0-disable-warning-dialog.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 1 17:19:49 UTC 2018 - ecsos@opensuse.org
|
||||
|
||||
|
@ -21,19 +21,20 @@
|
||||
%define libwire libwireshark11
|
||||
%define libtap libwiretap8
|
||||
%define libcodecs libwscodecs0
|
||||
# disable caps
|
||||
%define use_caps 0
|
||||
# Enable new Qt gui on new releases and build old GTK2 gui on old releases
|
||||
%if 0%{?suse_version} > 1140
|
||||
%bcond_without gnutls
|
||||
%bcond_without qt
|
||||
%bcond_with gtk
|
||||
%bcond_without geoip
|
||||
%else
|
||||
%bcond_with gnutls
|
||||
%bcond_with qt
|
||||
%bcond_without gtk
|
||||
%bcond_with geoip
|
||||
%endif
|
||||
%if 0%{?suse_version} >= 1500
|
||||
%bcond_without lz4
|
||||
%else
|
||||
%bcond_with lz4
|
||||
%endif
|
||||
Name: wireshark
|
||||
Version: 2.6.0
|
||||
@ -45,16 +46,13 @@ Url: https://www.wireshark.org/
|
||||
Source: https://www.wireshark.org/download/src/%{name}-%{version}.tar.xz
|
||||
Source2: https://www.wireshark.org/download/SIGNATURES-%{version}.txt
|
||||
Source3: https://www.wireshark.org/download/gerald_at_wireshark_dot_org.gpg#/wireshark.keyring
|
||||
# PATCH-FIX-OPENSUSE wireshark-1.6.3-disable-warning-dialog.patch bnc#349782 prusnak@suse.cz -- don't show warning when running as root
|
||||
Patch1: wireshark-1.2.0-disable-warning-dialog.patch
|
||||
#
|
||||
Patch4: wireshark-1.10.0-enable_lua.patch
|
||||
# for patch7 wireshark-1.12.6-fix-QT-PIC-PIE.patch
|
||||
BuildRequires: bison
|
||||
BuildRequires: flex
|
||||
BuildRequires: glib2-devel
|
||||
BuildRequires: hicolor-icon-theme
|
||||
BuildRequires: krb5-devel
|
||||
BuildRequires: libcap-devel
|
||||
BuildRequires: libcares-devel
|
||||
BuildRequires: libgcrypt-devel >= 1.4.2
|
||||
BuildRequires: libpcap-devel
|
||||
@ -65,27 +63,29 @@ BuildRequires: openssl-devel
|
||||
BuildRequires: pcre-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: portaudio-devel
|
||||
BuildRequires: snappy-devel
|
||||
BuildRequires: tcpd-devel
|
||||
BuildRequires: update-desktop-files
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: pkgconfig(libmaxminddb)
|
||||
BuildRequires: pkgconfig(libnghttp2)
|
||||
BuildRequires: pkgconfig(libssh) >= 0.6.0
|
||||
BuildRequires: pkgconfig(libxml-2.0)
|
||||
Requires: hicolor-icon-theme
|
||||
Requires(pre): permissions
|
||||
Requires(pre): shadow
|
||||
Recommends: wireshark-ui = %{version}
|
||||
Provides: ethereal = %{version}
|
||||
Obsoletes: ethereal < %{version}
|
||||
Provides: group(wireshark)
|
||||
%if %{with lz4}
|
||||
BuildRequires: pkgconfig(liblz4)
|
||||
# in openSUSE Leap 42.3, lz4 was incorrectly packaged
|
||||
BuildConflicts: pkgconfig(liblz4) = 124
|
||||
%endif
|
||||
%if %{with gnutls}
|
||||
BuildRequires: libgnutls-devel >= 2.12.0
|
||||
%endif
|
||||
%if !0%{use_caps}
|
||||
Requires: xdg-utils
|
||||
%else
|
||||
BuildRequires: libcap-devel
|
||||
Requires(pre): permissions
|
||||
%endif
|
||||
%if %{with geoip}
|
||||
BuildRequires: GeoIP-devel
|
||||
Recommends: GeoIP
|
||||
%endif
|
||||
%if 0%{?suse_version} > 1310
|
||||
BuildRequires: pkgconfig(libnl-3.0)
|
||||
%endif
|
||||
@ -106,9 +106,6 @@ BuildRequires: lua51-devel
|
||||
%else
|
||||
BuildRequires: lua-devel
|
||||
%endif
|
||||
%if 0%{?suse_version} <= 1110
|
||||
BuildRequires: xz
|
||||
%endif
|
||||
|
||||
%description
|
||||
Wireshark is a network protocol analyzer. It allows examining data
|
||||
@ -196,20 +193,7 @@ echo "`grep %{name}-%{version}.tar.xz %{SOURCE2} | grep SHA1 | head -n1 | cut -d
|
||||
echo "`grep %{name}-%{version}.tar.xz %{SOURCE2} | grep SHA256 | head -n1 | cut -d= -f2` %{SOURCE0}" | sha256sum -c
|
||||
|
||||
%setup -q
|
||||
###%%patch2 -p1
|
||||
%patch4 -p1
|
||||
|
||||
%if ! %{use_caps}
|
||||
%patch1 -p1
|
||||
# open capture files without root privileges bsc#1025714
|
||||
for X in wireshark{,-gtk}.desktop; do
|
||||
cp -pv $X ${X/wireshark/wireshark-file}
|
||||
echo "NoDisplay=true" >> ${X/wireshark/wireshark-file}
|
||||
done
|
||||
sed -i '/^MimeType.*/d' wireshark{,-gtk}.desktop
|
||||
# run as root if not using caps
|
||||
sed -i 's!^Exec=wireshark!Exec=%{_bindir}/xdg-su -c %{_bindir}/wireshark!' wireshark{,-gtk}.desktop
|
||||
%endif
|
||||
sed -i 's/^Icon=wireshark.png$/Icon=wireshark/' wireshark*.desktop
|
||||
|
||||
%build
|
||||
@ -231,13 +215,21 @@ export PATH="%{_libdir}/qt5/bin:$PATH"
|
||||
%else
|
||||
--with-qt=no \
|
||||
%endif
|
||||
--with-ssl \
|
||||
%if %{with gnutls}
|
||||
--with-gnutls=yes \
|
||||
%else
|
||||
--with-gnutls=no \
|
||||
%endif
|
||||
--with-plugins=%{_libdir}/%{name}/plugins/%{version} \
|
||||
--with-libssh=yes \
|
||||
--with-maxminddb=yes \
|
||||
--with-krb5=yes \
|
||||
--with-c-ares=yes \
|
||||
--with-snappy=yes \
|
||||
%if %{with lz4}
|
||||
--with-lz4=yes \
|
||||
%endif
|
||||
--with-zlib=yes \
|
||||
--with-nghttp2=yes \
|
||||
--with-pic=yes
|
||||
|
||||
make %{?_smp_mflags} V=1
|
||||
@ -293,10 +285,6 @@ install -m 644 wsutil/*.h "${IDIR}/wsutil"
|
||||
install -D -m 0644 image/wsicon48.png %{buildroot}%{_datadir}/pixmaps/wireshark-gtk.png
|
||||
install -D -m 0644 wireshark-gtk.desktop %{buildroot}%{_datadir}/applications/wireshark-gtk.desktop
|
||||
%suse_update_desktop_file -n %{name}-gtk
|
||||
%if ! %{use_caps}
|
||||
install -D -m 0644 wireshark-file-gtk.desktop %{buildroot}%{_datadir}/applications/wireshark-file-gtk.desktop
|
||||
%suse_update_desktop_file -n %{name}-file-gtk
|
||||
%endif
|
||||
%else
|
||||
# sometimes the gtk.desktop gets autoinstalled by make_install
|
||||
rm -f %{buildroot}%{_datadir}/applications/wireshark-gtk.desktop
|
||||
@ -306,30 +294,18 @@ rm -f %{buildroot}%{_datadir}/applications/wireshark-gtk.desktop
|
||||
install -D -m 0644 image/wsicon48.png %{buildroot}%{_datadir}/pixmaps/wireshark.png
|
||||
install -D -m 0644 wireshark.desktop %{buildroot}%{_datadir}/applications/wireshark.desktop
|
||||
%suse_update_desktop_file %{name}
|
||||
%if ! %{use_caps}
|
||||
install -D -m 0644 wireshark-file.desktop %{buildroot}%{_datadir}/applications/wireshark-file.desktop
|
||||
%suse_update_desktop_file %{name}-file
|
||||
%endif
|
||||
%else
|
||||
rm -f %{buildroot}%{_datadir}/applications/wireshark.desktop
|
||||
%endif
|
||||
|
||||
%if %{use_caps}
|
||||
%pre
|
||||
getent group wireshark >/dev/null || groupadd -r wireshark
|
||||
|
||||
%verifyscript
|
||||
%{verify_permissions -e %{_bindir}/dumpcap}
|
||||
%endif
|
||||
%verify_permissions -e %{_bindir}/dumpcap
|
||||
|
||||
%post
|
||||
%if %{use_caps}
|
||||
%if 0%{?set_permissions:1} > 0
|
||||
%set_permissions %{_bindir}/dumpcap
|
||||
%else
|
||||
%run_permissions
|
||||
%endif
|
||||
%endif # use_caps
|
||||
exit 0
|
||||
|
||||
%post -n %{libutil} -p /sbin/ldconfig
|
||||
@ -351,6 +327,7 @@ exit 0
|
||||
%{_bindir}/editcap
|
||||
%{_bindir}/idl2wrs
|
||||
%{_bindir}/mergecap
|
||||
%{_bindir}/mmdbresolve
|
||||
%{_bindir}/randpkt
|
||||
%{_bindir}/rawshark
|
||||
%{_bindir}/reordercap
|
||||
@ -358,11 +335,7 @@ exit 0
|
||||
%{_bindir}/tethereal
|
||||
%{_bindir}/text2pcap
|
||||
%{_bindir}/tshark
|
||||
%if %{use_caps}
|
||||
%verify(not mode caps) %attr(0750,root,wireshark) %caps(cap_net_raw,cap_net_admin=eip) %{_bindir}/dumpcap
|
||||
%else
|
||||
%{_bindir}/dumpcap
|
||||
%endif
|
||||
%verify(not mode caps) %attr(0750,root,wireshark) %caps(cap_net_raw,cap_net_admin=ep) %{_bindir}/dumpcap
|
||||
%{_libdir}/wireshark/
|
||||
%{_datadir}/wireshark/
|
||||
%{_datadir}/icons/hicolor/*/apps/wireshark.png
|
||||
@ -383,7 +356,6 @@ exit 0
|
||||
%{_libdir}/libwscodecs.so.*
|
||||
|
||||
%files devel
|
||||
%doc doc/README.*
|
||||
%{_includedir}/wireshark
|
||||
%{_libdir}/lib*.so
|
||||
%{_libdir}/pkgconfig/wireshark.pc
|
||||
@ -393,9 +365,6 @@ exit 0
|
||||
%{_bindir}/wireshark-gtk
|
||||
%{_bindir}/ethereal
|
||||
%{_datadir}/applications/wireshark-gtk.desktop
|
||||
%if ! %{use_caps}
|
||||
%{_datadir}/applications/wireshark-file-gtk.desktop
|
||||
%endif
|
||||
%{_datadir}/pixmaps/wireshark-gtk.png
|
||||
|
||||
%post ui-gtk
|
||||
@ -418,9 +387,6 @@ test -f /sbin/conf.d/SuSEconfig.glib2 && SuSEconfig --module glib2 > /dev/null |
|
||||
%dir %{_datadir}/appdata
|
||||
%{_datadir}/appdata/wireshark.appdata.xml
|
||||
%{_datadir}/applications/wireshark.desktop
|
||||
%if ! %{use_caps}
|
||||
%{_datadir}/applications/wireshark-file.desktop
|
||||
%endif
|
||||
%{_datadir}/pixmaps/wireshark.png
|
||||
|
||||
%post ui-qt
|
||||
|
Loading…
Reference in New Issue
Block a user