This is another instance of <https://bugs.gnu.org/22966>.
The Microsoft-IIS/7.5 server at static.nvd.nist.gov would sometimes hang
when receiving our requests byte by byte.
* guix/build/download.scm (tls-wrap) [!guile-2.0]: Add 'setvbuf' call.
This ensures the timeout applies when connecting to the port returned by
PASV.
* guix/ftp-client.scm (ftp-list): Add #:timeout parameter. Use
'connect*' instead of 'connect' and pass TIMEOUT.
(ftp-retr): Likewise.
* guix/build/download.scm (ftp-fetch): Pass TIMEOUT to 'ftp-retr'.
Fixes <https://bugs.gnu.org/29091>.
Reported by Eric Bavier <bavier@cray.com>.
* guix/build/compile.scm (relative-file): New procedure.
(load-files): Use it before calling 'file-name->module-name'.
(compile-files): Likewise before calling 'scm->go'.
* guix/build/pull.scm (build-guix): Remove 'with-directory-excursion'
and file name hack from ce33c3af76.
Pass OUT to 'all-scheme-files'.
Fixes <https://bugs.gnu.org/28956>.
Reported by Leo Famulari <leo@famulari.name>.
* build-aux/build-self.scm (build): Add (guix build compile) to
#:modules.
* guix/build/pull.scm (build-guix): Wrap 'compile-files' call in
'with-directory-excursion'. Strip "./" from FILES when passing it to
'compile-files'.
Among other things, this removes (guix utils), (guix ui), (guix config),
etc. from the closure of (guix build download), as was the case since
798648515b.
* guix/utils.scm (<progress-reporter>, call-with-progress-reporter):
Move to...
* guix/progress.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* guix/build/download.scm (current-terminal-columns)
(nearest-exact-integer, duration->seconds, seconds->string)
(byte-count->string, progress-bar, string-pad-middle)
(rate-limited, progress-reporter/file, dump-port*)
(time-monotonic): Move to progress.scm.
* guix/scripts/download.scm: Adjust accordingly.
* guix/scripts/substitute.scm: Likewise.
* guix/build/download.scm (http-fetch): Remove 'file' parameter. Change
to return an input port and the content-length. Make public.
(url-fetch): Adjust accordingly.
This is a followup to 36626c556e.
* guix/build/download.scm (http-fetch): Rename 'port-or-bv' to 'port'.
Assume (port? port) is always true, and remove other branch.
Previously the regex would match from /bin/ to a closing quote. However, this
is greedy, so will match up until the last ". This causes problems when there
are several quotes on the same line, for example:
org-effectiveness.el:
196: (call-process "/bin/bash" nil t nil "-c" strplot)
Therefore, change . to \S so that it doesn't include whitespace
characters. Changing to a lazy quantifier would be an option, if that were
supported.
* guix/build/emacs-build-system.scm (patch-el-files): Change the regular
expression used.
Previously the string-append here would error, which isn't useful as it
doesn't tell you which command couldn't be found. To make the error
actionable, catch it earlier, and explicitly error.
* guix/build/emacs-build-system.scm (patch-el-files): Handle (which cmd)
returning #f.
* guix/build-system/ant.scm: Add #:test-include and #:test-exclude
arguments.
* guix/build/ant-build-system.scm: Generate test list from arguments.
* doc/guix.texi (Build Systems): Document it.
* guix/build-system/ant.scm: New #:main-class argument
* guix/build/ant-build-system.scm: Generate a manifest file with
additional properties.
* doc/guix.texi (Build Systems): Document it.
* guix/utils.scm (<progress-reporter>): New record type.
(call-with-progress-reporter): New procedure.
* guix/build/download.scm (dump-port*, rate-limited, progress-reporter/file):
New procedures.
(ftp-fetch, http-fetch): Use 'dump-port*'.
(progress-proc): Remove procedure.
* guix/scripts/substitute.scm (progress-report-port): Rewrite in terms of
<progress-reporter>.
(process-substitution): Adjust accordingly.
* guix/build/download.scm (http-fetch): Complete the hard-coded list of HTTP
redirection status codes.
* guix/http-client.scm (http-fetch): Likewise.
* guix/scripts/lint.scm (probe-uri): Likewise.
Detecting when no files were installed was broken when switching to use
cond. Test with (not (null? ...)) to fix this.
* guix/build/emacs-build-system.scm (install): Fix detecting when no files
were installed.
Modify the install phase to detect when nothing has been installed, and error
if this happens. This is preferable to continuing, and allowing the next phase
to fail.
Also, when nothing can be found to be installed, print out each file that was
considered, along with the regular expressions that were used to include and
exclude it.
* gnu/build/emacs-build-system.scm (install-file?): Add additional error
checking and logging.
Fixes <http://bugs.gnu.org/28212>.
Reported by Leo Famulari <leo@famulari.name>.
* guix/build/graft.scm (replace-store-references): When I >= END, check
whether WRITTEN > END and call 'get-bytevector-n!' when it is.
* tests/grafts.scm (buffer-size): New variable.
("replace-store-references, <http://bugs.gnu.org/28212>"): New test.
* guix/build/syscalls.scm (network-interface-running?): New variable.
Export it.
* tests/syscalls.scm: Add test.
Co-authored-by: John Darrington <jmd@gnu.org>
Reported by rennes@openmailbox.org.
* guix/build/syscalls.scm (file-type->symbol): New procedure.
(%struct-dirent-header): Rename to...
(%struct-dirent-header/linux): ... this. Rename introduced bindings as
well.
(%struct-dirent-header/hurd): New C struct.
(define-generic-identifier): New macro.
(read-dirent-header, %struct-dirent-header, sizeof-dirent-header):
Define in terms of 'define-generic-identifier'.
This allows us to use texmf.cnf instead of having to set all required
environment variables manually.
* guix/build/texlive-build-system.scm (configure): New procedure.
(build): Simplify.
(%standard-phases): Add configure phase.
* guix/build-system/texlive.scm (texlive-build): Include (guix build union) in
modules.
(%texlive-build-system-modules): Likewise.
* gnu/build/vm.scm (estimated-partition-size): New procedure.
* gnu/system/vm.scm (expression->derivation-in-linux-vm):
Change #:disk-image-size default to 'guess.
[builder]: When DISK-IMAGE-SIZE is 'guess, use
'estimated-partition-size' and compute and estimate of the image size.
(qemu-image): Likewise.
* guix/build/store-copy.scm (file-size, closure-size): New procedures.
* guix/scripts/system.scm (%default-options): Change 'image-size' to
'guess.
* doc/guix.texi (Building the Installation Image): Remove '--image-size'
flag from example.
(Invoking guix system): Document the image size estimate.