@ -1,33 +1,32 @@
# Disable automatic compilation of Python files in extra directories
%global _python_bytecompile_extra 0
Summary: Helps troubleshoot SELinux problems
Name: setroubleshoot
Version: 3.3.3 2
Release: 1 %{?dist}
License: GPL-2.0-or-later
URL: https://gitlab.com/setroubleshoot/setroubleshoot
Source0: https://gitlab.com/setroubleshoot/setroubleshoot/-/archive/%{version}/setroubleshoot -%{version}.tar.gz
Version: 3.3.26
Release: 5 %{?dist}
License: GPLv2+
URL: https://gitlab.com/setroubleshoot/framework
Source0: https://releases.pagure.org/setroubleshoot/%{name} -%{version}.tar.gz
Source1: %{name}.tmpfiles
Source2: %{name}.sysusers
# git format-patch -N 3.3.32
# git format-patch --src-prefix=a/framework/ --dst-prefix=b/framework/ -N setroubleshoot-3.3.26 -- . ':!doc/developers_guide.wiki' ':!test/README.testing'
# i=1; for j in 00*patch; do printf "Patch%04d: %s\n" $i $j; i=$((i+1));done
Patch0001: 0001-imp-module-is-deprecated-in-favor-of-importlib.patch
Patch0002: 0002-Always-reset-pending-alarms-when-alarm-0.patch
Patch0003: 0003-gitlab-ci-use-apt-get-to-install-python3-dbus-packag.patch
Patch0001: 0001-Stop-SetroubleshootFixit-after-10-seconds-of-inactiv.patch
Patch0002: 0002-Do-not-use-Python-slip-package.patch
Patch0003: 0003-Fix-typos-in-help-man-pages-and-developer-s-guide.patch
Patch0004: 0004-Revert-Replace-pydbus-with-dasbus.patch
Patch0005: 0005-Improve-after_first-email-filter-behavior.patch
Patch0006: 0006-Update-translations.patch
Patch0007: 0007-Decrease-setroubleshootd-priority-and-limit-RAM-util.patch
Patch0008: 0008-doc-Document-performance-related-changes.patch
Patch0009: 0009-setroubleshoot-server-shutdown-RunFaultServer-nicely.patch
BuildRequires: gcc
BuildRequires: make
BuildRequires: libcap-ng-devel
BuildRequires: intltool gettext python3 python3-devel python3-setuptools python3-wheel python3-pip
BuildRequires: desktop-file-utils libnotify-devel libselinux-devel polkit-devel
BuildRequires: audit-libs-devel >= 3.0.1
BuildRequires: python3-libselinux python3-dasbus python3-gobject gtk3-devel
# for the _tmpfilesdir macro
BuildRequires: systemd-rpm-macros
BuildRequires: intltool gettext python3 python3-devel
BuildRequires: desktop-file-utils dbus-glib-devel gtk2-devel libnotify-devel audit-libs-devel libselinux-devel polkit-devel
BuildRequires: python3-libselinux python3-pydbus python3-gobject gtk3-devel
Requires: %{name}-server = %{version}-%{release}
Requires: gtk3, libnotify
Requires: libreport-gtk >= 2.2.1-2, python3-libreport
Requires: python3-gobject, python3-das bus
Requires: python3-gobject, python3-py dbus
Requires(post): desktop-file-utils
Requires(post): dbus
Requires(postun): desktop-file-utils
@ -43,6 +42,7 @@ Requires: xdg-utils
%global pkgvardatadir %{_localstatedir}/lib/%{name}
%global pkgconfigdir %{_sysconfdir}/%{name}
%global pkgdatabase %{pkgvardatadir}/setroubleshoot_database.xml
%global username setroubleshoot
%description
setroubleshoot GUI. Application that allows you to view setroubleshoot-server
@ -56,8 +56,8 @@ to user preference. The same tools can be run on existing log files.
%{pkgguidir}
%config(noreplace) %{_sysconfdir}/xdg/autostart/*
%{_datadir}/applications/*.desktop
%{_metainfodir} /*.appdata.xml
%{_datadir}/dbus-1/services/org.fedoraproject. sealert.service
%{_datadir}/appdata /*.appdata.xml
%{_datadir}/dbus-1/services/sealert.service
%{_datadir}/icons/hicolor/*/*/*
%dir %attr(0755,root,root) %{pkgpythondir}
%{pkgpythondir}/browser.py
@ -68,15 +68,16 @@ to user preference. The same tools can be run on existing log files.
%prep
%autosetup -p 1
%autosetup -p 2
%build
./autogen.sh
autoreconf -f
%configure PYTHON=%{__python3} --enable-seappletlegacy=no --with-auditpluginsdir=/etc/audit/plugins.d
make
%install
%make_install PREFIX=/usr
make DESTDIR=%{buildroot} PREFIX=/usr install
touch -r src/config.py.in %{buildroot}%{python3_sitelib}/setroubleshoot/config.py
desktop-file-install --vendor="" --dir=%{buildroot}%{_datadir}/applications %{buildroot}/%{_datadir}/applications/%{name}.desktop
mkdir -p %{buildroot}%{pkgvardatadir}
mkdir -p %{buildroot}%{_rundir}/setroubleshoot
@ -84,9 +85,17 @@ touch %{buildroot}%{pkgdatabase}
touch %{buildroot}%{pkgvardatadir}/email_alert_recipients
rm -rf %{buildroot}/usr/share/doc/
# create /run/setroubleshoot on boot
install -p -m644 -D %{SOURCE1} $RPM_BUILD_ROOT%{_tmpfilesdir}/%{name}.conf
install -p -m644 -D %{SOURCE2} $RPM_BUILD_ROOT%{_sysusersdir}/%{name}.conf
install -m644 -D %{SOURCE1} $RPM_BUILD_ROOT%{_tmpfilesdir}/%{name}.conf
# Switch hardcoded python3 shebangs into the %%{__python3} macro
pathfix.py -i "%{__python3} -Es" -p \
%{buildroot}%{_sbindir}/setroubleshootd \
%{buildroot}%{_bindir}/{sealert,seapplet} \
%{buildroot}/usr/share/setroubleshoot/SetroubleshootFixit.py
rm \
%{buildroot}%{_sbindir}/setroubleshootd~ \
%{buildroot}%{_bindir}/{sealert,seapplet}~ \
%{buildroot}/usr/share/setroubleshoot/SetroubleshootFixit.py~
%find_lang %{name}
@ -94,7 +103,7 @@ install -p -m644 -D %{SOURCE2} $RPM_BUILD_ROOT%{_sysusersdir}/%{name}.conf
Summary: SELinux troubleshoot server
Requires: %{name}-plugins >= 3.3.10
Requires: audit >= 3.0.1
Requires: audit >= 3
Requires: audit-libs-python3
Requires: libxml2-python3
Requires: rpm-python3
@ -102,12 +111,14 @@ Requires: libselinux-python3 >= 2.1.5-1
Requires: policycoreutils-python-utils
BuildRequires: intltool gettext python3
BuildRequires: python3-devel
BuildRequires: systemd
Requires: systemd-python3 >= 206-1
Requires: python3-gobject-base >= 3.11
Requires: python3-gobject >= 3.11
Requires: dbus
Requires: python3-dbus python3-das bus python3-six
Requires: python3-dbus python3-py dbus
Requires: polkit
Requires: initscripts-service
Requires: initscripts
Requires(pre): /usr/sbin/useradd /usr/sbin/groupadd
%description server
Provides tools to help diagnose SELinux problems. When AVC messages
@ -116,7 +127,7 @@ about the problem and help track its resolution. Alerts can be configured
to user preference. The same tools can be run on existing log files.
%pre server
%sysusers_create_compat %{SOURCE2 }
getent passwd %{username} >/dev/null || useradd -r -U -s /sbin/nologin -d %{pkgvardatadir} %{username }
%post server
/sbin/service auditd reload >/dev/null 2>&1 || :
@ -124,14 +135,16 @@ to user preference. The same tools can be run on existing log files.
%postun server
/sbin/service auditd reload >/dev/null 2>&1 || :
%triggerun server -- %{name}-server < 3.2.24-4
chown -R setroubleshoot:setroubleshoot %{pkgvardatadir}
%files server -f %{name}.lang
%{_bindir}/sealert
%{_sbindir}/sedispatch
%{_sbindir}/setroubleshootd
%{python3_sitelib}/setroubleshoot*.dist -info
%{python3_sitelib}/setroubleshoot*.egg -info
%dir %attr(0755,root,root) %{pkgconfigdir}
%dir %{pkgpythondir}
%dir %{pkgpythondir}/__pycache__
%dir %attr(0755,root,root) %{pkgpythondir}
%{pkgpythondir}/Plugin.py
%{pkgpythondir}/__init__.py
%{pkgpythondir}/access_control.py
@ -150,6 +163,8 @@ to user preference. The same tools can be run on existing log files.
%{pkgpythondir}/util.py
%{pkgpythondir}/uuid.py
%{pkgpythondir}/xml_serialize.py
%dir %{pkgpythondir}
%dir %{pkgpythondir}/__pycache__
%{pkgpythondir}/__pycache__/Plugin.cpython*
%{pkgpythondir}/__pycache__/__init__.cpython*
%{pkgpythondir}/__pycache__/access_control.cpython*
@ -182,149 +197,76 @@ to user preference. The same tools can be run on existing log files.
%{_mandir}/man8/sedispatch.8.gz
%{_mandir}/man8/setroubleshootd.8.gz
%config /etc/audit/plugins.d/sedispatch.conf
%{_unitdir}/setroubleshootd.service
%{_datadir}/dbus-1/system-services/org.fedoraproject.Setroubleshootd.service
%{_datadir}/dbus-1/system-services/org.fedoraproject.SetroubleshootPrivileged.service
%{_datadir}/polkit-1/actions/org.fedoraproject.setroubleshootfixit.policy
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.fedoraproject.SetroubleshootFixit.conf
%{_datadir}/dbus-1/system-services/org.fedoraproject.SetroubleshootFixit.service
%{_unitdir}/setroubleshootd.service
%attr(0644,root,root) %{_tmpfilesdir}/%{name}.conf
%attr(0644,root,root) %{_sysusersdir}/%{name}.conf
%attr(0711,setroubleshoot,setroubleshoot) %dir %{_rundir}/setroubleshoot
%doc AUTHORS COPYING ChangeLog DBUS.md NEWS README TODO
%changelog
* Thu Jul 27 2023 Petr Lautrbach <lautrbach@redhat.com> - 3.3.32-1
- Always reset pending alarms when alarm(0) (rhbz#2112573)
- 'imp' module is deprecated in favor of 'importlib' (rhbz#2224393)
- Fix build with pip 23.1.2+
- Remove dbus-glib-devel BR as it's only needed when compiled with seappletlegacy
- Rename session bus name to org.fedoraproject.sealert
- seapplet: wrap SEApplet() to try except
- util.py: Add doctext test for build_module_type_cache()
- Update translations
* Thu Mar 09 2023 Vit Mojzis <vmojzis@redhat.com> - 3.3.31-2
- Update translations (#2139682)
* Mon Aug 22 2022 Vit Mojzis <vmojzis@redhat.com> - 3.3.26-5
- Shutdown RunFaultServer nicely (#2119001)
* Wed Nov 23 2022 Petr Lautrbach <lautrbach@redhat.com> - 3.3.31-1
- Add a screen reader label to the icon
- seapplet: avoid ValueError when parsing sealert.conf
* Wed Jul 13 2022 Vit Mojzis <vmojzis@redhat.com> - 3.3.26-4
- Decrease setroubleshootd priority and limit RAM utilization to 1GB (#2064727)
- doc: Document performance related changes
- Decrease setroubleshootd priority and limit RAM utilization to 1GB
- Use setup from setuptools
- Use `pip install` instead of `setup.py install`
* Tue Jun 28 2022 Petr Lautrbach <plautrba@redhat.com> - 3.3.30-1
- Miscellaneous python and build system changes
- Fix couple of typos
- Drop Python2 support
- Use inspect.signature() instead of instead.getargspec()
- Update translations
* Wed Mar 30 2022 Petr Lautrbach <plautrba@redhat.com> - 3.3.29-1
- Introduce email.use_sendmail option
- Update translations
* Wed Mar 09 2022 Vit Mojzis <vmojzis@redhat.com> - 3.3.28-3
- Update translations (#2017386)
* Tue Feb 8 2022 Petr Lautrbach <plautrba@redhat.com> - 3.3.28-2
- Use %sysusers_create_compat instead of useradd
- Set right ownership on /var/lib/setroubleshoot
* Tue Feb 8 2022 Petr Lautrbach <plautrba@redhat.com> - 3.3.28-1
- Look for modules in /usr/share/selinux/packages
- Always use rpm source package for reporting
- Improve after_first email filter behavior
* Wed Jan 19 2022 Petr Lautrbach <plautrba@redhat.com> - 3.3.27-2
- Improve DSP module reporting
- Require initscripts-service - /sbin/service
* Thu Jan 13 2022 Petr Lautrbach <plautrba@redhat.com> - 3.3.27-1
- sedispatch: check read_size
- SafeConfigParser is deprecated and will be dropped
- Fix typos in --help, man pages and developer's guide
- Improve Python 3.10 compatibility
https://pagure.io/setroubleshoot/issue/58
- Update translations
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 3.3.26-5
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Jul 16 2021 Petr Lautrbach <plautrba@redhat.com> - 3.3.26-4
- Improve sedispatch performance
* Fri Jul 2 2021 Petr Lautrbach <plautrba @redhat.com> - 3.3.26-3
- Fix file mode of email_alert_recipients
* Fri Feb 25 2022 Vit Mojzis <vmojzis@redhat.com> - 3.3.26-3
- Update translations (#2017299)
* Fri Apr 16 2021 Mohan Boddu <mboddu @redhat.com> - 3.3.26-2
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Fri Feb 11 2022 Vit Mojzis <vmojzis@redhat.com> - 3.3.26-2
- Improve after_first email filter behavior (#2050734)
* Thu Apr 15 2021 Petr Lautrbach <plautrba@redhat.com> - 3.3.26-1
- Fix plugin exception reporting
- Update translations
- Stop SetroubleshootFixit after 10 seconds of inactivity
* Fri Dec 10 2021 Vit Mojzis <vmojzis@redhat.com> - 3.3.26-1
- Revert "Replace pydbus with dasbus"
- Fix typos in --help, man pages and developer's guide (#2028226)
- Do not use Python slip package
- Stop SetroubleshootFixit after 10 seconds of inactivity
- Fix plugin exception reporting
- export alert dbus signal
- Make sure local_policy_package is not None
- sealert: add "Last Seen" column to alert list
* Wed Mar 10 2021 Petr Lautrbach <plautrba@redhat.com> - 3.3.25-1
- Use Python dasbus instead of pydbus
- Optimize get_rpm_nvr_by_type by adding a cache
- Update translations
* Tue Feb 02 2021 Vit Mojzis <vmojzis@redhat.com> - 3.3.24-4
- sealert: exit on any connection close
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.24-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Sat Jan 16 2021 Vit Mojzis <vmojzis@redhat.com> - 3.3.24-2
- framework/util: optimize get_rpm_nvr_by_type by adding a cache
- Stop building seappletlegacy
* Tue Oct 13 2020 Petr Lautrbach <plautrba@redhat.com> - 3.3.24-1
- Add 'fur' into shipped locales
- Update translations
- Log full reports with correct syslog identifier
- Cancel pending alarm during AVC analyses
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.23-5
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Sep 27 2021 Vit Mojzis <vmojzis@redhat.com> - 3.3.24-4
- Update translations (#1962030)
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.23-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Feb 02 2021 Vit Mojzis <vmojzis@redhat.com> - 3.3.24-3
- sealert: exit on any connection close (#1875290)
* Tue Jul 14 2020 Tom Stellard <tstellar@redhat.com> - 3.3.23-3
- Use make macros
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
* Wed Jan 13 2021 Vit Mojzis <vmojzis@redhat.com> - 3.3.24-2
- Optimize get_rpm_nvr_by_type by adding a cache (#1794807)
- Stop building seappletlegacy (#1878792)
- Update translations
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 3.3.23-2
- Rebuilt for Python 3.9
* Wed Aug 12 2020 Vit Mojzis <vmojzis@redhat.com> - 3.3.24-1
- Add 'fur' into shipped locales
- Update translations (#1820570)
- Log full reports with correct syslog identifier
- Cancel pending alarm during AVC analyses
* Tue Apr 21 2020 Vit Mojzis <vmojzis@redhat.com> - 3.3.23-1
- browser: Check return value of Gdk.Screen().get_default()
- Improve and unify error messages
* Mon Apr 27 2020 Vit Mojzis <vmojzis@redhat.com> - 3.3.23-1
- browser: Check return value of Gdk.Screen().get_default() (#1574434)
- Improve and unify error messages (#1763982)
- setroubleshoot.util: Catch exceptions from sepolicy import
- Add dpkg support
- Do not refer to hardcoded selinux-policy rpm in signature
- Make date/time format locale specific
- Improve speed of plugin evaluation
* Wed Mar 4 2020 Petr Lautrbach <plautrba@redhat.com> - 3.3.22-6
- Do not try to report a bug on None package (#1809801)
* Fri Feb 28 2020 Petr Lautrbach <plautrba@redhat.com> - 3.3.22-5
- Make date/time format locale specific (#1812674)
- Improve speed of plugin evaluation (#1794807)
- Do not try to report a bug on None package
- sealert: Drop unused import slib.dbus.service
- Drop updater.py - it's not used and doesn't work
- root user doesn't need to use SetroubleshootPrivileged API
* Thu Feb 27 2020 Petr Lautrbach <plautrba@redhat.com> - 3.3.22-4
- sealert to report a bug on a package which owns the related SELinux domain
- Use pydbus, a modern Python dbus API, for SetroubleshootPrivileged
- Report bug on a package which owns the related SELinux domain (#1811644)
https://pagure.io/setroubleshoot/issue/18
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.22-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
- Add Local SELinux policy package version to analyses reports
- setroubleshoot.utils.get_rpm_nvr_by_scontext add option to use DBUS method
- Export setroubleshoot.utils.get_rpm_nvr_by_scontext via DBUS
- setroubleshoot.util: get_rpm_nvr_by_type() and get_rpm_nvr_by_scontext()
* Sat Jan 11 2020 Petr Lautrbach <plautrba@redhat.com> - 3.3.22-2
- Log plugin exception traceback when log level is DEBUG
@ -334,33 +276,30 @@ to user preference. The same tools can be run on existing log files.
- sepolicy.info() returns a generator, not a list (#1784564)
* Wed Dec 11 2019 Vit Mojzis <vmojzis@redhat.com> - 3.3.21-1
- Use dbus.mainloop.glib.DBusGMainLoop() instead of dbus.glib
- Fix AVC.__typeMatch to handle aliases properly
- Handle sockets with abstract path properly (#1775135)
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 3.3.20-4
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Tue Aug 27 2019 Petr Lautrbach <plautrba@redhat.com> - 3.3.20-3
- Use dbus.mainloop.glib.DBusGMainLoop() instead of dbus.glib
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 3.3.20-2
- Rebuilt for Python 3.8
* Fri Aug 16 2019 Vit Mojzis <vmojzis@redhat.com> - 3.3.20-2
- Fix file mode of email_alert_recipients (#1741960)
* Wed Jul 17 2019 Vit Mojzis <vmojzis@redhat.com> - 3.3.20-1
- Add man page for seapplet (#1612529)
* Tue May 14 2019 Vit Mojzis <vmojzis@redhat.com> - 3.3.19-2
- Update "missing" scripts to automake-1.15
- Add active polling for acquiring policy file
- Fix translation of hex values in AVCs
- Fix translation of hex values in AVCs (#1477236, #1709742)
- require initscripts to ensure that "service" call works properly
- Add man page for seapplet
- setroubleshoot-server: only require gobject-base
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.19-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Sat Dec 8 2018 Petr Lautrbach <plautrba@redhat.com> - 3.3.19-1
- Require plugins >= 3.3.10
* Thu Nov 29 2018 Petr Lautrbach <plautrba@redhat.com> - 3.3.18-3
* Wed Dec 5 2018 Petr Lautrbach <plautrba@redhat.com> - 3.3.18-4
- Update translations
- Catch exceptions caused by lookup_signature
* Sat Dec 1 2018 Petr Lautrbach <plautrba@redhat.com> - 3.3.18-3.1
- Update scriptlets to reload auditd after install or uninstall
* Thu Sep 20 2018 Petr Lautrbach <plautrba@redhat.com> - 3.3.18-2
@ -371,11 +310,8 @@ to user preference. The same tools can be run on existing log files.
- Move sedispatch.conf to /etc/audit/plugins.d/
- Fix summary and "if" text for AVCs with unknown target path
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.17-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 3.3.17-2
- Rebuilt for Python 3.7
* Tue Jul 03 2018 Tomas Orsava <torsava@redhat.com> - 3.3.17-2
- Switch hardcoded python3 shebangs into the %%{__python3} macro
* Mon Feb 26 2018 Petr Lautrbach <plautrba@redhat.com> - 3.3.17-1
- Set auto_save_interval to 5 (#1548913,#1523406,#1539180)
@ -2048,4 +1984,3 @@ it has already been seen
* Fri May 19 2006 John Dennis <jdennis@redhat.com> - 0.1-1
- Initial build.