diff --git a/common/xbps-src/libexec/build.sh b/common/xbps-src/libexec/build.sh index 6e89072a44..9908b33695 100755 --- a/common/xbps-src/libexec/build.sh +++ b/common/xbps-src/libexec/build.sh @@ -103,13 +103,16 @@ cut -d: -f 1,2 ${XBPS_STATEDIR}/.${sourcepkg}_register_pkg | sort -u | \ cut -d : -f 2,3 | tr ':' '/') if [ -n "${arch}" ]; then msg_normal "Registering new packages to $repo ($arch)\n" - XBPS_TARGET_ARCH=${arch} $XBPS_RINDEX_CMD ${XBPS_BUILD_FORCEMODE:+-f} -a ${paths} + XBPS_TARGET_ARCH=${arch} $XBPS_RINDEX_CMD \ + ${XBPS_REPO_COMPTYPE:+--compression $XBPS_REPO_COMPTYPE} ${XBPS_BUILD_FORCEMODE:+-f} -a ${paths} else msg_normal "Registering new packages to $repo\n" if [ -n "$XBPS_CROSS_BUILD" ]; then - $XBPS_RINDEX_XCMD ${XBPS_BUILD_FORCEMODE:+-f} -a ${paths} + $XBPS_RINDEX_XCMD ${XBPS_REPO_COMPTYPE:+--compression $XBPS_REPO_COMPTYPE} \ + ${XBPS_BUILD_FORCEMODE:+-f} -a ${paths} else - $XBPS_RINDEX_CMD ${XBPS_BUILD_FORCEMODE:+-f} -a ${paths} + $XBPS_RINDEX_CMD ${XBPS_REPO_COMPTYPE:+--compression $XBPS_REPO_COMPTYPE} \ + ${XBPS_BUILD_FORCEMODE:+-f} -a ${paths} fi fi done diff --git a/etc/defaults.conf b/etc/defaults.conf index a49b36594e..8e74759ad7 100644 --- a/etc/defaults.conf +++ b/etc/defaults.conf @@ -83,6 +83,12 @@ XBPS_SUCMD="sudo /bin/sh -c" # #XBPS_PKG_COMPTYPE=none +# [OPTIONAL] +# Set the repository compression format (defaults to gzip/zlib). See xbps-rindex(1) +# for the available formats. +# +#XBPS_REPO_COMPTYPE=zstd + # [OPTIONAL] # Enable or disable global package build options, these options apply # to all packages that support the matching options. diff --git a/xbps-src b/xbps-src index b7472013c3..23d6164b18 100755 --- a/xbps-src +++ b/xbps-src @@ -619,7 +619,7 @@ export XBPS_SHUTILSDIR XBPS_CROSSPFDIR XBPS_TRIGGERSDIR \ XBPS_KEEP_ALL XBPS_HOSTDIR XBPS_MASTERDIR XBPS_SRC_VERSION \ XBPS_DESTDIR XBPS_MACHINE XBPS_TEMP_MASTERDIR XBPS_BINPKG_EXISTS \ XBPS_LIBEXECDIR XBPS_DISTDIR XBPS_DISTFILES_MIRROR XBPS_ALLOW_RESTRICTED \ - XBPS_USE_GIT_COMMIT_DATE XBPS_PKG_COMPTYPE XBPS_BUILDHELPERDIR + XBPS_USE_GIT_COMMIT_DATE XBPS_PKG_COMPTYPE XBPS_REPO_COMPTYPE XBPS_BUILDHELPERDIR for i in REPOSITORY DESTDIR BUILDDIR SRCDISTDIR; do eval val="\$XBPS_$i"