aboutsummaryrefslogtreecommitdiff
path: root/tests/guix-archive.sh
blob: 00b87ff0ac3a69612a755c188bdb28b2c60a879e (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# GNU Guix --- Functional package management for GNU
# Copyright © 2013, 2014, 2015, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
#
# This file is part of GNU Guix.
#
# GNU Guix is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or (at
# your option) any later version.
#
# GNU Guix is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

#
# Test the 'guix archive' command-line utility.
#

guix archive --version

archive="t-archive-$$"
archive_alt="t-archive-alt-$$"
tmpdir="t-archive-dir-$$"
rm -f "$archive" "$archive_alt"
rm -rf "$tmpdir"

trap 'rm -f "$archive" "$archive_alt"; chmod -R +w "$tmpdir"; rm -rf "$tmpdir"' EXIT

guix archive --export guile-bootstrap > "$archive"
guix archive --export guile-bootstrap:out > "$archive_alt"
cmp "$archive" "$archive_alt"

guix archive --export							\
    -e '(@ (gnu packages bootstrap) %bootstrap-guile)' > "$archive_alt"
cmp "$archive" "$archive_alt"

guix archive --export `guix build guile-bootstrap` > "$archive_alt"
cmp "$archive" "$archive_alt"

# Check the exit value upon import.
guix archive --import < "$archive"

! guix archive something-that-does-not-exist

# This one must not be listed as missing.
guix build guile-bootstrap > "$archive"
guix archive --missing < "$archive"
test "`guix archive --missing < "$archive"`" = ""

# Two out of three should be listed as missing.
echo "$NIX_STORE_DIR/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo" >> "$archive"
echo "$NIX_STORE_DIR/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-bar" >> "$archive"
guix archive --missing < "$archive" > "$archive_alt"
echo "$NIX_STORE_DIR/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo" > "$archive"
echo "$NIX_STORE_DIR/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-bar" >> "$archive"
cmp "$archive" "$archive_alt"

# This is not a valid store file name, so an error.
echo something invalid > "$archive"
! guix archive --missing < "$archive"

# Check '--extract'.
guile -c "(use-modules (guix serialization))
  (call-with-output-file \"$archive\"
    (lambda (port)
      (write-file \"$(guix build guile-bootstrap)\" port)))"
guix archive -x "$tmpdir" < "$archive"
test -x "$tmpdir/bin/guile"
test -d "$tmpdir/lib/guile"

# Check '--list'.
guix archive -t < "$archive" | grep "^D /share/guile"
guix archive -t < "$archive" | grep "^x /bin/guile"
guix archive -t < "$archive" | grep "^r /share/guile.*/boot-9\.scm"

! echo foo | guix archive --authorize
m (trealla): Update to 2.55.18. Change-Id: I9e1e67ccc4920fe45e46a4918e73f9b5e4fc47c3 jgart 2024-08-12gnu: trealla: Update to 2.55.17....* gnu/packages/prolog.scm (trealla): Update to 2.55.17. Change-Id: I0ab3a4714a2e34cd6e55583bd09ba71857f6461e jgart 2024-08-12gnu: trealla: Update to 2.55.16....* gnu/packages/prolog.scm (trealla): Update to 2.55.16. Change-Id: I0f21ef880b9b12d69cca0097583b731e4d4dd5f2 jgart 2024-08-05gnu: trealla: Update to 2.55.15....* gnu/packages/prolog.scm (trealla): Update to 2.55.15. Change-Id: Iaacdf45670a8db4180d1a426ea9292b451dece8b jgart 2024-08-01gnu: swi-prolog: Update to 9.3.8....* gnu/packages/prolog.scm (swi-prolog): Update to 9.3.8. Change-Id: Ic922c60db9f686c639ec280996d257ccbf63082a jgart 2024-08-01gnu: trealla: Update to 2.55.14....* gnu/packages/prolog.scm (trealla): Update to 2.55.14. Change-Id: I796a466590d9667934e610614611c8933ea2fdca jgart 2024-08-01gnu: trealla: Update to 2.55.13....* gnu/packages/prolog.scm (trealla): Update to 2.55.13. Change-Id: I32f7c67667250e6972772a5d4bbffbd585d30796 jgart 2024-07-31gnu: trealla: Update to 2.55.12....* gnu/packages/prolog.scm (trealla): Update to 2.55.12. Change-Id: I4a58b72bec88d95e5953390ecf6d558d2534b9de jgart 2024-07-31gnu: trealla: Update to 2.55.11....* gnu/packages/prolog.scm (trealla): Update to 2.55.11. Change-Id: I0254cde4f5b72d39196d92d06839001eb54e68cf jgart 2024-07-26gnu: trealla: Update to 2.55.10....* gnu/packages/prolog.scm (trealla): Update to 2.55.10. Change-Id: I2545a6d3ac5bf740c4ceb9e8bcd33d60707e67b9 jgart 2024-07-26gnu: trealla: Update to 2.55.9....* gnu/packages/prolog.scm (trealla): Update to 2.55.9. Change-Id: I29b5500da8e6acc382397662d4c44cf1c6e1fdf9 jgart 2024-07-26gnu: trealla: Update to 2.55.8....* gnu/packages/prolog.scm (trealla): Update to 2.55.8. Change-Id: Ia938a79d35948d56a97a8933b312916f264c31b7 jgart 2024-07-25gnu: trealla: Update to 2.55.7....* gnu/packages/prolog.scm (trealla): Update to 2.55.7. Change-Id: I6f954cfa3bcf8c6b34ee2f4ca902f3b7ef1f5b38 jgart 2024-07-25gnu: trealla: Update to 2.55.6....* gnu/packages/prolog.scm (trealla): Update to 2.55.6. Change-Id: I258ebe918fb71876fbdda7277d468f863633ef3b jgart 2024-07-24gnu: trealla: Update to 2.55.5....* gnu/packages/prolog.scm (trealla): Update to 2.55.5. Change-Id: Ib9c4da341b4af4cb5ee8d72af4d51b5ecad26be6 jgart 2024-07-24gnu: trealla: Update to 2.55.4....* gnu/packages/prolog.scm (trealla): Update to 2.55.4. Change-Id: I6e684cf6ddd03d05910a8de6719fad767105a5c1 jgart 2024-07-24gnu: trealla: Update to 2.55.3....* gnu/packages/prolog.scm (trealla): Update to 2.55.3. Change-Id: Idf943e2bfc9213ed2bac51cb73d087a64a7b7eec jgart 2024-07-24gnu: trealla: Update to 2.55.2....* gnu/packages/prolog.scm (trealla): Update to 2.55.2. Change-Id: I61d057db57efc30f3a957d1345f86d7b8857965f jgart 2024-07-24gnu: trealla: Update to 2.55.1....* gnu/packages/prolog.scm (trealla): Update to 2.55.1. Change-Id: Ib3888d69aa7fa38c03d171a624500ed28098f031 jgart 2024-07-24gnu: trealla: Update to 2.55.0....* gnu/packages/prolog.scm (trealla): Update to 2.55.0. Change-Id: Ie3bdd311afae7e975ce495594a35ac20a708bb09 jgart 2024-07-24gnu: trealla: Update to 2.54.6....* gnu/packages/prolog.scm (trealla): Update to 2.54.6. Change-Id: I665c518f29bd6df3c9556209453a8638e471a197 jgart 2024-07-18gnu: trealla: Update to 2.54.5....* gnu/packages/prolog.scm (trealla): Update to 2.54.5. Change-Id: Ie0495ddcc1f82298cb4be9adec6dc92e7b0fa175 jgart 2024-07-13gnu: trealla: Update to 2.54.3....* gnu/packages/prolog.scm (trealla): Update to 2.54.3. Change-Id: Iacaca2720ae4a457c570ebcd13be0260c81aa691 jgart 2024-07-11gnu: trealla: Update to 2.53.48....* gnu/packages/prolog.scm (trealla): Update to 2.53.48. Change-Id: I2544e65003880fa5ec6d70a8ba814bb88722c3c9 jgart 2024-07-09gnu: trealla: Update to 2.53.47....* gnu/packages/prolog.scm (trealla): Update to 2.53.47. Change-Id: Ide1766e92cc2ee0ec435f02db11bcd4c73fc3642 jgart 2024-07-05 gnu: trealla: Update to 2.53.37....* gnu/packages/prolog.scm (trealla): Update to 2.53.37. Change-Id: Iea845c85fc4397223a3ed783ab4492928fd9473b Signed-off-by: jgart <jgart@dismail.de> jgart 2024-06-29gnu: trealla: update to 2.53.10....* gnu/packages/prolog.scm (trealla): Update to 2.53.10. Change-Id: I6ce5bfc95faa5453d6cdb8a3b03a3f4b21241193 jgart 2024-06-24gnu: trealla: update to 2.53.2....* gnu/packages/prolog.scm (trealla): Update to 2.53.2. Change-Id: I6ce5bfc95faa5453d6cdb8a3b03a3f4b21241193 jgart 2024-06-22gnu: trealla: update to 2.52.40....* gnu/packages/prolog.scm (trealla): Update to 2.52.40. Change-Id: I746255bf4709d0ee5dc8ac40edcf566f07cbb413 jgart 2024-06-19gnu: logtalk: Update to 3.80.0....* gnu/packages/prolog.scm (logtalk): Update to 3.80.0. Change-Id: I1ad9cd723413d44bc987bb961dd94e137dbb77eb Signed-off-by: jgart <jgart@dismail.de> 宋文武 2024-06-19gnu: trealla: update to 2.52.35....* gnu/packages/prolog.scm (trealla): Update to 2.52.35. Change-Id: I5710c3d617aa85564533efeb8944f49aab4eee8e jgart 2024-06-17gnu: trealla: Only build with valgrind when supported....* gnu/packages/prolog.scm (trealla)[native-inputs]: Remove git. Only add valgrind when on supported platforms. [arguments]: When building without valgrind adjust the test-target to run the test suite which doesn't expect valgrind present. Change-Id: Ib2a1a4fd5eace98d4c9eba7e55663fe0ab9daa73 Efraim Flashner 2024-06-16gnu: Add trealla....* gnu/packages/prolog.scm (trealla): New variable. Change-Id: I079e6dc367f207fc51dacf684b73fa55c1e0ece7 Signed-off-by: jgart <jgart@dismail.de> jgart 2024-03-23gnu: Add logtalk....* gnu/packages/prolog.scm (logtalk): New package. Change-Id: I99e04e70b32c498b5da1f094752279e4668f3865 宋文武