Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1173338 > unrolled thread

Bug#1055065: doesnt find useradd

Started byMarc Haber <mh+debian-packages@zugschlus.de>
First post2023-10-30 17:20 +0100
Last post2023-12-18 23:50 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.debian.bugs.dist


Contents

  Bug#1055065: doesnt find useradd Marc Haber <mh+debian-packages@zugschlus.de> - 2023-10-30 17:20 +0100
    Bug#1055065: doesnt find useradd Harlan Lieberman-Berg <hlieberman@debian.org> - 2023-12-05 23:50 +0100
      Bug#1055065: doesnt find useradd Johannes Schauer Marin Rodrigues <josch@debian.org> - 2023-12-18 23:50 +0100

#1173338 — Bug#1055065: doesnt find useradd

FromMarc Haber <mh+debian-packages@zugschlus.de>
Date2023-10-30 17:20 +0100
SubjectBug#1055065: doesnt find useradd
Message-ID<HuD9D-1Vx6-11@gated-at.bofh.it>
Package: debspawn
Version: 0.6.2-1
Severity: important

Important because this breaks debspawn create

debspawn create sid errors out because the tool cannot find useradd. I
have added adduser manually to "include_pkgs" in osbase.py and this
allows debspawn create sid to finish.

Greetings
Marc


-- System Information:
Debian Release: trixie/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'oldstable-security'), (500, 'unstable'), (500, 'stable'), (500, 'oldstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.5.9-zgws1 (SMP w/12 CPU threads; PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages debspawn depends on:
ii  debootstrap        1.0.133
ii  python3            3.11.4-5+b1
ii  python3-tomlkit    0.12.1-1
ii  systemd-container  254.5-1
ii  zstd               1.5.5+dfsg2-2

Versions of packages debspawn recommends:
ii  devscripts  2.23.6
ii  dpkg-dev    1.22.0

Versions of packages debspawn suggests:
ii  build-essential  12.10
ii  sudo             1.9.14p2-1

-- no debconf information

[toc] | [next] | [standalone]


#1177429

FromHarlan Lieberman-Berg <hlieberman@debian.org>
Date2023-12-05 23:50 +0100
Message-ID<HHMoQ-bvNU-27@gated-at.bofh.it>
In reply to#1173338
On Mon, 30 Oct 2023 17:14:57 +0100 Marc Haber
<mh+debian-packages@zugschlus.de> wrote:
> debspawn create sid errors out because the tool cannot find useradd. I
> have added adduser manually to "include_pkgs" in osbase.py and this
> allows debspawn create sid to finish.

I've done a bit of digging, and I traced this problem back to a change
in the way debootstrap works when installing the buildd variant, which
is what debspawn uses.  In bug 837060, debootstrap stopped installing
packages which were Priority: Required but not essential.
Specifically, the passwd package is the cause here; failure to install
passwd means that the `useradd` command is not available.  The reason
that installing the adduser package fixed this is that adduser depends
on passwd, so it was indirectly pulled in.

It's certainly easy enough for us to fix on the debspawn side -- we
can just unilaterally add the passwd package -- but it is a bit...
strange for us to have to fix.  It seems, to me, like this is
something we should be able to rely on debootstrap for.  I've copied
the relevant bug; hopefully we can get some input from the bootstrap
folx.  (Maybe we should be using the minbase variant instead? Except
we're always building packages... should we be using a specific user?
I'm not sure!)

Sincerely,

-- 
Harlan Lieberman-Berg
~hlieberman

[toc] | [prev] | [next] | [standalone]


#1179231

FromJohannes Schauer Marin Rodrigues <josch@debian.org>
Date2023-12-18 23:50 +0100
Message-ID<HMuAV-evsy-1@gated-at.bofh.it>
In reply to#1177429

[Multipart message — attachments visible in raw view] — view raw

Hi,

I'm the author of the change that removed Priority:Required packages from
build-essential. Since there has been no other input to this bug I thought I
just weigh in with my two cents.

On Tue, 5 Dec 2023 22:39:51 +0000 Harlan Lieberman-Berg <hlieberman@debian.org> wrote:
> On Mon, 30 Oct 2023 17:14:57 +0100 Marc Haber
> <mh+debian-packages@zugschlus.de> wrote:
> > debspawn create sid errors out because the tool cannot find useradd. I
> > have added adduser manually to "include_pkgs" in osbase.py and this
> > allows debspawn create sid to finish.
> 
> I've done a bit of digging, and I traced this problem back to a change
> in the way debootstrap works when installing the buildd variant, which
> is what debspawn uses.  In bug 837060, debootstrap stopped installing
> packages which were Priority: Required but not essential.

You CC-ed that bug in your last message but since the bug is archived I don't
think that had the effect you intended.

> Specifically, the passwd package is the cause here; failure to install
> passwd means that the `useradd` command is not available.  The reason
> that installing the adduser package fixed this is that adduser depends
> on passwd, so it was indirectly pulled in.

> It's certainly easy enough for us to fix on the debspawn side -- we can just
> unilaterally add the passwd package -- but it is a bit...  strange for us to
> have to fix.  It seems, to me, like this is something we should be able to
> rely on debootstrap for.  I've copied the relevant bug; hopefully we can get
> some input from the bootstrap folx.  (Maybe we should be using the minbase
> variant instead? Except we're always building packages... should we be using
> a specific user?  I'm not sure!)

My main motivation for this change in debootstrap was to prevent source
packages from missing to declare build dependencies because the buildd
debootstrap variant automatically pulls in Priority:required packages and thus
missing B-Ds on mount or tzdata or similar would go unnoticed.

I think my change had a similar effect here. Your code requires a package that
is not Essential:yes (passwd) and you did not explicitly install it but relied
on it getting installed implicitly. In my opinion, the correct way forward
would be to explicitly pull in all the packages your code needs (except of
course if they are Essential:yes). I'm sorry that my change has caused you more
work but in the end I think it helped discover a dependency of your code that
you did not make explicit.

Thanks!

cheers, josch

P.S.: Funny side note: missing passwd in the buildd profile is actually only
possible due to *two* changes that I triggered. One is the change in
debootstrap that you found but the other is apt no longer depending on adduser.
If it still did, you would not have a problem even with the current handling of
the buildd variant. See
https://salsa.debian.org/apt-team/apt/-/merge_requests/260/diffs

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.bugs.dist


csiph-web