Skip to content

Commit d2538a6

Browse files
authored
🛤️ ✨ ci: package deb without zst (#970)
Signed-off-by: Wei Zhang <[email protected]>
1 parent dee0621 commit d2538a6

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

.github/workflows/CICD.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,14 +256,26 @@ jobs:
256256
## cat "${DPKG_DIR}/DEBIAN/control"
257257
# build dpkg
258258
fakeroot dpkg-deb --build "${DPKG_DIR}" "${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.DPKG_NAME }}"
259+
# build a deb not using zst
260+
# check https://github.com/lsd-rs/lsd/issues/891
261+
ar x "${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.DPKG_NAME }}"
262+
# Uncompress zstd files an re-compress them using xz
263+
zstd -d < control.tar.zst | xz > control.tar.xz
264+
zstd -d < data.tar.zst | xz > data.tar.xz
265+
# Re-create the Debian package in /tmp/
266+
xz_deb="$(echo ${{ steps.vars.outputs.DPKG_NAME }} | sed 's/.deb/_xz.deb/g')"
267+
ar -m -c -a sdsd ${xz_deb} debian-binary control.tar.xz data.tar.xz
268+
mv ${xz_deb} ${{ steps.vars.outputs.STAGING }}/
269+
# Clean up
270+
rm debian-binary control.tar.xz data.tar.xz control.tar.zst data.tar.zst
259271
fi
260272
- name: Publish
261273
uses: softprops/action-gh-release@v1
262274
if: steps.vars.outputs.DEPLOY
263275
with:
264276
files: |
265277
${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_NAME }}
266-
${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.DPKG_NAME }}
278+
${{ steps.vars.outputs.STAGING }}/*.deb
267279
env:
268280
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
269281

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,13 @@ alias lt='ls --tree'
430430

431431
## F.A.Q
432432

433+
### Uses unknown compression for member 'control.tar.zst' when using deb
434+
435+
Zst compression is supported starting from `Debian 12` and `Ubuntu 21.10`,
436+
Please use the `_xz.deb` released starting from `lsd v1.1.0`.
437+
438+
Please check https://github.com/lsd-rs/lsd/issues/891 for details or manual fixes.
439+
433440
### Custom Color Schemes for Windows
434441
For `lsd` currently, it reads a system environment variable called LS_COLORS. Please look at the marked solution in [this post](https://github.com/orgs/lsd-rs/discussions/958#discussioncomment-7659375), which contains a guide on how to set a color scheme.
435442

0 commit comments

Comments
 (0)