forked from cockpit/cockpit
Compare commits
4 Commits
update-340
...
check-for-
Author | SHA256 | Date | |
---|---|---|---|
228138217c
|
|||
1d9add8241
|
|||
124ad7108d
|
|||
b8985dff0b
|
49
0009-add-test-to-check-for-redhat-links.patch
Normal file
49
0009-add-test-to-check-for-redhat-links.patch
Normal file
@@ -0,0 +1,49 @@
|
||||
From 00ee76e052cce67006cb794ed6e770a6207fb766 Mon Sep 17 00:00:00 2001
|
||||
From: Alice Brooks <alice.brooks@suse.com>
|
||||
Date: Tue, 15 Jul 2025 04:15:19 +0100
|
||||
Subject: [PATCH] Add test to check for redhat links
|
||||
|
||||
---
|
||||
Makefile.am | 1 +
|
||||
test/common/check-links | 17 +++++++++++++++++
|
||||
2 files changed, 18 insertions(+)
|
||||
create mode 100755 test/common/check-links
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 83f1ee7..97cfc6a 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -80,6 +80,7 @@ distcheck-hook::
|
||||
|
||||
TESTS = \
|
||||
test/common/static-code \
|
||||
+ test/common/check-links \
|
||||
$(NULL)
|
||||
|
||||
clean-local::
|
||||
diff --git a/test/common/check-links b/test/common/check-links
|
||||
new file mode 100755
|
||||
index 0000000..6af98a8
|
||||
--- /dev/null
|
||||
+++ b/test/common/check-links
|
||||
@@ -0,0 +1,17 @@
|
||||
+#!/bin/sh
|
||||
+
|
||||
+set -u
|
||||
+
|
||||
+find pkg -type f -name manifest.json | xargs jq -r '.[]?.[]?.docs?.[]?.url' | grep -v "jq: error" | grep redhat
|
||||
+
|
||||
+if [ $? -eq 0 ]; then
|
||||
+ echo "Redhat links exist in manifest.json please update the relevant patches" >&2
|
||||
+ exit 1
|
||||
+fi
|
||||
+
|
||||
+find pkg -type f | grep -v manifest.json | xargs grep docs.redhat
|
||||
+
|
||||
+if [ $? -eq 0 ]; then
|
||||
+ echo "Redhat links exist in pkg/ please update the relevant patches" >&2
|
||||
+ exit 1
|
||||
+fi
|
||||
--
|
||||
2.50.0
|
||||
|
@@ -1,3 +1,22 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 15 05:13:32 UTC 2025 - Alice Brooks <alice.brooks@suse.com>
|
||||
|
||||
- add 0009-add-test-to-check-for-redhat-links.patch so we can check
|
||||
during package build if the user would be accidently shown a redhat
|
||||
link
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 11 06:50:17 UTC 2025 - Alice Brooks <alice.brooks@suse.com>
|
||||
|
||||
- add libzypp-plugin-appdata dependency to cockpit-packagekit as
|
||||
this will generate the swcatalog which it depends on for calculating
|
||||
various cockpit packages
|
||||
|
||||
-------------------------------------------------------------------
|
||||
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>
|
||||
|
||||
|
@@ -68,6 +68,8 @@ Patch2: suse_docs.patch
|
||||
Patch3: suse-microos-branding.patch
|
||||
Patch4: css-overrides.patch
|
||||
Patch5: storage-btrfs.patch
|
||||
Patch6: kdump-nfs-fixes.patch
|
||||
Patch7: 0009-add-test-to-check-for-redhat-links.patch
|
||||
# SLE Micro specific patches
|
||||
Patch101: hide-pcp.patch
|
||||
Patch102: 0002-selinux-temporary-remove-setroubleshoot-section.patch
|
||||
@@ -145,6 +147,7 @@ BuildRequires: pkgconfig(krb5) >= 1.11
|
||||
BuildRequires: libxslt-devel
|
||||
BuildRequires: glib-networking
|
||||
BuildRequires: sed
|
||||
BuildRequires: jq
|
||||
|
||||
BuildRequires: glib2-devel >= 2.50.0
|
||||
# this is for runtimedir in the tls proxy ace21c8879
|
||||
@@ -215,6 +218,8 @@ BuildRequires: python3-pytest-timeout
|
||||
%patch -P 3 -p1
|
||||
%patch -P 4 -p1
|
||||
%patch -P 5 -p1
|
||||
%patch -P 6 -p1
|
||||
%patch -P 7 -p1
|
||||
|
||||
%patch -P 106 -p1
|
||||
%patch -P 109 -p1
|
||||
@@ -896,6 +901,7 @@ Summary: Cockpit user interface for packages
|
||||
BuildArch: noarch
|
||||
Requires: cockpit-bridge >= %{required_base}
|
||||
Requires: PackageKit
|
||||
Requires: libzypp-plugin-appdata
|
||||
Recommends: python3-tracer
|
||||
# HACK: https://bugzilla.redhat.com/show_bug.cgi?id=1800468
|
||||
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