From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Sun, 29 Jun 2025 22:27:56 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-qv1-f59.google.com (mail-qv1-f59.google.com [209.85.219.59]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 55TKRhbt026892 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sun, 29 Jun 2025 22:27:44 +0200 Received: by mail-qv1-f59.google.com with SMTP id 6a1803df08f44-6fb01bb5d9asf63641356d6.3 for ; Sun, 29 Jun 2025 13:27:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1751228858; x=1751833658; darn=ilbers.de; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=LlD3zROanQmCEWcjqIPWEB7t4oYC9+WqGBAiwwrsK7E=; b=eWinAj0VpApOKpQ7XKVcZ1N31QEwDM20KIK1FVTQw6o354NCEDHLgvYdpLrpP+mG6I 7/KSH8UG8Y7Qmdg6AR3XliWQ+HeMgFGp12sgpWrJf+JcMNr03fXAQweQjd/xAONj77fF LrH7xBoRsYXQBdU1wpAKDMSgL62HhClreor7z+ZakmX11wwRpflQp6QM0lLKs0J05nSy qkP9a5essAqkcd8gDn47wJgr16ZfYban4nUJuf+Sqo531vARpNh3cuTHh1g4eZ2FYesx OTenVYT0u/2C5slbrTjgaSXAHwrpHECYvuwCQYzzqRIPvgsLltD/O2ZKbz8xIu4og8BR pTHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751228858; x=1751833658; 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-sender:mime-version:subject:references:in-reply-to :message-id:to:from:date:x-beenthere:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LlD3zROanQmCEWcjqIPWEB7t4oYC9+WqGBAiwwrsK7E=; b=lOOVgndtRTeVgqdSg+FnzhDvmcdy12DpLAEX6no0oxhNzy2i/dEkkQM0kyoqedrH9d uI+iHid2P7yKabFkqhwPRiIWFS38fkqC/OT4/JIeZ/Oyd0jBZA+lksAoIikXgQZdsF16 lZzObKedG1aL1Ze207uecJygArSQOZNz3XnINsZS70f/42whgtOkFVMb/dSFyxcJefKF 9s8QXQNGuqePxvfMjMrzw0AKvy62KXcGGuKJ/yDX3UyMnTwC/K1u7upWw2FVxmAthPtg GYsHwXbMbB6KF3yLPyK9aVBI6WkXS/5Hw+9V6zXP0OgqUzXO5Cjh6/BRQl3G4tAkNptJ qAbA== X-Forwarded-Encrypted: i=1; AJvYcCXV1dC8XH2ZoanRzkNuU4VTFMYk6WcakB2lqYl/iMCpLB3zCA4I8cFevqGRfUlPNZnfrRUO@ilbers.de X-Gm-Message-State: AOJu0Ywo/3cC6Yq+KcZw6c5Gi39q1GkZWxomWSJFKH6UHIcn8S7yjxTh BMBSbLpuoWKaloyNco4bIvYaxSM7ldc5khw+VETbIU7n/NlUDq6+yH6l X-Google-Smtp-Source: AGHT+IFPeGf4JyeEcFQDO/y3tRyiuRz87y7ufPSItVLvB49+oDSdusJkKX2hF9g9RWwR3GTVLDSKmQ== X-Received: by 2002:a05:6214:d47:b0:6fa:9889:4077 with SMTP id 6a1803df08f44-70013a6e9c2mr173514566d6.43.1751228857897; Sun, 29 Jun 2025 13:27:37 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h=AZMbMZfwW8ljhTz6Cyuc3svI345AiTOrQo5HKJu4yZaHlq2low== Received: by 2002:a05:6214:21a5:b0:6f8:b50c:910 with SMTP id 6a1803df08f44-6fd750a97f3ls70682136d6.2.-pod-prod-09-us; Sun, 29 Jun 2025 13:27:37 -0700 (PDT) X-Received: by 2002:a05:6214:29e1:b0:6fc:ff18:87c1 with SMTP id 6a1803df08f44-70002623b0emr156866506d6.2.1751228856792; Sun, 29 Jun 2025 13:27:36 -0700 (PDT) Date: Sun, 29 Jun 2025 13:27:35 -0700 (PDT) From: "'Badrikesh Prusty' via isar-users" To: isar-users Message-Id: <76420668-ff1f-4d75-87e7-56bdf58b1393n@googlegroups.com> In-Reply-To: References: <20250613172323.14644-1-badrikesh.prusty@siemens.com> <9edb5e06be7192fa27eeaf4d0474089f1473df90.camel@siemens.com> <071cdb5d-db12-4d86-b081-0c5c58ccf738n@googlegroups.com> Subject: Re: [PATCH] isar-installer: Mount /tmp as tmpfs for read-only boot fix MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_452168_1291867322.1751228855445" X-Original-Sender: badrikesh.prusty@siemens.com X-Original-From: Badrikesh Prusty Reply-To: Badrikesh Prusty 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,HTML_MESSAGE,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-TUID: jwFEoVR1V/93 ------=_Part_452168_1291867322.1751228855445 Content-Type: multipart/alternative; boundary="----=_Part_452169_853313013.1751228855445" ------=_Part_452169_853313013.1751228855445 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Sorry for the delay. Thanks for your feedback. I just tried few use cases based on your comment. On Debian Bookworm, works as expected. On Debian Trixie, I assumed tmp.mount from /usr/lib/systemd/system/ gets=20 symlinked to /etc/systemd/system/ when we do systemctl enable, but it=20 didn't work. Case 1: /tmp defined in /etc/fstab, service file:=20 /usr/lib/systemd/system/tmp.mount, systemctl enable didn't work as /tmp is= =20 managed by fstab Result: The /etc/fstab entry for /tmp is in effect. Case 2: /tmp defined in /etc/fstab, service file:=20 /usr/lib/systemd/system/tmp.mount copied to /etc/systemd/system/tmp.mount Result: The unit file /etc/systemd/system/tmp.mount configuration for /tmp= =20 is in effect. Will send an updated patch soon. Thanks, Badrikesh On Monday, June 16, 2025 at 6:26:11=E2=80=AFPM UTC+5:30 Heinisch, Alexander= wrote: > On Mon, 2025-06-16 at 03:01 -0700, 'Badrikesh Prusty' via isar-users > wrote: > > > Hi, > > >=20 > > > Thanks for your feedback. Added DESCRIPTION and MAINTAINER field > > > and > > > updated to DEPENDS:append:bookworm. > > > I had the same feeling when DEPENDS +=3D wasn't working while > > > DEPENDS:bookworm +=3D was set, but I didn't investigate much since > > > DEPENDS:append worked. Thank you for the clarification. > > >=20 > > > Badrikesh > > >=20 > > > On Monday, June 16, 2025 at 12:09:34=E2=80=AFPM UTC+5:30 MOESSBAUER, = Felix > > > wrote: > > > > > On Fri, 2025-06-13 at 13:23 -0400, 'Badrikesh Prusty' via > > > > > isar-users > > > > > wrote: > > > > > > > Fix image installation when isar-image-installer rootfs is > > > > > > > booted > > > > > > > as > > > > > > > read-only > > > > > > > by ensuring /tmp is mounted as tmpfs. > > > > > > > This change utilizes systemd's tmp.mount to mount /tmp as > > > > > > > tmpfs. > > > > > > > Since systemd > > > > > > > versions up to Debian Bookworm ship tmp.mount in > > > > > > > /usr/share/systemd/, > > > > > > > the file > > > > > > > must be copied to a directory where systemctl can enable > > > > > > > it. > > > > > > > For systemd versions 256.x and newer, tmp.mount is shipped > > > > > > > in the > > > > > > > appropriate > > > > > > > location: /usr/lib/systemd/system/tmp.mount > > > > > > >=20 > > > > > > > Signed-off-by: Badrikesh Prusty > > > > > > > --- > > > > > > > .../deploy-image/deploy-image_0.1.bb | 3 ++- > > > > > > > .../systemd-tmpfs-tmp/files/postinst | 15 > > > > > > > +++++++++++++++ > > > > > > > .../systemd-tmpfs-tmp/systemd-tmpfs-tmp_0.1.bb | 10 > > > > > > > ++++++++++ > > > > > > > 3 files changed, 27 insertions(+), 1 deletion(-) > > > > > > > create mode 100644 meta-isar/recipes-installer/systemd- > > > > > > > tmpfs- > > > > > > > tmp/files/postinst > > > > > > > create mode 100644 meta-isar/recipes-installer/systemd- > > > > > > > tmpfs- > > > > > > > tmp/systemd-tmpfs-tmp_0.1.bb > > > > >=20 > > > > > > >=20 > > > > > > > diff --git a/meta-isar/recipes-installer/deploy- > > > > > > > image/deploy- > > > > > > > image_0.1.bb b/meta-isar/recipes-installer/deploy- > > > > > > > image/deploy- > > > > > > > image_0.1.bb > > > > >=20 > > > > > > > index 54e521b5..e67feae5 100644 > > > > > > > --- > > > > > > > a/meta-isar/recipes-installer/deploy-image/deploy- > > > > > > > image_0.1.bb > > > > >=20 > > > > > > > +++ > > > > > > > b/meta-isar/recipes-installer/deploy-image/deploy- > > > > > > > image_0.1.bb > > > > >=20 > > > > > > > @@ -11,7 +11,8 @@ SRC_URI =3D > > > > > > > "file://usr/bin/deploy-image-wic.sh \ > > > > > > > =20 > > > > > > > file://usr/lib/deploy-image-wic/handle-config.sh \ > > > > > > > " > > > > > > > DEPENDS:bookworm +=3D "bmap-tools" > > > > > > > -DEBIAN_DEPENDS =3D "bmap-tools, pv, dialog, util-linux, > > > > > > > parted, > > > > > > > fdisk, > > > > > > > gdisk, pigz, xz-utils, pbzip2, zstd" > > > > > > > +DEPENDS:append =3D " systemd-tmpfs-tmp" > > > > >=20 > > > > > The combination of DEPENDS:bookworm +=3D ... and DEPENDS:append > > > > > is > > > > > dangerous. We better refactor this to DEPENDS:append:bookworm =3D > > > > > " > > > > > ...", > > > > > DEPENDS:append =3D " ...". > > > > >=20 > > > > > > > +DEBIAN_DEPENDS =3D "bmap-tools, pv, dialog, util-linux, > > > > > > > parted, > > > > > > > fdisk, > > > > > > > gdisk, pigz, systemd-tmpfs-tmp, xz-utils, pbzip2, zstd" > > > > > > > do_install[cleandirs] =3D "${D}/usr/bin/ \ > > > > > > > ${D}/usr/lib/deploy-image-wic \ > > > > > > > " > > > > > > > diff --git a/meta-isar/recipes-installer/systemd-tmpfs- > > > > > > > tmp/files/postinst b/meta-isar/recipes-installer/systemd- > > > > > > > tmpfs- > > > > > > > tmp/files/postinst > > > > > > > new file mode 100644 > > > > > > > index 00000000..be1594e6 > > > > > > > --- /dev/null > > > > > > > +++ > > > > > > > b/meta-isar/recipes-installer/systemd-tmpfs- > > > > > > > tmp/files/postinst > > > > > > > @@ -0,0 +1,15 @@ > > > > > > > +#!/bin/sh > > > > > > > + > > > > > > > +set -e > > > > > > > + > > > > > > > +# Enable tmp.mount if /tmp is NOT configured in /etc/fstab > > > > > > >=20 > > Systemd already provides some predefined behaviour to manage common > mounts like `/tmp`. [1] > > "If a mount point is configured in both /etc/fstab and a unit file that > is stored below /usr/, the former will take precedence. If the unit > file is stored below /etc/, it will take precedence. This means: native > unit files take precedence over traditional configuration files, but > this is superseded by the rule that configuration in /etc/ will always > take precedence over configuration in /usr/." > - [2] > > TL;DR: If we put `tmp.mount` at `/usr/lib/systemd/system/` systemd > takes care about fstab vs tmp.mount precedence as you try to enforce it > here. > Besides that, as this check is executed as postinst, it possibly leads > to undesired mount results, depending on package install order. e.g. > later packages modify `/etc/fstab`. > > > > > > > > +if ! grep -q '/tmp' /etc/fstab; then > > > > > > > + # Ensure tmp.mount exists in systemd path > > > > > > > + if [ ! -e /usr/lib/systemd/system/tmp.mount ] && [ ! - > > > > > > > e > > > > > > > /etc/systemd/system/tmp.mount ]; then > > > > > > > + cp /usr/share/systemd/tmp.mount > > > > > > > /etc/systemd/system/tmp.mount > > > > > > > + fi > > > > > > > + > > > > > > > + # Enable the mount unit using deb-systemd-helper > > > > > > > + deb-systemd-helper enable tmp.mount || true > > > > > > > +fi > > > > > > > + > > > > > > > diff --git > > > > > > > a/meta-isar/recipes-installer/systemd-tmpfs-tmp/systemd- > > > > > > > tmpfs-tmp_0.1.bb b/meta-isar/recipes-installer/systemd- > > > > > > > tmpfs- > > > > > > > tmp/systemd-tmpfs-tmp_0.1.bb > > > > >=20 > > > > > > > new file mode 100644 > > > > > > > index 00000000..821cdd5f > > > > > > > --- /dev/null > > > > > > > +++ > > Is this recipe somehow aligned with the one already available in isar- > cip-core? > [3] CC: Quirin > > Imo, this recipe aims for a similar result, but provides more complete > dependencies. Both overrule systemd filesystem api semantics [1,2] as > they put the unit file under `/etc/systemd/system/` (as described > above). > > 1: https://systemd.io/API_FILE_SYSTEMS/ > 2: > https://www.freedesktop.org/software/systemd/man/latest/systemd.mount.htm= l# > 3: > > https://gitlab.com/cip-project/cip-core/isar-cip-core/-/blob/master/recip= es-core/tmp-fs/tmp-fs_0.2.bb?ref_type=3Dheads > > > > > > > > b/meta-isar/recipes-installer/systemd-tmpfs-tmp/systemd- > > > > > > > tmpfs- > > > > > > > tmp_0.1.bb > > > > >=20 > > > > > > > @@ -0,0 +1,10 @@ > > > > > > > +# This software is a part of ISAR. > > > > > > > +# Copyright (C) Siemens AG, 2024 > > > > > > > +# > > > > > > > +# SPDX-License-Identifier: MIT > > > > > > > + > > > > > > > +inherit dpkg-raw > > > > > > > + > > > > > > > +SRC_URI =3D "file://postinst" > > > > > > > + > > > > > > > +DEBIAN_DEPENDS =3D "systemd" > > > > >=20 > > > > > Please also set the DESCRIPTION and MAINTAINER fields. > > > > >=20 > > > > > Felix > > > > >=20 > > > > > > > --=20 > > > > > > > 2.39.5 > > > > >=20 > > > > > --=20 > > > > > Siemens AG > > > > > Linux Expert Center > > > > > Friedrich-Ludwig-Bauer-Str. 3 > > > > > 85748 Garching, Germany > > > > >=20 > > BR Alexander > > --=20 > Alexander Heinisch > Siemens AG > www.siemens.com > > --=20 > Alexander Heinisch > Siemens AG > www.siemens.com > --=20 You received this message because you are subscribed to the Google Groups "= isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/= 76420668-ff1f-4d75-87e7-56bdf58b1393n%40googlegroups.com. ------=_Part_452169_853313013.1751228855445 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi,

Sorry for the delay.
Thanks for your fee= dback. I just tried few use cases based on your comment.
On Debia= n Bookworm, works as expected.
On Debian Trixie, I assumed tmp.mo= unt from /usr/lib/systemd/system/ gets symlinked to /etc/systemd/system/ wh= en we do systemctl enable, but it didn't work.

C= ase 1: /tmp defined in /etc/fstab, service file: /usr/lib/systemd/system/tm= p.mount, systemctl enable didn't work as /tmp is managed by fstab
Result:=C2=A0The /etc/fstab entry for /tmp is in effect.

<= /div>
Case 2: /tmp defined in /etc/fstab, service file: /usr/lib/system= d/system/tmp.mount copied to /etc/systemd/system/tmp.mount
Result= : The unit file /etc/systemd/system/tmp.mount configuration for /tmp is in = effect.

Will send an updated patch soon.

Thanks,
Badrikesh
On Monday, June 16, 2025 at 6:2= 6:11=E2=80=AFPM UTC+5:30 Heinisch, Alexander wrote:
On Mon, 2025-06-16 at 03:01 -0700, &= #39;Badrikesh Prusty' via isar-users
wrote:
> > Hi,
> >=20
> > Thanks for your feedback. Added DESCRIPTION and MAINTAINER fi= eld
> > and
> > updated to DEPENDS:append:bookworm.
> > I had the same feeling when DEPENDS +=3D wasn't working w= hile
> > DEPENDS:bookworm +=3D was set, but I didn't investigate m= uch since
> > DEPENDS:append worked. Thank you for the clarification.
> >=20
> > Badrikesh
> >=20
> > On Monday, June 16, 2025 at 12:09:34=E2=80=AFPM UTC+5:30 MOES= SBAUER, Felix
> > wrote:
> > > > On Fri, 2025-06-13 at 13:23 -0400, 'Badrikesh P= rusty' via
> > > > isar-users
> > > > wrote:
> > > > > > Fix image installation when isar-image-in= staller rootfs is
> > > > > > booted
> > > > > > as
> > > > > > read-only
> > > > > > by ensuring /tmp is mounted as tmpfs.
> > > > > > This change utilizes systemd's tmp.mo= unt to mount /tmp as
> > > > > > tmpfs.
> > > > > > Since systemd
> > > > > > versions up to Debian Bookworm ship tmp.m= ount in
> > > > > > /usr/share/systemd/,
> > > > > > the file
> > > > > > must be copied to a directory where syste= mctl can enable
> > > > > > it.
> > > > > > For systemd versions 256.x and newer, tmp= .mount is shipped
> > > > > > in the
> > > > > > appropriate
> > > > > > location: /usr/lib/systemd/system/tmp.mou= nt
> > > > > >=20
> > > > > > Signed-off-by: Badrikesh Prusty <badrikes...@siemens.com>
> > > > > > ---
> > > > > > =C2=A0.../deploy-image/deploy-image_0.1.bb=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0 3 ++-
> > > > > > =C2=A0.../systemd-tmpfs-tmp/files/postins= t=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 | 15
> > > > > > +++++++++++++++
> > > > > > =C2=A0.../systemd-tmpfs-tmp/systemd-tmpfs-tmp_0.1.bb=C2=A0=C2=A0=C2=A0 | = 10
> > > > > > ++++++++++
> > > > > > =C2=A03 files changed, 27 insertions(+), = 1 deletion(-)
> > > > > > =C2=A0create mode 100644 meta-isar/recipe= s-installer/systemd-
> > > > > > tmpfs-
> > > > > > tmp/files/postinst
> > > > > > =C2=A0create mode 100644 meta-isar/recipe= s-installer/systemd-
> > > > > > tmpfs-
> > > > > > tmp/systemd-tmpfs-tmp_0.1.bb
> > > >=20
> > > > > >=20
> > > > > > diff --git a/meta-isar/recipes-installer/= deploy-
> > > > > > image/deploy-
> > > > > > image_0.1.bb b/meta-is= ar/recipes-installer/deploy-
> > > > > > image/deploy-
> > > > > > image_0.1.bb
> > > >=20
> > > > > > index 54e521b5..e67feae5 100644
> > > > > > ---
> > > > > > a/meta-isar/recipes-installer/deploy-imag= e/deploy-
> > > > > > image_0.1.bb
> > > >=20
> > > > > > +++
> > > > > > b/meta-isar/recipes-installer/deploy-imag= e/deploy-
> > > > > > image_0.1.bb
> > > >=20
> > > > > > @@ -11,7 +11,8 @@ SRC_URI =3D
> > > > > > "file://usr/bin/deploy-image-wic.sh= =C2=A0\
> > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0
> > > > > > file://usr/lib/deploy-image-wic/handle-co= nfig.sh=C2=A0\
> > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 "
> > > > > > =C2=A0DEPENDS:bookworm +=3D "bmap-to= ols"
> > > > > > -DEBIAN_DEPENDS =3D "bmap-tools, pv,= dialog, util-linux,
> > > > > > parted,
> > > > > > fdisk,
> > > > > > gdisk, pigz, xz-utils, pbzip2, zstd"
> > > > > > +DEPENDS:append =3D " systemd-tmpfs-= tmp"
> > > >=20
> > > > The combination of DEPENDS:bookworm +=3D ... and DE= PENDS:append
> > > > is
> > > > dangerous. We better refactor this to DEPENDS:appen= d:bookworm =3D
> > > > "
> > > > ...",
> > > > DEPENDS:append =3D " ...".
> > > >=20
> > > > > > +DEBIAN_DEPENDS =3D "bmap-tools, pv,= dialog, util-linux,
> > > > > > parted,
> > > > > > fdisk,
> > > > > > gdisk, pigz, systemd-tmpfs-tmp, xz-utils,= pbzip2, zstd"
> > > > > > =C2=A0do_install[cleandirs] =3D "${D= }/usr/bin/ \
> > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ${D}/usr/lib/deploy-image-wic \
> > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "
> > > > > > diff --git a/meta-isar/recipes-installer/= systemd-tmpfs-
> > > > > > tmp/files/postinst b/meta-isar/recipes-in= staller/systemd-
> > > > > > tmpfs-
> > > > > > tmp/files/postinst
> > > > > > new file mode 100644
> > > > > > index 00000000..be1594e6
> > > > > > --- /dev/null
> > > > > > +++
> > > > > > b/meta-isar/recipes-installer/systemd-tmp= fs-
> > > > > > tmp/files/postinst
> > > > > > @@ -0,0 +1,15 @@
> > > > > > +#!/bin/sh
> > > > > > +
> > > > > > +set -e
> > > > > > +
> > > > > > +# Enable tmp.mount if /tmp is NOT config= ured in /etc/fstab
> > > > > >=20

Systemd already provides some predefined behaviour to manage common
mounts like `/tmp`. [1]

"If a mount point is configured in both /etc/fstab and a unit file= that
is stored below /usr/, the former will take precedence. If the unit
file is stored below /etc/, it will take precedence. This means: native
unit files take precedence over traditional configuration files, but
this is superseded by the rule that configuration in /etc/ will always
take precedence over configuration in /usr/."
- [2]

TL;DR: If we put `tmp.mount` at `/usr/lib/systemd/system/` systemd
takes care about fstab vs tmp.mount precedence as you try to enforce it
here.
Besides that, as this check is executed as postinst, it possibly leads
to undesired mount results, depending on package install order. e.g.
later packages modify `/etc/fstab`.

> > > > > > +if ! grep -q '/tmp' /etc/fstab; = then
> > > > > > +=C2=A0=C2=A0=C2=A0 # Ensure tmp.mount ex= ists in systemd path
> > > > > > +=C2=A0=C2=A0=C2=A0 if [ ! -e /usr/lib/sy= stemd/system/tmp.mount ] && [ ! -
> > > > > > e
> > > > > > /etc/systemd/system/tmp.mount ]; then
> > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 cp /usr/share/systemd/tmp.mount
> > > > > > /etc/systemd/system/tmp.mount
> > > > > > +=C2=A0=C2=A0=C2=A0 fi
> > > > > > +
> > > > > > +=C2=A0=C2=A0=C2=A0 # Enable the mount un= it using deb-systemd-helper
> > > > > > +=C2=A0=C2=A0=C2=A0 deb-systemd-helper en= able tmp.mount || true
> > > > > > +fi
> > > > > > +
> > > > > > diff --git
> > > > > > a/meta-isar/recipes-installer/systemd-tmp= fs-tmp/systemd-
> > > > > > tmpfs-tmp_0.1.bb b/meta-isar/recipes-installer/systemd-
> > > > > > tmpfs-
> > > > > > tmp/
systemd-tmpfs-tmp_0.1.bb
> > > >=20
> > > > > > new file mode 100644
> > > > > > index 00000000..821cdd5f
> > > > > > --- /dev/null
> > > > > > +++

Is this recipe somehow aligned with the one already available in isar-
cip-core?
[3] CC: Quirin

Imo, this recipe aims for a similar result, but provides more complete
dependencies. Both overrule systemd filesystem api semantics [1,2] as
they put the unit file under `/etc/systemd/system/` (as described
above).

1: https://systemd.io/= API_FILE_SYSTEMS/
2:
https://www.fre= edesktop.org/software/systemd/man/latest/systemd.mount.html#
3:
https:= //gitlab.com/cip-project/cip-core/isar-cip-core/-/blob/master/recipes-core/= tmp-fs/tmp-fs_0.2.bb?ref_type=3Dheads

> > > > > > b/meta-isar/recipes-installer/systemd-tmp= fs-tmp/systemd-
> > > > > > tmpfs-
> > > > > > tmp_0.1.bb
> > > >=20
> > > > > > @@ -0,0 +1,10 @@
> > > > > > +# This software is a part of ISAR.
> > > > > > +# Copyright (C) Siemens AG, 2024
> > > > > > +#
> > > > > > +# SPDX-License-Identifier: MIT
> > > > > > +
> > > > > > +inherit dpkg-raw
> > > > > > +
> > > > > > +SRC_URI =3D "file://postinst"
> > > > > > +
> > > > > > +DEBIAN_DEPENDS =3D "systemd"
> > > >=20
> > > > Please also set the DESCRIPTION and MAINTAINER fiel= ds.
> > > >=20
> > > > Felix
> > > >=20
> > > > > > --=20
> > > > > > 2.39.5
> > > >=20
> > > > --=20
> > > > Siemens AG
> > > > Linux Expert Center
> > > > Friedrich-Ludwig-Bauer-Str. 3
> > > > 85748 Garching, Germany
> > > >=20

BR Alexander

--=20
Alexander Heinisch
Siemens AG
www.siemens.com

--=20
Alexander Heinisch
Siemens AG
www.siemens.com

--
You received this message because you are subscribed to the Google Groups &= quot;isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to isar-use= rs+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-use= rs/76420668-ff1f-4d75-87e7-56bdf58b1393n%40googlegroups.com.
------=_Part_452169_853313013.1751228855445-- ------=_Part_452168_1291867322.1751228855445--