summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Zhang <kweizh@gmail.com>2023-12-21 14:20:26 +0800
committerGitHub <noreply@github.com>2023-12-21 14:20:26 +0800
commitd2538a698e9e8d3727b1c5b1766342ab57e47cdc (patch)
tree0ea3b98392b7199e4a61dfdf2a1b3e9a1ada907f
parentdee06211ab9469bacd6055f3bf71cab325ff488b (diff)
:railway_track: :sparkles: ci: package deb without zst (#970)
Signed-off-by: Wei Zhang <kweizh@gmail.com>
-rw-r--r--.github/workflows/CICD.yml14
-rw-r--r--README.md7
2 files changed, 20 insertions, 1 deletions
diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml
index 4f9c693..4a14352 100644
--- a/.github/workflows/CICD.yml
+++ b/.github/workflows/CICD.yml
@@ -256,6 +256,18 @@ jobs:
## cat "${DPKG_DIR}/DEBIAN/control"
# build dpkg
fakeroot dpkg-deb --build "${DPKG_DIR}" "${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.DPKG_NAME }}"
+ # build a deb not using zst
+ # check https://github.com/lsd-rs/lsd/issues/891
+ ar x "${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.DPKG_NAME }}"
+ # Uncompress zstd files an re-compress them using xz
+ zstd -d < control.tar.zst | xz > control.tar.xz
+ zstd -d < data.tar.zst | xz > data.tar.xz
+ # Re-create the Debian package in /tmp/
+ xz_deb="$(echo ${{ steps.vars.outputs.DPKG_NAME }} | sed 's/.deb/_xz.deb/g')"
+ ar -m -c -a sdsd ${xz_deb} debian-binary control.tar.xz data.tar.xz
+ mv ${xz_deb} ${{ steps.vars.outputs.STAGING }}/
+ # Clean up
+ rm debian-binary control.tar.xz data.tar.xz control.tar.zst data.tar.zst
fi
- name: Publish
uses: softprops/action-gh-release@v1
@@ -263,7 +275,7 @@ jobs:
with:
files: |
${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_NAME }}
- ${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.DPKG_NAME }}
+ ${{ steps.vars.outputs.STAGING }}/*.deb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/README.md b/README.md
index 75bc0ee..fc9bdd3 100644
--- a/README.md
+++ b/README.md
@@ -430,6 +430,13 @@ alias lt='ls --tree'
## F.A.Q
+### Uses unknown compression for member 'control.tar.zst' when using deb
+
+Zst compression is supported starting from `Debian 12` and `Ubuntu 21.10`,
+Please use the `_xz.deb` released starting from `lsd v1.1.0`.
+
+Please check https://github.com/lsd-rs/lsd/issues/891 for details or manual fixes.
+
### Custom Color Schemes for Windows
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.