From 5c106953dc625d5376679fc9f46655565a25baa3 Mon Sep 17 00:00:00 2001 From: Johannes Schauer Date: Sat, 3 Dec 2016 16:16:03 +0100 Subject: [PATCH] Do not try to feed GPG keybox database version 1 files to apt (closes: #845963) --- debian/changelog | 2 ++ multistrap | 14 ++------------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4b50840..8e72fb9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,8 @@ multistrap (2.2.2) UNRELEASED; urgency=medium * Switch debian/rules to dh and drop cdbs * Use dh_bash-completion to install bash completion script into the right location (fixes lintian warning about deprecated /etc/bash_completion.d/) + * Do not try to feed GPG keybox database version 1 files to apt (closes: + #845963) -- Johannes Schauer Fri, 02 Dec 2016 23:25:07 +0100 diff --git a/multistrap b/multistrap index f611839..4c51b15 100755 --- a/multistrap +++ b/multistrap @@ -24,6 +24,7 @@ use File::Basename; use Parse::Debian::Packages; use POSIX qw(locale_h); use Locale::gettext; +use File::Copy; use vars qw/ $progname $ourversion $dstrap $extra @aptsources $deb $cachedir $config_str %packages $retval $str $retries @@ -316,21 +317,10 @@ if ((defined $k) and (not defined $noauth)) { } foreach my $gpg (@files) { next if ($gpg =~ /removed/); - $retval = system ("gpg --no-default-keyring ". - "--homedir=${dir}/etc/apt/trusted.gpg.d/ ". - "--keyring=multistrap.gpg ". - " --import ${xdir}/usr/share/keyrings/${gpg} 2>/dev/null"); - $retval >>= 8; - die (_g("Secure Apt handling failed - try without authentication.")) - if ($retval != 0); + File::Copy::copy "${xdir}/usr/share/keyrings/${gpg}", "${dir}${etcdir}trusted.gpg.d/"; } system ("rm -rf ${xdir}"); } - if (-f "${dir}/etc/apt/trusted.gpg.d/multistrap.gpg") { - system_fatal ("cp ${dir}/etc/apt/trusted.gpg.d/multistrap.gpg ${dir}/etc/apt/trusted.gpg.d/trustdb.gpg"); - } else { - die (_g("Secure Apt handling failed - try without authentication.")."\n"); - } } $pre_config_str = '';