Previously, code using directly (guix build download) was still affected
by <http://bugs.gnu.org/15368>. This includes source derivations, the
'guix download' command, and (guix gnu-maintenance).
'guix substitute' was unaffected since it used (guix http-client), which
already had the fix.
* guix/http-client.scm (open-socket-for-uri): Remove.
(http-fetch): Remove #:buffered? argument to 'open-socket-for-uri';
use 'setvbuf' instead.
* guix/scripts/substitute.scm (fetch): Likewise.
* guix/build/download.scm (open-socket-for-uri): New procedure, taken
from guix/http-client.scm, but without the #:buffered? parameter.
* guix/search-paths.scm (search-path-definition): New procedure.
* guix/scripts/environment.scm (for-each-search-path): Rename to...
(evaluate-input-search-paths): ... this. Remove 'proc' and 'pure?'
parameters, and return directly the list of search-path/value pairs.
(create-environment): Use 'for-each' and 'evaluate-input-search-paths'
instead of 'for-each-search-path'.
(show-search-paths): Use 'for-each', 'search-path-definition', and
'evaluate-search-paths' instead of 'for-each-search-path'.
This allows 'guix environment' to correctly handle non-directory
and/or pattern search-path specifications, such as that for
'XML_CATALOG_FILES'.
* guix/scripts/environment.scm (for-each-search-path): Use
'evaluate-search-paths' instead of 'search-path-as-list' & co.
* guix/scripts/package.scm (evaluate-search-paths): New procedure, with
most of the code formerly in 'search-path-environment-variables'.
(search-path-environment-variables): Use it.
* guix/scripts/package.scm (user-friendly-profile): New procedure.
(search-path-environment-variables): Remove 'profile' local variable.
(display-search-paths): Explicitly call 'user-friendly-profile' for
the argument to 'search-path-environment-variables'.
(guix-package)[process-query]: Likewise.
Discussed in <http://bugs.gnu.org/20255>.
* guix/packages.scm (sexp->search-path-specification): New variable.
* guix/profiles.scm (<manifest-entry>)[search-paths]: New field.
(package->manifest-entry): Initialize it.
(manifest->gexp): Match it. Wrap #$deps in (propagated-inputs ...).
Emit (search-paths ...). Increment version.
(find-package): New procedure.
(sexp->manifest)[infer-search-paths]: New procedure.
Use it to initialize the 'search-paths' field for versions 0 and 1.
Add case for version 2.
* guix/scripts/package.scm (search-path-environment-variables)[manifest-entry->package]:
Remove.
Use 'manifest-entry-search-paths' instead of 'manifest-entry->package'
plus 'package-native-search-paths'.
* tests/profiles.scm ("profile-manifest, search-paths"): New test.
* guix/serialization.scm (read-maybe-utf8-string): Use
'set-port-encoding!' and 'set-port-conversion-strategy!' instead of
setting '%default-port-encoding' and
'%default-port-conversion-strategy'. This accounts for Guile commit
d574d96, which changes bytevector input ports to use ISO-8859-1.
In practice we would not leak much since we reconnect after ~100
requests (with nginx running on hydra.gnu.org.)
* guix/scripts/substitute.scm (http-multiple-get): Call 'close-port'
before 'connect'.
Partly fixes <http://bugs.gnu.org/20402>.
Reported by Joshua Randall <jcrandall@alum.mit.edu>.
* guix/build/download.scm (open-connection-for-uri): Rewrite to be a
small wrapper around 'open-socket-for-uri'. This procedure was
initially introduced in d14ecda to work around the lack of NSS modules
during bootstrap but that has become unnecessary since 0621349, which
introduced a bootstrap Guile that uses static NSS modules (from commit
d3b5972.)
On Guile >= 2.0.10, this allows the 'http_proxy' environment variable
to be used.
* guix/build-system/cmake.scm (cmake-build): Add #:validate-runpath?
parameter and pass it to BUILDER.
* guix/build-system/glib-or-gtk.scm (glib-or-gtk-build): Likewise.
Fixes <http://bugs.gnu.org/20081>.
Reported by Tomáš Čech <tcech@suse.cz>.
* guix/build/gnu-build-system.scm (patch-source-shebangs): Remove files
that don't pass 'file-exists?'.
(patch-generated-file-shebangs): Likewise.
* guix/build/gremlin.scm (expand-variable, expand-origin): New
procedures.
(validate-needed-in-runpath): Map 'expand-origin' to the RUNPATH field
of DYNINFO.
* tests/gremlin.scm ("expand-origin"): New test.
* guix/packages.scm (supported-package?): New procedure.
* tests/packages.scm ("supported-package?"): New test.
* build-aux/hydra/gnu-system.scm (package->job): Use it instead of
'package-transitive-supported-systems'.
* guix/scripts/refresh.scm (guix-refresh): Use 'specification->package'
instead of 'find-packages-by-name'. This allows users to specify
things like "qt-4.8.6".
* doc/guix.texi (Invoking guix refresh): Add an example.
Fixes a regression whereby haskell-build-system was using an incomplete
module list.
* guix/build-system/haskell.scm (%haskell-build-system-modules): New
variable.
(haskell-build): Use it as the default value of #:imported-modules.
* guix/scripts/package.scm (%options): Add the '--do-not-upgrade' option.
(show-help): Document it.
(options->installable): Add 'do-not-upgrade-regexps' variable.
Use it in 'packages-to-upgrade'.
* doc/guix.texi (Invoking guix package): Document the '--do-not-upgrade'
option.
Reported by Federico Beffa.
* guix/packages.scm (package-transitive-supported-systems): Use
bag-direct-inputs + package->bag rather than package-direct-inputs.
* tests/packages.scm ("package-transitive-supported-systems"): Add
explicit 'build-system' field to each 'dummy-package' form.
("package-transitive-supported-systems, implicit inputs"): New test.
Reported by Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>.
* guix/http-client.scm (make-delimited-input-port): New procedure.
Install it in (web response) for Guile <= 2.0.9.
* guix/profiles.scm (ghc-package-cache-file): New procedure.
(profile-derivation): Add 'ghc-package-cache?' keyword argument. If true
(the default), add the result of 'ghc-package-cache-file' to 'inputs'.
* guix/scripts/package.scm (guix-package)[process-actions]: Pass
#:ghc-package-cache? to 'profile-generation'.
* tests/packages.scm ("--search-paths with pattern"): Likewise.
* tests/profiles.scm ("profile-derivation"): Likewise.
* guix/build/haskell-build-system.scm (%standard-phases): move 'haddock phase
before 'install phase.
* guix/build/haskell-build-system.scm (haddock): Simplify it as the 'install
phase takes care of copying files.
* guix/build/haskell-build-system.scm (configure): Add '--libsubdir' flag.
Fix use of '--extra-include-dirs' and '--extra-lib-dirs' flags. Use 'doc',
'bin' and 'lib' outputs if they are defined.
* guix/build/haskell-build-system.scm (make-ghc-package-database, register):
Aligh location of 'package.conf.d' directory with '--libsubdir' flag.
* guix/ui.scm (warn-about-load-error): New procedure.
* gnu/packages.scm (package-modules): Wrap 'resolve-interface' call in
'catch #t', and call 'warn-about-load-error' in handler.
* guix/scripts/system.scm (read-operating-system): Replace error
handling code by a call to 'report-load-error'.
* guix/ui.scm (report-load-error): New procedure.
Fixes <http://bugs.gnu.org/20081>.
Reported by Tomáš Čech <sleep_walker@suse.cz>.
* guix/build/utils.scm (find-files): Add #:stat parameter. Pass it as
last argument to 'file-system-fold'.
* guix/scripts/package.scm (delete-matching-generations): Remove call to
'exit' when PATTERN is "0". Call 'leave' instead of 'exit'
when (null-list? number).
Fixes <http://bugs.gnu.org/19978>.
Reported by taylanbayirli@gmail.com (Taylan Ulrich Bayırlı/Kammer).
* guix/scripts/package.scm (delete-matching-generations): Warn when
CURRENT is in NUMBERS, and always remove it before calling
'delete-generations'.
* tests/guix-package.sh: Add --switch-generation=2 invocation before
--delete-generations=3 invocation.
Add --delete-generations=1.. test case.
* guix/scripts/package.scm (delete-matching-generations): New procedure,
with code formerly found...
(guix-package)[process-actions]: ... here. Use it.
Remove 'current-generation-number'.
* guix/build/gremlin.scm (validate-needed-in-runpath)[runpath]:
Add (filter absolute-file-name? ...).
Emit a warning when RUNPATH file names that do not match
'store-file-name?'. Change format of error message to begin with file
name.
* guix/build/utils.scm (store-file-name?): New procedure.
* guix/store.scm (<path-info>): New record type.
(read-path-info): New procedure.
(read-arg): Add 'path-info' syntax.
(query-path-info): New variable.
* tests/store.scm ("query-path-info"): New test.
* guix/build/glib-or-gtk-build-system.scm (wrap-all-programs): Also
wrap binaries in libexec/, such as those launched by dbus services.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* guix/build-system/gnu.scm (%default-modules): Rename to...
(%gnu-build-system-modules): ... this.
(%default-modules): New variable.
(dist-package, gnu-build): Use %GNU-BUILD-SYSTEM-MODULES for
#:imported-modules.
(gnu-cross-build): Likewise, and use %DEFAULT-MODULES for #:modules.
* guix/build-system/cmake.scm (%cmake-build-system-modules): New
variable.
(cmake-build): Use it for #:imported-modules.
* guix/build-system/glib-or-gtk.scm (%default-imported-modules): Rename
to...
(%glib-or-gtk-build-system-modules): ... this. Refer to
%GNU-BUILD-SYSTEM-MODULES. Adjust uses.
* guix/build-system/perl.scm (%perl-build-system-modules): New
variable.
(perl-build): Use it for #:imported-modules.
* guix/build-system/python.scm (%python-build-system-modules): New
variable.
(python-build): Use it for #:imported-modules.
* guix/build-system/ruby.scm (%ruby-build-system-modules): New variable.
(ruby-build): Use it for #:imported-modules.
* guix/build-system/waf.scm (%waf-build-system-modules): New variable.
(waf-build): Use it for #:imported-modules.
* guix/build/gremlin.scm (&elf-error, &invalid-segment-size): New error
condition types.
(dynamic-link-segment): Compare SEGMENT's offset + size to ELF's total
size.
(validate-needed-in-runpath): Wrap body in 'guard' form.
* guix/build/utils.scm (file-name-predicate): New procedure.
(find-files): Rename second parameter to 'pred'. When 'pred' is not a
procedure, call 'file-name-predicate'. Use PRED instead of
'regexp-exec' in the leaf procedure.
* guix/gexp.scm (<local-file>): New record type.
(local-file): New procedure.
(local-file-compiler): New compiler.
(gexp->sexp) <struct? thing>: Handle the case where 'lower' returns a
file name.
(text-file*): Update docstring.local-file doc
* tests/gexp.scm ("one local file", "gexp->derivation, local-file"): New
tests.
* doc/guix.texi (G-Expressions): Mention local files early. Document
'local-file'. Update 'text-file*' documentation.
Before that, "guix build qt", when only qt itself is missing, would lead
'substitution-oracle' to call 'substitutable-paths' with 318 items.
Now, this is down to 6 items, because it doesn't ask about prerequisites
that are already valid.
* guix/derivations.scm (substitution-oracle)[valid-input?,
dependencies]: New procedures.
Use 'dependencies' and remove call to 'remove'.
* guix/derivations.scm (valid-derivation-input?): New procedure.
(derivation-prerequisites): Add 'cut?' parameter and honor it.
* tests/derivations.scm ("derivation-prerequisites and
derivation-input-is-valid?"): New test.
Fixes <http://bugs.gnu.org/20188>.
Reported by Mark H Weaver <mhw@netris.org>.
* guix/derivations.scm (substitution-oracle): Add 'valid?' procedure.
Remove 'valid?' items from PATHS.