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

debootstrap and debian-ports

Sorry for the typo in the previous post : the reference should read

Here is a tentative implementation of a script for debootstrap as an 
illustration of the previous post
Comments, improvements and corrections are welcome.

How to use it

(the attached file "debian-ports.gz" is ungzipped in the current working 

debootstrap [OPTION...] unstable TARGET MIRROR ./debian-ports

debootstrap unstable my_chroot http://ftp.de.debian.org/debian-ports ./debian-ports

or with some more confidence :

cp debian-ports /usr/share/debootstrap/scripts/

and then

debootstrap [OPTION ..] debian-ports TARGET [MIRROR]

should work, e.g.

debootstrap debian-ports my_chroot 

Note that checking gpg signatures of retrieved Release files requires
the key of the debian-ports archive (2FF7A9F4 at the present time, 
Either install package debian-ports-archive-keyring, 
or add the key to /etc/apt/trusted.gpg (cat archive_2013.key | apt-key add), 
or use debootstrap option --no-check-gpg to disable gpg signature checking

MIRROR must be a mirror of the debian-ports archive, not of the regular
Debian archive.

How it works

debootstrap sources a script under /usr/share/debootstrap/scripts to
accommodate the peculiarities of the target suite.

The attached script "debian-ports" is a slight modification of the one for
unstable :
- function download_indices is modified to download from unreleased as well.
- Packages files from unstable and unreleased are concatenated and sorted
by ascending version number.
- the default mirror is changed to ftp.debian-ports.org and the default
keyring to debian-ports-archive-keyring.
- debian-ports-archive-keyring (Prority : extra) is selected for
installation in the target. 
- unreleased is added to etc/apt/sources.list in the target.

A python function (copied and pasted from package python-debian) is inlined
to sort the Packages file. Perhaps a perl implementation should be 
preferred, as perl-base is essential - but I am sorry I am not fluent in 
A minimal C implementation (unoptimized !) is provided in case no python
interpreter is available (say, in an installer). See "sort_pkgs" attached : 
the code is mostly copied and pasted from the sources of base-installer and 
Or the path of an alternative sort program may be given in the environment 

J.-H. Chatenet

PS : please CC me, I am not on the list.

Attachment: debian-ports.gz
Description: Binary data

Attachment: sort_pkgs.tar.gz
Description: Binary data

Reply to: