Skip to content

Commit 8b27245

Browse files
committed
Switch to zstd for source tarball
1 parent a94827a commit 8b27245

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

SOURCES/generate_tarball.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,21 @@ if [ "$GIT_VERSION" != "$SPEC_VERSION" ]; then
4646
exit 1
4747
fi
4848

49-
TARBALL="$SOURCE_DIR/linux-$TARFILE_RELEASE.tar.xz"
50-
XZ_THREADS="--threads 4"
49+
TARBALL="$SOURCE_DIR/linux-$TARFILE_RELEASE.tar.zst"
50+
ZSTD_THREADS="--threads=4"
5151
ARCH=$(arch)
52-
XZ_OPTIONS=""
52+
ZSTD_OPTIONS="-19"
5353

5454
if [ "$ARCH" != "x86_64" ]
5555
then
56-
XZ_OPTIONS="-M 3G"
56+
ZSTD_OPTIONS="-19 --long"
5757
fi
5858

5959
# convert from shortened git sha to standard 40 digit git sha
6060
_GITID="$(git rev-parse HEAD)"
6161

6262
if [ -f "$TARBALL" ]; then
63-
TARID=$(xzcat -qq "$TARBALL" | git get-tar-commit-id 2>/dev/null)
63+
TARID=$(zstdcat -qq "$TARBALL" | git get-tar-commit-id 2>/dev/null)
6464
if [ "$_GITID" = "$TARID" ]; then
6565
echo "$(basename "$TARBALL") unchanged..."
6666
exit 0
@@ -70,6 +70,6 @@ fi
7070

7171
echo "Creating $(basename "$TARBALL")..."
7272
trap 'rm -vf "$TARBALL"' INT
73-
git archive --prefix="linux-$TARFILE_RELEASE"/ --format=tar "$_GITID" | xz $XZ_OPTIONS $XZ_THREADS > "$TARBALL";
73+
git archive --prefix="linux-$TARFILE_RELEASE"/ --format=tar "$_GITID" | zstd $ZSTD_OPTIONS $ZSTD_THREADS > "$TARBALL";
7474

7575
echo "Tarball created: $TARBALL"

SPECS/kernel.spec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -817,8 +817,8 @@ BuildRequires: redhat-sb-certs >= 9.4-0.1
817817
# tarball is generated from a src-git tree. If you want to see the
818818
# exact git commit you can run
819819
#
820-
# xzcat -qq ${TARBALL} | git get-tar-commit-id
821-
Source0: linux-%{tarfile_release}.tar.xz
820+
# zstdcat -qq ${TARBALL} | git get-tar-commit-id
821+
Source0: linux-%{tarfile_release}.tar.zst
822822

823823
Source1: Makefile.rhelver
824824
Source2: kernel.changelog

0 commit comments

Comments
 (0)