| 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 | if ! guile -c '(getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)' 2> /dev/null; then
|
| 27 | exit 77
|
| 28 | fi
|
| 29 |
|
| 30 | guix pack --version
|
| 31 |
|
| 32 | |
| 33 | |
| 34 | |
| 35 | GUIX_BUILD_OPTIONS="--no-substitutes --no-grafts"
|
| 36 | export GUIX_BUILD_OPTIONS
|
| 37 |
|
| 38 | test_directory="`mktemp -d`"
|
| 39 | trap 'chmod -Rf +w "$test_directory"; rm -rf "$test_directory"' EXIT
|
| 40 |
|
| 41 | |
| 42 | guix pack intelmetool -s armhf-linux -n && false
|
| 43 |
|
| 44 | |
| 45 | drv="`guix pack coreutils -d --no-grafts`"
|
| 46 | guix gc -R "$drv" | grep "`guix build coreutils -d --no-grafts`"
|
| 47 |
|
| 48 | |
| 49 | |
| 50 | drv="`guix pack idutils -d --no-grafts --target=arm-linux-gnueabihf`"
|
| 51 | guix gc -R "$drv" | \
|
| 52 | grep "`guix build idutils --target=arm-linux-gnueabihf -d --no-grafts`"
|
| 53 | guix gc -R "$drv" | grep "`guix build idutils -d --no-grafts`" && false
|
| 54 |
|
| 55 | |
| 56 | guix pack --compression=none --bootstrap guile-bootstrap
|
| 57 |
|
| 58 | |
| 59 | out1="`guix pack --bootstrap guile-bootstrap`"
|
| 60 | out2="`guix pack --bootstrap -e '(@ (gnu packages bootstrap) %bootstrap-guile)'`"
|
| 61 | test -n "$out1"
|
| 62 | test "$out1" = "$out2"
|
| 63 |
|
| 64 | |
| 65 | guix pack -r "$test_directory/my-guile" --bootstrap guile-bootstrap
|
| 66 | test "`readlink "$test_directory/my-guile"`" = "$out1"
|
| 67 | guix gc --list-roots | grep "^$test_directory/my-guile$"
|
| 68 | rm "$test_directory/my-guile"
|
| 69 |
|
| 70 | |
| 71 | the_pack="`guix pack --bootstrap -S /opt/gnu/bin=bin guile-bootstrap`"
|
| 72 |
|
| 73 | |
| 74 | |
| 75 | |
| 76 | cd "$test_directory"
|
| 77 | tar -xf "$the_pack"
|
| 78 | test -L opt/gnu/bin
|
| 79 |
|
| 80 | is_available () {
|
| 81 | |
| 82 | type "$1" > /dev/null
|
| 83 | }
|
| 84 |
|
| 85 | if is_available chroot && is_available unshare && unshare -r true; then
|
| 86 | |
| 87 | unshare -r chroot . /opt/gnu/bin/guile --version
|
| 88 | else
|
| 89 | echo "warning: skipped some verification because chroot or unshare is unavailable" >&2
|
| 90 | fi
|
| 91 | cd -
|
| 92 |
|
| 93 | |
| 94 | |
| 95 | |
| 96 | |
| 97 | |
| 98 | |
| 99 | |
| 100 | |
| 101 | |
| 102 | |
| 103 |
|
| 104 | |
| 105 | guix pack --dry-run --bootstrap -f docker guile-bootstrap
|
| 106 |
|
| 107 | |
| 108 | guix pack --dry-run --bootstrap -f docker -S /opt/gnu= guile-bootstrap
|
| 109 |
|
| 110 | |
| 111 | |
| 112 | guix pack --dry-run --bootstrap --target=arm-linux-gnueabihf coreutils
|
| 113 |
|
| 114 | |
| 115 | |
| 116 | guix pack -R --dry-run --bootstrap -S /mybin=bin guile-bootstrap
|
| 117 |
|
| 118 | |
| 119 | chmod -Rf +w "$test_directory"; rm -r "$test_directory"
|
| 120 | mkdir -p "$test_directory" -m 755
|
| 121 | drv1="`guix pack --no-grafts -n guile 2>&1 | grep pack.*\.drv`"
|
| 122 | drv2="`guix pack --no-grafts -n --with-source=guile=$test_directory guile 2>&1 | grep pack.*\.drv`"
|
| 123 | test -n "$drv1"
|
| 124 | test "$drv1" != "$drv2"
|
| 125 |
|
| 126 | |
| 127 | cat > "$test_directory/manifest1.scm" <<EOF
|
| 128 | (specifications->manifest '("guile"))
|
| 129 | EOF
|
| 130 | cat > "$test_directory/manifest2.scm" <<EOF
|
| 131 | (specifications->manifest '("emacs"))
|
| 132 | EOF
|
| 133 | drv="`guix pack --no-grafts -d -m "$test_directory/manifest1.scm" -m "$test_directory/manifest2.scm"`"
|
| 134 | guix gc -R "$drv" | grep `guix build guile -d --no-grafts`
|
| 135 | guix gc -R "$drv" | grep `guix build emacs -d --no-grafts`
|