[Pkg-uml-pkgs] Bug#372937: rootstrap: add support for non-debian .deb archives

Andreas Beckmann debian at abeckmann.de
Mon Jun 12 14:11:38 UTC 2006


Package: rootstrap
Version: 0.3.22-1
Severity: wishlist
Tags: patch

Hi Mattia,

although it's possible to add e.g. a local package archive with the
[debian]sources= settings, this can't be used to install local packages
because apt doesn't trust this archive.

So rootstrap needs to configure apt in the target to trust the other
archives I want to use, too. This needs to be done before installing
additional packages from the [debian]install= list.

My local solution was the following:
- my gpg key is available in a package on the local mirror and the
  postinst script installs this key with apt-key add
- patched modules/debian:
  * install packages listed in [debian]keyrings= with --force-yes to
    override the missing trust
  * run apt-get update (to trust packages from the local archive)
  * install the packages from [debian]install= which now may contain
    local packages, too
The patch for rootstrap.conf, modules/debian is attached, but probably
needs more eyes and thoughts before it's applied.


Andreas

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable'), (300, 'unstable'), (30, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-1-vserver-k7
Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages rootstrap depends on:
ii  debootstrap                 0.3.3        Bootstrap a basic Debian system
ii  dpkg                        1.13.19      package maintenance system for Deb
ii  python                      2.3.5-5      An interactive high-level object-o
ii  user-mode-linux             2.6.16-2um-1 User-mode Linux (kernel)

Versions of packages rootstrap recommends:
ii  uml-utilities                 20060323-3 User-mode Linux (utility programs)

-- no debconf information
-------------- next part --------------
diff -ur modules/debian modules.org3/debian
--- modules/debian	2006-06-12 16:06:58.000000000 +0200
+++ modules.org3/debian	2006-06-12 04:42:40.000000000 +0200
@@ -62,17 +62,11 @@
   install -m 644 /etc/hosts $TARGET/etc/hosts
 fi
 
-if test -n "$install" || test -n "$keyrings"; then
+if test -n "$install"; then
     divert $TARGET/sbin/start-stop-daemon
     chroot $TARGET mount -t proc proc /proc
     chroot $TARGET apt-get update
-    if test -n "$keyrings"; then
-        chroot $TARGET apt-get -y --force-yes install $keyrings
-        chroot $TARGET apt-get update
-    fi
-    if test -n "$install"; then
-        chroot $TARGET apt-get -y install $install
-    fi
+    chroot $TARGET apt-get -y install $install
     echo "Killing any processes running on the target fs:"
     # kill any processes using the target fs
     fuser -k -v -m $TARGET || true
Only in modules: debian.~1~
--- rootstrap.conf.org3	2006-06-12 04:38:22.000000000 +0200
+++ rootstrap.conf	2006-06-12 15:28:09.000000000 +0200
@@ -110,6 +110,12 @@
 #include=myfavoritepackage someotherpackage
 
 # Extra packages to install via apt after initial debootstrap install
+# These packages will be installed with --force-yes and may be used to
+# install keyrings of local package archives to be trusted by apt, so
+# the install= list below may contain local packages, too
+#keyrings=my-keyring-package
+
+# Extra packages to install via apt after initial debootstrap install
 #install=myfavoritepackage someotherpackage
 
 # Sources for target's sources list. If no value is given the default


More information about the Pkg-uml-pkgs mailing list