public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Steve Sakoman <steve@sakoman.com>
To: openembedded-core@lists.openembedded.org
Subject: [OE-core][scarthgap 23/37] classes/kernel: No symlink in postinst without KERNEL_IMAGETYPE_SYMLINK
Date: Mon, 29 Jul 2024 06:12:33 -0700	[thread overview]
Message-ID: <6916c19c8a09d8d0334c957ae541aafcbbcf92df.1722258106.git.steve@sakoman.com> (raw)
In-Reply-To: <cover.1722258106.git.steve@sakoman.com>

From: Jörg Sommer <joerg.sommer@navimatix.de>

The commit “Use a copy of image for kernel*.rpm if fs doesn't support
symlinks” [1] added postinst and postrm scripts to the kernel package which
create a symlink after package installation. This should not happen if
`KERNEL_IMAGETYPE_SYMLINK` is not `1`.

Background: The u-boot implementation of jffs2 does not support symlinks.
Using a hardlink or removing `${KERNEL_VERSION}` from the file name fails,
because the current postinst script replaces the file with the symlink.

[1] 8b6b95106a5d4f1f6d34209ec5c475c900270ecd

Cc: Bruce Ashfield <bruce.ashfield@gmail.com>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: Yanfei Xu <yanfei.xu@windriver.com>
Signed-off-by: Jörg Sommer <joerg.sommer@navimatix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 6a763401862d9ee96749ad18378b6344778c2c66)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 meta/classes-recipe/kernel.bbclass | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/classes-recipe/kernel.bbclass b/meta/classes-recipe/kernel.bbclass
index c0a2056fec..4c1cb89a46 100644
--- a/meta/classes-recipe/kernel.bbclass
+++ b/meta/classes-recipe/kernel.bbclass
@@ -115,7 +115,9 @@ python __anonymous () {
 
         d.setVar('PKG:%s-image-%s' % (kname,typelower), '%s-image-%s-${KERNEL_VERSION_PKG_NAME}' % (kname, typelower))
         d.setVar('ALLOW_EMPTY:%s-image-%s' % (kname, typelower), '1')
-        d.prependVar('pkg_postinst:%s-image-%s' % (kname,typelower), """set +e
+
+        if d.getVar('KERNEL_IMAGETYPE_SYMLINK') == '1':
+            d.prependVar('pkg_postinst:%s-image-%s' % (kname,typelower), """set +e
 if [ -n "$D" ]; then
     ln -sf %s-${KERNEL_VERSION} $D/${KERNEL_IMAGEDEST}/%s > /dev/null 2>&1
 else
@@ -127,7 +129,7 @@ else
 fi
 set -e
 """ % (type, type, type, type, type, type, type))
-        d.setVar('pkg_postrm:%s-image-%s' % (kname,typelower), """set +e
+            d.setVar('pkg_postrm:%s-image-%s' % (kname,typelower), """set +e
 if [ -f "${KERNEL_IMAGEDEST}/%s" -o -L "${KERNEL_IMAGEDEST}/%s" ]; then
     rm -f ${KERNEL_IMAGEDEST}/%s  > /dev/null 2>&1
 fi
-- 
2.34.1



  parent reply	other threads:[~2024-07-29 13:13 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-29 13:12 [OE-core][scarthgap 00/37] Patch review Steve Sakoman
2024-07-29 13:12 ` [OE-core][scarthgap 01/37] ofono: fix CVE-2023-2794 Steve Sakoman
2024-07-29 13:12 ` [OE-core][scarthgap 02/37] ffmpeg: fix CVE-2023-49502 Steve Sakoman
2024-07-29 13:12 ` [OE-core][scarthgap 03/37] ffmpeg: fix CVE-2024-31578 Steve Sakoman
2024-07-29 13:12 ` [OE-core][scarthgap 04/37] pam: Fix for CVE-2024-22365 Steve Sakoman
2024-07-29 13:12 ` [OE-core][scarthgap 05/37] cve-check: Introduce CVE_CHECK_MANIFEST_JSON_SUFFIX Steve Sakoman
2024-07-29 13:12 ` [OE-core][scarthgap 06/37] weston: upgrade 13.0.0 -> 13.0.1 Steve Sakoman
2024-07-29 13:12 ` [OE-core][scarthgap 07/37] python3-idna: upgrade 3.6 -> 3.7 Steve Sakoman
2024-07-29 13:12 ` [OE-core][scarthgap 08/37] oeqa/runtime: make minidebuginfo test work with coreutils Steve Sakoman
2024-07-29 13:12 ` [OE-core][scarthgap 09/37] wic: bootimg-efi: fix error handling Steve Sakoman
2024-07-29 13:12 ` [OE-core][scarthgap 10/37] multilib.bbclass: replace deprecated e.data with d Steve Sakoman
2024-07-29 13:12 ` [OE-core][scarthgap 11/37] gawk: update patch status Steve Sakoman
2024-07-29 13:12 ` [OE-core][scarthgap 12/37] maintainers.inc: update self e-mail address Steve Sakoman
2024-07-29 13:12 ` [OE-core][scarthgap 13/37] cmake-qemu.bbclass: fix if criterion Steve Sakoman
2024-07-29 13:12 ` [OE-core][scarthgap 14/37] iptables: fix save/restore symlinks with libnftnl PACKAGECONFIG enabled Steve Sakoman
2024-07-29 13:12 ` [OE-core][scarthgap 15/37] selftest: add Upstream-Status to .patch files Steve Sakoman
2024-07-29 13:12 ` [OE-core][scarthgap 16/37] grub,grub-efi: Remove -mfpmath=sse on x86 Steve Sakoman
2024-07-29 13:12 ` [OE-core][scarthgap 17/37] python3: Treat UID/GID overflow as failure Steve Sakoman
2024-07-29 13:12 ` [OE-core][scarthgap 18/37] python3: skip test_concurrent_futures/test_deadlock Steve Sakoman
2024-07-29 13:12 ` [OE-core][scarthgap 19/37] python3: skip test_multiprocessing/test_active_children test Steve Sakoman
2024-07-29 13:12 ` [OE-core][scarthgap 20/37] oeqa/sdk/case: Ensure DL_DIR is populated with artefacts if used Steve Sakoman
2024-07-29 13:12 ` [OE-core][scarthgap 21/37] gawk: Remove References to /usr/local/bin/gawk Steve Sakoman
2024-07-29 13:12 ` [OE-core][scarthgap 22/37] archiver.bbclass: Fix work-shared checking for kernel recipes Steve Sakoman
2024-07-29 13:12 ` Steve Sakoman [this message]
2024-07-29 13:12 ` [OE-core][scarthgap 24/37] oeqa/runtime: fix race-condition in minidebuginfo test Steve Sakoman
2024-07-29 13:12 ` [OE-core][scarthgap 25/37] python3: submit deterministic_imports.patch upstream as a ticket Steve Sakoman
2024-07-29 13:12 ` [OE-core][scarthgap 26/37] glib-networking: submit eagain.patch upstream Steve Sakoman
2024-07-29 13:12 ` [OE-core][scarthgap 27/37] glslang: mark 0001-generate-glslang-pkg-config.patch as Inappropriate Steve Sakoman
2024-07-29 13:12 ` [OE-core][scarthgap 28/37] tcp-wrappers: mark all patches as inactive-upstream Steve Sakoman
2024-07-29 13:12 ` [OE-core][scarthgap 29/37] automake: mark new_rt_path_for_test-driver.patch as Inappropriate Steve Sakoman
2024-07-29 13:12 ` [OE-core][scarthgap 30/37] settings-daemon: submit addsoundkeys.patch upstream and update to a revision that has it Steve Sakoman
2024-07-29 13:12 ` [OE-core][scarthgap 31/37] dpkg: mark patches adding custom non-debian architectures as inappropriate for upstream Steve Sakoman
2024-07-29 13:12 ` [OE-core][scarthgap 32/37] libacpi: mark patches as inactive-upstream Steve Sakoman
2024-07-29 13:12 ` [OE-core][scarthgap 33/37] python3-attrs: drop python3-ctypes from RDEPENDS Steve Sakoman
2024-07-29 13:12 ` [OE-core][scarthgap 34/37] oeqa/runtime/scp: requires openssh-sftp-server Steve Sakoman
2024-07-29 13:12 ` [OE-core][scarthgap 35/37] openssh: drop rejected patch fixed in 8.6p1 release Steve Sakoman
2024-07-29 13:12 ` [OE-core][scarthgap 36/37] openssh: systemd sd-notify patch was rejected upstream Steve Sakoman
2024-07-29 13:12 ` [OE-core][scarthgap 37/37] openssh: systemd notification was implemented upstream Steve Sakoman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6916c19c8a09d8d0334c957ae541aafcbbcf92df.1722258106.git.steve@sakoman.com \
    --to=steve@sakoman.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox