From: olafmersmann <olafmersmann@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] shutils/chroot.sh: move homedir to /tmp/fake-home.
Date: Sat, 09 Jan 2021 01:52:02 +0100 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-27779@inbox.vuxu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 558 bytes --]
There is a new pull request by olafmersmann against master on the void-packages repository
https://github.com/olafmersmann/void-packages master
https://github.com/void-linux/void-packages/pull/27779
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/27779.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-27779.patch --]
[-- Type: text/x-diff, Size: 2294 bytes --]
From a11202812449d644db35227b1e012987fd1f3c9f 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] 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}"} \
next reply other threads:[~2021-01-09 0:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-09 0:52 olafmersmann [this message]
2021-01-09 1:01 ` [PR PATCH] [Updated] " olafmersmann
2021-01-09 1:03 ` [PR REVIEW] " ericonr
2021-01-09 1:07 ` [PR PATCH] [Updated] " olafmersmann
2021-01-09 1:07 ` [PR REVIEW] " olafmersmann
2021-01-09 1:08 ` olafmersmann
2021-01-09 1:08 ` ericonr
2021-01-09 23:47 ` [PR PATCH] [Closed]: " olafmersmann
2021-01-09 23:47 ` [PR PATCH] [Updated] " olafmersmann
2021-01-10 8:40 [PR PATCH] " olafmersmann
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-27779@inbox.vuxu.org \
--to=olafmersmann@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).