Your message dated Mon, 02 Dec 2024 15:12:18 +0100
with message-id <173314873805.377359.9629473400972495825@localhost>
and subject line Re: sbuild-createchroot: E: failed running setup script:
cannot open /etc/passwd
has caused the Debian Bug report #979382,
regarding sbuild-createchroot: E: failed running setup script: cannot open
/etc/passwd
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
979382: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=979382
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: sbuild
Version: 0.80.1
Severity: normal
Hi,
on a freshly installed Debian unstable:
$ sudo apt install sbuild mmdebstrap
$ sbuild-createchroot --debootstrap=mmdebstrap \
--make-sbuild-tarball ~/.cache/sbuild/unstable-amd64.tar.gz \
unstable $(mktemp -d) # according to man mmdebstrap
I: SUITE: unstable
I: TARGET: /tmp/tmp.eLWAANve3b
I: MIRROR: http://deb.debian.org/debian
I: Running mmdebstrap --arch=amd64 --variant=buildd --verbose
--include=fakeroot,build-essential --components=main --resolve-deps
--no-merged-usr unstable /tmp/tmp.eLWAANve3b http://deb.debian.org/debian
I: the option --resolve-deps is a no-op. It only exists for compatibility with
some debootstrap wrappers.
I: the option --no-merged-usr is a no-op. It only exists for compatibility with
some debootstrap wrappers.
I: automatically chosen mode: unshare
I: chroot architecture amd64 is equal to the host's architecture
I: automatically chosen format: directory
I: running apt-get update...
[...]
I: cleaning package lists and apt cache...
Reading package lists...
I: success in 38.6073 seconds
E: failed running setup script: cannot open /etc/passwd at (eval 20) line 1,
<PH> line 1.
I guess this is due to the unshare mode, whereas sbuild-createchroot
tries to modify <TMPDIR>/etc/passwd as the normal user:
$ ll /tmp/tmp.eLWAANve3b/etc/passwd
-rw-r--r-- 1 100000 100000 922 5. Jan 23:40 /tmp/tmp.eLWAANve3b/etc/passwd
Cheers Jochen
-- System Information:
Debian Release: bullseye/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 5.10.0-1-amd64 (SMP w/8 CPU threads)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages sbuild depends on:
ii adduser 3.118
ii libsbuild-perl 0.80.1
ii perl 5.32.0-6
Versions of packages sbuild recommends:
ii autopkgtest 5.15
ii debootstrap 1.0.123
ii schroot 1.6.10-11+b1
Versions of packages sbuild suggests:
pn deborphan <none>
ii e2fsprogs 1.45.6-1
ii kmod 27+20200310-2
ii wget 1.21-1
-- no debconf information
--- End Message ---
--- Begin Message ---
Version: 0.86.0
Hi,
On Tue, 05 Jan 2021 23:48:35 +0100 Jochen Sprickerhof <[email protected]>
wrote:
> on a freshly installed Debian unstable:
>
> $ sudo apt install sbuild mmdebstrap
> $ sbuild-createchroot --debootstrap=mmdebstrap \
> --make-sbuild-tarball ~/.cache/sbuild/unstable-amd64.tar.gz \
> unstable $(mktemp -d) # according to man mmdebstrap
> I: SUITE: unstable
> I: TARGET: /tmp/tmp.eLWAANve3b
> I: MIRROR: http://deb.debian.org/debian
> I: Running mmdebstrap --arch=amd64 --variant=buildd --verbose
> --include=fakeroot,build-essential --components=main --resolve-deps
> --no-merged-usr unstable /tmp/tmp.eLWAANve3b http://deb.debian.org/debian
> I: the option --resolve-deps is a no-op. It only exists for compatibility
> with some debootstrap wrappers.
> I: the option --no-merged-usr is a no-op. It only exists for compatibility
> with some debootstrap wrappers.
> I: automatically chosen mode: unshare
> I: chroot architecture amd64 is equal to the host's architecture
> I: automatically chosen format: directory
> I: running apt-get update...
> [...]
> I: cleaning package lists and apt cache...
> Reading package lists...
> I: success in 38.6073 seconds
> E: failed running setup script: cannot open /etc/passwd at (eval 20) line 1,
> <PH> line 1.
>
> I guess this is due to the unshare mode, whereas sbuild-createchroot
> tries to modify <TMPDIR>/etc/passwd as the normal user:
>
> $ ll /tmp/tmp.eLWAANve3b/etc/passwd
> -rw-r--r-- 1 100000 100000 922 5. Jan 23:40 /tmp/tmp.eLWAANve3b/etc/passwd
The setup script which changes /etc/passwd is run inside
/usr/libexec/sbuild-usernsexec since commit e5a5dc7d2 from 2024-08-27 and is
included in sbuild 0.86.0.
Thus, closing.
Thanks!
cheers, josch
signature.asc
Description: signature
--- End Message ---