Am Mon, Feb 22, 2021 at 02:48:27PM +0100 schrieb Johannes Schauer Marin 
Rodrigues:
> Hi,
> 
> let me first reply to this, then to your initial bug.
> 
> (...)
> 
> Yes, debconf is one of the big blockers for chrootless working well for a
> larger set of packages. Also see this:
> 
> https://wiki.debian.org/Teams/Dpkg/Spec/InstallBootstrap
> 
> If you find time adding DPKG_ROOT support to debconf, that would be great!
> 
> Currently, only a limited number of packages installs successfully in
> chrootless mode. Namely, this works:
> 
> mmdebstrap --mode=chrootless --variant=custom \
>       
> --include=bsdutils,coreutils,debianutils,diffutils,dpkg,findutils,grep,gzip,hostname,init-system-helpers,ncurses-base,ncurses-bin,perl-base,sed,tar
>  \
>       unstable /dev/null
> 
> The above uses --variant=custom because the essential set doesn't work with
> DPKG_ROOT yet.
> 
> Thanks!
> 
> cheers, josch

Thanks josch for the explanations!

I'll also split my answer in two parts.

Though I have no idea what needed to be fixed in debconf or what is the actual
cause of it: Reading dpkgs log (and even stracing into it), it does not seem
that it had touched debconf beside reading its control file?

How does a "normal" fix for DPKG_ROOT looks like? Is it the maintainer script
needs fixing when they use an absolute path (like debconf does; but as said
earlier, I dont get a "error in (pre|post)inst)" but a failure after it has
loaded the control file)? Is it all the programs needs to honor DPKG_ROOT (IOW
would massive patching of sources be required, even outside of the Essential
set? Or could dpkg "divert" syscalls to open and friends, eg by a LD_PRELOAD
call so that the host programs will end up in the "chrootless"?

(But maybe let me expand on my use case: I'm not really needing the "no chroot"
feature, but the "use hosts apt/dpkg" would be useful.
I'm trying to provide a PoC for an embedded IoT-like device, trying
to show that Debian could be an alternative for the devices I'm helping
developing. The device is quite memory constrained and there are
concerns about having dpkg/apt on the device, so I was shooting at the feature
to use the hosts dpkg/apt only.  (B-plan would be to remove apt and dpkg in the
cleanup step, but my experiments started with chrootless)

-- 
Cheers,
tobi

Reply via email to