Commit Graph

604 Commits (7df4d3465d305271d4fdf4e6f886a248d63b82c4)

Author SHA1 Message Date
Mathieu Othacehe 7df4d3465d
syscalls: Use define-as-needed for mount and umount.
* guix/build/syscalls.scm (mount): Use define-as-needed macro
and remove from export list.
(umount): Ditto.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-04-11 11:13:25 +02:00
Mathieu Othacehe 8336df0668
syscalls: Add reboot.
* guix/build/syscalls.scm (define-as-needed): New macro.
(reboot): New procedure. Reimplemented from guile-linux-syscalls.patch.
(RB_AUTOBOOT, ..., RB_KEXEC): New flags copied from static Guile patch.

Co-Authored-By: Ludovic Courtès <ludo@gnu.org>
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-04-11 11:13:25 +02:00
Mathieu Othacehe f91fcd9c42
syscalls: Allow mount and umount use from static Guile.
* guix/build/syscalls.scm (mount): Use Guile core mount if called from
  static Guile, otherwise use FFI based mount implementation.
  (umount): Ditto.
  This allows to use (guix build syscalls) from a module independently
  of calling context.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-04-07 23:30:39 +02:00
Ludovic Courtès 5537f2d279
profiles: Slightly improve the instructions in 'etc/profile'.
* guix/build/profiles.scm (build-etc/profile): Fix typo in comment.
Add backslash in the generated shell comment.
2017-04-07 23:30:38 +02:00
Marius Bakke 84157bb8bf
Merge branch 'master' into core-updates
Most conflicts are from 6fd52309b8.
2017-03-30 22:59:53 +02:00
Ludovic Courtès 6dfd683dc7
download: Properly parse ftp:// URLs that lack user info.
Fixes a regression introduced in
a4f5423415.

Reported by Hartmut Goebel.

* guix/build/download.scm (ftp-fetch): Account for the case where
'uri-userinfo' returns #f.  Remove the case where it returns "" since
that cannot happen.
2017-03-28 13:30:09 +02:00
Leo Famulari c17383f400
Merge branch 'master' into core-updates 2017-03-27 21:19:38 -04:00
Huang Ying addce19e2d
union: Add create-all-directories? parameter to 'union-build'.
* guix/build/union.scm (union-build): Add create-all-directories? keyword
parameter.
* tests/union.scm ("union-build #:create-all-directories? #t"): New test.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2017-03-26 12:53:48 +02:00
Efraim Flashner 378de69c59
Merge remote-tracking branch 'origin/master' into core-updates 2017-03-22 12:57:37 +02:00
Roel Janssen a4f5423415
download: Handle username and password properties for FTP URIs.
* guix/build/download.scm (ftp-fetch): Process username and password from a URI.
2017-03-21 12:15:14 +01:00
Mark H Weaver f67337e23e
Merge branch 'master' into core-updates 2017-03-19 18:52:12 -04:00
Ludovic Courtès 4fd06a4dd1
http-client: Avoid name clash with 'open-connection-for-uri' in 2.2.0.
* guix/build/download.scm (open-connection-for-uri): Add note about
same-named binding in Guile 2.2.0.
* guix/http-client.scm: Use 'guix:open-connection-for-uri' for the
procedure coming from (guix build download).
* guix/scripts/lint.scm: Likewise.
* guix/scripts/substitute.scm: Likewise.
2017-03-18 00:39:50 +01:00
Ludovic Courtès 36626c556e
build: Require Guile >= 2.0.9.
* configure.ac: Bump requirement to 2.0.9.
* doc/guix.texi (Requirements): Adjust accordingly.
* README (Requirements): Likewise.
* build-aux/download.scm: Remove workaround for <http://bugs.gnu.org/13095>.
* guix/build/download.scm: Likewise.
(http-fetch)[post-2.0.7?]: Remove.  Remove conditional code for not
POST-2.0.7?.
* guix/http-client.scm:  Remove workaround for <http://bugs.gnu.org/13095>.
(http-fetch)[post-2.0.7?]: Remove.  Remove conditional code for not
POST-2.0.7?.
* guix/serialization.scm (read-latin1-string): Remove mention of 2.0.9.
* tests/nar.scm: Use (ice-9 control).
(let/ec): Remove.
2017-03-18 00:39:49 +01:00
Danny Milosavljevic 4ed64c534a
build/cargo-build-system: Make cargo-build-system install working packages.
* guix/build/cargo-build-system.scm (configure): Remove proprietary
dependencies. Add rust dependencies and configure Cargo to find them.
(build): Also build libraries, not just applications.
(file-sha256): New variable.
(generate-checksums): New variable. Export it.
(touch): New variable.
(install): Generate checksums so Cargo accepts the package.
2017-03-17 16:48:09 +01:00
Marius Bakke 4b7e5c1131
Merge branch 'master' into core-updates 2017-03-15 17:52:26 +01:00
Ludovic Courtès 70dfdd501a
syscalls: Adjust 'clone' to Guile 2.2.
Before that, something like:

  (call-with-container
    (lambda ()
      (match (primitive-fork)
        …)))

would hang in 'primitive-fork' as the child process (the one started in
the container) would try to pthread_join the finalization thread in
'stop_finalization_thread' in libguile, not knowing that this thread is
nonexistent.

* guix/build/syscalls.scm (%set-automatic-finalization-enabled?!): New
procedure.
(without-automatic-finalization): New macro.
(clone): Wrap PROC call in 'without-automatic-finalization'.
2017-03-15 15:19:53 +01:00
Efraim Flashner 3f9543aee1
Merge remote-tracking branch 'origin/master' into core-updates 2017-03-13 23:08:49 +02:00
Ludovic Courtès b111bceecc
download: Export '%x509-certificate-directory'.
* guix/build/download.scm (%x509-certificate-directory): Export, as
expected by (guix scripts pull) since commit
7e81d699de.
2017-03-13 21:52:38 +01:00
Ludovic Courtès 334c95306a
syscalls: Adjust 'define-bits' to macro literal semantics of 2.2.
* guix/build/syscalls.scm (define-bits): Do not define NAMES... as
top-level variables since that prevents literal matches in 2.2.
Instead, determine constant values at expansion time.
2017-03-12 17:47:25 +01:00
Ludovic Courtès e90e0fad1b
Merge branch 'master' into core-updates 2017-03-09 16:35:41 +01:00
Manolis Ragkousis 751702676e
guix: build: make-bootstrap: Copy "falloc.h" to the new system.
In glibc-2.25 a dependency on "linux/falloc.h" was added.
This also reverts commit 8f8f250bdc
which is no longer needed. This commit was not compatible with
the glibc version Hurd is using. See
<https://lists.gnu.org/archive/html/guix-devel/2017-02/msg01046.html>

* guix/build/make-bootstrap.scm (make-stripped-libc): Copy "falloc.h"
to the new system.
* gnu/packages/patches/glibc-bootstrap-system.patch: Remove part
that touches fcntl-linux.h.

Problem reported by Andreas Enge <andreas@enge.fr>.
2017-02-27 15:31:06 +02:00
Marius Bakke 8779987bba
Merge branch 'master' into python-tests 2017-02-27 12:42:22 +01:00
Efraim Flashner d15432ca9e
Merge remote-tracking branch 'origin/master' into core-updates 2017-02-20 12:56:14 +02:00
Danny Milosavljevic 80345600fa
build: dub-build-system: Don't use "dub run" at all.
It doesn't make sense to run non-test executables (which is what "dub run"
would do).

The "check" function already invokes "dub test" and that's enough.

* guix/build/dub-build-system.scm (build): Remove "dub run" invocation.
2017-02-14 10:18:35 +01:00
Marius Bakke 424b1ae769
Merge branch 'master' into python-tests 2017-02-13 22:35:05 +01:00
Ludovic Courtès 768f0ac9dd
Merge branch 'master' into core-updates 2017-02-10 17:40:25 +01:00
Danny Milosavljevic 65e862d1a2
gnu: Add dub-build-system.
* guix/build-system/dub.scm: New file.
* guix/build/dub-build-system.scm: New file.
* Makefile.am (MODULES): Add them.
* doc/guix.texi: Add section for dub-build-system.
2017-02-10 16:21:50 +01:00
Leo Famulari e8c83d04e1
Merge branch 'master' into core-updates 2017-02-02 10:52:24 -05:00
Ricardo Wurmus de643f0c15
build: r-build-system: Use deterministic built date.
Fixes <http://bugs.gnu.org/25598>.

* guix/build/r-build-system.scm (install): Pass "--built-timestamp" option to
make build deterministic.
2017-02-02 15:20:50 +01:00
Marius Bakke 5a64a79131
utils: Add helper method to make files writable.
* gnu/build/activation.scm (make-file-writable): Move this to ...
* guix/build/utils.scm (make-file-writable): ... here. Export it.
* guix/build/gnu-build-system.scm (strip): Use it.
2017-01-26 22:19:16 +01:00
Ludovic Courtès 1d636d6319
build-system/gnu: Add 'reset-gzip-timestamps' phase.
* guix/build/gnu-build-system.scm (reset-gzip-timestamps): New
procedure.
(%standard-phases): Add it.
2017-01-26 22:05:49 +01:00
Ludovic Courtès 95e7be9728
utils: Add 'gzip-file?' and 'reset-gzip-timestamp'.
* guix/build/utils.scm (%gzip-magic-bytes): New variable.
(gzip-file?, reset-gzip-timestamp): New procedures.
2017-01-26 21:58:37 +01:00
Ricardo Wurmus 0db2ff65e7
bournish: Extend 'rm' command.
* guix/build/bournish.scm (rm-command): New procedure.
(%commands): Use it.
* tests/bournish.scm: Add tests for "rm" and "rm -r".
2017-01-26 13:49:56 +01:00
Ludovic Courtès 0363474a0b
build-system/gnu: 'strip' phase now skips symlinks.
This avoids a situation where the "debug" output would contain separate
(and different) .debug files for "libfoo.so" and "libfoo.so.0.0", even
though "libfoo.so" is actually a symlink to "libfoo.so.0.0".

* guix/build/gnu-build-system.scm (strip): Remove 'file-exists?' call in
'for-each' lambda.  Pass a predicate to 'find-files' to restrict the
result to regular files.
2017-01-26 11:29:38 +01:00
Leo Famulari d123f2f991
Merge branch 'master' into core-updates 2017-01-25 12:42:39 -05:00
Ludovic Courtès 3483f004a9
syscalls: Export 'read-utmpx'.
* guix/build/syscalls.scm (read-utmpx-from-port): New procedure.
* tests/syscalls.scm ("read-utmpx, EOF")
("read-utmpx"): New tests.
2017-01-24 00:46:37 +01:00
Ludovic Courtès 58ea4d407c
Merge branch 'master' into core-updates 2017-01-23 22:33:10 +01:00
Ludovic Courtès fcd75bdbfa
search-paths: Allow specs with #f as their separator.
This adds support for single-entry search paths.
Fixes <http://bugs.gnu.org/25422>.
Reported by Leo Famulari <leo@famulari.name>.

* guix/search-paths.scm (<search-path-specification>)[separator]:
Document as string or #f.
(evaluate-search-paths): Add case for SEPARATOR as #f.
(environment-variable-definition): Handle SEPARATOR being #f.
* guix/build/utils.scm (list->search-path-as-string): Add case for
SEPARATOR as #f.
(search-path-as-string->list): Likewise.
* guix/build/profiles.scm (abstract-profile): Likewise.
* tests/search-paths.scm: New file.
* Makefile.am (SCM_TESTS): Add it.
* tests/packages.scm ("--search-paths with single-item search path"):
New test.
* gnu/packages/version-control.scm (git)[native-search-paths](separator):
New field.
2017-01-23 22:23:41 +01:00
Ludovic Courtès 150309726f
syscalls: Add utmpx procedures and data structure.
* guix/build/syscalls.scm (<utmpx-entry>): New record type.
(%utmpx): New C struct.
(login-type): New bits.
(setutxent, endutxent, getutxent, utmpx-entries): New procedures.
2017-01-19 23:21:25 +01:00
Ludovic Courtès 57f068bec5
syscalls: Extract 'bytes->string'.
* guix/build/syscalls.scm (bytes->string): New procedure.
(bytevector->string-list): Use it.
2017-01-19 23:20:57 +01:00
Leo Famulari cc0725914e
Merge branch 'master' into python-tests 2017-01-13 10:21:17 -05:00
Leo Famulari 74288230ea
Merge branch 'master' into core-updates 2017-01-06 17:14:41 -05:00
Julien Lepiller e6876cb9dc
gnu: Add ocaml-build-system.
* guix/build/ocaml-build-system.scm: New file.
* guix/build-system/ocaml.scm: New file.
* Makefile.am (MODULES): Add them.
* gnu/packages/ocaml.scm (ocaml)[native-search-paths]: Adjuste OCAMLPATH.

Signed-off-by: David Craven <david@craven.ch>
2017-01-04 16:03:39 +01:00
Manolis Ragkousis 484437bd43
guix: build: make-bootstrap: Copy libpthread_nonshared.a to the new system.
* guix/build/make-bootstrap.scm (%libc-object-files-rx): Update regexp.
2017-01-03 16:00:43 +02:00
Ludovic Courtès a6e0ae4046
syscalls: 'terminal-columns' swallows ENOSYS.
* guix/build/syscalls.scm (terminal-columns): Catch ENOSYS.
2017-01-01 23:38:07 +01:00
David Craven f1d136957d
build-system: cargo: Handle Cargo.lock file not present.
* guix/build-system/cargo.scm (cargo-build): Add src output.
  (private-keywords): Add #:outputs.
* guix/build/cargo-build-system.scm (configure): Use /share/rust-source
  when replacing inputs.
  (build, check): Don't do anything when there isn't a Cargo.lock file
  present.
  (install): Install sources to src output. When a Cargo.lock file is
  present use cargo install to install binaries to out.
* guix/import/crate.scm (make-crate-sexp): Importer uses the src output
  for crate inputs by default.
* guix/import/utils.scm (package-names->package-inputs, maybe-inputs,
  maybe-native-inputs): Take an optional output argument.
* tests/crate.scm (crate->guix-package test): Update.

Problem reported by Francisco Gómez García <espectalll@kydara.com>.
2017-01-01 18:20:52 +01:00
David Craven dc77498c1c
build-system: cargo: Make Cargo.toml writeable.
* guix/build/cargo-build-system.scm (configure): Make sure Cargo.toml
  is writeable before attempting modification.

Problem reported by Danny Milosavljevic <dannym@scratchpost.org>.
2017-01-01 18:11:57 +01:00
Ludovic Courtès 580deec5b4
download: Protect against dangling symlinks in $SSL_CERT_DIR.
Reported by Christopher Baines <mail@cbaines.net>
in <https://bugs.gnu.org/25213>.

* guix/build/download.scm (make-credendials-with-ca-trust-files): Check
whether FILE exists before calling
'set-certificate-credentials-x509-trust-file!'.
2016-12-16 18:00:01 +01:00
David Craven 4b3cb7f4bc
build-system: Add cargo build system.
* guix/build-system/cargo.scm: New file.
* guix/build/cargo-build-system.scm: New file.
* Makefile.am (MODULES): Add files.
2016-12-14 16:30:42 +01:00
Marius Bakke e46a043ecd
build-system/python: Make sure 'check' returns failures.
* guix/build/python-build-system.scm (check): Wrap 'call-setuppy' in 'if' so
that it actually fails when the tests fail. Print informational message when
skipped.
2016-12-13 21:04:31 +01:00