Guile-JSON 3.x is incompatible with Guile-JSON 1.x, which we relied on
until now: it maps JSON dictionaries to alists (instead of hash tables),
and JSON arrays to vectors (instead of lists). This commit is about
adjusting all the existing code to this new mapping.
* m4/guix.m4 (GUIX_CHECK_GUILE_JSON): New macro.
* configure.ac: Use it.
* doc/guix.texi (Requirements): Mention the Guile-JSON version.
* guix/git-download.scm (git-fetch)[guile-json]: Use GUILE-JSON-3.
* guix/import/cpan.scm (string->license): Expect vectors instead of
lists.
(module->dist-name): Use 'json-fetch' instead of 'json-fetch-alist'.
(cpan-fetch): Likewise.
* guix/import/crate.scm (crate-fetch): Likewise, and call 'vector->list'
for DEPS.
* guix/import/gem.scm (rubygems-fetch): Likewise.
* guix/import/json.scm (json-fetch-alist): Remove.
* guix/import/pypi.scm (pypi-fetch): Use 'json-fetch' instead of
'json-fetch-alist'.
(latest-source-release, latest-wheel-release): Call 'vector->list' on
RELEASES.
* guix/import/stackage.scm (stackage-lts-info-fetch): Use 'json-fetch'
instead of 'json-fetch-alist'.
(lts-package-version): Use 'vector->list'.
* guix/import/utils.scm (hash-table->alist): Remove.
(alist->package): Pass 'vector->list' on the inputs fields, and default
to the empty vector.
* guix/scripts/import/json.scm (guix-import-json): Remove call to
'hash-table->alist'.
* guix/swh.scm (define-json-reader): Expect pair? or null? instead of
hash-table?.
[extract-field]: Use 'assoc-ref' instead of 'hash-ref'.
(json->branches): Use 'map' instead of 'hash-map->list'.
(json->checksums): Likewise.
(json->directory-entries, origin-visits): Call 'vector->list' on the
result of 'json->scm'.
* tests/import-utils.scm ("alist->package with dependencies"): New test.
* gnu/installer.scm (build-compiled-file)[builder]: Use GUILE-JSON-3.
* gnu/installer.scm (installer-program)[installer-builder]: Likewise.
* gnu/installer/locale.scm (iso639->iso639-languages): Use 'assoc-ref'
instead of 'hash-ref', and pass vectors through 'vector->list'.
(iso3166->iso3166-territories): Likewise.
* gnu/system/vm.scm (system-docker-image)[build]: Use GUILE-JSON-3.
* guix/docker.scm (manifest, config): Adjust for Guile-JSON 3.
* guix/scripts/pack.scm (docker-image)[build]: Use GUILE-JSON-3.
* guix/import/github.scm (fetch-releases-or-tags): Update docstring.
(latest-released-version): Use 'assoc-ref' instead of 'hash-ref'. Pass
the result of 'fetch-releases-or-tags' to 'vector->list'.
* guix/import/launchpad.scm (latest-released-version): Likewise.
Only build installer if "--enable-installer" is passed. In that case only, the
support for Guile-newt becomes mandatory.
* configure.ac: Add --enable-installer argument. Export ENABLE_INSTALLER
conditional according to the argument value.
* gnu/local.mk (GNU_SYSTEM_MODULES): Remove installer modules and build them
only if ENABLE_INSTALLER is set.
* configure.ac: Require that guile-newt is available.
* gnu/installer.scm: New file.
* gnu/installer/aux-files/logo.txt: New file.
* gnu/installer/build-installer.scm: New file.
* gnu/installer/connman.scm: New file.
* gnu/installer/keymap.scm: New file.
* gnu/installer/locale.scm: New file.
* gnu/installer/newt.scm: New file.
* gnu/installer/newt/ethernet.scm: New file.
* gnu/installer/newt/hostname.scm: New file.
* gnu/installer/newt/keymap.scm: New file.
* gnu/installer/newt/locale.scm: New file.
* gnu/installer/newt/menu.scm: New file.
* gnu/installer/newt/network.scm: New file.
* gnu/installer/newt/page.scm: New file.
* gnu/installer/newt/timezone.scm: New file.
* gnu/installer/newt/user.scm: New file.
* gnu/installer/newt/utils.scm: New file.
* gnu/installer/newt/welcome.scm: New file.
* gnu/installer/newt/wifi.scm: New file.
* gnu/installer/steps.scm: New file.
* gnu/installer/timezone.scm: New file.
* gnu/installer/utils.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add previous files.
* gnu/system.scm: Export %root-account.
* gnu/system/install.scm (%installation-services): Use kmscon instead of linux
VT for all tty.
(installation-os)[users]: Add the graphical installer as shell of the root
account.
[packages]: Add font related packages.
* po/guix/POTFILES.in: Add installer files.
Reported by Mark H Weaver <mhw@netris.org>.
Fixes <https://bugs.gnu.org/33023>.
* configure.ac: Remove use of 'GUIX_ASSERT_LIBGCRYPT_USABLE'.
Add "^GUIX_" to the forbidden M4 patterns.
The next commits make (sqlite3) an indirect dependency of (gnu build
install), which is itself used by (guix scripts system), hence this new
requirement.
* configure.ac: Error out when $guix_cv_have_recent_guile_sqlite3 is
false. Remove HAVE_GUILE_SQLITE3 Automake conditional.
* Makefile.am (MODULES, SCM_TESTS): Remove HAVE_GUILE_SQLITE3 conditions.
* doc/guix.texi (Requirements): Add Guile-SQLite3.
* README: Ditto.
* gnu/packages/package-management.scm (guix)[propagated-inputs]: Add
GUILE-SQLITE3.
[arguments]: In 'wrap-program' phase, take guile-sqlite3 into account.
* m4/guix.m4 (GUIX_CHECK_GUILE_SQLITE3): New macro.
* configure.ac: Use it and define 'HAVE_GUILE_SQLITE3'.
* guix/self.scm (specification->package): Add "guile-sqlite3".
(compiled-guix)[guile-sqlite3]: New variable.
[dependencies]: Add it.
* po/doc/contributing.pot: New file.
* po/doc/guix.pot: New file.
* po/doc/local.mk: New file.
* Makefile.am: Include it. Add gettext command. Add silent rules for po4a.
* configure.ac: Look for po4a-translate and po4a-updatepo.
* doc/local.mk: Add rules to generate translated texi files.
(TRANSLATED_INFO): New variable.
(BUILT_SOURCES, EXTRA_DIST, MAINTAINERCLEANFILES): Add it.
* .gitignore: Add generated files.
This moves the complexity of Autotools variable expansion outside of the
application code.
* scripts/guix.in (config-lookup): Delete.
(maybe-augment-load-paths!, run-guix-main): Use fully expanded variables
instead of calling ‘config-lookup’.
* configure.ac: Don't use AC_CONFIG_FILES for ‘scripts/guix’.
Use AC_PROG_SED.
* Makefile.am (scripts/guix): New rule.
(do_subst): New variable.
(CLEANFILES, EXTRA_DIST): Adapt.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* etc/completion/fish/guix.fish: New file.
* Makefile.am: Register the file.
* configure.ac: Add the fish vendor-completions directory.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Fixes <https://bugs.gnu.org/29903>.
Reported by Mathieu Lirzin <mthl@gnu.org>.
* m4/guix.m4 (GUIX_ASSERT_SYNTAX_OBJECT_EQUAL): New macro.
* configure.ac: Use it.
This was for Guile < 2.0.9 and we've been requiring 2.0.9+ for some time
already.
* configure.ac: Remove 'GUIX_CHECK_SRFI_37' use and 'INSTALL_SRFI_37'
conditional.
* Makefile.am: Remove code in "if INSTALL_SRFI_37".
(EXTRA_DIST): Remove srfi/srfi-37.scm.in.
* srfi/srfi-37.scm.in: Remove.
* m4/guix.m4 (GUIX_CHECK_SRFI_37): Remove.
* Makefile.am (EXTRA_DIST, BUILT_SOURCES): Add $(top_srcdir)/.version.
($(top_srcdir)/.version, gen-tarball-version): New targets.
(dist-hook): Depend on 'gen-tarball-version'.
(.PHONY): Add 'gen-tarball-version'.
* build-aux/git-version-gen: New file, from Gnulib v0.1-1312-ga87d5e5c6.
* configure.ac: Use it in 'AC_INIT'. Use 'https' for the URL.
* configure.ac: In 'GUILE_PKG', prefer 2.2 over 2.0. Remove warning
about 2.2 not being fully supported.
* doc/guix.texi (Requirements): Mention Guile 2.2.x.
Discussed as part of <https://bugs.gnu.org/25975>.
* configure.ac: Check for (gnutls) and error out if it's missing.
* doc/guix.texi (Requirements): Move GnuTLS from optional to required.
(Substitutes): Remove footnote about the need for GnuTLS.
* configure.ac: Check for 'emacs', substitute 'EMACS', and emit
'etc/indent-package.el'.
* etc/indent-package.el.in: New file.
* doc/contributing.texi (Formatting Code): Mention
'etc/indent-package.el'.
(Submitting Patches): Likewise, and link to the above node.
Co-authored-by: Alex Kost <alezost@gmail.com>
* guix/scripts/offload.scm (connect-to-remote-daemon)
(store-import-channel, store-export-channel, send-files)
(retrieve-files): Move to (guix ssh).
(nonce): Add optional 'name' parameter and use it.
(retrieve-files*): New procedure.
(transfer-and-offload): Use it instead of 'retrieve-files', and add
first parameter to 'send-files'.
(assert-node-can-import): Likewise.
(assert-node-can-export): Use 'retrieve-files' instead of
'store-export-channel'.
* guix/ssh.scm: New file.
* configure.ac: Use 'GUIX_CHECK_GUILE_SSH' and define 'HAVE_GUILE_SSH'
Automake conditional.
* Makefile.am (MODULES) [HAVE_GUILE_SSH]: Add guix/ssh.scm.
* pre-inst-env.in: Move to ...
* build-aux/pre-inst-env.in: ... here.
* test-env.in: Move to ...
* build-aux/test-env.in: ... here.
* configure.ac (AC_CONFIG_FILES): Adapt to this. Keep the generated
scripts in their current location which is $(top_builddir).
This allows (guix config) to contain valid values of %GZIP et al. even
when configured with --disable-daemon.
* config-daemon.ac: Move 'AC_PATH_PROG' invocations for
gzip & co. to...
* configure.ac: ... here.