# GNU Guix --- Functional package management for GNU # Copyright © 2018 Chris Marusich # Copyright © 2018, 2019, 2020, 2022 Ludovic Courtès # # 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 . # # Test the `guix pack' command-line utility. # # A network connection is required to build %bootstrap-coreutils&co, # which is required to run these tests with the --bootstrap option. if ! guile -c '(getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)' 2> /dev/null; then exit 77 fi guix pack --version # Use --no-substitutes because we need to verify we can do this ourselves. GUIX_BUILD_OPTIONS="--no-substitutes" export GUIX_BUILD_OPTIONS test_directory="`mktemp -d`" trap 'chmod -Rf +w "$test_directory"; rm -rf "$test_directory"' EXIT # Reject unsuppoted packages. ! guix pack intelmetool -s armhf-linux -n # Compute the derivation of a pack. drv="`guix pack coreutils -d --no-grafts`" guix gc -R "$drv" | grep "`guix build coreutils -d --no-grafts`" # Compute the derivation of a cross-compiled pack. Make sure it refers to the # cross-compiled package and not to the native package. drv="`guix pack idutils -d --no-grafts --target=arm-linux-gnueabihf`" guix gc -R "$drv" | \ grep "`guix build idutils --target=arm-linux-gnueabihf -d --no-grafts`" ! guix gc -R "$drv" | grep "`guix build idutils -d --no-grafts`" # Build a tarball with no compression. guix pack --compression=none --bootstrap guile-bootstrap # Build a tarball (with compression). Check that '-e' works as well. out1="`guix pack --bootstrap guile-bootstrap`" out2="`guix pack --bootstrap -e '(@ (gnu packages bootstrap) %bootstrap-guile)'`" test -n "$out1" test "$out1" = "$out2" # Test '--root'. guix pack -r "$test_directory/my-guile" --bootstrap guile-bootstrap test "`readlink "$test_directory/my-guile"`" = "$out1" guix gc --list-roots | grep "^$test_directory/my-guile$" rm "$test_directory/my-guile" # Build a tarball with a symlink. the_pack="`guix pack --bootstrap -S /opt/gnu/bin=bin guile-bootstrap`" # Try to extract it. Note: we cannot test whether /opt/gnu/bin/guile itself # exists because /opt/gnu/bin may be an absolute symlink to a store item that # has been GC'd. cd "$test_directory" tar -xf "$the_pack" test -L opt/gnu/bin is_available () { # Use the "type" shell builtin to see if the program is on PATH. type "$1" > /dev/null } if is_availab2016-05-29gnu: pciutils: Add kmod support....Efraim Flashner 2016-05-29gnu: pciutils: Use 'modify-phases'....Efraim Flashner 2016-05-29gnu: pciutils: Update to 3.5.1....Efraim Flashner 2015-09-14gnu: pciutils: Update to 3.3.1....宋文武 2015-03-04gnu: Move 'which' to (gnu packages base)....Ludovic Courtès 2014-09-23Use #:prefix instead of #:renamer with 'symbol-prefix-proc'....Mark H Weaver 2014-05-09gnu: Add pciutils....Ludovic Courtès