Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] xbps-src: allow to run without git
@ 2021-02-22 20:26 Chocimier
  2021-02-23 17:34 ` [PR PATCH] [Merged]: " Chocimier
  0 siblings, 1 reply; 2+ messages in thread
From: Chocimier @ 2021-02-22 20:26 UTC (permalink / raw)
  To: ml

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

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

https://github.com/Chocimier/void-packages-org no-git
https://github.com/void-linux/void-packages/pull/28985

xbps-src: allow to run without git
This makes possible to binary-bootstrap and build packages
with only base-system using tarball of void-packages.

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

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

From e91c74b3f6e8ffc21d5b1c20b11760753ba44b30 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Mon, 22 Feb 2021 21:24:47 +0100
Subject: [PATCH 1/2] README.md: requirements for binary-bootstrap are modest

---
 README.md | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 17111d471b7..315e6858bfa 100644
--- a/README.md
+++ b/README.md
@@ -36,12 +36,15 @@ See [Contributing](./CONTRIBUTING.md) for a general overview of how to contribut
 
 - GNU bash
 - xbps >= 0.56
+- git(1) - unless configured to not, see etc/defaults.conf
+- common POSIX utilities included by default in almost all UNIX systems
 - curl(1) - required by `xbps-src update-check`
+
+For bootstrapping additionally:
 - flock(1) - util-linux
 - bsdtar or GNU tar (in that order of preference)
 - install(1) - GNU coreutils
 - objcopy(1), objdump(1), strip(1): binutils
-- other common POSIX utilities included by default in almost all UNIX systems.
 
 `xbps-src` requires a utility to chroot and bind mount existing directories
 into a `masterdir` that is used as its main `chroot` directory. `xbps-src` supports

From a6316128c53b5f9195dd7e4c23eb71cd463dfe7e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Mon, 22 Feb 2021 21:24:47 +0100
Subject: [PATCH 2/2] xbps-src: allow to run without git

This makes possible to binary-bootstrap and build packages
with only base-system using tarball of void-packages.
---
 common/environment/setup/git.sh | 4 +++-
 etc/defaults.conf               | 2 +-
 xbps-src                        | 2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/common/environment/setup/git.sh b/common/environment/setup/git.sh
index 13e5178ccff..4b352fe5387 100644
--- a/common/environment/setup/git.sh
+++ b/common/environment/setup/git.sh
@@ -2,7 +2,9 @@
 # only run this, if SOURCE_DATE_EPOCH isn't set.
 
 if [ -z "$XBPS_GIT_CMD" ]; then
-	msg_error "BUG: environment/setup: XBPS_GIT_CMD is not set\n"
+	if [ -z "$XBPS_USE_BUILD_MTIME" ] || [ -n "$XBPS_USE_GIT_REVS" ]; then
+		msg_error "BUG: environment/setup: XBPS_GIT_CMD is not set\n"
+	fi
 fi
 
 if [ -n "$XBPS_USE_BUILD_MTIME" ]; then
diff --git a/etc/defaults.conf b/etc/defaults.conf
index bc93457747f..133449a150d 100644
--- a/etc/defaults.conf
+++ b/etc/defaults.conf
@@ -132,7 +132,7 @@ XBPS_SUCMD="sudo /bin/sh -c"
 
 # [OPTIONAL]
 # Enable to use the standard mtime of files. Otherwise it will be rewritten to
-# the HEAD commit time.
+# the HEAD commit time. Requires git when disabled.
 #
 #XBPS_USE_BUILD_MTIME=yes
 
diff --git a/xbps-src b/xbps-src
index ecd389b93e1..a488ed3f849 100755
--- a/xbps-src
+++ b/xbps-src
@@ -513,7 +513,7 @@ 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)
-else
+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
 fi

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

* Re: [PR PATCH] [Merged]: xbps-src: allow to run without git
  2021-02-22 20:26 [PR PATCH] xbps-src: allow to run without git Chocimier
@ 2021-02-23 17:34 ` Chocimier
  0 siblings, 0 replies; 2+ messages in thread
From: Chocimier @ 2021-02-23 17:34 UTC (permalink / raw)
  To: ml

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

There's a merged pull request on the void-packages repository

xbps-src: allow to run without git
https://github.com/void-linux/void-packages/pull/28985

Description:
This makes possible to binary-bootstrap and build packages
with only base-system using tarball of void-packages.

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

end of thread, other threads:[~2021-02-23 17:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-22 20:26 [PR PATCH] xbps-src: allow to run without git Chocimier
2021-02-23 17:34 ` [PR PATCH] [Merged]: " Chocimier

Github messages for voidlinux

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/voidlinux-github

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 voidlinux-github voidlinux-github/ http://inbox.vuxu.org/voidlinux-github \
		voidlinux-github@inbox.vuxu.org
	public-inbox-index voidlinux-github

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.github.voidlinux


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git