From fb08f16c8166bb773df11c1bde92a4b48a67fe28 Mon Sep 17 00:00:00 2001 From: Olaf Mersmann 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 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 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 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 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() {