* [PR PATCH] xbps-src: common: wrap which and tar
@ 2022-04-03 11:13 sgn
2022-04-03 15:48 ` leahneukirchen
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: sgn @ 2022-04-03 11:13 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1246 bytes --]
There is a new pull request by sgn against master on the void-packages repository
https://github.com/sgn/void-packages wrap-which-and-tar
https://github.com/void-linux/void-packages/pull/36498
xbps-src: common: wrap which and tar
<!-- 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 [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-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/36498.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wrap-which-and-tar-36498.patch --]
[-- Type: text/x-diff, Size: 2919 bytes --]
From e6a3df70ad46113b75ee6610fc3d6ad5461e6e80 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: Sun, 3 Apr 2022 18:08:47 +0700
Subject: [PATCH 1/3] hooks: also wrap scripts in pre-check
---
common/hooks/pre-check/02-script-wrapper.sh | 1 +
1 file changed, 1 insertion(+)
create mode 120000 common/hooks/pre-check/02-script-wrapper.sh
diff --git a/common/hooks/pre-check/02-script-wrapper.sh b/common/hooks/pre-check/02-script-wrapper.sh
new file mode 120000
index 000000000000..b637ffb30df8
--- /dev/null
+++ b/common/hooks/pre-check/02-script-wrapper.sh
@@ -0,0 +1 @@
+../pre-configure/02-script-wrapper.sh
\ No newline at end of file
From 94c9113cf882b64cc4153543e5b3ef3f9f8740c4 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: Sun, 3 Apr 2022 18:09:59 +0700
Subject: [PATCH 2/3] script-wrappers: provide naive implementation of which
---
.../hooks/pre-configure/02-script-wrapper.sh | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/common/hooks/pre-configure/02-script-wrapper.sh b/common/hooks/pre-configure/02-script-wrapper.sh
index 09c796001ea3..3eb7c645db1d 100644
--- a/common/hooks/pre-configure/02-script-wrapper.sh
+++ b/common/hooks/pre-configure/02-script-wrapper.sh
@@ -154,6 +154,23 @@ install_wrappers() {
done
}
+install_which() {
+ if ! command -v which >/dev/null 2>&1; then
+ cat >>"${XBPS_WRAPPERDIR}/which" <<-'_EOF'
+ #!/bin/sh
+ ret=0
+ while test $# != 0; do
+ case "$1" in
+ -*) ;;
+ *) command -v "$1" || ret=1 ;;
+ esac
+ shift
+ done
+ exit "$ret"
+ _EOF
+ fi
+}
+
install_cross_wrappers() {
local fname prefix
@@ -188,6 +205,7 @@ hook() {
export PATH="$XBPS_WRAPPERDIR:$PATH"
install_wrappers
+ install_which
[ -z "$CROSS_BUILD" ] && return 0
From 6d2cca7d2e08e397c6ef9662e8cec96ee74ef088 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: Sun, 3 Apr 2022 18:11:16 +0700
Subject: [PATCH 3/3] script-wrapper: use bsdtar as tar if tar isn't provided
---
common/hooks/pre-configure/02-script-wrapper.sh | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/common/hooks/pre-configure/02-script-wrapper.sh b/common/hooks/pre-configure/02-script-wrapper.sh
index 3eb7c645db1d..a9767e5fa07d 100644
--- a/common/hooks/pre-configure/02-script-wrapper.sh
+++ b/common/hooks/pre-configure/02-script-wrapper.sh
@@ -171,6 +171,15 @@ install_which() {
fi
}
+install_tar() {
+ if ! command -v tar >/dev/null 2>&1; then
+ cat >>"${XBPS_WRAPPERDIR}/tar" <<-'_EOF'
+ #!/bin/sh
+ bsdtar "$@"
+ _EOF
+ fi
+}
+
install_cross_wrappers() {
local fname prefix
@@ -206,6 +215,7 @@ hook() {
install_wrappers
install_which
+ install_tar
[ -z "$CROSS_BUILD" ] && return 0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: xbps-src: common: wrap which and tar
2022-04-03 11:13 [PR PATCH] xbps-src: common: wrap which and tar sgn
@ 2022-04-03 15:48 ` leahneukirchen
2022-04-07 16:24 ` Piraty
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: leahneukirchen @ 2022-04-03 15:48 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 274 bytes --]
New comment by leahneukirchen on void-packages repository
https://github.com/void-linux/void-packages/pull/36498#issuecomment-1086895258
Comment:
Wrapping which seems like an unnecessary hack, why not just add it to base-chroot again if we decide too many things need it?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: xbps-src: common: wrap which and tar
2022-04-03 11:13 [PR PATCH] xbps-src: common: wrap which and tar sgn
2022-04-03 15:48 ` leahneukirchen
@ 2022-04-07 16:24 ` Piraty
2022-07-07 2:14 ` github-actions
2022-07-21 2:14 ` [PR PATCH] [Closed]: " github-actions
3 siblings, 0 replies; 5+ messages in thread
From: Piraty @ 2022-04-07 16:24 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 176 bytes --]
New comment by Piraty on void-packages repository
https://github.com/void-linux/void-packages/pull/36498#issuecomment-1091953468
Comment:
https://lwn.net/Articles/874049/ :)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: xbps-src: common: wrap which and tar
2022-04-03 11:13 [PR PATCH] xbps-src: common: wrap which and tar sgn
2022-04-03 15:48 ` leahneukirchen
2022-04-07 16:24 ` Piraty
@ 2022-07-07 2:14 ` github-actions
2022-07-21 2:14 ` [PR PATCH] [Closed]: " github-actions
3 siblings, 0 replies; 5+ messages in thread
From: github-actions @ 2022-07-07 2:14 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
New comment by github-actions[bot] on void-packages repository
https://github.com/void-linux/void-packages/pull/36498#issuecomment-1176964710
Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PR PATCH] [Closed]: xbps-src: common: wrap which and tar
2022-04-03 11:13 [PR PATCH] xbps-src: common: wrap which and tar sgn
` (2 preceding siblings ...)
2022-07-07 2:14 ` github-actions
@ 2022-07-21 2:14 ` github-actions
3 siblings, 0 replies; 5+ messages in thread
From: github-actions @ 2022-07-21 2:14 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1092 bytes --]
There's a closed pull request on the void-packages repository
xbps-src: common: wrap which and tar
https://github.com/void-linux/void-packages/pull/36498
Description:
<!-- 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 [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-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
-->
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-07-21 2:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-03 11:13 [PR PATCH] xbps-src: common: wrap which and tar sgn
2022-04-03 15:48 ` leahneukirchen
2022-04-07 16:24 ` Piraty
2022-07-07 2:14 ` github-actions
2022-07-21 2:14 ` [PR PATCH] [Closed]: " github-actions
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).