forked from cockpit/cockpit
Compare commits
2 Commits
update-340
...
add-libzyp
Author | SHA256 | Date | |
---|---|---|---|
124ad7108d
|
|||
b8985dff0b
|
@@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jun 19 08:30:49 UTC 2025 - Alice Brooks <alice.brooks@suse.com>
|
||||||
|
|
||||||
|
- Add kdump-nfs-fixes.patch to fix bsc#1241949
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jun 16 06:29:04 UTC 2025 - Alice Brooks <alice.brooks@suse.com>
|
Mon Jun 16 06:29:04 UTC 2025 - Alice Brooks <alice.brooks@suse.com>
|
||||||
|
|
||||||
|
@@ -68,6 +68,7 @@ Patch2: suse_docs.patch
|
|||||||
Patch3: suse-microos-branding.patch
|
Patch3: suse-microos-branding.patch
|
||||||
Patch4: css-overrides.patch
|
Patch4: css-overrides.patch
|
||||||
Patch5: storage-btrfs.patch
|
Patch5: storage-btrfs.patch
|
||||||
|
Patch6: kdump-nfs-fixes.patch
|
||||||
# SLE Micro specific patches
|
# SLE Micro specific patches
|
||||||
Patch101: hide-pcp.patch
|
Patch101: hide-pcp.patch
|
||||||
Patch102: 0002-selinux-temporary-remove-setroubleshoot-section.patch
|
Patch102: 0002-selinux-temporary-remove-setroubleshoot-section.patch
|
||||||
@@ -215,6 +216,7 @@ BuildRequires: python3-pytest-timeout
|
|||||||
%patch -P 3 -p1
|
%patch -P 3 -p1
|
||||||
%patch -P 4 -p1
|
%patch -P 4 -p1
|
||||||
%patch -P 5 -p1
|
%patch -P 5 -p1
|
||||||
|
%patch -P 6 -p1
|
||||||
|
|
||||||
%patch -P 106 -p1
|
%patch -P 106 -p1
|
||||||
%patch -P 109 -p1
|
%patch -P 109 -p1
|
||||||
@@ -896,6 +898,7 @@ Summary: Cockpit user interface for packages
|
|||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
Requires: cockpit-bridge >= %{required_base}
|
Requires: cockpit-bridge >= %{required_base}
|
||||||
Requires: PackageKit
|
Requires: PackageKit
|
||||||
|
Requires: libzypp-plugin-appdata
|
||||||
Recommends: python3-tracer
|
Recommends: python3-tracer
|
||||||
# HACK: https://bugzilla.redhat.com/show_bug.cgi?id=1800468
|
# HACK: https://bugzilla.redhat.com/show_bug.cgi?id=1800468
|
||||||
Requires: polkit
|
Requires: polkit
|
||||||
|
153
kdump-nfs-fixes.patch
Normal file
153
kdump-nfs-fixes.patch
Normal file
@@ -0,0 +1,153 @@
|
|||||||
|
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();
|
Reference in New Issue
Block a user