Package: multistrap
Version: 2.2.9
Severity: normal
Tags: patch

Dear Maintainer,

multistrap encounters the "Release file expired" error when using old Debian
snapshots.  This can be worked around by passing "-o Acquire::Check-Valid-
Until=false" to apt.  The attached patch adds this option when operating under
the "noauth" condition, permitting multistrap to work with such old
repositories.



-- System Information:
Debian Release: stretch/sid
  APT prefers xenial-updates
  APT policy: (500, 'xenial-updates'), (500, 'xenial-security'), (500, 
'xenial'), (100, 'xenial-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.4.0-78-generic (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)

Versions of packages multistrap depends on:
ii  apt                            1.2.20
ii  libconfig-auto-perl            0.44-1
ii  liblocale-gettext-perl         1.07-1build1
ii  libparse-debian-packages-perl  0.03-2
pn  perl:any                       <none>

multistrap recommends no packages.

Versions of packages multistrap suggests:
ii  fakeroot  1.20.2-1ubuntu1

-- no debconf information
>From 1555be1197ea0bee8545b779992baf062c9a99f1 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <ehoo...@sweptlaser.com>
Date: Mon, 17 Apr 2017 14:51:13 -0600
Subject: Allow expired Release files when 'noauth' is set.

This change allows multiarch to use old Debian snapshots when the
noauth option is enabled.
---
 multistrap | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/multistrap b/multistrap
index 4b4db50..ad1f94f 100755
--- a/multistrap
+++ b/multistrap
@@ -317,8 +317,10 @@ $config_str = '';
 $config_str .= " -o Apt::Architecture=" . shellescape($arch);
 $config_str .= " -o Dir::Etc::TrustedParts=" . shellescape("${dir}${etcdir}trusted.gpg.d");
 $config_str .= " -o Dir::Etc::Trusted=" . shellescape("${dir}${etcdir}trusted.gpg");
-$config_str .= " -o Apt::Get::AllowUnauthenticated=true"
-	if (defined $noauth);
+if (defined $noauth) {
+	$config_str .= " -o Apt::Get::AllowUnauthenticated=true";
+	$config_str .= " -o Acquire::Check-Valid-Until=false";
+}
 $config_str .= " -o Apt::Get::Download-Only=true";
 $config_str .= " -o Apt::Install-Recommends=false"
 	if (not defined $allow_recommends);
-- 
2.7.4

Reply via email to