Commit Graph

307 Commits

Author SHA1 Message Date
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 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 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
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 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 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
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 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 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 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
Ludovic Courtès 02139eb9b2 linux-initrd: Append to /etc/mtab.
* guix/build/linux-initrd.scm (mount-file-system): Open /etc/mtab in
  append mode.
2014-05-10 21:47:05 +02:00
Ludovic Courtès 474b832d5e linux-initrd: Don't leak /dev/console file descriptors.
* guix/build/linux-initrd.scm (switch-root): Simplify /dev/console
  code.  This fixes a bug where we would leak the IN and OUT file
  descriptors.
2014-05-08 23:42:15 +02:00
Ludovic Courtès 03178aec1d git-download: Disable TLS certificate verification.
* guix/build/git.scm (git-fetch): Add 'setenv' call.
2014-05-08 23:42:15 +02:00
Ludovic Courtès b1995341ce linux-initrd: Update /etc/mtab.
* guix/build/linux-initrd.scm (mount-root-file-system): Populate
  /root/etc/mtab.
  (mount-file-system): Update ROOT/etc/mtab.
2014-05-08 00:22:26 +02:00
Ludovic Courtès 538cc2e016 Remove now unneeded (guix build gnome) module.
* guix/build/gnome.scm: Remove.
* Makefile.am (MODULES): Update accordingly.
2014-05-07 14:32:36 +02:00
Ludovic Courtès 26a728eb09 linux-initrd: Delete files from the initrd ramfs when switching roots.
* guix/build/linux-initrd.scm (switch-root): Delete file from the old
  root.  Chdir to / after 'chroot' call.  Re-open file descriptors 0, 1,
  and 2.
  (boot-system): Move 'loading' message after the 'switch-root' call.
* gnu/system.scm (operating-system-boot-script): Add loop that closes
  file descriptor before calling 'execl'.
2014-05-06 18:18:22 +02:00
Ludovic Courtès 1d4628329d linux-initrd: Improve root file system switching.
* guix/build/linux-initrd.scm (move-essential-file-systems,
  switch-root): New procedures.
  (MS_MOVE): New variable.
  (boot-system): Remove 'mount-essential-file-systems' call for ROOT.
  Use 'switch-root' instead of chdir + chroot.
2014-05-04 22:24:47 +02:00
Ludovic Courtès 3c05b4bc25 linux-initrd: Check the root and other early file systems.
* gnu/system.scm (operating-system-derivation)[boot-file-systems]: Keep "/".
* gnu/system/linux-initrd.scm (file-system->spec): Keep the 'check?'
  flag.
  (qemu-initrd)[helper-packages]: New variable.  Pass it as #:to-copy.
  <gexp>: Add 'set-path-environment-variable' call.  Remove #:unionfs
  argument for 'boot-system'.
* gnu/system/vm.scm (%linux-vm-file-systems): Add 'check?' field/
  (virtualized-operating-system): Likewise for the "9p" file system.
* guix/build/linux-initrd.scm (mount-root-file-system): Change #:unionfs
  default.  Call 'check-file-system' before mounting ROOT, when
  VOLATILE-ROOT? is false.
  (check-file-system): New procedure.
  (mount-file-system): Honor 'check?' element in list; add
  'check-file-system' call.
  (boot-system): Remove #:root-fs-type and #:unionfs parameters.
  [root-mount-point?, root-fs-type]: New variables.
  Call 'mount-file-system' on all MOUNTS but "/".
2014-05-04 00:30:39 +02:00
Ludovic Courtès ad896f23a5 activation: Fix deletion of setuid programs.
* guix/build/activation.scm (activate-setuid-programs): When
  %SETUID-DIRECTORY exists, pass the right file names to 'delete-file'.
2014-05-04 00:18:46 +02:00
Ludovic Courtès 03ddfaf5fb vm: Make root file system type a parameter, and default to ext4.
* gnu/system/vm.scm (qemu-image): Add #:file-system-type parameter.
  Pass it to 'initialize-hard-disk'.
* guix/build/linux-initrd.scm (mount-root-file-system): Always honor
  TYPE.
  (boot-system): Change #:root-fs-type to default to "ext4".  Update
  docstring.
* guix/build/vm.scm (initialize-hard-disk): Remove #:mkfs parameter; add
  #:file-system-type.  Adjust 'mkfs' invocation and 'mount' call to
  honor #:file-system-type.
2014-05-03 12:16:23 +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 09e028f45f system: Add support for setuid binaries.
* gnu/system.scm (<operating-system>)[pam-services, setuid-programs]:
  New fields.
  (etc-directory)[bashrc]: Prepend /run/setuid-programs to $PATH.
  (operating-system-etc-directory): Honor
  'operating-system-pam-services'.
  (%setuid-programs): New variable.
  (operating-system-boot-script): Add (guix build utils) to the set of
  imported modules.  Call 'activate-setuid-programs' in boot script.
* gnu/system/linux.scm (base-pam-services): New procedure.
* guix/build/activation.scm (%setuid-directory): New variable.
  (activate-setuid-programs): New procedure.
* build-aux/hydra/demo-os.scm: Add 'pam-services' field.
2014-04-30 23:16:23 +02:00
Ludovic Courtès d8a7a5bfd5 linux-initrd: Allow setuid binaries from the unionfs to run.
* guix/build/linux-initrd.scm (boot-system): Pass the 'suid' option to
  UNIONFS.
2014-04-30 23:16:23 +02:00
Ludovic Courtès 4dfe6c58ee system: Add (guix build activation).
* gnu/services/dmd.scm (dmd-configuration-file): Remove 'etc'
  parameter.  Move /etc activation code to...
* guix/build/activation.scm: ... here; new file.
* gnu/system.scm (operating-system-boot-script): Augment script: add
  (guix build activation) to the load path; call 'activate-etc'.
* Makefile.am (MODULES): Add guix/build/activation.scm.
2014-04-30 23:16:22 +02:00
Andreas Enge 06ed59825e guix: cmake: Add input and package libraries to the rpath, and adapt package
definitions accordingly.

* guix/build/cmake-build-system.scm (configure): Add flags.
* gnu/packages/maths.scm (lapack): Drop special code.
* gnu/packages/ssh.scm (libssh): Drop special code.
* gnu/packages/slim.scm (slim): Drop special code and enable shared library.

Co-authored-by: Eric Bavier <bavier@member.fsf.org>
2014-04-27 11:35:26 +02:00
Ludovic Courtès 395bea2a53 download: Improve progress report output.
* guix/build/download.scm (url-fetch): Make current-output-port
  unbuffered.
2014-04-16 12:25:52 +02:00
Ludovic Courtès 1c96c1bbab linux-initrd: Mount / as a unionfs when asking for a volatile root.
* guix/build/linux-initrd.scm (make-essential-device-nodes): Make
  /dev/fuse.
  (boot-system): Add #:unionfs parameter.  Invoke UNIONFS instead of
  copying files over when VOLATILE-ROOT? is true.
* gnu/system/linux-initrd.scm (expression->initrd): Add #:inputs
  parameter.
  [files-to-copy]: New procedure.
  [builder]: Add 'to-copy' parameter; honor it.
  (qemu-initrd)[linux-modules]: Add 'fuse.ko' when VOLATILE-ROOT?.
  Pass UNIONFS-FUSE/STATIC as #:inputs; change builder to pass #:unionfs
  to 'boot-system'.
2014-04-14 23:59:08 +02:00
Ludovic Courtès 8d846470f2 build-system/gnu: Reset timestamps on build tree when source is a directory.
* guix/build/utils.scm (copy-recursively): Add #:keep-mtime? parameter
  and honor it.
* guix/build/gnu-build-system.scm (unpack): Use #:keep-mtime? #t.
* gnu/packages/admin.scm (shadow)[arguments]: Remove 'reset-timestamps'
  phase.
2014-04-14 00:09:42 +02:00
Ludovic Courtès 55651ff207 vm: Move image creation to (guix build vm); split into several procedures.
* guix/build/vm.scm (read-reference-graph, initialize-partition-table,
  install-grub, populate-store, evaluate-populate-directive,
  reset-timestamps, initialize-hard-disk): New procedures.
* gnu/system/vm.scm (qemu-image): Change 'builder' to a call to
  'initialize-hard-disk'.
2014-04-11 19:08:25 +02:00
Ludovic Courtès e1a87b904a vm: Add (guix build vm) module.
* guix/build/vm.scm: New file.
* Makefile.am (MODULES): Add it.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Use it.
2014-04-11 19:08:24 +02:00
Ludovic Courtès c865a878a0 gnu: linux-initrd: Mount /dev/pts at boot time.
* guix/build/linux-initrd.scm (make-essential-device-nodes): Remove
  'mount' call for /dev/pts.
  (boot-system): Add it here, after 'chroot' call.
2014-04-09 19:10:07 +02:00
Ludovic Courtès 289773c1d8 gnu: linux-initrd: Better populate /dev.
* guix/build/linux-initrd.scm (make-essential-device-nodes): Make
  /dev/{ptmx,tty} world-writable.  Build additional character devices.
2014-04-09 17:50:37 +02:00
Mark H Weaver 6a0b30f36c union: Ensure that the output is always a directory.
Fixes the creation of single-package profiles, reported by Ludovic Courtès.

* guix/build/union.scm (union-build): Add new internal procedure
  'union-of-directories' that always creates a directory, containing the code
  previously used only to merge multiple directories.  Call it from the
  multiple-directory case in 'union' and from the top-level 'union-build'.
2014-04-03 18:35:16 -04:00
Mark H Weaver 1212999868 union: Rewrite to be faster; handle symlink/directory conflicts.
* guix/build/union.scm: Rewrite; only 'file=?' remains unchanged.  Remove
  'tree-union' and 'delete-duplicate-leaves' exports.  Merge inputs in a
  breadth-first fashion.  Follow symlinks for purposes of making decisions
  about the merge.

* tests/union.scm: Remove tests of 'tree-union' and 'delete-duplicate-leaves'.
2014-04-02 15:31:46 -04:00
Sree Harsha Totakura b3acf3656e Add (guix svn-download).
* guix/svn-download.scm, guix/build/svn.scm: New files.
* Makefile.am (MODULES): Add them.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2014-03-27 00:21:44 +01:00
Ludovic Courtès 4979ee04f0 Merge branch 'core-updates' 2014-03-26 16:31:57 +01:00
Ludovic Courtès 212ece42b0 download: Don't use 'http-get*' on Guile 2.0.10+.
* guix/build/download.scm (http-fetch)[post-2.0.7?]: Use
  'string->number' and numeric comparison.  This fixes version
  comparison with "2.0.10" and subsequent 2.0 releases.
2014-03-25 18:54:52 +01:00
Ludovic Courtès 8be3b8a39b Change default store values from /nix/store to /gnu/store.
* gnu/packages/ld-wrapper.scm (%store-directory): Change the default to
  /gnu/store.
* guix/build/utils.scm (%store-directory): New procedure.
  (remove-store-references): Use it for the default value of 'store'.
* guix/packages.scm (patch-and-repack)[builder]: Change default store to
  /gnu/store.
2014-03-10 23:54:27 +01:00
Ludovic Courtès e06f7865e2 Merge branch 'master' into core-updates 2014-03-10 23:54:17 +01:00
Ludovic Courtès c9c88118a1 gnu: linux-initrd: Make the pseudo-tty device nodes.
* guix/build/linux-initrd.scm (make-essential-device-nodes): Create
  /dev/ptmx and /dev/pts.
* gnu/system/vm.scm (qemu-image): Umount /fs/dev/pts before /fs.
2014-03-10 23:43:31 +01:00
Ludovic Courtès 17919a5801 build-system/gnu: Allow the source to be a directory.
* guix/build/gnu-build-system.scm (unpack): Check if SOURCE is a
  directory, and copy it locally if it is.
* gnu/packages/libwebsockets.scm (libwebsockets)[arguments]: Remove
  'unpack' phase.
2014-02-22 00:34:49 +01:00
Ludovic Courtès b2bfa32d25 Merge branch 'master' into core-updates
Conflicts:
	gnu-system.am
2014-02-22 00:27:57 +01:00
Ludovic Courtès 9b5b5c1740 Add (guix git-download).
* guix/git-download.scm, guix/build/git.scm: New files.
* Makefile.am (MODULES): Add them.
* guix/packages.scm (<origin>): Fix comment for 'method' field.
2014-02-21 23:49:53 +01:00
John Darrington c2e6516721 build-system/gnu: Set the docdir to "share/doc"
* guix/build/gnu-build-system.scm (configure):
  Change docdir directory from "doc" to "share/doc".

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2014-02-10 22:22:53 +01:00
Ludovic Courtès 6ede17ca69 union: Do not compare directories upon collision.
* guix/build/union.scm (file=?): Return #f if FILE1 and FILE2 are not
  regular files.  Fixes a bug whereby collisions among directories would
  lead to the invocation of 'file=?' and thus 'call-with-input-file' on
  directories.  Reported by Mark H. Weaver <mhw@netris.org>.
2014-02-10 00:05:39 +01:00
Ludovic Courtès 2de227af4b download: Provide a 'User-Agent' field in HTTP requests.
Fixes <http://bugs.gnu.org/16703>.
Reported by Raimon Grau <raimonster@gmail.com>.

* guix/build/download.scm (http-fetch)[headers]: New variable.
  Pass it as #:headers or #:extra-headers to 'http-get' and
  'http-get*'.
2014-02-10 00:03:34 +01:00
Ludovic Courtès 26fc862a61 gnu: linux-initrd: When booting, chdir to the new root before calling 'chroot'.
* guix/build/linux-initrd.scm (boot-system): Add 'chdir' call right
  before 'chroot'.
2014-02-09 23:28:18 +01:00
Ludovic Courtès 1c2215108b gnu: linux-initrd: Build /dev/input devices.
* guix/build/linux-initrd.scm (make-essential-device-nodes): Make
  dev/input devices.
2014-02-01 02:22:23 +01:00
Ludovic Courtès c04c6ff64c gnu: linux-initrd: Make /dev/{mem,kmem}.
* guix/build/linux-initrd.scm (make-essential-device-nodes): Make
  dev/{mem,kmem}.
2014-02-01 01:07:14 +01:00
Ludovic Courtès 44ddf33ed5 gnu: linux-initrd: Allow the root file system to be volatile.
* gnu/system/linux-initrd.scm (qemu-initrd): Add 'volatile-root?'
  parameter.
* guix/build/linux-initrd.scm (boot-system): Likewise.  Honor it.
2014-01-31 14:26:30 +01:00
Ludovic Courtès 4919d68432 gnu: linux-initrd: Recognize 9p file systems.
* gnu/system/linux-initrd.scm (qemu-initrd)[virtio-9p-modules]: New
  variable.
  [linux-modules]: Append VIRTIO-9P-MODULES when a 9p file system is in
  MOUNTS.
* guix/build/linux-initrd.scm (mount-qemu-9p): New procedure.
  (boot-system): Recognize '9p' in MOUNTS, and use 'mount-qemu-9p'.
2014-01-31 12:52:13 +01:00
Ludovic Courtès fc4bc4b6de gnu: linux-initrd: Properly distinguish between /dev/sda* and /dev/vda*.
* guix/build/linux-initrd.scm (make-essential-device-nodes): Rename
  devices with major = 8 to /dev/sda*.  Make /dev/vda* devices.
* gnu/system/vm.scm (qemu-image): Change '/dev/vda' to '/dev/sda'.
* gnu/system.scm (operating-system-derivation): Likewise.
2014-01-31 01:43:16 +01:00
Ludovic Courtès 83b9e6a185 gnu: linux-initrd: Start a REPL when the root could not be mounted.
* guix/build/linux-initrd.scm (boot-system): Catch errors when mounting
  ROOT and call 'start-repl' upon error.
2014-01-31 01:40:02 +01:00
Ludovic Courtès d425471182 gnu: linux-initrd: Factorize boot code.
* guix/build/linux-initrd.scm (boot-system): New procedure.
* gnu/system/linux-initrd.scm (qemu-initrd): Add keyword parameters
  'guile-modules-in-chroot?' and 'mounts'.  Change builder to simply
  call 'boot-system'.
  (gnu-system-initrd): Change to a simple call to 'qemu-initrd'.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Call
  'qemu-initrd' with #:guile-modules-in-chroot?.
2014-01-29 21:57:56 +01:00
Ludovic Courtès 49a8b80da6 Revert "build-system/gnu: Pass --localstatedir=/var --sharedstatedir=/com."
This reverts commit 65529e49ff.
2014-01-28 08:57:37 +01:00
Ludovic Courtès 65529e49ff build-system/gnu: Pass --localstatedir=/var --sharedstatedir=/com.
Suggested by John Darrington <john@darrington.wattle.id.au>
and Mark H Weaver <mhw@netris.org>.

* guix/build/gnu-build-system.scm (configure): Pass --localstatedir=/var
  --sharedstatedir=/com.
* gnu/packages/admin.scm (dmd): Remove 'arguments' field.
* gnu/packages/avahi.scm (avahi): Remove --localstatedir flag.
* gnu/packages/glib.scm (dbus): Likewise.
* gnu/packages/package-management.scm (guix): Likewise.
* gnu/packages/pulseaudio.scm (pulseaudio): Likewise.
2014-01-27 23:45:59 +01:00
Ludovic Courtès 200a97e64f Merge branch 'master' into core-updates 2014-01-25 17:07:21 +01:00
Ludovic Courtès b97c95eb3c linux-initrd: Make /dev/{null,zero} world-writable.
Reported by zerwas on #guix.

* guix/build/linux-initrd.scm (make-essential-device-nodes): Make
  /dev/null and /dev/zero world-writable.
2014-01-18 22:32:50 +01:00
John Darrington db6190899e gnu: gnu-build-system: Add CC_FOR_BUILD to configure flags.
* guix/build/gnu-build-system.scm: Add new configure flag: CC_FOR_BUILD=gcc

* gnu/packages/gnupg.scm, gnu/packages/guile.scm, gnu/packages/make-bootstrap.scm:
  remove CC_FOR_BUILD from these package descriptions.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2013-12-17 21:28:07 +01:00
Ludovic Courtès 3dbeecd2ff pull: Move build code to (guix build pull).
* guix/build/pull.scm: New file.
* Makefile.am (MODULES): Add it.
* guix/scripts/pull.scm (unpack): Use it.
2013-12-16 23:26:48 +01:00
Cyril Roelandt af949e8ee7 gnu: gtk+: enable introspection.
* gnu/packages/gtk.scm (atk, gdk-pixbuf, gtk+, pango): enable introspection
* guix/build/gnome.scm: New file.
2013-12-15 23:39:43 +01:00
Ludovic Courtès 977f03ffd3 build-system/cmake: Build out of source tree by default.
* guix/build-system/cmake.scm (cmake-build): Change 'out-of-source?' to
  default to #t.
* guix/build/cmake-build-system.scm (configure): Add 'out-of-source?'
  keyword parameter and honor it.
2013-11-28 00:15:07 +01:00
Ludovic Courtès ff8061b591 Merge branch 'master' into core-updates 2013-11-01 12:59:31 +01:00
Ludovic Courtès cdbca518ca union: Do not warn when identical files collide.
* guix/build/union.scm (file=?): New procedure.
  (union-build)[resolve-collision]: Do not warn when identical files
  collide.
2013-10-31 23:38:58 +01:00
Ludovic Courtès c065c443a0 union: Make the log port a parameter.
* guix/build/union.scm (union-build): Add 'log-port' keyword parameter;
  use it.
2013-10-30 22:09:32 +01:00
Ludovic Courtès f1352766fa utils: 'find-files' always returns a proper list.
Reported at <http://bugs.gnu.org/15608>.

* guix/build/utils.scm (find-files): Change the 'error' procedure to
  return RESULT.  Before we would end up with an improper list.
2013-10-16 15:53:59 +02:00
Andreas Enge e78fd4ca63 guix: Make cmake build system aware of usual paths.
*  guix/build/cmake-build-system.scm (configure): Set CMAKE_LIBRARY_PATH to
     LIBRARY_PATH and CMAKE_INCLUDE_PATH to CPATH.
2013-10-13 18:02:49 +02:00
Ludovic Courtès 7e2b10a53f build-system/{gnu,cmake}: Remove #:patches and #:patch-flags parameters.
* guix/build/gnu-build-system.scm (patch): Remove.
  (%standard-phases): Remove 'patch'.
* guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Remove
  #:patches and #:patch-flags parameters.
* guix/build-system/cmake.scm (cmake-build): Likewise.
* guix/build-system/python.scm (package-with-explicit-python): Update
  comment.
2013-10-10 23:15:57 +02:00
Ludovic Courtès 5608847c6f Merge branch 'master' into core-updates 2013-09-23 00:35:17 +02:00
Ludovic Courtès 66018f1c33 utils: 'find-files' returns a sorted list.
* guix/build/utils.scm (find-files): Sort the result lexicographically.
* guix/scripts/pull.scm (unpack): Don't sort the result of 'find-files'.
2013-09-15 23:21:30 +02:00
Andreas Enge aae4ead814 Merge branch 'python' 2013-09-14 10:45:01 +02:00
Andreas Enge 824af8cadc guix: python: Create module installation path and add it to PYTHONPATH during
the installation phase.

* guix/build/python-build-system.scm (get-python-version): New procedure.
* guix/build/python-build-system.scm (install): Create and add path.
* gnu/packages/python.scm (python-setuptools): Drop path creation code.
2013-09-11 15:47:34 +02:00
Ludovic Courtès 37c825eb79 linux-initrd: Create /dev/klog and /dev/kmsg.
* guix/build/linux-initrd.scm (make-essential-device-nodes): Make
  /dev/klog and /dev/kmsg.
2013-09-11 01:07:50 +02:00
Andreas Enge b191f88ee3 guix: python: Add build phase and factor out calls to setup.py.
* guix/build/python-build-system.scm (call-setuppy): New procedure.
* guix/build/python-build-system.scm (build): New procedure.
* guix/build/python-build-system.scm (check, install): Use call-setuppy.
* guix/build/python-build-system.scm (%standard-phases): Add call to build.
2013-09-05 20:25:08 +02:00
Andreas Enge 7b96bf82da gnu: python: Honour #:tests? and #:test-target in build system.
* guix/build/python-build-system.scm (check): Use named parameters tests?
    and test-target (default now: "test" instead of "check").
2013-09-05 18:43:18 +02:00
Ludovic Courtès 29804e6eb2 gnu: linux-initrd: Fix creation of /dev/tty nodes.
* guix/build/linux-initrd.scm (make-essential-device-nodes): Make
  /dev/tty.  Change from 'block-special' to 'char-special' for /dev/tty*
  nodes.
2013-09-05 00:46:09 +02:00
Andreas Enge 3df47231e6 guix: python: Switch to python-wrapper as the default version for the python
build system (switches to Python 3) and compute python-version instead of
  passing it as a parameter.

* guix/build-system/python.scm (default-python): Switch to python-wrapper.
* guix/build-system/python.scm (python-build): Drop parameter #:python-version.
* guix/build/python-build-system.scm (wrap): Compute python version from input.
2013-09-04 18:07:55 +02:00
Ludovic Courtès 43dd92024a union: Don't traverse sub-directories only found in one element of the union.
This significantly reduces I/O when building profiles, especially with
lots of package-specific sub-directories (such as 'share/emacs/24.3',
'texmf', etc.)

* guix/build/union.scm (union-build)[file-tree](others-have-it?): New
  procedure.  Use it in the 'enter?' parameter of 'file-system-fold';
  change 'skip' parameter accordingly.
* tests/union.scm ("union-build"): Ensure that 'include' is a symlink
  and 'bin' is a directory.
2013-09-02 23:04:25 +02:00
Ludovic Courtès d91712ee89 gnu: linux-initrd: Factorize device node creation.
* guix/build/linux-initrd.scm (make-essential-device-nodes): New
  procedure.
* gnu/packages/linux-initrd.scm (qemu-initrd): Use it.
2013-09-02 00:20:14 +02:00
Ludovic Courtès 89bf140b10 gnu: linux-initrd: Make Guile modules accessible in the chroot.
* gnu/packages/linux-initrd.scm (qemu-initrd): Add (guix build utils) to
  #:modules, and use it.  Copy .scm and .go files to /root.
* guix/build/linux-initrd.scm (bind-mount): New procedure.
2013-08-31 23:02:18 +02:00
Ludovic Courtès 88840f0246 gnu: linux-initrd: Add (guix build linux-initrd) and use it.
* gnu/packages/linux-initrd.scm (qemu-initrd): Add #:modules argument.
  Factorize and move some of the code to...
* guix/build/linux-initrd.scm: ... here.  New file.
* Makefile.am (MODULES): Add it.
2013-08-29 00:05:03 +02:00
Ludovic Courtès fe12c3458c build-system/gnu: Add `dist-package'.
* guix/build/gnu-dist.scm: New file.
* Makefile.am (MODULES): Add it.
* guix/build-system/gnu.scm (%default-modules): New variable.
  (gnu-build): Use it.
  (dist-package): New procedure.
2013-08-24 17:30:31 +02:00
Ludovic Courtès c769406010 Merge branch 'core-updates' 2013-07-09 22:17:18 +02:00
Ludovic Courtès be58d01a7e build-system/gnu: Write debug files to the "debug" sub-derivation, if any.
* guix/build/gnu-build-system.scm (strip): Add `objcopy-command' keyword
  parameter.
  [debug-output, debug-file-extension]: New variables.
  [debug-file, make-debug-file, add-debug-link]: New procedures.
  [strip-dir]: Use them.
2013-07-03 23:53:31 +02:00
Ludovic Courtès d475b25953 utils: Re-export `alist-cons' and `alist-delete'.
* guix/build/utils.scm: Re-export `alist-cons' and `alist-delete'.
2013-07-03 23:08:41 +02:00
Ludovic Courtès b15669f37d utils: `set-path-environment-variable' calls `unsetenv' for empty values.
* guix/build/utils.scm (set-path-environment-variable): When VALUE is
  the empty string, call `unsetenv' instead of `setenv'.
* gnu/packages/guile.scm (guile-2.0)[arguments]: Remove `unsetenv'
  trick.
2013-06-22 16:42:46 +02:00
Ludovic Courtès 2f41f51c40 build-system/gnu: Set #:tests? to #f when cross-compiling.
* guix/build/gnu-build-system.scm (check): Add `target' formal
  parameter.  Change `tests?' to default to (not target).
2013-06-22 16:15:23 +02:00
Ludovic Courtès 91a7fde456 download: Don't fail when abbreviating `file://' URIs.
* guix/build/download.scm (uri-abbreviation)[elide-path]: Handle the
  case where URI has no `host' part.
2013-06-22 16:10:25 +02:00
Ludovic Courtès 4ca968eb95 build-system/gnu: Save `environment-variables' after each phase.
* guix/build/gnu-build-system.scm (set-paths): Move `system' call to...
  (gnu-build): ... here.
2013-06-21 00:32:07 +02:00
Ludovic Courtès 56c092ce94 build-system/gnu: Unify with (guix build-system gnu-cross-build).
* guix/build/gnu-build-system.scm (set-paths): Add `native-inputs' and
  `native-search-paths' keyword parameters.  Honor them.
  (configure): Add `target' and `native-inputs' keyword parameters.
  Look for Bash in NATIVE-INPUTS or INPUTS.  Pass `--host' when TARGET
  is true.
  (strip): Add `strip-command' keyword parameter.  Use it.
* guix/build/gnu-cross-build.scm: Remove.
* Makefile.am (MODULES): Adjust accordingly.
* gnu/packages/acl.scm, gnu/packages/attr.scm, gnu/packages/base.scm,
  gnu/packages/bash.scm, gnu/packages/gawk.scm,
  gnu/packages/gettext.scm, gnu/packages/guile.scm,
  gnu/packages/libffi.scm, gnu/packages/libsigsegv.scm,
  gnu/packages/linux.scm, gnu/packages/ncurses.scm,
  gnu/packages/readline.scm, guix/build-system/gnu.scm: Replace
  `%standard-cross-phases' by `%standard-phases'.  Remove references
  to (guix build gnu-cross-build).
2013-06-21 00:25:54 +02:00
Ludovic Courtès a85060efec substitute-binary: Report progress while downloading.
* guix/scripts/substitute-binary.scm (decompressed-port): Improve docstring.
  (progress-report-port): New procedure.
  (guix-substitute-binary)["--substitute"]: Use it to report progress.
* guix/build/download.scm: Export `progress-proc' and `uri-abbreviation'.
2013-06-20 23:41:28 +02:00
Cyril Roelandt 842ded334f python-build-system: add a check phase.
* guix/build/python-build-system.scm (check): New procedure.
  (%standard-phases): Use it.
2013-05-28 22:53:35 +02:00
Ludovic Courtès 264218a47e build-system/gnu: Implement cross build.
* guix/build-system/gnu.scm (inputs-search-paths): New procedure.
  (standard-search-paths): Use it.
  (expand-inputs): New procedure.
  (standard-inputs): Use it.
  (standard-cross-packages, standard-cross-inputs,
  standard-cross-search-paths, gnu-cross-build): New procedures.
  (gnu-build-system): Set `cross-build' field to `gnu-cross-build'.
* gnu/packages/cross-base.scm: Export `cross-gcc', `cross-binutils', and
  `cross-libc'.
* guix/build/gnu-cross-build.scm: New file.
* Makefile.am (MODULES): Add it.
2013-05-24 22:44:15 +02:00
Ludovic Courtès dd9afe64b5 download: Fix premature socket close on TLS connections.
This would manifest when downloading a large file such as the Bazaar
tarball, leading to an "Error in the pull function" GnuTLS exception.

* guix/build/download.scm (add-weak-reference): New procedure.
  (tls-wrap): Add (add-weak-reference record port).
2013-05-10 01:14:25 +02:00
Nikita Karetnikov 40506d5d92 Add 'python-build-system'.
* guix/build-system/python.scm, guix/build/python-build-system.scm: New files.
* Makefile.am (MODULES): Add them.
2013-05-08 22:46:12 +00:00
Ludovic Courtès 3309e3a103 Add (guix build rpath).
* guix/build/rpath.scm: New file.
* Makefile.am (MODULES): Add it.
* gnu/packages/python.scm (python): Use it; remove local copy of
  the *rpath* procedures.
* gnu/packages/samba.scm (samba): Likewise.
2013-05-08 23:45:02 +02:00
Nikita Karetnikov 01155b1808 utils: Adjust 'wrap-program'.
* guix/build/utils.scm (wrap-program): Fix computation of PROG-REAL and
  PROG-TMP when PROG is an absolute file name.  Add "$@" in the
  generated script, and quote PROG-REAL.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2013-04-30 16:58:59 +02:00
Ludovic Courtès 593987671a build-system/gnu: Fix default name for the "doc" output directory.
* guix/build/gnu-build-system.scm (configure)[package-name]: Drop the
  prefix corresponding to the hash part of OUT.
2013-04-28 23:39:28 +02:00
Ludovic Courtès a18eda2747 packages: Add `native-search-paths' field and honor it.
* guix/packages.scm (<search-path-specification>): New record type.
  (search-path-specification->sexp): New procedure.
  (<package>)[native-search-paths]: New field.
  (package-derivation): Accumulate the search paths, and pass them
  as #:search-paths toe BUILDER.
* guix/build-system/gnu.scm (gnu-build): Add #:search-paths.  Compute
  `implicit-search-paths'.  Pass #:search-paths in BUILDER.
* guix/build-system/perl.scm (perl-build): Add #:search-paths, pass it
  to BUILDER with the search paths of PERL.
* guix/build-system/cmake.scm (cmake-build): Add #:search-paths, pass it
  to BUILDER.
* guix/build-system/trivial.scm (trivial-build): Add #:search-paths,
  ignore it.
* guix/build/gnu-build-system.scm (set-paths): Add #:search-paths.
  Remove explicit settings of CPATH, LIBRARY_PATH, and PKG_CONFIG_PATH.
  Instead, walk SEARCH-PATHS and call `set-path-environment-variable'
  for them.
* guix/build/perl-build-system.scm (perl-build): Remove PERL5LIB setting.
* tests/packages.scm ("search paths"): New test.
* gnu/packages/bootstrap.scm (%bootstrap-guile)[raw]: Add
  #:search-paths.
  (%bootstrap-gcc): Add `native-search-paths' field.
* gnu/packages/perl.scm (perl): Likewise.
* gnu/packages/pkg-config.scm (pkg-config): Likewise.
* gnu/packages/glib.scm (intltool): Remove `arguments'.
* gnu/packages/avahi.scm (avahi): Remove #:phases.
2013-03-30 22:57:03 +01:00
Ludovic Courtès a96748bb46 build-system/gnu: Remove #:path-exclusions parameter.
* guix/build/gnu-build-system.scm (set-paths): Remove `path-exclusions'
  parameter.  Replace `relevant-input-directories' by
  `input-directories'.
* guix/build-system/gnu.scm (gnu-build): Remove `path-exclusions'
  parameter; don't pass it in BUILDER.
* guix/build-system/cmake.scm (cmake-build): Likewise.
2013-03-30 21:46:59 +01:00
Ludovic Courtès 4928e50033 Merge branch 'master' into core-updates
Conflicts:
	Makefile.am
	gnu/packages/base.scm
2013-03-29 21:44:31 +01:00
Cyril Roelandt c6bded8a29 Add (guix build-system cmake).
* guix/build/cmake-build-system.scm, guix/build-system/cmake.scm: New files.
* Makefile.am (MODULES): Add them.
2013-03-28 21:04:54 +01:00
Nikita Karetnikov 30db6af1de utils: Add 'wrap-program'.
* guix/build/utils.scm (wrap-program): New procedure.
2013-03-07 00:46:23 +01:00
Ludovic Courtès 6ba9dd813d Revert "utils: Add 'wrap-program'."
This reverts commit 02065130de.
2013-03-07 00:36:14 +01:00
Nikita Karetnikov 02065130de utils: Add 'wrap-program'.
* guix/build/utils.scm (wrap-program): New procedure.
2013-03-06 21:03:26 +00:00
Ludovic Courtès 12761f48ea utils: Add a #:follow-symlinks? parameter to `copy-recursively'.
* guix/build/utils.scm (copy-recursively): Turn `log' into a keyword
  parameter.  Add the `follow-symlinks?' parameter and honor it.
2013-03-05 19:03:39 +01:00
Ludovic Courtès e65df6a63a utils: Add `delete-file-recursively'.
* guix/build/utils.scm (delete-file-recursively): New procedure.
2013-03-05 18:53:53 +01:00
Ludovic Courtès 81eec00cb2 Merge branch 'master' into core-updates
Conflicts:
	Makefile.am
	guix/scripts/gc.scm
	guix/scripts/package.scm
	guix/ui.scm
	tests/guix-package.sh
2013-03-04 23:27:24 +01:00
Andreas Enge 8689a1908a guix: build: Add "share/pkgconfig" to PKG_CONFIG_PATH, as used by xorg.
* guix/build/gnu-build-system.scm (set-paths): Add "share/pkgconfig"
     to PKG_CONFIG_PATH.
2013-03-04 10:14:34 +01:00
Ludovic Courtès 08fd1ebefd Add (guix build-system perl).
* guix/build-system/perl.scm, guix/build/perl-build-system.scm: New files.
* Makefile.am (MODULES): Add them.
* guix/build-system/gnu.scm (standard-inputs): Make public.
2013-03-04 00:48:00 +01:00
Ludovic Courtès cc68ccc5b0 download: Adjust to `http-get*' deprecation.
* guix/build/download.scm (http-fetch): Adjust to use #:streaming? when
  using Guile 2.0.8+.
2013-02-27 20:55:41 +01:00
Andreas Enge ca8def6e6f Patch-shebang: Do not add space after interpreter without argument.
* guix/build/utils.scm (patch-shebang): Do not add a space after a command
  interpreter not followed by an argument; this made two tests of
  coreutils fail.
2013-02-23 23:27:46 +01:00
Andreas Enge 11996d85d3 Patch-shebang: Handle "#!/usr/bin/env command"
* guix/build/utils.scm (patch-shebang): Handle replacement of
   "#!.*/env CMD ARGS" by "#!/nix/store/path/.../to/CMD ARGS".
2013-02-23 20:32:03 +01:00
Ludovic Courtès 80736cdf20 download: Adjust to `http-get*' deprecation.
* guix/build/download.scm (http-fetch): Adjust to use #:streaming? when
  using Guile 2.0.8+.
2013-02-20 22:59:35 +01:00
Ludovic Courtès 1be77eac08 union: Don't warn when colliding leaves point to the same file.
* guix/build/union.scm (union-build)[resolve-collision]: Pass LEAVES
  through `delete-duplicates'; warn iff the result contains more than
  one item.
2013-02-06 23:04:10 +01:00
Ludovic Courtès 6211223021 union: Delete duplicates when passed the same input several times.
* guix/build/union.scm (union-build): Prepend "." to the result of
  `union-tree', to match the expectations of `delete-duplicate-leaves'.
  Don't do mkdir when SUBDIR is ".".
* tests/union.scm ("union-build"): Keep duplicates in %BOOTSTRAP-INPUTS.
2013-02-06 23:04:10 +01:00
Ludovic Courtès 67158a4900 download: Follow HTTP redirection upon 301 "moved permanently".
* guix/build/download.scm (http-fetch): Follow redirections upon 301.
  This is what `downloads.sourceforge.net' returns, for instance.
2013-01-25 21:52:08 +01:00
Ludovic Courtès 483f11589e download: Add HTTPS support.
* guix/build/download.scm: Autoload (gnutls).
  (tls-wrap): New procedure.
  (open-connection-for-uri): Add support for `https'.  Wrap the socket
  with `tls-wrap' in that case.
  (url-fetch): Add `https'.
* guix/download.scm (gnutls-derivation): New procedure.
  (url-fetch)[need-gnutls?]: New variable.
  Call `gnutls-derivation' when NEED-GNUTLS? is true, and add its output
  to the `GUILE_LOAD_PATH' env. var. in that case.
2013-01-20 22:54:36 +01:00
Ludovic Courtès 01e354eb83 Merge branch 'core-updates'
Conflicts:
	guix/build/union.scm
2013-01-11 16:01:49 +01:00
Ludovic Courtès 28e5560421 download: Abbreviate URLs when displaying the progress report.
* guix/build/download.scm (uri-abbreviation): New procedure.
  (ftp-fetch, http-fetch): Use it instead of `uri->string' when calling
  `progress-proc'.  Reported by Andreas Enge.
2013-01-11 15:41:58 +01:00
Ludovic Courtès a06a99ff77 build-system/gnu: Improve support for "lib" outputs; support "doc" outputs.
* guix/build/gnu-build-system.scm (configure)[package-name]: New
  procedure.
  When LIBDIR is true and INCLUDEDIR is false, add
  --includedir=LIBDIR/include.
  Add support for --docdir when a "doc" output exists.
2013-01-10 00:08:40 +01:00
Ludovic Courtès b2d58cd80a union: Detect collisions, and delete duplicate leaves.
* guix/build/union.scm (delete-duplicate-leaves): New procedure.
  (union-build)[leaf=?, resolve-collision]: New procedures.
  Use `delete-duplicate-leaves' on the result of `tree-union'.
* tests/union.scm ("delete-duplicate-leaves, default",
  "delete-duplicate-leaves, file names"): New tests.
2013-01-09 22:10:06 +01:00
Ludovic Courtès e66ca1a5a8 download: Report the progress of HTTP downloads.
* guix/build/download.scm (http-fetch): Rename `bv' to `bv-or-port'.
  Use `http-get*' followed by `dump-port' when the former is available,
  and pass a progress procedure to `dump-port'.
2013-01-06 18:36:50 +01:00
Ludovic Courtès e47bac7902 download: Report the progress of FTP downloads.
* guix/build/download.scm (progress-proc): New procedure.
  (ftp-fetch): Call `ftp-size' on URI.  Use `progress-proc', and pass
  the result to `dump-port', along with #:buffer-size.
2013-01-06 18:35:23 +01:00
Ludovic Courtès 4050e5d6cf Merge branch 'master' into core-updates
Conflicts:
	build-aux/download.scm
	distro/packages/autotools.scm
	distro/packages/base.scm
	distro/packages/bootstrap.scm
	distro/packages/lsh.scm
	distro/packages/make-bootstrap.scm
	distro/packages/ncurses.scm
	distro/packages/perl.scm
	tests/derivations.scm
	tests/union.scm
2013-01-06 17:33:02 +01:00
Ludovic Courtès 4155e2a909 Update license headers of builder-side code.
Change license headers with this script:

  (use-modules (guix build utils))

  (fluid-set! %default-port-encoding "UTF-8")

  (substitute* (cons "distro/packages/ld-wrapper.scm"
		     (find-files "guix/build" "\\.scm$"))
    (("^([[:graph:]]+) This file is part of Guix." _ comment-start)
     (string-append comment-start " This file is part of GNU Guix."))
    (("^([[:graph:]]+) Guix --- Nix package management.*" _ comment-start)
     (string-append comment-start
		    " GNU Guix --- Functional package management for GNU\n"))
    (("^([[:graph:]]+) Guix is " _ comment-start)
     (string-append comment-start " GNU Guix is "))
    (("^([[:graph:]]+) along with Guix." _ comment-start)
     (string-append comment-start " along with GNU Guix."))
    (("^([[:graph:]]+) Copyright \\(C\\)" _ comment-start)
     (string-append comment-start " Copyright ©")))

* distro/packages/ld-wrapper.scm, guix/build/download.scm,
  guix/build/gnu-build-system.scm, guix/build/union.scm,
  guix/build/utils.scm: Update license headers.
2013-01-05 16:08:07 +01:00
Ludovic Courtès 7584f822bf utils: Add `which'.
* guix/build/utils.scm (which): New procedure.

* distro/packages/lsh.scm (lsh): Use `which' instead of `search-path'.
* distro/packages/perl.scm (perl): Likewise.
* distro/packages/attr.scm (attr): Likewise.
2013-01-05 16:02:32 +01:00
Ludovic Courtès 93b0357575 utils: Use binary I/O primitives for `remove-store-references'.
* guix/build/utils.scm (fold-port-matches)[get-char]: New procedure.
  (remove-store-references): Use `put-u8' and `put-bytevector'.
2013-01-01 23:12:34 +01:00
Ludovic Courtès b2adb3ae04 build-system/gnu: Add support for the "bin" output.
* guix/build/gnu-build-system.scm (configure): Add support for "bin"
  output.
2013-01-01 16:52:27 +01:00
Ludovic Courtès bc5bf85fa2 utils: Restore the mtime/atime of patched files.
* guix/build/utils.scm (set-file-time): New procedure.
  (patch-shebang): New `keep-mtime?' parameter; call `set-file-time'
  when it's true.
  (patch-makefile-SHELL): Likewise.
2012-12-31 01:17:43 +01:00
Ludovic Courtès c089511288 build-system/gnu: Patch shebangs in all the source; patch SHELL in makefiles.
* guix/build/utils.scm (call-with-ascii-input-file): New procedure.
  (patch-shebang): Use it.
  (patch-makefile-SHELL): New procedure.
* guix/build/gnu-build-system.scm (patch-source-shebangs): Patch all the
  files, not just executables; remove `po/Makefile.in.in' patching.
  (patch-generated-files): Rename to...
  (patch-generated-file-shebangs): ... this.  Patch executables and
  makefiles.
  (%standard-phases): Adjust accordingly.

* distro/packages/autotools.scm (libtool): Remove call to `patch-shebang'.
* distro/packages/base.scm (gcc-4.7): Likewise.
  (guile-final): Remove hack to skip `test-command-line-encoding2'.
* distro/packages/bash.scm (bash): Remove `pre-configure-phase'.
* distro/packages/readline.scm (readline): Likewise.
* distro/packages/ncurses.scm (ncurses): Remove `pre-install-phase'.
2012-12-21 22:31:25 +01:00
Ludovic Courtès eca63d3df8 build-system/gnu: Patch shebangs after `configure'.
* guix/build/gnu-build-system.scm (patch-generated-files): New
  procedure.
  (%standard-phases): Add it after `configure'.
2012-12-20 23:06:34 +01:00