Commit Graph

257 Commits (1306b0b003a557105d3b27e44052db217c7283d3)

Author SHA1 Message Date
Mark H Weaver ce33631f54 doc: Fix mention of default log location.
* doc/guix.texi (Invoking guix-daemon): Fix mention of default log location.
2014-08-15 01:18:50 -04:00
Ludovic Courtès 6621cdb65c doc: Replace incorrect uses of @ref by @pxref.
* doc/guix.texi: Use @pxref at the end of sentences, not @ref.
2014-07-25 23:42:42 +02:00
Ludovic Courtès 445d652916 doc: Fix typo in USB image file name.
* doc/guix.texi (System Installation): Change image file name.
2014-07-25 13:47:08 +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 931c132a58 doc: Make sure out-of-source-tree builds find os-config.tmpl.
* Makefile.am (BUILT_SOURCES): New variable.
* daemon.am (BUILT_SOURCES): Use +=.
* doc.am (BUILT_SOURCES, MAINTAINERCLEANFILES, EXTRA_DIST): Add
  doc/os-config.texi.
  (doc/os-config.texi): New target.
* doc/guix.texi (System Installation): Include os-config.texi.
2014-07-24 23:50:55 +02:00
Ludovic Courtès 054e85761f doc: Add "guix system" to 'dir'.
* doc/guix.texi: Add "guix system" to the dir entry.
2014-07-24 23:07:53 +02:00
Ludovic Courtès 1dac856638 install: Add a configuration template to the image.
* gnu/system/os-config.tmpl: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it
* gnu/system/install.scm (configuration-template-service): New
  procedure.
  (installation-services): Call it.
* doc/guix.texi (System Installation): Mention
  configuration-template.scm, and @include gnu/system/os-config.tmpl.
2014-07-24 23:02:27 +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 7ab44369b3 doc: Recommend partition labels.
* doc/guix.texi (System Installation): Recommend partition labels.
2014-07-24 23:02:26 +02:00
Ludovic Courtès 83a17b6236 install: Add a service to back the store with the target disk.
Fixes <http://bugs.gnu.org/18061>.
Reported by Adam Pribyl <pribyl@lowlevel.cz>.

* gnu/services/dmd.scm (dmd-configuration-file)[config]: Import (guix
  build utils).
* gnu/system/install.scm (make-cow-store, cow-store-service): New
  procedures.
  (installation-services): Use it.
  (%backing-directory): New variable.
* doc/guix.texi (System Installation): Add the 'deco start cow-store
  /mnt' phase.
2014-07-23 17:47:25 +02:00
Ludovic Courtès db17ae5c27 system: Add /dev/shm.
* gnu/system/file-systems.scm (%shared-memory-file-system): New
  variable.
  (%base-file-systems): Add it.
* doc/guix.texi (File Systems): Document it.
2014-07-23 02:02:07 +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 a85b83d227 doc: Merge the type, variable, and function indices.
* doc/guix.texi (Function Index): Rename to...
  (Programming Index): ... this.  Merge the type, variable, and function
  indices.
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 4e469051a7 system: Add 'create-mount-point?' file system option.
* gnu/system/file-systems.scm (<file-system>)[create-mount-point?]: New
  field.
* gnu/services/base.scm (file-system-service): Add #:create-mount-point?
  parameter and honor it.
* gnu/system.scm (other-file-system-services): Update
  'file-system-service' call accordingly.
* doc/guix.texi (File Systems): Document it.
2014-07-23 02:02:06 +02:00
Ludovic Courtès a69576ea85 system: Add '%devtmpfs-file-system' for udev, and '%base-file-systems'.
Suggested by Adam Pribyl <pribyl@lowlevel.cz>.

* gnu/services/base.scm (udev-service)[requirement]: Add
  'file-system-/dev'.
* gnu/system/file-systems.scm (%devtmpfs-file-system,
  %base-file-systems): New variables.
* gnu/system/install.scm (installation-services)[file-systems]: Use
  %base-file-systems.
* build-aux/hydra/demo-os.scm (file-systems): Likewise.
* doc/guix.texi (System Installation): Show %BASE-FILE-SYSTEMS in the
  example.
  (Using the Configuration System): Likewise.
  (File Systems): Document %base-file-systems, %devtmpfs-file-system,
  %binary-format-file-system, and %fuse-control-file-system.
2014-07-22 16:59:10 +02:00
Ludovic Courtès 7cb9666dd0 doc: Fix typo.
* doc/guix.texi (System Installation): s/are/is/.
2014-07-22 15:23:14 +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
Ludovic Courtès 7779ab611d doc: Show output of 'guix refresh --list-dependent' example.
* doc/guix.texi (Invoking guix refresh): Show example output of the
  command.
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
Mark H Weaver 1c00f83650 Fix typos in manual.
* doc/guix.texi (Using the Configuration System): 'gid' -> 'group'
  in user-account example.
  (Initial RAM Disk): 'base-init' -> 'base-initrd'.
2014-07-18 10:41:47 -04:00
Ludovic Courtès 0ae8c15aef doc: Add "Setuid Programs" node.
* doc/guix.texi (Setuid Programs): New node.
2014-07-17 18:10:16 +02:00
Ludovic Courtès fd1b1fa296 doc: Add "Initial RAM Disk" section.
* doc/guix.texi (Initial RAM Disk): New node.
* gnu/system/linux-initrd.scm (expression->initrd): Adjust docstring.
2014-07-17 17:49:34 +02:00
Ludovic Courtès 8aaaae38a3 doc: List noteworthy limitations.
* doc/guix.texi (Limitations): New subsection.
2014-07-17 14:36:36 +02:00
Ludovic Courtès cf4a912919 doc: Move "System Configuration" higher.
* doc/guix.texi (GNU Distribution): Move "System Configuration" right
  after "System Installation".
2014-07-16 15:54:47 +02:00
Ludovic Courtès 5af6de3e67 doc: Add a "System Installation" node.
* doc/guix.texi (Installation): Add cross-ref to "System Installation".
  (System Installation): New section.
  (System Configuration): Remove disclaimer.
2014-07-15 00:43:04 +02:00
Ludovic Courtès 246a8106ff doc: Remove redundant listing of services.
* doc/guix.texi (Defining Services): Remove listing of service
  procedures; add xref to "Services".
2014-07-14 16:34:24 +02:00
Ludovic Courtès c11a6eb1e5 services: Add options to 'guix-service'.
* gnu/services/base.scm (guix-service): Add #:use-substitutes? and
  #:extra-options parameters, and honor them.
* doc/guix.texi (Base Services): Adjust accordingly.
2014-07-14 15:51:22 +02:00
Ludovic Courtès 927097effd services: Add Tor service.
* gnu/services/networking.scm (tor-service): New procedure.
* doc/guix.texi (Networking Services): Document it.
* build-aux/hydra/demo-os.scm: Use it.  Add TOR and TORSOCKS to
  'packages'.
2014-07-12 23:17:54 +02:00
Ludovic Courtès ef5dd60a3f doc: Start writing about services.
* doc/guix.texi (Using the Configuration System): Remove details about
  '%base-services', and link to "Services".
  (Services): Add introductory text.
  (Base Services, Networking Services, X Window): New nodes.
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
Ludovic Courtès 8451a568f4 doc: Document user accounts and user groups.
* doc/guix.texi (File Systems): Fix typo.
  (User Accounts): Populate.
2014-07-03 23:36:01 +02:00
Ludovic Courtès 113daf6270 doc: Write about file system configuration.
* doc/guix.texi (Using the Configuration System): Change 'guix system
  boot' to 'guix system reconfigure'.
  (File Systems, User Accounts, Services): New nodes.
2014-07-02 23:42:06 +02:00
Ludovic Courtès 0918e64a49 doc: Improve wording and example in "Using the Configuration System".
* doc/guix.texi (Using the Configuration System): Make the intro more
  user-oriented.  Change example to return an operating system.  Fix
  typos.  Mention mandatory/optional fields.
2014-06-27 23:38:21 +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 080571eeac doc: Mention KVM support for 'guix system'.
* doc/guix.texi (Invoking guix system): Add note about KVM support.
2014-06-19 23:35:41 +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 49ad317ae1 doc: Add a few words on the term "derivation".
* doc/guix.texi (Programming Interface): Add a sentence on "derivation".
2014-06-09 18:55:48 +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 6f436c54d6 system: Define '%base-packages' and use it.
* gnu/system.scm (<operating-system>)[packages]: Change default value to
  %BASE-PACKAGES.
  (%base-packages): New variable.
* gnu/system/install.scm (installation-os): Use it when defining the
  'packages' field.
* doc/guix.texi (Using the Configuration System): Use %BASE-PACKAGES in
  example.  Remove now unneeded module imports.  Explain this.
2014-06-04 18:15:50 +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 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 25083588b9 doc: Augment "Package Naming".
* doc/guix.texi (Package Naming): Mention underscores, and give SDL_net
  as an example.
2014-05-25 17:00:01 +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 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 c938494598 Add (gnu) module.
* gnu.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
* build-aux/hydra/demo-os.scm: Use (gnu) and strip import list
  accordingly.
* doc/guix.texi (Using the Configuration System): Adjust example
  accordingly.
2014-05-22 23:24:13 +02:00
Ludovic Courtès d467e640aa doc: Show the 'bootloader' field in system example.
* doc/guix.texi (Using the Configuration System): Add 'bootloader'
  field.
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 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 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 64d76fa6c2 doc: Improve debugging file documentation.
* doc/guix.texi (Installing Debugging Files): Add @cindex.  Remove
  unneeded '-i' in example.  Mention source code an 'directory'.  Link
  to "Build Systems" instead of "Defining Packages".
2014-05-14 01:02:46 +02:00
Ludovic Courtès a12d92f54e doc: Add example for --search.
* doc/guix.texi (Invoking guix package): Add LGPLv3 example.
2014-05-12 23:55:28 +02:00
Andreas Enge af8a56b8a2 doc: Add a section on perl modules in the packaging guidelines.
* doc/guix.texi (Perl modules): New section explaining the naming of perl
    modules.
2014-05-11 12:27:37 +02:00
Ludovic Courtès ef4ab0a4c5 doc: Mention Kiselyov's work on "staging".
* doc/guix.texi (G-Expressions): Mention Oleg's work on "staging" in
  footnote.
2014-05-08 23:42:15 +02:00
Ludovic Courtès e20fd1bf80 doc: Minor improvements in "G-Expressions".
* doc/guix.texi (G-Expressions): Show coreutils version number in store
  file name.  Add xref to "Derivations", in documentation of
  'gexp->derivation'.  Fix typo.
2014-05-03 12:02:43 +02:00
Ludovic Courtès 83bcd0b895 system: Add first-class file system declarations.
* gnu/system.scm (<operating-system>)[initrd]: Default to
  'qemu-initrd'.
  (<file-system>): New record type.
  (operating-system-root-file-system): New procedure.
  (operating-system-derivation): Take the device name for GRUB from
  'operating-system-root-file-system'.  Pass the
  'operating-system-initrd' procedure the list of boot file systems.
* gnu/system/linux-initrd.scm (file-system->spec): New procedure.
  (qemu-initrd): Add 'file-systems' parameter, and remove #:mounts
  parameter.
  [file-system-type-predicate]: New procedure.
  [linux-modules]: Use it.
  Adjust #:mounts argument in 'boot-system' call.
  (gnu-system-initrd): Remove.
* gnu/system/vm.scm (%linux-vm-file-systems): New variable.
  (expression->derivation-in-linux-vm): Adjust call to 'qemu-initrd'.
  (virtualized-operating-system): New procedure.
  (system-qemu-image/shared-store-script)[initrd]: Remove.  Use
  'virtualized-operating-system'.  Get the 'initrd' file from OS-DRV.
* guix/build/linux-initrd.scm (mount-qemu-smb-share, mount-qemu-9p):
  Remove.
  (MS_RDONLY, MS_BIND): New global variables.
  (bind-mount): Remove local 'MS_BIND' definition.
  (mount-root-file-system): New procedure, with code formerly in
  'boot-system'.
  (mount-file-system): New procedure.
  (boot-system): Add #:root-fs-type parameter.  Remove 'MS_RDONLY' local
  variable.  Use 'mount-root-file-system' and 'mount-file-system'.
* doc/guix.texi (Using the Configuration System): Add 'file-system'
  declaration.
2014-05-03 00:46:51 +02:00
Ludovic Courtès ada3df03e3 monads: Hide 'derivation-expression' and 'lower-inputs'.
* guix/monads.scm: Unexport 'lower-inputs' and 'derivation-expression'.
  (text-file*): Add comment about the switch to 'gexp->derivation'.
  (lower-inputs): Add comment about its doom.
  (derivation-expression): Likewise.
* guix/gexp.scm (lower-inputs*): Rename to...
  (lower-inputs): ... this.  Update callers.
* tests/monads.scm (derivation-expression): New procedure.
* doc/guix.texi (The Store Monad): Use 'gexp->derivation' instead of
  'derivation-expression'.  Remove documentation of
  'derivation-expression'.
* guix/ui.scm (read/eval): Use THE-ROOT-MODULE so that macros are
  properly expanded.
* tests/guix-build.sh: Use 'gexp->derivation' instead of
  'derivation-expression'.monads: Hide 'derivation-expression' and 'lower-inputs'.
2014-04-28 23:41:12 +02:00
Ludovic Courtès b5f4e68635 services: Rewrite using gexps.
* gnu/services.scm (<service>)[inputs]: Remove.
* gnu/system.scm (links): Remove.
  (etc-directory): Add PASSWD and SHADOW to #:inputs.
  (operating-system-boot-script): Pass ETC to 'dmd-configuration-file'.
  (operating-system-derivation): Remove EXTRAS from the union.
* gnu/system/linux.scm (pam-service->configuration): Rewrite in terms of
  'gexp->derivation'.  Compute the contents on the build side.  Expect
  'arguments' to contain a list of gexps.
  (pam-services->directory): Rewrite in terms of 'gexp->derivation'.
  (unix-pam-service): Change 'arguments' to a list of one gexp.
* gnu/system/shadow.scm (<user-account>)[inputs]: Remove.
  [shell]: Change default value to a gexp.
  (passwd-file): Rewrite in terms of 'gexp->derivation'.  Compute
  contents on the build side.
* gnu/services/base.scm (host-name-service, mingetty-service,
  nscd-service, syslog-service, guix-service): Change 'start' and 'stop'
  to gexps; remove 'inputs' field.
  (guix-build-accounts): Change 'shell' field to a gexp.
* gnu/services/networking.scm (static-networking-service): Change
  'start' and 'stop' to gexps; remove 'inputs' field.
* gnu/services/xorg.scm (slim-service): Likewise.
* gnu/services/dmd.scm (dmd-configuration-file): Expect ETC to be a
  derivation.  Change 'config' to a gexp.  Use 'gexp->file' instead of
  'text-file'.
* doc/guix.texi (Defining Services): Update nscd example with gexps, and
  without 'inputs'.  Add xref to "G-Expressions".
2014-04-28 23:24:18 +02:00
Ludovic Courtès 21b679f694 Add (guix gexp).
* guix/gexp.scm: New file.
* tests/gexp.scm: New file.
* Makefile.am (MODULES): Add guix/gexp.scm.
  (SCM_TESTS): Add tests/gexp.scm.
* doc/guix.texi (Derivations): Add #:inputs in 'derivation' example.
  Mark 'build-expression->derivation' as deprecated, refer to
  "G-Expressions".  Remove paragraph about code strata.
  (G-Expressions): New node.
2014-04-28 23:24:17 +02:00
Alírio Eyng 9bf404e9e6 doc: Expect to fix typo.
* doc/guix.texi (Build Systems): "except" it is.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2014-04-09 22:22:19 +02:00
Ludovic Courtès 2e7b5cea8c guix system: Add 'vm-image' action and '--image-size' option.
* guix/scripts/system.scm (%options): Add --image-size.
  (%default-options): Add 'image-size'.
  (guix-system)[parse-options]: Handle the 'vm-image' action.
  Honor them.
  (show-help): Update accordingly.
* doc/guix.texi (Invoking guix system): Add 'vm-image'.
2014-04-09 01:20:19 +02:00
Ludovic Courtès 7458bd0a4a doc: Add "Build Systems" section.
* doc/guix.texi (Defining Packages): Add 'arguments' field in the
  example; update 'synopsis' and 'description'.  Remove most of the
  description of 'build-system', and instead reference to the "Build
  Systems" node.  Briefly describe 'arguments' field, and remove more
  elaborate description.  Add cross-reference to "Packaging Guidelines".
  (Build Systems): New node.
  (Packaging Guidelines): Mention '--log-file'.
2014-04-05 17:02:21 +02:00
Ludovic Courtès 4743a4da9b doc: Update description of the chroot contents.
* doc/guix.texi (Build Environment Setup): Adjust description of /dev
  and /proc; remove footnote about /dev/shm, now obsolete.
2014-04-03 23:55:51 +02:00
Alex Sassmannshausen ef27aa9c8c doc: fix typo.
* doc/guix.texi (Substitutes): add a missing 's'.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2014-03-31 21:59:14 +02:00
Ludovic Courtès c4202d60b2 doc: Document substitutes.
* doc/guix.texi (Invoking guix-daemon): Add cross-reference to
  "Substitutes".
  (Features): Remove footnote about unauthenticated substitutes.  Link
  to "Substitutes".
  (Substitutes): New node.
  (Invoking guix build): Link to "Substitutes".
  (Packaging Guidelines): Likewise.
2014-03-30 23:37:46 +02:00
Ludovic Courtès cecd72d55a offload: Allow build machines to specify a port number.
* guix/scripts/offload.scm (<build-machine>): Add 'port' field.
  (remote-pipe, send-files): Use lsh's '-p' option when invoking it.
2014-03-13 21:58:04 +01:00
Ludovic Courtès 7f3673f21d guix build: Add '--with-source'.
* guix/scripts/build.scm (package-with-source): New procedure.
  (show-help): Add '--with-source'.
  (%options): Likewise.
  (options->derivations): Call 'options/with-source' and
  'options/resolve-packages'.
  (options/resolve-packages, options/with-source): New procedures.
* doc/guix.texi (Invoking guix build): Document '--with-source'.
2014-03-12 00:22:41 +01:00
Pierre-Antoine Rault 5ff3c4b820 doc: Update packaging guidelines.
* HACKING (Submitting Patches): Mention 'git send-mail'.
* doc/guix.texi (Packaging Guidelines): More details on how to prepare a
  package module.
  (Contributing): Add reference to #guix channel on Freenode.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2014-03-10 23:43:31 +01:00
Ludovic Courtès 002622b65b guix build: Add '--timeout' to the common build options.
* guix/scripts/build.scm (show-build-options-help): Document
  '--timeout'.
  (set-build-options-from-command-line): Pass #:timeout to
  'set-build-options'.
  (%standard-build-options): Add '--timeout'.
* doc/guix.texi (Invoking guix build): Document it.
2014-03-09 23:09:18 +01:00
Ludovic Courtès 834129e0e2 Change the default store file name to /gnu/store.
* configure.ac: Change the default 'storedir' to /gnu/store.  Print
  $storedir.
* doc/guix.texi: Replace "/nix/store" by "/gnu/store", except where
  describing Nix compatibility.
* Makefile.am: Likewise.
2014-03-09 22:09:58 +01:00
Ludovic Courtès e7f34eb0dc doc: Explain what's special about the (gnu packages ...) name space.
* doc/guix.texi (Invoking guix package): Explain where packages are
  searched for and link to "Package Modules".
  (Defining Packages) <example>: Use 'define-module' clause instead of
  'use-modules'.  Explain why and link to "Package Modules".
  (Invoking guix build): Explain where packages aer searched for and
  link to "Package Modules".
  (Package Modules): Explain that (gnu packages ...) is scanned.
2014-03-08 00:18:21 +01:00
Ludovic Courtès 70ee564299 doc: Factorize documentation of common build options.
* doc/guix.texi (Invoking guix package): Remove documentation for
  --dry-run, --fallback, --no-substitutes, and --max-silent-time.  Add a
  cross-ref to "Invoking guix build".
  (Invoking guix archive): Add "common build options" as the cross-ref
  topic for "Invoking guix build".
  (Invoking guix build): Move common build options separately.  Add a
  paragraph to explain.
2014-03-03 00:22:46 +01:00
Ludovic Courtès 2096ef47aa derivations: Remove unused 'derivation' parameter.
* guix/derivations.scm (derivation): Remove unused #:hash-mode parameter.
* doc/guix.texi (Derivations): Adjust accordingly.
2014-02-21 23:49:53 +01:00
Ludovic Courtès 0dbd88db39 doc: More on what's special about the archive format.
* doc/guix.texi (Invoking guix archive): Expound on what sets the Nar
  format apart.
2014-02-21 23:49:53 +01:00
Ludovic Courtès 36bbbbd150 derivations: Add support for recursive fixed-output derivations.
* guix/derivations.scm (<derivation-output>): Add 'recursive?' field.
  Adjust 'make-derivation-output' callers.
  (%read-derivation) <fixed-output>: When HASH-ALGO starts with 'r:',
  set the 'recursive?' field and drop 'r:' from the hash algo name.
  (write-derivation)[write-output]: Write the algo as 'r:HASH-ALGO' when
  the RECURSIVE? field is set.
  (derivation-hash) <fixed-output>: Prepend "r:" when RECURSIVE? is set.
  (fixed-output-path): New procedure.
  (derivation): Add #:recursive? parameter.  Use 'fixed-output-path' to
  compute the output file name of a fixed output derivation.
  (build-expression->derivation): Add #:recursive? parameter.  Pass it
  to 'derivation'.
* tests/derivations.scm ("fixed-output derivation, recursive",
  "build-expression->derivation produces recursive fixed-output",
  "build-expression->derivation uses recursive fixed-output"): New
  tests.
* doc/guix.texi (Derivations): Document #:recursive? for 'derivation'.
  Add #:recursive? for 'build-expression->derivation'.
2014-02-21 23:49:52 +01:00
Ludovic Courtès 3140f2df42 guix hash: Add '--recursive'.
* guix/scripts/hash.scm (show-help): Add --recursive.
  (%options): Likewise.
  (guix-hash)[file-hash]: New procedure.  Honor --recursive.
  Use it.
* guix/nar.scm (write-file): Add missing field to the &nar-error
  condition raised upon unsupported file type; change its message to be
  more descriptive.
* tests/guix-hash.sh: Add tests with -r.
* doc/guix.texi (Invoking guix hash): Document --recursive.
2014-02-21 23:49:52 +01:00
Ludovic Courtès 8b198abecd gnu: Define '%base-services'.
* gnu/services/base.scm (%base-services): New variable.
* gnu/system.scm (<operating-system>)[services]: Change the default
  value to %BASE-SERVICES.
* doc/guix.texi (Using the Configuration System): Change
  '%standard-services' to '%base-services'.
2014-02-19 21:08:28 +01:00
Ludovic Courtès db4fdc04cc gnu: Introduce the (gnu services ...) modules.
* gnu/system/dmd.scm: Remove file.  Move contents to...
* gnu/services.scm, gnu/services/base.scm, gnu/services/dmd.scm,
  gnu/services/networking.scm, gnu/services/xorg.scm: ... here.  New
  files.
* gnu/system.scm, gnu/system/vm.scm: Adjust accordingly.
* guix/scripts/system.scm (%user-module): Likewise.
* doc/guix.texi (Using the Configuration System): Likewise.
  (Defining Services): Likewise.
2014-02-19 20:58:24 +01:00
Ludovic Courtès 523e48969b Add 'guix system'.
* guix/scripts/system.scm: New file.
* Makefile.am (MODULES): Add it.
* po/POTFILES.in: Likewise.
* doc/guix.texi (Using the Configuration System): Link to "Invoking guix
  system".
  (Invoking guix system): New node.
2014-02-18 23:47:49 +01:00
Ludovic Courtès 6e37066e76 daemon: Add '--gc-keep-outputs' and '--gc-keep-derivations'.
* nix/nix-daemon/guix-daemon.cc (GUIX_OPT_GC_KEEP_OUTPUTS,
  GUIX_OPT_GC_KEEP_DERIVATIONS): New macros.
  (options): Add 'gc-keep-outputs' and 'gc-keep-derivations'.
  (string_to_bool): New function.
  (parse_opt): Honor GUIX_OPT_GC_KEEP_DERIVATIONS and
  GUIX_OPT_GC_KEEP_OUTPUTS.
* doc/guix.texi (Invoking guix-daemon): Document --gc-keep-outputs and
  --gc-keep-derivations.
2014-02-06 21:49:47 +01:00
Ludovic Courtès 45adbd624f monads: Add 'text-file*'.
* guix/monads.scm (text-file*): New procedure.
* tests/monads.scm ("text-file*"): New test.
* doc/guix.texi (The Store Monad): Change example since the previous one
  would erroneously fail to retain a reference to Coreutils.  Document
  'text-file*'.
2014-02-03 23:20:49 +01:00
Ludovic Courtès 1909431c5b derivations: Add #:local-build? parameter for derivations.
* guix/derivations.scm (derivation): Add #:local-build? parameter and
  honor it.
  (build-expression->derivation): Likewise.
* doc/guix.texi (Derivations): Update documentation of these
  procedures.
2014-01-25 17:04:35 +01:00
Ludovic Courtès 4ec2e92ddb doc: More about offloading.
* doc/guix.texi (Daemon Offload Setup): Start with "When desired".  Say
  more on what can go in 'machines.scm', and mention Guile-Avahi.
  (Invoking guix-daemon): Document '--no-build-hook'.
  (Invoking guix build): Add xref to "Daemon Offload Setup".
2014-01-25 16:20:23 +01:00
Ludovic Courtès 49e6291a7a Add 'guix offload' as a daemon build hook.
* nix/nix-daemon/guix-daemon.cc (GUIX_OPT_NO_BUILD_HOOK): New macro.
  (options): Add '--no-build-hook'.
  (parse_opt): Handle it.
  (main)[HAVE_DAEMON_OFFLOAD_HOOK]: Set 'useBuildHook' by default.
  Set $NIX_BUILD_HOOK to our offload hook unless otherwise specified.
  [!HAVE_DAEMON_OFFLOAD_HOOK]: Clear 'useBuildHook'.
* pre-inst-env.in: Set and export NIX_BUILD_HOOK.
* nix/scripts/offload.in, guix/scripts/offload.scm: New files.
* guix/ui.scm (show-guix-help)[internal?]: Add "offload".
* config-daemon.ac: Call 'GUIX_CHECK_UNBUFFERED_CBIP'.
  Instantiate 'nix/scripts/offload'.  Set 'BUILD_DAEMON_OFFLOAD'
  conditional, and optionally define 'HAVE_DEAMON_OFFLOAD_HOOK' cpp
  macro.
* daemon.am (nodist_pkglibexec_SCRIPTS)[BUILD_DAEMON_OFFLOAD]: Add it.
* Makefile.am (MODULES)[BUILD_DAEMON_OFFLOAD]: Add
  'guix/scripts/offload.scm'.
  (EXTRA_DIST)[!BUILD_DAEMON_OFFLOAD]: Likewise.
* m4/guix.m4 (GUIX_CHECK_UNBUFFERED_CBIP): New macro.
* doc/guix.texi (Setting Up the Daemon): Move most of the body to...
  (Build Environment Setup): ... this.  New subsection.
  (Daemon Offload Setup): New subsection.
2014-01-24 00:01:50 +01:00
Ludovic Courtès 6dc99317fb doc: List what's in the chroot.
* doc/guix.texi (Setting Up the Daemon): List what's in the chroot.
2014-01-18 22:32:51 +01:00
Ludovic Courtès d43eb499a6 Update 'nix-upstream' sub-module; adjust build system, doc, and substituter.
* nix-upstream: Update sub-module.
* daemon.am (libutil_a_SOURCES): Add affinity.cc.
  (libutil_headers): Add affinity.hh.
  (libexec_PROGRAMS, nix_setuid_helper_SOURCES,
  nix_setuid_helper_CPPFLAGS, nix_setuid_helper_LDADD): Remove.
* doc/guix.texi (Setting Up the Daemon): Remove paragraph about
  'nix-setuid-helper'.
* guix/scripts/substitute-binary.scm (guix-substitute-binary): Exit 0 when
  %CACHE-URL has an HTTP scheme and looking up its host fails.
  Always print a newline to stdout when starting.
2014-01-18 22:32:50 +01:00
Ludovic Courtès 7e17f65d95 doc: Distinguish between (gnu packages ...) and "GNU packages".
* doc/guix.texi (Package Modules): Add a footnote stating that (gnu
  packages ...) has nothing to do with "GNU packages."
2014-01-17 22:52:10 +01:00
Ludovic Courtès 4eaad71db6 doc: Fix another reference to (gnu packages admin).
* doc/guix.texi (Using the Configuration System): Change module name
  to (gnu packages admin).
2014-01-14 09:00:29 +01:00
Ludovic Courtès 87236aed77 archive: Add '--missing'.
* guix/scripts/archive.scm (show-help, %options): Add '--missing'.
  (guix-archive)[lines]: New procedure.
  Use it to honor '--missing'.
* tests/guix-archive.sh: Add tests.
* doc/guix.texi (Invoking guix archive): Document '--missing'.
2014-01-06 22:25:29 +01:00
Ludovic Courtès 425b0bfc2e guix build: Add '--no-build-hook'.
* guix/scripts/build.scm (%default-options): Add 'build-hook?' pair.
  (show-help, %options): Add --no-build-hook.
  (guix-build): Pass the 'build-hook?' value to 'set-build-options'.
* doc/guix.texi (Invoking guix build): Document '--no-build-hook'.
2014-01-05 22:58:32 +01:00
Ludovic Courtès f82cc5fdbe archive: Add '--authorize'.
* guix/scripts/archive.scm (authorize-key): New procedure.
  (guix-archive): Call it when OPTS contains 'authorize-key'.
* tests/guix-archive.sh: Add test with invalid public key.
* guix/pki.scm: Export '%acl-file'.
* doc/guix.texi (Invoking guix archive): Make it clear that '--import'
  works only with authorized keys.  Document '--authorize'.
2013-12-30 23:18:52 +01:00
Ludovic Courtès 554f26ece3 archive: Add '--generate-key'.
* guix/pk-crypto.scm (error-source, error-string): New procedures.
* guix/pki.scm (%private-key-file): New variable.
* guix/scripts/archive.scm (show-help): Document '--generate-key'.
  (%options): Add "generate-key".
  (generate-key-pair): New procedure.
  (guix-archive): Call 'generate-key' when OPTS contains a
  'generate-key' pair.
* doc/guix.texi (Setting Up the Daemon): Suggest generating a key pair.
  (Invoking guix archive): Document '--generate-key'.
2013-12-30 22:57:37 +01:00
Ludovic Courtès 4d1a2b50a6 doc: Invoke 'useradd' with '--system'.
Reported by Kete <kete@ninthfloor.org>.
Fixes <http://bugs.gnu.org/16289>.

* doc/guix.texi (Setting Up the Daemon): Add '--system' to the 'useradd'
  command line.  Suggested by Kete <kete@ninthfloor.org>.
2013-12-30 16:47:32 +01:00
Ludovic Courtès 760c60d684 Add 'guix archive'.
* guix/scripts/archive.scm, tests/guix-archive.sh: New files.
* Makefile.am (MODULES): Add 'archive.scm'.
  (SH_TESTS): Add 'guix-archive.sh'.
* doc/guix.texi (Invoking guix archive): New section.
* guix/scripts/build.scm: Export 'derivation-from-expression'.
* guix/scripts/package.scm: Export 'specification->package+output'.
2013-12-22 01:08:21 +01:00
Mark H Weaver 6447738c01 guix package: allow multiple arguments after -i, -r, and -u.
* guix/scripts/package.scm (%options): Adapt option processors to accept and
  return a second seed value: 'arg-handler', which handles bare arguments (if
  not false).  The install, remove, and upgrade option processors return an
  arg-handler that repeat the same operation.  All other option processors
  return #f as the arg-handler.  Make the arguments to install and remove
  optional.  The upgrade option processor deletes (upgrade . #f) from the
  alist before adding a new entry.
  (guix-package): Procedures passed to 'args-fold*' accept the new seed value
  'arg-handler'.  The 'operand-proc' uses 'arg-handler' (if not false).

* doc/guix.texi (Invoking guix package): Update docs.

* tests/guix-package.sh: Add test.
2013-12-14 16:25:02 -05:00
Ludovic Courtès 68ad877c6b doc: Slightly improve the "System Configuration" node.
* doc/guix.texi (System Configuration): Add paragraph on upgrades and
  rollback, moved from "Using the Configuration System".
  (Using the Configuration System): Change variable name to
  'komputilo'.  Add xref to "Package Modules".
2013-12-11 10:47:55 +01:00
Ludovic Courtès 4af2447e37 doc: First stab at documenting whole-system configuration.
* doc/guix.texi (Features): Add xref to "Using the Configuration
  System".
  (System Configuration, Using the Configuration System, Defining
  Services): New nodes.
2013-12-10 00:24:02 +01:00
Ludovic Courtès dd1a5a152c derivations: Use more keyword parameters for 'build-expression->derivation'.
* guix/derivations.scm (build-expression->derivation): Turn 'system' and
  'inputs' into keyword parameters.
  Adjust callers accordingly.
* gnu/system/linux.scm, gnu/system/vm.scm, guix/build-system/cmake.scm,
  guix/build-system/gnu.scm, guix/build-system/perl.scm,
  guix/build-system/python.scm, guix/build-system/trivial.scm,
  guix/download.scm, guix/packages.scm, guix/profiles.scm,
  guix/scripts/pull.scm, tests/derivations.scm, tests/guix-build.sh,
  tests/monads.scm, tests/store.scm, tests/union.scm: Adjust users of
  'build-expression->derivation' and 'derivation-expression'
  accordingly.
* doc/guix.texi (Derivations): Adjust 'build-expression->derivation'
  documentation accordingly.
  (The Store Monad): Likewise for 'derivation-expression'.
2013-12-04 16:07:53 +01:00
Ludovic Courtès c320011da5 doc: List the supported platforms.
* doc/guix.texi (GNU Distribution): List the supported platforms.
2013-11-23 22:26:13 +01:00
Ludovic Courtès d03bb6532c doc: Link to package-list.html.
* doc/guix.texi (GNU Distribution): Add link to package-list.html.
2013-11-19 00:02:41 +01:00