diff mbox series

[kirkstone] Issues with patching cockpit

Message ID CABFt5omREG42Kqo8UfA48aCj76-jarcJhUxAEUJ0v_yYk3dSuQ@mail.gmail.com
State New
Headers show
Series [kirkstone] Issues with patching cockpit | expand

Commit Message

Anna-Lena Marx April 2, 2024, 12:34 p.m. UTC
Hi all,
I had some issues with patching cockpit-220 in kirkstone and hoping
for validation, ideas and support here.

cockpit has a bug in v220, which is fixed in newer releases.
When trying to apply the modified diff for 220, the patch itself
appies but causes a not expected compilation error:

| ../cockpit-220/src/ws/test-kerberos.c: In function 'mock_kdc_start':
| ../cockpit-220/src/ws/test-kerberos.c:406:11: warning: this 'if'
clause does not guard... [-Wmisleading-indentation]
|   406 |           if (errno != EAGAIN && errno != EINTR)
|       |           ^~
| ../cockpit-220/src/ws/test-kerberos.c:408:13: note: ...this
statement, but the latter is misleadingly indented as if it were
guarded by the 'if'
|   408 |             break;
|       |             ^~~~~
| /build/tmp-glibc/hosttools/mkdir -p ./ && sed -e
's,[@]datadir[@],/usr/share,g' -e 's,[@]libexecdir[@],/usr/libexec,g'
-e 's,[@]sysconfdir[@],/etc,g' -e 's,[@]libdir[@],/usr/lib,g' -e
's,[@]includedir[@],/usr/include,g' -e 's,[@]bindir[@],/usr/bin,g' -e
's,[@]sbindir[@],/usr/sbin,g' -e 's,[@]prefix[@],/usr,g' -e
's,[@]exec_prefix[@],/usr,g' -e 's,[@]prefix[@],/usr,g' -e
's,[@]PACKAGE[@],cockpit,g' -e 's,[@]VERSION[@],220,g' -e
's,[@]PKEXEC[@],/usr/bin/pkexec,g' -e
's,[@]SUDO[@],/build/tmp-glibc/hosttools/sudo,g' -e
's,[@]user[@],root,g' -e 's,[@]group[@],root,g' -e
's,[@]wsinstanceuser[@],root,g' -e 's,[@]wsinstancegroup[@],root,g' -e
's,[@]selinux_config_type[@],,g' -e
's,[@]with_networkmanager_needs_root[@],yes,g' -e
's,[@]with_storaged_iscsi_sessions[@],yes,g' -e
's,[@]with_appstream_config_packages[@],[],g' -e
's,[@]with_appstream_data_packages[@],[],g' -e
's,[@]with_nfs_client_package[@],false,g' -e
's,[@]with_vdo_package[@],false,g'
../cockpit-220/src/ws/cockpit-desktop.in > cockpit-desktop.tmp && mv
-f cockpit-desktop.tmp cockpit-desktop
| /build/tmp-glibc/hosttools/mkdir -p dist/docker && \
| (if ls ../cockpit-220/pkg/docker/*.html >/dev/null 2>&1; then
NODE_ENV=production
SRCDIR=/build/tmp-glibc/work/corei7-64-oe-linux/cockpit/220-r0/cockpit-220
BUILDDIR=/build/tmp-glibc/work/corei7-64-oe-linux/cockpit/220-r0/build
timeout 15m ../cockpit-220/tools/missing
../cockpit-220/tools/webpack-make -d dist/docker/Makefile.deps -c
../cockpit-220/webpack.config.js; else touch
dist/docker/Makefile.deps; fi ) && \
|   touch dist/docker/stamp
| /bin/bash: line 2: timeout: command not found
| make[1]: *** [Makefile:10042: dist/docker/stamp] Error 127

The actual applied diff is:



The same error occurs, too, if the diff only changed the text in cockpit.format.
I tried adding DEPENDS += "nodejs-native coreutils-native" to solve
the show error and the following one, but this is neither successful
nor should it be necessary to modify the dependencies based on the
diff.
As well, it does not matter if I add the patch in a .bbappend or in
the cockpit recipe itself.

Any thoughts on this?

Best,
Anna-Lena Marx
diff mbox series

Patch

diff --git a/pkg/lib/journal.js b/pkg/lib/journal.js
index 302930a9d..87b3ef96a 100644
--- a/pkg/lib/journal.js
+++ b/pkg/lib/journal.js
@@ -219,9 +219,10 @@  journal.printable = function printable(value) {
     else if (typeof (value) == "string")
         return value;
     else if (value.length !== undefined)
-        return cockpit.format(_("[$0 bytes of binary data]"), value.length);
-    else
+        return new TextDecoder().decode(newUint8Array(value));
+    else {
         return _("[binary data]");
+ }
 };

 function output_funcs_for_box(box) {