Commit Graph

1084 Commits (d2b299a91f3be283df1264afe62770ab2783ace9)

Author SHA1 Message Date
Ludovic Courtès bdb36958fb gnu: Split (gnu packages base), adding (gnu packages commencement).
* gnu/packages/base.scm (gnu-make-boot0, diffutils-boot0,
  findutils-boot0, %boot0-inputs, nix-system->gnu-triplet, boot-triplet,
  binutils-boot0, gcc-boot0, perl-boot0, linux-libre-headers-boot0,
  texinfo-boot0, %boot1-inputs, glibc-final-with-bootstrap-bash,
  cross-gcc-wrapper, static-bash-for-glibc, glibc-final,
  gcc-boot0-wrapped, %boot2-inputs, binutils-final, libstdc++,
  gcc-final, ld-wrapper-boot3, %boot3-inputs, bash-final, %boot4-inputs,
  guile-final, gnu-make-final, ld-wrapper, coreutils-final, grep-final,
  %boot5-inputs, %final-inputs, canonical-package, gcc-toolchain,
  gcc-toolchain-4.8, gcc-toolchain-4.9): Move to...
* gnu/packages/commencement.scm: ... here.  New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
* build-aux/check-final-inputs-self-contained.scm: Adjust accordingly.
* gnu/packages/cross-base.scm: Likewise.
* gnu/packages/make-bootstrap.scm: Likewise.
* guix/build-system/cmake.scm (cmake-build): Likewise.
* guix/build-system/gnu.scm (standard-packages, gnu-build,
  gnu-cross-build): Likewise.
* guix/build-system/perl.scm (perl-build): Likewise.
* guix/build-system/python.scm (python-build): Likewise.
* guix/build-system/trivial.scm (guile-for-build): Likewise.
* guix/download.scm (url-fetch): Likewise.
* guix/gexp.scm (default-guile): Likewise.
* guix/git-download.scm (git-fetch): Likewise.
* guix/monads.scm (run-with-store): Likewise.
* guix/packages.scm (default-guile): Likewise.
* guix/scripts/package.scm (guix-package): Likewise.
* guix/scripts/refresh.scm: Likewise.
* guix/svn-download.scm (svn-fetch): Likewise.
* tests/builders.scm (%bootstrap-inputs, %bootstrap-search-paths):
  Likewise.
* tests/packages.scm ("GNU Make, bootstrap"): Likewise.
* tests/guix-package.sh: Likewise.
* gnu/services/base.scm: Use 'canonical-package' instead of xxx-final.
* gnu/services/xorg.scm: Likewise.
* gnu/system/vm.scm: Likewise.
* guix/scripts/pull.scm (guix-pull): Likewise.
2014-08-28 09:21:54 +02: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
Ludovic Courtès 2f0556ae5e profiles: Add gzip to $PATH before invoking 'install-info'.
* guix/profiles.scm (info-dir-file)[gzip]: New variable.
  [build]: Add 'setenv' call.
2014-08-28 09:21:06 +02:00
Andreas Enge 384de55233 build-system/perl: Add handling of flags for parallel build and testing.
* guix/build-system/perl.scm (perl-build): Add support for variables
    parallel-build? and parallel-tests?.
* guix/build-system/gnu.scm (gnu-build): Add a line break for clarity.
2014-08-27 14:29:18 +02:00
Mark H Weaver 5cc4517590 Merge branch 'master' into core-updates 2014-08-26 12:03:13 -04:00
Ludovic Courtès c2815c0f46 profiles: Handle packages without a 'share/info' directory.
Reported by Mark H. Weaver.

* guix/profiles.scm (info-dir-file): Handle the case where 'scandir'
  returns #f.
2014-08-25 10:27:37 +02:00
Ludovic Courtès c6df09941b guix-register: By default, attempt to deduplicate registered items.
* nix/guix-register/guix-register.cc (GUIX_OPT_DEDUPLICATE): New macro.
  (options): Add --no-deduplication.
  (deduplication): New variable.
  (parse_opt): Handle GUIX_OPT_DEDUPLICATE.
  (register_validity): Add 'optimize' parameter and honor it.
  (main): Move 'store' instanatiation after 'settings.nixStore'
  assignment.
* tests/guix-register.sh: Add test for deduplication.
* guix/nar.scm (finalize-store-file): Update comment above
  'register-path' call.
2014-08-25 00:16:49 +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 bc67269487 svn-download: Rewrite using gexps.
* guix/svn-download.scm (subversion-package): New procedure.
  (svn-fetch): Use it.  Remove 'svn-for-build'.  Use a gexp and
  'gexp->derivation'.
2014-08-23 22:58:15 +02:00
Ludovic Courtès 6119ebf194 git-download: Rewrite using gexps.
* guix/git-download.scm (git-package): New procedure.
  (git-fetch): Use it.  Remove 'git-for-build'.
  Use a gexp and 'gexp->derivation'.
* guix/download.scm (gnutls-package): Fix docstring.
2014-08-23 22:58:09 +02:00
Ludovic Courtès c1bc358f29 Factorize test suite support in (guix tests).
* guix/tests.scm: New file.
* Makefile.am (noinst_DATA): New variable.
  (GOBJECTS): Add guix/tests.go.
* tests/builders.scm (%store): Use 'open-connection-for-tests'
  from (guix tests).
* tests/derivations.scm: Likewise.
* tests/monads.scm: Likewise.
* tests/packages.scm: Likewise.
* tests/profiles.scm: Likewise.
* tests/union.scm: Likewise.
* tests/gexp.scm: Likewise.
  (guile-for-build): Remove.  Use (%guile-for-build) instead.
* tests/nar.scm (make-random-bytevector, %seed, random-text): Remove.
  (populate-file): Change 'make-random-bytevector' to 'random-bytevector'.
  Use (guix tests).
* tests/store.scm (%seed, random-text): Remove.
  Use (guix tests).
2014-08-23 22:33:04 +02:00
Ludovic Courtès 79ee406d51 profiles: Produce a top-level Info 'dir' file.
Fixes <http://bugs.gnu.org/18305>.
Reported by Brandon Invergo <brandon@gnu.org>.

* guix/profiles.scm (manifest-inputs, info-dir-file): New procedures.
  (profile-derivation): Use them.  Add #:info-dir? parameter and honor
  it.
* guix/scripts/package.scm (guix-package): Call 'profile-derivation'
  with #:info-dir? #f when the 'bootstrap? option is set.
* tests/profiles.scm ("profile-derivation"): Pass #:info-dir? #f.
2014-08-23 22:33:03 +02:00
Alex Kost 6b74bb0ae3 profiles: Report about upgrades.
* guix/profiles.scm (manifest-show-transaction): Report about upgrades.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2014-08-23 22:33:03 +02:00
Alex Kost 4ea444198d Move 'check-package-freshness' from 'guix package' to 'packages'.
* guix/scripts/package.scm (%sigint-prompt, call-with-sigint-handler)
  (waiting, ftp-open*, check-package-freshness): Move to...
* gnu/packages.scm: ... here.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2014-08-20 10:55:29 +02:00
Alex Kost 89caec6920 guix package: Use 'manifest-transaction'.
* guix/scripts/package.scm (guix-package)[process-actions]: Use
  'manifest-transaction' instead of the equivalent code.
  (show-what-to-remove/install): Remove.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2014-08-19 22:58:22 +02:00
Alex Kost 343745c80a profiles: Add 'manifest-transaction'.
* guix/profiles.scm (<manifest-transaction>): New record-type.
  (manifest-perform-transaction): New procedure.
  (manifest-show-transaction): New procedure.
* tests/profiles.scm ("manifest-perform-transaction"): New test.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2014-08-19 22:55:22 +02:00
Ludovic Courtès 667b250846 gexp: Add 'ungexp-native' and 'ungexp-native-splicing'.
* guix/gexp.scm (<gexp>)[natives]: New field.
  (write-gexp): Use both 'gexp-references' and
  'gexp-native-references'.
  (gexp->derivation): Use both 'gexp-inputs' and 'gexp-native-inputs',
  and append them.
  (gexp-inputs): Add 'references' parameter and honor it.
  (gexp-native-inputs): New procedure.
  (gexp->sexp)[reference->sexp]: Add 'native?' parameter and honor it.
  Use it, and use 'gexp-native-references'.
  (gexp)[collect-native-escapes]: New procedure.
  [escape->ref]: Handle 'ungexp-native' and 'ungexp-native-splicing'.
  [substitute-ungexp, substitute-ungexp-splicing]: New procedures.
  [substitute-references]: Use them, and handle 'ungexp-native' and
  'ungexp-native-splicing'.
  Adjust generated 'make-gexp' call to provide both normal references
  and native references.
  [read-ungexp]: Support 'ungexp-native' and
  'ungexp-native-splicing'.
  Add reader extension for #+.
* tests/gexp.scm (gexp-native-inputs): New procedure.
  (gexp->sexp*): Add 'target' parameter.
  ("ungexp + ungexp-native",
  "input list + ungexp-native",
  "input list splicing + ungexp-native-splicing",
  "gexp->derivation, ungexp-native",
  "gexp->derivation, ungexp + ungexp-native"): New tests.
  ("sugar"): Add tests for #+ and #+@.
* doc/guix.texi (G-Expressions): Document 'ungexp-native' et al.
2014-08-18 15:01:58 +02:00
Ludovic Courtès 68a61e9ffb gexp: Add #:target parameter to 'gexp->derivation'.
* guix/gexp.scm (lower-inputs): Add #:system and #:target.  Use
  'package->cross-derivation' when TARGET is true.  Honor SYSTEM.
  (gexp->derivation): Add #:target argument.  Pass SYSTEM and TARGET to
  'lower-inputs' and 'gexp->sexp'.
  (gexp->sexp): Add #:system and #:target.  Pass them in recursive call
  and to 'package-file'.
* tests/gexp.scm (gexp->sexp*): Add 'system' and 'target' parameters.
  ("gexp->derivation, cross-compilation"): New test.
2014-08-17 21:20:11 +02:00
Ludovic Courtès c90ddc8f81 monads: 'package-file' uses '%current-system' at '>>=' time.
* guix/monads.scm (package-file): Leave #:system to #f by default.
* tests/monads.scm ("package-file, default system"): New test.
2014-08-17 21:08:06 +02:00
Ludovic Courtès 4231f05bbc monads: Add 'package->cross-derivation' and #:target for 'package-file'.
* guix/monads.scm (package-file): Add #:target keyword parameter and
  honor it.
  (package->cross-derivation): New procedure.
* tests/monads.scm ("package-file + package->cross-derivation"): New test.
* doc/guix.texi (The Store Monad): Update 'package-file' documentation.
  Add 'package->cross-derivation'.
2014-08-17 20:58:58 +02:00
Ludovic Courtès b9b8607824 Add (guix monad-repl).
* guix/monad-repl.scm: New file.
* guix.scm: Add it.
* Makefile.am (MODULES): Add it.
* doc/guix.texi (The Store Monad): Document it.
2014-08-15 16:26:28 +02: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
David Thompson 734939a5f3 Remove ftp.sunet.se mirror.
* guix/download.scm (%mirrors): Remove ftp.sunet.se URIs.
2014-08-12 22:17:44 -04:00
Ludovic Courtès d34736c5c3 profiles: Adjust to unintended manifest format change.
Reported by Andreas Enge.

* guix/profiles.scm (sexp->manifest): Adjust to handle unintended format
  change introduced in 4ca0b41.
2014-08-12 22:09:42 +02:00
Ludovic Courtès dfd1d5edf6 guix package: Remove leftover internal procedure.
Reported by Alex Kost <alezost@gmail.com>.

* guix/scripts/package.scm (guix-package)[process-actions]: Remove
  'same-package?'.
2014-08-12 21:51:45 +02:00
Ludovic Courtès f48624fc68 guix package: Use 'manifest-add'.
* guix/scripts/package.scm (guix-package)[process-actions]: Use
  'manifest-add' instead of the equivalent code.
2014-08-12 16:10:32 +02:00
Alex Kost f755403014 profiles: Add 'manifest-add'.
* guix/profiles.scm (manifest-add): New procedure.
* tests/profiles.scm (guile-1.8.8): New variable.
  ("manifest-add"): New test.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2014-08-12 16:03:33 +02:00
Ludovic Courtès 3d6e65d529 guix package: Remove dead code and unused variables.
Suggested by Alex Kost <alezost@gmail.com>.

* guix/scripts/package.scm (options->installable)[deduplicate]: Remove.
  [packages-to-upgrade]: Remove unused variable 'newest'.
  (roll-back): Remove unused variable 'manifest'.
  (guix-package): Remove unused variables 'guile-missing?', 'verbose?',
  and 'packages'.
2014-08-11 19:03:29 +02:00
Cyrill Schenkel 3a09e1d2e8 ui: Fix handling of periods by fill-paragraph.
Fixes <http://bugs.gnu.org/17468>.

* guix/ui.scm (fill-paragraph): Two spaces after period and no spaces before newline.
* tests/ui.scm: New test case.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2014-08-11 18:27:03 +02:00
Ludovic Courtès 462f5ccade profiles: Add 'package->manifest-entry'.
Suggested by Alex Kost <alezost@gmail.com>.

* guix/scripts/package.scm (options->installable)[package->manifest-entry]:
  Move to (guix profiles).
  [package->manifest-entry*]: New procedure.
  Use it.
* guix/profiles.scm (package->manifest-entry): New procedure.
* tests/profiles.scm (guile-for-build): New variable.
  Call '%guile-for-build'.
  ("profile-derivation"): New test.
2014-07-26 22:57:00 +02:00
Ludovic Courtès 4ca0b4101d profiles: Get rid of the 'inputs' field of 'manifest-entry'.
* guix/profiles.scm (<manifest-entry>)[inputs]: Remove.
  (profile-derivation): Rely on 'item' and 'deps' instead of 'inputs'.
  Adjust 'builder' accordingly.
* guix/scripts/package.scm (options->installable)[package->manifest-entry]:
  Remove 'inputs' field.  Change 'dependencies' field to contain
  packages.
2014-07-26 22:56:59 +02:00
Ludovic Courtès a54c94a40d profiles: Switch to gexps.
* guix/profiles.scm (<manifest-entry>)[path]: Rename to...
  [item]: ... this.  Update users.
  (manifest->sexp): Rename to...
  (manifest->gexp): ... this.  Return a gexp.
  (lower-input): Remove.
  (profile-derivation): Remove 'store' parameter, and turn into a
  monadic procedure.
  [inputs]: New variable.
  [builder]: Turn into a gexp.
  Replace call to 'build-expression->derivation' with call to
  'gexp->derivation'.
* guix/scripts/package.scm (link-to-empty-profile): Adjust call to
  'profile-derivation', and wrap it in 'run-with-store'.
  (show-what-to-remove/install): Rename 'path' to 'item'.  Check whether
  ITEM is a package, and return its output path if it is.
  (input->name+path): Remove.
  (options->installable): Set 'item' to P.
  (guix-package): Adjust call to 'profile-derivation'.
* tests/profiles.scm (guile-2.0.9): Change 'path' to 'item'.
2014-07-26 22:56:59 +02:00
Ludovic Courtès 48704e5b5c profiles: Do away with 'manifest=?'.
* guix/profiles.scm (manifest=?): Remove.
* guix/scripts/package.scm (readlink*): New procedure.
  (guix-package)[process-actions]: Use 'readlink*' and compare the
  profile to be built, PROF, with PROFILE to determine whether there's
  nothing to be done.
2014-07-26 22:56:59 +02:00
Ludovic Courtès ff838e2ce6 profiles: Remove dead code.
* guix/profiles.scm (write-manifest): Remove.
  (read-manifest): Keep private.
2014-07-25 23:42:42 +02:00
Eric Bavier 5e6feee617 guix: package: Fix recutils output for non-package inputs.
* guix/ui.scm (package->recutils)[dependencies]: Ignore non-package inputs.
* tests/guix-package.sh: New test.
2014-07-25 07:41:57 -05:00
Ludovic Courtès 20ffce820b ui: Improve formatting of package dependencies in recutils.
* guix/ui.scm (package->recutils)[dependencies->recutils]: New
  procedure. Use it.
2014-07-25 00:29:47 +02: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 0a90af1531 monads: Add 'interned-file'.
* guix/monads.scm (interned-file): New procedure.
* tests/monads.scm ("interned-file"): New test.
* doc/guix.texi (The Store Monad): Document it.
2014-07-24 23:02:26 +02:00
Ludovic Courtès 720ee245da guix system: Protect against changes to $PATH when activating the system.
Partly fixes <http://bugs.gnu.org/18082>.
Reported by Mark H Weaver <mhw@netris.org>.

* guix/scripts/system.scm (save-environment-excursion): New macro.
  (switch-to-system): Wrap 'primitive-load' call in it.
2014-07-23 18:20:56 +02:00
Ludovic Courtès b6debdaa22 guix system: Fix type error in 'reconfigure'.
Partly fixes <http://bugs.gnu.org/18082>.
Reported by Mark H Weaver <mhw@netris.org>.

* guix/scripts/system.scm (perform-action) <reconfigure>: Pass the
  output file name of GRUB.CFG to 'install-grub'.
2014-07-23 18:20:56 +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 bce7526f9a Add comments about global memoization.
* guix/build-system/gnu.scm (standard-inputs): Add comment about
  misplaced memoization.
* guix/packages.scm (cache): Likewise.
2014-07-21 23:18:21 +02:00
Cyril Roelandt 2aa6efb0b9 guix package: add a "show" option.
* doc/guix.texi: Update the documentation.
* guix/scripts/package.scm: Add a "show" option.
* tests/guix-package.sh: Add a test for the "show" option.
2014-07-21 22:18:03 +02:00
Cyril Roelandt 9c0fc27968 ui: add the "dependencies" field to package->recutils:
* guix/ui.scm (package->recutils): Print the dependencies of the package.
2014-07-21 22:17:59 +02:00
Ludovic Courtès 65ea711189 guix refresh: Use (ice-9 format).
* guix/scripts/refresh.scm: Use (ice-9 format).
2014-07-20 22:39:02 +02:00
Ludovic Courtès 8334cf5b5c guix system: Factorize 'copy-closure'.
* guix/scripts/system.scm (copy-closure): Rename to...
  (copy-item): ... this.
  (copy-closure): New procedure.
  (install): Use it, and remove redundant code.
2014-07-20 22:39:02 +02:00
Eric Bavier 7d193ec348 guix: refresh: Add --list-dependent option.
* guix/packages.scm (package-direct-inputs): New procedure.
* gnu/packages.scm (vhash-refq, package-direct-dependents)
  (package-transitive-dependents, package-covering-dependents): New procedures.
* guix/scripts/refresh.scm (%options, show-help, guix-refresh): Add
  --list-dependent option.
* doc/guix.texi (Invoking guix refresh): Document '--list-dependent' option.
2014-07-20 11:36:09 -05:00
Eric Bavier 516e3b6f7a guix: utils: Add fold-tree and fold-tree-leaves.
* guix/utils.scm (fold-tree, fold-tree-leaves): New functions.
* tests/utils.scm: Add tests for them.
2014-07-20 11:36:09 -05: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 a52127c052 guix system: init: Always use /var/guix as the target state directory.
Fixes <http://bugs.gnu.org/18049>.
Reported by Marek Benc <merkur32@gmail.com>.

* guix/scripts/system.scm (copy-closure): Pass #:state-directory to
  'register-path'.
2014-07-18 20:40:51 +02:00
Ludovic Courtès 689142cd75 guix-register: Add '--state-directory' parameter.
* nix/guix-register/guix-register.cc (GUIX_OPT_STATE_DIRECTORY): New
  macro.
  (parse_opt): Honor it.
* tests/guix-register.sh: Add test with '--state-directory'.
* guix/store.scm (register-path): Add #:state-directory parameter.
2014-07-18 20:40:51 +02:00
Ludovic Courtès a1906758c3 records: Report unknown field names in inheriting forms.
* guix/records.scm (define-record-type*)[record-inheritance]: Check for
  unexpected field names.
* tests/records.scm ("define-record-type* with let* behavior"): Return
  #t, not *unspecified*.
  ("define-record-type* & inherit & extra initializers"): New test.
2014-07-17 16:45:45 +02:00
Ludovic Courtès b1353e7a6b records: Factorize error-reporting macro.
* guix/records.scm (record-error): New macro.
  (define-record-type*)[error*]: Remove.
  Use 'record-error' instead.
2014-07-17 16:42:19 +02:00
Ludovic Courtès 2cf0ea0dbb gexp: Gracefully handle printing of gexps with spliced references.
* guix/gexp.scm (write-gexp): Wrap 'write' call in
  'false-if-exception'.
* tests/gexp.scm ("printer", "printer vs. ungexp-splicing"): New tests.
2014-07-17 15:40:06 +02:00
Ludovic Courtès dc254e0568 gexp: Build 'gexp->file' derivations locally.
* guix/gexp.scm (gexp->file): Add #:local-build? argument.
2014-07-16 15:54:47 +02:00
Eric Bavier 49d91de763 guix: refresh: Correctly identify invalid package names.
* guix/scripts/refresh.scm (guix-refresh): Check for null list
  returned by find-packages-by-name rather than #f.
2014-07-15 00:10:10 -05:00
Ludovic Courtès 3942305eb1 guix system: reconfigure: Always use "/" as GRUB's target file system.
* guix/scripts/system.scm (perform-action) <reconfigure>: Wrap
  'install-grub' call in 'false-if-exception'.  Always use "/" as the
  target.
2014-07-14 16:14:15 +02:00
Ludovic Courtès 314a83ef1e guix system: Fix return value for 'reconfigure'.
* guix/scripts/system.scm (perform-action) <reconfigure>: Add missing
  'return' expression.
2014-07-13 23:44:37 +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 8e42796bdc guix system: Convert to monadic style.
* guix/scripts/system.scm (references*, topologically-sorted*,
  show-what-to-build*): New procedures.
  (copy-closure): Turn into a monadic procedure.
  (install): Likewise, and adjust parameter list.
  (switch-to-system): Likewise.
  (system-derivation-for-action, grub.cfg, maybe-build, perform-action):
  New procedures.
  (guix-system): Use them.
2014-07-13 16:37:11 +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 5d0984595c gexp: Resolve the default system at '>>=' time.
Partly fixes <http://bugs.gnu.org/18002>.
Reported by David Thompson <dthompson2@worcester.edu>.

* guix/gexp.scm (gexp->derivation): Change #:system to default #f.
  Use (%current-system) from within the 'mlet*'.
* tests/gexp.scm ("gexp->derivation, default system"): New test.
2014-07-12 23:17:53 +02:00
Ludovic Courtès f62435e286 monads: Fix 'mapm' so that effects happen from left to right.
* guix/monads.scm (mapm): Don't reverse LST, so that items are processed
  from left to right.  Bind the result of 'foldm' and reverse it.
* tests/monads.scm ("sequence"): Change 'frob' so it performs its side
  effect within an 'mlet' body.  Adjust call accordingly.
2014-07-12 23:17:53 +02:00
Ludovic Courtès f109696473 packages: Add printer for <origin>.
* guix/packages.scm (print-origin): New procedure.
  (<origin>): Add it as record type printer.
2014-07-11 23:20:48 +02:00
Ludovic Courtès df2ce34385 guix system: Add '--system' option.
* guix/scripts/system.scm (switch-to-system): Add #:system parameter;
  pass it to 'run-with-store'.
  (%options): Add '--system'.
  (guix-system): Pass the 'system' option to 'run-with-store',
  'package-derivation', and 'switch-to-system' calls.
* doc/guix.texi (Invoking guix system): Document '--system' and
  '--image-size'.
2014-07-08 23:42:35 +02:00
Taylan Ulrich Bayirli/Kammer 6879fe235c guix package: Try $LOGNAME in addition to $USER.
Fixes <http://bugs.gnu.org/17946>.

Notoriously, cron jobs may set LOGNAME only and not USER.  See
e.g. crontab(5) under Debian 7 (wheezy).

* guix/scripts/package.scm (%profile-directory)
(guix-package): Also try LOGNAME if USER is unset.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2014-07-05 15:09:43 +02:00
Ludovic Courtès 88371f0d7d guix package: Do the right thing for '-p ~/.guix-profile'.
Fixes <http://bugs.gnu.org/17939>.
Reported by Taylan Ulrich Bayirli/Kammer <taylanbayirli@gmail.com>.

* guix/scripts/package.scm (canonicalize-profile): New procedure.
  (%options): Use it for --profile.
* tests/guix-package.sh: Add test.
2014-07-05 14:56:08 +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
Eric Bavier 71639e1f17 guix: Add CC0 license.
* guix/licenses.scm (cc0): New variable.
2014-06-30 11:26:42 -05: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 b25937e318 guix system: Add 'reconfigure' action.
* guix/scripts/system.scm (%system-profile): New variable.
  (switch-to-system, previous-grub-entries): New procedures.
  (unless-file-not-found): New macro.
  (show-help): Add 'reconfigure'.
  (guix-system): Handle it.
* gnu/system.scm: Export 'operating-system-activation-script'.
* doc/guix.texi (Invoking guix system): Document it.
2014-06-27 00:12:40 +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 c1202fb1f9 guix {system,offload}: Improve reporting of syntax errors.
* guix/scripts/system.scm (read-operating-system) <catch handler>: Add
  case for 'syntax-error'.  Correct message for default case.
* guix/scripts/offload.scm (build-machines) <catch handler>: Add case
  for 'syntax-error'.
* tests/guix-system.sh: New file.
* Makefile.am (SH_TESTS): Add it.
2014-06-27 00:12:40 +02:00
Ludovic Courtès cadf6cb4cf guix system: Gracefully handle 'install-grub' errors.
* guix/scripts/system.scm (install): Wrap 'install-grub' call in
  'false-if-exception'.  This is a followup to 641f9a2a.
2014-06-24 22:11:12 +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 f513527a8e Merge branch 'core-updates' 2014-06-20 23:44:42 +02:00
Ludovic Courtès 00fe93338d substitute-binary: Warn about uninitialized ACL.
* guix/scripts/substitute-binary.scm (guix-substitute-binary): Call
  'check-acl-initialized'.
  (check-acl-initialized): Don't rely on 'equal?' to compare keys.
  Instead, convert keys to strings.
2014-06-19 23:35:41 +02:00
Ludovic Courtès eef4096c14 guix system: 'init' makes sure the target store directory exists.
* guix/scripts/system.scm (install): Before calling 'copy-closure', make
  sure directory (%store-prefix) under TARGET exists.
2014-06-19 23:35:41 +02:00
Ludovic Courtès 2eea253f4d substitute-binary: Avoid the term "narinfo" in user messages.
* guix/scripts/substitute-binary.scm (assert-valid-narinfo): Change
  message to avoid the term "narinfo".
2014-06-17 00:30:16 +02:00
Ludovic Courtès 7470df5ddf Merge branch 'master' into core-updates 2014-06-14 23:25:59 +02:00
Ludovic Courtès 07254feb24 ui: Avoid circularity with (guix gexp).
Fixes a regression introduced in 56b8210 ("guix build: Allow gexps to be
passed to '-e'.")

* guix/ui.scm (%guix-user-module): Wrap in 'delay'.
  (read/eval): Adjust accordingly.
2014-06-14 23:23:56 +02:00
Ludovic Courtès 56b8210697 guix build: Allow gexps to be passed to '-e'.
* guix/ui.scm (%guix-user-module): New variable.
  (read/eval): Pass it as the second argument to 'eval'.
* guix/scripts/build.scm (options/resolve-packages): Add case for
  'gexp?'.
* tests/guix-build.sh: Add tests.
* doc/guix.texi (Invoking guix build): Document '-e gexp'.
guxi build: Allow gexps to be passed to '-e'.

* guix/ui.scm (%guix-user-module): New variable.
  (read/eval): Pass it as the second argument to 'eval'.
* guix/scripts/build.scm (options/resolve-packages): Add case for
  'gexp?'.
* tests/guix-build.sh: Add tests.
* doc/guix.texi (Invoking guix build): Document '-e gexp'.
2014-06-14 22:55:59 +02:00
Ludovic Courtès ee76417972 Separate package description translations from string translations.
* po/packages/LINGUAS, po/packages/Makevars, po/packages/POTFILES.in:
  New files.
* po/guix/Makevars (DOMAIN): Change to "guix".
  (XGETTEXT_OPTIONS): Remove "--keyword=synopsis --keyword=description".
* po/guix/POTFILES.in: Remove gnu/packages/*.scm.
* configure.ac: Change to gettext 0.18.3.  Produce
  po/packages/Makefile.in.
* Makefile.am (SUBDIRS): Add po/packages.
* guix/ui.scm (%package-text-domain): New variable.
  (P_): New procedure.
  (package->recutils): Use 'P_' instead of '_'.
* guix/scripts/package.scm (find-packages-by-description): Use 'P_'
  instead of 'gettext'.
2014-06-13 17:30:40 +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 b6b097ac81 guix build: Only 'guix build' sets #:print-build-trace.
This makes 'guix package' et al. slightly less verbose, by not emitting
"@ substituter-started" lines and similar.

* guix/scripts/build.scm (set-build-options-from-command-line): Pass
  #:print-build-trace.
  (%default-options): Add 'print-build-trace?'.
2014-06-09 18:55:48 +02:00
Ludovic Courtès f986c264b2 build-system/gnu: Add 'package-with-restricted-references'.
* guix/build-system/gnu.scm (package-with-restricted-references): New
  procedure.
2014-06-07 19:35:20 +02:00
Ludovic Courtès 872c69d00e Merge branch 'master' into core-updates 2014-06-06 17:23:14 +02:00
Ludovic Courtès b15d79dfe6 build-system/gnu: Add #:allowed-references.
* guix/build-system/gnu.scm (gnu-build): Add #:allowed-references.
  [canonicalize-reference]: New procedure.
  Pass #:allowed-references to 'build-expression->derivation'.
  (gnu-cross-build): Likewise.
2014-06-06 17:18:17 +02:00
Ludovic Courtès 63a4282468 derivations: 'build-expression->derivation' supports #:allowed-references.
* guix/derivations.scm (build-expression->derivation): Add
  #:allowed-references and pass it to 'derivation.
* doc/guix.texi (Derivations): Adjust accordingly.
2014-06-06 17:07:26 +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 c17b5ab4db tests: Skip tests that would hit the shebang length limitation.
* tests/gexp.scm (shebang): New variable.
  Skip "gexp->script" when SHEBANG is longer than 127 chars.
* guix/gexp.scm (gexp->script): Add comment on the issue.
2014-06-04 18:15:50 +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 b53be755e4 derivations: Add #:allowed-references 'derivation' parameter.
* guix/derivations.scm (derivation): Add #:allowed-references
  parameter.
  [user+system-env-vars]: Honor it.
* tests/derivations.scm ("derivation #:allowed-references, ok",
  "derivation #:allowed-references, not allowed",
  "derivation #:allowed-references, self allowed",
  "derivation #:allowed-references, self not allowed"): New tests.
* doc/guix.texi (Derivations): Document #:allowed-references.
2014-06-01 23:32:26 +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
Ludovic Courtès 85a83edb36 linux-initrd: Allow use of volume labels in 'file-system' declarations.
* guix/build/linux-initrd.scm (%ext2-endianness, %ext2-sblock-magic,
  %ext2-sblock-creator-os, %ext2-sblock-uuid, %ext2-sblock-volume-name):
  New macros.
  (read-ext2-superblock, ext2-superblock-uuid,
  ext2-superblock-volume-name, disk-partitions,
  partition-label-predicate, find-partition-by-label,
  canonicalize-device-spec): New procedures.
  (mount-file-system): Use 'canonicalize-device-spec' on SOURCE.
  (boot-system): Likewise for ROOT.
* doc/guix.texi (Using the Configuration System): Adjust 'file-system'
  declaration accordingly.
2014-05-30 23:46:17 +02:00
Ludovic Courtès ef9fc40dda vm: Allow a volume name to be specified for the root partition.
* guix/build/vm.scm (format-partition): Add #:label parameter, and honor
  it.
  (initialize-hard-disk): Add #:file-system-label parameter, and pass it
  to 'format-partition'.
* gnu/system/vm.scm (qemu-image): Add #:file-system-label parameter and
  pass it to 'initialize-hard-disk'.
2014-05-29 23:32:46 +02:00
Ludovic Courtès af018f5e0a Merge branch 'master' into core-updates 2014-05-27 23:19:49 +02:00
Ludovic Courtès 5895f24443 store: Work around 'get-bytevector-n' bug that affects 'import-paths'.
Fixes <http://bugs.gnu.org/17591>.

* guix/store.scm (process-stderr) <%stderr-read>: Use
  'get-bytevector-n!' instead of 'get-bytevector-n'.
2014-05-27 22:28:34 +02:00
Ludovic Courtès 884af1b4ec store: Remove misleading 'setsockopt' call.
* guix/store.scm (open-connection): Remove misleading 'setsockopt' call,
  erroneously introduced in df1fab58.  This would actually shrink the
  receive buffer from 124 KiB to 12 KiB, though it had little impact on
  performance.
2014-05-25 01:31:15 +02:00
Ludovic Courtès 4b2615e1ca services: nscd: Provide an 'activate' script to make /var/run/nscd.
* gnu/services/base.scm (nscd-service): Add 'activate' field.
* guix/build/install.scm (directives): Remove /var/run/nscd; add
  /var/run.
* doc/guix.texi (Defining Services): Add 'activate' field in example.
  Document it.
2014-05-24 18:10:05 +02:00
Ludovic Courtès 517830cc01 system: Always create /var/empty.
* guix/build/install.scm (directives): Add /var/empty.
2014-05-24 18:10:05 +02:00
Ludovic Courtès 484a2b3a5a system: Separate the activation script from the boot script.
* gnu/system.scm (operating-system-activation-script): New procedure,
  containing most of the former 'operating-system-boot-script'.
  (operating-system-boot-script): Call it, and 'primitive-load' its
  result.
* guix/build/activation.scm (%booted-system): Remove.
  (activate-current-system): Remove #:boot? parameter and related code.
2014-05-24 18:10:05 +02:00
Ludovic Courtès a68d976b66 download: Enlarge your receive buffer.
* guix/build/download.scm (open-connection-for-uri): Remove call to
  'setsockopt'.
* guix/http-client.scm (open-socket-for-uri)[rmem-max, buffer-size]: New
  variables.  Add call to 'setsockopt'.
2014-05-23 22:19:37 +02:00
Ludovic Courtès fb729425dc guix system: Add 'disk-image' action.
* guix/scripts/system.scm (show-help): Add 'disk-image'.
  (guix-system)[parse-options]: Support 'disk-image' action.
  [option-arguments]: Likewise.
  Handle the 'disk-image' action.
* doc/guix.texi (Invoking guix system): Document 'disk-image'.
2014-05-22 23:24:13 +02:00
Ludovic Courtès f19c6e5fe7 vm: Use a para-virtualized disk when creating an image.
* guix/build/vm.scm (load-in-linux-vm): When MAKE-DISK-IMAGE?, use
  '-drive ...,if=virtio' for better performance.
* gnu/system/vm.scm (qemu-image): Use /dev/vda instead of /dev/sda.
2014-05-22 23:24:13 +02:00
Ludovic Courtès c4a74364b9 vm: Make the image format a parameter.
* guix/build/vm.scm (load-in-linux-vm): Add #:disk-image-format
  parameter; add 'image-file' variable.  Honor DISK-IMAGE-FORMAT.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Add
  #:disk-image-format parameter, and honor it.
  (qemu-image): Likewise.
2014-05-22 23:24:13 +02:00
Ludovic Courtès 3035b50f28 linux-initrd: Build /dev/loop* nodes.
* guix/build/linux-initrd.scm (make-essential-device-nodes): Build
  /dev/loop[0-7].
2014-05-22 23:24:13 +02:00
Andreas Enge 6d763bdddb guix: download: Update imagemagick mirrors.
* guix/download.scm (%mirrors)[imagemagick]: Update and add the legacy
    subdirectory of the main site as a last resort.
2014-05-22 22:07:07 +02:00
Ludovic Courtès 641f9a2a1f vm: Modularize build-side code.
* guix/build/install.scm (install-grub): Call 'error' if 'system*'
  returns non-zero.
* guix/build/vm.scm (initialize-partition-table): Make 'partition-size'
  a positional parameter.  Call 'error' when 'system*' returns
  non-zero'.
  (format-partition, initialize-root-partition): New procedures.
  (initialize-hard-disk): Use them.
2014-05-21 23:31:46 +02:00
Ludovic Courtès d1f477199d vm: Remove misleading comment.
* guix/build/vm.scm (load-in-linux-vm): Remove misleading comment.
2014-05-21 23:19:13 +02:00
Ludovic Courtès d28869afad store: Flush the output when the build process emits '\r'.
This allows progress reports emitted by 'substitute-binary' to be
correctly displayed.

* guix/store.scm (%newlines): New variable.
  (process-stderr) <%stderr-next>: Flush (current-build-output-port)
  when S contains one of %NEWLINES.
2014-05-21 15:29:23 +02:00
Ludovic Courtès eb7ccb1afa linux-initrd: Display a backtrace when the initial program fails.
* guix/build/linux-initrd.scm (boot-system): Add pre-unwind handler in
  'catch' form around 'primitive-load', and call 'format' and
  'display-backtrace' from there.
2014-05-20 23:37:11 +02:00
Ludovic Courtès 9bea3b42b4 vm: Fix typo.
Regression introduced in e38e18f.

* guix/build/vm.scm (initialize-hard-disk)[partition]: Use a string.
2014-05-20 23:37:11 +02:00
Ludovic Courtès d84a7be667 utils: 'delete-file-recursively' doesn't follow mount points by default.
* guix/build/utils.scm (delete-file-recursively): Add #:follow-mounts?
  parameter and honor it.
2014-05-20 14:45:58 +02:00
Ludovic Courtès 52ddf2ae6f ui: Gracefully deal with zero-output derivations.
* guix/ui.scm (show-what-to-build)[built-or-substitutable?]: New
  procedure.  Check whether OUT is #f.
  Use it.
* tests/ui.scm ("show-what-to-build, zero outputs"): New test.
2014-05-19 23:52:40 +02:00
Ludovic Courtès 79b0d4e104 guix system: Check whether we are installing to /.
* guix/scripts/system.scm (install): Check whether TARGET is / and warn.
2014-05-19 23:52:40 +02:00
Ludovic Courtès c56d19fb11 guix system: Factorize out closure copy.
* guix/scripts/system.scm (copy-closure): New procedure.
  (install): Use it.
2014-05-19 23:52:40 +02:00
Ludovic Courtès c79d54fe41 guix system: 'guix system init' installs GRUB by default.
* guix/scripts/system.scm (install): Add #:grub?, #:grub.cfg, and
  #:device parameters; honor them.
  (show-help): Document '--no-grub'.
  (%options): Add '--no-grub'.
  (%default-options): Add 'install-grub?'.
  (guix-system): Honor 'install-grub?' option from OPTS.  Adjust
  'install' call accordingly.
* doc/guix.texi (Invoking guix system): Document '--no-grub'.
2014-05-19 23:52:39 +02:00
Ludovic Courtès e38e18ff01 vm: Make the device name a parameter.
* guix/build/vm.scm (initialize-partition-table): Honor 'device'
  parameter.
  (initialize-hard-disk): Add 'device' parameter and honor it.
* gnu/system/vm.scm (qemu-image): Adjust accordingly.
2014-05-19 23:52:39 +02:00
Eric Bavier c711f07c3e guix: licenses: Add CeCILL-C license.
* guix/licenses.scm (cecill-c): New variable.
2014-05-19 00:15:11 -05:00
Ludovic Courtès 6ffd11f129 system: Prevent grub.cfg from being GC'd.
* guix/build/install.scm (install-grub): Use 'copy-file' instead of
  'symlink' for GRUB.CFG.
2014-05-18 22:27:23 +02:00
Ludovic Courtès 72b9d60df4 guix system: Add 'init' sub-command.
* guix/scripts/system.scm (install): New procedure.
  (guix-system)[parse-option]: Remove check for extraneous arguments.
  [match-pair, option-arguments]: New procedures.
  Use 'option-arguments'.  Honor 'init'.
  (show-help): Document 'init'.
* doc/guix.texi (Invoking guix system): Document 'init'.
2014-05-18 22:27:23 +02:00
Ludovic Courtès bb31e0a3ee store: Change #:store parameter to #:prefix.
* guix/store.scm (register-path): Change #:store to #:prefix.
2014-05-18 22:27:22 +02:00
Ludovic Courtès 15d299874c vm: Avoid resetting timestamps twice.
* guix/build/vm.scm (initialize-hard-disk): Don't call
  'reset-timestamps' when REGISTER-CLOSURES? is true.
* guix/build/install.scm (register-closure): Mention timestamps in
  docstring.
2014-05-18 22:27:22 +02:00
Ludovic Courtès b4140694ac system: Make /run/current-system at activation time.
* gnu/system.scm (etc-directory): Change default value of #:profile.
  Change contents of SHELLS.  Use /run/current-system/profile/{s,}bin in
  BASHRC.
  (operating-system-boot-script)[%modules]: Add (guix build
  linux-initrd).  Add call to 'activate-current-system' in gexp.
  (operating-system-initrd-file, operating-system-grub.cfg): New
  procedures.
  (operating-system-derivation): Don't build grub.cfg here and remove it
  from the file union.
* gnu/system/vm.scm (qemu-image): Remove #:populate.
  (operating-system-build-gid, operating-system-default-contents):
  Remove.
  (system-qemu-image): Remove call to
  'operating-system-default-contents'.  Use 'operating-system-grub.cfg'
  to get grub.cfg.  Add GRUB.CFG to #:inputs.
  (system-qemu-image/shared-store): Likewise, but don't add GRUB.CFG to
  #:inputs.
  (system-qemu-image/shared-store-script): Pass --system kernel option.
* guix/build/activation.scm (%booted-system, %current-system): New
  variables.
  (boot-time-system, activate-current-system): New procedures.
* guix/build/install.scm (evaluate-populate-directive): Add case
  for ('directory name uid gid mode).
  (directives, populate-root-file-system): New procedures.
* guix/build/vm.scm (initialize-hard-disk): Replace calls to
  'evaluate-populate-directive' by a call to
  'populate-root-file-system'.
* gnu/services/dmd.scm (dmd-configuration-file): Use
  /run/current-system/profile/bin.
* gnu/services/xorg.scm (slim-service): Likewise.
2014-05-18 00:04:01 +02:00
Ludovic Courtès e901ef297d store: Add #:store parameter to 'register-path'.
* guix/store.scm (register-path): Add #:store and honor it.
2014-05-17 00:08:39 +02:00
Ludovic Courtès 87a52da7d0 linux-initrd: Factorize kernel command-line option parsing.
* guix/build/linux-initrd.scm (find-long-option): New procedure.
  (boot-system): Use it instead of the local 'option'.
2014-05-16 23:31:48 +02:00
Ludovic Courtès 7889394e05 guix system: Add 'build' action.
* guix/scripts/system.scm (show-help): Document 'build' action.
  (guix-system): Honor 'build' action.
* doc/guix.texi (Invoking guix system): Add 'build' action.
2014-05-16 21:56:00 +02:00
Ludovic Courtès 4cca91832b authenticate: Add compatibility hack for Guile 2.0.5.
* guix/scripts/authenticate.scm (%default-port-conversion-strategy): New
  variable.  Reported by Andreas Enge <andreas@enge.fr>.
2014-05-16 10:22:19 +02:00
Ludovic Courtès 5ce3defed1 system: Add (guix build install) module.
* guix/build/vm.scm (install-grub, evaluate-populate-directive,
  reset-timestamps, register-closure): Move to...
* guix/build/install.scm: ... here.  New file.
* Makefile.am (MODULES): Add it.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Add (guix
  build install) to #:modules.
2014-05-15 23:37:46 +02:00
Ludovic Courtès 150e20ddde vm: Support initialization of the store DB when the store is shared.
* gnu/system/vm.scm (qemu-image): Rename #:inputs-to-copy to #:inputs,
  and #:initialize-store? to #:register-closures?.  Add #:copy-inputs?.
  Adjust build gexp accordingly.
  (system-qemu-image): Remove #:initialize-store? argument and add
  #:copy-inputs?.
  (system-qemu-image/shared-store): Add #:inputs, #:register-closures?,
  and #:copy-inputs? arguments.
* guix/build/vm.scm (register-closure): New procedure.
  (MS_BIND): New variable.
  (initialize-hard-disk): Rename #:initialize-store? to
  #:register-closures?, #:closures-to-copy to #:closures, and add
  #:copy-closures?.
  Add 'target-directory' and 'target-store' variables.
  Call 'populate-store' only when COPY-CLOSURES?.
  Bind-mount the store to TARGET-STORE when REGISTER-CLOSURES? and not
  COPY-CLOSURES?.  Add call to 'register-closure'.
2014-05-15 22:55:14 +02:00
Ludovic Courtès f3b692acdd activation: Silence warning from 'useradd'.
* guix/build/activation.scm (add-user): Don't pass '--create-home' when
  HOME already exists.
2014-05-14 19:07:04 +02:00
Ludovic Courtès 7f17ff7841 linux-initrd: Make /dev/ttyS0, for debugging.
* guix/build/linux-initrd.scm (make-essential-device-nodes): Make
  /dev/ttyS0.
2014-05-14 19:07:04 +02:00
Ludovic Courtès 7d57cfd3b6 system: When unionfs-fuse is used for /, don't kill it when halting.
* guix/build/linux-initrd.scm (pidof): New procedure.
  (mount-root-file-system)[mark-as-not-killable]: New procedure.
  Use it for unionfs when VOLATILE-ROOT?.
* gnu/services/base.scm (%do-not-kill-file): New variable.
  (user-processes-service)[stop]: Honor it.
2014-05-14 19:07:03 +02:00
Ludovic Courtès 17a4d34489 syscalls: Add 'processes' to list all the live processes.
* guix/build/syscalls.scm (kernel?, processes): New procedures.
2014-05-14 19:07:03 +02:00
Ludovic Courtès ab6a279abb system: Make accounts and groups at activation time.
* gnu/services/base.scm (guix-build-accounts): Remove #:gid parameter;
  add #:group.  Remove 'password' and 'gid' fields in 'user-account'
  form, and add 'group'.
  (guix-service): Remove #:build-user-gid parameter.  Remove 'id' field
  in 'user-group' form.
* gnu/system.scm (etc-directory): Remove #:groups and #:accounts.  No
  longer produce files "passwd", "shadow", and "group".  Adjust caller
  accordingly.
  (%root-account): New variable.
  (operating-system-accounts): Add 'users' variable.  Add %ROOT-ACCOUNT
  only of 'operating-system-users' doesn't already contain a root
  account.
  (user-group->gexp, user-account->gexp): New procedures.
  (operating-system-boot-script): Add calls to 'setenv' and
  'activate-users+groups' in gexp.
* gnu/system/linux.scm (base-pam-services): Add PAM services for
  "user{add,del,mode}" and "group{add,del,mod}".
* gnu/system/shadow.scm (<user-account>)[gid]: Rename to...
  [group]: ... this.
  [supplementary-groups]: New field.
  [uid, password]: Default to #f.
  (<user-group>)[id]: Default to #f.
  (group-file, passwd-file): Remove.
* gnu/system/vm.scm (operating-system-default-contents)[user-directories]:
  Remove.  Add "/home" to the directives.
* guix/build/activation.scm (add-group, add-user,
  activate-users+groups): New procedures.
2014-05-11 22:41:58 +02:00
Ludovic Courtès 023f391c78 services: Add 'file-system-service'.
* gnu/services/base.scm (file-system-service): New procedure.
  (user-processes-service): Add 'requirements' parameter.
* gnu/services/dmd.scm (dmd-configuration-file): Use (guix build
  linux-initrd).
* guix/build/linux-initrd.scm (guix): Export 'check-file-system'.
* gnu/system.scm (file-union): New procedure.
  (essential-services): Use it.  Add that to the returned list.
2014-05-10 23:33:52 +02:00
Ludovic Courtès 29fa45f45d Add (guix build syscalls).
* guix/build/syscalls.scm, tests/syscalls.scm: New files.
* Makefile.am (MODULES): Add guix/build/syscalls.scm.
  (SCM_TESTS): Add tests/syscalls.scm.
* guix/utils.scm (%libc-errno-pointer, errno): Remove; take from (guix
  build syscalls).
2014-05-10 22:55:34 +02:00