[build] Explicitly build the Debian package using xz compression.

Newer versions dpkg-buildpackage default to zstd, which is not supported by older versions of dpkg.

Bug: https://github.com/dart-lang/sdk/issues/26953
Change-Id: I67fdb8ab5c3b560c1687a38cb83bcd8f022e9e84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/431321
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
diff --git a/tools/debian_package/create_debian_package.py b/tools/debian_package/create_debian_package.py
index 4c6cb9b..9ece689 100755
--- a/tools/debian_package/create_debian_package.py
+++ b/tools/debian_package/create_debian_package.py
@@ -59,7 +59,10 @@
     GenerateCopyright(join(versiondir, 'debian', 'copyright'))
     GenerateChangeLog(join(versiondir, 'debian', 'changelog'), version)
 
-    cmd = ['dpkg-buildpackage', '-B', '-a', options.arch, '-us', '-uc']
+    # Explicitly choose xz compression because newer versions dpkg-buildpackage
+    # (on our bots) default to zstd, which is not supported by older versions
+    # of dpkg (on users machines).
+    cmd = ['dpkg-buildpackage', '-B', '-a', options.arch, '-us', '-uc', '-Zxz']
     env = os.environ.copy()
     env["LIB_DIR"] = options.lib_dir
     process = subprocess.check_call(cmd, cwd=versiondir, env=env)