From 8e2b53fa4df5c44370f716c8d6c7b7e947fba847 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Tue, 13 Feb 2024 22:18:26 +0700 Subject: [PATCH 1/2] xbps-src: stop invoking chroot-git explicitly Use /usr/libexec/chroot-git/git instead. Honestly, I think xbps-src stop using chroot-git directly for a while, since xbps-src invoke git to retrieve metadata outside of chroot in order to support git's worktree. --- xbps-src | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/xbps-src b/xbps-src index 77695b9f510d34..d4e767b7a03c8a 100755 --- a/xbps-src +++ b/xbps-src @@ -552,13 +552,14 @@ if [ -d "$XBPS_MASTERDIR" -a ! -w "$XBPS_MASTERDIR" ]; then fi # Try using chroot-git then git from the host system -if command -v chroot-git &>/dev/null; then - export XBPS_GIT_CMD=$(command -v chroot-git) -elif command -v git &>/dev/null; then - export XBPS_GIT_CMD=$(command -v git) +XBPS_GIT_CMD="$(PATH="/usr/libexec/chroot-git:$XBPS_MASTERDIR/usr/libexec/chroot-git:$PATH" command -v git 2>/dev/null)" +if [ -n "$XBPS_GIT_CMD" ]; then + export XBPS_GIT_CMD elif [ -z "$XBPS_USE_BUILD_MTIME" ] || [ "$XBPS_USE_GIT_REVS" ]; then echo "neither chroot-git or git are available in your system!" 1>&2 exit 1 +else + unset XBPS_GIT_CMD fi if [ -n "$XBPS_HOSTDIR" ]; then From c124896a38c53ef0bdc57c91543b28fb23c855ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Tue, 13 Feb 2024 22:20:37 +0700 Subject: [PATCH 2/2] chroot-git: update to 2.43.2, drop chroot-git binary Use /usr/libexec/chroot-git/git instead. Honestly, I think xbps-src stop using chroot-git directly for a while, since xbps-src invoke git to retrieve metadata outside of chroot in order to support git's worktree. --- srcpkgs/chroot-git/template | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/srcpkgs/chroot-git/template b/srcpkgs/chroot-git/template index 988583000aaef2..0e7b66c8a7d228 100644 --- a/srcpkgs/chroot-git/template +++ b/srcpkgs/chroot-git/template @@ -1,6 +1,6 @@ # Template file for 'chroot-git' pkgname=chroot-git -version=2.43.1 +version=2.43.2 revision=1 bootstrap=yes makedepends="zlib-devel" @@ -9,7 +9,7 @@ maintainer="Đoàn Trần Công Danh " license="GPL-2.0-only" homepage="https://git-scm.com/" distfiles="https://www.kernel.org/pub/software/scm/git/git-${version}.tar.xz" -checksum=2234f37b453ff8e4672c21ad40d41cc7393c9a8dcdfe640bec7ac5b5358f30d2 +checksum=f612c1abc63557d50ad3849863fc9109670139fc9901e574460ec76e0511adb9 repository=bootstrap if [ "$CHROOT_READY" ]; then @@ -66,9 +66,7 @@ do_check() { } do_install() { - vmkdir usr/bin vmkdir usr/libexec/chroot-git - vbin git chroot-git vinstall git 755 usr/libexec/chroot-git ln -s git $DESTDIR/usr/libexec/chroot-git/git-upload-pack ln -s git $DESTDIR/usr/libexec/chroot-git/git-receive-pack