From patchwork Mon Nov 11 20:50:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 3914 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Mon, 11 Nov 2024 21:50:38 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-il1-f187.google.com (mail-il1-f187.google.com [209.85.166.187]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4ABKoa5K014846 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 11 Nov 2024 21:50:37 +0100 Received: by mail-il1-f187.google.com with SMTP id e9e14a558f8ab-3a3cb771556sf61238275ab.3 for ; Mon, 11 Nov 2024 12:50:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1731358229; cv=pass; d=google.com; s=arc-20240605; b=Dh4ZKH7dT3iarps7v6yldMeDgaU0Uj7McS5bRjnoNHUlRnP6a/uu6O65y9K/d9QZ9G qwSfwJKTAzsO/Lv7fq2GDHXQ/8ecX8bnEgS6IU9ytWJdQ63UczGhqVYlpIE2WgqBivIV 0MfHz1TKoJrucWxqvTWqCD5du+TZcqiXAiw8eCiluzSWRxBn2kQtzrSIJU7ZVQpYC0UU bfSLRaD5ZZO/y05XJGG6asCFwTEalyxNC4uJ8pLIT53ozrgmmBxwP3gssnpgX7KEwbqb nzLTET4kTwvC568+Y1ub5/51uV8g7L9whAmto3NVYsGQS+iYKpq43+XI+1Tu6Y7MEBMx dnlg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:feedback-id:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=e0wEqeurvuMPIzthjMaWFKee7gx93kz3S16C+VpK0gw=; fh=Pqcxtkljv4XErEL13z6FRXFuVaBteA+kkTq+OvST5qk=; b=EfT/4tXNTSm2bmkkjl6sPF8+GXL2U0WSkWeAzEIGCBdAF5SyoCUv3M1wLdngZSyScD XcKySV9HAUXKyGg0ORLWi44pgZ4Zy/5NENT2ogchxLxxuXOnUnwDCWEo0Tz/5sE09PEb UNEQPbXavzaqV9f/xtyEwqKA83ztsIowzMg6f8Ba71IO0yvMCSdz3aXajpwJDOOnmoT9 M5W95Fca3pPpj3b3TX3n6O+1Deq2snq0kPHBqAxU1DJnj4ZaZDKRwZ4Awev/shIvl8ok Uih/TMAsG82wZzGMdPueRhHBhBe0B+7rXwESz4sZl9giT6JaOnt/7m3Uk37zGM1bzY9n cpaw==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=DKBmAkUA; spf=pass (google.com: domain of fm-294854-20241111205026cc787bd8742c941f8f-o9xhhp@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-294854-20241111205026cc787bd8742c941f8f-o9xhhP@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1731358229; x=1731963029; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=e0wEqeurvuMPIzthjMaWFKee7gx93kz3S16C+VpK0gw=; b=gjHYzw7t/rSkDAalCLn80XaDGj/wCfq3h/QrRwjuByFqVx9nbQ3A/9LAyChdDVq1rO v5T/QBmj2Yqf+8wPK+zIpJNj9wsnjT+ArlYVZ8kV90TDe60k9aCslMGtC20EqFWZF5rb ALlsaCQklqeYk/oS+u3SWW2WHm4keSk2EFByeVmYsqGlL2cThOZHRh3bVaXsqvP458Ds PRJyxm5rr2AeUdcoDNnXw+tFBYkwDiuDo9IqnI6Ex0Ao2ku+qEHcD9nhJjJp6utsCzzi tV2zlhc86Y8ucBsm9dUGKpzacOjJb3vPn4zMnhhg5OTxPs/PIWTTkdfFG0WfBeTTbyKp 5nvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731358229; x=1731963029; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-beenthere:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=e0wEqeurvuMPIzthjMaWFKee7gx93kz3S16C+VpK0gw=; b=AcskyyxdbgoQBJfUgouz59Zgt23Tdf/A1KY9dJKHS/r7qV27HShRtuGzrxpNRAeL5h XBlq91De3HST8192ErvSxLdQwJ6vT29V+R/knEP42X8zfgmXgQ4YHDF+aineqab/RfDq btk+G/qYWe6qV/SBYTuJD8mG+OAHFhjWYu4sjH7LbO8fnhv22yQ/bFUDpXWnyH3Tcmj5 g9TBIyEMCdSd6GLemVM1pkJ/8Llz8RXmFcNX9mCoGRywTFKnD7Gi+voTgTOv3prs8lHc x/sLbkBLF6lQTOnoRa0bv01H8o/76y2GD5rniXx/2YtYSIvvGJf9+6bB5N9JWKBLkQpl 9iFg== X-Forwarded-Encrypted: i=2; AJvYcCUMNvKhAPudrNiZWGGbvdo8oR70lyPdh11R5cCrHbsmvcyPCPVQsgx3fbloFBPp7Ctp6ce5nVY=@isar-build.org X-Gm-Message-State: AOJu0Yx/WjvLvSvs7efrLsAAUSlZvEkgBQ6N3i11trPP6XMeadGfVPS5 EA88EMvDwFA8dd+JSUe9CzAIlwEHKRD51WWWfa1JoHW06ejGHzw5 X-Google-Smtp-Source: AGHT+IFNNfHRhXEVCe5Udz5BG/CuS6sHp6aMn1LnOCZz2t9pBHk0p2pJFi01SYennQns3br3T8izsQ== X-Received: by 2002:a92:50c:0:b0:3a6:f349:71e6 with SMTP id e9e14a558f8ab-3a6f3497316mr111638775ab.22.1731358229252; Mon, 11 Nov 2024 12:50:29 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6e02:1686:b0:3a4:f561:1c0a with SMTP id e9e14a558f8ab-3a6e815d01els35311665ab.1.-pod-prod-05-us; Mon, 11 Nov 2024 12:50:28 -0800 (PST) X-Received: by 2002:a05:6602:3fce:b0:82d:13ce:2956 with SMTP id ca18e2360f4ac-83e0335471emr1486758439f.10.1731358228285; Mon, 11 Nov 2024 12:50:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731358228; cv=none; d=google.com; s=arc-20240605; b=jbiLsIH6BnEurMoCM9LheNx0gTVRhP7pgYwtMc0EekL9cGzUFJ2ieIxAU8NNvz71z4 MLLcCBT0dD0dQUpODQ4vM3MkInS6GtcuR1zbcguMp65sxanYcQ/tbuTnBlrMJHdh4isC l91NQ+SqYC1AzFzkVpoFswgD8jXfRkH10zxqqWRfB7C4Lmm/6V3a6Eek7/N3aoZ3aa6Y f4BjzJJZ8kYRcqJ2bHGgZG8PtUbsjTfX/HqayduVepaROXkYl+S7EvkpaYW2S9gQJ3Zy tqAWiII116Pe93BCXQlMXvAlZQPHo2szSUlmsLTUBbdRjVv6NdU3ZoIhAoqJw5sOENPB Rz5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=feedback-id:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=nr/IOWZlvRHaDWujWo2iA6qbxs9uM0R3Tj5/JwgWteo=; fh=TWGwN84gUgHIe5O4CbyH9KISyeWwGbvUX7cnJPxVD70=; b=B65goY2qyNqcADQwBniCfoyhWoN5iFMTzg3CoYHAiOkpp3utg1HhO79T9NrlulOE9t jDjtAjmIOSxArjoaJRKtgsBYQtnDxRYt649/pxGuMmOVNtElq9OheK2GVpkGqML+IFlT XQnlK7Ii5OEqfRkHmzojai9gnKKizjUl2TpZfiBXTBvWun4G/tFe1cdSTC49T9KuWKnV DkKE7kYqHHS99k9gNkk6Q6MGzpkHlpj8ePoVi5FW+ZxBF2/6ixBgByONY15i+d3gApKd bvs0IjfCn0GeLrhKXlQ7xnmcxUmGQwaIzu0lUFpPUafuAXKNO+zAp559O6Ecuy8Q1dOU lbdg==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=DKBmAkUA; spf=pass (google.com: domain of fm-294854-20241111205026cc787bd8742c941f8f-o9xhhp@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-294854-20241111205026cc787bd8742c941f8f-o9xhhP@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-65-227.siemens.flowmailer.net (mta-65-227.siemens.flowmailer.net. [185.136.65.227]) by gmr-mx.google.com with ESMTPS id 8926c6da1cb9f-4de788302d0si234551173.7.2024.11.11.12.50.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Nov 2024 12:50:28 -0800 (PST) Received-SPF: pass (google.com: domain of fm-294854-20241111205026cc787bd8742c941f8f-o9xhhp@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) client-ip=185.136.65.227; Received: by mta-65-227.siemens.flowmailer.net with ESMTPSA id 20241111205026cc787bd8742c941f8f for ; Mon, 11 Nov 2024 21:50:26 +0100 X-Patchwork-Original-From: "'Jan Kiszka' via isar-users" From: Jan Kiszka To: isar-users Cc: Quirin Gylstorff Subject: [PATCH 5/7] initramfs-fsck-ext4-hook: Convert to hook.inc and improve Date: Mon, 11 Nov 2024 21:50:22 +0100 Message-ID: <119732ece3ac710416516282f0cdcb5c05c9b4d1.1731358224.git.jan.kiszka@siemens.com> In-Reply-To: References: MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-294854:519-21489:flowmailer X-Original-Sender: jan.kiszka@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=DKBmAkUA; spf=pass (google.com: domain of fm-294854-20241111205026cc787bd8742c941f8f-o9xhhp@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-294854-20241111205026cc787bd8742c941f8f-o9xhhP@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: Jan Kiszka Reply-To: Jan Kiszka Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-4.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,RCVD_IN_RP_CERTIFIED, RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= From: Jan Kiszka Use the convention and helping features of the new initramfs hook.inc to simplify this hook. We move it under recipes-initramfs to align with other recipes there. Another change is making fsck.ext4 mandatory, both as dependency and while copying it in via the helper - there is no reason for this recipe to almost silently ignore any unavailability. Signed-off-by: Jan Kiszka --- .../images/isar-initramfs.bb | 2 +- .../files/initramfs-fsck-hook-ext4.triggers | 0 .../initramfs-fsck-ext4-hook_0.3.bb | 14 +++++++ .../files/initramfs.fsck.ext4.hook | 39 ------------------- .../initramfs-fsck-hook-ext4_0.2.bb | 18 --------- 5 files changed, 15 insertions(+), 58 deletions(-) rename meta/{recipes-support => recipes-initramfs}/initramfs-fsck-hook/files/initramfs-fsck-hook-ext4.triggers (100%) create mode 100644 meta/recipes-initramfs/initramfs-fsck-hook/initramfs-fsck-ext4-hook_0.3.bb delete mode 100644 meta/recipes-support/initramfs-fsck-hook/files/initramfs.fsck.ext4.hook delete mode 100644 meta/recipes-support/initramfs-fsck-hook/initramfs-fsck-hook-ext4_0.2.bb diff --git a/meta-isar/recipes-initramfs/images/isar-initramfs.bb b/meta-isar/recipes-initramfs/images/isar-initramfs.bb index 71dbaa43..d2a946f7 100644 --- a/meta-isar/recipes-initramfs/images/isar-initramfs.bb +++ b/meta-isar/recipes-initramfs/images/isar-initramfs.bb @@ -15,5 +15,5 @@ INITRAMFS_PREINSTALL += " \ # Recipes that should be installed into the initramfs build rootfs. INITRAMFS_INSTALL += " \ initramfs-isar-example-hook \ - initramfs-fsck-hook-ext4 \ + initramfs-fsck-ext4-hook \ " diff --git a/meta/recipes-support/initramfs-fsck-hook/files/initramfs-fsck-hook-ext4.triggers b/meta/recipes-initramfs/initramfs-fsck-hook/files/initramfs-fsck-hook-ext4.triggers similarity index 100% rename from meta/recipes-support/initramfs-fsck-hook/files/initramfs-fsck-hook-ext4.triggers rename to meta/recipes-initramfs/initramfs-fsck-hook/files/initramfs-fsck-hook-ext4.triggers diff --git a/meta/recipes-initramfs/initramfs-fsck-hook/initramfs-fsck-ext4-hook_0.3.bb b/meta/recipes-initramfs/initramfs-fsck-hook/initramfs-fsck-ext4-hook_0.3.bb new file mode 100644 index 00000000..9e9654ad --- /dev/null +++ b/meta/recipes-initramfs/initramfs-fsck-hook/initramfs-fsck-ext4-hook_0.3.bb @@ -0,0 +1,14 @@ +# This software is a part of ISAR. +# Copyright (C) Siemens AG, 2019-2024 +# +# SPDX-License-Identifier: MIT + +DESCRIPTION = "Recipe to add fsck hook to the initramfs" + +require recipes-initramfs/initramfs-hook/hook.inc + +SRC_URI += "file://initramfs-fsck-hook-ext4.triggers" + +HOOK_COPY_EXECS = "fsck fsck.ext4 logsave" + +DEBIAN_DEPENDS += ", e2fsprogs, logsave" diff --git a/meta/recipes-support/initramfs-fsck-hook/files/initramfs.fsck.ext4.hook b/meta/recipes-support/initramfs-fsck-hook/files/initramfs.fsck.ext4.hook deleted file mode 100644 index 259b73b4..00000000 --- a/meta/recipes-support/initramfs-fsck-hook/files/initramfs.fsck.ext4.hook +++ /dev/null @@ -1,39 +0,0 @@ -# This software is a part of ISAR. -# Copyright (C) Siemens AG, 2019 -# -# SPDX-License-Identifier: MIT - -#!/bin/sh - -set -e - -PREREQ="" - -prereqs() -{ - echo "$PREREQ" -} - -case $1 in -prereqs) - prereqs - exit 0 - ;; -esac - -. /usr/share/initramfs-tools/scripts/functions -. /usr/share/initramfs-tools/hook-functions - -if [ ! -x /sbin/fsck ]; then - echo "Warning: couldn't find /sbin/fsck!" - exit 0 -fi - -copy_exec /sbin/fsck -copy_exec /sbin/logsave - -if prog="$(command -v fsck.ext4)"; then - copy_exec "$prog" -else - echo "Warning: /sbin/fsck.ext4 doesn't exist, can't install to initramfs, ignoring." -fi diff --git a/meta/recipes-support/initramfs-fsck-hook/initramfs-fsck-hook-ext4_0.2.bb b/meta/recipes-support/initramfs-fsck-hook/initramfs-fsck-hook-ext4_0.2.bb deleted file mode 100644 index 9860dbc8..00000000 --- a/meta/recipes-support/initramfs-fsck-hook/initramfs-fsck-hook-ext4_0.2.bb +++ /dev/null @@ -1,18 +0,0 @@ -# This software is a part of ISAR. -# Copyright (C) Siemens AG, 2019 -# -# SPDX-License-Identifier: MIT - - -DESCRIPTION = "Recipe to add fsck hook to the initramfs" - -inherit dpkg-raw -SRC_URI = "file://initramfs-fsck-hook-ext4.triggers \ - file://initramfs.fsck.ext4.hook \ - " - - -do_install() { - install -m 0755 -d ${D}/etc/initramfs-tools/hooks - install -m 0740 ${WORKDIR}/initramfs.fsck.ext4.hook ${D}/etc/initramfs-tools/hooks/fsck.ext4.hook -}