public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] example-raw: fix postinst script dependency on adduser
@ 2022-11-14  9:01 Uladzimir Bely
  2022-11-14 10:07 ` Henning Schild
  0 siblings, 1 reply; 4+ messages in thread
From: Uladzimir Bely @ 2022-11-14  9:01 UTC (permalink / raw)
  To: isar-users

Starting from Nov 2022, package `adduser` is not preinstalled
when the distro debootstrapped.

This caused example-raw `postinst: 6: addgroup: not found` error
when installing `container-amd64-bookworm` image.

The problem was not reproduced on `qemuamd64-bookworm` while `adduser`
exist in the image as a dependency of some other package.

Fix the problem by adding explicit dependency to `adduser` package.

Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
---
 meta-isar/recipes-app/example-raw/example-raw_0.3.bb | 2 +-
 meta-isar/recipes-app/example-raw/files/postinst     | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta-isar/recipes-app/example-raw/example-raw_0.3.bb b/meta-isar/recipes-app/example-raw/example-raw_0.3.bb
index 21664642..7f90d43b 100644
--- a/meta-isar/recipes-app/example-raw/example-raw_0.3.bb
+++ b/meta-isar/recipes-app/example-raw/example-raw_0.3.bb
@@ -5,7 +5,7 @@
 
 DESCRIPTION = "Sample application for ISAR"
 MAINTAINER = "Your name here <you@domain.com>"
-DEBIAN_DEPENDS = "apt (>= 0.4.2), passwd"
+DEBIAN_DEPENDS = "adduser, apt (>= 0.4.2), passwd"
 
 SRC_URI = "file://README \
 	   file://postinst \
diff --git a/meta-isar/recipes-app/example-raw/files/postinst b/meta-isar/recipes-app/example-raw/files/postinst
index d25c251d..a461600a 100644
--- a/meta-isar/recipes-app/example-raw/files/postinst
+++ b/meta-isar/recipes-app/example-raw/files/postinst
@@ -3,6 +3,8 @@
 set -e
 
 if ! getent group isar >/dev/null; then
+	# We use `addgroup` instead of `groupadd` here in order
+	# to prove `adduser` Debian dependency in the recipe
 	addgroup --quiet --system isar
 fi
 
-- 
2.20.1


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

end of thread, other threads:[~2022-11-15 16:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-14  9:01 [PATCH] example-raw: fix postinst script dependency on adduser Uladzimir Bely
2022-11-14 10:07 ` Henning Schild
2022-11-15  9:11   ` Uladzimir Bely
2022-11-15 16:40     ` Henning Schild

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox