From: voidlinux-github@inbox.vuxu.org
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] xbps-src: base-chroot-v2 (reduce artifacts/deps)
Date: Sun, 05 Jan 2020 08:21:23 +0100 [thread overview]
Message-ID: <20200105072123.w_Dn3LsMGDQ6R3Vtpzr4_nChDWtUbCmvIIsNj9T8BAU@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-17969@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 1946 bytes --]
There is an updated pull request by xtraeme against master on the void-packages repository
https://github.com/xtraeme/void-packages base-chroot-v2
https://github.com/void-linux/void-packages/pull/17969
xbps-src: base-chroot-v2 (reduce artifacts/deps)
This patchset contains multiple changes to xbps-src and
its required package "base-chroot" for building packages
via chroot.
- update `base-chroot` deps before building any pkg.
- moved xbps.d(5) conf files to `etc/xbps.d`.
- renamed xbps.d(5) repository files to `etc/xbps.d/repos-{local,remote}*`.
- do not set `--repository` to any xbps command that supports it,
xbps-src now simply populates `rootdir/etc/xbps.d` with correct
settings (taking care of CHROOT_READY/IN_CHROOT).
- Unless `-C` is set (to preserve builddir/destdir/autodeps), when
entering to the chroot (if CHROOT_READY is set), xbps-src will
clean up the masterdir and then perform a system update to always
use a constant set of packages for that exact date.
- Improved some normal/error msgs.
- Gets rid of `-I` to skip file conflicts while installing deps via `xbps-install(1)`.
- Includes support for `xbps>=0.58`.
- common/hooks: switch to bsdtar.
- base-chroot:
- base-chroot-musl is gone, now unified for glibc/musl.
- deps removed: gettext, mpfr, readline, texinfo, which, xz.
- deps changed: tar -> bsdtar.
- chroot-texinfo: removed; texinfo is enough.
Effectively this reduces dependencies in `base-chroot`, makes
it unified for musl and glibc, switches xbps-src to use `bsdtar`
rather than GNU `tar` and `xz`, gets rid of useless host dependencies
like GNU gettext, texinfo, etc.
I've been testing these changes for 1 month or so already,
I was able to build from scratch `base-system` for both native
and multiple targets, i.e `./xbps-src -a target -Nt pkg base-system`
A patch file from https://github.com/void-linux/void-packages/pull/17969.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-base-chroot-v2-17969.patch --]
[-- Type: text/x-diff, Size: 74504 bytes --]
From 88b70eebdb444b7056a6d3dc7398e2c0562c037d Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Wed, 1 Jan 2020 11:15:35 +0100
Subject: [PATCH 01/24] xbps-src: base-chroot-v2 (reduce artifacts/deps)
This patchset contains multiple changes to xbps-src and
its required package "base-chroot" for building packages
via chroot.
- moved xbps.d(5) conf files to `etc/xbps.d`.
- renamed xbps.d(5) repository files to `etc/xbps.d/repos-{local,remote}*`.
- do not set `--repository` to any xbps command that supports it,
xbps-src now simply populates `rootdir/etc/xbps.d` with correct
settings (taking care of CHROOT_READY/IN_CHROOT).
- Unless `-C` is set (to preserve builddir/destdir/autodeps), when
entering to the chroot (if CHROOT_READY is set), xbps-src will
clean up the masterdir and then perform a system update to always
use a constant set of packages for that exact date.
- Improved some normal/error msgs.
- Includes support for `xbps>=0.58`.
- common/hooks: switch to bsdtar.
- base-chroot:
- base-chroot-musl is gone, now unified for glibc/musl.
- deps removed: gettext, mpfr, readline, texinfo, which, xz.
- deps changed: tar -> bsdtar.
Effectively this reduces dependencies in `base-chroot`, makes
it unified for musl and glibc, switches xbps-src to use `bsdtar`
rather than GNU `tar` and `xz`, gets rid of useless host dependencies
like GNU gettext, texinfo, etc.
I've been testing these changes for 1 month or so already,
I was able to build from scratch `base-system` for both native
and multiple targets, i.e `./xbps-src -a target -Nt pkg base-system`
---
.gitignore | 2 +-
| 10 +-
common/hooks/do-fetch/00-distfiles.sh | 4 +-
common/xbps-src/libexec/build.sh | 16 --
common/xbps-src/libexec/xbps-src-dopatch.sh | 4 -
common/xbps-src/shutils/build_dependencies.sh | 33 +--
common/xbps-src/shutils/bulk.sh | 2 +-
common/xbps-src/shutils/chroot.sh | 254 ++++++++++++------
common/xbps-src/shutils/common.sh | 79 +++---
common/xbps-src/shutils/cross.sh | 29 +-
etc/defaults.conf | 17 +-
etc/repos-remote.conf | 13 -
etc/xbps.conf | 1 -
etc/{ => xbps.d}/repos-local-x86_64.conf | 3 +-
etc/{ => xbps.d}/repos-local.conf | 1 +
etc/xbps.d/repos-remote-aarch64.conf | 4 +
etc/xbps.d/repos-remote-musl.conf | 4 +
etc/{ => xbps.d}/repos-remote-x86_64.conf | 2 +-
etc/xbps.d/repos-remote.conf | 4 +
srcpkgs/base-chroot-musl/template | 21 --
srcpkgs/base-chroot/template | 24 +-
srcpkgs/chroot-texinfo/template | 39 ---
srcpkgs/gettext/template | 3 +-
srcpkgs/tar/template | 1 -
srcpkgs/texinfo/template | 4 +-
xbps-src | 107 ++------
26 files changed, 325 insertions(+), 356 deletions(-)
delete mode 100644 etc/repos-remote.conf
delete mode 100644 etc/xbps.conf
rename etc/{ => xbps.d}/repos-local-x86_64.conf (57%)
rename etc/{ => xbps.d}/repos-local.conf (82%)
create mode 100644 etc/xbps.d/repos-remote-aarch64.conf
create mode 100644 etc/xbps.d/repos-remote-musl.conf
rename etc/{ => xbps.d}/repos-remote-x86_64.conf (74%)
create mode 100644 etc/xbps.d/repos-remote.conf
delete mode 100644 srcpkgs/base-chroot-musl/template
delete mode 100644 srcpkgs/chroot-texinfo/template
diff --git a/.gitignore b/.gitignore
index 591b3507593..8721a8b702f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,4 +7,4 @@ masterdir*
hostdir*
etc/conf
etc/virtual
-.xbps-checkvers.plist
+.xbps-checkvers*.plist
--git a/common/hooks/do-extract/00-distfiles.sh b/common/hooks/do-extract/00-distfiles.sh
index c1eacf47009..303fe27e0a1 100644
--- a/common/hooks/do-extract/00-distfiles.sh
+++ b/common/hooks/do-extract/00-distfiles.sh
@@ -70,8 +70,8 @@ hook() {
fi
case ${cursufx} in
- txz|tbz|tlz|tgz|crate)
- tar -x --no-same-permissions --no-same-owner -f $srcdir/$curfile -C $extractdir
+ tar|txz|tbz|tlz|tgz|crate)
+ bsdtar -x --no-same-permissions --no-same-owner -f $srcdir/$curfile -C $extractdir
if [ $? -ne 0 ]; then
msg_error "$pkgver: extracting $curfile into $XBPS_BUILDDIR.\n"
fi
@@ -84,12 +84,6 @@ hook() {
cd $extractdir && bunzip2 -f $curfile
fi
;;
- tar)
- tar -x --no-same-permissions --no-same-owner -f $srcdir/$curfile -C $extractdir
- if [ $? -ne 0 ]; then
- msg_error "$pkgver: extracting $curfile into $XBPS_BUILDDIR.\n"
- fi
- ;;
zip)
if command -v unzip &>/dev/null; then
unzip -o -q $srcdir/$curfile -d $extractdir
diff --git a/common/hooks/do-fetch/00-distfiles.sh b/common/hooks/do-fetch/00-distfiles.sh
index e2220789c59..73239da1c73 100644
--- a/common/hooks/do-fetch/00-distfiles.sh
+++ b/common/hooks/do-fetch/00-distfiles.sh
@@ -50,7 +50,7 @@ contents_cksum() {
case ${cursufx} in
tar|txz|tbz|tlz|tgz|crate)
- cksum=$($XBPS_DIGEST_CMD <(tar xf "$curfile" --to-stdout))
+ cksum=$($XBPS_DIGEST_CMD <(bsdtar xf "$curfile" --list))
if [ $? -ne 0 ]; then
msg_error "$pkgver: extracting $curfile to pipe.\n"
fi
@@ -95,7 +95,7 @@ contents_cksum() {
fi
;;
gem)
- cksum=$($XBPS_DIGEST_CMD <(tar -xf "$curfile" data.tar.gz --to-stdout | tar -xzO ))
+ cksum=$($XBPS_DIGEST_CMD <(bsdtar -xf "$curfile" data.tar.gz --list | bsdtar -xzO ))
;;
*)
msg_error "$pkgver: cannot guess $curfile extract suffix. ($cursufx)\n"
diff --git a/common/xbps-src/libexec/build.sh b/common/xbps-src/libexec/build.sh
index 024bb11d18b..cba71fbacad 100755
--- a/common/xbps-src/libexec/build.sh
+++ b/common/xbps-src/libexec/build.sh
@@ -129,20 +129,4 @@ if [ -n "$XBPS_DEPENDENCY" -o -z "$XBPS_KEEP_ALL" ]; then
remove_pkg_statedir
fi
-# If base-chroot not installed, install "base-files" into masterdir
-# from local repository; this is the only pkg required to be able to build
-# the bootstrap pkgs from scratch.
-if [ -z "$CHROOT_READY" -a "$PKGNAME" = "base-files" ]; then
- msg_normal "Installing $PKGNAME into masterdir...\n"
- _log=$(mktemp) || exit 1
- XBPS_ARCH=$XBPS_MACHINE $XBPS_INSTALL_CMD -yf $PKGNAME >${_log} 2>&1
- if [ $? -ne 0 ]; then
- msg_red "Failed to install $PKGNAME into masterdir, see below for errors:\n"
- cat ${_log}
- rm -f ${_log}
- msg_error "Cannot continue!\n"
- fi
- rm -f ${_log}
-fi
-
exit 0
diff --git a/common/xbps-src/libexec/xbps-src-dopatch.sh b/common/xbps-src/libexec/xbps-src-dopatch.sh
index a83acd88a84..c1b3b0468d4 100755
--- a/common/xbps-src/libexec/xbps-src-dopatch.sh
+++ b/common/xbps-src/libexec/xbps-src-dopatch.sh
@@ -20,10 +20,6 @@ done
setup_pkg "$PKGNAME" $XBPS_CROSS_BUILD
-for f in $XBPS_COMMONDIR/environment/patch/*.sh; do
- source_file "$f"
-done
-
XBPS_PATCH_DONE="${XBPS_STATEDIR}/${sourcepkg}_${XBPS_CROSS_BUILD}_patch_done"
if [ -f $XBPS_PATCH_DONE ]; then
diff --git a/common/xbps-src/shutils/build_dependencies.sh b/common/xbps-src/shutils/build_dependencies.sh
index 1c25da38dc6..5751a6cf584 100644
--- a/common/xbps-src/shutils/build_dependencies.sh
+++ b/common/xbps-src/shutils/build_dependencies.sh
@@ -43,10 +43,9 @@ setup_pkg_depends() {
#
# Install required package dependencies, like:
#
-# xbps-install -AIy <pkgs>
+# xbps-install -Ay <pkgs>
#
# -A automatic mode
-# -I to ignore file conflicts
# -y yes
#
# Returns 0 if package already installed or installed successfully.
@@ -56,10 +55,12 @@ setup_pkg_depends() {
# ENOENT (2): package missing in repositories.
# ENXIO (6): package depends on invalid dependencies.
# EAGAIN (11): package conflicts.
+# EBUSY (16): package 'xbps' needs to be updated.
# EEXIST (17): file conflicts in transaction (XBPS_FLAG_IGNORE_FILE_CONFLICTS unset)
# ENODEV (19): package depends on missing dependencies.
# ENOTSUP (95): no repositories registered.
-#
+# -1 (255): unexpected error.
+
install_pkg_from_repos() {
local cross="$1" rval tmplogf cmd
shift
@@ -71,7 +72,7 @@ install_pkg_from_repos() {
cmd=$XBPS_INSTALL_CMD
[[ $cross ]] && cmd=$XBPS_INSTALL_XCMD
- $cmd -AIy "$@" >$tmplogf 2>&1
+ $cmd -Ay "$@" >$tmplogf 2>&1
rval=$?
case "$rval" in
@@ -137,9 +138,9 @@ install_pkg_deps() {
done
if [ "$pkg" != "$targetpkg" ]; then
- msg_normal "$pkgver: building${style} (dependency of $targetpkg) ...\n"
+ msg_normal "$pkgver: building${style} (dependency of $targetpkg) for $XBPS_TARGET_MACHINE...\n"
else
- msg_normal "$pkgver: building${style} ...\n"
+ msg_normal "$pkgver: building${style} for $XBPS_TARGET_MACHINE...\n"
fi
#
@@ -189,7 +190,7 @@ install_pkg_deps() {
echo " [host] ${_vpkg}: not found"
host_missing_deps+=("$_vpkg")
fi
- done < <($XBPS_CHECKVERS_CMD ${XBPS_SKIP_REMOTEREPOS:+-i} -D $XBPS_DISTDIR -sm $templates)
+ done < <($XBPS_CHECKVERS_CMD -D $XBPS_DISTDIR -sm $templates)
fi
#
@@ -239,7 +240,7 @@ install_pkg_deps() {
echo " [check] ${_vpkg}: not found"
host_missing_deps+=("$_vpkg")
fi
- done < <($XBPS_CHECKVERS_CMD ${XBPS_SKIP_REMOTEREPOS:+-i} -D $XBPS_DISTDIR -sm ${templates})
+ done < <($XBPS_CHECKVERS_CMD -D $XBPS_DISTDIR -sm ${templates})
fi
#
@@ -253,7 +254,7 @@ install_pkg_deps() {
templates+=" $f"
continue
fi
- local _repourl=$($XBPS_QUERY_CMD -R -prepository "$f" 2>/dev/null)
+ local _repourl=$($XBPS_QUERY_XCMD -R -prepository "$f" 2>/dev/null)
if [ "$_repourl" ]; then
echo " [target] ${f}: found (${_repourl})"
binpkg_deps+=("$f")
@@ -289,7 +290,7 @@ install_pkg_deps() {
echo " [target] ${_vpkg}: not found"
missing_deps+=("$_vpkg")
fi
- done < <($XBPS_CHECKVERS_XCMD ${XBPS_SKIP_REMOTEREPOS:+-i} -D $XBPS_DISTDIR -sm $templates)
+ done < <($XBPS_CHECKVERS_XCMD -D $XBPS_DISTDIR -sm $templates)
fi
#
@@ -303,7 +304,7 @@ install_pkg_deps() {
templates+=" $f"
continue
fi
- local _repourl=$($XBPS_QUERY_CMD -R -prepository "$f" 2>/dev/null)
+ local _repourl=$($XBPS_QUERY_XCMD -R -prepository "$f" 2>/dev/null)
if [ "$_repourl" ]; then
echo " [target] ${f}: found (${_repourl})"
continue
@@ -337,7 +338,7 @@ install_pkg_deps() {
echo " [runtime] ${_vpkg}: not found"
missing_rdeps+=("$_vpkg")
fi
- done < <($XBPS_CHECKVERS_XCMD ${XBPS_SKIP_REMOTEREPOS:+-i} -D $XBPS_DISTDIR -sm $templates)
+ done < <($XBPS_CHECKVERS_XCMD -D $XBPS_DISTDIR -sm $templates)
fi
if [ -n "$XBPS_BUILD_ONLY_ONE_PKG" ]; then
@@ -359,8 +360,8 @@ install_pkg_deps() {
curpkgdepname=$($XBPS_UHELPER_CMD getpkgname "$i" 2>/dev/null)
setup_pkg $curpkgdepname
exec env XBPS_DEPENDENCY=1 XBPS_BINPKG_EXISTS=1 \
- $XBPS_LIBEXECDIR/build.sh $sourcepkg $pkg $target || exit $?
- ) || exit $?
+ $XBPS_LIBEXECDIR/build.sh $sourcepkg $pkg $target $cross_prepare || exit $?
+ ) || msg_error "xbps-src: failed to build host dependency '$i' ($?)\n"
host_binpkg_deps+=("$i")
done
@@ -373,7 +374,7 @@ install_pkg_deps() {
setup_pkg $curpkgdepname $cross
exec env XBPS_DEPENDENCY=1 XBPS_BINPKG_EXISTS=1 \
$XBPS_LIBEXECDIR/build.sh $sourcepkg $pkg $target $cross $cross_prepare || exit $?
- ) || exit $?
+ ) || msg_error "xbps-src: failed to build target dependency '$i' ($?)\n"
binpkg_deps+=("$i")
done
@@ -391,7 +392,7 @@ install_pkg_deps() {
setup_pkg $curpkgdepname $cross
exec env XBPS_DEPENDENCY=1 XBPS_BINPKG_EXISTS=1 \
$XBPS_LIBEXECDIR/build.sh $sourcepkg $pkg $target $cross $cross_prepare || exit $?
- ) || exit $?
+ ) || msg_error "xbps-src: failed to build target dependency '$i' ($?)\n"
done
if [[ ${host_binpkg_deps} ]]; then
diff --git a/common/xbps-src/shutils/bulk.sh b/common/xbps-src/shutils/bulk.sh
index f19b12f6006..2b8afb36b55 100644
--- a/common/xbps-src/shutils/bulk.sh
+++ b/common/xbps-src/shutils/bulk.sh
@@ -115,6 +115,6 @@ bulk_update() {
if [ -n "$pkgs" -a -n "$args" ]; then
echo
msg_normal "xbps-src: updating your system, confirm to proceed...\n"
- ${XBPS_SUCMD} "xbps-install --repository=$XBPS_REPOSITORY --repository=$XBPS_REPOSITORY/nonfree -u ${pkgs}" || return 1
+ ${XBPS_SUCMD} "$XBPS_INSTALL_CMD $XBPS_INSTALL_ARGS -u ${pkgs}" || return 1
fi
}
diff --git a/common/xbps-src/shutils/chroot.sh b/common/xbps-src/shutils/chroot.sh
index 8eac338a733..fcb0c4a04cc 100644
--- a/common/xbps-src/shutils/chroot.sh
+++ b/common/xbps-src/shutils/chroot.sh
@@ -1,5 +1,62 @@
# vim: set ts=4 sw=4 et:
+install_base_chroot() {
+ [ "$CHROOT_READY" ] && return
+ chroot_sync_repodata
+ if [ "$1" = "bootstrap" ]; then
+ unset XBPS_TARGET_PKG XBPS_INSTALL_ARGS
+ else
+ XBPS_TARGET_PKG="$1"
+ fi
+ [ "$XBPS_SKIP_REMOTEREPOS" ] && unset XBPS_INSTALL_ARGS
+ # binary bootstrap
+ msg_normal "xbps-src: installing base-chroot...\n"
+ # XBPS_TARGET_PKG == arch
+ if [ "$XBPS_TARGET_PKG" ]; then
+ _bootstrap_arch="env XBPS_TARGET_ARCH=$XBPS_TARGET_PKG"
+ fi
+ ${_bootstrap_arch} $XBPS_INSTALL_CMD ${XBPS_INSTALL_ARGS} -y base-chroot
+ if [ $? -ne 0 ]; then
+ msg_error "xbps-src: failed to install base-chroot!\n"
+ fi
+ # Reconfigure base-files to create dirs/symlinks.
+ if xbps-query -r $XBPS_MASTERDIR base-files &>/dev/null; then
+ XBPS_ARCH=$XBPS_TARGET_PKG xbps-reconfigure -r $XBPS_MASTERDIR -f base-files &>/dev/null
+ fi
+
+ msg_normal "xbps-src: installed base-chroot successfully!\n"
+ chroot_prepare $XBPS_TARGET_PKG || msg_error "xbps-src: failed to initialize chroot!\n"
+ chroot_check
+ chroot_handler clean
+}
+
+reconfigure_base_chroot() {
+ local statefile="$XBPS_MASTERDIR/.xbps_chroot_configured"
+ local pkgs="glibc-locales ca-certificates"
+ [ -z "$IN_CHROOT" -o -e $statefile ] && return 0
+ # Reconfigure ca-certificates.
+ msg_normal "xbps-src: reconfiguring base-chroot...\n"
+ for f in ${pkgs}; do
+ if xbps-query -r $XBPS_MASTERDIR $f &>/dev/null; then
+ xbps-reconfigure -r $XBPS_MASTERDIR -f $f
+ fi
+ done
+ touch -f $statefile
+}
+
+update_base_chroot() {
+ [ -z "$CHROOT_READY" ] && return
+ [ -z "$XBPS_KEEP_ALL" -a -z "$XBPS_SKIP_DEPS" ] && remove_pkg_autodeps
+ msg_normal "xbps-src: cleaning up $XBPS_MASTERDIR masterdir...\n"
+ [ -z "$XBPS_KEEP_ALL" ] && rm -rf $XBPS_MASTERDIR/builddir $XBPS_MASTERDIR/destdir
+ msg_normal "xbps-src: updating software in $XBPS_MASTERDIR masterdir...\n"
+ # no need to sync repodata, chroot_sync_repodata() does it for us.
+ if $(${XBPS_INSTALL_CMD} ${XBPS_INSTALL_ARGS} -nu|grep xbps); then
+ ${XBPS_INSTALL_CMD} ${XBPS_INSTALL_ARGS} -yu xbps || msg_error "xbps-src: failed to update xbps!\n"
+ fi
+ ${XBPS_INSTALL_CMD} ${XBPS_INSTALL_ARGS} -yu || msg_error "xbps-src: failed to update base-chroot!\n"
+}
+
# FIXME: $XBPS_FFLAGS is not set when chroot_init() is run
# It is set in common/build-profiles/bootstrap.sh but lost somewhere?
chroot_init() {
@@ -36,26 +93,7 @@ exec env -i -- SHELL=/bin/sh PATH="\$PATH" DISTCC_HOSTS="\$XBPS_DISTCC_HOSTS" DI
_EOF
chmod 755 $XBPS_MASTERDIR/bin/xbps-shell
-
cp -f /etc/resolv.conf $XBPS_MASTERDIR/etc
-
- # Update xbps alternative repository if set.
- mkdir -p $XBPS_MASTERDIR/etc/xbps.d
- if [ -n "$XBPS_ALT_REPOSITORY" ]; then
- ( \
- echo "repository=/host/binpkgs/${XBPS_ALT_REPOSITORY}"; \
- echo "repository=/host/binpkgs/${XBPS_ALT_REPOSITORY}/nonfree"; \
- echo "repository=/host/binpkgs/${XBPS_ALT_REPOSITORY}/debug"; \
- ) > $XBPS_MASTERDIR/etc/xbps.d/00-repository-alternative.conf
- if [ "$XBPS_MACHINE" = "x86_64" ]; then
- ( \
- echo "repository=/host/binpkgs/${XBPS_ALT_REPOSITORY}/multilib"; \
- echo "repository=/host/binpkgs/${XBPS_ALT_REPOSITORY}/multilib/nonfree"; \
- ) >> $XBPS_MASTERDIR/etc/xbps.d/00-repository-alternative.conf
- fi
- else
- rm -f $XBPS_MASTERDIR/etc/xbps.d/00-repository-alternative.conf
- fi
}
chroot_prepare() {
@@ -90,8 +128,6 @@ chroot_prepare() {
mkdir -p $XBPS_MASTERDIR/etc/xbps.d
echo "syslog=false" >> $XBPS_MASTERDIR/etc/xbps.d/xbps.conf
- echo "cachedir=/host/repocache" >> $XBPS_MASTERDIR/etc/xbps.d/xbps.conf
- ln -sf /dev/null $XBPS_MASTERDIR/etc/xbps.d/00-repository-main.conf
# Prepare default locale: en_US.UTF-8.
if [ -s ${XBPS_MASTERDIR}/etc/default/libc-locales ]; then
@@ -104,62 +140,11 @@ chroot_prepare() {
return 0
}
-chroot_sync_repos() {
- local f=
-
- # Copy xbps configuration files to the masterdir.
- install -Dm644 ${XBPS_DISTDIR}/etc/xbps.conf \
- ${XBPS_MASTERDIR}/etc/xbps.d/00-xbps-src.conf
- install -Dm644 ${XBPS_DISTDIR}/etc/repos-local.conf \
- ${XBPS_MASTERDIR}/etc/xbps.d/10-repository-local.conf
- install -Dm644 ${XBPS_DISTDIR}/etc/repos-remote.conf \
- ${XBPS_MASTERDIR}/etc/xbps.d/20-repository-remote.conf
-
- if [ "$XBPS_MACHINE" = "x86_64" ]; then
- install -Dm644 ${XBPS_DISTDIR}/etc/repos-local-x86_64.conf \
- ${XBPS_MASTERDIR}/etc/xbps.d/12-repository-local-x86_64.conf
- install -Dm644 ${XBPS_DISTDIR}/etc/repos-remote-x86_64.conf \
- ${XBPS_MASTERDIR}/etc/xbps.d/22-repository-remote-x86_64.conf
- fi
-
- # if -N is set, get rid of remote repos from x86_64 (glibc).
- if [ -n "$XBPS_SKIP_REMOTEREPOS" ]; then
- rm -f ${XBPS_MASTERDIR}/etc/xbps.d/20-repository-remote.conf
- rm -f ${XBPS_MASTERDIR}/etc/xbps.d/22-repository-remote-x86_64.conf
- fi
-
- # Copy host repos to the cross root.
- if [ -n "$XBPS_CROSS_BUILD" ]; then
- rm -rf $XBPS_MASTERDIR/$XBPS_CROSS_BASE/etc/xbps.d
- mkdir -p $XBPS_MASTERDIR/$XBPS_CROSS_BASE/etc/xbps.d
- cp ${XBPS_MASTERDIR}/etc/xbps.d/*.conf \
- $XBPS_MASTERDIR/$XBPS_CROSS_BASE/etc/xbps.d
- rm -f $XBPS_MASTERDIR/$XBPS_CROSS_BASE/etc/xbps.d/*-x86_64.conf
- fi
-
- if [ -z "$XBPS_SKIP_REMOTEREPOS" ]; then
- # Make sure to sync index for remote repositories.
- xbps-install -r $XBPS_MASTERDIR -S
- fi
-
- if [ -n "$XBPS_CROSS_BUILD" ]; then
- # Copy host keys to the target rootdir.
- mkdir -p $XBPS_MASTERDIR/$XBPS_CROSS_BASE/var/db/xbps/keys
- cp $XBPS_MASTERDIR/var/db/xbps/keys/*.plist \
- $XBPS_MASTERDIR/$XBPS_CROSS_BASE/var/db/xbps/keys
- # Make sure to sync index for remote repositories.
- if [ -z "$XBPS_SKIP_REMOTEREPOS" ]; then
- env -- XBPS_TARGET_ARCH=$XBPS_TARGET_MACHINE \
- xbps-install -r $XBPS_MASTERDIR/$XBPS_CROSS_BASE -S
- fi
- fi
-
- return 0
-}
-
chroot_handler() {
local action="$1" pkg="$2" rv=0 arg= _envargs=
+ [ -z "$action" -a -z "$pkg" ] && return 1
+
if [ -n "$IN_CHROOT" -o -z "$CHROOT_READY" ]; then
return 0
fi
@@ -167,13 +152,10 @@ chroot_handler() {
mkdir -p $XBPS_MASTERDIR/void-packages
fi
- [ -z "$action" -a -z "$pkg" ] && return 1
-
case "$action" in
fetch|extract|patch|configure|build|check|install|pkg|bootstrap-update|chroot)
chroot_prepare || return $?
chroot_init || return $?
- chroot_sync_repos || return $?
;;
esac
@@ -200,3 +182,121 @@ chroot_handler() {
return $rv
}
+
+chroot_sync_repodata() {
+ local f= hostdir= confdir= crossconfdir=
+
+ # always start with an empty xbps.d
+ confdir=$XBPS_MASTERDIR/etc/xbps.d
+ crossconfdir=$XBPS_MASTERDIR/$XBPS_CROSS_BASE/etc/xbps.d
+
+ [ -d $confdir ] && rm -rf $confdir
+
+ if [ "$CHROOT_READY" ]; then
+ hostdir=/host
+ else
+ hostdir=$XBPS_HOSTDIR
+ fi
+
+ # Update xbps alternative repository if set.
+ mkdir -p $confdir
+ if [ -n "$XBPS_ALT_REPOSITORY" ]; then
+ ( \
+ echo "repository=$hostdir/binpkgs/${XBPS_ALT_REPOSITORY}"; \
+ echo "repository=$hostdir/binpkgs/${XBPS_ALT_REPOSITORY}/nonfree"; \
+ echo "repository=$hostdir/binpkgs/${XBPS_ALT_REPOSITORY}/debug"; \
+ ) > $confdir/00-repository-alt-local.conf
+ if [ "$XBPS_MACHINE" = "x86_64" ]; then
+ ( \
+ echo "repository=$hostdir/binpkgs/${XBPS_ALT_REPOSITORY}/multilib"; \
+ echo "repository=$hostdir/binpkgs/${XBPS_ALT_REPOSITORY}/multilib/nonfree"; \
+ ) >> $confdir/00-repository-alt-local.conf
+ fi
+ else
+ rm -f $confdir/00-repository-alt-local.conf
+ fi
+
+ # Disable 00-repository-main.conf from share/xbps.d (part of xbps)
+ ln -s /dev/null $confdir/00-repository-main.conf
+
+ # Generate xbps.d(5) configuration files for repositories
+ sed -e "s,/host,$hostdir,g" ${XBPS_DISTDIR}/etc/xbps.d/repos-local.conf \
+ > $confdir/10-repository-local.conf
+
+ if [ -z "$XBPS_SKIP_REMOTEREPOS" ]; then
+ case "$XBPS_MACHINE" in
+ *-musl)
+ install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote-musl.conf \
+ $confdir/20-repository-remote.conf
+ ;;
+ *)
+ install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote.conf \
+ $confdir/20-repository-remote.conf
+ ;;
+ esac
+ case "$XBPS_MACHINE" in
+ x86_64)
+ # x86_64/glibc
+ install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-local-x86_64.conf \
+ $confdir/12-repository-local-x86_64.conf
+ install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote-x86_64.conf \
+ $confdir/22-repository-remote-x86_64.conf
+ ;;
+ aarch64*)
+ # aarch64 glibc/musl
+ install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote-aarch64.conf \
+ $confdir/22-repository-remote-aarch64.conf
+ ;;
+ esac
+ fi
+
+ # Copy host repos to the cross root.
+ if [ -n "$XBPS_CROSS_BUILD" ]; then
+ rm -rf $XBPS_MASTERDIR/$XBPS_CROSS_BASE/etc/xbps.d
+ mkdir -p $XBPS_MASTERDIR/$XBPS_CROSS_BASE/etc/xbps.d
+ # copy xbps.d files from host for local repos
+ cp ${XBPS_MASTERDIR}/etc/xbps.d/*local*.conf \
+ $XBPS_MASTERDIR/$XBPS_CROSS_BASE/etc/xbps.d
+ if [ -z "$XBPS_SKIP_REMOTEREPOS" ]; then
+ # and then remote repos for target machine
+ case "$XBPS_TARGET_MACHINE" in
+ aarch64*)
+ # aarch64 glibc/musl
+ install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote-aarch64.conf \
+ $crossconfdir/22-repository-remote-aarch64.conf
+ ;;
+ *-musl)
+ # !aarch64 && musl
+ install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote-musl.conf \
+ $crossconfdir/20-repository-remote.conf
+ ;;
+ *)
+ # !aarch64 && glibc
+ install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote.conf \
+ $crossconfdir/20-repository-remote.conf
+ ;;
+ esac
+ fi
+ fi
+
+ # Copy xbps repository keys to the masterdir.
+ mkdir -p $XBPS_MASTERDIR/var/db/xbps/keys
+ cp -f $XBPS_COMMONDIR/repo-keys/*.plist $XBPS_MASTERDIR/var/db/xbps/keys
+
+ # Make sure to sync index for remote repositories.
+ msg_normal "xbps-src: updating repositories for host ($XBPS_MACHINE)...\n"
+ xbps-install -r $XBPS_MASTERDIR -S
+
+ if [ -n "$XBPS_CROSS_BUILD" ]; then
+ # Copy host keys to the target rootdir.
+ mkdir -p $XBPS_MASTERDIR/$XBPS_CROSS_BASE/var/db/xbps/keys
+ cp $XBPS_MASTERDIR/var/db/xbps/keys/*.plist \
+ $XBPS_MASTERDIR/$XBPS_CROSS_BASE/var/db/xbps/keys
+ # Make sure to sync index for remote repositories.
+ msg_normal "xbps-src: updating repositories for target ($XBPS_TARGET_MACHINE)...\n"
+ env -- XBPS_TARGET_ARCH=$XBPS_TARGET_MACHINE \
+ xbps-install -r $XBPS_MASTERDIR/$XBPS_CROSS_BASE -S
+ fi
+
+ return 0
+}
diff --git a/common/xbps-src/shutils/common.sh b/common/xbps-src/shutils/common.sh
index 952221d8937..5ca4d7132de 100644
--- a/common/xbps-src/shutils/common.sh
+++ b/common/xbps-src/shutils/common.sh
@@ -28,43 +28,43 @@ run_func() {
}
ch_wrksrc() {
- cd "$wrksrc" || msg_error "$pkgver: cannot access wrksrc directory [$wrksrc]\n"
- if [ -n "$build_wrksrc" ]; then
- cd $build_wrksrc || \
- msg_error "$pkgver: cannot access build_wrksrc directory [$build_wrksrc]\n"
- fi
+ cd "$wrksrc" || msg_error "$pkgver: cannot access wrksrc directory [$wrksrc]\n"
+ if [ -n "$build_wrksrc" ]; then
+ cd $build_wrksrc || \
+ msg_error "$pkgver: cannot access build_wrksrc directory [$build_wrksrc]\n"
+ fi
}
# runs {pre,do,post}_X tripplets
run_step() {
- local step_name="$1" optional_step="$2" skip_post_hook="$3"
+ local step_name="$1" optional_step="$2" skip_post_hook="$3"
- ch_wrksrc
- run_pkg_hooks "pre-$step_name"
+ ch_wrksrc
+ run_pkg_hooks "pre-$step_name"
# Run pre_* Phase
if declare -f "pre_$step_name" >/dev/null; then
- ch_wrksrc
- run_func "pre_$step_name"
+ ch_wrksrc
+ run_func "pre_$step_name"
fi
ch_wrksrc
# Run do_* Phase
if declare -f "do_$step_name" >/dev/null; then
- run_func "do_$step_name"
+ run_func "do_$step_name"
elif [ -n "$build_style" ]; then
- if [ -r $XBPS_BUILDSTYLEDIR/${build_style}.sh ]; then
- . $XBPS_BUILDSTYLEDIR/${build_style}.sh
- if declare -f "do_$step_name" >/dev/null; then
- run_func "do_$step_name"
- elif [ ! "$optional_step" ]; then
- msg_error "$pkgver: cannot find do_$step_name() in $XBPS_BUILDSTYLEDIR/${build_style}.sh!\n"
+ if [ -r $XBPS_BUILDSTYLEDIR/${build_style}.sh ]; then
+ . $XBPS_BUILDSTYLEDIR/${build_style}.sh
+ if declare -f "do_$step_name" >/dev/null; then
+ run_func "do_$step_name"
+ elif [ ! "$optional_step" ]; then
+ msg_error "$pkgver: cannot find do_$step_name() in $XBPS_BUILDSTYLEDIR/${build_style}.sh!\n"
+ fi
+ else
+ msg_error "$pkgver: cannot find build style $XBPS_BUILDSTYLEDIR/${build_style}.sh!\n"
fi
- else
- msg_error "$pkgver: cannot find build style $XBPS_BUILDSTYLEDIR/${build_style}.sh!\n"
- fi
elif [ ! "$optional_step" ]; then
- msg_error "$pkgver: cannot find do_$step_name()!\n"
+ msg_error "$pkgver: cannot find do_$step_name()!\n"
fi
# Run do_ phase hooks
@@ -72,13 +72,13 @@ run_step() {
# Run post_* Phase
if declare -f "post_$step_name" >/dev/null; then
- ch_wrksrc
- run_func "post_$step_name"
+ ch_wrksrc
+ run_func "post_$step_name"
fi
if ! [ "$skip_post_hook" ]; then
- ch_wrksrc
- run_pkg_hooks "post-$step_name"
+ ch_wrksrc
+ run_pkg_hooks "post-$step_name"
fi
}
@@ -171,8 +171,8 @@ set_build_options() {
OIFS="$IFS"; IFS=','
for j in ${pkgopts}; do
case "$j" in
- "$f") options[$j]=1 ;;
- "~$f") options[${j#\~}]=0 ;;
+ "$f") options[$j]=1 ;;
+ "~$f") options[${j#\~}]=0 ;;
esac
done
IFS="$OIFS"
@@ -239,9 +239,9 @@ unset_package_funcs() {
for f in $(typeset -F); do
case "$f" in
- *_package)
- unset -f "$f"
- ;;
+ *_package)
+ unset -f "$f"
+ ;;
esac
done
}
@@ -297,9 +297,9 @@ get_subpkgs() {
for f in $(typeset -F); do
case "$f" in
- *_package)
- echo "${f%_package}"
- ;;
+ *_package)
+ echo "${f%_package}"
+ ;;
esac
done
}
@@ -340,7 +340,7 @@ setup_pkg() {
XBPS_REMOVE_XCMD="env XBPS_TARGET_ARCH=$XBPS_TARGET_MACHINE $XBPS_REMOVE_CMD -r $XBPS_CROSS_BASE"
XBPS_RINDEX_XCMD="env XBPS_TARGET_ARCH=$XBPS_TARGET_MACHINE $XBPS_RINDEX_CMD"
XBPS_UHELPER_XCMD="env XBPS_TARGET_ARCH=$XBPS_TARGET_MACHINE xbps-uhelper -r $XBPS_CROSS_BASE"
- XBPS_CHECKVERS_XCMD="env XBPS_TARGET_ARCH=$XBPS_TARGET_MACHINE xbps-checkvers -r $XBPS_CROSS_BASE --repository=$XBPS_REPOSITORY"
+ XBPS_CHECKVERS_XCMD="env XBPS_TARGET_ARCH=$XBPS_TARGET_MACHINE xbps-checkvers -r $XBPS_CROSS_BASE"
else
export XBPS_TARGET_MACHINE=${XBPS_ARCH:-$XBPS_MACHINE}
unset XBPS_CROSS_BASE XBPS_CROSS_LDFLAGS XBPS_CROSS_FFLAGS
@@ -455,11 +455,12 @@ setup_pkg() {
arch="$XBPS_TARGET_MACHINE"
fi
if [ -n "$XBPS_BINPKG_EXISTS" ]; then
- # nonfree packages need this otherwise they'll rebuild even with -E
- if [ -n "$repository" ]; then
- extrarepo=" --repository=$XBPS_REPOSITORY/$repository"
- fi
- if [ "$($XBPS_QUERY_XCMD $extrarepo -i -R -ppkgver $pkgver 2>/dev/null)" = "$pkgver" ]; then
+ local _binpkgver="$($XBPS_QUERY_XCMD -R -ppkgver $pkgver 2>/dev/null)"
+ if [ "$_binpkgver" = "$pkgver" ]; then
+ if [ -z "$XBPS_DEPENDENCY" ]; then
+ local _repo="$($XBPS_QUERY_XCMD -R -prepository $pkgver 2>/dev/null)"
+ msg_normal "xbps-src: $pkgver: found ($XBPS_TARGET_MACHINE) ($_repo)\n"
+ fi
exit_and_cleanup
fi
fi
diff --git a/common/xbps-src/shutils/cross.sh b/common/xbps-src/shutils/cross.sh
index 66454fd9186..033d2048316 100644
--- a/common/xbps-src/shutils/cross.sh
+++ b/common/xbps-src/shutils/cross.sh
@@ -39,15 +39,27 @@ prepare_cross_sysroot() {
[ -z "$cross" -o "$cross" = "" -o -f $statefile ] && return 0
- # Check for cross-vpkg-dummy available for the target arch, otherwise build it.
- pkg_available 'cross-vpkg-dummy>=0.33_1' $cross
- if [ $? -eq 0 ]; then
- $XBPS_LIBEXECDIR/build.sh cross-vpkg-dummy cross-vpkg-dummy pkg $cross init || return $?
+ # Check if the cross pkg is installed in host.
+ check_installed_pkg cross-${XBPS_CROSS_TRIPLET}-0.1_1
+ [ $? -eq 0 ] && return 0
+
+ # Check if the cross compiler pkg is available in repos, otherwise build it.
+ pkg_available cross-${XBPS_CROSS_TRIPLET}
+ rval=$?
+ if [ $rval -eq 0 ]; then
+ $XBPS_LIBEXECDIR/build.sh cross-${XBPS_CROSS_TRIPLET} cross-${XBPS_CROSS_TRIPLET} pkg || return $?
fi
+ # Check if cross-vpkg-dummy is installed.
check_installed_pkg cross-vpkg-dummy-0.30_1 $cross
[ $? -eq 0 ] && return 0
+ # Check for cross-vpkg-dummy available for the target arch, otherwise build it.
+ pkg_available 'cross-vpkg-dummy>=0.33_1' $cross
+ if [ $? -eq 0 ]; then
+ $XBPS_LIBEXECDIR/build.sh cross-vpkg-dummy bootstrap pkg $cross init || return $?
+ fi
+
msg_normal "Installing $cross cross pkg: cross-vpkg-dummy ...\n"
errlog=$(mktemp) || exit 1
$XBPS_INSTALL_XCMD -Syfd cross-vpkg-dummy &>$errlog
@@ -75,6 +87,10 @@ install_cross_pkg() {
[ -z "$cross" -o "$cross" = "" ] && return 0
+ # Check if installed.
+ check_installed_pkg cross-${XBPS_CROSS_TRIPLET}-0.1_1
+ [ $? -eq 0 ] && return 0
+
# Check if the cross compiler pkg is available in repos, otherwise build it.
pkg_available cross-${XBPS_CROSS_TRIPLET}
rval=$?
@@ -82,11 +98,8 @@ install_cross_pkg() {
$XBPS_LIBEXECDIR/build.sh cross-${XBPS_CROSS_TRIPLET} cross-${XBPS_CROSS_TRIPLET} pkg || return $?
fi
- check_installed_pkg cross-${XBPS_CROSS_TRIPLET}-0.1_1
- [ $? -eq 0 ] && return 0
-
errlog=$(mktemp) || exit 1
- msg_normal "Installing $cross cross compiler: cross-${XBPS_CROSS_TRIPLET} ...\n"
+ msg_normal "xbps-src: installing cross compiler: cross-${XBPS_CROSS_TRIPLET} ...\n"
$XBPS_INSTALL_CMD -Syfd cross-${XBPS_CROSS_TRIPLET} &>$errlog
rval=$?
if [ $rval -ne 0 -a $rval -ne 17 ]; then
diff --git a/etc/defaults.conf b/etc/defaults.conf
index 8e74759ad7b..eda2966b47b 100644
--- a/etc/defaults.conf
+++ b/etc/defaults.conf
@@ -15,9 +15,14 @@
#
# [OPTIONAL]
-# Enable optional arguments to xbps-install for the host system.
-# Currently used in the binary-bootstrap bootstrap-update targets.
-XBPS_INSTALL_ARGS="--repository=https://alpha.de.repo.voidlinux.org/current --repository=https://alpha.de.repo.voidlinux.org/current/musl --repository=https://alpha.de.repo.voidlinux.org/current/aarch64"
+# Enable optional arguments to xbps-install(1) for the host system.
+# Currently used in the 'binary-bootstrap' and 'bootstrap-update' targets.
+#
+# NOTE: local repositories are handled automatically by xbps-src,
+# but you can modify the default remote repositories at
+# 'etc/xbps.d/repos-remote*.conf'
+#
+#XBPS_INSTALL_ARGS=""
# [OPTIONAL]
# Native Compilation/Preprocessor flags for C and C++. Additional settings
@@ -60,7 +65,7 @@ XBPS_SUCMD="sudo /bin/sh -c"
# [OPTIONAL]
# Enable recording git revisions in final binary packages; enable this
# if you are sure the package you are building is available in the
-# xbps-packages git repository.
+# void-packages git repository.
#
#XBPS_USE_GIT_REVS=yes
@@ -113,8 +118,8 @@ XBPS_SUCMD="sudo /bin/sh -c"
# [OPTIONAL]
# Set the preferred chroot style. Available styles at common/chroot-style/*.sh:
#
-# - uunshare (uses xbps-uunshare(8), user namespaces)
-# - uchroot (uses xbps-uchroot(8), namespaces, setgid)
+# - uunshare (uses xbps-uunshare(1), user namespaces)
+# - uchroot (uses xbps-uchroot(1), namespaces, setgid)
# - proot (uses proot, external, does not need special permissions)
# - bwrap (uses bwrap, external, does not need special permissions)
# - ethereal (uses root, needs no permissions, for disposable containers)
diff --git a/etc/repos-remote.conf b/etc/repos-remote.conf
deleted file mode 100644
index ec534bab0e7..00000000000
--- a/etc/repos-remote.conf
+++ /dev/null
@@ -1,13 +0,0 @@
-# Remote repositories
-repository=https://alpha.de.repo.voidlinux.org/current/musl
-repository=https://alpha.de.repo.voidlinux.org/current/musl/nonfree
-repository=https://alpha.de.repo.voidlinux.org/current
-repository=https://alpha.de.repo.voidlinux.org/current/nonfree
-repository=https://alpha.de.repo.voidlinux.org/current/aarch64
-
-# Additional mirrors
-#
-# http://mirror.clarkson.edu/voidlinux/current/ US
-# http://www.gtlib.gatech.edu/pub/VoidLinux/current/ US
-# https://lug.utdallas.edu/mirror/void/ US
-# http://mirror.aarnet.edu.au/pub/voidlinux/current/ AU
diff --git a/etc/xbps.conf b/etc/xbps.conf
deleted file mode 100644
index 3b1211fbc65..00000000000
--- a/etc/xbps.conf
+++ /dev/null
@@ -1 +0,0 @@
-syslog=false
diff --git a/etc/repos-local-x86_64.conf b/etc/xbps.d/repos-local-x86_64.conf
similarity index 57%
rename from etc/repos-local-x86_64.conf
rename to etc/xbps.d/repos-local-x86_64.conf
index a724a1ec722..3c531e4f9c0 100644
--- a/etc/repos-local-x86_64.conf
+++ b/etc/xbps.d/repos-local-x86_64.conf
@@ -1,3 +1,4 @@
-# Local repositories
+# DON'T EDIT THIS FILE
+# x86_64/glibc local repositories
repository=/host/binpkgs/multilib
repository=/host/binpkgs/multilib/nonfree
diff --git a/etc/repos-local.conf b/etc/xbps.d/repos-local.conf
similarity index 82%
rename from etc/repos-local.conf
rename to etc/xbps.d/repos-local.conf
index 19e47ac7a23..916c3b750d3 100644
--- a/etc/repos-local.conf
+++ b/etc/xbps.d/repos-local.conf
@@ -1,3 +1,4 @@
+# DON'T EDIT THIS FILE
# Local repositories
repository=/host/binpkgs
repository=/host/binpkgs/nonfree
diff --git a/etc/xbps.d/repos-remote-aarch64.conf b/etc/xbps.d/repos-remote-aarch64.conf
new file mode 100644
index 00000000000..4c81aaa9aa8
--- /dev/null
+++ b/etc/xbps.d/repos-remote-aarch64.conf
@@ -0,0 +1,4 @@
+# aarch64 voidlinux remote repositories
+repository=https://alpha.de.repo.voidlinux.org/current/aarch64
+repository=https://alpha.de.repo.voidlinux.org/current/aarch64/nonfree
+repository=https://alpha.de.repo.voidlinux.org/current/aarch64/debug
diff --git a/etc/xbps.d/repos-remote-musl.conf b/etc/xbps.d/repos-remote-musl.conf
new file mode 100644
index 00000000000..b47df7393ab
--- /dev/null
+++ b/etc/xbps.d/repos-remote-musl.conf
@@ -0,0 +1,4 @@
+# voidlinux remote repositories (musl)
+repository=https://alpha.de.repo.voidlinux.org/current/musl
+repository=https://alpha.de.repo.voidlinux.org/current/musl/nonfree
+repository=https://alpha.de.repo.voidlinux.org/current/musl/debug
diff --git a/etc/repos-remote-x86_64.conf b/etc/xbps.d/repos-remote-x86_64.conf
similarity index 74%
rename from etc/repos-remote-x86_64.conf
rename to etc/xbps.d/repos-remote-x86_64.conf
index fcc7b822f0f..e770aa1f4b5 100644
--- a/etc/repos-remote-x86_64.conf
+++ b/etc/xbps.d/repos-remote-x86_64.conf
@@ -1,3 +1,3 @@
-# Remote repositories
+# voidlinux remote repositories (x86_64/glibc)
repository=https://alpha.de.repo.voidlinux.org/current/multilib
repository=https://alpha.de.repo.voidlinux.org/current/multilib/nonfree
diff --git a/etc/xbps.d/repos-remote.conf b/etc/xbps.d/repos-remote.conf
new file mode 100644
index 00000000000..47c867ecac0
--- /dev/null
+++ b/etc/xbps.d/repos-remote.conf
@@ -0,0 +1,4 @@
+# voidlinux remote repositories (glibc)
+repository=https://alpha.de.repo.voidlinux.org/current
+repository=https://alpha.de.repo.voidlinux.org/current/nonfree
+repository=https://alpha.de.repo.voidlinux.org/current/debug
diff --git a/srcpkgs/base-chroot-musl/template b/srcpkgs/base-chroot-musl/template
deleted file mode 100644
index c95e27a9527..00000000000
--- a/srcpkgs/base-chroot-musl/template
+++ /dev/null
@@ -1,21 +0,0 @@
-# Template file for 'base-chroot-musl'
-pkgname=base-chroot-musl
-version=0.19
-revision=6
-archs="*-musl"
-bootstrap=yes
-build_style=meta
-homepage="https://www.voidlinux.org"
-short_desc="Bootstrap packages for xbps-src (musl libc)"
-maintainer="Enno Boland <gottox@voidlinux.org>"
-license="Public domain"
-
-conflicts="base-chroot>=0"
-provides="base-chroot-${version}_${revision}"
-
-depends="
- base-files kernel-libc-headers musl-devel musl-legacy-compat
- gcc patch chroot-bash chroot-grep coreutils findutils
- mpfr gettext chroot-texinfo sed chroot-gawk diffutils
- make gzip file tar chroot-util-linux chroot-git ccache
- chroot-distcc xbps xz which libada-devel gcc-ada"
diff --git a/srcpkgs/base-chroot/template b/srcpkgs/base-chroot/template
index 972039909fd..90ac72c9095 100644
--- a/srcpkgs/base-chroot/template
+++ b/srcpkgs/base-chroot/template
@@ -1,17 +1,21 @@
# Template file for 'base-chroot'
pkgname=base-chroot
-version=0.65
-revision=6
-archs="~*-musl"
+version=0.66
+revision=1
bootstrap=yes
build_style=meta
homepage="http://www.voidlinux.org"
-short_desc="Bootstrap packages for xbps-src"
-maintainer="Enno Boland <gottox@voidlinux.org>"
+short_desc="Minimal set of packages required for chroot with xbps-src"
+maintainer="Juan RP <xtraeme@gmail.com>"
license="Public domain"
-depends="
- base-files>=0.127 kernel-libc-headers glibc-devel glibc-locales binutils gcc
- mpfr patch chroot-bash chroot-grep coreutils gettext libada-devel gcc-ada
- chroot-texinfo sed chroot-gawk findutils diffutils make gzip file tar
- chroot-distcc chroot-util-linux chroot-git ccache xbps readline xz which"
+case "$XBPS_TARGET_LIBC" in
+ musl) depends="musl-devel";;
+ *) depends="glibc-devel glibc-locales";;
+esac
+
+depends+="
+ base-files binutils gcc gcc-ada libada-devel
+ patch sed findutils diffutils make gzip coreutils
+ file bsdtar ccache xbps chroot-bash chroot-grep
+ chroot-gawk chroot-distcc chroot-util-linux chroot-git"
diff --git a/srcpkgs/chroot-texinfo/template b/srcpkgs/chroot-texinfo/template
deleted file mode 100644
index b59d1e0da1b..00000000000
--- a/srcpkgs/chroot-texinfo/template
+++ /dev/null
@@ -1,39 +0,0 @@
-# Template file for 'chroot-texinfo'
-pkgname=chroot-texinfo
-reverts="6.5_1"
-version=4.13a
-revision=10
-wrksrc=texinfo-4.13
-bootstrap=yes
-hostmakedepends="ncurses-devel"
-makedepends="ncurses-devel"
-conflicts="texinfo>=0"
-provides="texinfo-${version}_${revision}"
-short_desc="The GNU Documentation System -- for xbps-src use"
-maintainer="Enno Boland <gottox@voidlinux.org>"
-license="GPL-3"
-homepage="http://www.gnu.org/software/texinfo/"
-distfiles="${GNU_SITE}/texinfo/texinfo-${version}.tar.lzma"
-checksum=6d28b0ceae866e3536142fc552e7a3bc9f84c8303119c25731b2478eef64c9e5
-
-do_configure() {
- cp -f ${XBPS_COMMONDIR}/environment/configure/automake/config.sub build-aux
-
- ./configure ${configure_args} --disable-nls
-}
-
-do_build() {
- if [ -d tools ]; then
- make ${makejobs} -C tools/gnulib/lib
- make ${makejobs} -C tools
- fi
- make ${makejobs}
-}
-
-do_install() {
- make DESTDIR=${DESTDIR} install
-
- rm -f ${DESTDIR}/usr/bin/info
- rm -f ${DESTDIR}/usr/bin/infokey
- rm -rf ${DESTDIR}/usr/share
-}
diff --git a/srcpkgs/gettext/template b/srcpkgs/gettext/template
index 7176faf2709..f138ff13225 100644
--- a/srcpkgs/gettext/template
+++ b/srcpkgs/gettext/template
@@ -2,7 +2,6 @@
pkgname=gettext
version=0.20.1
revision=1
-bootstrap=yes
build_style=gnu-configure
configure_args="--disable-java --disable-native-java --disable-csharp
--disable-libasprintf --enable-threads=posix --disable-rpath --without-emacs
@@ -23,7 +22,7 @@ case "$XBPS_TARGET_MACHINE" in
esac
if [ "$CROSS_BUILD" ]; then
- hostmakedepends="automake libtool git"
+ hostmakedepends="automake libtool"
pre_configure() {
autoreconf -fi
}
diff --git a/srcpkgs/tar/template b/srcpkgs/tar/template
index bda2f78625e..776a7d4ccce 100644
--- a/srcpkgs/tar/template
+++ b/srcpkgs/tar/template
@@ -2,7 +2,6 @@
pkgname=tar
version=1.32
revision=1
-bootstrap=yes
build_style=gnu-configure
configure_args="gl_cv_struct_dirent_d_ino=yes"
makedepends="acl-devel"
diff --git a/srcpkgs/texinfo/template b/srcpkgs/texinfo/template
index 0fafafe3f7c..fabe35316b3 100644
--- a/srcpkgs/texinfo/template
+++ b/srcpkgs/texinfo/template
@@ -1,13 +1,12 @@
# Template file for 'texinfo'
pkgname=texinfo
version=6.5
-revision=1
+revision=2
build_style=gnu-configure
configure_args="--disable-static"
hostmakedepends="perl ncurses-devel"
makedepends="ncurses-devel"
checkdepends="ncurses gzip"
-conflicts="chroot-texinfo>=0"
depends="gzip perl"
short_desc="The GNU Documentation System"
maintainer="Enno Boland <gottox@voidlinux.org>"
@@ -16,7 +15,6 @@ homepage="http://www.gnu.org/software/texinfo/"
distfiles="${GNU_SITE}/$pkgname/$pkgname-$version.tar.xz"
checksum=77774b3f4a06c20705cc2ef1c804864422e3cf95235e965b1f00a46df7da5f62
-
post_install() {
rm -f ${DESTDIR}/usr/share/info/dir
# Compress manually info files.
diff --git a/xbps-src b/xbps-src
index 529bdcce4db..50f2032deeb 100755
--- a/xbps-src
+++ b/xbps-src
@@ -269,69 +269,10 @@ check_native_arch() {
fi
}
-install_bbootstrap() {
- [ "$CHROOT_READY" ] && return
- if [ "$1" = "bootstrap" ]; then
- unset XBPS_TARGET_PKG XBPS_INSTALL_ARGS
- else
- XBPS_TARGET_PKG="$1"
- fi
- [ "$XBPS_SKIP_REMOTEREPOS" ] && unset XBPS_INSTALL_ARGS
- # binary bootstrap
- msg_normal "Installing bootstrap from binary package repositories...\n"
- # XBPS_TARGET_PKG == arch
- if [ "$XBPS_TARGET_PKG" ]; then
- _bootstrap_arch="env XBPS_TARGET_ARCH=$XBPS_TARGET_PKG"
- if [ "${XBPS_TARGET_PKG}" != "${XBPS_TARGET_PKG#*-}" ]; then
- _subarch="-${XBPS_TARGET_PKG#*-}"
- fi
- fi
- mkdir -p $XBPS_MASTERDIR/var/db/xbps/keys
- cd $XBPS_MASTERDIR
- cp -f $XBPS_COMMONDIR/repo-keys/*.plist $XBPS_MASTERDIR/var/db/xbps/keys
- ${_bootstrap_arch} $XBPS_INSTALL_CMD ${XBPS_INSTALL_ARGS:+-S $XBPS_INSTALL_ARGS} -y base-chroot${_subarch}
- if [ $? -ne 0 ]; then
- msg_error "Failed to install bootstrap packages!\n"
- fi
- # Reconfigure base-files to create dirs/symlinks.
- if xbps-query -r $XBPS_MASTERDIR base-files &>/dev/null; then
- XBPS_ARCH=$XBPS_TARGET_PKG xbps-reconfigure -r $XBPS_MASTERDIR -f base-files &>/dev/null
- fi
-
- msg_normal "Installed bootstrap successfully!\n"
- chroot_prepare $XBPS_TARGET_PKG || msg_error "Failed to initialize chroot!\n"
- chroot_check
- chroot_handler clean
-}
-
-reconfigure_bootstrap_pkgs() {
- local statefile="$XBPS_MASTERDIR/.xbps_chroot_configured"
- local pkgs="glibc-locales ca-certificates"
- [ -z "$IN_CHROOT" -o -e $statefile ] && return 0
- # Reconfigure ca-certificates.
- msg_normal "Reconfiguring bootstrap packages...\n"
- for f in ${pkgs}; do
- if xbps-query -r $XBPS_MASTERDIR $f &>/dev/null; then
- xbps-reconfigure -r $XBPS_MASTERDIR -f $f
- fi
- done
- touch -f $statefile
-}
-
-bootstrap_update() {
- [ -z "$CHROOT_READY" ] && return
- remove_pkg_autodeps
- msg_normal "xbps-src: cleaning up masterdir...\n"
- rm -rf $XBPS_MASTERDIR/builddir $XBPS_MASTERDIR/destdir
- msg_normal "xbps-src: updating $XBPS_MASTERDIR ...\n"
- ${XBPS_INSTALL_CMD} ${XBPS_INSTALL_ARGS} -Syu
- return $?
-}
-
masterdir_zap() {
rm -rf "$XBPS_MASTERDIR"
mkdir -p "$XBPS_MASTERDIR"
- msg_normal "$XBPS_MASTERDIR masterdir cleaned up.\n"
+ msg_normal "xbps-src: $XBPS_MASTERDIR masterdir cleaned up.\n"
}
exit_func() {
@@ -347,7 +288,7 @@ exit_func() {
read_pkg() {
if [ -z "${XBPS_TARGET_PKG}" ]; then
- [ ! -r ./template ] && msg_error "missing build template in $(pwd).\n"
+ [ ! -r ./template ] && msg_error "xbps-src: missing build template in $(pwd).\n"
XBPS_TARGET_PKG=${PWD##*/}
fi
setup_pkg "$XBPS_TARGET_PKG" "$XBPS_CROSS_BUILD" "$1"
@@ -368,13 +309,13 @@ setup_distfiles_mirror() {
[ "$scheme" != "file" ] && continue
if [ "$XBPS_CHROOT_CMD" == "uchroot" -o "$XBPS_CHROOT_CMD" == "proot" ]; then
if [ ! -d "$path" ]; then
- msg_warn "Invalid path in XBPS_DISTFILES_MIRROR ($mirror)\n"
+ msg_warn "xbps-src: Invalid path in XBPS_DISTFILES_MIRROR ($mirror)\n"
continue
fi
mkdir -p "$XBPS_MASTERDIR/$path"
XBPS_CHROOT_CMD_ARGS+=" -b $path:$path"
else
- msg_warn "File URLs ($mirror) don't work with '$XBPS_CHROOT_CMD'\n"
+ msg_warn "xbps-src: File URLs ($mirror) don't work with '$XBPS_CHROOT_CMD'\n"
fi
done
}
@@ -537,20 +478,20 @@ readonly XBPS_BUILDHELPERDIR=$XBPS_COMMONDIR/build-helper
if [ "$IN_CHROOT" ]; then
readonly XBPS_UHELPER_CMD="xbps-uhelper"
- readonly XBPS_INSTALL_CMD="xbps-install --repository=$XBPS_REPOSITORY"
- readonly XBPS_QUERY_CMD="xbps-query --repository=$XBPS_REPOSITORY"
+ readonly XBPS_INSTALL_CMD="xbps-install -c /host/repocache"
+ readonly XBPS_QUERY_CMD="xbps-query -c /host/repocache"
readonly XBPS_RECONFIGURE_CMD="xbps-reconfigure"
readonly XBPS_REMOVE_CMD="xbps-remove"
- readonly XBPS_CHECKVERS_CMD="xbps-checkvers --repository=$XBPS_REPOSITORY"
+ readonly XBPS_CHECKVERS_CMD="xbps-checkvers"
readonly XBPS_DESTDIR=/destdir
readonly XBPS_BUILDDIR=/builddir
else
readonly XBPS_UHELPER_CMD="xbps-uhelper -r $XBPS_MASTERDIR"
- readonly XBPS_INSTALL_CMD="xbps-install -c $XBPS_HOSTDIR/repocache --repository=$XBPS_REPOSITORY -r $XBPS_MASTERDIR"
- readonly XBPS_QUERY_CMD="xbps-query -c $XBPS_HOSTDIR/repocache --repository=$XBPS_REPOSITORY -r $XBPS_MASTERDIR"
+ readonly XBPS_INSTALL_CMD="xbps-install -c $XBPS_HOSTDIR/repocache -r $XBPS_MASTERDIR"
+ readonly XBPS_QUERY_CMD="xbps-query -c $XBPS_HOSTDIR/repocache -r $XBPS_MASTERDIR"
readonly XBPS_RECONFIGURE_CMD="xbps-reconfigure -r $XBPS_MASTERDIR"
readonly XBPS_REMOVE_CMD="xbps-remove -r $XBPS_MASTERDIR"
- readonly XBPS_CHECKVERS_CMD="xbps-checkvers --repository=$XBPS_REPOSITORY"
+ readonly XBPS_CHECKVERS_CMD="xbps-checkvers -r $XBPS_MASTERDIR"
readonly XBPS_DESTDIR=$XBPS_MASTERDIR/destdir
readonly XBPS_BUILDDIR=$XBPS_MASTERDIR/builddir
fi
@@ -687,46 +628,39 @@ for f in ${XBPS_SHUTILSDIR}/*.sh; do
[ -r "$f" ] && . $f
done
-reconfigure_bootstrap_pkgs
+reconfigure_base_chroot
#
# Main switch.
#
case "$XBPS_TARGET" in
binary-bootstrap)
- install_bbootstrap ${XBPS_TARGET_PKG:=$XBPS_MACHINE}
+ install_base_chroot ${XBPS_TARGET_PKG:=$XBPS_MACHINE}
;;
bootstrap)
- # bootstrap from sources
+ # base-chroot building on host
# check for required host utils
check_reqhost_utils bootstrap
- [[ $XBPS_MACHINE =~ musl ]] && subarch="-musl"
- [ ! -d $XBPS_SRCPKGDIR/base-chroot${subarch} ] && \
- msg_error "Cannot find $XBPS_SRCPKGDIR/base-chroot${subarch} directory!\n"
- bootstrap_vpkg=${XBPS_MASTERDIR}/etc/xbps.d/bootstrap-vpkgs.conf
- mkdir -p ${XBPS_MASTERDIR}/etc/xbps.d
- if [ ! -s ${bootstrap_vpkg} ]; then
- # Fool xbps to resolve dependencies.
- echo 'virtualpkg=libgcc:base-files' >> ${bootstrap_vpkg}
- echo 'virtualpkg=libstdc++:base-files' >> ${bootstrap_vpkg}
- fi
(
export XBPS_ARCH=$XBPS_MACHINE
export XBPS_SKIP_REMOTEREPOS=1
+ chroot_sync_repodata
$XBPS_LIBEXECDIR/build.sh \
- base-chroot${subarch} base-chroot${subarch} $XBPS_TARGET || exit 1
+ base-chroot base-chroot $XBPS_TARGET || exit 1
) || exit 1
[ -d $XBPS_MASTERDIR ] && rm -rf $XBPS_MASTERDIR
- install_bbootstrap ${XBPS_TARGET_PKG:=$XBPS_MACHINE}
+ install_base_chroot ${XBPS_TARGET_PKG:=$XBPS_MACHINE}
;;
bootstrap-update)
if [ -n "$CHROOT_READY" -a -z "$IN_CHROOT" ]; then
chroot_handler bootstrap-update
else
- bootstrap_update
+ chroot_sync_repodata
+ update_base_chroot
fi
;;
chroot)
+ chroot_sync_repodata
chroot_handler chroot dummy
;;
clean)
@@ -777,7 +711,8 @@ case "$XBPS_TARGET" in
if [ -n "$CHROOT_READY" -a -z "$IN_CHROOT" ]; then
chroot_handler $XBPS_TARGET $XBPS_TARGET_PKG
else
- [ -z "$XBPS_KEEP_ALL" -a -z "$XBPS_SKIP_DEPS" ] && remove_pkg_autodeps
+ chroot_sync_repodata
+ update_base_chroot
$XBPS_LIBEXECDIR/build.sh $XBPS_TARGET_PKG $XBPS_TARGET_PKG \
$XBPS_TARGET $XBPS_CROSS_BUILD || exit $?
fi
From 4bede478faddffedabf736c10e8ff0d20d07bce7 Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Wed, 1 Jan 2020 11:45:45 +0100
Subject: [PATCH 02/24] travis: update set_mirror.sh for `etc/xbps.d`.
---
common/travis/set_mirror.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/travis/set_mirror.sh b/common/travis/set_mirror.sh
index 8e5353f55d8..a10190a48f6 100755
--- a/common/travis/set_mirror.sh
+++ b/common/travis/set_mirror.sh
@@ -3,7 +3,7 @@
TRAVIS_PROTO=http
TRAVIS_MIRROR=alpha.us.repo.voidlinux.org
-for _i in etc/repos-remote.conf etc/defaults.conf etc/repos-remote-x86_64.conf ; do
+for _i in etc/xbps.d/repos-remote*.conf ; do
/bin/echo -e "\x1b[32mUpdating $_i...\x1b[0m"
# First fix the proto, ideally we'd serve everything with HTTPS,
# but key management and rotation is a pain, and things are signed
From 08cbbf1764554f2a800634ad627535e1b5608ab4 Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Wed, 1 Jan 2020 11:57:45 +0100
Subject: [PATCH 03/24] travis: some tweaks for base-chroot-v2:
- no need to perform `boostrap-update` anymore, xbps-src does it now.
- don't set useless values to `etc/conf`.
---
common/travis/build.sh | 21 ---------------------
common/travis/prepare.sh | 2 --
2 files changed, 23 deletions(-)
diff --git a/common/travis/build.sh b/common/travis/build.sh
index 9bbc048ab15..31d1c58c10b 100755
--- a/common/travis/build.sh
+++ b/common/travis/build.sh
@@ -6,27 +6,6 @@ if [ "$1" != "$2" ]; then
arch="-a $2"
fi
-# Tell xbps-src what is our arch, this is done when doing
-# binary-bootstrap, but we need to do it every time since
-# our masterdir is ethereal.
-# /bin/echo -e '\x1b[32mWriting bootstrap arch into .xbps_chroot_init of masterdir\x1b[0m'
-# echo "$1" > /hostrepo/masterdir/.xbps_chroot_init
-
-/bin/echo -e '\x1b[32mPreparing chroot with chroot_prepare()\x1b[0m'
-source hostrepo/common/xbps-src/shutils/chroot.sh || {
- echo "Failed to source chroot.sh for chroot_prepare()" >&2 ;
- exit 1
-}
-
-XBPS_SRCPKGDIR=/hostrepo/srcpkgs XBPS_MASTERDIR=/ chroot_prepare $1 || {
- echo "Failed to prepare chroot!" >&2 ;
- exit 1
-}
-
-# Two times due to updating xbps itself
-/hostrepo/xbps-src -H "$HOME"/hostdir bootstrap-update
-/hostrepo/xbps-src -H "$HOME"/hostdir bootstrap-update
-
PKGS=$(/hostrepo/xbps-src sort-dependencies $(cat /tmp/templates))
NPROCS=1
diff --git a/common/travis/prepare.sh b/common/travis/prepare.sh
index 869cc4b72d1..04fff2a1392 100755
--- a/common/travis/prepare.sh
+++ b/common/travis/prepare.sh
@@ -5,8 +5,6 @@
[ "$XLINT" ] && exit 0
/bin/echo -e '\x1b[32mUpdating etc/conf...\x1b[0m'
-echo XBPS_CHROOT_CMD=uchroot >> etc/conf
-echo XBPS_MAKEJOBS=4 >> etc/conf
echo XBPS_ALLOW_RESTRICTED=yes >> etc/conf
/bin/echo -e '\x1b[32mEnabling ethereal chroot-style...\x1b[0m'
From 14d39cc28069571e82b56a83c86c1ee67d6bfe63 Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Wed, 1 Jan 2020 12:04:36 +0100
Subject: [PATCH 04/24] base-chroot: xlintify
---
srcpkgs/base-chroot/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/base-chroot/template b/srcpkgs/base-chroot/template
index 90ac72c9095..1f73f00d56d 100644
--- a/srcpkgs/base-chroot/template
+++ b/srcpkgs/base-chroot/template
@@ -4,10 +4,10 @@ version=0.66
revision=1
bootstrap=yes
build_style=meta
-homepage="http://www.voidlinux.org"
short_desc="Minimal set of packages required for chroot with xbps-src"
maintainer="Juan RP <xtraeme@gmail.com>"
license="Public domain"
+homepage="http://www.voidlinux.org"
case "$XBPS_TARGET_LIBC" in
musl) depends="musl-devel";;
From bbd8112de6bc495f3d7bb4c0921e5199a19a6e43 Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Wed, 1 Jan 2020 12:04:45 +0100
Subject: [PATCH 05/24] texinfo: xlintify
---
srcpkgs/texinfo/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/texinfo/template b/srcpkgs/texinfo/template
index fabe35316b3..4b3a30fdb68 100644
--- a/srcpkgs/texinfo/template
+++ b/srcpkgs/texinfo/template
@@ -6,9 +6,9 @@ build_style=gnu-configure
configure_args="--disable-static"
hostmakedepends="perl ncurses-devel"
makedepends="ncurses-devel"
-checkdepends="ncurses gzip"
depends="gzip perl"
-short_desc="The GNU Documentation System"
+checkdepends="ncurses gzip"
+short_desc="GNU Documentation System"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="GPL-3"
homepage="http://www.gnu.org/software/texinfo/"
From 447635db52fb5e2be0b56569289e212138624a46 Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Wed, 1 Jan 2020 12:10:59 +0100
Subject: [PATCH 06/24] chroot_init: return 0 at the end to not inherit last
cmd errval.
---
common/xbps-src/shutils/chroot.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/common/xbps-src/shutils/chroot.sh b/common/xbps-src/shutils/chroot.sh
index fcb0c4a04cc..2f40697657d 100644
--- a/common/xbps-src/shutils/chroot.sh
+++ b/common/xbps-src/shutils/chroot.sh
@@ -94,6 +94,7 @@ _EOF
chmod 755 $XBPS_MASTERDIR/bin/xbps-shell
cp -f /etc/resolv.conf $XBPS_MASTERDIR/etc
+ return 0
}
chroot_prepare() {
From a7606f9e25c0d0699fd89938b30712b8040c4dff Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Wed, 1 Jan 2020 12:18:36 +0100
Subject: [PATCH 07/24] tar, texinfo: xlintify
---
srcpkgs/tar/template | 1 -
srcpkgs/texinfo/template | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/srcpkgs/tar/template b/srcpkgs/tar/template
index 776a7d4ccce..0a49caa7e91 100644
--- a/srcpkgs/tar/template
+++ b/srcpkgs/tar/template
@@ -16,4 +16,3 @@ pre_configure() {
# avoid regenerating doc on install
touch -r doc/stamp-vti configure
}
-
diff --git a/srcpkgs/texinfo/template b/srcpkgs/texinfo/template
index 4b3a30fdb68..457726e19ea 100644
--- a/srcpkgs/texinfo/template
+++ b/srcpkgs/texinfo/template
@@ -10,7 +10,7 @@ depends="gzip perl"
checkdepends="ncurses gzip"
short_desc="GNU Documentation System"
maintainer="Enno Boland <gottox@voidlinux.org>"
-license="GPL-3"
+license="GPL-3.0-or-later"
homepage="http://www.gnu.org/software/texinfo/"
distfiles="${GNU_SITE}/$pkgname/$pkgname-$version.tar.xz"
checksum=77774b3f4a06c20705cc2ef1c804864422e3cf95235e965b1f00a46df7da5f62
From c8dfc2c551f11210056b6f186cefcb40e824ca9b Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Wed, 1 Jan 2020 12:22:03 +0100
Subject: [PATCH 08/24] travis: always build a recent `base-chroot` pkg
---
common/travis/prepare.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/common/travis/prepare.sh b/common/travis/prepare.sh
index 04fff2a1392..6390e7c5df5 100755
--- a/common/travis/prepare.sh
+++ b/common/travis/prepare.sh
@@ -13,3 +13,6 @@ echo XBPS_ALLOW_CHROOT_BREAKOUT=yes >> etc/conf
/bin/echo -e '\x1b[32mLinking / to /masterdir...\x1b[0m'
ln -s / masterdir
+
+# Make sure `base-chroot` is really up-to-date
+/hostrepo/xbps-src -Ntf pkg base-chroot
From b9a1641c94e226915e6b1c78f3ed744cc8638a17 Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Wed, 1 Jan 2020 12:25:22 +0100
Subject: [PATCH 09/24] travis: rebuild base-chroot via build.sh not
prepare.sh.
---
common/travis/build.sh | 3 +++
common/travis/prepare.sh | 3 ---
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/common/travis/build.sh b/common/travis/build.sh
index 31d1c58c10b..dc49e045a45 100755
--- a/common/travis/build.sh
+++ b/common/travis/build.sh
@@ -6,6 +6,9 @@ if [ "$1" != "$2" ]; then
arch="-a $2"
fi
+# Make sure `base-chroot` is really up-to-date
+/hostrepo/xbps-src -Ntf pkg base-chroot
+
PKGS=$(/hostrepo/xbps-src sort-dependencies $(cat /tmp/templates))
NPROCS=1
diff --git a/common/travis/prepare.sh b/common/travis/prepare.sh
index 6390e7c5df5..04fff2a1392 100755
--- a/common/travis/prepare.sh
+++ b/common/travis/prepare.sh
@@ -13,6 +13,3 @@ echo XBPS_ALLOW_CHROOT_BREAKOUT=yes >> etc/conf
/bin/echo -e '\x1b[32mLinking / to /masterdir...\x1b[0m'
ln -s / masterdir
-
-# Make sure `base-chroot` is really up-to-date
-/hostrepo/xbps-src -Ntf pkg base-chroot
From cc50da8623176ea0b41e56ddbf882f7aea781019 Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Wed, 1 Jan 2020 12:29:25 +0100
Subject: [PATCH 10/24] travis/build.sh: fix xbps-src opts for ethereal.
---
common/travis/build.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/travis/build.sh b/common/travis/build.sh
index dc49e045a45..31402cdc3e1 100755
--- a/common/travis/build.sh
+++ b/common/travis/build.sh
@@ -7,7 +7,7 @@ if [ "$1" != "$2" ]; then
fi
# Make sure `base-chroot` is really up-to-date
-/hostrepo/xbps-src -Ntf pkg base-chroot
+/hostrepo/xbps-src -f pkg base-chroot
PKGS=$(/hostrepo/xbps-src sort-dependencies $(cat /tmp/templates))
From b5331d6779311f4b678ada205f006f9f798d88ed Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Wed, 1 Jan 2020 12:40:15 +0100
Subject: [PATCH 11/24] travis/build.sh: always update base-chroot in
masterdir.
---
common/travis/build.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/common/travis/build.sh b/common/travis/build.sh
index 31402cdc3e1..d00d57f12f2 100755
--- a/common/travis/build.sh
+++ b/common/travis/build.sh
@@ -7,7 +7,8 @@ if [ "$1" != "$2" ]; then
fi
# Make sure `base-chroot` is really up-to-date
-/hostrepo/xbps-src -f pkg base-chroot
+/hostrepo/xbps-src -f pkg base-chroot || exit 1
+xbps-install --repository=/host/binpkgs -yu || exit 1
PKGS=$(/hostrepo/xbps-src sort-dependencies $(cat /tmp/templates))
From 2d496efcef5bae3d311fb120ccaa8ff0f816b1b0 Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Wed, 1 Jan 2020 12:42:13 +0100
Subject: [PATCH 12/24] xbps-src: update_base_chroot(): remove autodeps after
sysup.
---
common/xbps-src/shutils/chroot.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/common/xbps-src/shutils/chroot.sh b/common/xbps-src/shutils/chroot.sh
index 2f40697657d..b463278c29e 100644
--- a/common/xbps-src/shutils/chroot.sh
+++ b/common/xbps-src/shutils/chroot.sh
@@ -55,6 +55,8 @@ update_base_chroot() {
${XBPS_INSTALL_CMD} ${XBPS_INSTALL_ARGS} -yu xbps || msg_error "xbps-src: failed to update xbps!\n"
fi
${XBPS_INSTALL_CMD} ${XBPS_INSTALL_ARGS} -yu || msg_error "xbps-src: failed to update base-chroot!\n"
+ [ -z "$XBPS_KEEP_ALL" -a -z "$XBPS_SKIP_DEPS" ] && remove_pkg_autodeps
+ msg_normal "xbps-src: cleaning up $XBPS_MASTERDIR masterdir...\n"
}
# FIXME: $XBPS_FFLAGS is not set when chroot_init() is run
From c00d38fa33e01da606db263ae4c87ea07e89270b Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Wed, 1 Jan 2020 12:48:18 +0100
Subject: [PATCH 13/24] travis/build.sh: install base-chroot and remove
autodeps.
---
common/travis/build.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/common/travis/build.sh b/common/travis/build.sh
index d00d57f12f2..2c2a00d5cc2 100755
--- a/common/travis/build.sh
+++ b/common/travis/build.sh
@@ -8,7 +8,9 @@ fi
# Make sure `base-chroot` is really up-to-date
/hostrepo/xbps-src -f pkg base-chroot || exit 1
-xbps-install --repository=/host/binpkgs -yu || exit 1
+xbps-install --repository=/host/binpkgs -yif base-chroot || exit 1
+# remove autodeps
+xbps-remove -yo || exit 1
PKGS=$(/hostrepo/xbps-src sort-dependencies $(cat /tmp/templates))
From 81b4fe4f413aacf18d7398ea033edddeb3e23b45 Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Wed, 1 Jan 2020 12:52:43 +0100
Subject: [PATCH 14/24] travis/build.sh: fix repo path, use -H.
---
common/travis/build.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/travis/build.sh b/common/travis/build.sh
index 2c2a00d5cc2..7e679ecc843 100755
--- a/common/travis/build.sh
+++ b/common/travis/build.sh
@@ -7,8 +7,8 @@ if [ "$1" != "$2" ]; then
fi
# Make sure `base-chroot` is really up-to-date
-/hostrepo/xbps-src -f pkg base-chroot || exit 1
-xbps-install --repository=/host/binpkgs -yif base-chroot || exit 1
+/hostrepo/xbps-src -H "$HOME"/hostdir -f pkg base-chroot || exit 1
+xbps-install --repo="$HOME"/host/binpkgs -yif base-chroot || exit 1
# remove autodeps
xbps-remove -yo || exit 1
From 88c135d6642a9e84d4042174889b487912aa1548 Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Wed, 1 Jan 2020 12:55:35 +0100
Subject: [PATCH 15/24] travis/build.sh: local repo path v2
---
common/travis/build.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/travis/build.sh b/common/travis/build.sh
index 7e679ecc843..09705565427 100755
--- a/common/travis/build.sh
+++ b/common/travis/build.sh
@@ -8,7 +8,7 @@ fi
# Make sure `base-chroot` is really up-to-date
/hostrepo/xbps-src -H "$HOME"/hostdir -f pkg base-chroot || exit 1
-xbps-install --repo="$HOME"/host/binpkgs -yif base-chroot || exit 1
+xbps-install --repo="$HOME"/hostdir/binpkgs -yif base-chroot || exit 1
# remove autodeps
xbps-remove -yo || exit 1
From 1dedb200d46899cddf3a94ba5d618c592e69fb85 Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Wed, 1 Jan 2020 12:58:19 +0100
Subject: [PATCH 16/24] travis/build.sh: also use xbps.d repos, to resolve
missing deps.
---
common/travis/build.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/travis/build.sh b/common/travis/build.sh
index 09705565427..c7049c260c6 100755
--- a/common/travis/build.sh
+++ b/common/travis/build.sh
@@ -8,7 +8,7 @@ fi
# Make sure `base-chroot` is really up-to-date
/hostrepo/xbps-src -H "$HOME"/hostdir -f pkg base-chroot || exit 1
-xbps-install --repo="$HOME"/hostdir/binpkgs -yif base-chroot || exit 1
+xbps-install --repo="$HOME"/hostdir/binpkgs -yf base-chroot || exit 1
# remove autodeps
xbps-remove -yo || exit 1
From b261543632c599c2c92a27d7a02ce04e382a5550 Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Wed, 1 Jan 2020 13:01:18 +0100
Subject: [PATCH 17/24] travis/build.sh: perform sysup before installing
base-chroot.
---
common/travis/build.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/common/travis/build.sh b/common/travis/build.sh
index c7049c260c6..916c25515d7 100755
--- a/common/travis/build.sh
+++ b/common/travis/build.sh
@@ -8,6 +8,7 @@ fi
# Make sure `base-chroot` is really up-to-date
/hostrepo/xbps-src -H "$HOME"/hostdir -f pkg base-chroot || exit 1
+xbps-install --repo="$HOME"/hostdir/binpkgs -yu || exit 1
xbps-install --repo="$HOME"/hostdir/binpkgs -yf base-chroot || exit 1
# remove autodeps
xbps-remove -yo || exit 1
From b0140b84b7846c1ecb820da819fc50aefdb5383e Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Wed, 1 Jan 2020 13:06:53 +0100
Subject: [PATCH 18/24] tar: fix for ethereal chroot-style
---
srcpkgs/tar/template | 2 ++
1 file changed, 2 insertions(+)
diff --git a/srcpkgs/tar/template b/srcpkgs/tar/template
index 0a49caa7e91..2ec183c02f1 100644
--- a/srcpkgs/tar/template
+++ b/srcpkgs/tar/template
@@ -13,6 +13,8 @@ distfiles="${GNU_SITE}/tar/${pkgname}-${version}.tar.xz"
checksum=d0d3ae07f103323be809bc3eac0dcc386d52c5262499fe05511ac4788af1fdd8
pre_configure() {
+ # chroot-style=ethereal
+ export FORCE_UNSAFE_CONFIGURE=1
# avoid regenerating doc on install
touch -r doc/stamp-vti configure
}
From d34dc4783cabd6562e1a64cc09518d31b3c43119 Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Wed, 1 Jan 2020 13:12:04 +0100
Subject: [PATCH 19/24] base-chroot: fix license?
---
srcpkgs/base-chroot/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/base-chroot/template b/srcpkgs/base-chroot/template
index 1f73f00d56d..d4614bf3f27 100644
--- a/srcpkgs/base-chroot/template
+++ b/srcpkgs/base-chroot/template
@@ -6,7 +6,7 @@ bootstrap=yes
build_style=meta
short_desc="Minimal set of packages required for chroot with xbps-src"
maintainer="Juan RP <xtraeme@gmail.com>"
-license="Public domain"
+license="Public Domain"
homepage="http://www.voidlinux.org"
case "$XBPS_TARGET_LIBC" in
From 0941fa44d521639ab1528879a7f514f1286f7fba Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Sat, 4 Jan 2020 08:59:10 +0100
Subject: [PATCH 20/24] xbps-src: fix for x86_64 local multilib repos.
Found and fixed by @pullmoll
---
common/xbps-src/shutils/chroot.sh | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/common/xbps-src/shutils/chroot.sh b/common/xbps-src/shutils/chroot.sh
index b463278c29e..744b99a8a0c 100644
--- a/common/xbps-src/shutils/chroot.sh
+++ b/common/xbps-src/shutils/chroot.sh
@@ -226,7 +226,15 @@ chroot_sync_repodata() {
sed -e "s,/host,$hostdir,g" ${XBPS_DISTDIR}/etc/xbps.d/repos-local.conf \
> $confdir/10-repository-local.conf
- if [ -z "$XBPS_SKIP_REMOTEREPOS" ]; then
+ if [ "$XBPS_SKIP_REMOTEREPOS" ]; then
+ case "$XBPS_MACHINE" in
+ x86_64)
+ # x86_64/glibc
+ install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-local-x86_64.conf \
+ $confdir/12-repository-local-x86_64.conf
+ ;;
+ esac
+ else
case "$XBPS_MACHINE" in
*-musl)
install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote-musl.conf \
From 0ec18a9d60504a890c44723ea6159e0918d1a34e Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Sat, 4 Jan 2020 09:01:29 +0100
Subject: [PATCH 21/24] travis/build.sh: use -E (and get rid of -f) while
building base-chroot.
---
common/travis/build.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/travis/build.sh b/common/travis/build.sh
index 916c25515d7..c6a71afb6be 100755
--- a/common/travis/build.sh
+++ b/common/travis/build.sh
@@ -7,7 +7,7 @@ if [ "$1" != "$2" ]; then
fi
# Make sure `base-chroot` is really up-to-date
-/hostrepo/xbps-src -H "$HOME"/hostdir -f pkg base-chroot || exit 1
+/hostrepo/xbps-src -H "$HOME"/hostdir -E pkg base-chroot || exit 1
xbps-install --repo="$HOME"/hostdir/binpkgs -yu || exit 1
xbps-install --repo="$HOME"/hostdir/binpkgs -yf base-chroot || exit 1
# remove autodeps
From d0decae241fd8ba9d608c80bec18378318e7666f Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Sat, 4 Jan 2020 11:19:05 +0100
Subject: [PATCH 22/24] xbps-src: updated list of required host utils.
---
xbps-src | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xbps-src b/xbps-src
index 50f2032deeb..1ba52432707 100755
--- a/xbps-src
+++ b/xbps-src
@@ -382,9 +382,9 @@ umask 022
#
# Required utilities in host system for the bootstrap target.
readonly REQHOST_UTILS_BOOTSTRAP="make gawk bash bison sed gcc g++ msgfmt makeinfo \
- perl tar xz gzip bzip2 patch flex automake libtool pkg-config"
+ perl bsdtar xz gzip bzip2 patch flock flex libtool pkg-config"
-# Required utilities in host system for chroot ops.
+# Required utilities in host.
readonly REQHOST_UTILS="xbps-install xbps-query xbps-rindex xbps-uhelper \
xbps-reconfigure xbps-remove xbps-create xbps-uchroot xbps-uunshare"
From c6d1da9777539539d66fcca2c3065688e087c408 Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Sun, 5 Jan 2020 07:47:43 +0100
Subject: [PATCH 23/24] .travis.yml: bump voidlinux docker tag.
Original commit in https://github.com/void-linux/void-packages/pull/18049
will be reverted after testing.
@the-maldridge
---
.travis.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index 5f4f30f85cd..13650b2bd31 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,7 +8,7 @@ env:
global:
- PATH=$PATH:/tmp/bin
- DOCKER_BASE=voidlinux/masterdir
- - TAG=2019102301
+ - TAG=20200104
matrix:
- XLINT=1 LICENSE_LIST=common/travis/license.lst
From 37470cfc1587478693d11890c935f4b544fb8a33 Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Sun, 5 Jan 2020 08:20:26 +0100
Subject: [PATCH 24/24] hooks: 00-distfiles.sh: detect bsdtar and then tar
(GNU).
This way xbps-src is able to work with any of them.
---
common/hooks/do-extract/00-distfiles.sh | 7 ++++++-
common/hooks/do-fetch/00-distfiles.sh | 17 ++++++++++++++---
2 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/common/hooks/do-extract/00-distfiles.sh b/common/hooks/do-extract/00-distfiles.sh
index 303fe27e0a1..d1f457edcc5 100644
--- a/common/hooks/do-extract/00-distfiles.sh
+++ b/common/hooks/do-extract/00-distfiles.sh
@@ -4,6 +4,7 @@
hook() {
local srcdir="$XBPS_SRCDISTDIR/$pkgname-$version"
local f j curfile found extractdir
+ local TAR_CMD
if [ -z "$distfiles" -a -z "$checksum" ]; then
mkdir -p $wrksrc
@@ -23,6 +24,10 @@ hook() {
mkdir -p ${wrksrc} || msg_error "$pkgver: failed to create wrksrc.\n"
fi
+ TAR_CMD="$(command -v bsdtar)"
+ [ -z "$TAR_CMD" ] && TAR_CMD="$(command -v tar)"
+ [ -z "$TAR_CMD" ] && msg_error "xbps-src: no suitable tar cmd (bsdtar, tar)\n"
+
msg_normal "$pkgver: extracting distfile(s), please wait...\n"
for f in ${distfiles}; do
@@ -71,7 +76,7 @@ hook() {
case ${cursufx} in
tar|txz|tbz|tlz|tgz|crate)
- bsdtar -x --no-same-permissions --no-same-owner -f $srcdir/$curfile -C $extractdir
+ $TAR_CMD -x --no-same-permissions --no-same-owner -f $srcdir/$curfile -C $extractdir
if [ $? -ne 0 ]; then
msg_error "$pkgver: extracting $curfile into $XBPS_BUILDDIR.\n"
fi
diff --git a/common/hooks/do-fetch/00-distfiles.sh b/common/hooks/do-fetch/00-distfiles.sh
index 73239da1c73..db4f29c73a2 100644
--- a/common/hooks/do-fetch/00-distfiles.sh
+++ b/common/hooks/do-fetch/00-distfiles.sh
@@ -50,7 +50,7 @@ contents_cksum() {
case ${cursufx} in
tar|txz|tbz|tlz|tgz|crate)
- cksum=$($XBPS_DIGEST_CMD <(bsdtar xf "$curfile" --list))
+ cksum=$($XBPS_DIGEST_CMD <($TAR_CMD xf "$curfile" $TAR_CMD_STDOUT))
if [ $? -ne 0 ]; then
msg_error "$pkgver: extracting $curfile to pipe.\n"
fi
@@ -73,7 +73,7 @@ contents_cksum() {
;;
rpm)
if command -v rpmextract &>/dev/null; then
- cksum=$($XBPS_DIGEST_CMD <(rpm2cpio "$curfile" | bsdtar xf - --to-stdout))
+ cksum=$($XBPS_DIGEST_CMD <(rpm2cpio "$curfile" | $TAR_CMD xf - $TAR_CMD_STDOUT))
if [ $? -ne 0 ]; then
msg_error "$pkgver: extracting $curfile to pipe.\n"
fi
@@ -95,7 +95,7 @@ contents_cksum() {
fi
;;
gem)
- cksum=$($XBPS_DIGEST_CMD <(bsdtar -xf "$curfile" data.tar.gz --list | bsdtar -xzO ))
+ cksum=$($XBPS_DIGEST_CMD <($TAR_CMD -xf "$curfile" data.tar.gz $TAR_CMD_STDOUT | $TAR_CMD -xzO ))
;;
*)
msg_error "$pkgver: cannot guess $curfile extract suffix. ($cursufx)\n"
@@ -210,6 +210,15 @@ hook() {
# Disable trap on ERR; the code is smart enough to report errors and abort.
trap - ERR
+ # Detect bsdtar and GNU tar (in that order of preference)
+ TAR_CMD="$(command -v bsdtar)"
+ if [ "$TAR_CMD" ]; then
+ TAR_CMD_STDOUT="--list"
+ else
+ TAR_CMD="$(command -v tar)"
+ TAR_CMD_STDOUT="--to-stdout"
+ fi
+
# Detect distfiles with obsolete checksum and purge them from the cache
for f in ${distfiles}; do
curfile="${f#*>}"
@@ -273,6 +282,8 @@ hook() {
dfcount=$((dfcount + 1))
done
+ unset TAR_CMD TAR_CMD_STDOUT
+
if [ $errors -gt 0 ]; then
msg_error "$pkgver: couldn't verify distfiles, exiting...\n"
fi
next prev parent reply other threads:[~2020-01-05 7:21 UTC|newest]
Thread overview: 99+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-01 10:37 [PR PATCH] " voidlinux-github
2020-01-01 10:41 ` voidlinux-github
2020-01-01 10:46 ` [PR PATCH] [Updated] " voidlinux-github
2020-01-01 10:50 ` voidlinux-github
2020-01-01 10:59 ` [PR PATCH] [Updated] " voidlinux-github
2020-01-01 11:05 ` voidlinux-github
2020-01-01 11:11 ` voidlinux-github
2020-01-01 11:22 ` voidlinux-github
2020-01-01 11:25 ` voidlinux-github
2020-01-01 11:29 ` voidlinux-github
2020-01-01 11:40 ` voidlinux-github
2020-01-01 11:42 ` voidlinux-github
2020-01-01 11:48 ` voidlinux-github
2020-01-01 11:53 ` voidlinux-github
2020-01-01 11:56 ` voidlinux-github
2020-01-01 11:58 ` voidlinux-github
2020-01-01 12:02 ` voidlinux-github
2020-01-01 12:07 ` voidlinux-github
2020-01-01 12:12 ` voidlinux-github
2020-01-01 12:13 ` voidlinux-github
2020-01-01 12:14 ` voidlinux-github
2020-01-01 12:16 ` voidlinux-github
2020-01-01 12:18 ` voidlinux-github
2020-01-01 12:19 ` voidlinux-github
2020-01-01 12:19 ` voidlinux-github
2020-01-01 12:22 ` voidlinux-github
2020-01-01 12:25 ` voidlinux-github
2020-01-01 12:28 ` voidlinux-github
2020-01-01 12:30 ` voidlinux-github
2020-01-01 12:36 ` voidlinux-github
2020-01-01 21:14 ` voidlinux-github
2020-01-01 21:32 ` voidlinux-github
2020-01-01 21:32 ` voidlinux-github
2020-01-01 21:33 ` voidlinux-github
2020-01-01 21:34 ` voidlinux-github
2020-01-01 21:35 ` voidlinux-github
2020-01-01 21:35 ` voidlinux-github
2020-01-01 21:37 ` voidlinux-github
2020-01-01 21:37 ` voidlinux-github
2020-01-01 21:38 ` voidlinux-github
2020-01-01 23:29 ` voidlinux-github
2020-01-01 23:32 ` voidlinux-github
2020-01-02 11:18 ` voidlinux-github
2020-01-02 17:48 ` voidlinux-github
2020-01-02 20:32 ` voidlinux-github
2020-01-02 20:34 ` voidlinux-github
2020-01-02 20:37 ` voidlinux-github
2020-01-02 22:20 ` voidlinux-github
2020-01-02 22:29 ` voidlinux-github
2020-01-03 1:18 ` voidlinux-github
2020-01-03 1:51 ` voidlinux-github
2020-01-03 1:53 ` voidlinux-github
2020-01-03 7:40 ` voidlinux-github
2020-01-03 8:24 ` voidlinux-github
2020-01-03 9:29 ` voidlinux-github
2020-01-03 11:51 ` voidlinux-github
2020-01-03 12:07 ` voidlinux-github
2020-01-03 12:58 ` voidlinux-github
2020-01-03 13:12 ` voidlinux-github
2020-01-03 13:16 ` voidlinux-github
2020-01-03 13:21 ` voidlinux-github
2020-01-03 13:24 ` voidlinux-github
2020-01-03 13:28 ` voidlinux-github
2020-01-03 13:29 ` voidlinux-github
2020-01-03 13:30 ` voidlinux-github
2020-01-03 13:31 ` voidlinux-github
2020-01-03 13:32 ` voidlinux-github
2020-01-03 13:34 ` voidlinux-github
2020-01-03 13:35 ` voidlinux-github
2020-01-03 13:36 ` voidlinux-github
2020-01-03 13:38 ` voidlinux-github
2020-01-03 15:26 ` voidlinux-github
2020-01-04 8:02 ` [PR PATCH] [Updated] " voidlinux-github
2020-01-04 8:31 ` voidlinux-github
2020-01-04 10:19 ` [PR PATCH] [Updated] " voidlinux-github
2020-01-04 10:46 ` voidlinux-github
2020-01-04 10:54 ` voidlinux-github
2020-01-04 11:12 ` voidlinux-github
2020-01-04 11:16 ` voidlinux-github
2020-01-04 11:19 ` voidlinux-github
2020-01-04 11:20 ` voidlinux-github
2020-01-04 11:25 ` [PR PATCH] [Updated] " voidlinux-github
2020-01-04 11:32 ` voidlinux-github
2020-01-04 11:39 ` voidlinux-github
2020-01-04 11:46 ` voidlinux-github
2020-01-04 12:03 ` voidlinux-github
2020-01-04 12:29 ` voidlinux-github
2020-01-05 6:49 ` [PR PATCH] [Updated] " voidlinux-github
2020-01-05 7:21 ` voidlinux-github [this message]
2020-01-05 7:25 ` voidlinux-github
2020-01-05 7:32 ` voidlinux-github
2020-01-05 7:54 ` voidlinux-github
2020-01-05 8:44 ` [PR PATCH] [Updated] " voidlinux-github
2020-01-05 8:53 ` voidlinux-github
2020-01-05 9:12 ` voidlinux-github
2020-01-05 9:25 ` voidlinux-github
2020-01-05 9:36 ` voidlinux-github
2020-01-05 9:37 ` voidlinux-github
2020-01-05 9:44 ` [PR PATCH] [Merged]: " voidlinux-github
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200105072123.w_Dn3LsMGDQ6R3Vtpzr4_nChDWtUbCmvIIsNj9T8BAU@z \
--to=voidlinux-github@inbox.vuxu.org \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).