From a6377388561209e4fe9169246fc3db2de5e18d2c67be90e9aaeccba0f7d3f35d Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Tue, 15 Mar 2022 14:35:49 +0000 Subject: [PATCH 1/4] - change self-signed cert group from cockpit-wsintance to cockpit-ws on upgrade OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:cockpit/cockpit?expand=0&rev=83 --- cockpit.changes | 6 + cockpit.spec | 333 +++++++++++++++++++++++------------------------- 2 files changed, 168 insertions(+), 171 deletions(-) diff --git a/cockpit.changes b/cockpit.changes index 4018479..c45af1b 100644 --- a/cockpit.changes +++ b/cockpit.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jan 31 15:30:24 UTC 2022 - Jacek Tomasiak + +- change self-signed cert group from cockpit-wsintance to + cockpit-ws on upgrade + ------------------------------------------------------------------- Fri Jan 28 14:54:44 UTC 2022 - Adam Majer diff --git a/cockpit.spec b/cockpit.spec index 64eef17..b246827 100644 --- a/cockpit.spec +++ b/cockpit.spec @@ -1,36 +1,22 @@ # +# spec file for package cockpit +# +# Copyright (c) 2022 SUSE LLC # Copyright (C) 2014-2020 Red Hat, Inc. # -# Cockpit is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. -# -# Cockpit is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with Cockpit; If not, see . +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # -# -# This file is maintained at the following location: -# https://github.com/cockpit-project/cockpit/blob/main/tools/cockpit.spec -# -# If you are editing this file in another location, changes will likely -# be clobbered the next time an automated release is done. -# -# Check first cockpit-devel@lists.fedorahosted.org -# -# Globals that may be defined elsewhere -# * Version 122 -# * wip 1 -# -# earliest base that the subpackages work on; the instances of this get computed/updated -# by tools/gen-spec-dependencies during "make dist", but keep a hardcoded fallback %define required_base 122 # we generally want CentOS packages to be like RHEL; special cases need to check %{centos} explicitly @@ -92,51 +78,52 @@ Patch1: 0001-selinux-allow-login-to-read-motd-file.patch %define selinux_policy_version %(rpm --quiet -q selinux-policy && rpm -q --queryformat "%{V}-%{R}" selinux-policy || echo 1) %endif -BuildRequires: gcc -BuildRequires: pkgconfig(gio-unix-2.0) -BuildRequires: pkgconfig(json-glib-1.0) -BuildRequires: pkgconfig(polkit-agent-1) >= 0.105 -BuildRequires: pam-devel +BuildRequires: gcc +BuildRequires: pam-devel +BuildRequires: pkgconfig(gio-unix-2.0) +BuildRequires: pkgconfig(json-glib-1.0) +BuildRequires: pkgconfig(polkit-agent-1) >= 0.105 -BuildRequires: autoconf automake -BuildRequires: make -BuildRequires: /usr/bin/python3 -BuildRequires: gettext >= 0.19.7 +BuildRequires: /usr/bin/python3 +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: gettext >= 0.19.7 +BuildRequires: make %if 0%{?build_basic} -BuildRequires: libssh-devel >= 0.8.5 +BuildRequires: libssh-devel >= 0.8.5 %endif -BuildRequires: openssl-devel -BuildRequires: gnutls-devel >= 3.4.3 -BuildRequires: zlib-devel -BuildRequires: pkgconfig(krb5) >= 1.11 -BuildRequires: libxslt-devel -BuildRequires: glib-networking -BuildRequires: sed +BuildRequires: glib-networking +BuildRequires: gnutls-devel >= 3.4.3 +BuildRequires: libxslt-devel +BuildRequires: openssl-devel +BuildRequires: sed +BuildRequires: zlib-devel +BuildRequires: pkgconfig(krb5) >= 1.11 -BuildRequires: glib2-devel >= 2.50.0 +BuildRequires: glib2-devel >= 2.50.0 # this is for runtimedir in the tls proxy ace21c8879 -BuildRequires: pkgconfig(libsystemd) >= 235 +BuildRequires: pkgconfig(libsystemd) >= 235 %if 0%{?suse_version} -BuildRequires: distribution-release -BuildRequires: libpcp-devel -BuildRequires: pcp-devel -BuildRequires: libpcp3 -BuildRequires: libpcp_import1 -BuildRequires: openssh -BuildRequires: distribution-logos -BuildRequires: wallpaper-branding +BuildRequires: distribution-logos +BuildRequires: distribution-release +BuildRequires: libpcp-devel +BuildRequires: libpcp3 +BuildRequires: libpcp_import1 +BuildRequires: openssh +BuildRequires: pcp-devel +BuildRequires: wallpaper-branding # needed for /var/lib/pcp directory ownership -BuildRequires: pcp +BuildRequires: pcp %else -BuildRequires: pcp-libs-devel -BuildRequires: openssh-clients -BuildRequires: docbook-style-xsl +BuildRequires: docbook-style-xsl +BuildRequires: openssh-clients +BuildRequires: pcp-libs-devel %endif -BuildRequires: krb5-server -BuildRequires: gdb +BuildRequires: gdb +BuildRequires: krb5-server # For documentation -BuildRequires: xmlto +BuildRequires: xmlto %if 0%{?with_selinux} BuildRequires: selinux-policy @@ -145,28 +132,28 @@ BuildRequires: selinux-policy-devel %endif # for rebuilding nodejs bits -BuildRequires: npm -BuildRequires: sassc -BuildRequires: local-npm-registry +BuildRequires: npm +BuildRequires: local-npm-registry +BuildRequires: sassc # This is the "cockpit" metapackage. It should only # Require, Suggest or Recommend other cockpit-xxx subpackages -Requires: cockpit-bridge -Requires: cockpit-ws -Requires: cockpit-system +Requires: cockpit-bridge +Requires: cockpit-system +Requires: cockpit-ws # Optional components -Recommends: (cockpit-storaged if udisks2) -Recommends: cockpit-packagekit -Suggests: cockpit-pcp +Recommends: (cockpit-storaged if udisks2) +Recommends: cockpit-packagekit +Suggests: cockpit-pcp %if 0%{?rhel} == 0 -Recommends: (cockpit-networkmanager if NetworkManager) -Suggests: cockpit-selinux +Recommends: (cockpit-networkmanager if NetworkManager) +Suggests: cockpit-selinux %endif %if 0%{?rhel} && 0%{?centos} == 0 -Recommends: subscription-manager-cockpit +Recommends: subscription-manager-cockpit %endif %prep @@ -396,20 +383,19 @@ troubleshooting, interactive command-line sessions, and more. %{_datadir}/pixmaps/cockpit.png %doc %{_mandir}/man1/cockpit.1.gz - %package bridge -Summary: Cockpit bridge server-side component -Requires: glib-networking -Provides: cockpit-ssh = %{version}-%{release} +Summary: Cockpit bridge server-side component +Requires: glib-networking +Provides: cockpit-ssh = %{version}-%{release} # PR #10430 dropped workaround for ws' inability to understand x-host-key challenge -Conflicts: cockpit-ws < 181.x +Conflicts: cockpit-ws < 181.x # 233 dropped jquery.js, pages started to bundle it (commit 049e8b8dce) -Conflicts: cockpit-dashboard < 233 -Conflicts: cockpit-networkmanager < 233 -Conflicts: cockpit-storaged < 233 -Conflicts: cockpit-system < 233 -Conflicts: cockpit-tests < 233 -Conflicts: cockpit-docker < 233 +Conflicts: cockpit-dashboard < 233 +Conflicts: cockpit-docker < 233 +Conflicts: cockpit-networkmanager < 233 +Conflicts: cockpit-storaged < 233 +Conflicts: cockpit-system < 233 +Conflicts: cockpit-tests < 233 %description bridge The Cockpit bridge component installed server side and runs commands on the @@ -421,8 +407,8 @@ system on behalf of the web based user interface. %{_libexecdir}/cockpit-askpass %package doc -Summary: Cockpit deployment and developer guide -BuildArch: noarch +Summary: Cockpit deployment and developer guide +BuildArch: noarch %description doc The Cockpit Deployment and Developer Guide shows sysadmins how to @@ -436,42 +422,42 @@ embed or extend Cockpit. %{_docdir}/cockpit %package system -Summary: Cockpit admin interface package for configuring and troubleshooting a system -BuildArch: noarch -Requires: cockpit-bridge >= %{version}-%{release} +Summary: Cockpit admin interface package for configuring and troubleshooting a system +BuildArch: noarch +Requires: cockpit-bridge >= %{version}-%{release} %if !0%{?suse_version} -Requires: shadow-utils +Requires: shadow-utils %endif -Requires: grep -Requires: /usr/bin/pwscore -Requires: /usr/bin/date -Provides: cockpit-shell = %{version}-%{release} -Provides: cockpit-systemd = %{version}-%{release} -Provides: cockpit-tuned = %{version}-%{release} -Provides: cockpit-users = %{version}-%{release} -Obsoletes: cockpit-dashboard < %{version}-%{release} +Requires: /usr/bin/date +Requires: /usr/bin/pwscore +Requires: grep +Provides: cockpit-shell = %{version}-%{release} +Provides: cockpit-systemd = %{version}-%{release} +Provides: cockpit-tuned = %{version}-%{release} +Provides: cockpit-users = %{version}-%{release} +Obsoletes: cockpit-dashboard < %{version}-%{release} %if 0%{?rhel} -Provides: cockpit-networkmanager = %{version}-%{release} -Requires: NetworkManager >= 1.6 -Provides: cockpit-kdump = %{version}-%{release} -Requires: kexec-tools -Recommends: (sudo or polkit) -Recommends: PackageKit -Recommends: NetworkManager-team -Recommends: setroubleshoot-server >= 3.3.3 -Provides: cockpit-selinux = %{version}-%{release} -Provides: cockpit-sosreport = %{version}-%{release} -Requires: sos +Provides: cockpit-networkmanager = %{version}-%{release} +Requires: NetworkManager >= 1.6 +Provides: cockpit-kdump = %{version}-%{release} +Requires: kexec-tools +Recommends: NetworkManager-team +Recommends: PackageKit +Recommends: setroubleshoot-server >= 3.3.3 +Recommends: (sudo or polkit) +Provides: cockpit-selinux = %{version}-%{release} +Provides: cockpit-sosreport = %{version}-%{release} +Requires: sos %endif %if 0%{?fedora} >= 29 # 0.7.0 (actually) supports task cancellation. # 0.7.1 fixes tasks never announcing completion. -Recommends: (reportd >= 0.7.1 if abrt) +Recommends: (reportd >= 0.7.1 if abrt) %endif # NPM modules which are also available as packages -Provides: bundled(js-jquery) = 3.5.1 -Provides: bundled(xstatic-bootstrap-datepicker-common) = 1.9.0 -Provides: bundled(xstatic-patternfly-common) = 3.59.5 +Provides: bundled(js-jquery) = 3.5.1 +Provides: bundled(xstatic-bootstrap-datepicker-common) = 1.9.0 +Provides: bundled(xstatic-patternfly-common) = 3.59.5 %description system This package contains the Cockpit shell and system configuration interfaces. @@ -480,20 +466,20 @@ This package contains the Cockpit shell and system configuration interfaces. %dir %{_datadir}/cockpit/shell/images %package ws -Summary: Cockpit Web Service -Requires: glib-networking -Requires: openssl -Requires: glib2 >= 2.50.0 +Summary: Cockpit Web Service +Requires: glib-networking +Requires: glib2 >= 2.50.0 +Requires: openssl %if 0%{?with_selinux} -Requires: (selinux-policy >= %{selinux_policy_version} if selinux-policy-%{selinuxtype}) +Requires: (selinux-policy >= %{selinux_policy_version} if selinux-policy-%{selinuxtype}) Requires(post): (policycoreutils if selinux-policy-%{selinuxtype}) %endif -Conflicts: firewalld < 0.6.0-1 -Recommends: sscg >= 2.3 -Recommends: system-logos -Suggests: sssd-dbus +Conflicts: firewalld < 0.6.0-1 +Recommends: sscg >= 2.3 +Recommends: system-logos +Suggests: sssd-dbus %if 0%{?suse_version} -Requires(pre): permissions +Requires(pre): permissions %endif %description ws @@ -580,6 +566,12 @@ if [ "$1" = 1 ]; then ln -s /run/cockpit/motd /etc/motd.d/cockpit ln -s /run/cockpit/motd /etc/issue.d/cockpit.issue fi +# switch old self-signed cert group from cockpit-wsintance to cockpit-ws on upgrade +if [ "$1" = 2 ]; then + certfile=/etc/cockpit/ws-certs.d/0-self-signed.cert + test -f $certfile && stat -c '%G' $certfile | grep -q cockpit-wsinstance && chgrp cockpit-ws $certfile +fi + %if 0%{?suse_version} %set_permissions %{_libexecdir}/cockpit-session %endif @@ -619,11 +611,11 @@ fi %if 0%{?rhel} == 0 %package kdump -Summary: Cockpit user interface for kernel crash dumping -Requires: cockpit-bridge >= 122 -Requires: cockpit-shell >= 122 -Requires: kexec-tools -BuildArch: noarch +Summary: Cockpit user interface for kernel crash dumping +Requires: cockpit-bridge >= 122 +Requires: cockpit-shell >= 122 +Requires: kexec-tools +BuildArch: noarch %description kdump The Cockpit component for configuring kernel crash dumping. @@ -633,11 +625,11 @@ The Cockpit component for configuring kernel crash dumping. %if !0%{?suse_version} %package sosreport -Summary: Cockpit user interface for diagnostic reports -Requires: cockpit-bridge >= 122 -Requires: cockpit-shell >= 122 -Requires: sos -BuildArch: noarch +Summary: Cockpit user interface for diagnostic reports +Requires: cockpit-bridge >= 122 +Requires: cockpit-shell >= 122 +Requires: sos +BuildArch: noarch %description sosreport The Cockpit component for creating diagnostic reports with the @@ -649,13 +641,13 @@ sosreport tool. %endif %package networkmanager -Summary: Cockpit user interface for networking, using NetworkManager -Requires: cockpit-bridge >= 186 -Requires: cockpit-shell >= 186 -Requires: NetworkManager >= 1.6 +Summary: Cockpit user interface for networking, using NetworkManager +Requires: NetworkManager >= 1.6 +Requires: cockpit-bridge >= 186 +Requires: cockpit-shell >= 186 # Optional components -Recommends: NetworkManager-team -BuildArch: noarch +Recommends: NetworkManager-team +BuildArch: noarch %description networkmanager The Cockpit component for managing networking. This package uses NetworkManager. @@ -667,11 +659,11 @@ The Cockpit component for managing networking. This package uses NetworkManager %if 0%{?rhel} == 0 && !0%{?suse_version} %package selinux -Summary: Cockpit SELinux package -Requires: cockpit-bridge >= 122 -Requires: cockpit-shell >= 122 -Requires: setroubleshoot-server >= 3.3.3 -BuildArch: noarch +Summary: Cockpit SELinux package +Requires: cockpit-bridge >= 122 +Requires: cockpit-shell >= 122 +Requires: setroubleshoot-server >= 3.3.3 +BuildArch: noarch %description selinux This package contains the Cockpit user interface integration with the @@ -698,20 +690,20 @@ Dummy package from building optional packages only; never install or publish me. %if 0%{?build_optional} %package -n cockpit-storaged -Summary: Cockpit user interface for storage, using udisks -Requires: cockpit-shell >= 186 -Requires: udisks2 >= 2.6 -Recommends: udisks2-lvm2 >= 2.6 -Recommends: udisks2-iscsi >= 2.6 -Recommends: device-mapper-multipath -Recommends: clevis-luks -Requires: %{__python3} +Summary: Cockpit user interface for storage, using udisks +Requires: cockpit-shell >= 186 +Requires: udisks2 >= 2.6 +Recommends: clevis-luks +Recommends: device-mapper-multipath +Recommends: udisks2-iscsi >= 2.6 +Recommends: udisks2-lvm2 >= 2.6 +Requires: %{__python3} %if 0%{?suse_version} -Requires: python3-dbus-python +Requires: python3-dbus-python %else -Requires: python3-dbus +Requires: python3-dbus %endif -BuildArch: noarch +BuildArch: noarch %description -n cockpit-storaged The Cockpit component for managing storage. This package uses udisks. @@ -721,11 +713,11 @@ The Cockpit component for managing storage. This package uses udisks. %{_datadir}/metainfo/org.cockpit-project.cockpit-storaged.metainfo.xml %package -n cockpit-tests -Summary: Tests for Cockpit -Requires: cockpit-bridge >= 138 -Requires: cockpit-system >= 138 -Requires: openssh-clients -Provides: cockpit-test-assets = %{version}-%{release} +Summary: Tests for Cockpit +Requires: cockpit-bridge >= 138 +Requires: cockpit-system >= 138 +Requires: openssh-clients +Provides: cockpit-test-assets = %{version}-%{release} %description -n cockpit-tests This package contains tests and files used while testing Cockpit. @@ -735,7 +727,7 @@ These files are not required for running Cockpit. %{_prefix}/%{__lib}/cockpit-test-assets %package devel -Summary: Development files for for Cockpit +Summary: Development files for for Cockpit %description devel This package contains files used to develop cockpit modules @@ -744,9 +736,9 @@ This package contains files used to develop cockpit modules %{_datadir}/cockpit/devel %package -n cockpit-pcp -Summary: Cockpit PCP integration -Requires: cockpit-bridge >= 238.1.1 -Requires: pcp +Summary: Cockpit PCP integration +Requires: cockpit-bridge >= 238.1.1 +Requires: pcp %description -n cockpit-pcp Cockpit support for reading PCP metrics and loading PCP archives. @@ -759,13 +751,13 @@ Cockpit support for reading PCP metrics and loading PCP archives. systemctl reload-or-try-restart pmlogger %package -n cockpit-packagekit -Summary: Cockpit user interface for packages -BuildArch: noarch -Requires: cockpit-bridge >= 186 -Requires: PackageKit -Recommends: python3-tracer +Summary: Cockpit user interface for packages +BuildArch: noarch +Requires: PackageKit +Requires: cockpit-bridge >= 186 +Recommends: python3-tracer # HACK: https://bugzilla.redhat.com/show_bug.cgi?id=1800468 -Requires: polkit +Requires: polkit %description -n cockpit-packagekit The Cockpit components for installing OS updates and Cockpit add-ons, @@ -776,5 +768,4 @@ via PackageKit. #/ build optional extension packages %endif -# The changelog is automatically generated and merged %changelog From b47deff511dadb8f33e095370e048288d43a4cf0de2f425a2bb494c1b008afa7 Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Tue, 15 Mar 2022 14:45:54 +0000 Subject: [PATCH 2/4] Fix breaking of this file by speccleaner :( OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:cockpit/cockpit?expand=0&rev=84 --- cockpit.spec | 327 +++++++++++++++++++++++++++------------------------ 1 file changed, 171 insertions(+), 156 deletions(-) diff --git a/cockpit.spec b/cockpit.spec index b246827..e181277 100644 --- a/cockpit.spec +++ b/cockpit.spec @@ -1,22 +1,36 @@ # -# spec file for package cockpit -# -# Copyright (c) 2022 SUSE LLC # Copyright (C) 2014-2020 Red Hat, Inc. # -# All modifications and additions to the file contributed by third parties -# remain the property of their copyright owners, unless otherwise agreed -# upon. The license for this file, and modifications and additions to the -# file, is the same license as for the pristine package itself (unless the -# license for the pristine package is not an Open Source License, in which -# case the license is the MIT License). An "Open Source License" is a -# license that conforms to the Open Source Definition (Version 1.9) -# published by the Open Source Initiative. - -# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# Cockpit is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. +# +# Cockpit is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with Cockpit; If not, see . # +# +# This file is maintained at the following location: +# https://github.com/cockpit-project/cockpit/blob/main/tools/cockpit.spec +# +# If you are editing this file in another location, changes will likely +# be clobbered the next time an automated release is done. +# +# Check first cockpit-devel@lists.fedorahosted.org +# +# Globals that may be defined elsewhere +# * Version 122 +# * wip 1 +# +# earliest base that the subpackages work on; the instances of this get computed/updated +# by tools/gen-spec-dependencies during "make dist", but keep a hardcoded fallback %define required_base 122 # we generally want CentOS packages to be like RHEL; special cases need to check %{centos} explicitly @@ -78,52 +92,51 @@ Patch1: 0001-selinux-allow-login-to-read-motd-file.patch %define selinux_policy_version %(rpm --quiet -q selinux-policy && rpm -q --queryformat "%{V}-%{R}" selinux-policy || echo 1) %endif -BuildRequires: gcc -BuildRequires: pam-devel -BuildRequires: pkgconfig(gio-unix-2.0) -BuildRequires: pkgconfig(json-glib-1.0) -BuildRequires: pkgconfig(polkit-agent-1) >= 0.105 +BuildRequires: gcc +BuildRequires: pkgconfig(gio-unix-2.0) +BuildRequires: pkgconfig(json-glib-1.0) +BuildRequires: pkgconfig(polkit-agent-1) >= 0.105 +BuildRequires: pam-devel -BuildRequires: /usr/bin/python3 -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: gettext >= 0.19.7 -BuildRequires: make +BuildRequires: autoconf automake +BuildRequires: make +BuildRequires: /usr/bin/python3 +BuildRequires: gettext >= 0.19.7 %if 0%{?build_basic} -BuildRequires: libssh-devel >= 0.8.5 +BuildRequires: libssh-devel >= 0.8.5 %endif -BuildRequires: glib-networking -BuildRequires: gnutls-devel >= 3.4.3 -BuildRequires: libxslt-devel -BuildRequires: openssl-devel -BuildRequires: sed -BuildRequires: zlib-devel -BuildRequires: pkgconfig(krb5) >= 1.11 +BuildRequires: openssl-devel +BuildRequires: gnutls-devel >= 3.4.3 +BuildRequires: zlib-devel +BuildRequires: pkgconfig(krb5) >= 1.11 +BuildRequires: libxslt-devel +BuildRequires: glib-networking +BuildRequires: sed -BuildRequires: glib2-devel >= 2.50.0 +BuildRequires: glib2-devel >= 2.50.0 # this is for runtimedir in the tls proxy ace21c8879 -BuildRequires: pkgconfig(libsystemd) >= 235 +BuildRequires: pkgconfig(libsystemd) >= 235 %if 0%{?suse_version} -BuildRequires: distribution-logos -BuildRequires: distribution-release -BuildRequires: libpcp-devel -BuildRequires: libpcp3 -BuildRequires: libpcp_import1 -BuildRequires: openssh -BuildRequires: pcp-devel -BuildRequires: wallpaper-branding +BuildRequires: distribution-release +BuildRequires: libpcp-devel +BuildRequires: pcp-devel +BuildRequires: libpcp3 +BuildRequires: libpcp_import1 +BuildRequires: openssh +BuildRequires: distribution-logos +BuildRequires: wallpaper-branding # needed for /var/lib/pcp directory ownership -BuildRequires: pcp +BuildRequires: pcp %else -BuildRequires: docbook-style-xsl -BuildRequires: openssh-clients -BuildRequires: pcp-libs-devel +BuildRequires: pcp-libs-devel +BuildRequires: openssh-clients +BuildRequires: docbook-style-xsl %endif -BuildRequires: gdb -BuildRequires: krb5-server +BuildRequires: krb5-server +BuildRequires: gdb # For documentation -BuildRequires: xmlto +BuildRequires: xmlto %if 0%{?with_selinux} BuildRequires: selinux-policy @@ -132,28 +145,28 @@ BuildRequires: selinux-policy-devel %endif # for rebuilding nodejs bits -BuildRequires: npm -BuildRequires: local-npm-registry -BuildRequires: sassc +BuildRequires: npm +BuildRequires: sassc +BuildRequires: local-npm-registry # This is the "cockpit" metapackage. It should only # Require, Suggest or Recommend other cockpit-xxx subpackages -Requires: cockpit-bridge -Requires: cockpit-system -Requires: cockpit-ws +Requires: cockpit-bridge +Requires: cockpit-ws +Requires: cockpit-system # Optional components -Recommends: (cockpit-storaged if udisks2) -Recommends: cockpit-packagekit -Suggests: cockpit-pcp +Recommends: (cockpit-storaged if udisks2) +Recommends: cockpit-packagekit +Suggests: cockpit-pcp %if 0%{?rhel} == 0 -Recommends: (cockpit-networkmanager if NetworkManager) -Suggests: cockpit-selinux +Recommends: (cockpit-networkmanager if NetworkManager) +Suggests: cockpit-selinux %endif %if 0%{?rhel} && 0%{?centos} == 0 -Recommends: subscription-manager-cockpit +Recommends: subscription-manager-cockpit %endif %prep @@ -383,19 +396,20 @@ troubleshooting, interactive command-line sessions, and more. %{_datadir}/pixmaps/cockpit.png %doc %{_mandir}/man1/cockpit.1.gz + %package bridge -Summary: Cockpit bridge server-side component -Requires: glib-networking -Provides: cockpit-ssh = %{version}-%{release} +Summary: Cockpit bridge server-side component +Requires: glib-networking +Provides: cockpit-ssh = %{version}-%{release} # PR #10430 dropped workaround for ws' inability to understand x-host-key challenge -Conflicts: cockpit-ws < 181.x +Conflicts: cockpit-ws < 181.x # 233 dropped jquery.js, pages started to bundle it (commit 049e8b8dce) -Conflicts: cockpit-dashboard < 233 -Conflicts: cockpit-docker < 233 -Conflicts: cockpit-networkmanager < 233 -Conflicts: cockpit-storaged < 233 -Conflicts: cockpit-system < 233 -Conflicts: cockpit-tests < 233 +Conflicts: cockpit-dashboard < 233 +Conflicts: cockpit-networkmanager < 233 +Conflicts: cockpit-storaged < 233 +Conflicts: cockpit-system < 233 +Conflicts: cockpit-tests < 233 +Conflicts: cockpit-docker < 233 %description bridge The Cockpit bridge component installed server side and runs commands on the @@ -407,8 +421,8 @@ system on behalf of the web based user interface. %{_libexecdir}/cockpit-askpass %package doc -Summary: Cockpit deployment and developer guide -BuildArch: noarch +Summary: Cockpit deployment and developer guide +BuildArch: noarch %description doc The Cockpit Deployment and Developer Guide shows sysadmins how to @@ -422,42 +436,42 @@ embed or extend Cockpit. %{_docdir}/cockpit %package system -Summary: Cockpit admin interface package for configuring and troubleshooting a system -BuildArch: noarch -Requires: cockpit-bridge >= %{version}-%{release} +Summary: Cockpit admin interface package for configuring and troubleshooting a system +BuildArch: noarch +Requires: cockpit-bridge >= %{version}-%{release} %if !0%{?suse_version} -Requires: shadow-utils +Requires: shadow-utils %endif -Requires: /usr/bin/date -Requires: /usr/bin/pwscore -Requires: grep -Provides: cockpit-shell = %{version}-%{release} -Provides: cockpit-systemd = %{version}-%{release} -Provides: cockpit-tuned = %{version}-%{release} -Provides: cockpit-users = %{version}-%{release} -Obsoletes: cockpit-dashboard < %{version}-%{release} +Requires: grep +Requires: /usr/bin/pwscore +Requires: /usr/bin/date +Provides: cockpit-shell = %{version}-%{release} +Provides: cockpit-systemd = %{version}-%{release} +Provides: cockpit-tuned = %{version}-%{release} +Provides: cockpit-users = %{version}-%{release} +Obsoletes: cockpit-dashboard < %{version}-%{release} %if 0%{?rhel} -Provides: cockpit-networkmanager = %{version}-%{release} -Requires: NetworkManager >= 1.6 -Provides: cockpit-kdump = %{version}-%{release} -Requires: kexec-tools -Recommends: NetworkManager-team -Recommends: PackageKit -Recommends: setroubleshoot-server >= 3.3.3 -Recommends: (sudo or polkit) -Provides: cockpit-selinux = %{version}-%{release} -Provides: cockpit-sosreport = %{version}-%{release} -Requires: sos +Provides: cockpit-networkmanager = %{version}-%{release} +Requires: NetworkManager >= 1.6 +Provides: cockpit-kdump = %{version}-%{release} +Requires: kexec-tools +Recommends: (sudo or polkit) +Recommends: PackageKit +Recommends: NetworkManager-team +Recommends: setroubleshoot-server >= 3.3.3 +Provides: cockpit-selinux = %{version}-%{release} +Provides: cockpit-sosreport = %{version}-%{release} +Requires: sos %endif %if 0%{?fedora} >= 29 # 0.7.0 (actually) supports task cancellation. # 0.7.1 fixes tasks never announcing completion. -Recommends: (reportd >= 0.7.1 if abrt) +Recommends: (reportd >= 0.7.1 if abrt) %endif # NPM modules which are also available as packages -Provides: bundled(js-jquery) = 3.5.1 -Provides: bundled(xstatic-bootstrap-datepicker-common) = 1.9.0 -Provides: bundled(xstatic-patternfly-common) = 3.59.5 +Provides: bundled(js-jquery) = 3.5.1 +Provides: bundled(xstatic-bootstrap-datepicker-common) = 1.9.0 +Provides: bundled(xstatic-patternfly-common) = 3.59.5 %description system This package contains the Cockpit shell and system configuration interfaces. @@ -466,20 +480,20 @@ This package contains the Cockpit shell and system configuration interfaces. %dir %{_datadir}/cockpit/shell/images %package ws -Summary: Cockpit Web Service -Requires: glib-networking -Requires: glib2 >= 2.50.0 -Requires: openssl +Summary: Cockpit Web Service +Requires: glib-networking +Requires: openssl +Requires: glib2 >= 2.50.0 %if 0%{?with_selinux} -Requires: (selinux-policy >= %{selinux_policy_version} if selinux-policy-%{selinuxtype}) +Requires: (selinux-policy >= %{selinux_policy_version} if selinux-policy-%{selinuxtype}) Requires(post): (policycoreutils if selinux-policy-%{selinuxtype}) %endif -Conflicts: firewalld < 0.6.0-1 -Recommends: sscg >= 2.3 -Recommends: system-logos -Suggests: sssd-dbus +Conflicts: firewalld < 0.6.0-1 +Recommends: sscg >= 2.3 +Recommends: system-logos +Suggests: sssd-dbus %if 0%{?suse_version} -Requires(pre): permissions +Requires(pre): permissions %endif %description ws @@ -611,11 +625,11 @@ fi %if 0%{?rhel} == 0 %package kdump -Summary: Cockpit user interface for kernel crash dumping -Requires: cockpit-bridge >= 122 -Requires: cockpit-shell >= 122 -Requires: kexec-tools -BuildArch: noarch +Summary: Cockpit user interface for kernel crash dumping +Requires: cockpit-bridge >= 122 +Requires: cockpit-shell >= 122 +Requires: kexec-tools +BuildArch: noarch %description kdump The Cockpit component for configuring kernel crash dumping. @@ -625,11 +639,11 @@ The Cockpit component for configuring kernel crash dumping. %if !0%{?suse_version} %package sosreport -Summary: Cockpit user interface for diagnostic reports -Requires: cockpit-bridge >= 122 -Requires: cockpit-shell >= 122 -Requires: sos -BuildArch: noarch +Summary: Cockpit user interface for diagnostic reports +Requires: cockpit-bridge >= 122 +Requires: cockpit-shell >= 122 +Requires: sos +BuildArch: noarch %description sosreport The Cockpit component for creating diagnostic reports with the @@ -641,13 +655,13 @@ sosreport tool. %endif %package networkmanager -Summary: Cockpit user interface for networking, using NetworkManager -Requires: NetworkManager >= 1.6 -Requires: cockpit-bridge >= 186 -Requires: cockpit-shell >= 186 +Summary: Cockpit user interface for networking, using NetworkManager +Requires: cockpit-bridge >= 186 +Requires: cockpit-shell >= 186 +Requires: NetworkManager >= 1.6 # Optional components -Recommends: NetworkManager-team -BuildArch: noarch +Recommends: NetworkManager-team +BuildArch: noarch %description networkmanager The Cockpit component for managing networking. This package uses NetworkManager. @@ -659,11 +673,11 @@ The Cockpit component for managing networking. This package uses NetworkManager %if 0%{?rhel} == 0 && !0%{?suse_version} %package selinux -Summary: Cockpit SELinux package -Requires: cockpit-bridge >= 122 -Requires: cockpit-shell >= 122 -Requires: setroubleshoot-server >= 3.3.3 -BuildArch: noarch +Summary: Cockpit SELinux package +Requires: cockpit-bridge >= 122 +Requires: cockpit-shell >= 122 +Requires: setroubleshoot-server >= 3.3.3 +BuildArch: noarch %description selinux This package contains the Cockpit user interface integration with the @@ -690,20 +704,20 @@ Dummy package from building optional packages only; never install or publish me. %if 0%{?build_optional} %package -n cockpit-storaged -Summary: Cockpit user interface for storage, using udisks -Requires: cockpit-shell >= 186 -Requires: udisks2 >= 2.6 -Recommends: clevis-luks -Recommends: device-mapper-multipath -Recommends: udisks2-iscsi >= 2.6 -Recommends: udisks2-lvm2 >= 2.6 -Requires: %{__python3} +Summary: Cockpit user interface for storage, using udisks +Requires: cockpit-shell >= 186 +Requires: udisks2 >= 2.6 +Recommends: udisks2-lvm2 >= 2.6 +Recommends: udisks2-iscsi >= 2.6 +Recommends: device-mapper-multipath +Recommends: clevis-luks +Requires: %{__python3} %if 0%{?suse_version} -Requires: python3-dbus-python +Requires: python3-dbus-python %else -Requires: python3-dbus +Requires: python3-dbus %endif -BuildArch: noarch +BuildArch: noarch %description -n cockpit-storaged The Cockpit component for managing storage. This package uses udisks. @@ -713,11 +727,11 @@ The Cockpit component for managing storage. This package uses udisks. %{_datadir}/metainfo/org.cockpit-project.cockpit-storaged.metainfo.xml %package -n cockpit-tests -Summary: Tests for Cockpit -Requires: cockpit-bridge >= 138 -Requires: cockpit-system >= 138 -Requires: openssh-clients -Provides: cockpit-test-assets = %{version}-%{release} +Summary: Tests for Cockpit +Requires: cockpit-bridge >= 138 +Requires: cockpit-system >= 138 +Requires: openssh-clients +Provides: cockpit-test-assets = %{version}-%{release} %description -n cockpit-tests This package contains tests and files used while testing Cockpit. @@ -727,7 +741,7 @@ These files are not required for running Cockpit. %{_prefix}/%{__lib}/cockpit-test-assets %package devel -Summary: Development files for for Cockpit +Summary: Development files for for Cockpit %description devel This package contains files used to develop cockpit modules @@ -736,9 +750,9 @@ This package contains files used to develop cockpit modules %{_datadir}/cockpit/devel %package -n cockpit-pcp -Summary: Cockpit PCP integration -Requires: cockpit-bridge >= 238.1.1 -Requires: pcp +Summary: Cockpit PCP integration +Requires: cockpit-bridge >= 238.1.1 +Requires: pcp %description -n cockpit-pcp Cockpit support for reading PCP metrics and loading PCP archives. @@ -751,13 +765,13 @@ Cockpit support for reading PCP metrics and loading PCP archives. systemctl reload-or-try-restart pmlogger %package -n cockpit-packagekit -Summary: Cockpit user interface for packages -BuildArch: noarch -Requires: PackageKit -Requires: cockpit-bridge >= 186 -Recommends: python3-tracer +Summary: Cockpit user interface for packages +BuildArch: noarch +Requires: cockpit-bridge >= 186 +Requires: PackageKit +Recommends: python3-tracer # HACK: https://bugzilla.redhat.com/show_bug.cgi?id=1800468 -Requires: polkit +Requires: polkit %description -n cockpit-packagekit The Cockpit components for installing OS updates and Cockpit add-ons, @@ -768,4 +782,5 @@ via PackageKit. #/ build optional extension packages %endif +# The changelog is automatically generated and merged %changelog From aa8a3581a986c4958171eab4c9d3e05fb8ff91005a29633e6591e66626eb0cd4 Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Fri, 18 Mar 2022 13:56:13 +0000 Subject: [PATCH 3/4] - make package compatible with OBS version (bsc#1197224): * move branding images to distribution-logos-SLE package * re-add dependency on distribution-logos * remove branding patch and assets (suse-microos-branding.patch, suse-microos-branding.tar.gz); moved to GitHub fork * remove local __python3 macro * apply SLE specific patches only on SLE - add hide-pcp.patch to hide references to PCP (Performance Co-Pilot) and metric collection (bsc#1195943). The cockpit-pcp package is not included in SLE Micro 5.2 base and these parts require it. - update to new LTS version from openSUSE:Factory - port remove-pwscore.patch * remove dependency on pwscore (bsc#1182924) * remove password strenth indicator - port branding changes as suse-microos "theme" * remove suse_cockpit_assets.tar.gz * add suse-microos-branding.tar.gz * remove branding_tests.patch * add suse-microos-branding.patch - remove files not needed to build this version anymore * webpack-warnings-are-not-errors.patch * github_package.patch * nodejs_output_helper.bash - remove cockpit.permissions workaround (bsc#1169614) OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:cockpit/cockpit?expand=0&rev=85 --- cockpit.changes | 37 +++++++++++++++++++++++++ cockpit.spec | 16 ++++++++++- hide-pcp.patch | 35 +++++++++++++++++++++++ remove-pwscore.patch | 66 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 153 insertions(+), 1 deletion(-) create mode 100644 hide-pcp.patch create mode 100644 remove-pwscore.patch diff --git a/cockpit.changes b/cockpit.changes index c45af1b..0e621f2 100644 --- a/cockpit.changes +++ b/cockpit.changes @@ -1,9 +1,46 @@ +------------------------------------------------------------------- +Tue Mar 15 13:42:38 UTC 2022 - Jacek Tomasiak + +- make package compatible with OBS version (bsc#1197224): + * move branding images to distribution-logos-SLE package + * re-add dependency on distribution-logos + * remove branding patch and assets (suse-microos-branding.patch, + suse-microos-branding.tar.gz); moved to GitHub fork + * remove local __python3 macro + * apply SLE specific patches only on SLE + +------------------------------------------------------------------- +Mon Feb 28 10:41:31 UTC 2022 - Jacek Tomasiak + +- add hide-pcp.patch to hide references to PCP (Performance + Co-Pilot) and metric collection (bsc#1195943). The cockpit-pcp + package is not included in SLE Micro 5.2 base and these parts + require it. + ------------------------------------------------------------------- Mon Jan 31 15:30:24 UTC 2022 - Jacek Tomasiak - change self-signed cert group from cockpit-wsintance to cockpit-ws on upgrade +------------------------------------------------------------------- +Mon Jan 31 08:26:46 UTC 2022 - Jacek Tomasiak + +- update to new LTS version from openSUSE:Factory +- port remove-pwscore.patch + * remove dependency on pwscore (bsc#1182924) + * remove password strenth indicator +- port branding changes as suse-microos "theme" + * remove suse_cockpit_assets.tar.gz + * add suse-microos-branding.tar.gz + * remove branding_tests.patch + * add suse-microos-branding.patch +- remove files not needed to build this version anymore + * webpack-warnings-are-not-errors.patch + * github_package.patch + * nodejs_output_helper.bash +- remove cockpit.permissions workaround (bsc#1169614) + ------------------------------------------------------------------- Fri Jan 28 14:54:44 UTC 2022 - Adam Majer diff --git a/cockpit.spec b/cockpit.spec index e181277..9c0c465 100644 --- a/cockpit.spec +++ b/cockpit.spec @@ -65,6 +65,9 @@ Source97: node_modules.spec.inc %include %{_sourcedir}/node_modules.spec.inc Patch0: cockpit-redhatfont.diff Patch1: 0001-selinux-allow-login-to-read-motd-file.patch +# SLE Micro specific patches +Patch100: remove-pwscore.patch +Patch101: hide-pcp.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}) @@ -171,7 +174,14 @@ Recommends: subscription-manager-cockpit %prep %setup -q -n cockpit-%{version} -%autopatch -p1 +%patch0 -p1 +%patch1 -p1 + +%if 0%{?sle_version} +%patch100 -p1 +%patch101 -p1 +%endif + cp %SOURCE1 tools/cockpit.pam # local-npm-registry %{_sourcedir} install --also=dev --legacy-peer-deps @@ -443,7 +453,9 @@ Requires: cockpit-bridge >= %{version}-%{release} Requires: shadow-utils %endif Requires: grep +%if !0%{?sle_version} Requires: /usr/bin/pwscore +%endif Requires: /usr/bin/date Provides: cockpit-shell = %{version}-%{release} Provides: cockpit-systemd = %{version}-%{release} @@ -494,6 +506,8 @@ Recommends: system-logos Suggests: sssd-dbus %if 0%{?suse_version} Requires(pre): permissions +Requires: distribution-logos +Requires: wallpaper-branding %endif %description ws diff --git a/hide-pcp.patch b/hide-pcp.patch new file mode 100644 index 0000000..db64f5a --- /dev/null +++ b/hide-pcp.patch @@ -0,0 +1,35 @@ +diff --git a/pkg/metrics/metrics.jsx b/pkg/metrics/metrics.jsx +index 188aad7..a04b094 100644 +--- a/pkg/metrics/metrics.jsx ++++ b/pkg/metrics/metrics.jsx +@@ -995,6 +995,7 @@ const PCPConfig = ({ buttonVariant, firewalldRequest, needsLogout, setNeedsLogou + return ( + <> +