From: Uladzimir Bely <ubely@ilbers.de>
To: isar-users@googlegroups.com
Subject: [PATCH] example-raw: fix postinst script dependency on adduser
Date: Mon, 14 Nov 2022 10:01:20 +0100 [thread overview]
Message-ID: <20221114090120.18016-1-ubely@ilbers.de> (raw)
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
next reply other threads:[~2022-11-14 9:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-14 9:01 Uladzimir Bely [this message]
2022-11-14 10:07 ` Henning Schild
2022-11-15 9:11 ` Uladzimir Bely
2022-11-15 16:40 ` Henning Schild
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221114090120.18016-1-ubely@ilbers.de \
--to=ubely@ilbers.de \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox