SHA256
1
0
forked from cockpit/cockpit

18 Commits

Author SHA256 Message Date
57f8f2e6da Update to 356 and fix esbuild
Co-Authored-By: Alice Brooks <alice.brooks@suse.com>
2026-02-17 11:19:04 +02:00
430b529036 Update changelog to include cve reference 2026-02-03 08:07:07 +00:00
4b036d78c5 Update deps 2026-01-28 14:41:15 +00:00
18968578e8 Update asciidoctor BuildRequires to be more generic 2026-01-19 10:45:36 +00:00
22071bf1de Update cockpit to 354 2026-01-16 15:24:14 +00:00
2d699be9a0 Add ListingTable patch 2025-12-10 13:24:04 +00:00
37a2d3a5ac - Update SELinux module dir as macro to allow root path move from /var/lib/selinux
to /etc/selinux (bsc#1221342)
2025-11-19 09:03:07 +01:00
0bd521a844 Update to 351 2025-11-13 04:57:32 +00:00
6b783aa3cb Update to 349 2025-10-20 08:47:24 +01:00
2098f3b22a Add requirement on python3-pcp if pcp is installed
This adds a dependency on python3-pcp if pcp is installed, solves bsc#1239759
2025-09-23 14:42:13 +05:30
648600968c Change hide-pcp.patch to detect microos at runtime 2025-09-22 09:49:35 +01:00
340a294843 Update to 346 2025-09-08 14:46:14 +03:00
a6d18653bd Always overwrite tools/cockpit.pam
We should do this since it's only ever used when we're operating under
0%{?suse_version} > 1500 when tools/cockpit.suse.pam is used
2025-08-27 10:58:37 +01:00
fea80266ed Remove cockpit.pam as this was upstreamed 2025-08-26 11:25:02 +01:00
6c82b009c5 Fix incorrect behaviour when using SUSE_PRETTY_NAME for system name 2025-08-26 11:25:02 +01:00
c6c34fc4b9 Update to 344 2025-08-19 12:08:29 +01:00
b7fde4551c add missing change log entry 2025-07-30 08:52:23 +05:30
9f7f321b54 drop duplicate change log macro 2025-07-30 08:35:19 +05:30
18 changed files with 2274 additions and 2554 deletions

View File

@@ -46,6 +46,24 @@ index 868469d68..186fcf59e 100644
</div>
<div className='ct-overview-header-actions'>
{ show_superuser && <SuperuserIndicator proxy={this.superuser} /> }
diff --git a/src/common/cockpitsystem.c b/src/common/cockpitsystem.c
index 83e2965f7..73716fff7 100644
--- a/src/ws/cockpitsystem.c
+++ b/src/ws/cockpitsystem.c
@@ -107,6 +107,12 @@ cockpit_system_load_os_release (void)
}
}
+ gchar *value = g_hash_table_lookup (result, "SUSE_PRETTY_NAME");
+ if (!value || strlen(value) == 0) {
+ value = g_hash_table_lookup (result, "PRETTY_NAME");
+ g_hash_table_replace (result, g_strdup ("SUSE_PRETTY_NAME"), g_strdup (value));
+ }
+
out:
g_clear_error (&error);
g_free (lines);
--
2.50.0

View File

@@ -7,11 +7,11 @@ Date: Fri Aug 6 15:11:23 2021 +0200
Index: cockpit/selinux/cockpit.te
===================================================================
diff --git a/selinux/cockpit.te b/selinux/cockpit.te
index 50695ee..55b1226 100644
index 931cbd775..4a439c8d5 100644
--- a/selinux/cockpit.te
+++ b/selinux/cockpit.te
@@ -224,6 +224,14 @@ optional_policy(`
gnome_exec_keyringd(cockpit_session_t)
@@ -232,6 +232,14 @@ optional_policy(`
allow cockpit_session_t pidfs_t:filesystem getattr;
')
+# login may read motd file through pam

View File

@@ -79,7 +79,7 @@ index 000000000..c1617abc2
+/* Default overrides */
+
+.login-note {
+ color: transparent;
+ display: none;
+ position: relative;
+}
+

Binary file not shown.

BIN
cockpit-356.tar.gz LFS Normal file

Binary file not shown.

View File

@@ -1,3 +1,123 @@
-------------------------------------------------------------------
Wed Feb 11 16:52:06 UTC 2026 - Miika Alikirri <miika.alikirri@suse.com>
- Fix esbuild for ppc64le bsc#1257698
* Include esbuild-ppc64.patch
* Update update_version.sh
- Update to 356
* changes since 354
- 356
* systemd: Allow editing timers created by Cockpit
* Convert license headers to SPDX format
- 355
* ws: Remove obsolete pam_cockpit_cert module
* shell: add StartTransientUnit as a sudo alternative
-------------------------------------------------------------------
Wed Jan 28 14:40:23 UTC 2026 - Alice Brooks <alice.brooks@suse.com>
- Update dependencies for bsc#1257324/CVE-2025-13465
-------------------------------------------------------------------
Fri Jan 16 15:03:36 UTC 2026 - Alice Brooks <alice.brooks@suse.com>
- Drop 0010-add-onExpand-prop-to-ListingTable.patch: Has been upstreamed
- Update to 354
* changes since 351
- 354
* Convert documentation to AsciiDoc
* Work around Firefox 146/147 bug (rhbz#2422331)
* Bug fixes
- 353
* Networking: Suggest prefix length and gateway address
* Bug fixes and translation updates
- 352
* Shown a warning if the last shutdown/reboot was unclean
* Bug fixes and translation updates
-------------------------------------------------------------------
Wed Dec 10 12:05:51 UTC 2025 - Alice Brooks <alice.brooks@suse.com>
- Add 0010-add-onExpand-prop-to-ListingTable.patch to backport a feature
-------------------------------------------------------------------
Thu Nov 19 08:05:47 UTC 2025 - Zdenek Kubala <zkubala@suse.com>
- Update SELinux module dir as macro to allow root path move from /var/lib/selinux
to /etc/selinux (bsc#1221342)
-------------------------------------------------------------------
Thu Nov 13 04:36:07 UTC 2025 - Alice Brooks <alice.brooks@suse.com>
- Update to 351
* Changes since 349
- 351
* Firewall ports can be deleted individually
- 350
* networking: fix renaming of bridges and other groups (RHEL-117883)
* bridge: fix OpenSSH_10.2p1 host key detection
-------------------------------------------------------------------
Fri Oct 17 09:44:51 UTC 2025 - Alice Brooks <alice.brooks@suse.com>
- Update to 349
* Changes since 346
- 349
* Package manifests: add any test
* Bug fixes and translation updates
- 348
* Bug fixes and translation updates
- 347
* Site-specific branding support
-------------------------------------------------------------------
Tue Sep 23 09:11:48 UTC 2025 - Luna D Dragon <luna.dragon@suse.com>
- add requirement on python3-pcp if pcp is installed bsc#1239759
-------------------------------------------------------------------
Thu Sep 18 07:40:59 UTC 2025 - Alice Brooks <alice.brooks@suse.com>
- Rewrite hide-pcp.patch to apply to SLFO based versions of micro
-------------------------------------------------------------------
Mon Sep 8 11:25:24 UTC 2025 - Miika Alikirri <miika.alikirri@suse.com>
- Update to 346
* Changes since 344
- 346
* Support branding Cockpit pages
* Storage: Support for Stratis "V2" pools
- 345
* Translation and dependency updates
* Shorter IPv6 addresses
* IPv6 addresses for WireGuard
-------------------------------------------------------------------
Thu Aug 14 04:53:41 UTC 2025 - Alice Brooks <alice.brooks@suse.com>
- Update to 344
* Changes since 340
- 344
* Bug fixes and translation updates
- 343
* login: Improve error message for unsupported shells
* cockpit: Handle file access issues with files in machines.d
* Translation updates
- 342
* systemd: ensure update() is called at least once for tuned-dialog
* Translation updates
- 341
* services: show link to podman page for quadlets
* Bug fixes and translation updates
- Remove kdump-nfs-fixes.patch as this was upstreamed
- Fix not falling back to PRETTY_NAME in SUSE_PRETTY_NAME patches bsc#1248446
-------------------------------------------------------------------
Wed Jul 30 03:21:48 UTC 2025 - Luna D Dragon <luna.dragon@suse.com>
- drop duplicate %changelog macro
-------------------------------------------------------------------
Wed Jul 23 12:53:37 UTC 2025 - Alice Brooks <alice.brooks@suse.com>

View File

@@ -1,11 +0,0 @@
#%PAM-1.0
auth substack common-auth
# List of users to deny access to Cockpit, by default root is included.
auth required pam_listfile.so item=user sense=deny file=/etc/cockpit/disallowed-users onerr=succeed
account required pam_nologin.so
account include common-account
password include common-password
session required pam_loginuid.so
session optional pam_keyinit.so force revoke
session include common-session
auth [user_unknown=ignore success=ok] pam_oath.so usersfile=${HOME}/.pam_oath_usersfile no_usersfile_okay window=20 digits=6

View File

@@ -1,18 +1,6 @@
#
# 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 <https://www.gnu.org/licenses/>.
# SPDX-License-Identifier: LGPL-2.1-or-later
#
#
@@ -38,22 +26,39 @@
%define __lib lib
%if 0%{?suse_version} > 1500
%define pamconfdir %{_pam_vendordir}
%define pamconfig tools/cockpit.suse.pam
%else
%define pamconfdir %{_sysconfdir}/pam.d
%define pamconfig tools/cockpit.pam
%endif
%if %{defined _pamdir}
%define pamdir %{_pamdir}
%else
%define pamdir %{_libdir}/security
%endif
# distributions which ship nodejs-esbuild can rebuild the bundle during package build
# allow override from command line (e.g. for development builds)
%if 0%{?fedora} >= 42
%{!?rebuild_bundle: %define rebuild_bundle 1}
%endif
# to avoid using asciidoc-py in RHEL and CentOS we use the prebuilt docs
%if 0%{?rhel}
%define bundle_docs 1
%endif
Name: cockpit
Summary: Web Console for Linux servers
License: LGPL-2.1-or-later
License: LGPL-2.1-or-later AND GPL-3.0-or-later AND MIT AND CC-BY-SA-3.0 AND BSD-3-Clause
URL: https://cockpit-project.org/
Version: 340
Version: 356
Release: 0
Source0: cockpit-%{version}.tar.gz
Source1: cockpit.pam
Source2: cockpit-rpmlintrc
Source3: cockpit-suse-theme.tar
Source4: cockpit-no-pamoath.pam
@@ -68,7 +73,7 @@ Patch2: suse_docs.patch
Patch3: suse-microos-branding.patch
Patch4: css-overrides.patch
Patch5: storage-btrfs.patch
Patch6: kdump-nfs-fixes.patch
Patch6: esbuild-ppc64.patch
# SLE Micro specific patches
Patch101: hide-pcp.patch
Patch102: 0002-selinux-temporary-remove-setroubleshoot-section.patch
@@ -151,7 +156,7 @@ BuildRequires: libxslt-devel
BuildRequires: glib-networking
BuildRequires: sed
BuildRequires: glib2-devel >= 2.50.0
BuildRequires: glib2-devel >= 2.68.0
# this is for runtimedir in the tls proxy ace21c8879
BuildRequires: pkgconfig(libsystemd) >= 235
%if 0%{?suse_version}
@@ -163,17 +168,26 @@ BuildRequires: wallpaper-branding
BuildRequires: pcp
%else
BuildRequires: openssh-clients
BuildRequires: docbook-style-xsl
%endif
BuildRequires: krb5-server
BuildRequires: gdb
# For documentation
BuildRequires: xmlto
%if 0%{?rebuild_bundle}
BuildRequires: nodejs
BuildRequires: %{_bindir}/node
BuildRequires: nodejs-esbuild
%endif
%if !%{defined bundle_docs}
%if 0%{?suse_version}
BuildRequires: rubygem(asciidoctor)
%else
BuildRequires: asciidoctor
%endif
%endif
%if 0%{?with_selinux}
BuildRequires: selinux-policy
BuildRequires: selinux-policy-%{selinuxtype}
BuildRequires: selinux-policy-devel
%endif
@@ -192,8 +206,10 @@ Requires: cockpit-system
# Optional components
Recommends: (cockpit-storaged if udisks2)
Recommends: (cockpit-packagekit if (dnf or zypper))
%if 0%{?suse_version} == 0
Recommends: (dnf5daemon-server if dnf5)
%endif
Recommends: (cockpit-firewalld if firewalld)
Suggests: python3-pcp
%if 0%{?rhel} == 0
Recommends: (cockpit-networkmanager if NetworkManager)
@@ -202,7 +218,7 @@ Recommends: (cockpit-ostree if rpm-ostree)
Suggests: cockpit-selinux
%endif
%if 0%{?rhel} && 0%{?centos} == 0
Requires: subscription-manager-cockpit
Recommends: subscription-manager-cockpit
%endif
BuildRequires: python3-devel
@@ -216,6 +232,10 @@ BuildRequires: python3-pytest-timeout
%prep
%setup -q -n cockpit-%{version} -a 3
%if 0%{?rebuild_bundle}
%setup -q -D -T -a 1 -n cockpit-%{version}
%endif
%patch -P 1 -p1
%patch -P 2 -p1
@@ -229,14 +249,13 @@ BuildRequires: python3-pytest-timeout
%patch -P 5 -p1
%patch -P 6 -p1
%patch -P 101 -p1
%patch -P 106 -p1
%patch -P 109 -p1
%patch -P 114 -p1
# SLE Micro specific patches
%if 0%{?is_smo}
%patch -P 101 -p1
%patch -P 107 -p1
# Patches for versions lower then SLE Micro 5.5
%if 0%{?sle_version} < 150500
%patch -P 102 -p1
@@ -262,16 +281,24 @@ BuildRequires: python3-pytest-timeout
%patch -P 201 -p1
%if 0%{?suse_version} > 1500
cp %SOURCE1 tools/cockpit.pam
%else
# If we're not using cockpit.suse.pam
# Then we should always use source4's pam
cp %SOURCE4 tools/cockpit.pam
%endif
#
local-npm-registry %{_sourcedir} install --include=dev --ignore-scripts
touch package-lock.json
echo "{}" > package-lock.json
%build
%if 0%{?rebuild_bundle}
rm -rf dist
# HACK: node module packaging is currently broken in Fedora ≤ 43, should be in
# common location, not major version specific one
NODE_ENV=production NODE_PATH=/usr/lib/node_modules:$(echo /usr/lib/node_modules_*) ./build.js
%else
# Use pre-built bundle on distributions without nodejs-esbuild
%endif
find node_modules -name \*.node -print -delete
touch node_modules/.stamp
@@ -290,6 +317,9 @@ autoreconf -fvi -I tools
%if %{enable_multihost}
--enable-multihost \
%endif
%if %{defined bundle_docs}
--disable-doc \
%endif
%if 0%{?with_selinux}
make -f /usr/share/selinux/devel/Makefile cockpit.pp
@@ -302,22 +332,35 @@ bzip2 -9 cockpit.pp
make -j$(nproc) check
%if 0%{?rhel} == 0 && 0%{?suse_version} == 0
%tox
export NO_QUNIT=1
%pytest
%endif
%install
%if 0%{?suse_version}
export NO_BRP_STALE_LINK_ERROR="yes"
%endif
# In obs we get write error: stdout
%make_install | tee make_install.log
make install-tests DESTDIR=%{buildroot}
%if 0%{?suse_version} > 1500
mkdir -p $RPM_BUILD_ROOT%{_pam_vendordir}
install -p -m 644 tools/cockpit.pam $RPM_BUILD_ROOT%{_pam_vendordir}/cockpit
%else
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pam.d
install -p -m 644 tools/cockpit.pam $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/cockpit
%endif
mkdir -p $RPM_BUILD_ROOT%{pamconfdir}
install -p -m 644 %{pamconfig} $RPM_BUILD_ROOT%{pamconfdir}/cockpit
rm -f %{buildroot}/%{_libdir}/cockpit/*.so
install -D -p -m 644 AUTHORS COPYING README.md %{buildroot}%{_docdir}/cockpit/
install -D -p -m 644 AUTHORS README.md %{buildroot}%{_docdir}/cockpit/
# We install the upstream pre-built docs as we can't build them
%if %{defined bundle_docs}
%define docbundledir %{_builddir}/%{name}-%{version}/doc/output/html
install -d %{buildroot}%{_docdir}/cockpit/guide
cp -rp %{docbundledir}/* %{buildroot}%{_docdir}/cockpit/guide/
# Install pre-built man pages
%define manbundledir %{_builddir}/%{name}-%{version}/doc/output/man
for section in 1 5 8; do
for manpage in %{manbundledir}/*.${section}; do
install -D -p -m 644 "$manpage" %{buildroot}%{_mandir}/man${section}/$(basename "$manpage")
done
done
%endif
# selinux
%if 0%{?with_selinux}
@@ -429,14 +472,6 @@ rm -f %{buildroot}/%{pamdir}/mock-pam-conv-mod.so
sed -i "s|%{buildroot}||" *.list
%if 0%{?suse_version}
# remove brandings with stale symlinks. Means they don't match
# the distro.
pushd %{buildroot}/%{_datadir}/cockpit/branding
ls --hide={default,kubernetes,opensuse,registry,suse} | xargs rm -rv
popd
# need this in SUSE as post build checks dislike stale symlinks
install -m 644 -D /dev/null %{buildroot}/run/cockpit/issue
test -e %{buildroot}/usr/share/cockpit/branding/opensuse/default-1920x1200.jpg || install -m 644 -D /dev/null %{buildroot}/usr/share/cockpit/branding/opensuse/default-1920x1200.jpg
test -e %{buildroot}/usr/share/cockpit/branding/suse/apple-touch-icon.png || install -m 644 -D /dev/null %{buildroot}/usr/share/cockpit/branding/suse/apple-touch-icon.png
test -e %{buildroot}/usr/share/cockpit/branding/suse/default-1920x1200.png || install -m 644 -D /dev/null %{buildroot}/usr/share/cockpit/branding/suse/default-1920x1200.png
@@ -485,9 +520,8 @@ It offers network configuration, log inspection, diagnostic reports, SELinux
troubleshooting, interactive command-line sessions, and more.
%files
%license COPYING
%license LICENSES/LGPL-2.1.txt
%{_docdir}/cockpit/AUTHORS
%{_docdir}/cockpit/COPYING
%{_docdir}/cockpit/README.md
%{_datadir}/metainfo/org.cockpit_project.cockpit.appdata.xml
%dir %{_datadir}/icons/hicolor/128x128/apps
@@ -506,7 +540,7 @@ The Cockpit bridge component installed server side and runs commands on the
system on behalf of the web based user interface.
%files bridge -f base.list
%license COPYING
%license LICENSES/GPL-3.0.txt
%doc %{_mandir}/man1/cockpit-bridge.1.gz
%{_bindir}/cockpit-bridge
%{_libexecdir}/cockpit-askpass
@@ -522,9 +556,8 @@ deploy Cockpit on their machines as well as helps developers who want to
embed or extend Cockpit.
%files doc
%license COPYING
%license LICENSES/LGPL-2.1.txt
%exclude %{_docdir}/cockpit/AUTHORS
%exclude %{_docdir}/cockpit/COPYING
%exclude %{_docdir}/cockpit/README.md
%{_docdir}/cockpit
@@ -540,6 +573,7 @@ Requires: jeos-firstboot
Requires: /usr/bin/pwscore
Requires: /usr/bin/date
Requires: (sudo or polkit)
Requires: (python3-pcp if pcp)
Provides: cockpit-shell = %{version}-%{release}
Provides: cockpit-systemd = %{version}-%{release}
Provides: cockpit-tuned = %{version}-%{release}
@@ -548,11 +582,9 @@ Provides: cockpit-users = %{version}-%{release}
Requires: NetworkManager >= 1.6
Requires: sos
Requires: sudo
Recommends: PackageKit
Recommends: setroubleshoot-server >= 3.3.3
Recommends: kexec-tools
Suggests: NetworkManager-team
Suggests: python3-pcp
Provides: cockpit-kdump = %{version}-%{release}
Provides: cockpit-networkmanager = %{version}-%{release}
Provides: cockpit-selinux = %{version}-%{release}
@@ -569,14 +601,13 @@ Recommends: (reportd if abrt)
This package contains the Cockpit shell and system configuration interfaces.
%files system -f system.list
%license COPYING
%license LICENSES/LGPL-2.1.txt
%dir %{_datadir}/cockpit/shell/images
%package ws
Summary: Cockpit Web Service
Requires: glib-networking
Requires: openssl
Requires: glib2 >= 2.50.0
Requires: glib2 >= 2.68.0
%if 0%{?with_selinux}
Requires: (%{name}-ws-selinux = %{version}-%{release} if selinux-policy-base)
Requires: (selinux-policy >= %{_selinux_policy_version} if selinux-policy-%{selinuxtype})
@@ -615,7 +646,7 @@ If sssd-dbus is installed, you can enable client certificate/smart card
authentication via sssd/FreeIPA.
%files ws -f static.list
%license COPYING
%license LICENSES/LGPL-2.1.txt
%doc %{_mandir}/man1/cockpit-desktop.1.gz
%doc %{_mandir}/man5/cockpit.conf.5.gz
%doc %{_mandir}/man8/cockpit-ws.8.gz
@@ -623,13 +654,10 @@ authentication via sssd/FreeIPA.
%doc %{_mandir}/man8/pam_ssh_add.8.gz
%dir %{_sysconfdir}/cockpit
%config(noreplace) %{_sysconfdir}/cockpit/ws-certs.d
%if 0%{?suse_version} > 1500
%{_pam_vendordir}/cockpit
%else
%config(noreplace) %{_sysconfdir}/pam.d/cockpit
%endif
# dir is not owned by pam in openSUSE
# dir is not owned by pam in openSUSE needed for Leap15.6
%dir %{pamconfdir}
%dir %{_sysconfdir}/motd.d
%config(noreplace) %{pamconfdir}/cockpit
# created in %post, so that users can rm the files
%ghost %{_sysconfdir}/issue.d/cockpit.issue
%ghost %{_sysconfdir}/motd.d/cockpit
@@ -655,7 +683,6 @@ authentication via sssd/FreeIPA.
%{_unitdir}/system-cockpithttps.slice
%{_prefix}/%{__lib}/tmpfiles.d/cockpit-ws.conf
%{pamdir}/pam_ssh_add.so
%{pamdir}/pam_cockpit_cert.so
%{_libexecdir}/cockpit-ws
%{_libexecdir}/cockpit-wsinstance-factory
%{_libexecdir}/cockpit-tls
@@ -724,14 +751,6 @@ fi
# firewalld only partially picks up changes to its services files without this
test -f %{_bindir}/firewall-cmd && firewall-cmd --reload --quiet || true
# check for deprecated PAM config
if test -f %{_sysconfdir}/pam.d/cockpit && grep -q pam_cockpit_cert %{_sysconfdir}/pam.d/cockpit; then
echo '**** WARNING:'
echo '**** WARNING: pam_cockpit_cert is a no-op and will be removed in a'
echo '**** WARNING: future release; remove it from your /etc/pam.d/cockpit.'
echo '**** WARNING:'
fi
# remove obsolete system user on upgrade (replaced with DynamicUser in version 330)
if getent passwd cockpit-wsinstance >/dev/null; then
userdel cockpit-wsinstance
@@ -770,11 +789,11 @@ Obsoletes: %{name}-selinux-policies < 338
SELinux policy module for the cockpit-ws package.
%files ws-selinux
%license COPYING
%license LICENSES/LGPL-2.1.txt
%{_datadir}/selinux/packages/%{selinuxtype}/%{name}.pp.bz2
%{_mandir}/man8/%{name}_session_selinux.8cockpit.*
%{_mandir}/man8/%{name}_ws_selinux.8cockpit.*
%ghost %{_sharedstatedir}/selinux/%{selinuxtype}/active/modules/200/%{name}
%ghost %{_selinux_store_path}/%{selinuxtype}/active/modules/200/%{name}
%posttrans ws-selinux
%selinux_relabel_pre -s %{selinuxtype}
@@ -795,16 +814,21 @@ SELinux policy module for the cockpit-ws package.
Summary: Cockpit user interface for kernel crash dumping
Requires: cockpit-bridge >= %{required_base}
Requires: cockpit-shell >= %{required_base}
%if 0%{?suse_version}
Requires: /usr/sbin/kdumptool
%else
Requires: /usr/bin/kdumpctl
%endif
BuildArch: noarch
%description kdump
The Cockpit component for configuring kernel crash dumping.
%files kdump -f kdump.list
%license COPYING
%license LICENSES/LGPL-2.1.txt
%{_datadir}/metainfo/org.cockpit_project.cockpit_kdump.metainfo.xml
# sosreport is not supported on opensuse yet
%if !0%{?suse_version}
%package sosreport
Summary: Cockpit user interface for diagnostic reports
@@ -818,7 +842,7 @@ The Cockpit component for creating diagnostic reports with the
sosreport tool.
%files sosreport -f sosreport.list
%license COPYING
%license LICENSES/LGPL-2.1.txt
%{_datadir}/metainfo/org.cockpit_project.cockpit_sosreport.metainfo.xml
%{_datadir}/icons/hicolor/64x64/apps/cockpit-sosreport.png
%endif
@@ -837,13 +861,12 @@ BuildArch: noarch
The Cockpit component for managing networking. This package uses NetworkManager.
%files networkmanager -f networkmanager.list
%license COPYING
%license LICENSES/LGPL-2.1.txt
%{_datadir}/metainfo/org.cockpit_project.cockpit_networkmanager.metainfo.xml
%endif
%if 0%{?rhel} == 0 && ( 0%{?suse_version} >= 1500 || 0%{?is_smo} )
%package selinux
Summary: Cockpit SELinux package
Requires: cockpit-bridge >= %{required_base}
@@ -853,14 +876,14 @@ Requires: policycoreutils-python-utils >= 3.1
%if !0%{?suse_version} || ( 0%{?is_smo} && 0%{?sle_version} >= 150500 ) || 0%{?suse_version} >= 1600
Requires: setroubleshoot-server >= 3.3.3
%endif
BuildArch: noarch
BuildArch: noarch
%description selinux
This package contains the Cockpit user interface integration with the
utility setroubleshoot to diagnose and resolve SELinux issues.
%files selinux -f selinux.list
%license COPYING
%license LICENSES/LGPL-2.1.txt
%{_datadir}/metainfo/org.cockpit_project.cockpit_selinux.metainfo.xml
%endif
@@ -879,7 +902,7 @@ Requires: python3-dbus-python
Recommends: udisks2-lvm2 >= 2.9
Recommends: udisks2-iscsi >= 2.9
%if ! 0%{?rhel}
Recommends: udisks2-btrfs >= 2.9
Recommends: (udisks2-btrfs >= 2.9 if (btrfs-progs or btrfsprogs))
%endif
Recommends: device-mapper-multipath
Recommends: clevis-luks
@@ -891,7 +914,7 @@ BuildArch: noarch
The Cockpit component for managing storage. This package uses udisks.
%files -n cockpit-storaged -f storaged.list
%license COPYING
%license LICENSES/LGPL-2.1.txt
%{_datadir}/metainfo/org.cockpit_project.cockpit_storaged.metainfo.xml
%post storaged
@@ -924,10 +947,7 @@ The Cockpit components for installing OS updates and Cockpit add-ons,
via PackageKit.
%files -n cockpit-packagekit -f packagekit.list
%license COPYING
# The changelog is automatically generated and merged
%changelog
%license LICENSES/LGPL-2.1.txt
%package firewalld
Summary: Allows Cockpit access through the firewall
@@ -939,7 +959,7 @@ BuildArch: noarch
This package allows Cockpit access through the firewall
%files firewalld
%license COPYING
%license LICENSES/LGPL-2.1.txt
%postun firewalld
if test -f %{_bindir}/firewall-cmd && firewall-cmd --state &>/dev/null; then
@@ -955,4 +975,5 @@ elif test -f %{_bindir}/firewall-offline-cmd; then
firewall-offline-cmd --quiet --add-service=cockpit || true
fi
# The changelog is automatically generated and merged
%changelog

View File

@@ -44,39 +44,39 @@ now, it fulfills the requirements of [3].
create mode 100644 pkg/static/css-overrides.css
diff --git a/pkg/apps/index.html b/pkg/apps/index.html
index fd17d5131..9aac50800 100644
index f8f8daa83..543cc5492 100644
--- a/pkg/apps/index.html
+++ b/pkg/apps/index.html
@@ -23,6 +23,7 @@ along with Cockpit; If not, see <https://www.gnu.org/licenses/>.
<title translate="yes">Applications</title>
@@ -24,6 +24,7 @@ along with Cockpit; If not, see <https://www.gnu.org/licenses/>.
<meta charset="utf-8" />
<link href="apps.css" type="text/css" rel="stylesheet" />
<link href="../../static/branding.css" rel="stylesheet" />
+ <link href="../../static/css-overrides.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="../base1/cockpit.js"></script>
<script type="text/javascript" src="../base1/po.js"></script>
<script type="text/javascript" src="po.js"></script>
diff --git a/pkg/kdump/index.html b/pkg/kdump/index.html
index 8138f050f..619416dd4 100644
index 77cf9ff38..af46a3d98 100644
--- a/pkg/kdump/index.html
+++ b/pkg/kdump/index.html
@@ -25,6 +25,7 @@ along with Cockpit; If not, see <https://www.gnu.org/licenses/>.
<meta name="viewport" content="width=device-width, initial-scale=1" />
@@ -26,6 +26,7 @@ along with Cockpit; If not, see <https://www.gnu.org/licenses/>.
<link rel="stylesheet" href="kdump.css" />
<link href="../../static/branding.css" rel="stylesheet" />
+ <link href="../../static/css-overrides.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="kdump.js"></script>
<script type="text/javascript" src="../base1/po.js"></script>
diff --git a/pkg/metrics/index.html b/pkg/metrics/index.html
index cbb82dccc..b17bd1a76 100644
index cbf10aab8..c42081e34 100644
--- a/pkg/metrics/index.html
+++ b/pkg/metrics/index.html
@@ -23,6 +23,7 @@ along with this package; If not, see <https://www.gnu.org/licenses/>.
<meta name="viewport" content="width=device-width, initial-scale=1" />
@@ -24,6 +24,7 @@ along with this package; If not, see <https://www.gnu.org/licenses/>.
<link rel="stylesheet" href="index.css" />
<link href="../../static/branding.css" rel="stylesheet" />
+ <link href="../../static/css-overrides.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../base1/cockpit.js"></script>
<script type="text/javascript" src="../manifests.js"></script>
diff --git a/pkg/networkmanager/firewall.html b/pkg/networkmanager/firewall.html
@@ -85,44 +85,44 @@ index e5ea58276..6bc5327f5 100644
+++ b/pkg/networkmanager/firewall.html
@@ -23,6 +23,7 @@ along with Cockpit; If not, see <https://www.gnu.org/licenses/>.
<meta charset="utf-8" />
<link href="firewall.css" type="text/css" rel="stylesheet" />
+ <link href="../../static/css-overrides.css" type="text/css" rel="stylesheet" />
<script src="../base1/cockpit.js"></script>
<script src="../base1/po.js"></script>
diff --git a/pkg/networkmanager/index.html b/pkg/networkmanager/index.html
index fc9cb5aff..3aceef1b2 100644
index e73b89502..0e2c6e09e 100644
--- a/pkg/networkmanager/index.html
+++ b/pkg/networkmanager/index.html
@@ -24,6 +24,7 @@
<meta charset="utf-8" />
@@ -25,6 +25,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="networkmanager.css" type="text/css" rel="stylesheet" />
<link href="../../static/branding.css" rel="stylesheet" />
+ <link href="../../static/css-overrides.css" type="text/css" rel="stylesheet" />
<script src="../base1/cockpit.js"></script>
<script src="../manifests.js"></script>
<script src="../base1/po.js"></script>
diff --git a/pkg/packagekit/index.html b/pkg/packagekit/index.html
index c95dfd263..f4f3baab6 100644
index e3ec580c9..a91cdebec 100644
--- a/pkg/packagekit/index.html
+++ b/pkg/packagekit/index.html
@@ -24,6 +24,7 @@ along with Cockpit; If not, see <https://www.gnu.org/licenses/>.
<meta charset="utf-8" />
@@ -25,6 +25,7 @@ along with Cockpit; If not, see <https://www.gnu.org/licenses/>.
<link href="updates.css" rel="stylesheet" />
<link href="../../static/branding.css" rel="stylesheet" />
+ <link href="../../static/css-overrides.css" type="text/css" rel="stylesheet" />
<script src="../base1/cockpit.js"></script>
<script src="../base1/po.js"></script>
diff --git a/pkg/playground/index.html b/pkg/playground/index.html
index 4f2bce82d..6f87bc642 100644
index cb5eb670f..081972401 100644
--- a/pkg/playground/index.html
+++ b/pkg/playground/index.html
@@ -5,6 +5,7 @@
<title>Cockpit Development Playground</title>
@@ -6,6 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="index.css" type="text/css" rel="stylesheet" />
<link href="../../static/branding.css" rel="stylesheet" />
+ <link href="../../static/css-overrides.css" type="text/css" rel="stylesheet" />
<script src="../base1/cockpit.js"></script>
<script src="../manifests.js"></script>
@@ -199,6 +199,18 @@ index 97a74791f..a2519cfd2 100644
<script src="../base1/cockpit.js"></script>
<script src="test.js"></script>
</head>
diff --git a/pkg/selinux/index.html b/pkg/selinux/index.html
index f967e7b25..bc64e6d8c 100644
--- a/pkg/selinux/index.html
+++ b/pkg/selinux/index.html
@@ -26,6 +26,7 @@ along with Cockpit; If not, see <https://www.gnu.org/licenses/>.
<link rel="stylesheet" href="selinux.css" />
<link href="../../static/branding.css" rel="stylesheet" />
+ <link href="../../static/css-overrides.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../base1/cockpit.js"></script>
<script type="text/javascript" src="../base1/po.js"></script>
diff --git a/pkg/shell/index.html b/pkg/shell/index.html
index 6dd5ad1ac..1c6f3512c 100644
--- a/pkg/shell/index.html
@@ -223,18 +235,6 @@ index c9adf7ae2..97f088f7c 100644
</head>
<body class="pf-v6-m-tabular-nums">
<div class="curtains-ct">
diff --git a/pkg/sosreport/index.html b/pkg/sosreport/index.html
index e673383ad..224b42463 100644
--- a/pkg/sosreport/index.html
+++ b/pkg/sosreport/index.html
@@ -22,6 +22,7 @@ along with Cockpit; If not, see <https://www.gnu.org/licenses/>.
<title translate="yes">Diagnostic reports</title>
<meta charset="utf-8" />
<link href="sosreport.css" rel="stylesheet" />
+ <link href="../../static/css-overrides.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../base1/cockpit.js"></script>
<script type="text/javascript" src="../base1/po.js"></script>
<script type="text/javascript" src="po.js"></script>
diff --git a/pkg/static/css-overrides.css b/pkg/static/css-overrides.css
new file mode 100644
index 000000000..7481f7ecf
@@ -253,6 +253,42 @@ index 000000000..7481f7ecf
+ * - https://github.com/cockpit-project/cockpit/pull/17437
+ * - https://github.com/cockpit-project/cockpit/issues/16359
+ */
diff --git a/pkg/sosreport/index.html b/pkg/sosreport/index.html
index a37f816ee..37528f38b 100644
--- a/pkg/sosreport/index.html
+++ b/pkg/sosreport/index.html
@@ -23,6 +23,7 @@ along with Cockpit; If not, see <https://www.gnu.org/licenses/>.
<meta charset="utf-8" />
<link href="sosreport.css" rel="stylesheet" />
<link href="../../static/branding.css" rel="stylesheet" />
+ <link href="../../static/css-overrides.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../base1/cockpit.js"></script>
<script type="text/javascript" src="../base1/po.js"></script>
<script type="text/javascript" src="po.js"></script>
diff --git a/pkg/static/login.html b/pkg/static/login.html
index 4a3ade726..7ce60a214 100644
--- a/pkg/static/login.html
+++ b/pkg/static/login.html
@@ -11,6 +11,7 @@
<script type="text/javascript" src="cockpit/static/login.js"></script>
<link href="cockpit/static/login.css" type="text/css" rel="stylesheet" />
<link href="cockpit/static/branding.css" type="text/css" rel="stylesheet" />
+ <link href="cockpit/static/css-overrides.css" type="text/css" rel="stylesheet" />
</head>
<body class="login-pf">
diff --git a/pkg/storaged/index.html b/pkg/storaged/index.html
index 9453ee003..bb69595d5 100644
--- a/pkg/storaged/index.html
+++ b/pkg/storaged/index.html
@@ -25,6 +25,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="storaged.css" type="text/css" rel="stylesheet" />
<link href="../../static/branding.css" rel="stylesheet" />
+ <link href="../../static/css-overrides.css" type="text/css" rel="stylesheet" />
<script src="../base1/cockpit.js"></script>
<script src="../base1/po.js"></script>
<script src="../manifests.js"></script>
diff --git a/pkg/systemd/hwinfo.html b/pkg/systemd/hwinfo.html
index a3413faca..549b80298 100644
--- a/pkg/systemd/hwinfo.html
@@ -266,14 +302,14 @@ index a3413faca..549b80298 100644
<script src="../base1/po.js"></script>
<script src="po.js"></script>
diff --git a/pkg/systemd/index.html b/pkg/systemd/index.html
index 91a268a4a..ee125fe65 100644
index 146b59304..28d660b67 100644
--- a/pkg/systemd/index.html
+++ b/pkg/systemd/index.html
@@ -6,6 +6,7 @@
<meta name="description" content="" />
@@ -7,6 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="overview.css" />
+ <link href="../../static/css-overrides.css" type="text/css" rel="stylesheet"/>
<link href="../../static/branding.css" rel="stylesheet" />
+ <link href="../../static/css-overrides.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../base1/cockpit.js"></script>
<script type="text/javascript" src="../base1/po.js"></script>
<script type="text/javascript" src="overview.js"></script>
@@ -290,17 +326,17 @@ index f89f1fa47..5086ce1f6 100644
<script src="../base1/po.js"></script>
<script src="po.js"></script>
diff --git a/pkg/systemd/services.html b/pkg/systemd/services.html
index 74fa456d4..e9c7047ee 100644
index a17e95e56..7eaa65efa 100644
--- a/pkg/systemd/services.html
+++ b/pkg/systemd/services.html
@@ -5,6 +5,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="services.css" type="text/css" rel="stylesheet" />
+ <link href="../../static/css-overrides.css" type="text/css" rel="stylesheet" />
<script src="../base1/cockpit.js"></script>
@@ -9,6 +9,7 @@
<script src="../base1/po.js"></script>
<script src="../manifests.js"></script>
<script src="services.js"></script>
+ <link href="../../static/css-overrides.css" type="text/css" rel="stylesheet" />
<script src="po.js"></script>
</head>
diff --git a/pkg/systemd/terminal.html b/pkg/systemd/terminal.html
index ce7216e4e..63547f9d3 100644
--- a/pkg/systemd/terminal.html
@@ -314,53 +350,17 @@ index ce7216e4e..63547f9d3 100644
<script src="../base1/po.js"></script>
<script src="po.js"></script>
diff --git a/pkg/users/index.html b/pkg/users/index.html
index d26cf4781..b0c6ebf87 100644
index 6c8c81be9..533a5975a 100644
--- a/pkg/users/index.html
+++ b/pkg/users/index.html
@@ -24,6 +24,7 @@
<meta charset="utf-8" />
@@ -25,6 +25,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="users.css" type="text/css" rel="stylesheet" />
<link href="../../static/branding.css" rel="stylesheet" />
+ <link href="../../static/css-overrides.css" type="text/css" rel="stylesheet" />
<script src="../base1/cockpit.js"></script>
<script src="../base1/po.js"></script>
<script src="po.js"></script>
diff --git a/pkg/storaged/index.html b/pkg/storaged/index.html
index 6893e4909..b6677bb56 100644
--- a/pkg/storaged/index.html
+++ b/pkg/storaged/index.html
@@ -24,6 +24,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="storaged.css" type="text/css" rel="stylesheet" />
+ <link href="../../static/css-overrides.css" type="text/css" rel="stylesheet">
<script src="../base1/cockpit.js"></script>
<script src="../base1/po.js"></script>
<script src="../manifests.js"></script>
diff --git a/pkg/static/login.html b/pkg/static/login.html
index 6a8fa4f44..9019499a5 100644
--- a/pkg/static/login.html
+++ b/pkg/static/login.html
@@ -11,6 +11,7 @@
<script type="text/javascript" src="cockpit/static/login.js"></script>
<link href="cockpit/static/login.css" type="text/css" rel="stylesheet" />
<link href="cockpit/static/branding.css" type="text/css" rel="stylesheet" />
+ <link href="cockpit/static/css-overrides.css" type="text/css" rel="stylesheet" />
</head>
<body class="login-pf">
diff --git a/pkg/selinux/index.html b/pkg/selinux/index.html
index cc3825a25..e1c814c6d 100644
--- a/pkg/selinux/index.html
+++ b/pkg/selinux/index.html
@@ -25,6 +25,7 @@ along with Cockpit; If not, see <https://www.gnu.org/licenses/>.
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="selinux.css" />
+ <link href="../../static/css-overrides.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="../base1/cockpit.js"></script>
<script type="text/javascript" src="../base1/po.js"></script>
--
2.49.0

25
esbuild-ppc64.patch Normal file
View File

@@ -0,0 +1,25 @@
From 22fe8bdedc8bb40cf2c9857fa73eb94985a1f664 Mon Sep 17 00:00:00 2001
From: Alice Brooks <alice.brooks@suse.com>
Date: Mon Feb 16 12:06:57 2026 +0000
Subject: Never use wasm
---
build.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build.js b/build.js
index 49fc9900a..5e57ebc62 100755
--- a/build.js
+++ b/build.js
@@ -10,7 +10,7 @@ import process from 'node:process';
import { getFiles, getTestFiles, all_subdirs } from './files.js';
const production = process.env.NODE_ENV === 'production';
-const useWasm = os.arch() != 'x64';
+const useWasm = false;
// ensure node_modules is present and up to date
child_process.spawnSync('tools/node-modules', ['make_package_lock_json'], { stdio: 'inherit' });
[Don't use esbuild wasm on ppc64
--
2.52.0

View File

@@ -1,34 +1,75 @@
Index: cockpit/pkg/metrics/metrics.jsx
===================================================================
--- cockpit.orig/pkg/metrics/metrics.jsx
+++ cockpit/pkg/metrics/metrics.jsx
@@ -1565,6 +1565,7 @@ const PCPConfig = ({ buttonVariant, firewalldRequest, needsLogout, setNeedsLogou
diff --git a/pkg/metrics/metrics.jsx b/pkg/metrics/metrics.jsx
index 80f1087..fda6049 100644
@@ -3,7 +3,7 @@
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
-import React, { useState, createRef } from 'react';
+import React, { useState, createRef, useEffect } from 'react';
import { Alert } from "@patternfly/react-core/dist/esm/components/Alert/index.js";
import { Breadcrumb, BreadcrumbItem } from "@patternfly/react-core/dist/esm/components/Breadcrumb/index.js";
@@ -1510,6 +1510,7 @@ const PCPConfigDialog = ({
const PCPConfig = ({ buttonVariant, firewalldRequest }) => {
const Dialogs = useDialogs();
const [packageInstallStatus, setPackageInstallStatus] = useState(null);
+ const [isMicroOs, setIsMicroOs] = useState(false);
const s_pmlogger = useObject(() => service.proxy("pmlogger.service"), null, []);
const s_pmproxy = useObject(() => service.proxy("pmproxy.service"), null, []);
@@ -1531,6 +1532,12 @@ const PCPConfig = ({ buttonVariant, firewalldRequest }) => {
"redis-server exists", s_redis_server.exists, "state", s_redis_server.state,
"valkey exists", s_valkey.exists, "state", s_valkey.state);
+ useEffect(() => {
+ read_os_release().then((os_release) => {
+ setIsMicroOs(os_release?.ID_LIKE.includes("sle-micro") || os_release?.ID_LIKE.includes("microos"))
+ });
+ }, []);
+
if (!superuser.allowed)
return null;
@@ -1543,8 +1550,13 @@ const PCPConfig = ({ buttonVariant, firewalldRequest }) => {
packageInstallCallback={() => setPackageInstallStatus("done")} />);
}
+ function is_micro_os() {
+ return ;
+ }
+
return (
<Button variant={buttonVariant} icon={<CogIcon />}
+ className="pf-u-display-none"
+ className={isMicroOs ? "pf-u-display-none" : ""}
isDisabled={ invalidService(s_pmlogger) || invalidService(s_pmproxy) ||
invalidService(s_redis) || invalidService(s_redis_server) || invalidService(s_valkey) }
onClick={show_dialog}>
Index: cockpit-309/pkg/metrics/metrics.jsx
===================================================================
--- cockpit-309.orig/pkg/metrics/metrics.jsx
+++ cockpit-309/pkg/metrics/metrics.jsx
@@ -1824,7 +1825,8 @@ class MetricsHistory extends React.Component {
onClick={show_dialog}
@@ -1578,6 +1590,7 @@ class MetricsHistory extends React.Component {
isBeibootBridge: false,
isPythonPCPInstalled: null,
selectedVisibility: this.columns.reduce((a, v) => ({ ...a, [v[0]]: true }), {}),
+ isMicroOs: false,
boots: [], // journalctl --list-boots as [{started: Date, ended: Date}]
};
@@ -1609,6 +1622,10 @@ class MetricsHistory extends React.Component {
// load and render the last 24 hours (plus current one) initially; this needs numCpu initialized for correct scaling
initialLoadData() {
+ read_os_release().then((os_release) => {
+ this.setState({ isMicroOs: os_release?.ID_LIKE.includes("sle-micro") || os_release?.ID_LIKE.includes("microos") });
+ });
+
cockpit.spawn(["date", "+%s"])
.then(out => {
const now = parseInt(out.trim()) * 1000;
@@ -1815,6 +1832,9 @@ class MetricsHistory extends React.Component {
}
render() {
+ if (this.state.isMicroOs)
+ return <></>;
+
// on a single machine, cockpit-pcp depends on pcp; but this may not be the case in the beiboot scenario,
// so additionally check if pcp is available on the logged in target machine
if ((cockpit.manifests && !cockpit.manifests.pcp) || this.pmlogger_service.exists === false)
- return <EmptyStatePanel
+ return <EmptyStatePanel />
+/* return <EmptyStatePanel
icon={ExclamationCircleIcon}
title={_("Package cockpit-pcp is missing for metrics history")}
action={this.state.isBeibootBridge === true
@@ -1834,6 +1834,7 @@ class MetricsHistory extends React.Component {
? <Text>{ _("Installation not supported without installed cockpit package") }</Text>
: this.state.packagekitExists && <Button onClick={this.handleInstall}>{_("Install cockpit-pcp")}</Button>}
/>;
+*/
if (!this.state.metricsAvailable) {
let action;
if (this.state.isPythonPCPInstalled === false || this.pmlogger_service.exists === false)

View File

@@ -1,153 +0,0 @@
From d1ffed4a006bc9f8aeb0e8f63e8d2a160720b4f6 Mon Sep 17 00:00:00 2001
From: Alice Brooks <alice.brooks@suse.com>
Date: Thu, 12 Jun 2025 08:48:16 +0100
Subject: [PATCH] kdump: Remove nfs directory when using sysconfig
configuration style
This is because the sysconfig style only has the KDUMP_SAVEDIR field
so we can't work with two path fields as it's impossible to extract
them again
---
pkg/kdump/kdump-client.js | 4 ++++
pkg/kdump/kdump-view.jsx | 24 +++++++++++++++---------
pkg/kdump/kdump.js | 6 ++++++
4 files changed, 26 insertions(+), 20 deletions(-)
diff --git a/pkg/kdump/kdump-client.js b/pkg/kdump/kdump-client.js
index d4c3d989a42d..35add2554a39 100644
--- a/pkg/kdump/kdump-client.js
+++ b/pkg/kdump/kdump-client.js
@@ -48,6 +48,7 @@ export class KdumpClient {
state: undefined,
config: undefined,
target: undefined,
+ sysconfig: undefined,
};
cockpit.event_target(this);
@@ -62,6 +63,7 @@ export class KdumpClient {
// watch the config file
this.configClient = new ConfigFile("/etc/kdump.conf", true);
+ this.state.sysconfig = false;
this._watchConfigChanges();
this.configClient.wait().then(() => {
@@ -69,6 +71,8 @@ export class KdumpClient {
if (this.configClient.settings === null) {
this.configClient.close();
this.configClient = new ConfigFileSUSE("/etc/sysconfig/kdump", true);
+ this.state.sysconfig = true;
+ this.dispatchEvent("kdumpSysconfigChanged", true);
this._watchConfigChanges();
}
});
diff --git a/pkg/kdump/kdump-view.jsx b/pkg/kdump/kdump-view.jsx
index c6cc1e0d6bc6..8b5d74707e39 100644
--- a/pkg/kdump/kdump-view.jsx
+++ b/pkg/kdump/kdump-view.jsx
@@ -115,12 +115,15 @@ const exportAnsibleTask = (settings, os_release) => {
return ansible;
};
-function getLocation(target) {
+function getLocation(target, sysconfig) {
let path = target.path || DEFAULT_KDUMP_PATH;
if (target.type === "ssh") {
path = `${target.server}:${path}`;
} else if (target.type == "nfs") {
+ if (sysconfig) {
+ path = '';
+ }
path = path[0] !== '/' ? '/' + path : path;
path = `${target.server}:${target.export + path}`;
}
@@ -128,7 +131,7 @@ function getLocation(target) {
return path;
}
-const KdumpSettingsModal = ({ settings, initialTarget, handleSave }) => {
+const KdumpSettingsModal = ({ settings, initialTarget, handleSave, sysconfig }) => {
const Dialogs = useDialogs();
const compressionAllowed = settings.compression?.allowed;
const [isSaving, setIsSaving] = useState(false);
@@ -276,13 +279,15 @@ const KdumpSettingsModal = ({ settings, initialTarget, handleSave }) => {
placeholder="/export/cores" value={exportPath}
onChange={(_event, value) => setExportPath(value)} isRequired />
</FormGroup>
+ {sysconfig === false &&
<FormGroup fieldId="kdump-settings-nfs-directory" label={_("Directory")} isRequired>
<TextInput id="kdump-settings-nfs-directory" key="directory"
- placeholder={DEFAULT_KDUMP_PATH} value={directory}
- data-stored={directory}
- onChange={(_event, value) => setDirectory(value)}
- isRequired />
+ placeholder={DEFAULT_KDUMP_PATH} value={directory}
+ data-stored={directory}
+ onChange={(_event, value) => setDirectory(value)}
+ isRequired />
</FormGroup>
+ }
</>
}
@@ -353,7 +358,7 @@ export class KdumpPage extends React.Component {
const target = this.props.kdumpStatus.target;
let verifyMessage;
if (!target.multipleTargets) {
- const path = getLocation(target);
+ const path = getLocation(target, this.props.sysconfig);
if (target.type === "local") {
verifyMessage = fmt_to_fragments(
' ' + _("Results of the crash will be stored in $0 as $1, if kdump is properly configured."),
@@ -403,7 +408,8 @@ export class KdumpPage extends React.Component {
const Dialogs = this.context;
Dialogs.show(<KdumpSettingsModal settings={this.props.kdumpStatus.config}
initialTarget={this.props.kdumpStatus.target}
- handleSave={this.props.onSaveSettings} />);
+ handleSave={this.props.onSaveSettings}
+ sysconfig={this.props.sysconfig} />);
}
handleAutomationClick() {
@@ -459,7 +465,7 @@ ${enableCrashKernel}
if (target.multipleTargets) {
kdumpLocation = _("invalid: multiple targets defined");
} else {
- const locationPath = getLocation(target);
+ const locationPath = getLocation(target, this.props.sysconfig);
if (target.type == "local") {
kdumpLocation = cockpit.format(_("Local, $0"), locationPath);
targetCanChange = true;
diff --git a/pkg/kdump/kdump.js b/pkg/kdump/kdump.js
index 1a143defef15..b0f75e88c220 100644
--- a/pkg/kdump/kdump.js
+++ b/pkg/kdump/kdump.js
@@ -41,6 +41,7 @@ const initStore = function(rootElement) {
dataStore.domRootElement = rootElement;
dataStore.kdumpClient = new kdumpClient.KdumpClient();
+ dataStore.sysconfig = dataStore.kdumpClient.state.sysconfig;
dataStore.saveSettings = settings =>
dataStore.kdumpClient.validateSettings(settings)
@@ -74,6 +75,7 @@ const initStore = function(rootElement) {
reservedMemory: dataStore.kdumpMemory,
kdumpStatus: dataStore.kdumpStatus,
kdumpCmdlineEnabled: dataStore.crashkernel || false,
+ sysconfig: dataStore.sysconfig,
onSaveSettings: dataStore.saveSettings,
onCrashKernel: dataStore.kdumpClient.crashKernel,
exportConfig: dataStore.exportConfig,
@@ -117,6 +119,10 @@ const initStore = function(rootElement) {
dataStore.kdumpStatus = status;
render();
});
+ dataStore.kdumpClient.addEventListener('kdumpSysconfigChanged', function(event, sysconfig) {
+ dataStore.sysconfig = sysconfig;
+ render();
+ });
// render once
render();

Binary file not shown.

File diff suppressed because it is too large Load Diff

2871
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -20,18 +20,16 @@ tens of seconds when there are thousands of packages.
2 files changed, 220 insertions(+), 25 deletions(-)
diff --git a/pkg/packagekit/updates.jsx b/pkg/packagekit/updates.jsx
index 80a16dda7..4fe94432a 100644
--- a/pkg/packagekit/updates.jsx
+++ b/pkg/packagekit/updates.jsx
@@ -80,6 +80,7 @@ import { debug } from './utils';
index 40fca0a..abc8c70 100644
@@ -67,6 +67,7 @@ import { read_os_release } from "os-release.js";
import callTracerScript from './callTracer.py';
import "./updates.scss";
+import { Checkbox } from '@patternfly/react-core';
const _ = cockpit.gettext;
@@ -93,6 +94,7 @@ const UPDATES = {
import { Truncate } from '@patternfly/react-core/dist/esm/components/Truncate/index.js';
import { Severity } from '_internal/packagemanager-abstract';
import { getPackageManager } from 'packagemanager';
@@ -95,6 +96,7 @@ const UPDATES = {
ALL: 0,
SECURITY: 1,
KPATCHES: 2,
@@ -39,7 +37,7 @@ index 80a16dda7..4fe94432a 100644
};
function init() {
@@ -117,6 +119,196 @@ function init() {
@@ -119,6 +121,195 @@ function init() {
PK_STATUS_LOG_STRINGS[PK.Enum.STATUS_SIGCHECK] = _("Verified");
}
@@ -232,11 +230,10 @@ index 80a16dda7..4fe94432a 100644
+ return allIds.filter((id) => !!!state.selected[id]);
+}
+
+
// parse CVEs from an arbitrary text (changelog) and return URL array
function parseCVEs(text) {
if (!text)
@@ -401,6 +593,7 @@ function updateItem(remarkable, info, pkgNames, key) {
function deduplicate(list) {
return [...new Set(list)].sort();
}
@@ -381,6 +572,7 @@ function updateItem(remarkable, info, pkgNames, key) {
{ title: <TableText wrapModifier="truncate">{info.version}</TableText>, props: { className: "version" } },
{ title: <TableText wrapModifier="nowrap">{type}</TableText>, props: { className: "type" } },
{ title: descriptionFirstLine, props: { className: "changelog" } },
@@ -244,15 +241,15 @@ index 80a16dda7..4fe94432a 100644
],
props: {
key,
@@ -451,6 +644,7 @@ const UpdatesList = ({ updates }) => {
@@ -430,6 +622,7 @@ const UpdatesList = ({ updates }) => {
{ title: _("Version"), props: { width: 15 } },
{ title: _("Severity"), props: { width: 15 } },
{ title: _("Details"), props: { width: 30 } },
+ { title: _("Select update") },
]}
rows={update_ids.map(id => updateItem(remarkable, updates[id], packageNames[id].sort((a, b) => a.name > b.name), id))} />
rows={combined_updates.map(update => updateItem(remarkable, update, packageNames[update.id].sort((a, b) => a.name > b.name), update.id))} />
);
@@ -932,25 +1126,12 @@ class CardsPage extends React.Component {
@@ -913,25 +1106,12 @@ class CardsPage extends React.Component {
id: "available-updates",
title: _("Available updates"),
actions: (<div className="pk-updates--header--actions">
@@ -281,7 +278,7 @@ index 80a16dda7..4fe94432a 100644
</div>),
containsList: true,
body: <UpdatesList updates={this.props.updates} />
@@ -1397,13 +1578,19 @@ class OsUpdates extends React.Component {
@@ -1315,13 +1495,19 @@ class OsUpdates extends React.Component {
});
}
@@ -290,11 +287,11 @@ index 80a16dda7..4fe94432a 100644
+ * @param {SelecetedState=} selected
+ */
+ applyUpdates(type, selected) {
let ids = Object.keys(this.state.updates);
let updates = [...this.state.updates];
if (type === UPDATES.SECURITY)
ids = ids.filter(id => this.state.updates[id].severity === PK.Enum.INFO_SECURITY);
updates = updates.filter(update => update.severity === Severity.CRITICAL);
if (type === UPDATES.KPATCHES) {
ids = ids.filter(id => isKpatchPackage(this.state.updates[id].name));
updates = updates.filter(update => isKpatchPackage(update.name));
}
+ if (type === UPDATES.SELECTED && selected) {
+ ids = calculateSelected(ids, selected);
@@ -302,7 +299,7 @@ index 80a16dda7..4fe94432a 100644
PK.transaction()
.then(transactionPath => {
@@ -1429,6 +1616,8 @@ class OsUpdates extends React.Component {
@@ -1347,6 +1533,8 @@ class OsUpdates extends React.Component {
let applySecurity;
let applyKpatches;
let applyAll;
@@ -311,7 +308,7 @@ index 80a16dda7..4fe94432a 100644
/* On unregistered RHEL systems we need some heuristics: If the "main" OS repos (which provide coreutils) require
* a subscription, then point this out and don't show available updates, even if there are some auxiliary
@@ -1483,12 +1672,8 @@ class OsUpdates extends React.Component {
@@ -1399,12 +1587,8 @@ class OsUpdates extends React.Component {
const num_kpatches = count_kpatch_updates(this.state.updates);
const highest_severity = find_highest_severity(this.state.updates);
@@ -326,7 +323,7 @@ index 80a16dda7..4fe94432a 100644
if (num_security_updates > 0 && num_updates > num_security_updates) {
applySecurity = (
@@ -1529,6 +1714,8 @@ class OsUpdates extends React.Component {
@@ -1445,6 +1629,8 @@ class OsUpdates extends React.Component {
<CardsPage handleRefresh={this.handleRefresh}
applySecurity={applySecurity}
applyAll={applyAll}
@@ -335,9 +332,9 @@ index 80a16dda7..4fe94432a 100644
applyKpatches={applyKpatches}
highestSeverity={highest_severity}
onValueChanged={this.onValueChanged}
@@ -1717,5 +1904,9 @@ document.addEventListener("DOMContentLoaded", () => {
document.title = cockpit.gettext(document.title);
init();
@@ -1642,5 +1828,9 @@ document.addEventListener("DOMContentLoaded", async () => {
}
const root = createRoot(document.getElementById('app'));
- root.render(<OsUpdates />);
+ root.render(
@@ -347,10 +344,10 @@ index 80a16dda7..4fe94432a 100644
+ );
});
diff --git a/pkg/packagekit/updates.scss b/pkg/packagekit/updates.scss
index 05494fe85..6b2c80035 100644
index 174d6fd..82979ff 100644
--- a/pkg/packagekit/updates.scss
+++ b/pkg/packagekit/updates.scss
@@ -68,7 +68,7 @@
@@ -71,7 +71,7 @@
}
&, p {
@@ -359,7 +356,7 @@ index 05494fe85..6b2c80035 100644
margin-block-end: 0; // counter-act <Markdown>
overflow: hidden;
text-overflow: ellipsis;
@@ -272,3 +272,7 @@ table.header-buttons {
@@ -280,3 +280,7 @@ table.header-buttons {
.ct-info-circle {
color: var(--pf-t--global--icon--color--status--info--default);
}
@@ -367,7 +364,3 @@ index 05494fe85..6b2c80035 100644
+td.select-update {
+ min-width: 8vw;
+}
\ No newline at end of file
--
2.49.0

View File

@@ -1,7 +1,16 @@
diff --git a/pkg/networkmanager/bond.jsx b/pkg/networkmanager/bond.jsx
index b54b1db..062cd1d 100644
index f56f02961..cae872b00 100644
--- a/pkg/networkmanager/bond.jsx
+++ b/pkg/networkmanager/bond.jsx
@@ -24,7 +24,7 @@ import { FormGroup } from "@patternfly/react-core/dist/esm/components/Form/index
import { FormSelect, FormSelectOption } from "@patternfly/react-core/dist/esm/components/FormSelect/index.js";
import { Popover } from "@patternfly/react-core/dist/esm/components/Popover/index.js";
import { TextInput } from "@patternfly/react-core/dist/esm/components/TextInput/index.js";
-import { ExternalLinkSquareAltIcon, HelpIcon } from '@patternfly/react-icons';
+import { HelpIcon } from '@patternfly/react-icons';
import { MacMenu, MemberInterfaceChoices, NetworkModal, Name, dialogSave } from './dialogs-common.jsx';
import { ModelContext } from './model-context.jsx';
@@ -151,16 +151,6 @@ export const BondDialog = ({ connection, dev, settings }) => {
{_("A network bond combines multiple network interfaces into one logical interface with higher throughput or redundancy.")}
</div>
@@ -17,10 +26,10 @@ index b54b1db..062cd1d 100644
- </Button>
- }
>
<Button id="bond-help-popup-button" variant="plain" aria-label="Help">
<HelpIcon />
<Button icon={<HelpIcon />} id="bond-help-popup-button" variant="plain" aria-label="Help" />
</Popover>
diff --git a/pkg/systemd/hwinfo.jsx b/pkg/systemd/hwinfo.jsx
index d2d2d9b..af0bedc 100644
index d301f60a6..886bc6b0e 100644
--- a/pkg/systemd/hwinfo.jsx
+++ b/pkg/systemd/hwinfo.jsx
@@ -205,11 +205,6 @@ const CPUSecurityMitigationsDialog = () => {
@@ -36,7 +45,7 @@ index d2d2d9b..af0bedc 100644
</DataListCell>,
]}
diff --git a/pkg/systemd/overview-cards/cryptoPolicies.jsx b/pkg/systemd/overview-cards/cryptoPolicies.jsx
index fa57de9..d4dd3be 100644
index 6ee533993..aeb31ba16 100644
--- a/pkg/systemd/overview-cards/cryptoPolicies.jsx
+++ b/pkg/systemd/overview-cards/cryptoPolicies.jsx
@@ -143,7 +143,7 @@ const CryptoPolicyDialog = ({
@@ -63,13 +72,13 @@ index fa57de9..d4dd3be 100644
- </Button>
- }
>
<Button variant="plain" aria-label={_("Help")}>
<HelpIcon />
<Button icon={<HelpIcon />} variant="plain" aria-label={_("Help")} />
</Popover>
diff --git a/pkg/systemd/overview-cards/tuned-dialog.jsx b/pkg/systemd/overview-cards/tuned-dialog.jsx
index 38420ca..cd7e2a3 100644
index b67631b7d..b36ad88e3 100644
--- a/pkg/systemd/overview-cards/tuned-dialog.jsx
+++ b/pkg/systemd/overview-cards/tuned-dialog.jsx
@@ -278,36 +278,10 @@ const TunedDialog = ({
@@ -278,38 +278,13 @@ const TunedDialog = ({
};
}, [tunedService]);
@@ -92,9 +101,7 @@ index 38420ca..cd7e2a3 100644
- </Button>
- }
- >
- <Button variant="plain" aria-label={_("Help")}>
- <HelpIcon />
- </Button>
- <Button icon={<HelpIcon />} variant="plain" aria-label={_("Help")} />
- </Popover>
- );
-
@@ -102,7 +109,12 @@ index 38420ca..cd7e2a3 100644
<Modal position="top" variant="medium"
className="ct-m-stretch-body"
isOpen
- help={help}
onClose={() => dialogResult.resolve()}
title={_("Change performance profile")}
footer={
>
- <ModalHeader title={_("Change performance profile")}
- help={help}
- />
+ <ModalHeader title={_("Change performance profile")} />
<ModalBody>
{error && <ModalError dialogError={typeof error == 'string' ? error : error.message} />}
{loading && <EmptyStatePanel loading />}

48
update_version.sh Normal file → Executable file
View File

@@ -4,11 +4,19 @@ set -e
curVersion=$(grep Version: cockpit.spec | sed -e 's,^\(\s*Version:\s*\)\(.*\)\s*$,\2,')
if [[ ! "$curVersion" =~ ^[0-9]+$ ]]; then
if [[ ! "$curVersion" =~ ^[0-9]+(.[0-9]+)?$ ]]; then
echo "Error: curVersion is not a valid integer"
exit 1
fi
if [[ "$curVersion" =~ '.' ]]; then
curMajor=$(echo ${curVersion} | cut -d'.' -f1)
curMinor=$(echo ${curVersion} | cut -d'.' -f2)
else
curMajor=$curVersion
curMinor='0'
fi
###
### Fetch latest soruces
###
@@ -31,10 +39,23 @@ fi
newVersion=$(git -C cockpit tag | grep '^[0-9.]\+$' | sort -rn | head -1)
echo "Current version: $curVersion"
echo " New version: $newVersion"
if [[ ! "$newVersion" =~ ^[0-9]+(.[0-9]+)?$ ]]; then
echo "Error: newVersion cannot be determined"
exit 1
fi
if [ "$curVersion" -ge "$newVersion" ]; then
if [[ "$newVersion" =~ '.' ]]; then
newMajor=$(echo ${newVersion} | cut -d'.' -f1)
newMinor=$(echo ${newVersion} | cut -d'.' -f2)
else
newMajor=$newVersion
newMinor='0'
fi
if [ "$curMajor" -gt "$newMajor" ]; then
echo "Nothing to do."
exit 0
elif [[ "$curMajor" -eq "$newMajor" && "$curMinor" -ge "$newMinor" ]]; then
echo "Nothing to do."
exit 0
fi
@@ -42,15 +63,19 @@ fi
###
### UPDATE
###
# # initialize all submodules
git -C cockpit checkout $newVersion
git -C cockpit submodule update --init --depth 1
diff cockpit/node_modules/.package.json cockpit/package.json
cp cockpit/node_modules/.package-lock.json package-lock.json
pushd $PWD
cd cockpit
npm install --include optional
rm -rf node_modules
popd
cp "cockpit/package-lock.json" .
# update node_modules
osc service mr
rm --verbose *.tgz || true
# # initialize all submodules
git -C cockpit submodule update --init --depth 1
# remove node_modules and tests
git -C cockpit submodule deinit node_modules test/reference
@@ -82,7 +107,7 @@ echo "Archive created: cockpit-$newVersion.tar"
git -C cockpit remote show suse || git -C cockpit remote add suse git@github.com:openSUSE/cockpit.git
git -C cockpit fetch suse opensuse-$curVersion
git -C cockpit checkout -b opensuse-$newVersion suse/opensuse-$curVersion
git -C cockpit rebase -i $newVersion
git -C cockpit rebase -i $newVersion || true
echo "Don't forget to:"
echo " 1. finish rebase"
@@ -92,4 +117,5 @@ echo " 4. set new default branch on GitHub"
# Updating version in spec file
sed -i -e "s,^\(\s*Version:\s*\)\(.*\)\s*$,\1${newVersion}," cockpit/tools/cockpit.spec
git rm cockpit-$curVersion.tar.gz
git add cockpit-$newVersion.tar.gz