aboutsummaryrefslogtreecommitdiff
# GNU Guix --- Functional package management for GNU
# Copyright © 2018, 2019 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 pack --localstatedir' command-line utility.
#

guix pack --version

# 'guix pack --localstatedir' produces derivations that depend on
# guile-sqlite3 and guile-gcrypt.  To make that relatively inexpensive, run
# the test in the user's global store if possible, on the grounds that
# binaries may already be there or can be built or downloaded inexpensively.

storedir="`guile -c '(use-modules (guix config))(display %storedir)'`"
localstatedir="`guile -c '(use-modules (guix config))(display %localstatedir)'`"
NIX_STORE_DIR="$storedir"
GUIX_DAEMON_SOCKET="$localstatedir/guix/daemon-socket/socket"
export NIX_STORE_DIR GUIX_DAEMON_SOCKET

if ! guile -c '(use-modules (guix)) (exit (false-if-exception (open-connection)))'
then
    exit 77
fi

# Build a tarball with '--localstatedir'
the_pack="`guix pack -C none --localstatedir --profile-name=current-guix \
            guile-bootstrap`"
test_directory="`mktemp -d`"
trap 'chmod -Rf +w "$test_directory"; rm -rf "$test_directory"' EXIT

cd "$test_directory"
tar -xf "$the_pack"

profile="`find -name current-guix`"
test "`readlink $profile`" = "current-guix-1-link"
test -s "`dirname $profile`/../../../db/db.sqlite"
test -x ".`guix build guile-bootstrap`/bin/guile"
cd -

# Make sure the store database is not completely bogus.
guile -c "(use-modules (sqlite3) (guix config) (ice-9 match))

  (define db
    (sqlite-open (string-append \"$test_directory\"
                                %localstatedir
                               \"/guix/db/db.sqlite\")
                 SQLITE_OPEN_READONLY))

  (define stmt
    (sqlite-prepare db \"SELECT * FROM ValidPaths;\"))

  (match (sqlite-fold cons '() stmt)
    ((#(ids paths hashes times derivers sizes) ...)
     (exit (member \"`guix build guile-bootstrap`\" paths))))"
='/guix/commit/gnu/packages/dns.scm?id=d3413b6f87f36758fa270eac694f69c79dde3867'>gnu: knot: Fix typo....* gnu/packages/dns.scm (knot)[arguments]: Fix a typo in the #:configure-flags. Tobias Geerinckx-Rice 2020-10-06gnu: knot: Fix test failure on aarch64-linux....* gnu/packages/dns.scm (knot)[source]: Apply patch from upstream that helps ensure the "test_net_shortwrite" test suite can complete regardless of platform or configuration. * gnu/packages/patches/knot-test_net_shortwrite-ensure-connection.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr> Simon South 2020-10-06gnu: knot: Build & install the Info manual....* gnu/packages/dns.scm (knot)[arguments]: Add "build-info" and "install-info" phases. [native-inputs]: Add texinfo and python-sphinx. Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr> Simon South 2020-10-06gnu: knot: Enable DNS-over-HTTPS support in kdig....* gnu/packages/dns.scm (knot)[inputs]: Add nghttp2:lib. Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr> Simon South 2020-10-05gnu: knot: Remove obsolete configure flag....* gnu/packages/dns.scm (knot)[arguments]: Remove unused ‘--with-bash-completions’ configure flag. Tobias Geerinckx-Rice 2020-10-05gnu: knot: Snip more pregenerated nonsource....ypbody.c is generated from ypbody.rl by update-parser.sh, both of which are missing from the release tarball. Rather than add another git file to native-inputs, we now build from git and remove the generated files. This follows up on commit 2b73e50c31a61b5dcef35a1e4b9484d9dbcb0fbc, now that everyone's finished building it. * gnu/packages/dns.scm (knot)[source]: Use GIT-FETCH and GIT-FILE-NAME. [arguments]: Add ‘--enable-fast-parser’ to #:configure-flags. Invoke the in-tree update-parser.sh. [native-inputs]: Remove separate update-parser.sh origin. Add autoconf, automake, and libtool. Tobias Geerinckx-Rice 2020-10-05gnu: knot: Build the zone parsers from Ragel source....* gnu/packages/dns.scm (knot)[source]: Add snippet to remove upstream's pregenerated ‘sources’ [arguments]: Add an ‘update-parser’ phase. [native-inputs]: Add ragel and upstream update-parser.sh. Tobias Geerinckx-Rice