Skip to content

Commit 34c0426

Browse files
author
Lessley Dennington
committed
release: force xz compression for Debian package
The GCM Debian package currently fails to install on Debian with the following error: error: archive 'gcm-linux_amd64.2.0.886.deb' uses unknown compression for member 'control.tar.zst', giving up It appears that the version of dpkg that ships with Debian does not support zstd compression [1]. Enforcing xz compression resolves the issue. This also provides an opportunity to clean up some unused variables in pack.sh and ensure we check the architecture is found before attempting to use the ARCH variable. [1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=892664
1 parent 631bbed commit 34c0426

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

src/linux/Packaging.Linux/pack.sh

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ OUT="$ROOT/out"
1212
PROJ_OUT="$OUT/linux/Packaging.Linux"
1313
INSTALLER_SRC="$SRC/osx/Installer.Mac"
1414

15-
# Product information
16-
IDENTIFIER="com.microsoft.gitcredentialmanager"
17-
INSTALL_LOCATION="/usr/local/share/gcm-core"
18-
1915
# Parse script arguments
2016
for i in "$@"
2117
do
@@ -51,6 +47,10 @@ fi
5147

5248
ARCH="`dpkg-architecture -q DEB_HOST_ARCH`"
5349

50+
if test -z "$ARCH"; then
51+
die "Could not determine host architecture!"
52+
fi
53+
5454
TAROUT="$PROJ_OUT/$CONFIGURATION/tar/"
5555
TARBALL="$TAROUT/gcm-linux_$ARCH.$VERSION.tar.gz"
5656
SYMTARBALL="$TAROUT/gcm-linux_$ARCH.$VERSION-symbols.tar.gz"
@@ -60,10 +60,6 @@ DEBROOT="$DEBOUT/root"
6060
DEBPKG="$DEBOUT/gcm-linux_$ARCH.$VERSION.deb"
6161
mkdir -p "$DEBROOT"
6262

63-
if test -z "$ARCH"; then
64-
die "Could not determine host architecture!"
65-
fi
66-
6763
# Set full read, write, execute permissions for owner and just read and execute permissions for group and other
6864
echo "Setting file permissions..."
6965
/bin/chmod -R 755 "$PAYLOAD" || exit 1
@@ -114,8 +110,6 @@ Description: Cross Platform Git Credential Manager command line utility.
114110
For more information see https://aka.ms/gcm
115111
EOF
116112

117-
mkdir -p "$INSTALL_TO" "$LINK_TO"
118-
119113
# Copy all binaries and shared libraries to target installation location
120114
cp -R "$PAYLOAD"/* "$INSTALL_TO" || exit 1
121115

@@ -131,6 +125,6 @@ if [ ! -f "$LINK_TO/git-credential-manager-core" ]; then
131125
"$LINK_TO/git-credential-manager-core" || exit 1
132126
fi
133127

134-
dpkg-deb --build "$DEBROOT" "$DEBPKG" || exit 1
128+
dpkg-deb -Zxz --build "$DEBROOT" "$DEBPKG" || exit 1
135129

136130
echo $MESSAGE

0 commit comments

Comments
 (0)