All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gylstorff Quirin <quirin.gylstorff@siemens.com>
To: cip-dev@lists.cip-project.org
Subject: Re: [cip-dev][isar-cip-core]RFC v2 4/9] Create a initrd with support for dm-verity
Date: Tue, 23 Nov 2021 14:31:05 +0100	[thread overview]
Message-ID: <71e951f8-043f-613c-2c3e-7c6934ded034@siemens.com> (raw)
In-Reply-To: <20211119132915.unoqty5scuaxvdsw@MD1ZFJVC.ad001.siemens.net>



On 11/19/21 2:29 PM, Christian Storm via lists.cip-project.org wrote:
>>>> diff --git a/recipes-initramfs/initramfs-verity-hook/files/verity.script.tmpl b/recipes-initramfs/initramfs-verity-hook/files/verity.script.tmpl
>>>> new file mode 100644
>>>> index 0000000..c4f3dc4
>>>> --- /dev/null
>>>> +++ b/recipes-initramfs/initramfs-verity-hook/files/verity.script.tmpl
>>>> @@ -0,0 +1,68 @@
>>>> +#!/bin/sh
>>>> +prereqs()
>>>> +{
>>>> +    # Make sure that this script is run last in local-top
>>>> +    local req
>>>> +    for req in "${0%/*}"/*; do
>>>> +        script="${req##*/}"
>>>> +        if [ "$script" != "${0##*/}" ] && [ "$script" != "cryptroot" ]; then
>>>
>>> Hm, so you explicitly enumerate all scripts except for cryptroot so that
>>> you run (hopefully right?) thereafter.
>>> Isn't it sufficient to make cryptroot dependent on this?
>>> Looks too verbose and complicated...
>>
>> It is the same scripting as cryptroot uses in Debian 11 which inspired this
>> script. See [1].
>> [1]: https://salsa.debian.org/cryptsetup-team/cryptsetup/-/blob/debian/latest/debian/initramfs/scripts/local-top/cryptroot
> 
> Anyway, this doesn't answer the questions?
> 
> 
> 
> Kind regards,
>     Christian


The `verity.script` should executed as last script in the local-top init 
phase. if the cryptroot script exists `verity.script` is the second last 
script.

If the package `cryptsetup-initramfs` is always installed an entry in 
the cryptroot script would be enough. We have currently no dependency to
`cryptsetup-initramfs`.

If we want to change the cryptroot dependency we need to patch the 
necessary scripts/packages. Patching other packages is something I like 
to avoid for this feature.


Quirin

> 
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#6960): https://lists.cip-project.org/g/cip-dev/message/6960
> Mute This Topic: https://lists.cip-project.org/mt/87092657/1753640
> Group Owner: cip-dev+owner@lists.cip-project.org
> Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129121/1753640/1405269326/xyzzy [quirin.gylstorff@siemens.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 

--


  reply	other threads:[~2021-11-23 13:31 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-16 11:27 [cip-dev][isar-cip-core]RFC v2 0/9] Read-only root file system with dm-verity Q. Gylstorff
2021-11-16 11:27 ` [cip-dev][isar-cip-core]RFC v2 1/9] Add new class to create a squashfs based root file system Q. Gylstorff
2021-11-16 11:27 ` [cip-dev][isar-cip-core]RFC v2 2/9] Add verity-img.bbclass for dm-verity based rootfs Q. Gylstorff
2021-11-16 11:27 ` [cip-dev][isar-cip-core]RFC v2 3/9] linux-cip-common: Add options necessary for dm-verity Q. Gylstorff
2021-11-16 11:27 ` [cip-dev][isar-cip-core]RFC v2 4/9] Create a initrd with support " Q. Gylstorff
2021-11-17 12:33   ` Christian Storm
2021-11-18 18:19     ` Gylstorff Quirin
2021-11-19 13:29       ` Christian Storm
2021-11-23 13:31         ` Gylstorff Quirin [this message]
2021-11-16 11:27 ` [cip-dev][isar-cip-core]RFC v2 5/9] Create an read-only rootfs with dm-verity Q. Gylstorff
2021-11-17 12:18   ` Christian Storm
2021-11-18 18:10     ` Gylstorff Quirin
2021-11-19  6:41       ` Jan Kiszka
2021-11-16 11:27 ` [cip-dev][isar-cip-core]RFC v2 6/9] Create systemd mount units for a etc overlay Q. Gylstorff
2021-11-17 12:11   ` Christian Storm
2021-11-18 18:12     ` Gylstorff Quirin
2021-11-16 11:27 ` [cip-dev][isar-cip-core]RFC v2 7/9] Mount writable home partition Q. Gylstorff
2021-11-16 11:27 ` [cip-dev][isar-cip-core]RFC v2 8/9] kas: Patch isar for correct permissions in var and home Q. Gylstorff
2021-11-17 10:27   ` Christian Storm
2021-11-17 11:41     ` Gylstorff Quirin
2021-11-16 11:27 ` [cip-dev][isar-cip-core]RFC v2 9/9] swupdate: Backport patches from SWUpdate Master Q. Gylstorff
2021-11-17 10:40   ` Christian Storm
2021-11-17 11:36     ` Gylstorff Quirin
2021-11-19  6:42       ` Jan Kiszka
2021-11-19 13:34         ` Christian Storm

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=71e951f8-043f-613c-2c3e-7c6934ded034@siemens.com \
    --to=quirin.gylstorff@siemens.com \
    --cc=cip-dev@lists.cip-project.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.