]> xenbits.xensource.com Git - osstest.git/commitdiff
ts-debian-install: keep avoiding to use pygrub
authorAnthony PERARD <anthony.perard@citrix.com>
Wed, 18 Oct 2023 17:35:05 +0000 (18:35 +0100)
committerAnthony PERARD <anthony.perard@citrix.com>
Thu, 28 Mar 2024 16:51:52 +0000 (16:51 +0000)
xen-tools commit 83c37b476a75 ("Start all Debian releases since
Stretch (9) with pygrub by default") started to use pygrub by default.
Revert this.

With "pygrub" setting, xen-create-guest fails on armhf, the
80-install-kernel hook fails because it doesn't know about "armhf".

https://github.com/xen-tools/xen-tools/commit/83c37b476a7534c432ecc9941817aeb989677da6

There's "--nopygrub" but that doesn't work due to several issues, so
removing "pygrub" from "distributions.conf" is the only way.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
ts-debian-install

index c42e8a37a5659d2269e924092061eb4f9fa29b61..a737bec9509d482cf6226ff2518b9f6614909ea0 100755 (executable)
@@ -78,6 +78,21 @@ sub ginstall () {
             fi
 END
     }
+
+    if ($ho->{Suite} =~ m/bookworm/) {
+        # remove "pygrub" from /etc/xen-tools/distributions.conf
+        # The "--nopygrub" option doesn't work.
+        # https://github.com/xen-tools/xen-tools/issues/67
+        # https://github.com/xen-tools/xen-tools/issues/68
+        target_editfile_root($ho, "/etc/xen-tools/distributions.conf", sub {
+            while (<::EI>) {
+                unless (m/^#/) {
+                    s/ pygrub\b//;
+                }
+                print ::EO or die $!;
+            }
+        });
+    }
     my $cmd = '';
     my $useproxy = $c{DebianMirrorProxy} // $c{HttpProxy};
     $cmd .= <<END if defined $useproxy;