This phase is inherited by other build systems, which ensures
'SOURCE_DATE_EPOCH' is always set in practice.
* guix/build/python-build-system.scm (set-SOURCE-DATE-EPOCH): Remove.
(%standard-phases): Don't add it.
* guix/build/gnu-build-system.scm (set-SOURCE-DATE-EPOCH): New
procedure.
(%standard-phases): Add it.
(gnu-build): Remove 'setenv' call for "SOURCE_DATE_EPOCH".
This is a followup to 3eb34c6.
* guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Use
"--enable-deterministic-archives" instead of "-D" to work around
Binutils bug <https://sourceware.org/bugzilla/show_bug.cgi?id=17671>.
* guix/build/gnu-build-system.scm (strip): Likewise.
* gnu/packages/python.scm (python-2)[arguments]: Set SOURCE_DATE_EPOCH
to 1 to match what the daemon does.
* guix/build/python-build-system.scm (set-SOURCE-DATE-EPOCH): Likewise.
* gnu/packages/patches/python-2.7-source-date-epoch.patch: New file.
* gnu/packages/python.scm (python-2)[source]: Use it.
[arguments]: Set SOURCE_DATE_EPOCH in 'patch-lib-shells' phase.
* guix/build/python-build-system.scm (set-SOURCE-DATE-EPOCH): New
procedure.
(%standard-phases): Add it.
* gnu-system.am (dist_patch_DATA): Add patch.
* guix/build/graft.scm (rewrite-directory)[rewrite-leaf]: Change to take
a single parameter. Add call to 'lstat'. Factorize result of
'destination'.
Use 'find-files' instead of 'file-system-fold'.
* guix/build/download.scm (open-socket-for-uri): Always pass
AI_ADDRCONFIG to 'getaddrinfo' as recommended in the fine Guile
manual.
* guix/ftp-client.scm (ftp-open): Ditto.
* guix/build/download.scm (ensure-uri): New procedure.
(current-http-proxy): New variable.
(open-socket-for-uri): Copy from Guile commit aaea5b2, but add #:timeout
parameter and use 'connect*' instead of 'connect'.
(open-connection-for-uri): Add #:timeout parameter and pass it to
'open-socket-for-uri'.
Benefits include: 'guix environment' more useful for ghc libraries, more
useful 'guix package --search-paths' for installed ghc libraries, cleaner
package recipes: no longer need to propagate runtime package dependencies.
* guix/build/haskell-build-system.scm (configure): Unset GHC_PACKAGE_PATH
around cabal configure.
(make-ghc-package-database): Use pattern directory search.
(register): Install complete package database for the current package.
* gnu/packages/haskell.scm (ghc): Add native-search-paths field.
For Cabal packages with "build-type: Configure", a configure shell
script is run to set up build parameters. These scripts need the
CONFIG_SHELL environment variable to be set to function properly.
* guix/build/haskell-build-system.scm (configure): Set CONFIG_SHELL if
necessary.
Fixes <http://bugs.gnu.org/21694>.
* guix/build/syscalls.scm (clone): Change 'syscall' parameter types to
LONG, UNSIGNED-LONG, or '*; make sure it has 6 parameters. Adjust
caller accordingly.
Fixes a regression introduced in a8be7b9a.
* guix/build/download.scm (store-path-abbreviation): Return STORE-PATH
if it's not an actual store path. Fixes an out-of-range exception
when running tests/substitute.scm and tests/store.scm.
* guix/build/download.scm
(string-pad-middle): Allow resulting padded string to overflow.
(store-url-abbreviation): Remove unnecessary procedure.
(progress-proc): Use BASENAME as default for parameter 'abbreviation'.
(url-fetch): Display extra newlines for readability.
Fixes a regression introduced in b7c7c03eb5.
* guix/build/emacs-build-system.scm (package-name-version->elpa-name-version):
Remove unused 'name' binding. Do not abuse 'strip-store-file-name' to
remove the "emacs-" prefix, which worked before b7c7c03eb5 but not after.
* guix/build/download.scm
(string-pad-middle, store-url-abbreviation, store-path-abbreviation):
New procedures.
(progress-proc): Add #:abbreviation parameter and use it. Generate a
better indeterminate progress string.
* guix/scripts/substitute.scm (assert-valid-narinfo): Add newlines to output.
(process-substitution): Use byte-count->string and store-path-abbreviation.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Previously, the Ruby build system only knew how to work with gem archives,
which made it difficult to build unreleased gems from a Git repository or
released gems in tarball form.
* gnu/build/ruby-build-system.scm (gnu:unpack, gem-archive?): New procedures.
(unpack): Use GNU build system unpack phase for non-gem sources.
(build): Rebuild the gemspec iff the source is a gem archive.
* guix.texi ("ruby-build-system"): Mention that tarballs and directories are
acceptable.
* guix/build/download.scm (seconds->string): New function.
(byte-count->string): New function.
(progress-bar): New function.
(throughput->string): Remove function.
(progress-proc): Display base file name, elapsed time, and progress bar.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
The intent is to make 'clone' behave a lot more like 'primitive-fork', which
calls clone(2) with SIGCHLD, CLONE_CHILD_CLEARTID, and CLONE_CHILD_SETTID
flags. Notably, running 'clone' at the REPL without these flags would break
the REPL beyond repair.
* guix/build/syscalls.scm (CLONE_CHILD_CLEARTID, CLONE_CHILD_SETTID): New
variables.
* gnu/build/linux-container.scm (namespaces->bit-mask): Add
CLONE_CHILD_CLEARTID and CLONE_CHILD_SETTID to bit mask.
Having the hash of the source gem in the source directory file name proved to
be problematic when running the test suite for the 'pg' gem that creates
UNIX-domain sockets in the source directory and exceeded the 108 character
limit on GNU/Linux systems.
* guix/build/ruby-build-system.scm (unpack): Rename unpacked gem directory to
"gem".
* guix/build/utils.scm (strip-store-file-name): New procedure.
* guix/build/emacs-build-system.scm (store-directory->name-version):
Remove. Update callers to use 'strip-store-file-name'.
* gnu/packages/gcc.scm (make-libstdc++-doc)[arguments]: Use
'strip-store-file-name' instead of 'string-drop'.
* guix/build/gnu-build-system.scm (gnu-build)[elapsed-time]: New
procedure.
Use it, and use (current-time time-monotonic) instead
of (gettimeofday). Show one digit after the comma for the elapsed
time.
On systems with a glibc prior to 2.14, the 'setns' function is not available.
Thanks to Eric Bavier for reporting the issue.
* guix/build/syscalls.scm (setns): Wrap with 'false-if-exception'.
Based on discussions with Rohan Prinja <rohan.prinja@gmail.com>.
* guix/build/syscalls.scm (<interface>): New record type.
(write-interface, values->interface, unfold-interface-list,
network-interfaces, free-ifaddrs): New procedures.
(ifaddrs): New C struct.
(%struct-ifaddrs-type, %sizeof-ifaddrs): New macros.
* tests/syscalls.scm ("network-interfaces returns one or more interfaces",
"network-interfaces returns \"lo\""): New tests.
* guix/build/syscalls.scm (alignof*, align): New macros.
(write-types, read-types): Use 'align' to compute the actual offset to
read/write a value of TYPE0.
* guix/build/syscalls.scm (PF_PACKET, AF_PACKET): New variables.
(read-socket-address): Make 'index' optional. Return (vector FAMILY) when
FAMILY is neither AF_INET nor AF_INET6.