Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] xbps-src: stop invoking chroot-git explicitly 
@ 2024-02-15 12:05 sgn
  2024-02-18 14:20 ` sgn
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: sgn @ 2024-02-15 12:05 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1260 bytes --]

There is a new pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages chroot-git-revamp
https://github.com/void-linux/void-packages/pull/48739

xbps-src: stop invoking chroot-git explicitly 
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48739.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-chroot-git-revamp-48739.patch --]
[-- Type: text/x-diff, Size: 3015 bytes --]

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?=
 <congdanhqx@gmail.com>
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?=
 <congdanhqx@gmail.com>
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 <congdanhqx@gmail.com>"
 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-05-02  4:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-15 12:05 [PR PATCH] xbps-src: stop invoking chroot-git explicitly sgn
2024-02-18 14:20 ` sgn
2024-02-20  1:23 ` [PR PATCH] [Updated] " sgn
2024-02-20  1:28 ` sgn
2024-05-01 12:11 ` sgn
2024-05-02  4:41 ` [PR PATCH] [Merged]: " sgn

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).