[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/06: pack: Adjust shell tests to read-only tarball root.
From: |
guix-commits |
Subject: |
01/06: pack: Adjust shell tests to read-only tarball root. |
Date: |
Mon, 27 Feb 2023 17:54:36 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 92a0e60a963a54230e400c5c2ae585205489bf35
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Mon Feb 27 23:20:26 2023 +0100
pack: Adjust shell tests to read-only tarball root.
Fixes <https://issues.guix.gnu.org/61853>.
Fixes a regression introduced in
68380db4c40a2ee1156349a87254fd7b1f1a52d5, whereby the tarball's root
entry is now read-only, due to the creation of "profile-directory" in
the store.
* tests/guix-pack.sh: Remove and recreate $test_directory before
transformation option test.
* tests/guix-pack-relocatable.sh: Add "chmod +w $test_directory" lines
before attempts to write to it.
---
tests/guix-pack-relocatable.sh | 6 +++++-
tests/guix-pack.sh | 5 +++--
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/tests/guix-pack-relocatable.sh b/tests/guix-pack-relocatable.sh
index b90bc7f891..46120c9ee6 100644
--- a/tests/guix-pack-relocatable.sh
+++ b/tests/guix-pack-relocatable.sh
@@ -1,5 +1,5 @@
# GNU Guix --- Functional package management for GNU
-# Copyright © 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+# Copyright © 2018, 2019, 2020, 2023 Ludovic Courtès <ludo@gnu.org>
# Copyright © 2020 Eric Bavier <bavier@posteo.net>
#
# This file is part of GNU Guix.
@@ -82,6 +82,7 @@ then
tarball="`guix pack -R -S /Bin=bin sed`"
(cd "$test_directory"; tar xvf "$tarball")
+ chmod +w "$test_directory"
run_without_store "$test_directory/Bin/sed" --version >
"$test_directory/output"
grep 'GNU sed' "$test_directory/output"
@@ -104,6 +105,7 @@ case "`uname -m`" in
tarball="`guix pack -RR -S /Bin=bin sed`"
tar tvf "$tarball" | grep /bin/proot
(cd "$test_directory"; tar xf "$tarball")
+ chmod +w "$test_directory"
run_without_store GUIX_EXECUTION_ENGINE="proot" \
"$test_directory/Bin/sed" --version > "$test_directory/output"
grep 'GNU sed' "$test_directory/output"
@@ -195,6 +197,7 @@ EOF
# Run '/bin/daemon', which forks, then wait for the child, send it SIGHUP
# so that it dumps its view of the store, and make sure the child and
# parent both see the same store contents.
+ chmod +w "$test_directory"
(cd "$test_directory"; run_without_store ./bin/daemon)
wait_for_file "$test_directory/pid"
kill -HUP $(cat "$test_directory/pid")
@@ -241,6 +244,7 @@ cat >"$test_directory/manifest.scm" <<'EOF'
EOF
tarball="`guix pack -RR -S /opt= -m $test_directory/manifest.scm`"
(cd "$test_directory"; tar xvf "$tarball")
+chmod +w "$test_directory"
( export GUIX_PROFILE=$test_directory/opt
. $GUIX_PROFILE/etc/profile
run_without_store "$test_directory/opt/bin/hello" > "$test_directory/output"
)
diff --git a/tests/guix-pack.sh b/tests/guix-pack.sh
index 6fc9e3723b..a13e0ededf 100644
--- a/tests/guix-pack.sh
+++ b/tests/guix-pack.sh
@@ -1,6 +1,6 @@
# GNU Guix --- Functional package management for GNU
# Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
-# Copyright © 2018, 2019, 2020, 2022 Ludovic Courtès <ludo@gnu.org>
+# Copyright © 2018, 2019, 2020, 2022, 2023 Ludovic Courtès <ludo@gnu.org>
#
# This file is part of GNU Guix.
#
@@ -114,7 +114,8 @@ guix pack --dry-run --bootstrap
--target=arm-linux-gnueabihf coreutils
guix pack -R --dry-run --bootstrap -S /mybin=bin guile-bootstrap
# Make sure package transformation options are honored.
-mkdir -p "$test_directory"
+chmod -Rf +w "$test_directory"; rm -r "$test_directory"
+mkdir -p "$test_directory" -m 755
drv1="`guix pack --no-grafts -n guile 2>&1 | grep pack.*\.drv`"
drv2="`guix pack --no-grafts -n --with-source=guile=$test_directory guile 2>&1
| grep pack.*\.drv`"
test -n "$drv1"
- branch master updated (a31225badb -> ff5fbcc19b), guix-commits, 2023/02/27
- 01/06: pack: Adjust shell tests to read-only tarball root.,
guix-commits <=
- 02/06: ui: 'display-hint' quotes extra arguments for Texinfo., guix-commits, 2023/02/27
- 03/06: gnu: hyfetch: Update to 1.4.7., guix-commits, 2023/02/27
- 04/06: gnu: leptonica: Use new package style., guix-commits, 2023/02/27
- 05/06: gnu: leptonica: Update to 1.83.1., guix-commits, 2023/02/27
- 06/06: gnu: Add barectf., guix-commits, 2023/02/27