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; Mon, 16 Jun 2025 12:01:36 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-qv1-f63.google.com (mail-qv1-f63.google.com [209.85.219.63]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 55GA1YH4024207 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 16 Jun 2025 12:01:35 +0200 Received: by mail-qv1-f63.google.com with SMTP id 6a1803df08f44-6fb3654112fsf79337526d6.3 for ; Mon, 16 Jun 2025 03:01:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1750068089; x=1750672889; 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=CrN7X/N5Sthjr9sxyiZEHwHJa0NdVTjiNfFZSN/QyrE=; b=N9jhDOlFq4m4b9SwmH0xHc1/Zo3vkKAccFXFvKAt5KjUNFgCl4tJrD7zNx4iwWooZY lgiCVfkuIajHaOVD77wMT0qyJVdcHN8f0DVyLsjnV6THSuUmVr3hGOnxdAkTa5tFp9y1 tM9VVlvkkQ4B0cEJC+ZFWMjPzvaNNAYAB7oxj0CZ5T5YCez9HGYhuLa5hyUXR0vdSBYG AN/ipl+POwkE/AbsUxKHc11QkKjQQwFtDSGWfPli9aRoPSackOlOSTW2VN2bEMtot14l 6RQ9BKBAJtatfbcNNqZcS4IpnR9QQvX33V5Cn9s19HTEY2uDBtaxQE/y2N65i5mNHRfX Nqpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750068089; x=1750672889; 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=CrN7X/N5Sthjr9sxyiZEHwHJa0NdVTjiNfFZSN/QyrE=; b=lklzHPbjMGYSgViJN+jieGFdAjHy7wtfLehaj59ah7Sfaj5UCqd/+bnJHaH6z/uEcr 0yWJmuIs4Knd/HbEq9vqqEpO8qdqy756RvuuT5jis3Tg/cYn8WnvVZwgbzTf/v3dLe9P WQywwkGVnNTmOjouPn634qksWnSNCkYRd3admLNPITEPPz0TCp5atyKTSrfxgsS5M/4s icjXcHZIxAKQph0CJhCYwX9bMoiVOSKsTOwDpvLvJkXzvacIvH6D9jB7pU3wWBNSUTuL jHQ2ET+N4onTyIRbKkrZxZXoMJWrpNgI5T4U/8uVdudLjDRthCAvbS0n0sa1/c23SmqP ZyQw== X-Forwarded-Encrypted: i=1; AJvYcCWmj88bRB0/G1yKC7JwLDhdpj+NMCit+x4xdO3ZOqaJ3DKksjT7QmI4Gq3XLKpamq+Ow957@ilbers.de X-Gm-Message-State: AOJu0Yw4weLTgfjH7ZvnYDr9WYB0P0WzEqpEZZ+jkAWq0HwVWitnq9JI lNmZ+NmDOJwBAI3MReOP5neXiBDLDvFj/g6azxYMYOt8DwGZCu9Wy7nB X-Google-Smtp-Source: AGHT+IG4MS7aD7DxpVsbzFfxonpMvQ26zr0s9Cv+6J2c1V6lvaFuNmd3t2N2Glg7DTA8Asigfw0EAQ== X-Received: by 2002:a05:6214:29cb:b0:6fa:fdb3:587b with SMTP id 6a1803df08f44-6fb4762769bmr160943566d6.1.1750068088909; Mon, 16 Jun 2025 03:01:28 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h=AZMbMZc58wNk3m2NFyhJs8g9NrtMIsqqCXSKUiur9Kq1GA3iQQ== Received: by 2002:a05:622a:1a1b:b0:4a6:fbd9:45ae with SMTP id d75a77b69052e-4a722c98ec1ls82710431cf.2.-pod-prod-09-us; Mon, 16 Jun 2025 03:01:28 -0700 (PDT) X-Received: by 2002:a05:620a:25ca:b0:7d3:8cc5:8a43 with SMTP id af79cd13be357-7d3c6cd8adfmr2011640685a.36.1750068087664; Mon, 16 Jun 2025 03:01:27 -0700 (PDT) Date: Mon, 16 Jun 2025 03:01:26 -0700 (PDT) From: "'Badrikesh Prusty' via isar-users" To: isar-users Message-Id: <071cdb5d-db12-4d86-b081-0c5c58ccf738n@googlegroups.com> In-Reply-To: <9edb5e06be7192fa27eeaf4d0474089f1473df90.camel@siemens.com> References: <20250613172323.14644-1-badrikesh.prusty@siemens.com> <9edb5e06be7192fa27eeaf4d0474089f1473df90.camel@siemens.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_439646_1536340075.1750068086741" 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: N1iIo9dFwZ89 ------=_Part_439646_1536340075.1750068086741 Content-Type: multipart/alternative; boundary="----=_Part_439647_1224520228.1750068086741" ------=_Part_439647_1224520228.1750068086741 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Thanks for your feedback. Added DESCRIPTION and MAINTAINER field and=20 updated to DEPENDS:append:bookworm. I had the same feeling when DEPENDS +=3D wasn't working while=20 DEPENDS:bookworm +=3D was set, but I didn't investigate much since=20 DEPENDS:append worked. Thank you for the clarification. Badrikesh 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 > > 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 > > index 54e521b5..e67feae5 100644 > > --- a/meta-isar/recipes-installer/deploy-image/deploy-image_0.1.bb > > +++ b/meta-isar/recipes-installer/deploy-image/deploy-image_0.1.bb > > @@ -11,7 +11,8 @@ SRC_URI =3D "file://usr/bin/deploy-image-wic.sh \ > > 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" > > The combination of DEPENDS:bookworm +=3D ... and DEPENDS:append is > dangerous. We better refactor this to DEPENDS:append:bookworm =3D " ...", > DEPENDS:append =3D " ...". > > > +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 > > +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 > > new file mode 100644 > > index 00000000..821cdd5f > > --- /dev/null > > +++ b/meta-isar/recipes-installer/systemd-tmpfs-tmp/systemd-tmpfs- > > tmp_0.1.bb > > @@ -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" > > Please also set the DESCRIPTION and MAINTAINER fields. > > Felix > > > --=20 > > 2.39.5 > > --=20 > Siemens AG > Linux Expert Center > Friedrich-Ludwig-Bauer-Str. 3 > 85748 Garching, Germany > > --=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/= 071cdb5d-db12-4d86-b081-0c5c58ccf738n%40googlegroups.com. ------=_Part_439647_1224520228.1750068086741 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi,

Thanks for your feedback. Added DESCRIPTION and MA= INTAINER field and updated to DEPENDS:append:bookworm.
I had the = same feeling when DEPENDS +=3D wasn't working while DEPENDS:bookworm +=3D w= as set, but I didn't investigate much since DEPENDS:append worked. Thank yo= u for the clarification.

Badrikesh

On Mo= nday, June 16, 2025 at 12:09:34=E2=80=AFPM UTC+5:30 MOESSBAUER, Felix wrote= :
On Fri, 202= 5-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 tmpf= s.
> Since systemd
> versions up to Debian Bookworm ship tmp.mount in /usr/share/system= d/,
> 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 <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/postinst=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/recipes-installer/systemd-tmpfs= -
> tmp/files/postinst
> =C2=A0create mode 100644 meta-isar/recipes-installer/systemd-tmpfs= -
> tmp/systemd-tmpfs-tmp_0.1.b= b
>=20
> diff --git a/meta-isar/recipes-installer/deploy-image/deploy-
> image_0.1.bb b/meta-isar/recipes-installer/depl= oy-image/deploy-
> image_0.1.bb
> index 54e521b5..e67feae5 100644
> --- a/meta-isar/recipes-installer/deploy-image/deploy-image_0.1.bb
> +++ b/meta-isar/recipes-installer/deploy-image/deploy-image_0.1.bb
> @@ -11,7 +11,8 @@ SRC_URI =3D "file://usr/bin/deploy-image-wi= c.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-config.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-tools"
> -DEBIAN_DEPENDS =3D "bmap-tools, pv, dialog, util-linux, part= ed, fdisk,
> gdisk, pigz, xz-utils, pbzip2, zstd"
> +DEPENDS:append =3D " systemd-tmpfs-tmp"

The combination of DEPENDS:bookworm +=3D ... and DEPENDS:append is
dangerous. We better refactor this to DEPENDS:append:bookworm =3D "= ; ...",
DEPENDS:append =3D " ...".

> +DEBIAN_DEPENDS =3D "bmap-tools, pv, dialog, util-linux, part= ed, 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-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
> +if ! grep -q '/tmp' /etc/fstab; then
> +=C2=A0=C2=A0=C2=A0 # Ensure tmp.mount exists in systemd path
> +=C2=A0=C2=A0=C2=A0 if [ ! -e /usr/lib/systemd/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 unit using deb-systemd-help= er
> +=C2=A0=C2=A0=C2=A0 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-i= nstaller/systemd-tmpfs-
> tmp/systemd-tmpfs-tmp_0.1.b= b
> new file mode 100644
> index 00000000..821cdd5f
> --- /dev/null
> +++ b/meta-isar/recipes-installer/systemd-tmpfs-tmp/systemd-tmpfs-
> tmp_0.1.bb
> @@ -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"

Please also set the DESCRIPTION and MAINTAINER fields.

Felix

> --=20
> 2.39.5

--=20
Siemens AG
Linux Expert Center
Friedrich-Ludwig-Bauer-Str. 3
85748 Garching, Germany

--
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/071cdb5d-db12-4d86-b081-0c5c58ccf738n%40googlegroups.com.
------=_Part_439647_1224520228.1750068086741-- ------=_Part_439646_1536340075.1750068086741--