From 930d29d64adb90707ad8854739a4628b02765bc5 Mon Sep 17 00:00:00 2001 From: zadam Date: Mon, 1 Nov 2021 09:11:04 +0100 Subject: [PATCH] add hack to produce debian compatible XZ compressed deb packages, fixes #2272 --- bin/build-debian.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/bin/build-debian.sh b/bin/build-debian.sh index bf71aa77b..f60b99d19 100755 --- a/bin/build-debian.sh +++ b/bin/build-debian.sh @@ -4,4 +4,19 @@ echo "Packaging debian x64 distribution..." VERSION=`jq -r ".version" package.json` -./node_modules/.bin/electron-installer-debian --config bin/deb-options.json --options.version=${VERSION} --arch amd64 \ No newline at end of file +./node_modules/.bin/electron-installer-debian --config bin/deb-options.json --options.version=${VERSION} --arch amd64 + + +# hacky stop-gag measure to produce debian compatible XZ compressed debs until this is fixed: https://github.com/electron-userland/electron-installer-debian/issues/272 +cd dist +ar x trilium_${VERSION}_amd64.deb +rm trilium_${VERSION}_amd64.deb +# recompress +< control.tar.zst zstd -d | xz > control.tar.xz +< data.tar.zst zstd -d | xz > data.tar.xz +# create deb archive (I really do not know, what argument "sdsd" is for but something is required for ar to create the archive as desired) +ar -m -c -a sdsd trilium_${VERSION}_amd64.deb debian-binary control.tar.xz data.tar.xz + +rm control* data* debian-binary + +echo "Converted to XZ deb"