From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7165794234062077952 X-Received: by 2002:a05:6870:958f:b0:12d:2523:bb34 with SMTP id k15-20020a056870958f00b0012d2523bb34mr529684oao.92.1668503500196; Tue, 15 Nov 2022 01:11:40 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6830:17:b0:668:d7a2:6181 with SMTP id c23-20020a056830001700b00668d7a26181ls2678782otp.11.-pod-prod-gmail; Tue, 15 Nov 2022 01:11:39 -0800 (PST) X-Google-Smtp-Source: AA0mqf7us0Pti3jEO6OUH+kXRnJjQhraG0384omDEz8y0rFuBQHhamh7qV6ahQtQ4mNt2VsTDfp4 X-Received: by 2002:a9d:6f03:0:b0:66d:670c:aae8 with SMTP id n3-20020a9d6f03000000b0066d670caae8mr7500485otq.244.1668503499328; Tue, 15 Nov 2022 01:11:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668503499; cv=none; d=google.com; s=arc-20160816; b=fDW/EDeWpFghdtzEXQJStaWVRJ9AO6UfwRs45kEwvM46zzH+crf9sWnHrgSyO+PsZ/ amu5hlgspX9n/CqRRaA4VkdZFjEVXjgn5V9/ttGtFLOnXv/kTlA1kp4m1eTveBVV2Vy6 pDCydJdDo+dDcok7JqbMHtkvnJQgQxnCFETdWxWd3UXe2d9wIrE22kZJcxDmU0J0xmLj YbnABLLxQ+x4oMFsjBAtQ2PnaGsAqwgMpbGsHddcKJ3pjPs7nZmXObhyHuVsc9tlhCs5 wYwhVwUiY/hAurnJjo1duxHKfDyKgji/Fn8G4q0QeR8SBJTQusxqBz7uiRVq7yeQY8+t a1DA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=T7HGWfnnQcEB42ds55EEWkkLCluMC+3hXAmz5VSNlI4=; b=ICOxLfadz3DYdrM/3YhZ48im4lIHK6tGVGp65lz0gHdPU8gcutd4NQOELsduQKx7EX ul8e/F7N+QqFVFyo+QGGJ6VrrDpSEL/o7C0BB1xj+NWwfA8jgokPtzvzaLOfSh6lfxR1 1+G0zmSoRXnij25EdlZq+T6YGjhsBNRMNZAxzgOklkP3CQkJsLD1iiubeuPCfx+51vvE T/TG7jMbswU8jQQRai6QDhA5OUM5KjcQpjEQRu6S2hONvoWqoky6dxe+SDAJK46QBQgZ S9PleASvAZyQuxuOHWLt8rBZIC19Znz5LtH3vpjaI9TBI1Ea5deSN9m1UT+9R6orTH8f Zb7g== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id z34-20020a056870462200b00141f024fbbdsi256665oao.5.2022.11.15.01.11.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 Nov 2022 01:11:39 -0800 (PST) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from hp.localnet (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 2AF9BZBP026866 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 15 Nov 2022 10:11:36 +0100 From: Uladzimir Bely To: Henning Schild Cc: isar-users@googlegroups.com Subject: Re: [PATCH] example-raw: fix postinst script dependency on adduser Date: Tue, 15 Nov 2022 12:11:25 +0300 Message-ID: <4741870.OV4Wx5bFTl@hp> In-Reply-To: <20221114110758.78eb62cd@md1za8fc.ad001.siemens.net> References: <20221114090120.18016-1-ubely@ilbers.de> <20221114110758.78eb62cd@md1za8fc.ad001.siemens.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: PWK8e+XFaUkM In mail from =D0=BF=D0=BE=D0=BD=D0=B5=D0=B4=D0=B5=D0=BB=D1=8C=D0=BD=D0=B8= =D0=BA, 14 =D0=BD=D0=BE=D1=8F=D0=B1=D1=80=D1=8F 2022 =D0=B3. 13:07:58 +03 Y= ou wrote: > Am Mon, 14 Nov 2022 10:01:20 +0100 >=20 > schrieb Uladzimir Bely : > > Starting from Nov 2022, package `adduser` is not preinstalled > > when the distro debootstrapped. > >=20 > > This caused example-raw `postinst: 6: addgroup: not found` error > > when installing `container-amd64-bookworm` image. > >=20 > > The problem was not reproduced on `qemuamd64-bookworm` while `adduser` > > exist in the image as a dependency of some other package. > >=20 > > Fix the problem by adding explicit dependency to `adduser` package. > >=20 > > Signed-off-by: Uladzimir Bely > > --- > >=20 > > 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(-) > >=20 > > 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 @@ >=20 > I would suggest to bump to 0.3.1 with that. >=20 > > DESCRIPTION =3D "Sample application for ISAR" > > MAINTAINER =3D "Your name here " > >=20 > > -DEBIAN_DEPENDS =3D "apt (>=3D 0.4.2), passwd" > > +DEBIAN_DEPENDS =3D "adduser, apt (>=3D 0.4.2), passwd" >=20 > Nice catch. But you can remove passwd now since adduser depends on > passwd in all distros. >=20 > Henning >=20 > > SRC_URI =3D "file://README \ > > =20 > > file://postinst \ > >=20 > > 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 @@ > >=20 > > set -e > > =20 > > if ! getent group isar >/dev/null; then > >=20 > > + # We use `addgroup` instead of `groupadd` here in order > > + # to prove `adduser` Debian dependency in the recipe >=20 > I think this mainly serves as an example on how people should create a > group with a package. So we should skip that comment. If we find that > groupadd should rather be used to create a group with a package, we > should switch to be a good example. >=20 Actually, `groupadd` also works, so we technically don't need `adduser`=20 package at all. From my experiment, the difference is that `groupadd` creat= es=20 the group with GID=3D999, while addgroup creates it with GID=3DN+1, where N= is the=20 last GID in /etc/group. > I do not remember where i got that pattern from. Likely some postinst > from some service package like apache or nginx. >=20 > Henning >=20 > > addgroup --quiet --system isar > > =20 > > fi