Bug#1055065: doesnt find useradd

2023-12-18 Thread Johannes Schauer Marin Rodrigues
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 + Harlan Lieberman-Berg  
wrote:
> On Mon, 30 Oct 2023 17:14:57 +0100 Marc Haber
>  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

signature.asc
Description: signature


Bug#1055065: doesnt find useradd

2023-12-05 Thread Harlan Lieberman-Berg
On Mon, 30 Oct 2023 17:14:57 +0100 Marc Haber
 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



Bug#1055065: doesnt find useradd

2023-10-30 Thread Marc Haber
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  debootstrap1.0.133
ii  python33.11.4-5+b1
ii  python3-tomlkit0.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-dev1.22.0

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

-- no debconf information