Commit Graph

358 Commits (d838e7029854d8517c0c5b631f6042a925c86a81)

Author SHA1 Message Date
Eric Bavier d5b3de6af2 utils: Strip duplicates from search path.
* guix/build/utils.scm (search-path-as-list): Delete duplicate input
  directories before searching.
2015-02-10 13:31:56 -06:00
Ricardo Wurmus a677c7267b build: Add 'waf-build-system'.
* guix/build-system/waf.scm,
  guix/build/waf-build-system.scm: New files.
* Makefile.am (MODULES): Add them.
* doc/guix.texi (Build Systems): Document waf-build-system.
2015-02-08 19:21:58 +01:00
Mark H Weaver 89328d240f Add support for 'cvs-fetch' method in origins.
* guix/cvs-download.scm, guix/build/cvs.scm: New files.
* Makefile.am (MODULES): Add them.
2015-02-04 01:51:20 -05:00
Ludovic Courtès ca79e42ea2 build-system/glib-or-gtk: Add MIME directories to $XDG_DATA_DIRS.
Fixes an Evince regression introduced in commit 3d243e9.

* guix/build/glib-or-gtk-build-system.scm (data-directories): Check the
  /mime sub-directory.
2015-01-23 23:49:24 +01:00
Mark H Weaver a813710a5f Merge branch 'master' into core-updates 2015-01-13 12:14:08 -05:00
Federico Beffa f5895dab8a build/glib-or-gtk-build-system: Fix 'generate-icon-cache'.
Reported by Mark H Weaver <mhw@netris.org>

* guix/build/glib-or-gtk-build-system.scm (generate-icon-cache): Add check for
  existence of icons directory.
2015-01-13 09:16:47 +01:00
Federico Beffa 61771a79ab guix: build/glib-or-gtk-build-system: Add support for GIO and XDG theming.
* guix/build/glib-or-gtk-build-system.scm (data-directories): Rename
  'schemas-directories' to 'data-directories' and add support for XDG theming
  data.

* guix/build/glib-or-gtk-build-system.scm (gio-module-directories): New
  function.

* guix/build/glib-or-gtk-build-system.scm (wrap-all-programs): Update names to
  reflect that we are dealing with more types of data and not only with
  schemas.  Add handling of GIO modules.

* guix/build-system/glib-or-gtk.scm (lower): Import the 'bin' output of GLib
  instead of 'out'.  This was an error since we need the program
  'glib-compile-schemas'.  Update the description.
2015-01-12 18:00:08 +01:00
Ludovic Courtès 4eb01e5442 build-system/gnu: Patch /usr/bin/file in all 'configure' files.
* guix/build/utils.scm (patch-/usr/bin/file): New procedure.
* guix/build/gnu-build-system.scm (patch-usr-bin-file): Rewrite using
  it.  Patch all the files returned by 'find-files' that are executable.
* gnu/packages/gawk.scm (gawk)[arguments]: Remove use of 'substitute*'
  for 'extension/configure'.
2015-01-09 23:29:20 +01:00
Mark H Weaver 23800e4736 Merge branch 'master' into core-updates 2015-01-06 12:57:15 -05:00
宋文武 9331ba5dd9 linux-boot: Make /etc/mtab a symlink to /proc/self/mounts.
Fixes <http://bugs.gnu.org/19491>.

* gnu/build/linux-boot.scm (mount-root-file-system): Make /root/etc/mtab
  a symlink to /proc/self/mounts.
* gnu/build/file-systems.scm (mount-file-system): Don't update /etc/mtab.
* guix/build/syscalls.scm (mount, umount): Have #:update-mtab? default to
  #f.
2015-01-05 22:24:00 +08:00
Ludovic Courtès ac70048be2 build-system/gnu: Use executables from the target inputs in 'patch-shebangs'.
Fixes <http://bugs.gnu.org/18895>.

* guix/build/gnu-build-system.scm (patch-shebangs): Add #:inputs
  parameter.  Remove 'bindirs'.  Add 'bin-directories',
  'output-bindirs', and 'input-bindirs'.  Use them instead of (getenv
  "PATH") to as the argument to 'patch-shebang'.
2015-01-04 18:16:16 +01:00
Mark H Weaver 8cbb67e045 Merge branch 'master' into core-updates 2014-12-30 12:23:32 -05:00
Ludovic Courtès 7da473b757 gnu: Revert use of '--strip-all'.
This reverts commits f05bdc9412
and 856ae5e6c7.

This broke all sorts of things.  See <http://hydra.gnu.org/eval/102058>,
for example.
2014-12-29 21:54:12 +01:00
Ludovic Courtès dd8ea244f4 download: Export 'maybe-expand-mirrors'.
* guix/build/download.scm (uri-vicinity, maybe-expand-mirrors): New
  procedures.
  (url-fetch): Remove them from here.
2014-12-29 21:19:17 +01:00
Ludovic Courtès f05bdc9412 gnu: Don't use --strip-all in cases where this is problematic.
This is a followup to 856ae5e.  See <http://hydra.gnu.org/build/180506>
for an example of build failure.

* guix/build/gnu-build-system.scm (strip): Add #:archive-strip-flags
  parameter.  Use it when (ar-file? path).
* guix/build-system/gnu.scm (gnu-build): Add #:archive-strip-flags
  parameter and pass it down.
* gnu/packages/commencement.scm (gcc-boot0)[arguments]: Add
  #:strip-flags.
* gnu/packages/base.scm (glibc)[arguments]: Likewise.
2014-12-28 23:46:59 +01:00
Ludovic Courtès a3bf096945 lint: Add 'home-page' checker.
* guix/build/download.scm (open-connection-for-uri): Export.
* guix/scripts/lint.scm (probe-uri, check-home-page): New procedures.
  (%checkers): Add 'home-page' checker.
2014-12-28 17:57:36 +01:00
Ludovic Courtès bd2fc4d813 utils: Export 'search-path-as-list'.
* guix/build/utils.scm (search-path-as-list): Make public.
* guix/scripts/environment.scm (for-each-search-path): Use it.
2014-12-27 23:24:35 +01:00
Ludovic Courtès 7ec02d374d build-support/gnu: Add support for file patterns in search paths.
* guix/build/utils.scm (search-path-as-list): Add #:pattern parameter
  and honor it.
  (set-path-environment-variable): Likewise, and pass it to
  'search-path-as-list'.
* guix/packages.scm (search-path-specification->sexp): Add PATTERN slot.
* guix/build/gnu-build-system.scm (set-paths): Adjust accordingly.
2014-12-27 23:22:55 +01:00
Ludovic Courtès 856ae5e6c7 build-system/gnu: Strip with '--strip-all' instead of '--strip-debug'.
This saves 19% on the 'bin' directory of Coreutils, and certainly
helpful for things like Git's 'libexec' directory.

* guix/build-system/gnu.scm (gnu-build): Change default value for
  #:strip-flags to '("--strip-all").
* guix/build/gnu-build-system.scm (strip): Ditto.
* gnu/packages/linux.scm (linux-libre)[arguments]: Add #:strip-flags.
2014-12-27 19:20:18 +01:00
Ludovic Courtès 6aa47e3883 build-system/gnu: Add support for non-directory search paths.
Partly fixes <http://bugs.gnu.org/18033>.

* guix/build/utils.scm (search-path-as-list): Rename 'sub-directories'
  parameter to 'files'.  Add #:type parameter and honor it.
  (set-path-environment-variable): Likewise.  Pass #:type to
  'search-path-as-list'.
* guix/packages.scm (search-path-specification->sexp): Add 'directory as
  the last item of the tuple.
* guix/build/gnu-build-system.scm (set-paths): Add 'type' to search-path
  pattern.  Pass #:type to 'set-path-environment-variable'.
2014-12-27 12:25:31 +01:00
Ludovic Courtès 763a401ed1 Merge branch 'master' into core-updates 2014-12-26 23:31:04 +01:00
Ludovic Courtès c9bf64d6d7 syscalls: Add more procedures for network interfaces.
* guix/build/syscalls.scm (sizeof*, type-size, write-type, write-types,
  read-type, read-types, define-c-struct): New macros.
  (SIOCSIFFLAGS, SIOCGIFADDR, SIOCSIFADDR): New variables.
  (sockaddr-in, sockaddr-in6): New C structs.
  (write-socket-address!, read-socket-address,
  set-network-interface-flags, set-network-interface-address,
  network-interface-address, configure-network-interface): New
  procedures.
2014-12-19 17:15:53 +01:00
Federico Beffa 6f8fe4b29e build/python-build-system: Fix easy-install.pth collisions.
* guix/build/python-build-system.scm (rename-pth-file): New rename-pth-file
  phase and corresponding function.
2014-12-18 17:58:10 +01:00
Ludovic Courtès c4a1b6c2ba Merge branch 'master' into 'core-updates'. 2014-12-14 11:55:07 +01:00
Ludovic Courtès 2ed11b3a3e utils: Change 'wrap-program' to preserve the original argv[0].
Suggested by Mark H Weaver <mhw@netris.org>
in <http://bugs.gnu.org/19138>.

* guix/build/utils.scm (wrap-program): Change wrapper to use "exec -a
  PROG" instead of just "exec".
2014-12-14 11:54:12 +01:00
Ludovic Courtès c809ec94d1 utils: Change 'patch-makefile-SHELL' to support ":=" assignments.
Reported by Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>.

* guix/build/utils.scm (patch-makefile-SHELL): Update regexp to match
  ":=" assignments.
2014-12-13 00:06:32 +01:00
Ludovic Courtès 5e5deea952 utils: Use 'which' to find the shell in 'patch-makefile-SHELL'.
* guix/build/utils.scm (patch-makefile-SHELL)[find-shell]: Use 'which'.
2014-12-13 00:04:25 +01:00
Alex Kost 0b08600ca5 build: emacs-utils: Add 'emacs-generate-autoloads'.
* guix/build/emacs-utils.scm (emacs-generate-autoloads): New procedure.
2014-12-02 22:09:23 +03:00
Ludovic Courtès 73aa8ddb75 build-system/glib-or-gtk: Allow specific outputs to be excluded from wrapping.
* guix/build/glib-or-gtk-build-system.scm (wrap-all-programs): Add
  #:glib-or-gtk-wrap-excluded-outputs parameter and honor it.
* guix/build-system/glib-or-gtk.scm (glib-or-gtk-build): Add
  #:glib-or-gtk-wrap-excluded-outputs parameter and pass it in BUILDER.
* doc/guix.texi (Build Systems): Mention it.
2014-12-01 22:41:04 +01:00
Ludovic Courtès c8b7569558 build-system/glib-or-gtk: Correctly handle multiple-output packages.
* guix/build/glib-or-gtk-build-system.scm (wrap-all-programs): Move body
  to 'handle-output' inner procedure, and parametrize it by output name
  and directory.  Call it for each element of OUTPUTS.
  (compile-glib-schemas): Likewise.
2014-12-01 22:41:04 +01:00
Ludovic Courtès 4efdabb810 build-system/glib-or-gtk: Use 'for-each' and 'cut' as appropriate.
* guix/build/glib-or-gtk-build-system.scm (wrap-all-programs): Use
  'for-each' instead of 'map' in for-effect contexts.  Use 'cut' instead
  of 'lambda' when appropriate.
2014-12-01 22:41:04 +01:00
Ludovic Courtès 85dbd3dcd0 build-system/glib-or-gtk: Clean up whitespace.
* guix/build/glib-or-gtk-build-system.scm: M-x whitespace-cleanup.
2014-12-01 22:41:04 +01:00
Ludovic Courtès 7cc7dec139 build-system/gnu: Add 'compress-documentation' phase.
* guix/build/gnu-build-system.scm (compress-documentation): New
  procedure.
  (%standard-phases): Add it.
2014-12-01 16:50:28 +01:00
Ludovic Courtès 9741aca9a5 utils: Add 'symbolic-link?'.
* guix/build/utils.scm (symbolic-link?): New procedure.
2014-12-01 15:46:38 +01:00
Ludovic Courtès d68fe74162 build-system/gnu: Add 'validate-documentation-location' phase.
* guix/build/gnu-build-system.scm (validate-documentation-location): New
  procedure.
  (%standard-phases): Add it.
2014-12-01 14:09:36 +01:00
Taylan Ulrich Bayırlı/Kammer 094b2efc3c utils: Improve docstring of 'substitute*' & co.
* 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>
2014-11-26 11:17:48 +01:00
Ludovic Courtès f8bcf1935a build-system/gnu: Gracefully handle dangling symlinks in the 'strip' phase.
* 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>.
2014-11-24 22:45:41 +01:00
Ludovic Courtès c23d17095d utils: 'elf-file?' and 'ar-file?' return #f for directories.
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.
2014-11-23 19:19:35 +01:00
Ludovic Courtès 1d1fa9327c utils: Turn 'parallel-job-count' into a parameter.
* guix/build/utils.scm (parallel-job-count): Turn into a SRFI-39 parameter.
2014-11-22 21:57:05 +01:00
Ludovic Courtès e8c7fdda5d build-system/gnu: Strip 'ar' archives as well.
* guix/build/gnu-build-system.scm (strip): Also strip when (ar-file?
  PATH) is true.
2014-11-22 21:54:27 +01:00
Ludovic Courtès 2bbc6db5e2 utils: Factorize magic bytes detection.
* guix/build/utils.scm (file-header-match): New procedure.
  (%elf-magic-bytes): New variable.
  (elf-file?, ar-file?): Define using 'file-header-match'.
2014-11-22 21:52:57 +01:00
Ludovic Courtès 91ee959b03 utils: Add 'ar-file?'.
* guix/build/utils.scm (%ar-magic-bytes): New variable.
  (ar-file?): New procedure.
2014-11-22 21:52:12 +01:00
Ludovic Courtès 50b87bd54b build-system/gnu: Strip only ELF files.
Suggested by Mark H Weaver <mhw@netris.org>
at <http://lists.gnu.org/archive/html/guix-devel/2014-10/msg00395.html>.

* guix/build/gnu-build-system.scm (strip)[strip-dir]: Strip only
  when (elf-file? PATH) is true.
2014-11-22 12:49:14 +01:00
Ludovic Courtès 99533da50d utils: Add 'elf-file?'.
* guix/build/utils.scm (elf-file?): New procedure.
2014-11-22 12:44:56 +01:00
Ludovic Courtès e6039b9c70 utils: Export 'parallel-job-count'.
* guix/build/utils.scm (parallel-job-count): New procedure.
* guix/build/gnu-build-system.scm (%parallel-job-count): Remove.
  (build, check): Use 'parallel-job-count' instead.
2014-11-22 12:32:32 +01:00
Ludovic Courtès cd4a3cb359 syscalls: Update /etc/mtab, not /etc/fstab.
* guix/build/syscalls.scm (remove-from-mtab): Replace "fstab" with
  "mtab".
2014-11-14 00:41:01 +01:00
Ludovic Courtès ccea821bef syscalls: Add 'mount-points'.
* guix/build/syscalls.scm (mount-points): New procedure.
* tests/syscalls.scm ("mount-points"): New test.
2014-11-10 22:42:14 +01:00
Ludovic Courtès f81ac34dd9 pull: Use the build procedure provided by the newly-downloaded Guix.
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.
2014-11-09 22:33:45 +01:00
Ludovic Courtès 38bf090e7c download: Add "Accept: */*" to the headers.
Fixes downloads from https://alioth.debian.org.
Reported by John Darrington <jmd@gnu.org>.

* guix/build/download.scm (http-fetch)[headers]: Add 'Accept'.
2014-10-19 12:07:53 +02:00
Federico Beffa be3425e5a9 gnu: Add the 'glib-or-gtk' build system.
* guix/build-system/glib-or-gtk.scm, guix/build/glib-or-gtk-build-system.scm:
  New files.
* Makefile.am (MODULES): Add them.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2014-10-08 12:01:50 +02:00
Ludovic Courtès fb59e275dd derivations: Add 'graft-derivation'.
* 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.
2014-10-08 12:01:49 +02:00
Ludovic Courtès 9849cfc12c build-system/cmake: Add #:build-type parameter, default to "RelWithDebInfo".
* 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.
2014-10-04 22:59:38 +02:00
David Thompson c08f9818f9 build: Add ruby build system.
* guix/build-system/ruby.scm: New file.
* guix/build/ruby-build-system: New file.
* Makefile.am (MODULES): Add new files.
* doc/guix.texi (Build Systems): Document ruby-build-system.
2014-09-28 15:09:24 -04:00
Mark H Weaver b5b73a8269 Use #:prefix instead of #:renamer with 'symbol-prefix-proc'.
* gnu/packages/abiword.scm, gnu/packages/admin.scm, gnu/packages/aidc.scm,
  gnu/packages/backup.scm, gnu/packages/bittorrent.scm,
  gnu/packages/boost.scm, gnu/packages/compression.scm,
  gnu/packages/cryptsetup.scm, gnu/packages/curl.scm,
  gnu/packages/cyrus-sasl.scm, gnu/packages/dc.scm, gnu/packages/emacs.scm,
  gnu/packages/fonts.scm, gnu/packages/fontutils.scm, gnu/packages/geeqie.scm,
  gnu/packages/ghostscript.scm, gnu/packages/gimp.scm,
  gnu/packages/gkrellm.scm, gnu/packages/gl.scm, gnu/packages/glib.scm,
  gnu/packages/gnome.scm, gnu/packages/gnunet.scm, gnu/packages/gnupg.scm,
  gnu/packages/gnutls.scm, gnu/packages/gnuzilla.scm, gnu/packages/gsasl.scm,
  gnu/packages/gtk.scm, gnu/packages/gv.scm, gnu/packages/image.scm,
  gnu/packages/indent.scm, gnu/packages/inkscape.scm,
  gnu/packages/lesstif.scm, gnu/packages/links.scm, gnu/packages/lisp.scm,
  gnu/packages/lsh.scm, gnu/packages/lsof.scm, gnu/packages/maths.scm,
  gnu/packages/mp3.scm, gnu/packages/openssl.scm, gnu/packages/ots.scm,
  gnu/packages/pciutils.scm, gnu/packages/pcre.scm, gnu/packages/pdf.scm,
  gnu/packages/pulseaudio.scm, gnu/packages/python.scm, gnu/packages/slim.scm,
  gnu/packages/ssh.scm, gnu/packages/texlive.scm, gnu/packages/vim.scm,
  gnu/packages/vpn.scm, gnu/packages/web.scm, gnu/packages/wv.scm,
  gnu/packages/xiph.scm, gnu/packages/xml.scm, gnu/packages/xorg.scm,
  gnu/packages/yasm.scm, gnu/packages/zip.scm,
  guix/build/cmake-build-system.scm, guix/build/perl-build-system.scm,
  guix/build/python-build-system.scm, guix/download.scm: Replaces uses of
  #:renamer and 'symbol-prefix-proc' with #:prefix.
2014-09-23 18:52:29 -04:00
Ludovic Courtès f07aa672fd Merge branch 'core-updates' 2014-09-22 23:06:33 +02:00
Ludovic Courtès 8591fae4cf syscalls: Adjust /proc/net/dev parser for old kernels.
* guix/build/syscalls.scm (%interface-line): Remove whitespace in rest
  pattern.  (There's no extra whitespace after the colon with Linux
  2.6.32.)
2014-09-22 21:12:26 +02:00
Ludovic Courtès 077bd18d22 download: Use the 'SERVER NAME' TLS extension when possible.
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.
2014-09-22 21:06:39 +02:00
Ludovic Courtès 715fc9d44d syscalls: Add 'swapon' and 'swapoff'.
* guix/build/syscalls.scm (swapon, swapoff): New procedures.
* tests/syscalls.scm ("swapon, ENOENT/EPERM", "swapoff, EINVAL/EPERM"):
  New tests.
2014-09-18 20:19:56 +02:00
Ludovic Courtès 4d54785c69 syscalls: Add 'all-network-interfaces'.
* 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).
2014-09-14 23:49:02 +02:00
Ludovic Courtès 973eea3478 syscalls: Add 'network-interface-flags'.
* guix/build/syscalls.scm (SIOCGIFFLAGS, IFF_UP, IFF_BROADCAST,
  IFF_LOOPBACK, IF_NAMESIZE): New variables.
  (network-interface-flags, loopback-network-interface?): New
  procedures.
* tests/syscalls.scm ("network-interface-flags",
  "loopback-network-interface?"): New tests.
2014-09-14 23:49:02 +02:00
Ludovic Courtès 7585016f53 syscalls: Add 'network-interfaces'.
* guix/build/syscalls.scm (SIOCGIFCONF, ifconf-struct,
  ifreq-struct-size): New variables.
  (%ioctl, bytevector->string-list, network-interfaces): New
  procedures.
* tests/syscalls.scm ("network-interfaces"): New test.
2014-09-14 23:49:02 +02:00
Mark H Weaver c041886d92 utils: Import (ice-9 format).
* guix/build/utils.scm: Import (ice-9 format).
2014-09-14 11:54:25 -04:00
Eric Bavier de61113857 utils: Allow wrap-program to be called multiple times.
* 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.
2014-09-13 21:53:21 -05:00
Mark H Weaver e759c0a38c Merge branch 'master' into core-updates 2014-09-08 11:00:06 -04:00
Ludovic Courtès b50c5b7418 pull: Add a compilation progress report.
* 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'.
2014-09-05 23:11:04 +02:00
Eric Bavier 1145938496 utils: Clean trailing whitespace at end of SHELL
* guix/build/utils.scm (patch-makefile-SHELL): Remove trailing whitespace.
2014-09-05 00:02:19 -05:00
Ludovic Courtès 6fd1a79674 vm: Move store copy handling to (guix build store-copy).
* gnu/build/vm.scm (read-reference-graph, populate-store): Move to...
* guix/build/store-copy.scm: ... here.  New file.
* Makefile.am (MODULES): Add it.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Adjust default
  #:modules values accordingly.
* tests/gexp.scm ("gexp->derivation, store copy"): New test.
2014-09-04 23:24:54 +02:00
Ludovic Courtès 548f7a8fa2 Move operating system helpers from (guix build …) to (gnu build …).
* guix/build/activation.scm, guix/build/install.scm,
  guix/build/linux-initrd.scm, guix/build/vm.scm: Move to...
* gnu/build: ... here.
* Makefile.am (MODULES): Remove the above guix/build/ files.
* gnu-system.am (GNU_SYSTEM_MODULES): Add the above gnu/build/ files
  here.
* gnu/services/base.scm, gnu/services/dmd.scm, gnu/system.scm,
  gnu/system/linux-initrd.scm, gnu/system/vm.scm,
  guix/scripts/system.scm: Adjust to the new module names.
2014-09-03 15:43:07 +02:00
Mark H Weaver c00a9fbfef Merge branch 'master' into core-updates
Conflicts:
	gnu/packages/base.scm
2014-08-28 14:22:15 -04:00
Eric Bavier 83291101c3 utils: Preserve makefile shell arguments during patch.
* guix/build/utils.scm (patch-makefile-SHELL): Preserve shell arguments.
2014-08-28 11:16:19 -05:00
Ludovic Courtès 5c3eb14e07 linux-initrd: Wait a bit longer for partitions to appear.
Reported by Sveltana on #guix.

* guix/build/linux-initrd.scm (canonicalize-device-spec): Increase
  MAX-TRIALS.  Add "waiting for partition" 'format' call.
2014-08-28 09:21:21 +02:00
Mark H Weaver 8a0576f175 gnu-build-system: Add 'patch-usr-bin-file' to %standard-phases.
* guix/build/gnu-build-system.scm (patch-usr-bin-file): New procedure.
  (%standard-phases): Add it.
2014-08-23 20:48:18 -04:00
Ludovic Courtès c0b9213dbb linux-initrd: Do not create /etc/resolv.conf.
* guix/build/linux-initrd.scm (configure-qemu-networking): Don't create
  /etc/resolv.conf.
2014-08-15 16:26:28 +02:00
Mark H Weaver 75f3b1a12d Add (guix build emacs-utils).
* guix/build/emacs-utils.scm: New file.
* Makefile.am (MODULES): Add it.
* .dir-locals.el: Add indentation rules.
2014-08-14 23:53:04 -04:00
Ludovic Courtès c8fa34265d system: Add the 'system?' field for user groups.
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.
2014-07-25 00:12:35 +02:00
Ludovic Courtès 2c071ce96e system: Recognize more file system flags.
* 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'.
2014-07-23 02:02:07 +02:00
Ludovic Courtès 7f239fd33f system: Add 'file-system' decl. for /dev/pts, and use the right options.
Fixes <http://bugs.gnu.org/18081>.

* gnu/system/file-systems.scm (%devtmpfs-file-system): Add
  'needed-for-boot?' field.
  (%tty-gid, %pseudo-terminal-file-system): New variables.
  (%base-file-systems): Add %PSEUDO-TERMINAL-FILE-SYSTEM.
* gnu/services/base.scm (udev-service): Remove dependency on
  'file-system-/dev'.
* gnu/system/shadow.scm (%base-groups): Add 'id' field for group 'tty'.
* guix/build/linux-initrd.scm (boot-system): Remove 'mount' call for
  /dev/pts.
* doc/guix.texi (File Systems): Add %pseudo-terminal-file-system.
2014-07-23 02:02:07 +02:00
Ludovic Courtès 66c2703f09 install: Set the store's permission to #o1775.
Fixes <http://bugs.gnu.org/18053>.
Reported by Mark H Weaver <mhw@netris.org>.

* guix/build/install.scm (directives): Add mode #o1775 for STORE.
2014-07-19 14:26:19 +02:00
Ludovic Courtès 3485716fd9 install: Make /var/db and /mnt.
* guix/build/install.scm (directives): Add /var/db and /mnt.
2014-07-13 16:37:47 +02:00
Ludovic Courtès 66670cf39c vm: Add support for i686.
Partially fixes <http://bugs.gnu.org/18002>.
Reported by David Thompson <dthompson2@worcester.edu>.

* guix/build/vm.scm (qemu-command): Add optional 'system' parameter.
  Special-case "^i[3456]86$".
* gnu/system/vm.scm (system-qemu-image/shared-store-script): Use it.
2014-07-13 16:37:11 +02:00
Ludovic Courtès e3ced65af0 linux-initrd: Use 'call-with-error-handling' when booting.
* guix/build/linux-initrd.scm (canonicalize-device-spec): When label
  resolution fails, call 'error' instead of 'format' + 'start-repl'.
  (boot-system): Wrap most of body in 'call-with-error-handling'.
  Remove 'catch' around 'primitive-load' call.
2014-07-03 22:44:14 +02:00
Ludovic Courtès dccab4df20 linux-initrd: Remove unused local procedure.
* guix/build/linux-initrd.scm (boot-system)[resolve]: Remove.
2014-07-03 22:24:56 +02:00
Ludovic Courtès d266b79332 linux-initrd: Gracefully handle lack of or invalid ext2 superblocks.
Reported by David Thompson <dthompson2@worcester.edu>.

* guix/build/linux-initrd.scm (read-ext2-superblock): Add
  'superblock-size' variable.  Read with 'get-bytevector-n!' instead of
  'getbytevector-n', and make sure we read exactly SUPERBLOCK-SIZE
  bytes.
2014-07-02 12:18:36 +02:00
Ludovic Courtès 6750877f46 git-download: Support recursive clones.
* guix/git-download.scm (<git-reference>)[recursive?]: New field.
  (git-fetch): Add 'inputs' variable.  Add it to the #:inputs argument
  of 'build-expression->derivation'.  Augment builder with call to
  'set-path-environment-variable', and pass #:recursive? to
  'git-fetch'.
* guix/build/git.scm (git-fetch): Add #:recursive? parameter.  Pass
  --recursive when RECURSIVE? is true, and delete all the '.git' files.
2014-06-27 23:04:48 +02:00
Ludovic Courtès 459dd9eaf2 system: Add a 'system?' field to user accounts.
* gnu/system/shadow.scm (<user-account>)[system?]: New field.
* gnu/system.scm (user-account->gexp): Add it.
* guix/build/activation.scm (add-user): Add #:system? parameter and
  honor it.
  (activate-users+groups): Handle the 'system?' part of user tuples.
  Pass it to 'add-user'.  Don't create PROFILE-DIR when SYSTEM? is
  true.
* gnu/services/dbus.scm (dbus-service): Add 'system?' field for
  "messagebus" account.
* gnu/services/base.scm (guix-build-accounts): Likewise.
* gnu/services/avahi.scm (avahi-service): Likewise.
2014-06-27 19:06:08 +02:00
Ludovic Courtès f2c403eab6 system: Install /var/guix/profiles/system-1-link on new systems.
* guix/build/install.scm (directives): Add /var/guix/profiles/system.
  (populate-root-file-system): Add 'system' parameter.  Create
  /var/guix/profiles/system-1-link.
* guix/scripts/system.scm (install): Pass OS-DIR to
  'populate-root-file-system'.
* guix/build/vm.scm (initialize-root-partition): Add #:system-directory
  parameter, and pass it to 'populate-root-file-system'.
  (initialize-hard-disk): Add #:system-directory parameter, and pass it
  to 'initialize-root-partition'.
* gnu/system/vm.scm (qemu-image): Add #:os-derivation parameter and pass
  it to 'initialize-hard-disk'.
  (system-disk-image, system-qemu-image,
  system-qemu-image/shared-store): Pass #:os-derivation to 'qemu-image.
2014-06-27 19:06:08 +02:00
Ludovic Courtès f01efec09a activation: Preserve /etc/groups upon reboots.
This is a followup to e2fcc23.  The /etc/group file would be cleared
when booting.

* guix/build/activation.scm (activate-users+groups)[touch]: Rewrite so
  it does not wipe out FILE's contents.
2014-06-27 00:12:40 +02:00
Ludovic Courtès 9b9148d8bb linux-initrd: Allow unionfs to have a large number of open files.
Fixes <http://bugs.gnu.org/17827>.

* guix/build/linux-initrd.scm (mount-root-file-system) [volatile-root?]:
  Pass unionfs '-o max_file=65536'.
2014-06-21 17:35:56 +02:00
Ludovic Courtès 7470df5ddf Merge branch 'master' into core-updates 2014-06-14 23:25:59 +02:00
Ludovic Courtès 9d0b8fbd78 pull: Copy and compile gnu.scm.
* guix/build/pull.scm (build-guix): Copy gnu.scm to OUT.
2014-06-13 11:42:33 +02:00
Ludovic Courtès 872c69d00e Merge branch 'master' into core-updates 2014-06-06 17:23:14 +02:00
Ludovic Courtès e97c5be914 services: Use a fixed GID for the build group and use that for the store.
This partly reverts commit 185f669 ("services: Make sure the store's
group is the build group.")

* gnu/services/base.scm (guix-service)[activate]: Remove 'chown' call.
  Add 'id' field to 'user-group' form.
* guix/build/install.scm (directives): Set the store's GID to 30000.
2014-06-06 00:28:21 +02:00
Ludovic Courtès e2fcc23a3a activation: Only create groups that do not exist yet.
Before that the effect would be to re-create groups at each boot, and
thus remove any members of the groups.

* guix/build/activation.scm (activate-users+groups): Call 'add-group'
  only when (getgrname name) fails.
2014-06-04 23:08:09 +02:00
Ludovic Courtès 185f669109 services: Make sure the store's group is the build group.
* gnu/services/base.scm (guix-service)[activate]: New variable.  Add
  'chown' call for (%store-prefix).  Set the 'activate' field to
  ACTIVATE.
* guix/build/install.scm (directives): Add comment about STORE's group.
2014-06-04 22:19:30 +02:00
Ludovic Courtès d4c87617e5 system: File system sources can be marked as labels or devices.
* gnu/system/file-systems.scm (<file-system>)[title]: New field.
* gnu/services/base.scm (file-system-service): Add #:title parameter.
  In 'start' gexp, use 'canonicalize-device-spec' and honor TITLE.
* gnu/system.scm (other-file-system-services,
  operating-system-root-file-system, operating-system-initrd-file):
  Adjust accordingly.
* gnu/system/linux-initrd.scm (file-system->spec): Likewise.
* gnu/system/vm.scm (system-disk-image): Add 'title' field for the root
  file system.
* guix/build/linux-initrd.scm (mount-file-system): Expect the second
  element of SPEC to be the title.
  (boot-system)[root-mount-point?, root-fs-type]: Likewise.
* gnu/services/dmd.scm (dmd-configuration-file): Select
  'canonicalize-device-spec'.
2014-06-03 00:14:58 +02:00
Ludovic Courtès 2405858a04 linux-initrd: Wait for devices to appear when resolving a label.
* guix/build/linux-initrd.scm (canonicalize-device-spec): Add #:title
  parameter.  When resolving a label, wait a little and try several
  times before bailing out.
2014-06-02 23:48:55 +02:00
Ludovic Courtès 9b4a163a87 linux-initrd: Actually create /dev/console.
* guix/build/linux-initrd.scm (make-essential-device-nodes): Add
  "dev/console".
2014-06-01 23:51:12 +02:00
Ludovic Courtès ac52e80b4e linux-initrd: Make more device nodes for SCSI disks and CD-ROM devices.
* guix/build/linux-initrd.scm (make-disk-device-nodes): New procedure.
  (make-essential-device-nodes): Use it.  Make more devices nodes for
  SCSI disks and CD-ROM devices.
2014-06-01 21:48:57 +02:00
Ludovic Courtès 009d831167 linux-initrd: Gracefully handle missing /dev nodes.
* guix/build/linux-initrd.scm (partition-label-predicate): Catch
  'system-error' around 'read-ext2-superblock'; return #f upon ENOENT.
2014-06-01 21:20:54 +02:00
Ludovic Courtès 1bb784ea05 linux-initrd: Gracefully deal with partitions with no label.
* guix/build/linux-initrd.scm (partition-label-predicate): Check whether
  'ext2-superblock-volume-name' returns #f, and return #f if it does.
2014-05-31 15:55:38 +02:00