forked from cockpit/cockpit
Compare commits
1 Commits
drop_dup_m
...
SLE_micro_
Author | SHA256 | Date | |
---|---|---|---|
f6ce3ad82b
|
@@ -0,0 +1,51 @@
|
||||
From ec3a1efce07770b7641e07d41a73732967c65175 Mon Sep 17 00:00:00 2001
|
||||
From: Luna D Dragon <luna.dragon@suse.com>
|
||||
Date: Tue, 8 Jul 2025 14:58:03 +0530
|
||||
Subject: [PATCH 1/3] cockpit overview: support SUSE_SUPPORT_PRODUCT keys
|
||||
|
||||
SLE Micro 6.2(and Framework one components) have custom os-release keys namely in SUSE_SUPPORT_PRODUCT and
|
||||
SUSE_SUPPORT_PRODUCT_VERSION instead of the standard os prettyname which
|
||||
results in systemd not being able to determine the os name correctly.
|
||||
This patch should be dropped when systemd is fixed
|
||||
---
|
||||
pkg/systemd/overview.jsx | 10 ++++++++--
|
||||
1 file changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/pkg/systemd/overview.jsx b/pkg/systemd/overview.jsx
|
||||
index 868469d68..186fcf59e 100644
|
||||
--- a/pkg/systemd/overview.jsx
|
||||
+++ b/pkg/systemd/overview.jsx
|
||||
@@ -42,6 +42,7 @@ import { ShutdownModal } from 'cockpit-components-shutdown.jsx';
|
||||
import { WithDialogs, DialogsContext } from "dialogs.jsx";
|
||||
|
||||
import "./overview.scss";
|
||||
+import { read_os_release } from "os-release.js";
|
||||
|
||||
const _ = cockpit.gettext;
|
||||
|
||||
@@ -98,6 +99,7 @@ class OverviewPage extends React.Component {
|
||||
this.hostname_proxy.addEventListener("changed", data => {
|
||||
this.setState({ hostnameData: data.detail });
|
||||
});
|
||||
+ read_os_release().then(os_release => this.setState({ os_release }));
|
||||
}
|
||||
|
||||
render() {
|
||||
@@ -160,8 +162,12 @@ class OverviewPage extends React.Component {
|
||||
{this.hostname_text()}
|
||||
</h1>
|
||||
{this.state.hostnameData &&
|
||||
- this.state.hostnameData.OperatingSystemPrettyName &&
|
||||
- <div className="ct-overview-header-subheading" id="system_information_os_text">{cockpit.format(_("running $0"), this.state.hostnameData.OperatingSystemPrettyName)}</div>}
|
||||
+ this.state.hostnameData.OperatingSystemPrettyName && (
|
||||
+ <div className="ct-overview-header-subheading" id="system_information_os_text">
|
||||
+ {(this.state.os_release && this.state.os_release.SUSE_PRETTY_NAME)
|
||||
+ ? cockpit.format(_("running $0"), this.state.os_release.SUSE_PRETTY_NAME)
|
||||
+ : cockpit.format(_("running $0"), this.state.hostnameData.OperatingSystemPrettyName)}
|
||||
+ </div>)}
|
||||
</div>
|
||||
<div className='ct-overview-header-actions'>
|
||||
{ show_superuser && <SuperuserIndicator proxy={this.superuser} /> }
|
||||
--
|
||||
2.50.0
|
||||
|
37
0002-cockpit-kdump-support-SLE-micro-6.2.patch
Normal file
37
0002-cockpit-kdump-support-SLE-micro-6.2.patch
Normal file
@@ -0,0 +1,37 @@
|
||||
From 14b86b6d60b009c4294f06589a561e688ba49223 Mon Sep 17 00:00:00 2001
|
||||
From: Luna D Dragon <luna.dragon@suse.com>
|
||||
Date: Tue, 8 Jul 2025 14:58:25 +0530
|
||||
Subject: [PATCH 2/3] cockpit-kdump support SLE micro 6.2
|
||||
|
||||
SLE micro 6.2 no longer has MicroOS in the NAME. This updates it to
|
||||
check if the VARIANT_ID is transactional to use transactional-update
|
||||
over manually enabling kdump.
|
||||
---
|
||||
pkg/kdump/kdump-view.jsx | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/pkg/kdump/kdump-view.jsx b/pkg/kdump/kdump-view.jsx
|
||||
index eee4d16b1..7d8439f2b 100644
|
||||
--- a/pkg/kdump/kdump-view.jsx
|
||||
+++ b/pkg/kdump/kdump-view.jsx
|
||||
@@ -421,7 +421,7 @@ export class KdumpPage extends React.Component {
|
||||
kdumpctl reset-crashkernel`;
|
||||
}
|
||||
let shell;
|
||||
- if (this.state.os_release.NAME?.includes('MicroOS')) {
|
||||
+ if (this.state.os_release.NAME?.includes('MicroOS') || this.state.os_release.VARIANT_ID?.includes("transactional")) {
|
||||
enableCrashKernel = `
|
||||
# A reboot will be required if crashkernel was not set before
|
||||
transactional-update setup-kdump`;
|
||||
@@ -443,7 +443,7 @@ ${enableCrashKernel}
|
||||
|
||||
Dialogs.show(
|
||||
<ModificationsExportDialog
|
||||
- ansible={ this.state.os_release.NAME?.includes('MicroOS') ? null : exportAnsibleTask(this.props.kdumpStatus.config, this.state.os_release)}
|
||||
+ ansible={ (this.state.os_release.NAME?.includes('MicroOS') || this.state.os_release.VARIANT_ID?.includes("transactional")) ? null : exportAnsibleTask(this.props.kdumpStatus.config, this.state.os_release)}
|
||||
shell={shell}
|
||||
onClose={Dialogs.close}
|
||||
/>);
|
||||
--
|
||||
2.50.0
|
||||
|
136
0003-branding-use-SUSE_SUPPORT_PRODUCT-and-SUSE_SUPPORT_P.patch
Normal file
136
0003-branding-use-SUSE_SUPPORT_PRODUCT-and-SUSE_SUPPORT_P.patch
Normal file
@@ -0,0 +1,136 @@
|
||||
From cfc476e5127ee3f21b70124e77ded9627e9692b5 Mon Sep 17 00:00:00 2001
|
||||
From: Luna D Dragon <luna.dragon@suse.com>
|
||||
Date: Tue, 8 Jul 2025 15:09:09 +0530
|
||||
Subject: [PATCH 3/3] branding: use SUSE_SUPPORT_PRODUCT and
|
||||
SUSE_SUPPORT_PRODUCT_VERSION
|
||||
|
||||
---
|
||||
Makefile.am | 1 +
|
||||
src/branding/suse/Makefile.am | 11 +++++
|
||||
src/branding/suse/branding.css | 82 ++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 94 insertions(+)
|
||||
create mode 100644 src/branding/suse/Makefile.am
|
||||
create mode 100644 src/branding/suse/branding.css
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 83f1ee7a7..1198d191e 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -167,6 +167,7 @@ include src/branding/debian/Makefile.am
|
||||
include src/branding/default/Makefile.am
|
||||
include src/branding/fedora/Makefile.am
|
||||
include src/branding/opensuse/Makefile.am
|
||||
+include src/branding/suse/Makefile.am
|
||||
include src/branding/rhel/Makefile.am
|
||||
include src/branding/ubuntu/Makefile.am
|
||||
include src/client/Makefile.am
|
||||
diff --git a/src/branding/suse/Makefile.am b/src/branding/suse/Makefile.am
|
||||
new file mode 100644
|
||||
index 000000000..4a1e7ab72
|
||||
--- /dev/null
|
||||
+++ b/src/branding/suse/Makefile.am
|
||||
@@ -0,0 +1,11 @@
|
||||
+slemicrobrandingdir = $(datadir)/cockpit/branding/suse
|
||||
+
|
||||
+dist_slemicrobranding_DATA = \
|
||||
+ src/branding/suse/branding.css \
|
||||
+ $(NULL)
|
||||
+
|
||||
+install-data-hook::
|
||||
+ ln -sf /usr/share/wallpapers/SLEdefault/contents/images/1920x1200.png $(DESTDIR)$(slemicrobrandingdir)/default-1920x1200.png
|
||||
+ ln -sf /usr/share/pixmaps/distribution-logos/square-hicolor.svg $(DESTDIR)$(slemicrobrandingdir)/square-hicolor.svg
|
||||
+ ln -sf /usr/share/pixmaps/distribution-logos/favicon.ico $(DESTDIR)$(slemicrobrandingdir)/favicon.ico
|
||||
+ ln -sf /usr/share/pixmaps/distribution-logos/apple-touch-icon.png $(DESTDIR)$(slemicrobrandingdir)/apple-touch-icon.png
|
||||
\ No newline at end of file
|
||||
diff --git a/src/branding/suse/branding.css b/src/branding/suse/branding.css
|
||||
new file mode 100644
|
||||
index 000000000..c1617abc2
|
||||
--- /dev/null
|
||||
+++ b/src/branding/suse/branding.css
|
||||
@@ -0,0 +1,82 @@
|
||||
+/* Extra overrides */
|
||||
+:root {
|
||||
+ --eos-bc-green-500: #30ba78;
|
||||
+ --eos-bc-pine-500: #0c322c;
|
||||
+ --eos-bc-gray-50: #F2F2F2;
|
||||
+ --eos-bc-white: #ffffff;
|
||||
+ --eos-bc-text: #333;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+#brand:before {
|
||||
+ content: "${SUSE_PRETTY_NAME}";
|
||||
+}
|
||||
+
|
||||
+#option-group svg polygon {
|
||||
+ fill: var(--eos-bc-text);
|
||||
+}
|
||||
+
|
||||
+/* Nav & sidebar overwrites */
|
||||
+.navbar-pf {
|
||||
+ background: var(--eos-bc-pine-500);
|
||||
+}
|
||||
+
|
||||
+.navbar-pf-vertical {
|
||||
+ border-top: none;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/* Default overrides */
|
||||
+
|
||||
+.login-note {
|
||||
+ color: transparent;
|
||||
+ position: relative;
|
||||
+}
|
||||
+
|
||||
+body.login-pf {
|
||||
+ background-color: var(--eos-bc-pine-500);
|
||||
+}
|
||||
+
|
||||
+/* Only use background image on desktops */
|
||||
+@media(min-width: 1024px) {
|
||||
+ body.login-pf {
|
||||
+ background-image: url("default-1920x1200.png") !important;
|
||||
+ background-repeat: no-repeat;
|
||||
+ background-position: 100% 0 !important;
|
||||
+ background-size: cover;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+/* Hide badge on desktops (already included in background) */
|
||||
+@media(max-width: 1023px) {
|
||||
+ #badge {
|
||||
+ width: 51px;
|
||||
+ height: 45px;
|
||||
+ background-image: url("square-hicolor.svg");
|
||||
+ background-repeat: no-repeat;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+#brand {
|
||||
+ width: auto;
|
||||
+ height: auto;
|
||||
+ background-image: none;
|
||||
+ background-repeat: no-repeat;
|
||||
+ font-size: 2em;
|
||||
+ white-space: nowrap;
|
||||
+}
|
||||
+
|
||||
+/* Switch to small font faster to not clip long name */
|
||||
+@media(max-width: 560px) {
|
||||
+ #brand {
|
||||
+ font-size: inherit;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+#index-brand {
|
||||
+ font-weight: bold;
|
||||
+}
|
||||
+
|
||||
+#index-brand:before {
|
||||
+ content: "${PRETTY_NAME}";
|
||||
+}
|
||||
\ No newline at end of file
|
||||
--
|
||||
2.50.0
|
||||
|
@@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 15 07:00:10 UTC 2025 - Luna D Dragon <luna.dragon@suse.com>
|
||||
|
||||
- add 0001-cockpit-overview-support-SUSE_SUPPORT_PRODUCT-keys.patch
|
||||
- add 0002-cockpit-kdump-support-SLE-micro-6.2.patch
|
||||
- add 0003-branding-use-SUSE_SUPPORT_PRODUCT-and-SUSE_SUPPORT_P.patch to fix bsc#1241003
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 11 06:50:17 UTC 2025 - Alice Brooks <alice.brooks@suse.com>
|
||||
|
||||
|
13
cockpit.spec
13
cockpit.spec
@@ -81,6 +81,9 @@ Patch105: fix-libexecdir.patch
|
||||
Patch106: packagekit-single-install.patch
|
||||
Patch109: 0008-pybridge-endian-flag.patch
|
||||
Patch110: add_preexec_cockpit.patch
|
||||
Patch111: 0001-cockpit-overview-support-SUSE_SUPPORT_PRODUCT-keys.patch
|
||||
Patch112: 0002-cockpit-kdump-support-SLE-micro-6.2.patch
|
||||
Patch113: 0003-branding-use-SUSE_SUPPORT_PRODUCT-and-SUSE_SUPPORT_P.patch
|
||||
Patch201: remove_rh_links.patch
|
||||
|
||||
%define build_all 1
|
||||
@@ -213,7 +216,13 @@ BuildRequires: python3-pytest-timeout
|
||||
%setup -q -n cockpit-%{version} -a 3
|
||||
%patch -P 1 -p1
|
||||
%patch -P 2 -p1
|
||||
|
||||
%if 0%{?is_opensuse} || 0%{?suse_version} < 1600
|
||||
%patch -P 3 -p1
|
||||
%else
|
||||
%patch -P 113 -p1
|
||||
%endif
|
||||
|
||||
%patch -P 4 -p1
|
||||
%patch -P 5 -p1
|
||||
%patch -P 6 -p1
|
||||
@@ -242,6 +251,10 @@ BuildRequires: python3-pytest-timeout
|
||||
|
||||
%if 0%{?suse_version} >= 1600
|
||||
%patch -P 110 -p1
|
||||
%if !0%{?is_opensuse}
|
||||
%patch -P 111 -p1
|
||||
%patch -P 112 -p1
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%patch -P 201 -p1
|
||||
|
Reference in New Issue
Block a user