* Drop all use of forceyes - no longer necessary. * Handle missing 'include' files cleanly and early. (Closes: #595006)
git-svn-id: http://emdebian.org/svn/current@7521 563faec7-e20c-0410-992a-a66f704d0ccd
This commit is contained in:
parent
c22ce6e129
commit
01706647dc
4 changed files with 34 additions and 16 deletions
4
debian/changelog
vendored
4
debian/changelog
vendored
|
@ -16,8 +16,10 @@ multistrap (2.1.8) experimental; urgency=low
|
||||||
|
|
||||||
[ Neil Williams ]
|
[ Neil Williams ]
|
||||||
* Improve check-deps to find missing packages
|
* Improve check-deps to find missing packages
|
||||||
|
* Drop all use of forceyes - no longer necessary.
|
||||||
|
* Handle missing 'include' files cleanly and early. (Closes: #595006)
|
||||||
|
|
||||||
-- Neil Williams <codehelp@debian.org> Sun, 03 Oct 2010 16:17:16 +0100
|
-- Neil Williams <codehelp@debian.org> Sun, 03 Oct 2010 19:08:43 +0100
|
||||||
|
|
||||||
multistrap (2.1.7) unstable; urgency=low
|
multistrap (2.1.7) unstable; urgency=low
|
||||||
|
|
||||||
|
|
1
debian/rules
vendored
1
debian/rules
vendored
|
@ -4,4 +4,3 @@ include /usr/share/cdbs/1/rules/debhelper.mk
|
||||||
|
|
||||||
DEB_MAKE_INSTALL_TARGET=install
|
DEB_MAKE_INSTALL_TARGET=install
|
||||||
DEB_COMPRESS_EXCLUDE_ALL := device_table.txt
|
DEB_COMPRESS_EXCLUDE_ALL := device_table.txt
|
||||||
|
|
||||||
|
|
28
multistrap
28
multistrap
|
@ -147,7 +147,10 @@ unless (keys %sources and @aptsources) {
|
||||||
|
|
||||||
# Translators: fields are: programname, architecture, host architecture.
|
# Translators: fields are: programname, architecture, host architecture.
|
||||||
printf (_g("%s building %s multistrap on '%s'\n"), $progname, $arch, $host);
|
printf (_g("%s building %s multistrap on '%s'\n"), $progname, $arch, $host);
|
||||||
|
if ($dir =~ /^$/) {
|
||||||
|
my $msg = _g("No directory specified!");
|
||||||
|
die "$progname: $msg\n";
|
||||||
|
}
|
||||||
if (not -d "$dir") {
|
if (not -d "$dir") {
|
||||||
my $ret = system ("mkdir -p $dir");
|
my $ret = system ("mkdir -p $dir");
|
||||||
$ret /= 256 if (defined $ret);
|
$ret /= 256 if (defined $ret);
|
||||||
|
@ -267,11 +270,16 @@ foreach my $pkg (values %keyrings) {
|
||||||
}
|
}
|
||||||
if ((defined $k) and (not defined $noauth)) {
|
if ((defined $k) and (not defined $noauth)) {
|
||||||
printf (_g("I: Installing %s\n"), $k);
|
printf (_g("I: Installing %s\n"), $k);
|
||||||
|
# the keyring package must be available to the external apt
|
||||||
system ("apt-get -y -d --reinstall install $k");
|
system ("apt-get -y -d --reinstall install $k");
|
||||||
foreach my $keyring_pkg (values %keyrings) {
|
foreach my $keyring_pkg (values %keyrings) {
|
||||||
my @files=();
|
my @files=();
|
||||||
my $file = `find /var/cache/apt/archives/ -name "$keyring_pkg*"`;
|
my $file = `find /var/cache/apt/archives/ -name "$keyring_pkg*"`;
|
||||||
chomp ($file);
|
chomp ($file);
|
||||||
|
if ($file eq "") {
|
||||||
|
my $msg = sprintf (_g("Unable to download keyring package: '%s'"),$dir);
|
||||||
|
die "$progname: $msg\n";
|
||||||
|
}
|
||||||
my $xdir = `mktemp -d -t keyring.XXXXXX`;
|
my $xdir = `mktemp -d -t keyring.XXXXXX`;
|
||||||
chomp ($xdir);
|
chomp ($xdir);
|
||||||
system ("dpkg -X $file $xdir >/dev/null");
|
system ("dpkg -X $file $xdir >/dev/null");
|
||||||
|
@ -348,9 +356,7 @@ foreach my $a (@s) {
|
||||||
}
|
}
|
||||||
$str = join (' ', sort keys %uniq);
|
$str = join (' ', sort keys %uniq);
|
||||||
@dsclist = sort keys %uniq;
|
@dsclist = sort keys %uniq;
|
||||||
my $forceyes="";
|
print "apt-get -y $config_str install $str\n";
|
||||||
$forceyes="--force-yes" if (defined $noauth);
|
|
||||||
print "apt-get $forceyes -y $config_str install $str\n";
|
|
||||||
$retval = system ("apt-get -y $config_str install $str");
|
$retval = system ("apt-get -y $config_str install $str");
|
||||||
die (sprintf (_g("apt download failed. Exit value: %d\n"),($retval/256)))
|
die (sprintf (_g("apt download failed. Exit value: %d\n"),($retval/256)))
|
||||||
if ($retval != 0);
|
if ($retval != 0);
|
||||||
|
@ -684,7 +690,7 @@ sub native {
|
||||||
}
|
}
|
||||||
# reinstall set
|
# reinstall set
|
||||||
foreach my $reinst (sort @reinstall) {
|
foreach my $reinst (sort @reinstall) {
|
||||||
system ("$str $env chroot $dir apt-get --reinstall -y $forceyes install $reinst");
|
system ("$str $env chroot $dir apt-get --reinstall -y install $reinst");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -865,6 +871,18 @@ sub cascade {
|
||||||
my @a = split (' ', lc($keys{$section}{'aptsources'}));
|
my @a = split (' ', lc($keys{$section}{'aptsources'}));
|
||||||
push @aptsources, @a;
|
push @aptsources, @a;
|
||||||
my @i = split (' ', lc($keys{$section}{'include'}));
|
my @i = split (' ', lc($keys{$section}{'include'}));
|
||||||
|
foreach my $inc (@i) {
|
||||||
|
# look for the full filepath or try same directory as current conf.
|
||||||
|
if (not -f $inc) {
|
||||||
|
$chk = `realpath $cfgdir/$inc 2>/dev/null`;
|
||||||
|
chomp ($chk) if (defined $chk);
|
||||||
|
$inc = $chk if (-f $chk);
|
||||||
|
}
|
||||||
|
if (not -f $inc) {
|
||||||
|
my $dirmsg = sprintf (_g("ERR: Cannot find include file: '%s' for '%s'"), $inc, $file);
|
||||||
|
die ("$dirmsg\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
push @includes, @i;
|
push @includes, @i;
|
||||||
} else {
|
} else {
|
||||||
$sources{$section}=$keys{$section}{'source'} if (not exists $source{$section});
|
$sources{$section}=$keys{$section}{'source'} if (not exists $source{$section});
|
||||||
|
|
|
@ -203,10 +203,13 @@ The codename (etch, lenny, squeeze, sid) does not change.
|
||||||
|
|
||||||
=head1 Secure Apt
|
=head1 Secure Apt
|
||||||
|
|
||||||
To use authenticated apt repositories, multistrap either needs to be
|
To use authenticated apt repositories, multistrap needs to be able to
|
||||||
able to install an appropriate keyring package from the existing apt
|
install an appropriate keyring package from the existing apt
|
||||||
sources B<outside the multistrap environment> or have the relevant keys
|
sources B<outside the multistrap environment> into the destination
|
||||||
already configured using apt-key B<on the host system>.
|
system. Unfortunately, keyring packages cannot be downloaded from
|
||||||
|
the repositories specified in the multistrap configuration - this is
|
||||||
|
because C<apt> needs the keyring to be updated before being able to
|
||||||
|
use repositories not previously known.
|
||||||
|
|
||||||
If relevant packages exist, specify them in the 'keyring' option for
|
If relevant packages exist, specify them in the 'keyring' option for
|
||||||
each repository. multistrap will then check that apt has already
|
each repository. multistrap will then check that apt has already
|
||||||
|
@ -218,15 +221,11 @@ authenticated or apt will fail. Similarly, secure apt can only be
|
||||||
disabled for all repositories (by using the --no-auth command line
|
disabled for all repositories (by using the --no-auth command line
|
||||||
option or setting the general noauth option in the configuration
|
option or setting the general noauth option in the configuration
|
||||||
file), even if only one repository does not have a suitable keyring
|
file), even if only one repository does not have a suitable keyring
|
||||||
available. Not all packages need keyring packages, if you configure
|
available.
|
||||||
apt-key appropriately.
|
|
||||||
|
|
||||||
The keyring package(s) will also be installed inside the multistrap
|
The keyring package(s) will also be installed inside the multistrap
|
||||||
environment to match the installed apt sources for the multistrap.
|
environment to match the installed apt sources for the multistrap.
|
||||||
|
|
||||||
All configuration of apt-key needs to be done for the machine
|
|
||||||
running multistrap itself.
|
|
||||||
|
|
||||||
=head1 State
|
=head1 State
|
||||||
|
|
||||||
multistrap is stateless - if the directory exists, it will simply
|
multistrap is stateless - if the directory exists, it will simply
|
||||||
|
|
Loading…
Reference in a new issue