aboutsummaryrefslogtreecommitdiff
# GNU Guix --- Functional package management for GNU
# Copyright © 2023 Antoine R. Dumont <antoine.romain.dumont@gmail.com>
# Copyright © 2023 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 locate' command-line utility.
#

set -x

RUN_EXPENSIVE_TESTS="${RUN_EXPENSIVE_TESTS:-false}"

tmpdir="guix-index-$$"
# In the following tests, we use two different databases, one for each
# indexation method.
tmpdb_manifests="$tmpdir/manifests/db.sqlite"
tmpdb_store="$tmpdir/store/db.sqlite"
trap 'rm -rf "$tmpdir" "$tmpdb_store" "$tmpdb_manifests"' EXIT

guix locate --version

# Preparing db locations for both indexation methods.
mkdir -p "$(dirname "$tmpdb_manifests")" "$(dirname "$tmpdb_store")"

cmd_manifests="guix locate --database=$tmpdb_manifests --method=manifests"
cmd_store="guix locate --database=$tmpdb_store --method=store"

# Lookup without any db should fail.
guix locate --database="$tmpdb_manifests" guile && false
guix locate --database="$tmpdb_store" guile && false

# Lookup without anything in db should yield no results because the indexer
# didn't stumble upon any profile.
test -z "$(guix locate --database="$tmpdb_manifests" guile)"

# Install a package.
guix package --bootstrap --install guile-bootstrap \
     --profile="$tmpdir/profile"

# Look for 'guile'.
$cmd_manifests --update
$cmd_manifests guile | grep "$(guix build guile-bootstrap)/bin/guile"
$cmd_manifests boot-9.scm | grep ^guile-bootstrap

# Using a glob pattern.
$cmd_manifests -g '*.scm' | grep "^guile-bootstrap.*boot-9"

# Statistics.
$cmd_manifests --stats

if $RUN_EXPENSIVE_TESTS
then
    $cmd_store --update
    $cmd_store guile
    $cmd_store guile | grep "$(guix build guile-bootstrap)/bin/guile"
    $cmd_store boot-9.scm | grep ^guile-bootstrap
fi

# The command below is an error: "no files to search for"...
guix locate && false

# ... but this one is fine.
guix locate --clear
config. Change-Id: I40da8310d597529b4d355e72af9411ba76e434ca Efraim Flashner 2024-08-31gnu: libassuan: Update to 2.5.6....* gnu/packages/gnupg.scm (libassuan): Update to 2.5.6. Change-Id: I8c3a58c088402096db7e9c17d554ab41973d8d74 Maxim Cournoyer 2024-08-31gnu: libgpg-error: Update to 1.47....* gnu/packages/gnupg.scm (libgpg-error): Update to 1.47. Change-Id: I1f947b904eb1f91b44d6c870d19f29a99f068ffd Maxim Cournoyer 2024-08-31gnu: libgpg-error: Update to 1.46....* gnu/packages/gnupg.scm (libgpg-error): Update to 1.46, passing --enable-install-gpg-error-config to ./configure because some packages still uses gpg-error-config (e.g., libassuan 2.5.5) Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Change-Id: I471a3c95a75565f5f4a69e90b40e8aac4fc7c69b Simon Josefsson 2024-08-31gnu: gpgme: Hardcode gpg binaries' location....* gnu/packages/gnupg.scm (gpgme): Pass the gpg binaries' location to configure. Change-Id: I13d8e4d97cd93fffa6e3d1a6e39972e08ed69376 Josselin Poiret 2024-08-31gnu: parcimonie: Add bash-minimal to inputs....* gnu/packages/gnupg.scm (parcimonie) [inputs]: Add bash-minimal. Delete labels. Change-Id: I94e17ad8a47ccaf31b7cea593f04bb360e185c25 Maxim Cournoyer 2024-08-31gnu: gpa: Add bash-minimal to inputs....* gnu/packages/gnupg.scm (gpa): Delete trailing #t. [inputs]: Add bash-minimal. Delete labels. Change-Id: I3c4c9bf9b924b55a6039554127641680f1b0cffd Maxim Cournoyer 2024-08-31gnu: pinentry-rofi: Add bash-minimal to inputs....* gnu/packages/gnupg.scm (pinentry-rofi): Delete trailing #t. [inputs]: Add bash-minimal. Change-Id: I65cfda00921a184d9f0644fa28934b3c29551f4b Maxim Cournoyer 2024-08-31gnu: signing-party: Add bash-minimal to inputs....* gnu/packages/gnupg.scm (signing-party): Delete trailing #t. [inputs]: Add bash-minimal. Change-Id: I9c4eb66dd16d575edd8e6091758b8eb41e831eb4 Maxim Cournoyer 2024-08-31gnu: pinentry-rofi: Import the correct set of modules....* gnu/packages/gnupg.scm (pinentry-rofi) [arguments] <modules>: Replace %default-gnu-imported-modules with %default-gnu-modules. Change-Id: Id9191cbe2fc870e58a637043d09c09dcd6cf63b0 Maxim Cournoyer 2024-08-31build-systems: gnu: Export %default-gnu-imported-modules and %default-gnu-mod......Until now users would have to cargo cult or inspect the private %default-modules variable of (guix build-systems gnu) to discover which modules to include when extending the used modules via the #:modules argument. The renaming was automated via the command: $ git grep -l %gnu-build-system-modules | xargs sed 's/%gnu-build-system-modules/%default-gnu-imported-modules/' -i * guix/build-system/gnu.scm (%gnu-build-system-modules): Rename to... (%default-gnu-imported-modules): ... this. (%default-modules): Rename to... (%default-gnu-modules): ... this. Export. (dist-package, gnu-build, gnu-cross-build): Adjust accordingly. Change-Id: Idef307fff13cb76f3182d782b26e1cd3a5c757ee Maxim Cournoyer 2024-07-18gnu: Add qgpgme-qt6-1.23....* gnu/packages/gnupg.scm (qgpgme-qt6-1.23): New variable. Change-Id: Iefdf4a5c8037724d60ecaf53567900a3106aec66 Zheng Junjie 2024-07-18gnu: Add gpgme-1.23....* gnu/packages/gnupg.scm (gpgme-1.23): New variable. Change-Id: Ibf495f6b7cbd8d4e646e262ad547e7cff5b6bf5a Zheng Junjie 2024-04-02gnu: pinentry-rofi: Update to 2.1.0....* gnu/packages/gnupg.scm (pinentry-rofi): Update to 2.1.0. Change-Id: Ie39dfadc9905032e2a6cd08858596b7fdfd5c6dd Signed-off-by: Efraim Flashner <efraim@flashner.co.il> Fredrik Salomonsson 2024-02-13Merge branch 'master' into gnome-teamLiliana Marie Prikler 2024-02-10gnu: gnupg: Fix cross-compilation....* gnu/packages/gnupg.scm (gnupg)[arguments]: Pass libraries prefixes when cross-crompiling. Change-Id: I461ba02ddf5bb23277bd6685c2106e4ad37e2184 Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> Mathieu Othacehe 2024-02-03Merge branch 'master' into gnome-teamLiliana Marie Prikler 2024-02-02gnu: torbrowser: Stop inheriting Icecat....* gnu/local.mk (GNU_SYSTEM_MODULES): Add packages/tor-browsers.scm. * gnu/packages/gnupg.scm: Remove fix for dependency loop (fixed because we use a new file). * gnu/packages/tor-browsers.scm (mozilla-locale, mozilla-locales, %torbrowser-locales, %moz-build-date, %torbrowser-version, %torbrowser-firefox-version, translation-base-browser, translation-tor-browser, torbrowser-assets, torbrowser): New variables. (make-torbrowser): New procedure, which is a merge of ‘make-torbrowser’ (from tor.scm) with ‘icecat-minimal’ (from gnuzilla.scm). * gnu/packages/tor.scm (%moz-build-date, %torbrowser-version, %torbrowser-firefox-version, %torbrowser-locales, translation-base-browser, translation-tor-browser, torbrowser-assets, torbrowser): Remove variables. Change-Id: I5fcf73e53fe4481a18e13cdeb3515c3dc4430090 Clément Lassieur 2024-01-07Merge branch 'master' into gnome-teamLiliana Marie Prikler 2024-01-03gnu: libassuan: Fix cross-compiling....gnu/packages/gnupg.scm(libassuan): [arguments]: When cross-compiling, set the --with-libgpg-error-prefix configure option. Change-Id: I320c48f320c34939a8e94589610beb5c40fdf53a Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> Zheng Junjie 2024-01-01Merge branch 'master' into gnome-teamLiliana Marie Prikler 2023-12-27gnu: Add torbrowser....* gnu/packages/tor.scm (torbrowser): New variable. (torbrowser-assets): New variable. * gnu/packages/browser-extensions.scm (noscript): New variable. (noscript/icecat): New variable. Co-authored-by: André Batista <nandre@riseup.net> Change-Id: I73dc53905e4a028108bb34aae07e44256cf16c85 Clément Lassieur 2023-12-20Merge branch 'master' into gnome-teamLiliana Marie Prikler 2023-09-06gnu: gcr: Update to 4.0.0....* gnu/packages/gnome.scm (gcr): Update to 4.0.0. (gcr-3): New variable for current version. (libgdata)[propagated-inputs]: Replace gcr with gcr-3. (gnome-keyring)[inputs]: Likewise. (seahorse)[inputs]: Likewise. (gnome-settings-daemon)[inputs]: Likewise. (gvfs)[inputs]: Likewise. (epiphany)[inputs]: Likewise. (gexiv2)[inputs]: Likewise. (shotwell)[inputs]: Likewise. (gnome-online-accounts)[inputs]: Likewise. (evolution-data-server)[inputs]: Likewise. (network-manager-openconnect)[inputs]: Likewise. (network-manager-applet)[inputs]: Likewise. (gnome-shell)[inputs]: Likewise. (evolution)[inputs]: Likewise. (geary)[inputs]: Likewise. * gnu/packages/gnome-xyz.scm (gpaste)[native-inputs]: Likewise. * gnu/packages/gnupg.scm (pinentry-gnome3)[inputs]: Likewise. * gnu/packages/suckless.scm (surf)[inputs]: Likewise. * gnu/packages/web-browsers.scm (midori)[inputs]: Likewise. Liliana Marie Prikler 2023-08-03gnu: qgpgme: Propagate gpgme....* gnu/packages/gnupg.scm (qgpgme): Move gpgme from inputs to propagated-inputs. 宋文武 2023-12-11gnu: libgpg-error: Do not assume that target is a triplet....Fixes a bug exposed with be5ec2ebb4bde4b4f702a30f08849dff05cceccd, which introduces the “avr” target, which has no hyphen. * gnu/packages/gnupg.scm (libgpg-error)[arguments]: In ‘cross-symlinks’ phase, adjust code to deal with TARGET lacking a hyphen. Change-Id: I1aff6a94a7c92626f931c459d1dc0509f9bcfc00 Ludovic Courtès 2023-07-20gnu: libgcrypt: Skip hanging benchmark tests on the Hurd....* gnu/packages/gnupg.scm (libgcrypt)[arguments]: When building natively on the Hurd, add phase 'setenv' to set "GCRYPT_NO_BENCHMARKS". Janneke Nieuwenhuizen 2023-07-20gnu: libgpg-error: Skip failing test on the Hurd....* gnu/packages/gnupg.scm (libgpg-error)[arguments]: When building natively on the Hurd, add phase 'skip-tests'. Janneke Nieuwenhuizen