Github messages for voidlinux
 help / color / mirror / Atom feed
From: sgn <sgn@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] xbps-src: stop invoking chroot-git explicitly 
Date: Wed, 01 May 2024 14:11:03 +0200	[thread overview]
Message-ID: <20240501121103.5EA0222009@inbox.vuxu.org> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-48739@inbox.vuxu.org>

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

There is an updated 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: 2801 bytes --]

From 85092be25087eb436f785057e17d634a91fc9510 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 8c104dfcf4e5ee..f8c21b3b92738d 100755
--- a/xbps-src
+++ b/xbps-src
@@ -568,13 +568,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:$PATH:$XBPS_MASTERDIR/usr/libexec/chroot-git" 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 1e0aec2a1ee40815eb42dff56541e6ac22d956e3 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.45.0, drop chroot-git binary

---
 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..079d25ec0acecb 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.45.0
 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=0aac200bd06476e7df1ff026eb123c6827bc10fe69d2823b4bf2ebebe5953429
 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

  parent reply	other threads:[~2024-05-01 12:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-15 12:05 [PR PATCH] " 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 [this message]
2024-05-02  4:41 ` [PR PATCH] [Merged]: " sgn

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=20240501121103.5EA0222009@inbox.vuxu.org \
    --to=sgn@users.noreply.github.com \
    --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).