[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: creating relocatable packages with dpkg

No Spam wrote:
I'm not sure that that's what's happening, but it makes sense.  You
can easily install a filesystem with "debootstrap - Bootstrap a basic
Debian system".

That seems like such overkill.

I'm trying to do something similar; I'm putting together an embedded system, and want to populate it from Debian packages. I need to create a minimal chrooted Debian system in a subdirectory and then copy it to my target.

debootstrap is, indeed, overkill. It insists on not only creating a local admin database but also on downloading all the packages it needs *into* that admin database, which takes forever. It also insists on installing all sorts of stuff that I'm never going to want to use --- my embedded system doesn't *need* exim, for example.

What I eventually did is the incredibly simple and naive:

for package in debs/*; do
        echo "Unpacking $package..."
        dpkg --extract "debs/$package" target
rm -rf target/usr/share/doc target/usr/share/man target/var/lib/dpkg

This just extracts the files. It doesn't attempt to do any setup or maintain any admin database, and I have to do download the debs and do all the dependencies manually, but it does work (and it's fast).

[insert interesting .sig here]

Reply to: