#6 Use systemd sysusers config to greate groups
Merged 2 years ago by mruprich. Opened 2 years ago by siosm.
rpms/ siosm/wireshark sysusers  into  rawhide

file modified
+9 -3
@@ -8,7 +8,7 @@ 

  Summary:	Network traffic analyzer

  Name:		wireshark

  Version:	3.4.8

- Release:	1%{?dist}

+ Release:	2%{?dist}

  Epoch:		1

  License:	GPL+

  Url:		http://www.wireshark.org/
@@ -16,6 +16,7 @@ 

  Source0:	https://wireshark.org/download/src/%{name}-%{version}.tar.xz

  Source1:        https://www.wireshark.org/download/src/all-versions/SIGNATURES-%{version}.txt

  Source2:	90-wireshark-usbmon.rules

+ Source3:	wireshark.sysusers

  

  # Fedora-specific

  Patch2:		wireshark-0002-Customize-permission-denied-error.patch
@@ -82,6 +83,7 @@ 

  #needed for sdjournal external capture interface

  BuildRequires: systemd-devel

  BuildRequires: libnghttp2-devel

+ BuildRequires: systemd-rpm-macros

  

  Obsoletes: wireshark-qt, wireshark-gtk

  
@@ -173,6 +175,7 @@ 

  install -m 644 wsutil/*.h		"${IDIR}/wsutil"

  install -m 644 ws_diag_control.h	"${IDIR}/"

  install -m 644 %{SOURCE2}		%{buildroot}%{_udevrulesdir}

+ install -Dpm 644 %{SOURCE3}		%{buildroot}%{_sysusersdir}/%{name}.conf

  

  touch %{buildroot}%{_bindir}/%{name}

  
@@ -180,8 +183,7 @@ 

  find %{buildroot} -type f -name "*.la" -delete

  

  %pre cli

- getent group wireshark >/dev/null || groupadd -r wireshark

- getent group usbmon >/dev/null || groupadd -r usbmon

+ %sysusers_create_compat %{SOURCE3}

  

  %post cli

  %{?ldconfig}
@@ -201,6 +203,7 @@ 

  %{_datadir}/mime/packages/wireshark.xml

  %{_bindir}/wireshark

  %{_mandir}/man1/wireshark.*

+ %{_sysusersdir}/%{name}.conf

  

  %files cli

  %license COPYING
@@ -274,6 +277,9 @@ 

  %{_libdir}/pkgconfig/%{name}.pc

  

  %changelog

+ * Mon Sep 06 2021 Timothée Ravier <tim@siosm.fr> - 1:3.4.8-2

+ - Use system sysusers config to create groups

+ 

  * Tue Aug 31 2021 Michal Ruprich <mruprich@redhat.com> - 1:3.4.8-1

  - New version 3.4.8

  

file added
+2
@@ -0,0 +1,2 @@ 

+ g wireshark - -

+ g usbmon    - -

rebased onto 5fc0d29a76edf807de1ff7c662ec28da0047a5b4

2 years ago

rebased onto f62c1fcdee5e84ad12df0f81f93bff77bd230bdd

2 years ago

rebased onto 5759920

2 years ago

Yup, waiting here. Can help with testing.
I imagine that this change might also allow us to add users to the wireshark group (to use it without root/newgrp) on silverblue.

Sorry, missed the PR, taking a look.

Pull-Request has been merged by mruprich

2 years ago

Sorry again that I missed the PR, it is merged now, tested on regular Fedora, looks good. @siosm or @jmennius can you please confirm that this helped with the issue on Silverblue?

Metadata