pbuilder/em_multistrap : Add new script to extend debootstrap to cope with multiple repositories using apt to reconcile dependencies. May migrate into a different package in time, does not support machine:variant.
git-svn-id: http://emdebian.org/svn/current@5688 563faec7-e20c-0410-992a-a66f704d0ccd
This commit is contained in:
parent
bd8a302444
commit
adcf3a18a3
1 changed files with 32 additions and 4 deletions
|
@ -40,6 +40,9 @@ while( @ARGV ) {
|
||||||
elsif (/^(-f|--file)$/) {
|
elsif (/^(-f|--file)$/) {
|
||||||
$file = shift(@ARGV);
|
$file = shift(@ARGV);
|
||||||
}
|
}
|
||||||
|
elsif (/^(-a|--arch)$/) {
|
||||||
|
$arch = shift(@ARGV);
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
die "$progname: Unknown option $_.\n";
|
die "$progname: Unknown option $_.\n";
|
||||||
}
|
}
|
||||||
|
@ -63,7 +66,7 @@ foreach $section (sort keys %keys)
|
||||||
{
|
{
|
||||||
if ($section eq "general")
|
if ($section eq "general")
|
||||||
{
|
{
|
||||||
$arch = $keys{$section}{'arch'};
|
$arch = $keys{$section}{'arch'} if (not defined $arch);
|
||||||
$retries = $keys{$section}{'retries'};
|
$retries = $keys{$section}{'retries'};
|
||||||
$dir = $keys{$section}{'directory'};
|
$dir = $keys{$section}{'directory'};
|
||||||
$forceunpack = lc($keys{$section}{'forceunpack'});
|
$forceunpack = lc($keys{$section}{'forceunpack'});
|
||||||
|
@ -234,11 +237,15 @@ sub usageversion {
|
||||||
$progname version $ourversion
|
$progname version $ourversion
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
$progname -f CONFIG_FILE
|
$progname [-a ARCH] [-d DIR] -f CONFIG_FILE
|
||||||
$progname -?|-h|--help|--version
|
$progname -?|-h|--help|--version
|
||||||
|
|
||||||
Options:
|
Command:
|
||||||
-f|--file CONFIG_FILE: path the the multistrap configuration file.
|
-f|--file CONFIG_FILE: path the the multistrap configuration file.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-a|--arch ARCHITECTURE: override the configuration file architecture.
|
||||||
|
-d|--dir PATH: override the configuration file directory.
|
||||||
-?|-h|--help: print this usage message and exit
|
-?|-h|--help: print this usage message and exit
|
||||||
--version: print this usage message and exit
|
--version: print this usage message and exit
|
||||||
|
|
||||||
|
@ -248,6 +255,17 @@ debootstrap options, architecture, extra packages and the mirror to use
|
||||||
for each repository.
|
for each repository.
|
||||||
|
|
||||||
Example configuration:
|
Example configuration:
|
||||||
|
[General]
|
||||||
|
arch=arm
|
||||||
|
directory=/opt/multistrap/
|
||||||
|
retries=5
|
||||||
|
# extract all downloaded archives as well as those
|
||||||
|
# unpacked by debootstrap.
|
||||||
|
forceunpack=false
|
||||||
|
# the order of sections is important.
|
||||||
|
# debootstraps are unpacked in this sequence.
|
||||||
|
debootstrap=Debian
|
||||||
|
|
||||||
[Debian]
|
[Debian]
|
||||||
packages=
|
packages=
|
||||||
source=http://ftp.uk.debian.org/debian
|
source=http://ftp.uk.debian.org/debian
|
||||||
|
@ -256,7 +274,9 @@ script=
|
||||||
options=
|
options=
|
||||||
|
|
||||||
This will result in a completely normal debootstrap of Debian lenny from
|
This will result in a completely normal debootstrap of Debian lenny from
|
||||||
the specified mirror.
|
the specified mirror, for ARM in /opt/multistrap/.
|
||||||
|
|
||||||
|
'Architecture' and 'directory' can be overridden on the command line.
|
||||||
|
|
||||||
Specify a package to extend the debootstap to include that package and
|
Specify a package to extend the debootstap to include that package and
|
||||||
all dependencies.
|
all dependencies.
|
||||||
|
@ -292,6 +312,10 @@ END
|
||||||
|
|
||||||
=pod
|
=pod
|
||||||
|
|
||||||
|
=head1 Name
|
||||||
|
|
||||||
|
em_multistrap - extends debootstrap for multiple repository support
|
||||||
|
|
||||||
=head1 Description
|
=head1 Description
|
||||||
|
|
||||||
em_multistrap extends debootstrap to provide support for multiple
|
em_multistrap extends debootstrap to provide support for multiple
|
||||||
|
@ -355,4 +379,8 @@ As with debootstrap, em_multistrap will continue after errors although
|
||||||
you may want to purge $directory/var/cache/apt/archives from time to
|
you may want to purge $directory/var/cache/apt/archives from time to
|
||||||
time.
|
time.
|
||||||
|
|
||||||
|
em_multistrap does not currently implement machine:variant support
|
||||||
|
but the build directory is not packed up at the end of the run so
|
||||||
|
other scripts can be used to implement customisations.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
Loading…
Reference in a new issue