From 1daa721b18ca3fc56b7f3ef6ee6be11bef1c269d Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Tue, 28 Jun 2022 11:23:28 +0200 Subject: [PATCH 1/6] setroubleshoot-3.3.30 - Miscellaneous python and build system changes - Fix couple of typos - Drop Python2 support - Use inspect.signature() instead of instead.getargspec() - Update translations --- .gitignore | 1 + setroubleshoot.spec | 13 ++++++++++--- sources | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index ba9e517..f7886c0 100644 --- a/.gitignore +++ b/.gitignore @@ -214,3 +214,4 @@ setroubleshoot-2.2.93.tar.gz /framework-3.3.27.tar.gz /setroubleshoot-3.3.28.tar.gz /setroubleshoot-3.3.29.tar.gz +/setroubleshoot-3.3.30.tar.gz diff --git a/setroubleshoot.spec b/setroubleshoot.spec index a2ac152..d787129 100644 --- a/setroubleshoot.spec +++ b/setroubleshoot.spec @@ -3,14 +3,14 @@ Summary: Helps troubleshoot SELinux problems Name: setroubleshoot -Version: 3.3.29 +Version: 3.3.30 Release: 1%{?dist} License: GPLv2+ URL: https://gitlab.com/setroubleshoot/setroubleshoot Source0: https://gitlab.com/setroubleshoot/setroubleshoot/-/archive/%{version}/setroubleshoot-%{version}.tar.gz Source1: %{name}.tmpfiles Source2: %{name}.sysusers -# git format-patch -N 3.3.29 +# git format-patch -N 3.3.30 # i=1; for j in 00*patch; do printf "Patch%04d: %s\n" $i $j; i=$((i+1));done BuildRequires: gcc BuildRequires: make @@ -53,7 +53,7 @@ to user preference. The same tools can be run on existing log files. %{pkgguidir} %config(noreplace) %{_sysconfdir}/xdg/autostart/* %{_datadir}/applications/*.desktop -%{_datadir}/appdata/*.appdata.xml +%{_metainfodir}/*.appdata.xml %{_datadir}/dbus-1/services/sealert.service %{_datadir}/icons/hicolor/*/*/* %dir %attr(0755,root,root) %{pkgpythondir} @@ -190,6 +190,13 @@ to user preference. The same tools can be run on existing log files. %doc AUTHORS COPYING ChangeLog DBUS.md NEWS README TODO %changelog +* Tue Jun 28 2022 Petr Lautrbach - 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 - 3.3.29-1 - Introduce email.use_sendmail option - Update translations diff --git a/sources b/sources index 4c7fe3d..66a80cd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (setroubleshoot-3.3.29.tar.gz) = dc3289b0064192d1fcbea6b2049b746b5515f91c5ed3355ff18918bf7ce78a280c6a533b609a3eab153f557acb393e2ee9a401a992fce7894168c1c9f0d85450 +SHA512 (setroubleshoot-3.3.30.tar.gz) = 49955fdba875b2c1b6e338cf37bb0805cb33a515d45aac66a89885b32d8caa67f7fbd6ac0e6de7b1beb6b144c48b466e45913c7e58c7e794339842dc97c12464 From 533e7fa485a39858c7316481988d8c6fba7ee824 Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Mon, 31 Oct 2022 11:59:36 +0100 Subject: [PATCH 2/6] Drop gtk2-devel BR It's not necessary anymore --- setroubleshoot.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setroubleshoot.spec b/setroubleshoot.spec index d787129..f3bc3ee 100644 --- a/setroubleshoot.spec +++ b/setroubleshoot.spec @@ -16,7 +16,7 @@ BuildRequires: gcc BuildRequires: make BuildRequires: libcap-ng-devel BuildRequires: intltool gettext python3 python3-devel -BuildRequires: desktop-file-utils dbus-glib-devel gtk2-devel libnotify-devel libselinux-devel polkit-devel +BuildRequires: desktop-file-utils dbus-glib-devel 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 From 5c577d9903a4b1f3817c6e6f494e41d3ddaff1fd Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Thu, 10 Nov 2022 09:31:56 +0100 Subject: [PATCH 3/6] Migrate License tag to SPDX https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_1 --- setroubleshoot.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setroubleshoot.spec b/setroubleshoot.spec index f3bc3ee..42252a7 100644 --- a/setroubleshoot.spec +++ b/setroubleshoot.spec @@ -5,7 +5,7 @@ Summary: Helps troubleshoot SELinux problems Name: setroubleshoot Version: 3.3.30 Release: 1%{?dist} -License: GPLv2+ +License: GPL-2.0-or-later URL: https://gitlab.com/setroubleshoot/setroubleshoot Source0: https://gitlab.com/setroubleshoot/setroubleshoot/-/archive/%{version}/setroubleshoot-%{version}.tar.gz Source1: %{name}.tmpfiles From 2a65b427f9f6b27466dcebc2b728d50d55b62b5b Mon Sep 17 00:00:00 2001 From: Milos Malik Date: Mon, 11 Jul 2022 16:02:36 +0200 Subject: [PATCH 4/6] run Tier1 tests via TMT/FMF Use the TMT/FMF instead of STI for running tests. STI does not respect the adjust section in main.fmf files of stored tests. Related: rhbz#2107109 --- .fmf/version | 1 + plans/tests.fmf | 6 +++++ .../main.fmf | 19 +++++++++++++++ .../runtest.sh | 1 - .../main.fmf | 15 ++++++++++++ .../runtest.sh | 1 - .../main.fmf | 13 ++++++++++ .../runtest.sh | 1 - tests/Sanity/public_content/main.fmf | 24 +++++++++++++++++++ tests/Sanity/public_content/runtest.sh | 1 - tests/tests.yml | 19 --------------- 11 files changed, 78 insertions(+), 23 deletions(-) create mode 100644 .fmf/version create mode 100644 plans/tests.fmf create mode 100644 tests/Regression/Report-bugs-on-corresponding-components/main.fmf create mode 100644 tests/Regression/no-plugin-exception-during-analyses/main.fmf create mode 100644 tests/Regression/sealert-s-traceback-invalid-display/main.fmf create mode 100644 tests/Sanity/public_content/main.fmf delete mode 100644 tests/tests.yml diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/plans/tests.fmf b/plans/tests.fmf new file mode 100644 index 0000000..ec3661a --- /dev/null +++ b/plans/tests.fmf @@ -0,0 +1,6 @@ +summary: Tier 1 setroubleshoot test plan +discover: + how: fmf +execute: + how: tmt + diff --git a/tests/Regression/Report-bugs-on-corresponding-components/main.fmf b/tests/Regression/Report-bugs-on-corresponding-components/main.fmf new file mode 100644 index 0000000..d70bc2c --- /dev/null +++ b/tests/Regression/Report-bugs-on-corresponding-components/main.fmf @@ -0,0 +1,19 @@ +summary: Test for BZ#1811644 (Let setroubleshoot to report bugs on components) +contact: Vit Mojzis +component: + - setroubleshoot +test: ./runtest.sh +framework: beakerlib +recommend: + - setroubleshoot-server + - flatpak-selinux + - tpm2-abrmd-selinux + - container-selinux + - usbguard-selinux + - mysql-selinux + - fapolicyd-selinux +duration: 5m +link: + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1811644 +extra-summary: /CoreOS/setroubleshoot/Regression/Report-bugs-on-corresponding-components +extra-task: /CoreOS/setroubleshoot/Regression/Report-bugs-on-corresponding-components diff --git a/tests/Regression/Report-bugs-on-corresponding-components/runtest.sh b/tests/Regression/Report-bugs-on-corresponding-components/runtest.sh index e55a506..c3e04b9 100755 --- a/tests/Regression/Report-bugs-on-corresponding-components/runtest.sh +++ b/tests/Regression/Report-bugs-on-corresponding-components/runtest.sh @@ -26,7 +26,6 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 . /usr/share/beakerlib/beakerlib.sh || exit 1 PACKAGE="setroubleshoot" diff --git a/tests/Regression/no-plugin-exception-during-analyses/main.fmf b/tests/Regression/no-plugin-exception-during-analyses/main.fmf new file mode 100644 index 0000000..923b8d6 --- /dev/null +++ b/tests/Regression/no-plugin-exception-during-analyses/main.fmf @@ -0,0 +1,15 @@ +summary: Does setroubleshoot report any 'Plugin Exception' during analyses? +contact: Petr Lautrbach +component: + - setroubleshoot +test: ./runtest.sh +framework: beakerlib +recommend: + - setroubleshoot-server +environment: + AVC_ERROR: +no_avc_check +duration: 5m +link: + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1784564 +extra-summary: /CoreOS/setroubleshoot/Regression/no-plugin-exception-during-analyses +extra-task: /CoreOS/setroubleshoot/Regression/no-plugin-exception-during-analyses diff --git a/tests/Regression/no-plugin-exception-during-analyses/runtest.sh b/tests/Regression/no-plugin-exception-during-analyses/runtest.sh index f200f49..74ea50a 100755 --- a/tests/Regression/no-plugin-exception-during-analyses/runtest.sh +++ b/tests/Regression/no-plugin-exception-during-analyses/runtest.sh @@ -27,7 +27,6 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 . /usr/share/beakerlib/beakerlib.sh || exit 1 PACKAGE="setroubleshoot" diff --git a/tests/Regression/sealert-s-traceback-invalid-display/main.fmf b/tests/Regression/sealert-s-traceback-invalid-display/main.fmf new file mode 100644 index 0000000..e6c6f7f --- /dev/null +++ b/tests/Regression/sealert-s-traceback-invalid-display/main.fmf @@ -0,0 +1,13 @@ +summary: Test for traceback when using sealert -s with display set to invalid value +contact: Vit Mojzis +component: + - setroubleshoot +test: ./runtest.sh +framework: beakerlib +recommend: + - setroubleshoot +duration: 5m +link: + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1574434 +extra-summary: /CoreOS/setroubleshoot/Regression/sealert-s-traceback-invalid-display +extra-task: /CoreOS/setroubleshoot/Regression/sealert-s-traceback-invalid-display diff --git a/tests/Regression/sealert-s-traceback-invalid-display/runtest.sh b/tests/Regression/sealert-s-traceback-invalid-display/runtest.sh index 9c5d0fa..55b0fdd 100755 --- a/tests/Regression/sealert-s-traceback-invalid-display/runtest.sh +++ b/tests/Regression/sealert-s-traceback-invalid-display/runtest.sh @@ -26,7 +26,6 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 . /usr/share/beakerlib/beakerlib.sh || exit 1 PACKAGE="setroubleshoot-server" diff --git a/tests/Sanity/public_content/main.fmf b/tests/Sanity/public_content/main.fmf new file mode 100644 index 0000000..f62fd6d --- /dev/null +++ b/tests/Sanity/public_content/main.fmf @@ -0,0 +1,24 @@ +summary: Does the plugin work as expected? +description: |+ + Does the plugin work as expected? + + Default value of ANALYSIS_DELAY can be overriden. + +contact: Milos Malik +component: + - setroubleshoot-plugins +test: ./runtest.sh +framework: beakerlib +recommend: + - setroubleshoot-plugins + - setroubleshoot-server + - audit + - setools-console + - psmisc + - libselinux-utils + - rsyslog +environment: + AVC_ERROR: +no_avc_check +duration: 10m +extra-summary: /CoreOS/setroubleshoot-plugins/Sanity/public_content +extra-task: /CoreOS/setroubleshoot-plugins/Sanity/public_content diff --git a/tests/Sanity/public_content/runtest.sh b/tests/Sanity/public_content/runtest.sh index e5665c8..7135a42 100755 --- a/tests/Sanity/public_content/runtest.sh +++ b/tests/Sanity/public_content/runtest.sh @@ -27,7 +27,6 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 . /usr/share/beakerlib/beakerlib.sh || exit 1 PACKAGE="setroubleshoot-plugins" diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index ea433bf..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,19 +0,0 @@ -- hosts: localhost - roles: - - role: standard-test-beakerlib - tags: - - classic - tests: - - Regression/embedded-null-byte-in-audit-records - - Regression/no-plugin-exception-during-analyses - - Regression/sealert-s-traceback-invalid-display - - Regression/Report-bugs-on-corresponding-components - - Sanity/public_content - required_packages: - - setroubleshoot-server - - setroubleshoot-plugins - - audit - - setools-console - - psmisc - - libselinux-utils - - rsyslog From 8a01b41a5a82e8b50968f044183988e6c3c4cf57 Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Wed, 23 Nov 2022 15:51:01 +0100 Subject: [PATCH 5/6] setroubleshoot-3.3.31 - Add a screen reader label to the icon - seapplet: avoid ValueError when parsing sealert.conf - 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` --- .gitignore | 1 + setroubleshoot.spec | 13 +++++++++++-- sources | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index f7886c0..8535490 100644 --- a/.gitignore +++ b/.gitignore @@ -215,3 +215,4 @@ setroubleshoot-2.2.93.tar.gz /setroubleshoot-3.3.28.tar.gz /setroubleshoot-3.3.29.tar.gz /setroubleshoot-3.3.30.tar.gz +/setroubleshoot-3.3.31.tar.gz diff --git a/setroubleshoot.spec b/setroubleshoot.spec index 42252a7..104c584 100644 --- a/setroubleshoot.spec +++ b/setroubleshoot.spec @@ -3,7 +3,7 @@ Summary: Helps troubleshoot SELinux problems Name: setroubleshoot -Version: 3.3.30 +Version: 3.3.31 Release: 1%{?dist} License: GPL-2.0-or-later URL: https://gitlab.com/setroubleshoot/setroubleshoot @@ -15,7 +15,7 @@ Source2: %{name}.sysusers BuildRequires: gcc BuildRequires: make BuildRequires: libcap-ng-devel -BuildRequires: intltool gettext python3 python3-devel +BuildRequires: intltool gettext python3 python3-devel python3-setuptools python3-pip BuildRequires: desktop-file-utils dbus-glib-devel libnotify-devel libselinux-devel polkit-devel BuildRequires: audit-libs-devel >= 3.0.1 BuildRequires: python3-libselinux python3-dasbus python3-gobject gtk3-devel @@ -179,6 +179,7 @@ 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 @@ -190,6 +191,14 @@ to user preference. The same tools can be run on existing log files. %doc AUTHORS COPYING ChangeLog DBUS.md NEWS README TODO %changelog +* Wed Nov 23 2022 Petr Lautrbach - 3.3.31-1 +- Add a screen reader label to the icon +- seapplet: avoid ValueError when parsing sealert.conf +- 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 - 3.3.30-1 - Miscellaneous python and build system changes - Fix couple of typos diff --git a/sources b/sources index 66a80cd..61464b9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (setroubleshoot-3.3.30.tar.gz) = 49955fdba875b2c1b6e338cf37bb0805cb33a515d45aac66a89885b32d8caa67f7fbd6ac0e6de7b1beb6b144c48b466e45913c7e58c7e794339842dc97c12464 +SHA512 (setroubleshoot-3.3.31.tar.gz) = e3ab60a81c851e1a68b43e6e08b6901caa2c507318ccb24992d24cca785cd3fbbb9e3d94b51f214a42ee3aba200d6d92eefaf38b71251794489a51844913ed64 From 8252a5eb3f37a94ac0064c64196fb8d22a21e5f3 Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Wed, 23 Nov 2022 18:27:49 +0100 Subject: [PATCH 6/6] tests: ausearch needs --input-logs in order not to read from stdin --- tests/Sanity/public_content/runtest.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Sanity/public_content/runtest.sh b/tests/Sanity/public_content/runtest.sh index 7135a42..60fe547 100755 --- a/tests/Sanity/public_content/runtest.sh +++ b/tests/Sanity/public_content/runtest.sh @@ -68,8 +68,8 @@ rlJournalStart rlRun "sleep ${ANALYSIS_DELAY}" rlRun "ps -efZ | grep setroubleshootd" 0,1 rlRun "sealert -l '*' > ${AFTER}" 0-3 - rlRun "ausearch -m avc -m selinux_err -i -ts recent | grep 'read.*ls.*test-dir.*:rsync_t:.*:samba_share_t:.*tclass=dir'" - rlRun "ausearch -m avc -m selinux_err -i -ts recent | grep 'read.*cat.*test-file.*:rsync_t:.*:samba_share_t:.*tclass=file'" + rlRun "ausearch -m avc -m selinux_err -i -ts recent --input-logs | grep 'read.*ls.*test-dir.*:rsync_t:.*:samba_share_t:.*tclass=dir'" + rlRun "ausearch -m avc -m selinux_err -i -ts recent --input-logs | grep 'read.*cat.*test-file.*:rsync_t:.*:samba_share_t:.*tclass=file'" rlRun "diff ${BEFORE} ${AFTER} | grep \"Plugin.*suggests\"" rlRun "diff ${BEFORE} ${AFTER} | grep \"Plugin ${PLUGIN_NAME} .*suggests\"" rlRun "diff /var/log/messages ./messages | grep -i -e 'setroubleshoot.*exception' -e 'no such file or directory'" 1