Am Tue, Feb 23, 2021 at 12:08:39AM +0100 schrieb Johannes Schauer Marin 
Rodrigues:
> Hi,
> 
> Quoting Tobias Frost (2021-02-22 09:04:41)
> > I was playing with mmdebstrap to see if I could bootstrap a system even 
> > without dpkg,
> > suitable for some embedded device… However, I could not get 
> > --mode=chrootless to work:
> > 
> > I'm not sure if this is PEBKAC or a bug… If the former, I'd apprecicate 
> > some hints…
> > 
> > (I ran this as root in a chroot env, bootstraped for convenience reasons 
> > with pbuilder;
> > but I get the same results when doing that as non-root outside of a chroot.)
> > 
> > The command I run:
> > 
> > mmdebstrap --mode=chrootless --aptopt='Acquire::http { Proxy 
> > "http://10.243.48.3:3142";; }' --dpkgopt='path-exclude=/usr/share/man/*' 
> > --dpkgopt='path-include=/usr/share/man/man[1-9]/*' 
> > --dpkgopt='path-exclude=/usr/share/locale/*' 
> > --dpkgopt='path-include=/usr/share/locale/locale.alias' 
> > --dpkgopt='path-exclude=/usr/share/doc/*' 
> > --dpkgopt='path-include=/usr/share/doc/*/copyright' 
> > --dpkgopt='path-include=/usr/share/doc/*/changelog.Debian.*' 
> > --dpkgopt='path-exclude=/usr/share/{doc,info,man,omf,help,gnome/help}/*' 
> > --variant=essential --format=directory --architecture=armhf stable target2
> > W: running chrootless mode as root might damage the host system
> > I: skipping emulation check in chrootless mode
> > E: cannot open /etc/dpkg/dpkg.cfg.d/99mmdebstrap: No such file or directory
> > W: listening on child socket failed: 
> > 
> > 
> > root@isildor:~/mm# ls -la /etc/dpkg/dpkg.cfg.d/99mmdebstrap
> > -rw-r--r-- 1 root root 0 Feb 22 07:56 /etc/dpkg/dpkg.cfg.d/99mmdebstrap
> > 
> > root@isildor:~/mm# ls -la target2/etc/    
> > total 12
> > drwxr-xr-x 3 root root 4096 Feb 22 07:56 .
> > drwxr-xr-x 5 root root 4096 Feb 22 07:56 ..
> > drwxr-xr-x 5 root root 4096 Feb 22 07:56 apt
> > 
> > Possibly mmdeboostrap needs to copy this file to TARGET? Or do I need to do 
> > so with hooks?
> 
> I already explained in the other mail why chrootless mode is currently broken
> due to missing support for DPKG_ROOT in debconf and other essential packages.

Yeah, thanks again for the info!

> But even if support was there, what you try to do above would not work because
> currently one cannot pass any other configuration than the one in /etc/dpkg to
> dpkg. Since in chrootless mode, we never "chroot", dpkg will always use the
> system configuration and completely ignore whatever you put into your chroot
> using the --dpkgopt option.
 
> I talked about this with guillem in #debian-dpkg on IRC and he is aware of the
> issue but I don't think there is an open bug about this.
> 
> What we could do on the mmdebstrap side, is to warn the user or error out if
> the user tries to run chrootless mode with --dpkgopt.

Yepp, mmdebootstrap should give a hint that this is not working.

(But even if dpkg would honor the targets settings, the directory would still 
be needed
to be created and the file being copied…)

My 2 cents: As there are fudamental problems with chrootless, maybe this should 
be documented in
the manpage as "currently non-functional beside minimal custom variants". (the
man page suggests it is a working feature… )

If you agree, I'd clone this bug and retitle one "document chrootless not yet 
functional" and
one for the original reported problem about the 
/etc/dpkg/dpkg.cfg.d/99mmdebstrap.

Do you want to file a bug for dpkg?

-- 
Cheers,
tobi


> Thanks!
> 
> cheers, josch

Reply via email to