]> xenbits.xensource.com Git - osstest.git/commitdiff
Disable updates for ssapshot.debian.org
authorIan Jackson <iwj@xenproject.org>
Wed, 10 Feb 2021 16:41:12 +0000 (16:41 +0000)
committerIan Jackson <iwj@xenproject.org>
Wed, 10 Feb 2021 17:26:31 +0000 (17:26 +0000)
security updates are a separate apt source.

The point of using snapshot is to avoid pulling in uncontrolled
updates, so we need to disable security updates.

The non-security SUITE-updates are disabled by this too.  But
everything is on fire and I don't want another iteration while I
figure out the proper syntax for disabling only the security updates.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
Osstest/Debian.pm

index d6e0b59db12e3540271f34918638cd0ef12f3c2f..ded7cdfca8db4b90493a8e04fb40a2f4ecbd8c88 100644 (file)
@@ -972,12 +972,19 @@ END
     preseed_hook_command($ho, 'late_command', $sfx,
                         debian_dhcp_rofs_fix($ho, '/target'));
 
+    my $disable_security_updates = 0;
+
     my $murl = debian_mirror_url($ho);
     if ($murl =~ m/$c{DebianMirrorAllowExpiredReleaseRegexp}/) {
        # Inspired by
        #  https://stackoverflow.com/questions/25039317/is-there-any-setting-in-the-preseed-file-to-ignore-the-release-valid-until-opt/51396935#51396935
        # In some sense a workaround for the lack of a better way,
        #  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=771699
+       $disable_security_updates = 1;
+       # ^ this disables normal -updates too.  That's not desirable
+       #   but I don't want to mess with this now.  Hopefully it can
+       #   be improved later.
+
        preseed_hook_installscript($ho, $sfx,
             '/usr/lib/apt-setup/generators/', '02IgnoreValidUntil', <<'END');
 #!/bin/sh
@@ -1075,12 +1082,14 @@ END
 d-i mirror/suite string $suite
 END
 
+    $disable_security_updates = 1 if $suite =~ m/jessie/;
+    # security.d.o CDN seems unreliable right now
+    # and jessie-updates is no more, so disable both for jessie
+
     $preseed .= <<'END'
 d-i apt-setup/services-select multiselect
 END
-       if $suite =~ m/jessie/;
-    # security.d.o CDN seems unreliable right now
-    # and jessie-updates is no more
+       if $disable_security_updates;
 
     if (grep { $r{$_} } runvar_glob('*_dmrestrict') and
        $suite =~ m/stretch/) {