* guix/build/utils.scm (substitute): Clarify first sentence of
docstring and add warning to the docstring about using '$' to match
an end of line.
(substitute*): Add warning to the docstring about using '$' to match
an end of line.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* guix/build/gnu-build-system.scm (strip): Check whether 'file-exists?'
before calling 'elf-file?' and 'ar-file?'. This should fix build
failures in the presence of dangling symlinks, as in
<http://hydra.gnu.org/build/167521/nixlog/1/raw>.
This avoids uncaught exceptions when the 'strip' phase would call these
procedures on symlinks to directories, such as 'lib/terminfo' in
ncurses (see <http://hydra.gnu.org/build/167310/nixlog/1/tail-reload>.)
* guix/build/utils.scm (file-header-match): Catch 'system-error', and
return #f upon EISDIR.
Fixes <http://bugs.gnu.org/18534>.
* guix/scripts/pull.scm (with-environment-variable, with-PATH): New
macros.
(temporary-directory, first-directory, interned-then-deleted): New
procedures.
(unpack): Rewrite to do the unpacking in the current process rather
than as a separate derivation.
(%self-build-file): New variable.
(build-from-source): New procedure.
(build-and-install): Use it.
* guix/build/pull.scm (build-guix): Rename 'tarball' argument to
'source'. Remove #:tar and #:gzip parameters, as well as 'tar'
invocation. Remove 'scandir' invocation. Wrap body in
'with-directory-excursion'.
* build-aux/build-self.scm: New file.
* Makefile.am (EXTRA_DIST): Add it.
Fixes downloads from https://alioth.debian.org.
Reported by John Darrington <jmd@gnu.org>.
* guix/build/download.scm (http-fetch)[headers]: Add 'Accept'.
* guix/derivations.scm (graft-derivation): New procedure.
* guix/build/graft.scm: New file.
* Makefile.am (MODULES): Add it.
* tests/derivations.scm ("graft-derivation"): New test.
* guix/build-system/cmake.scm (cmake-build): Add #:build-type. Pass it
in BUILDER.
* guix/build/cmake-build-system.scm (configure): Add #:build-type
parameter and honor it.
* doc/guix.texi (Build Systems): Document #:configure-flags and
#:build-type for CMake.
Fixes <http://bugs.gnu.org/18526>.
Reported by Mark H. Weaver.
* guix/build/download.scm (tls-wrap): Add 'server' parameter. Call
'set-session-server-name!' when (gnutls) defines it.
(open-connection-for-uri): Adjust 'tls-wrap' call accordingly.
* guix/build/syscalls.scm (network-interfaces): Update docstring.
(%interface-line): New variable.
(all-network-interfaces): New procedure.
* tests/syscalls.scm ("all-network-interfaces"): New test.
("network-interfaces"): Change to make sure the result is a subset
of (all-network-interfaces).
* guix/build/utils.scm (wrap-program): Multiple invocations of
wrap-program for the same file create successive wrappers. Adjust
docstring.
* tests/build-utils.scm: Test new wrap-program behavior.
(%store): New variable.
* guix/build/pull.scm (report-build-progress): New procedure.
(p-for-each): Add #:progress parameter.
[loop]: Keep track of the number of completed processes. Tail-call
PROGRESS at each loop iteration.
(build-guix): Add #:debug-port parameter. Use it for verbose
messages. Change 'tar' flags to 'xf'. Around 'compile-file' call,
bind CURRENT-WARNING-PORT to DEBUG-PORT.
* guix/scripts/pull.scm (unpack): Add #:verbose? parameter.
[builder]: Pass #:debug-port to 'build-guix'.
(guix-pull): Leave CURRENT-BUILD-OUTPUT-PORT unchanged. Pass
#:verbose? to 'unpack'.
Suggested by Mark H. Weaver.
* gnu/system/shadow.scm (<user-group>)[system?]: New field.
(%base-groups): Introduce 'system-group' macro, and use it.
* gnu/system.scm (user-group->gexp): Pass the 'system?' field.
* guix/build/activation.scm (add-group): Add #:system? and honor it.
(activate-users+groups): Handle the 'system?' field.
* gnu/system/file-systems.scm (%tty-gid): Choose an ID below 1000.
* doc/guix.texi (User Accounts): Document the 'system?' field.
* guix/build/linux-initrd.scm (MS_NOSUID, MS_NODEV, MS_NOEXEC): New
variables.
(mount-flags->bit-mask): New procedure.
(mount-file-system)[flags->bit-mask]: Remove.
Use 'mount-flags->bit-mask' instead.
In /etc/mtab, use the empty string when OPTIONS is false.
* gnu/services/base.scm (file-system-service): Add #:flags parameter and
honor it.
* gnu/system.scm (other-file-system-services): Pass FLAGS to
'file-system-service'.