From patchwork Sat Nov 16 10:55:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 226 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Sat, 16 Nov 2024 11:56:07 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-pj1-f61.google.com (mail-pj1-f61.google.com [209.85.216.61]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4AGAu5J5013523 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 16 Nov 2024 11:56:06 +0100 Received: by mail-pj1-f61.google.com with SMTP id 98e67ed59e1d1-2e2a9577037sf1636031a91.1 for ; Sat, 16 Nov 2024 02:56:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1731754558; cv=pass; d=google.com; s=arc-20240605; b=eyi0+BXxpivoeY7uTMWFYAcAubxQ4of2mmrwtWYR5qcZlY7gEOrYDSbUxoRW2gv0SD lowEW8JmuY09aklsAhZIbO7A+QApDAfUWAElRm2s9oZ2ipSi7LJGSzxoYlczT6a9gaHj ckOWBV/cigqDpqqgCJDlSWmctum9VoKq1uvRZE/O0FxJW6DE+DLgva4Zz827HL+azZpL HFptvFZWuycO3nL36JzK6JDvtRcKsD24NrMrQ/8C5HVxxB7pDuGrmsIXY7yaVIABbHWv gRmFg0IrenoajsOVUXXGJN6mYmBv/D1WVph8mGWrX3L6gBH8YHbq64vzL5vEe91YALpK deVQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=xwB8j1mtAvDMawLCf9JRqZsvBqNUKFeVYweWYlNuLZQ=; fh=FY2tvcTTBhn9TnAqwED/5H7A7NO96yIuv4hz0JLzmDQ=; b=GonN1TOmMFsa3tGOpnV+IuheXcF2sPK3TSBydeWZnPXe6/oIXkDd/T8VH9uT6FPSVv 1urHsqrAnU2T0Wcz1tNwtLBYH0/Kk0hs4U/enXCroj9zJT7i1UU/PcnulDmlxqDK5Cnx keM4RaJR7zU5wxN5GubYNVwcr9BjhE0ccQItK1G9lcHX7EfSnfCbakYbCkrTSFV2gX9B NoC49Xhlvi3GMj/L78jCq08+WW174zd1mbA6xgP1MJhpKn/kd5ITCwhC43ctPH9V48d3 WHENZcGBMu25NBOHtGP/K+BOdqgdGybAdgiGlskXTwNMz2LZIsl08P3PpHIj2DPfDn4j 9EOQ==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b="gor/BL8+"; spf=pass (google.com: domain of fm-294854-20241116105553583c80ff7fd108c8c2-aeybto@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-294854-20241116105553583c80ff7fd108c8c2-AeYbTO@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=1731754558; x=1732359358; 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:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=xwB8j1mtAvDMawLCf9JRqZsvBqNUKFeVYweWYlNuLZQ=; b=Fpj2Zj5iCEU2rN4RbqT37Wj8pQchjUuEGyifDIW6qFE8+78/4DXw5t7gNZ6A7EfyAz 7km9gnPv7c9/lO4fnTuCbWOGTp6TPgkNOXHnXkLntgd0kmMLwRCpOGJXi0Q4CViqdWAR Rakf+AxQ1UcBibhOgWFUuo5RGycPNKDHAU5h/t+HRfezPkSKEEY9bwUFBFbOKj/NUmCa tk0lmNDaMSRbXvL6HhtwJkf0GdqHJMmnoFu0XDzLWEo0a3aEuLDmX3fbavfc7KF/SV20 3+dVfTNmJJgcfZxIbshevet+QcVN5I735KnWWT1eq6u5HxQOSME4bgccqbv4zty2/gGV 9Ovg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731754558; x=1732359358; 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:message-id:date:subject:cc:to:from:x-beenthere :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xwB8j1mtAvDMawLCf9JRqZsvBqNUKFeVYweWYlNuLZQ=; b=wE9sLvOchOoC09UiarfZU1YEyOCkOsCaUZ1AMj+fOtfpcmyNdIRQDYStPHnvyGUlLv NI6GYY8wlMyq/lp2VguTI78aBzAJP1DtOt20XmMyp/UOFOeaxZjB1iBAPtrDTS3yO5pj dqMbii73Ht2I+zRsK9y1Mz13Rz7J5LsWDCpdgbCAh1Q11tuTfXKEyCw5vXy//dZnjuwS n0/5ZylhzRgO7GBui6BQSRmTV3Qp+sU554RHY7ZwkklGQzYDSlpabLAOMBaoGCMvb87i /t9B2wkVDV6uwP2435AY6gLD+aTW7jISNrT5ZinqkHSrr50S7NOC1WMiDQL2Uh3t5s4Y H+dw== X-Forwarded-Encrypted: i=2; AJvYcCXUeQ6tt+NQ3+gKNSXZfeNNzZl/yjqY6TOzZaD5X1HG8Mr3xmIaG1jKHaf7+N915aIaaf747Fk=@isar-build.org X-Gm-Message-State: AOJu0Yw7iuX4x54Zk/Pf4IKGrJTVeMY0MRz63P+yrpIcX54q2a0hwN34 FJV+gkdSpErEUmIKG6qnlcFgIvi7yGtO3oD/fogCFBrYyeAHbBAr X-Google-Smtp-Source: AGHT+IEcBrBDKwyS3JPDbdc+LhGxDgQf/YaxzP3+MHSu6swH9tlJhhCcv2x1BCFIv6PVcYYuPy9ALQ== X-Received: by 2002:a17:90b:2494:b0:2ea:3ab5:cb8c with SMTP id 98e67ed59e1d1-2ea3ab5cef5mr1952875a91.33.1731754557775; Sat, 16 Nov 2024 02:55:57 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:90a:e7d2:b0:2ea:1481:bf73 with SMTP id 98e67ed59e1d1-2ea1585bbc7ls1238516a91.2.-pod-prod-02-us; Sat, 16 Nov 2024 02:55:56 -0800 (PST) X-Received: by 2002:a05:6a20:a124:b0:1db:dd9e:43af with SMTP id adf61e73a8af0-1dc90bff483mr8777668637.34.1731754556204; Sat, 16 Nov 2024 02:55:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731754556; cv=none; d=google.com; s=arc-20240605; b=WH1G9g0KuzkLdd/oq+SQqxpHPbSy96Zu008NzkjLBWhdOgtDGEQRCWefZ2akAoVBDg vrfbtL2bbF9uuCFWXKA+l1OEVsp3EnvQLJS37rnq6VWUUyiG/xGZu20k18WZa+2dc26S MQQ6Ys2YHHucYdANG0rTOXFKx1oSUCUXTnxkHoiR/hXifBqfS68xg6whhdagA+kdC689 snuViDDfZ9b5dpkzIZq6ChS+uEfF5qTikzzLQrIqEQS5AcUIyRbdBv3ntwLxhc2aiWQN o9dkRgec3mL3llbynOxFnOEEhbhgP7RhOPqMC1AezGYzkgO1UYObebcPZqfAfr4JE4tG zoLw== 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:message-id:date :subject:cc:to:from:dkim-signature; bh=VBMf0JUuJ37VUoucihP5q5js0+U5Qwxa4LnteyWyZdQ=; fh=TWGwN84gUgHIe5O4CbyH9KISyeWwGbvUX7cnJPxVD70=; b=TOtgIYm+GKT6PjdlvQzrxZ3eMjSviJUpGrQYqDmw0VJ6gbLGwpwglFQ+jzafTHKf5X hq2M1yEKNvWSVmqjjKkic/KJ8lrl44x9RNC1BGks/hMy8tgbyNoT8jdqY97trCAAI8C8 eHuv3wa/dZS4nr/ORJs5dG45oW72/t0O3AcUCd7QOHUvWbvrjwDCSaq/T45dWoMVsMgN qNyy17v7OBL27p5OpmWa99SFokN9Z3z9WaqqV2RyNrRCam2bUxI/P1Czj8z7fPHm6A4V LK1AX2bVHZC+FxkEF4Lz8SdW5cXRvOeRLCakpMtxmAdyLtgv5atztrDffREPCPIrKmxh Mk2g==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b="gor/BL8+"; spf=pass (google.com: domain of fm-294854-20241116105553583c80ff7fd108c8c2-aeybto@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-294854-20241116105553583c80ff7fd108c8c2-AeYbTO@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-65-226.siemens.flowmailer.net (mta-65-226.siemens.flowmailer.net. [185.136.65.226]) by gmr-mx.google.com with ESMTPS id 41be03b00d2f7-7f8c1afa3cfsi192540a12.0.2024.11.16.02.55.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 16 Nov 2024 02:55:55 -0800 (PST) Received-SPF: pass (google.com: domain of fm-294854-20241116105553583c80ff7fd108c8c2-aeybto@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) client-ip=185.136.65.226; Received: by mta-65-226.siemens.flowmailer.net with ESMTPSA id 20241116105553583c80ff7fd108c8c2 for ; Sat, 16 Nov 2024 11:55:53 +0100 X-Patchwork-Original-From: "'Jan Kiszka' via isar-users" From: Jan Kiszka To: isar-users Cc: Quirin Gylstorff Subject: [PATCH v3 0/7] Simplify writing initramfs hooks Date: Sat, 16 Nov 2024 11:55:45 +0100 Message-ID: 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="gor/BL8+"; spf=pass (google.com: domain of fm-294854-20241116105553583c80ff7fd108c8c2-aeybto@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-294854-20241116105553583c80ff7fd108c8c2-AeYbTO@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_H3,RCVD_IN_MSPIKE_WL, 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?= Changes in v3: - fix DEBIAN_DEPENDS for initramfs-tee-supplicant-hook - use .= for extending DEBIAN_DEPENDS Changes in v2: - add commit message to patch 1 Specifically while looking at the initramfs recipes we have in isar-cip-core, it felt like it's time to simplify their creation and offload the developers from all the related boilerplate bits. But the benefit can also be observed with the initramfs recipes in isar itself. Jan Jan Kiszka (7): initramfs-hook: Add infrastructure to ease writing hooks doc: Describe initramfs customizations isar-initramfs: Add initramfs-fsck-hook-ext4 initramfs-isar-example-hook: Convert recipe over to new hook.inc initramfs-fsck-ext4-hook: Convert to hook.inc and improve initramfs-tee-ftpm-hook: Convert to hook.inc initramfs-tee-supplicant-hook: Convert to hook.inc doc/user_manual.md | 54 ++++++++++++++ .../images/isar-initramfs.bb | 3 +- .../initramfs-example/files/example.hook | 21 ------ .../initramfs-example/files/example.script | 23 ------ .../initramfs-example/files/local-top | 3 + ....bb => initramfs-isar-example-hook_0.1.bb} | 21 ++---- .../files/initramfs-fsck-hook-ext4.triggers | 0 .../initramfs-fsck-ext4-hook_0.3.bb | 14 ++++ .../initramfs-hook/files/hook-header.tmpl | 39 ++++++++++ .../initramfs-hook/files/script-header.tmpl | 26 +++++++ .../recipes-initramfs/initramfs-hook/hook.inc | 74 +++++++++++++++++++ .../files/{tee-ftpm.script => local-top} | 18 +---- .../files/tee-ftpm.hook | 28 ------- .../initramfs-tee-ftpm-hook_0.1.bb | 27 ------- .../initramfs-tee-ftpm-hook_0.2.bb | 15 ++++ .../{tee-supplicant.script => local-top} | 18 +---- .../files/tee-supplicant.hook | 36 --------- .../initramfs-tee-supplicant-hook_0.1.bb | 27 ------- .../initramfs-tee-supplicant-hook_0.2.bb | 16 ++++ .../files/initramfs.fsck.ext4.hook | 39 ---------- .../initramfs-fsck-hook-ext4_0.2.bb | 18 ----- 21 files changed, 252 insertions(+), 268 deletions(-) delete mode 100644 meta-isar/recipes-initramfs/initramfs-example/files/example.hook delete mode 100644 meta-isar/recipes-initramfs/initramfs-example/files/example.script create mode 100644 meta-isar/recipes-initramfs/initramfs-example/files/local-top rename meta-isar/recipes-initramfs/initramfs-example/{initramfs-example.bb => initramfs-isar-example-hook_0.1.bb} (63%) 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 create mode 100644 meta/recipes-initramfs/initramfs-hook/files/hook-header.tmpl create mode 100644 meta/recipes-initramfs/initramfs-hook/files/script-header.tmpl create mode 100644 meta/recipes-initramfs/initramfs-hook/hook.inc rename meta/recipes-initramfs/initramfs-tee-ftpm-hook/files/{tee-ftpm.script => local-top} (75%) delete mode 100644 meta/recipes-initramfs/initramfs-tee-ftpm-hook/files/tee-ftpm.hook delete mode 100644 meta/recipes-initramfs/initramfs-tee-ftpm-hook/initramfs-tee-ftpm-hook_0.1.bb create mode 100644 meta/recipes-initramfs/initramfs-tee-ftpm-hook/initramfs-tee-ftpm-hook_0.2.bb rename meta/recipes-initramfs/initramfs-tee-supplicant-hook/files/{tee-supplicant.script => local-top} (68%) delete mode 100644 meta/recipes-initramfs/initramfs-tee-supplicant-hook/files/tee-supplicant.hook delete mode 100644 meta/recipes-initramfs/initramfs-tee-supplicant-hook/initramfs-tee-supplicant-hook_0.1.bb create mode 100644 meta/recipes-initramfs/initramfs-tee-supplicant-hook/initramfs-tee-supplicant-hook_0.2.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