From 67cd850ebffee9887fc56f809230db8246e5545f Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 25 Jun 2019 10:52:37 +0200 Subject: [PATCH] xbps-src: introduce XBPS_REPO_COMPTYPE for etc/conf. This sets the repository data compression format, as explained in xbps-rindex(1). By default set to `gzip'. --- common/xbps-src/libexec/build.sh | 9 ++++++--- etc/defaults.conf | 6 ++++++ xbps-src | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/common/xbps-src/libexec/build.sh b/common/xbps-src/libexec/build.sh index 6e89072a442..9908b336957 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 a49b36594e6..8e74759ad7b 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 b7472013c37..23d6164b18a 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"