Emdebian Baked repository[ Pre-configured non-upgradable systems ] [ How would Baked work? ] [ Using Grip for Baked ]
Using Debian/Grip as a base
apt-grip has been extended in emdebian-grip version 2.2.6 to support processing packages of a different architecture to the main system and with the existing VENDOR support, apt-grip can provide packages for Baked.
The difficult part of this process is managing updated packages and changed dependencies, so this example will concentrate on Debian stable.
emdebian-grip has not been backported to Lenny, so your development machine must be running Debian Squeeze or Sid (testing or unstable) to develop a Baked root filesystem based on Lenny.
Example apt-grip command for Baked
$ sudo apt-grip -a mipsel -V emdebian-baked -S stable dash snmpd
Baked packages will then exist in /var/lib/apt-grip/output/, including all dependencies of the specified packages. These can then be included into an existing reprepro repository:
$ reprepro includedeb stable /var/lib/apt-grip/output/*.deb
Note that, if your repository is to be publicly accessible, the sources will need to be downloaded and included as well - without changes - from Debian.
If your repository is to support more than one architecture, ensure that you remove or ignore the Architecture: all packages which have already been processed by apt-grip:
$ sudo rm /var/lib/apt-grip/output*_all.deb
Then use the -A option to reprepro to only include the added architecture:
$ reprepro -A armel includedeb stable /var/lib/apt-grip/output/*_armel.deb
Creating a repository
To create a suitable repository, use a distributions file something like:
$ cat conf/distributions Origin: Debian Label: EmdebianBaked Suite: stable Codename: lenny Version: 1.1 Architectures: armel mipsel source Components: main Description: Emdebian Baked - stable Update: getsources
The update option is used to allow the repository to get the relevant source packages. This is done via a filter which needs to contain a list of the packages to be updated - otherwise you'll end up with tens of gigabytes of source packages for all of Debian main.
$ reprepro list stable|sed -e 's/.*: \(.*\) .*$/\1\t\tinstall/'|sort -u> conf/pkglist
Actually, that needs more work - it omits source packages where the binary package name does not match the source package name. To make the repository legal, you'll need to include the missing sources.
The updates file itself specifies which mirror to use (there is little point using Emdebian Grip at this stage as the source packages are identical to Debian and Debian has a much more capable mirror system). You do need to have the debian-archive-keyring package installed on the machine running reprepro.
$ cat conf/updates Name: getsources Method: http://ftp.uk.debian.org/debian Suite: stable Architectures: source Components: main FilterList: deinstall pkglist VerifyRelease: 9AA38DCD55BE302B
To run the update, use the checkupdate option of reprepro to verify things are going to work properly, then run the update itself using reprepro update.
Baking the host architecture
CAUTION : Remember to use the --build-only option when preparing Baked packages for your host architecture. Take care that these packages are NOT installed on your development machine! (apt-grip needs to be run as root or under sudo and uses the --force-yes command, so apt will go ahead and install packages, if it is allowed, including downgrading critical packages and even removing critical packages.) Also use the --ignore-status option so that packages already installed on your development system are still downloaded and processed for Baked.
Architectures: amd64, armel, i386, mips, mipsel & powerpc
78 binary packages. 61 source packages (unchanged from Debian).
[Baked] packages= source=http://www.emdebian.org/baked/ suite=lenny keyring=
(No keyring this time, a baked system does not get updated and so does not need to know how to verify updates.)
List of packages passed to apt-grip (2.2.6):
dash snmpd dropbear openssl dhttpd lighttpd apache2
Using Crush as a base
Arguably the most useful base for Baked would be Crush but there are still problems with the Crush experimental builds.
It should be possible to still use Crush to prepare busybox-crush which could be useful alongside the omitrequired support in multistrap.
Back to the Emdebian Project homepage.