public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] expand-on-first-boot: Add /tmp to ConditionPathIsReadWrite
@ 2024-07-12 14:03 'Clara Kowalsky' via isar-users
  2024-07-12 14:09 ` 'Jan Kiszka' via isar-users
  2024-07-18  7:27 ` 'MOESSBAUER, Felix' via isar-users
  0 siblings, 2 replies; 4+ messages in thread
From: 'Clara Kowalsky' via isar-users @ 2024-07-12 14:03 UTC (permalink / raw)
  To: isar-users; +Cc: quirin.gylstorff, Clara Kowalsky

This verifies that /tmp is readable and writable before starting the
service.

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/20240712140316.769498-1-clara.kowalsky%40siemens.com.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] expand-on-first-boot: Add /tmp to ConditionPathIsReadWrite
  2024-07-12 14:03 [PATCH] expand-on-first-boot: Add /tmp to ConditionPathIsReadWrite 'Clara Kowalsky' via isar-users
@ 2024-07-12 14:09 ` 'Jan Kiszka' via isar-users
  2024-07-18  7:27 ` 'MOESSBAUER, Felix' via isar-users
  1 sibling, 0 replies; 4+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2024-07-12 14:09 UTC (permalink / raw)
  To: Clara Kowalsky, isar-users; +Cc: quirin.gylstorff

On 12.07.24 16:03, 'Clara Kowalsky' via isar-users wrote:
> This verifies that /tmp is readable and writable before starting the
> service.

Rather then repeating what the patch does, explain why it is doing this.

Jan

> 
> 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

-- 
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/14bf770c-f175-4c51-9416-9f6492f550a2%40siemens.com.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] expand-on-first-boot: Add /tmp to ConditionPathIsReadWrite
  2024-07-12 14:03 [PATCH] expand-on-first-boot: Add /tmp to ConditionPathIsReadWrite 'Clara Kowalsky' via isar-users
  2024-07-12 14:09 ` 'Jan Kiszka' via isar-users
@ 2024-07-18  7:27 ` 'MOESSBAUER, Felix' via isar-users
  2024-07-24 13:48   ` 'Kowalsky, Clara' via isar-users
  1 sibling, 1 reply; 4+ messages in thread
From: 'MOESSBAUER, Felix' via isar-users @ 2024-07-18  7:27 UTC (permalink / raw)
  To: isar-users, Kowalsky, Clara; +Cc: quirin.gylstorff

On Fri, 2024-07-12 at 16:03 +0200, 'Clara Kowalsky' via isar-users
wrote:
> This verifies that /tmp is readable and writable before starting the
> service.
> 
> 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

Hi, can't we simply use PrivateTmp=true ? This would unshare /tmp and
/var/tmp from the host / calling environment.

I'm anyways wondering how the system will behave if /tmp is not
writable, as having this writable is mandated by systemd.

What data is stored there? If this is potentially big, we should not
use /tmp at all but instead /var/tmp.

Felix

>  
>  [Service]
>  Type=oneshot
> -- 
> 2.45.2
> 

-- 
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/ea98d68c3c00f1fb58cc6c09eb23c52f878d089c.camel%40siemens.com.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH] expand-on-first-boot: Add /tmp to ConditionPathIsReadWrite
  2024-07-18  7:27 ` 'MOESSBAUER, Felix' via isar-users
@ 2024-07-24 13:48   ` 'Kowalsky, Clara' via isar-users
  0 siblings, 0 replies; 4+ messages in thread
From: 'Kowalsky, Clara' via isar-users @ 2024-07-24 13:48 UTC (permalink / raw)
  To: MOESSBAUER, Felix, isar-users; +Cc: quirin.gylstorff



> -----Original Message-----
> From: Moessbauer, Felix (T CED OES-DE) <felix.moessbauer@siemens.com>
> Sent: Thursday, July 18, 2024 9:27 AM
> To: isar-users@googlegroups.com; Kowalsky, Clara (T CED OES-DE)
> <clara.kowalsky@siemens.com>
> Cc: Gylstorff, Quirin (T CED OES-DE) <quirin.gylstorff@siemens.com>
> Subject: Re: [PATCH] expand-on-first-boot: Add /tmp to
> ConditionPathIsReadWrite
> 
> On Fri, 2024-07-12 at 16:03 +0200, 'Clara Kowalsky' via isar-users
> wrote:
> > This verifies that /tmp is readable and writable before starting the
> > service.
> >
> > 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
> 
> Hi, can't we simply use PrivateTmp=true ? This would unshare /tmp and /var/tmp
> from the host / calling environment.

Thanks for the comment. I tested it with PrivateTmp=true and this also works fine. 
> 
> I'm anyways wondering how the system will behave if /tmp is not writable, as
> having this writable is mandated by systemd.
> 
> What data is stored there? If this is potentially big, we should not use /tmp at all
> but instead /var/tmp.

Mktemp just creates an empty directory that is used as mount point, so no need to switch to /var/tmp.

Clara

> Felix
> 
> >
> >  [Service]
> >  Type=oneshot
> > --
> > 2.45.2
> >
> 
> --
> 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/AS5PR10MB8173EAD442FF61AB5BD496FF93AA2%40AS5PR10MB8173.EURPRD10.PROD.OUTLOOK.COM.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-07-24 13:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-12 14:03 [PATCH] expand-on-first-boot: Add /tmp to ConditionPathIsReadWrite 'Clara Kowalsky' via isar-users
2024-07-12 14:09 ` 'Jan Kiszka' via isar-users
2024-07-18  7:27 ` 'MOESSBAUER, Felix' via isar-users
2024-07-24 13:48   ` 'Kowalsky, Clara' 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