diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2021-11-22 09:09:24 +0100 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2021-11-22 09:16:17 +0100 |
commit | 701cc6b7eac0224f7bc26e4c300bbfbb51c19bdc (patch) | |
tree | 30f185cac5baf8e30821a7652c754b75f0047bfe | |
parent | eb8227f926b3cc6cfdfa7ebb9c9eda47804aef46 (diff) | |
download | freebsd-ports-701cc6b7eac0224f7bc26e4c300bbfbb51c19bdc.zip |
tindex: add new compression format for INDEX
Add zstd (faster to decompress) and xz (smaller) compression for INDEX
Results are the following:
39552 INDEX-14
2366 INDEX-14.bz2
1625 INDEX-14.xz
1672 INDEX-14.zst
-rwxr-xr-x | Tools/scripts/tindex | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Tools/scripts/tindex b/Tools/scripts/tindex index 8d6819fa6302..a14cda9e60e2 100755 --- a/Tools/scripts/tindex +++ b/Tools/scripts/tindex @@ -123,7 +123,10 @@ ${GIT} -C ${SRCDIR14} pull --rebase -q OSVERSION14=$(awk '/^#define[[:blank:]]__FreeBSD_version/ {print $3}' < ${SRCDIR14}/sys/sys/param.h) cd ${PORTSDIR} -rm -f INDEX-12 INDEX-12.bz2 INDEX-13 INDEX-13.bz2 INDEX-14 INDEX-14.bz2 +for ver in 12 13 14; do + rm -f INDEX-${ver} INDEX-${ver}.bz2 INDEX-${ver}.xz INDEX-${ver}.zst +done + OLD_HEAD=$(${GIT} rev-parse HEAD) if ! ${GIT} pull --ff-only > git.log 2>&1 ; then (echo "Git update failed with conflicts:"; @@ -148,7 +151,9 @@ for branch in 12.x 13.x 14.x; do checkfixed ${branch} bzip2 -kf ${PORTSDIR}/INDEX-${release} - mv ${PORTSDIR}/INDEX-${release} ${PORTSDIR}/INDEX-${release}.bz2 ${OUTDIR} + zstd -qf --ultra -22 -k ${PORTSDIR}/INDEX-${release} + xz -9e -kf ${PORTSDIR}/INDEX-${release} + mv ${PORTSDIR}/INDEX-${release} ${PORTSDIR}/INDEX-${release}.bz2 ${PORTSDIR}/INDEX-${release}.zst ${PORTSDIR}/INDEX-${release}.xz ${OUTDIR} done # All indexes built successfully, clear the hook |