chiark / gitweb /
Merge branch 'deploy' into deploy.crybaby
authorMark Wooding <mdw@distorted.org.uk>
Tue, 4 Aug 2020 21:04:39 +0000 (22:04 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 4 Aug 2020 21:04:39 +0000 (22:04 +0100)
* deploy:
  Makefile: Include C++ headers in the cross-tools bundle.
  Makefile: Use buster's Qemu on stretch.
  Makefile, bin/chroot-maint: Allow source distribution selection for Qemu.
  bin/chroot-maint: Add missing format argument to diagnostic.

Makefile
bin/chroot-maint

index 3b431a286b10cb2942a0f73c4427df6019c17fb2..4b4a6161173e6855488628d358a8e914b46e7668 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -155,7 +155,8 @@ CROSS_PATHS         += \
                $(addprefix /usr/bin/$a-, \
                        cpp gcc g++ gcov gcov-dump gcov-tool gprof \
                        gcc-ar gcc-nm gcc-ranlib) \
-               /usr/lib/gcc-cross/$a/)
+               /usr/lib/gcc-cross/$a/ \
+               /usr/$a/include/c++)
 
 ## Local packages to be compiled and installed in chroots.  Archives can be
 ## found in `pkg/'.
@@ -178,6 +179,10 @@ arm64_QEMUHOST              = $(64BIT_QEMUHOST)
 i386_QEMUHOST           = $(32BIT_QEMUHOST)
 amd64_QEMUHOST          = $(64BIT_QEMUHOST)
 
+## Which distribution of Qemu to use.
+CONFIG_VARS            += $(foreach d,$(DISTS),$d_QEMUDIST)
+stretch_QEMUDIST        = buster
+
 ## Qemu architecture names.  These tell us which Qemu binary to use for a
 ## particular Debian architecture.
 CONFIG_VARS            += $(foreach a,$(FOREIGN_ARCHS),$a_QEMUARCH)
index 21e5c215bdc8e8f9f64682ee05127e8bda9c1cc3..34dec2e68e55715d03082dd15b59ad5c18bc7130 100755 (executable)
@@ -1431,6 +1431,7 @@ class Config (object):
     "*_DEPS": ("PKGDEPS", _conv_list),
     "*_QEMUHOST": ("QEMUHOST", _conv_str),
     "*_QEMUARCH": ("QEMUARCH", _conv_str),
+    "*_QEMUDIST": ("QEMUDIST", _conv_str),
     "*_ALIASES": ("DISTALIAS", _conv_str)
   }
 
@@ -1858,7 +1859,8 @@ class ChrootJob (BaseJob):
       me._tools_chroot = CrossToolsJob.ensure\
         ("%s-%s" % (me._dist, C.TOOLSARCH), FRESH)
       me._qemu_chroot = CrossToolsJob.ensure\
-        ("%s-%s" % (me._dist, C.QEMUHOST[me._arch]), FRESH)
+        ("%s-%s" % (C.QEMUDIST.get(me._dist, me._dist),
+                    C.QEMUHOST[me._arch]), FRESH)
       me.await(me._tools_chroot)
       me.await(me._qemu_chroot)
 
@@ -1895,9 +1897,10 @@ class ChrootJob (BaseJob):
       crossdir = OS.path.join(C.LOCAL, "cross",
                               "%s-%s" % (dist, C.TOOLSARCH))
 
-      qarch, qhost = C.QEMUARCH[arch], C.QEMUHOST[arch]
+      qarch, qhost, qdist = \
+        C.QEMUARCH[arch], C.QEMUHOST[arch], C.QEMUDIST.get(dist, dist)
       qemudir = OS.path.join(C.LOCAL, "cross",
-                             "%s-%s" % (dist, qhost), "QEMU")
+                             "%s-%s" % (qdist, qhost), "QEMU")
 
       ## Acquire lockfiles in a canonical order to prevent deadlocks.
       donors = [C.TOOLSARCH]
@@ -2051,8 +2054,9 @@ class ChrootJob (BaseJob):
         run_root(["mv", new, real])
       for path in have_link.iterkeys():
         if path in want_link: continue
-        progress("remove obsolete link `%s' -> `%s'" % path)
         real = root + path
+        progress("remove obsolete link `%s' -> `%s'" %
+                 (path, OS.readlink(real)))
         run_root(["rm", "-f", real])
 
       ## Remove diversions from paths which don't need them any more.  Here