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))))"
0ee587b6155'>Merge branch 'master' into core-updates...Note: this merge actually changes the 'curl' and 'python-attrs' derivations, as part of solving caf4a7a2770ef4d05a6e18f40d602e51da749ddc and 12964df69a99de6190422c752fef65ef813f3b6b respectively. 4604d43c0e (gnu: gnutls@3.6.16: Fix cross-compilation.) was ignored because it cannot currently be tested. Conflicts: gnu/local.mk gnu/packages/aidc.scm gnu/packages/boost.scm gnu/packages/curl.scm gnu/packages/nettle.scm gnu/packages/networking.scm gnu/packages/python-xyz.scm gnu/packages/tls.scm Marius Bakke 2021-06-14gnu: Rename qtbase to qtbase-5....This change was automated via the following command: $ git ls-files | xargs sed -i 's/,qtbase)/,qtbase-5)/g' $ git ls-files | xargs sed -i 's/inherit qtbase)/inherit qtbase-5)/g' $ git ls-files | xargs sed -i 's/package-version qtbase)/package-version qtbase-5)/g' $ git checkout etc # to clear some spurious changes This is done so the qtbase package can be upgraded to version 6 in the following commit. Maxim Cournoyer 2021-05-22gnu: libical: Update to 3.0.10....* gnu/packages/calendar.scm (libical): Update to 3.0.10. Marius Bakke 2021-05-06gnu: remind: Move Tcl/Tk scripts to separate output....* gnu/packages/calendar.scm (remind)[outputs]: Add "tcl". [arguments]: Add a new 'split-:tcl phase. [inputs]: Add inetutils, tcl, tcllib, and tk. Tobias Geerinckx-Rice 2021-05-06gnu: remind: Run tests....‘No "check" target’ != ‘no tests’. * gnu/packages/calendar.scm (remind)[arguments]: Run tests. Tobias Geerinckx-Rice 2021-05-06gnu: remind: Update to 3.3.6....* gnu/packages/calendar.scm (remind): Update to 3.3.6. Tobias Geerinckx-Rice 2021-05-01gnu: khal: Update to 0.10.3....* gnu/packages/calendar.scm (khal): Update to 0.10.3. Tobias Geerinckx-Rice 2021-03-27gnu: Use 'gtk-doc/stable' in native-inputs of selected packages....* gnu/packages/calendar.scm (libical), gnu/packages/check.scm (umockdev), gnu/packages/fontutils.scm (libraqm), gnu/packages/freedesktop.scm (appstream, farstream, libglib-testing) (udisks, libfprint, libportal), gnu/packages/geo.scm (memphis, osm-gps-map), gnu/packages/glib.scm (template-glib), gnu/packages/gnome.scm (gupnp-igd, libcloudproviders, libgrss, seed) (gtx, dee, zeitgeist, phodav, gssdp, gupnp, gupnp-dlna, gupnp-av, rygel) (libnma, gdl, libnotify, vte-ng, dconf, libxklavier, libsoup, colord) (geoclue, geocode-glib, amtk, grilo, gvfs, gusb, network-manager) (network-manager-applet, gfbgraph, libunique, cheese, libhandy) (gnome-latex, libgda), gnu/packages/gstreamer.scm (orc), gnu/packages/gtk.scm (at-spi2-core, goocanvas), gnu/packages/language.scm (nimf), gnu/packages/networking.scm (libnice), gnu/packages/video.scm (schroedinger), gnu/packages/virtualization.scm (libosinfo), gnu/packages/webkit.scm (wpewebkit, webkitgtk), gnu/packages/xml.scm (libxmlb)[native-inputs]: Replace 'gtk-doc' with 'gtk-doc/stable'. Mark H Weaver 2021-02-16gnu: remind: Update to 3.3.5....* gnu/packages/calendar.scm (remind): Update to 3.3.5. Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Stefan Reichör 2020-11-07Merge branch 'master' into staging... Conflicts: gnu/local.mk gnu/packages/gdb.scm gnu/packages/lisp-xyz.scm gnu/packages/web-browsers.scm Marius Bakke 2020-10-27gnu: khal: Skip the test suite....* gnu/packages/calendar.scm (khal)[arguments]: Disable the test suite. Remove the custom 'check' phase. [native-inputs]: Remove python-pytest, python-pytest-cov, python-freezegun, tzdata-for-tests, and vdirsyncer. Leo Famulari 2020-10-26gnu: khal: Update to 0.10.2....* gnu/packages/calendar.scm (khal): Update to 0.10.2. [source]: Drop upstream patches. [arguments]: Drop substitute* for bug fixed upstream and ignore failing test in 'check. [inputs]: Add missing inputs. Signed-off-by: Leo Famulari <leo@famulari.name> Lars-Dominik Braun 2020-10-19Merge branch 'master' into stagingMarius Bakke 2020-10-19gnu: Add ccal....* gnu/packages/calendar.scm (ccal): New variable. Signed-off-by: Marius Bakke <marius@gnu.org> Peng Mei Yu