From 9dad9ddf78b47c9d8a73000e39ff7b8da096738733dc1d1ff5267318d0d2a2b9 Mon Sep 17 00:00:00 2001 From: Jan Zerebecki Date: Mon, 9 Jan 2023 18:40:38 +0000 Subject: [PATCH 1/2] Accepting request 1043313 from home:djz88:branches:systemsmanagement:cockpit - enable build of cockpit-selinux module - changes to keep it sync with sle micro (cockpit-selinux module patch) OBS-URL: https://build.opensuse.org/request/show/1043313 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:cockpit/cockpit?expand=0&rev=116 --- ...porary-remove-setroubleshoot-section.patch | 13 +++++++++ cockpit.changes | 6 ++++ cockpit.spec | 29 ++++++++++++++----- 3 files changed, 41 insertions(+), 7 deletions(-) create mode 100644 0002-selinux-temporary-remove-setroubleshoot-section.patch diff --git a/0002-selinux-temporary-remove-setroubleshoot-section.patch b/0002-selinux-temporary-remove-setroubleshoot-section.patch new file mode 100644 index 0000000..40a27fe --- /dev/null +++ b/0002-selinux-temporary-remove-setroubleshoot-section.patch @@ -0,0 +1,13 @@ +Index: cockpit-251.3/pkg/selinux/setroubleshoot-view.jsx +=================================================================== +--- cockpit-251.3.orig/pkg/selinux/setroubleshoot-view.jsx ++++ cockpit-251.3/pkg/selinux/setroubleshoot-view.jsx +@@ -458,7 +458,7 @@ export class SETroubleshootPage extends + + + {modifications} +- {troubleshooting} ++ { !this.props.connected || troubleshooting} + + + diff --git a/cockpit.changes b/cockpit.changes index e55bf4f..db2a20e 100644 --- a/cockpit.changes +++ b/cockpit.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Nov 28 13:34:07 UTC 2022 - Zdenek Kubala + +- enable build of cockpit-selinux module +- changes to keep it sync with sle micro (cockpit-selinux module patch) + ------------------------------------------------------------------- Tue Sep 20 08:20:16 UTC 2022 - Adam Majer diff --git a/cockpit.spec b/cockpit.spec index c0a47f8..511eb30 100644 --- a/cockpit.spec +++ b/cockpit.spec @@ -68,6 +68,7 @@ Patch5: storage-btrfs.patch # SLE Micro specific patches Patch100: remove-pwscore.patch Patch101: hide-pcp.patch +Patch102: 0002-selinux-temporary-remove-setroubleshoot-section.patch # in RHEL 8 the source package is duplicated: cockpit (building basic packages like cockpit-{bridge,system}) # and cockpit-appstream (building optional packages like cockpit-{pcp}) @@ -187,9 +188,11 @@ Requires: subscription-manager-cockpit %patch4 -p1 %patch5 -p1 -%if 0%{?sle_version} +# SLE Micro specific patches +%if 0%{?is_smo} %patch100 -p1 %patch101 -p1 +%patch102 -p1 %endif cp %SOURCE1 tools/cockpit.pam @@ -217,6 +220,9 @@ autoreconf -fvi -I tools --disable-ssh \ %endif +make -f /usr/share/selinux/devel/Makefile cockpit.pp +bzip2 -9 cockpit.pp + %make_build %check @@ -231,6 +237,14 @@ install -p -m 644 tools/cockpit.pam $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/cockpit rm -f %{buildroot}/%{_libdir}/cockpit/*.so install -D -p -m 644 AUTHORS COPYING README.md %{buildroot}%{_docdir}/cockpit/ +# selinux +install -D -m 644 %{name}.pp.bz2 %{buildroot}%{_datadir}/selinux/packages/%{selinuxtype}/%{name}.pp.bz2 +install -D -m 644 -t %{buildroot}%{_mandir}/man8 selinux/%{name}_session_selinux.8cockpit +install -D -m 644 -t %{buildroot}%{_mandir}/man8 selinux/%{name}_ws_selinux.8cockpit +# create this directory in the build root so that %ghost sees the desired mode +install -d -m 700 %{buildroot}%{_sharedstatedir}/selinux/%{selinuxtype}/active/modules/200/%{name} + +# SUSE branding mkdir -p %{buildroot}%{_datadir}/cockpit/branding/suse pushd cockpit-suse-theme cp src/css-overrides.css %{buildroot}%{_datadir}/cockpit/branding/suse @@ -332,9 +346,6 @@ rm -f %{buildroot}/%{_prefix}/share/metainfo/org.cockpit-project.cockpit-storage sed -i "s|%{buildroot}||" *.list %if 0%{?suse_version} -# setroubleshoot not yet in -rm -r %{buildroot}%{_datadir}/cockpit/selinux -rm %{buildroot}/%{_prefix}/share/metainfo/org.cockpit-project.cockpit-selinux.metainfo.xml # remove brandings with stale symlinks. Means they don't match # the distro. pushd %{buildroot}/%{_datadir}/cockpit/branding @@ -653,14 +664,18 @@ The Cockpit component for managing networking. This package uses NetworkManager %endif -%if 0%{?rhel} == 0 && !0%{?suse_version} +%if 0%{?rhel} == 0 && ( 0%{?suse_version} >= 1500 || 0%{?is_smo} ) %package selinux Summary: Cockpit SELinux package Requires: cockpit-bridge >= %{required_base} Requires: cockpit-shell >= %{required_base} -Requires: setroubleshoot-server >= 3.3.3 -BuildArch: noarch +Requires: policycoreutils-python-utils >= 3.1 +# setroubleshoot not yet in SLE Micro +%if !0%{?is_smo} +Requires: setroubleshoot-server >= 3.3.3 +%endif +BuildArch: noarch %description selinux This package contains the Cockpit user interface integration with the From 748b79bd534d8231d77c715787037b23d774074f2da83239f9a0af5a9e353a67 Mon Sep 17 00:00:00 2001 From: Jan Zerebecki Date: Fri, 13 Jan 2023 14:24:11 +0000 Subject: [PATCH 2/2] Accepting request 1058255 from home:djz88:branches:systemsmanagement:cockpit - changes to keep it sync with sle micro (0002-selinux-temporary-remove-setroubleshoot-section.patch) OBS-URL: https://build.opensuse.org/request/show/1058255 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:cockpit/cockpit?expand=0&rev=117 --- cockpit.changes | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cockpit.changes b/cockpit.changes index db2a20e..78b8bf9 100644 --- a/cockpit.changes +++ b/cockpit.changes @@ -2,7 +2,8 @@ Mon Nov 28 13:34:07 UTC 2022 - Zdenek Kubala - enable build of cockpit-selinux module -- changes to keep it sync with sle micro (cockpit-selinux module patch) +- changes to keep it sync with sle micro + (0002-selinux-temporary-remove-setroubleshoot-section.patch) ------------------------------------------------------------------- Tue Sep 20 08:20:16 UTC 2022 - Adam Majer