* [PR PATCH] shutils/chroot.sh: move homedir to /tmp/fake-home.
@ 2021-01-10 8:40 olafmersmann
2021-01-12 3:43 ` ericonr
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: olafmersmann @ 2021-01-10 8:40 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 564 bytes --]
There is a new pull request by olafmersmann against master on the void-packages repository
https://github.com/olafmersmann/void-packages feat_fake-home
https://github.com/void-linux/void-packages/pull/27804
shutils/chroot.sh: move homedir to /tmp/fake-home.
starship tests fail if /tmp is $HOME because they create files inside /tmp and
compare the shortend path to an expected path. If /tmp is $HOME, starship
contracts it to ~ which does not match the expected value.
A patch file from https://github.com/void-linux/void-packages/pull/27804.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-feat_fake-home-27804.patch --]
[-- Type: text/x-diff, Size: 4842 bytes --]
From fb08f16c8166bb773df11c1bde92a4b48a67fe28 Mon Sep 17 00:00:00 2001
From: Olaf Mersmann <olafm@p-value.net>
Date: Sat, 9 Jan 2021 01:44:35 +0100
Subject: [PATCH 1/5] shutils/chroot.sh: move homedir to /tmp/fake-home.
starship tests fail if /tmp is $HOME because they create files inside
/tmp and compare the shortend path to an expected path. If /tmp is
$HOME, starship contracts it to ~ which does not match the expected
value.
---
common/xbps-src/shutils/chroot.sh | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/common/xbps-src/shutils/chroot.sh b/common/xbps-src/shutils/chroot.sh
index 8646d758549..e4bf4129826 100644
--- a/common/xbps-src/shutils/chroot.sh
+++ b/common/xbps-src/shutils/chroot.sh
@@ -88,7 +88,7 @@ PATH=/void-packages:/usr/bin
exec env -i -- SHELL=/bin/sh PATH="\$PATH" DISTCC_HOSTS="\$XBPS_DISTCC_HOSTS" DISTCC_DIR="/host/distcc" \
${XBPS_ARCH+XBPS_ARCH=$XBPS_ARCH} ${XBPS_CHECK_PKGS+XBPS_CHECK_PKGS=$XBPS_CHECK_PKGS} \
- CCACHE_DIR="/host/ccache" IN_CHROOT=1 LC_COLLATE=C LANG=en_US.UTF-8 TERM=linux HOME="/tmp" \
+ CCACHE_DIR="/host/ccache" IN_CHROOT=1 LC_COLLATE=C LANG=en_US.UTF-8 TERM=linux HOME="/tmp/fake-home" \
PS1="[\u@$XBPS_MASTERDIR \W]$ " /bin/bash +h
_EOF
@@ -119,7 +119,9 @@ chroot_prepare() {
# Copy /etc/passwd and /etc/group from base-files.
cp -f $XBPS_SRCPKGDIR/base-files/files/passwd $XBPS_MASTERDIR/etc
- echo "$(whoami):x:$(id -u):$(id -g):$(whoami) user:/tmp:/bin/xbps-shell" \
+ mkdir -p $XBPS_MASTERDIR/tmp/fake-home
+ chown $(id -u):$(id -g) $XBPS_MASTERDIR/tmp/fake-home
+ echo "$(whoami):x:$(id -u):$(id -g):$(whoami) user:/tmp/fake-home:/bin/xbps-shell" \
>> $XBPS_MASTERDIR/etc/passwd
cp -f $XBPS_SRCPKGDIR/base-files/files/group $XBPS_MASTERDIR/etc
echo "$(whoami):x:$(id -g):" >> $XBPS_MASTERDIR/etc/group
@@ -166,7 +168,7 @@ chroot_handler() {
rv=$?
else
env -i -- PATH="/usr/bin:$PATH" SHELL=/bin/sh \
- HOME=/tmp IN_CHROOT=1 LC_COLLATE=C LANG=en_US.UTF-8 \
+ HOME=/tmp/fake-home IN_CHROOT=1 LC_COLLATE=C LANG=en_US.UTF-8 \
${HTTP_PROXY:+HTTP_PROXY="${HTTP_PROXY}"} \
${HTTPS_PROXY:+HTTPS_PROXY="${HTTPS_PROXY}"} \
${FTP_PROXY:+FTP_PROXY="${FTP_PROXY}"} \
From 272a47b3b02b40fdd066122dcf380d1001385b0a Mon Sep 17 00:00:00 2001
From: Olaf Mersmann <olafm@p-value.net>
Date: Sat, 9 Jan 2021 01:58:12 +0100
Subject: [PATCH 2/5] passmenu: simplify do_check.
---
srcpkgs/pass/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/pass/template b/srcpkgs/pass/template
index 33f0811c76d..82fae4d661f 100644
--- a/srcpkgs/pass/template
+++ b/srcpkgs/pass/template
@@ -16,7 +16,7 @@ checksum=2b6c65846ebace9a15a118503dcd31b6440949a30d3b5291dfb5b1615b99a3f4
do_check() {
mkdir -p fake-home
- HOME=$(pwd)/fake-home make test
+ make test
}
passmenu_package() {
From 32761c1826bd702067776eb3e9c3019d9fcb289a Mon Sep 17 00:00:00 2001
From: Olaf Mersmann <olafm@p-value.net>
Date: Sat, 9 Jan 2021 01:59:23 +0100
Subject: [PATCH 3/5] pygtk: simplify do_check.
---
srcpkgs/pygtk/template | 3 ---
1 file changed, 3 deletions(-)
diff --git a/srcpkgs/pygtk/template b/srcpkgs/pygtk/template
index 41554b81763..e205ca332fc 100644
--- a/srcpkgs/pygtk/template
+++ b/srcpkgs/pygtk/template
@@ -28,10 +28,7 @@ pre_configure() {
}
do_check() {
- export HOME="$(mktemp -d)"
- mkdir -p "$HOME/.local/share"
xvfb-run make check
- rm -r "$HOME"
}
post_install() {
From b6fb41d74027409f5297fc2f4459b120c53f19c4 Mon Sep 17 00:00:00 2001
From: Olaf Mersmann <olafm@p-value.net>
Date: Sat, 9 Jan 2021 02:06:59 +0100
Subject: [PATCH 4/5] pass: simplify do_check.
---
srcpkgs/pass/template | 1 -
1 file changed, 1 deletion(-)
diff --git a/srcpkgs/pass/template b/srcpkgs/pass/template
index 82fae4d661f..57493f0862c 100644
--- a/srcpkgs/pass/template
+++ b/srcpkgs/pass/template
@@ -15,7 +15,6 @@ distfiles="https://git.zx2c4.com/password-store/snapshot/password-store-${versio
checksum=2b6c65846ebace9a15a118503dcd31b6440949a30d3b5291dfb5b1615b99a3f4
do_check() {
- mkdir -p fake-home
make test
}
From 6c70e8554f7a6eafe2292ce7e7f57dfcc9219dea Mon Sep 17 00:00:00 2001
From: Olaf Mersmann <olafm@p-value.net>
Date: Sat, 9 Jan 2021 01:56:44 +0100
Subject: [PATCH 5/5] starship: cleanup do_check.
---
srcpkgs/starship/template | 4 ----
1 file changed, 4 deletions(-)
diff --git a/srcpkgs/starship/template b/srcpkgs/starship/template
index 0eae193aece..cdf8bcc97dd 100644
--- a/srcpkgs/starship/template
+++ b/srcpkgs/starship/template
@@ -22,11 +22,7 @@ post_build() {
}
do_check() {
- mkdir -p fake-home
- local OLDHOME=$HOME
- export HOME=$(pwd)/fake-home
cargo test -q --release --target ${RUST_TARGET}
- export HOME=$OLDHOME
}
post_install() {
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: shutils/chroot.sh: move homedir to /tmp/fake-home.
2021-01-10 8:40 [PR PATCH] shutils/chroot.sh: move homedir to /tmp/fake-home olafmersmann
@ 2021-01-12 3:43 ` ericonr
2022-05-02 2:16 ` github-actions
2022-05-17 2:13 ` [PR PATCH] [Closed]: " github-actions
2 siblings, 0 replies; 5+ messages in thread
From: ericonr @ 2021-01-12 3:43 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 171 bytes --]
New comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/27804#issuecomment-758375725
Comment:
you seem to have test failures
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: shutils/chroot.sh: move homedir to /tmp/fake-home.
2021-01-10 8:40 [PR PATCH] shutils/chroot.sh: move homedir to /tmp/fake-home olafmersmann
2021-01-12 3:43 ` ericonr
@ 2022-05-02 2:16 ` github-actions
2022-05-17 2:13 ` [PR PATCH] [Closed]: " github-actions
2 siblings, 0 replies; 5+ messages in thread
From: github-actions @ 2022-05-02 2:16 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/27804#issuecomment-1114433207
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]: shutils/chroot.sh: move homedir to /tmp/fake-home.
2021-01-10 8:40 [PR PATCH] shutils/chroot.sh: move homedir to /tmp/fake-home olafmersmann
2021-01-12 3:43 ` ericonr
2022-05-02 2:16 ` github-actions
@ 2022-05-17 2:13 ` github-actions
2 siblings, 0 replies; 5+ messages in thread
From: github-actions @ 2022-05-17 2:13 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 396 bytes --]
There's a closed pull request on the void-packages repository
shutils/chroot.sh: move homedir to /tmp/fake-home.
https://github.com/void-linux/void-packages/pull/27804
Description:
starship tests fail if /tmp is $HOME because they create files inside /tmp and
compare the shortend path to an expected path. If /tmp is $HOME, starship
contracts it to ~ which does not match the expected value.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PR PATCH] [Closed]: shutils/chroot.sh: move homedir to /tmp/fake-home.
2021-01-09 0:52 [PR PATCH] " olafmersmann
@ 2021-01-09 23:47 ` olafmersmann
0 siblings, 0 replies; 5+ messages in thread
From: olafmersmann @ 2021-01-09 23:47 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 398 bytes --]
There's a closed pull request on the void-packages repository
shutils/chroot.sh: move homedir to /tmp/fake-home.
https://github.com/void-linux/void-packages/pull/27779
Description:
starship tests fail if /tmp is $HOME because they create files inside
/tmp and compare the shortend path to an expected path. If /tmp is
$HOME, starship contracts it to ~ which does not match the expected
value.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-05-17 2:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-10 8:40 [PR PATCH] shutils/chroot.sh: move homedir to /tmp/fake-home olafmersmann
2021-01-12 3:43 ` ericonr
2022-05-02 2:16 ` github-actions
2022-05-17 2:13 ` [PR PATCH] [Closed]: " github-actions
-- strict thread matches above, loose matches on Subject: below --
2021-01-09 0:52 [PR PATCH] " olafmersmann
2021-01-09 23:47 ` [PR PATCH] [Closed]: " olafmersmann
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).