* [PATCH v2] expand-on-first-boot: Add /tmp to ConditionPathIsReadWrite
@ 2024-07-12 15:39 'Clara Kowalsky' via isar-users
2024-07-18 5:35 ` Uladzimir Bely
0 siblings, 1 reply; 3+ messages in thread
From: 'Clara Kowalsky' via isar-users @ 2024-07-12 15:39 UTC (permalink / raw)
To: isar-users; +Cc: quirin.gylstorff, Clara Kowalsky
Since mktemp is used and creates a temporary file, we need to ensure
that /tmp is writable.
Signed-off-by: Clara Kowalsky <clara.kowalsky@siemens.com>
---
.../expand-on-first-boot/files/expand-on-first-boot.service | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-support/expand-on-first-boot/files/expand-on-first-boot.service b/meta/recipes-support/expand-on-first-boot/files/expand-on-first-boot.service
index 90c92a39..9daae719 100644
--- a/meta/recipes-support/expand-on-first-boot/files/expand-on-first-boot.service
+++ b/meta/recipes-support/expand-on-first-boot/files/expand-on-first-boot.service
@@ -9,7 +9,7 @@ DefaultDependencies=no
Conflicts=shutdown.target
After=systemd-remount-fs.service
Before=local-fs-pre.target shutdown.target
-ConditionPathIsReadWrite=/etc
+ConditionPathIsReadWrite=/etc /tmp
[Service]
Type=oneshot
--
2.45.2
--
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 email to isar-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/20240712153929.772552-1-clara.kowalsky%40siemens.com.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] expand-on-first-boot: Add /tmp to ConditionPathIsReadWrite
2024-07-12 15:39 [PATCH v2] expand-on-first-boot: Add /tmp to ConditionPathIsReadWrite 'Clara Kowalsky' via isar-users
@ 2024-07-18 5:35 ` Uladzimir Bely
2024-07-18 7:11 ` 'MOESSBAUER, Felix' via isar-users
0 siblings, 1 reply; 3+ messages in thread
From: Uladzimir Bely @ 2024-07-18 5:35 UTC (permalink / raw)
To: isar-users
On Fri, 2024-07-12 at 17:39 +0200, 'Clara Kowalsky' via isar-users
wrote:
> Since mktemp is used and creates a temporary file, we need to ensure
> that /tmp is writable.
>
> Signed-off-by: Clara Kowalsky <clara.kowalsky@siemens.com>
> ---
> .../expand-on-first-boot/files/expand-on-first-boot.service | 2
> +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-support/expand-on-first-boot/files/expand-
> on-first-boot.service b/meta/recipes-support/expand-on-first-
> boot/files/expand-on-first-boot.service
> index 90c92a39..9daae719 100644
> --- a/meta/recipes-support/expand-on-first-boot/files/expand-on-
> first-boot.service
> +++ b/meta/recipes-support/expand-on-first-boot/files/expand-on-
> first-boot.service
> @@ -9,7 +9,7 @@ DefaultDependencies=no
> Conflicts=shutdown.target
> After=systemd-remount-fs.service
> Before=local-fs-pre.target shutdown.target
> -ConditionPathIsReadWrite=/etc
> +ConditionPathIsReadWrite=/etc /tmp
>
In a downstream we have read-only rootfs and some writable last
partition that we want to expand. Having writable "/etc" condition in
Isar recipe makes us use .bbappend rewrite the service file.
Would not it be better not to depend on writable "/etc" at all in Isar?
> [Service]
> Type=oneshot
> --
> 2.45.2
>
BTW, in the same downstream something close we do for sshd-regen-keys
service. Due to readonly rootfs, instead of writable "/etc" condition
we use more narrow "/etc/ssh" one. So it might be changed in Isar also,
but it is a topic for a separate discussion.
--
Best regards,
Uladzimir.
--
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 email to isar-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/a822d75f4c1e85d483e1b32809c818faf95f0226.camel%40ilbers.de.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] expand-on-first-boot: Add /tmp to ConditionPathIsReadWrite
2024-07-18 5:35 ` Uladzimir Bely
@ 2024-07-18 7:11 ` 'MOESSBAUER, Felix' via isar-users
0 siblings, 0 replies; 3+ messages in thread
From: 'MOESSBAUER, Felix' via isar-users @ 2024-07-18 7:11 UTC (permalink / raw)
To: ubely, isar-users
On Thu, 2024-07-18 at 08:35 +0300, Uladzimir Bely wrote:
> On Fri, 2024-07-12 at 17:39 +0200, 'Clara Kowalsky' via isar-users
> wrote:
> > Since mktemp is used and creates a temporary file, we need to
> > ensure
> > that /tmp is writable.
> >
> > Signed-off-by: Clara Kowalsky <clara.kowalsky@siemens.com>
> > ---
> > .../expand-on-first-boot/files/expand-on-first-boot.service |
> > 2
> > +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meta/recipes-support/expand-on-first-
> > boot/files/expand-
> > on-first-boot.service b/meta/recipes-support/expand-on-first-
> > boot/files/expand-on-first-boot.service
> > index 90c92a39..9daae719 100644
> > --- a/meta/recipes-support/expand-on-first-boot/files/expand-on-
> > first-boot.service
> > +++ b/meta/recipes-support/expand-on-first-boot/files/expand-on-
> > first-boot.service
> > @@ -9,7 +9,7 @@ DefaultDependencies=no
> > Conflicts=shutdown.target
> > After=systemd-remount-fs.service
> > Before=local-fs-pre.target shutdown.target
> > -ConditionPathIsReadWrite=/etc
> > +ConditionPathIsReadWrite=/etc /tmp
> >
>
> In a downstream we have read-only rootfs and some writable last
> partition that we want to expand. Having writable "/etc" condition in
> Isar recipe makes us use .bbappend rewrite the service file.
>
> Would not it be better not to depend on writable "/etc" at all in
> Isar?
According to systemd, /etc must be RW when transitioning out of the
initrd. The reason for that is the creation of the machine-id.
Felix
>
> > [Service]
> > Type=oneshot
> > --
> > 2.45.2
> >
>
> BTW, in the same downstream something close we do for sshd-regen-keys
> service. Due to readonly rootfs, instead of writable "/etc" condition
> we use more narrow "/etc/ssh" one. So it might be changed in Isar
> also,
> but it is a topic for a separate discussion.
>
> --
> Best regards,
> Uladzimir.
>
--
Siemens AG, Technology
Linux Expert Center
--
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 email to isar-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/daac26ddcb386a28ff13301c5f8abb521a078a57.camel%40siemens.com.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-07-18 7:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-12 15:39 [PATCH v2] expand-on-first-boot: Add /tmp to ConditionPathIsReadWrite 'Clara Kowalsky' via isar-users
2024-07-18 5:35 ` Uladzimir Bely
2024-07-18 7:11 ` 'MOESSBAUER, Felix' via isar-users
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox