public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH v3] expand-on-first-boot: Ensure that /tmp is writable
@ 2024-07-25 14:17 'Clara Kowalsky' via isar-users
  2024-07-31  6:46 ` Uladzimir Bely
  2024-08-13  9:17 ` Uladzimir Bely
  0 siblings, 2 replies; 11+ messages in thread
From: 'Clara Kowalsky' via isar-users @ 2024-07-25 14:17 UTC (permalink / raw)
  To: isar-users; +Cc: quirin.gylstorff, Clara Kowalsky

By setting PrivateTmp, a new file system namespace is created for this
service and private /tmp/<service>/tmp and /var/tmp/<service>/tmp
subdirectories are mounted, which are only used for processes of this
namespace. The service unit receives a mount unit dependency for all
mounts required to access /tmp and /var/tmp.
This ensures that the /tmp directory is writable for the service, as
mktemp is used in expand-last-partition.sh and creates a temporary file.

Signed-off-by: Clara Kowalsky <clara.kowalsky@siemens.com>
---
 .../expand-on-first-boot/files/expand-on-first-boot.service      | 1 +
 1 file changed, 1 insertion(+)

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..8e76998b 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
@@ -16,6 +16,7 @@ Type=oneshot
 ExecStart=/usr/share/expand-on-first-boot/expand-last-partition.sh
 ExecStartPost=-/bin/systemctl disable expand-on-first-boot.service
 ExecStopPost=-/bin/systemctl disable expand-on-first-boot.service
+PrivateTmp=true
 
 [Install]
 WantedBy=sysinit.target
-- 
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/20240725141729.1344298-1-clara.kowalsky%40siemens.com.

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [PATCH v3] expand-on-first-boot: Ensure that /tmp is writable
@ 2024-07-24 13:39 'Clara Kowalsky' via isar-users
  0 siblings, 0 replies; 11+ messages in thread
From: 'Clara Kowalsky' via isar-users @ 2024-07-24 13:39 UTC (permalink / raw)
  To: isar-users; +Cc: quirin.gylstorff, Clara Kowalsky

By setting PrivateTmp, a new file system namespace is created for this
service and private /tmp/<service>/tmp and /var/tmp/<service>/tmp
subdirectories are mounted, which are only used for processes of this
namespace. The service unit receives a mount unit dependency for all
mounts required to access /tmp and /var/tmp.
This ensures that the /tmp directory is writable for the service, as
mktemp is used in expand-last-partition.sh and creates a temporary file.
---
 .../expand-on-first-boot/files/expand-on-first-boot.service      | 1 +
 1 file changed, 1 insertion(+)

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..8e76998b 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
@@ -16,6 +16,7 @@ Type=oneshot
 ExecStart=/usr/share/expand-on-first-boot/expand-last-partition.sh
 ExecStartPost=-/bin/systemctl disable expand-on-first-boot.service
 ExecStopPost=-/bin/systemctl disable expand-on-first-boot.service
+PrivateTmp=true
 
 [Install]
 WantedBy=sysinit.target
-- 
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/20240724133938.1298789-1-clara.kowalsky%40siemens.com.

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

end of thread, other threads:[~2024-09-03 19:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-25 14:17 [PATCH v3] expand-on-first-boot: Ensure that /tmp is writable 'Clara Kowalsky' via isar-users
2024-07-31  6:46 ` Uladzimir Bely
2024-08-13  9:17 ` Uladzimir Bely
2024-08-13  9:24   ` 'MOESSBAUER, Felix' via isar-users
2024-08-13 10:32     ` Uladzimir Bely
2024-08-15  4:07       ` Uladzimir Bely
2024-09-03  7:20         ` 'MOESSBAUER, Felix' via isar-users
2024-09-03  9:05           ` 'Jan Kiszka' via isar-users
2024-09-03 18:05             ` 'Florian Bezdeka' via isar-users
2024-09-03 19:49               ` 'Jan Kiszka' via isar-users
  -- strict thread matches above, loose matches on Subject: below --
2024-07-24 13:39 'Clara Kowalsky' 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