From: Chocimier <Chocimier@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] xbps-src: allow to run without git
Date: Mon, 22 Feb 2021 21:26:22 +0100 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-28985@inbox.vuxu.org> (raw)
[-- 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
next reply other threads:[~2021-02-22 20:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-22 20:26 Chocimier [this message]
2021-02-23 17:34 ` [PR PATCH] [Merged]: " Chocimier
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=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-28985@inbox.vuxu.org \
--to=chocimier@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).