Commit graph

91 commits

Author SHA1 Message Date
Ludovic Courtès
95f92d4e2c system: Define 'INFOPATH' in /etc/profile.
* gnu/system.scm (etc-directory)[bashrc]: Set 'INFOPATH'.
2014-11-05 22:59:50 +01:00
Ludovic Courtès
d460204f2e system: Allow Linux-libre to find our 'modprobe' command.
Fixes <http://bugs.gnu.org/18525>.
Reported by Mark H Weaver <mhw@netris.org>.

* gnu/build/activation.scm (activate-modprobe): New procedure.
* gnu/system.scm (modprobe-wrapper): New procedure.
  (operating-system-activation-script): Use both.
2014-11-02 23:06:17 +01:00
Ludovic Courtès
a96a82d79e system: Add pciutils and pciutils to '%base-packages'.
* gnu/system.scm (%base-packages): Add PCIUTILS and USBUTILS.
2014-10-29 00:31:23 +01:00
Ludovic Courtès
568841d491 system: Export 'local-host-aliases'.
* gnu/system.scm (local-host-aliases): New procedure.
  (default-/etc/hosts): Use it.
2014-10-07 23:18:41 +02:00
Ludovic Courtès
4b164c4532 system: Add Patch to '%base-packages'.
* gnu/system.scm (%base-packages): Add PATCH.
2014-09-22 23:11:33 +02:00
Ludovic Courtès
de1c158f32 system: Add support for boot-time mapped devices.
* gnu/build/linux-boot.scm (boot-system): Add #:pre-mount parameter and
  honor it.
* gnu/system/linux-initrd.scm (base-initrd): Add #:mapped-devices
  parameter.  Add 'device-mapping-commands' variable, and use it to
  build the #:pre-mount argument of 'boot-system'.
* gnu/system.scm (mapped-device-user,
  operating-system-user-mapped-devices,
  operating-system-boot-mapped-devices): New procedures.
  (device-mapping-services): Use 'operating-system-user-mapped-devices'
  instead of 'operating-system-mapped-devices'.
  (operating-system-initrd-file): Call the initrd with #:mapped-devices.
2014-09-22 11:20:41 +02:00
Ludovic Courtès
2a13d05e45 system: Add support for swap devices.
* gnu/services/base.scm (swap-service): New procedure.
* gnu/system.scm (<operating-system>)[swap-devices]: New field.
  (swap-services): New procedure.
  (essential-services): Use it.
2014-09-18 22:52:01 +02:00
Ludovic Courtès
722554a306 system: Define 'device-mapping-kind', and add a 'close' procedure.
* gnu/system/file-systems.scm (<mapped-device-type>): New record type.
  (<mapped-device>)[command]: Remove field.
  [type]: New field.
* gnu/services/base.scm (device-mapping-service): Rename 'command'
  parameter to 'open'.  Add 'close' parameter and honor it.
* gnu/system.scm (luks-device-mapping): Rename to...
  (open-luks-device): ... this.
  (close-luks-device): New procedure.
  (luks-device-mapping): New variable.
  (device-mapping-services): Get the type of MD, and pass its 'open' and
  'close' fields to 'device-mapping-service'.
2014-09-18 19:18:39 +02:00
Ludovic Courtès
8a7330fd76 system: Use eudev instead of udev by default.
* gnu/system.scm (%base-packages): Change 'udev' to 'eudev'.
* gnu/services/base.scm (udev-service): Change #:udev to default to
  'eudev'.
2014-09-13 10:54:47 +02:00
Ludovic Courtès
ba544e78dc system: Add Diffutils to '%base-packages'.
* gnu/system.scm (%base-packages): Add DIFFUTILS.
2014-09-13 10:52:21 +02:00
Ludovic Courtès
a68c69675f system: Add more common tools to '%base-packages'.
* gnu/system.scm (%base-packages): Add gawk, tar, gzip, bzip2, xz, lzip,
  and wireless-tools.
2014-09-12 22:13:49 +02:00
Ludovic Courtès
07b08343d7 system: Produce a basic /etc/nsswitch.conf to honor /etc/hosts.
* gnu/system.scm (etc-directory): Produce nsswitch.conf.
2014-09-12 09:55:25 +02:00
Ludovic Courtès
7d6a52c0dc system: Fix the default /etc/hosts.
* gnu/system.scm (default-/etc/hosts): Fix the alias/address order.
  Add ::1.
2014-09-12 09:52:05 +02:00
Ludovic Courtès
5dae0186de system: Add support for Linux-style mapped devices.
* gnu/system/file-systems.scm (<mapped-device>): New record type.
* gnu/system.scm (<operating-system>)[mapped-devices]: New field.
  (luks-device-mapping): New procedure.
  (other-file-system-services)[device-mappings, requirements]: New
  procedures.  Pass #:requirements to 'file-system-service'.
  (device-mapping-services): New procedure.
  (essential-services): Use it.  Append its result to the return value.
  (operating-system-initrd-file): Add comment.
* gnu/services/base.scm (file-system-service): Add #:requirements
  parameter and honor it.
  (device-mapping-service): New procedure.
* gnu/system/linux-initrd.scm (base-initrd): Add comment.
2014-09-12 00:14:52 +02:00
Ludovic Courtès
c851400bee system: Add '\w' to the default PS1.
* gnu/system.scm (etc-directory)[bashrc]: Add '\w' to PS1.
2014-09-12 00:14:52 +02:00
Ludovic Courtès
ee248b6a70 activation: Make the /bin/sh symlink at activation time.
* gnu/build/install.scm (directives): Remove "/bin/sh".
* gnu/build/activation.scm (activate-/bin/sh): New procedure.
* gnu/system.scm (operating-system-activation-script): Use it.
2014-09-12 00:14:52 +02:00
Ludovic Courtès
c65e183403 system: Add 'hosts-file' field.
* gnu/system.scm (<operating-system>)[hosts-file]: New field.
  (default-/etc/hosts): New procedure.
  (etc-directory): Add #:hosts-file parameter and honor it.
  (operating-system-etc-directory): Build /etc/hosts, and pass
  it as #:hosts-file to 'etc-directory'.
2014-09-12 00:14:52 +02:00
Ludovic Courtès
df5ce088f2 system: Export '%setuid-programs'.
* gnu/system.scm: Export '%setuid-programs', as documented in the
  manual.
2014-09-09 17:12:33 +02:00
Ludovic Courtès
e2f4b305d0 Move part of (gnu build linux-boot) to (gnu build file-systems).
* gnu/build/linux-boot.scm (%ext2-endianness, %ext2-sblock-magic,
  %ext2-sblock-creator-os, %ext2-sblock-uuid, %ext2-sblock-volume-name,
  read-ext2-superblock, ext2-superblock-uuid,
  ext2-superblock-volume-name, disk-partitions,
  partition-label-predicate, find-partition-by-label,
  canonicalize-device-spec, MS_RDONLY, MS_NOSUID, MS_NODEV, MS_NOEXEC,
  MS_BIND, MS_MOVE, bind-mount, check-file-system,
  mount-flags->bit-mask, mount-file-system): Move to...
* gnu/build/file-systems.scm: ... here.  New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
* gnu/services/base.scm: Use (gnu build file-systems).
* gnu/services/dmd.scm (dmd-configuration-file): Likewise.
* gnu/system.scm (operating-system-activation-script): Likewise.
* gnu/system/linux-initrd.scm (base-initrd): Likewise.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Likewise.
2014-09-03 15:43:07 +02:00
Ludovic Courtès
8a9e21d1f7 Rename (gnu build linux-initrd) to (gnu build linux-boot).
* gnu/build/linux-initrd.scm: Rename to...
* gnu/build/linux-boot.scm: ... this.
* gnu-system.am (GNU_SYSTEM_MODULES): Adjust accordingly.
* gnu/build/activation.scm, gnu/build/vm.scm, gnu/services/base.scm,
  gnu/services/dmd.scm, gnu/system.scm, gnu/system/linux-initrd.scm,
  gnu/system/vm.scm: Adjust accordingly.
2014-09-03 15:43:07 +02:00
Ludovic Courtès
548f7a8fa2 Move operating system helpers from (guix build …) to (gnu build …).
* guix/build/activation.scm, guix/build/install.scm,
  guix/build/linux-initrd.scm, guix/build/vm.scm: Move to...
* gnu/build: ... here.
* Makefile.am (MODULES): Remove the above guix/build/ files.
* gnu-system.am (GNU_SYSTEM_MODULES): Add the above gnu/build/ files
  here.
* gnu/services/base.scm, gnu/services/dmd.scm, gnu/system.scm,
  gnu/system/linux-initrd.scm, gnu/system/vm.scm,
  guix/scripts/system.scm: Adjust to the new module names.
2014-09-03 15:43:07 +02:00
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
29fce8b6eb system: Use (guix profiles) to build the system profile.
* gnu/system.scm (union): Remove.
  (operating-system-profile): Use 'profile-derivation' and related
  procedures instead of 'union'.
2014-08-11 23:01:46 +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
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
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
b63dbd44f0 system: Add e2fsprogs to the base packages.
* gnu/system.scm (%base-packages): Add E2FSPROGS.
2014-07-16 15:54:47 +02:00
Ludovic Courtès
03e9998f41 system: Use kmod instead of module-init-tools.
* gnu/system.scm (%base-packages): Use kmod instead of
  module-init-tools.
2014-07-16 15:54:47 +02:00
Ludovic Courtès
55e70e655d system: Add 'nano' and 'lsof' to the base packages.
* gnu/system.scm (%base-packages): Add NANO and LSOF.
2014-07-14 15:35:57 +02:00
Ludovic Courtès
89a0d00a38 system: Add 'which' to the base packages.
* gnu/system.scm (%base-packages): Add WHICH.
2014-07-12 23:17:54 +02:00
Ludovic Courtès
f111b327a9 system: Remove erroneous system binding in profile maker.
Partly fixes <http://bugs.gnu.org/18002>.
Reported by David Thompson <dthompson2@worcester.edu>.

* gnu/system.scm (union): Remove #:system parameter, which was unused.
2014-07-12 23:17:53 +02:00
Ludovic Courtès
060238ae64 linux-initrd: Rename 'qemu-initrd' to 'base-initrd'.
* gnu/system/linux-initrd.scm (qemu-initrd): Rename to...
  (base-initrd): ... this.
* gnu/system.scm (<operating-system>)[initrd]: Update accordingly.
* gnu/system/vm.scm (expression->derivation-in-linux-vm,
  system-disk-image, virtualized-operating-system): Likewise.
2014-07-01 09:23:32 +02:00
Ludovic Courtès
62f0a4792b system: Set $LINUX_MODULE_DIRECTORY as a function or /run/booted-system.
* gnu/system.scm (etc-directory): Remove #:kernel parameter.  Set
  LINUX_MODULE_DIRECTORY as a function or /run/booted-system.
  (operating-system-etc-directory): Update accordingly.
2014-06-29 22:02:42 +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
8a6d273137 system: Adjust the set of fields with default values.
* gnu/system.scm (<operating-system>)[file-systems]: Remove default.
  [locale]: Add default value.
2014-06-27 00:12:40 +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
fe6e3fe2a5 system: Support the addition of old entries in the GRUB menu.
* gnu/system.scm (operating-system-grub.cfg): Add 'old-entries'
  parameter.  Pass it to 'grub-configuration-file'.
* gnu/system/grub.scm (grub-configuration-file): Add #:old-entries
  parameter.  Honor it.
2014-06-25 23:53:27 +02:00
Ludovic Courtès
64e40dbb69 system: Store boot parameters in the system derivation.
* gnu/system.scm (operating-system-parameters-file): New procedure.
  (operating-system-derivation): Use it to produce a 'parameters' files.
2014-06-25 23:53:27 +02:00
Ludovic Courtès
2d23e6f051 system: Factorize GRUB menu entry label.
* gnu/system.scm (kernel->grub-label): New procedure.
  (operating-system-grub.cfg): Use it.
2014-06-25 23:53:27 +02:00
Ludovic Courtès
151a2c07aa services: Add udev service, and add it to '%base-services'.
* gnu/services/base.scm (udev-service): New procedure.
  (%base-services): Use it.
* gnu/system.scm (%base-packages): Add UDEV.
2014-06-24 00:20:01 +02:00
Ludovic Courtès
773e956d5d system: Augment the default set of groups.
* gnu/system/shadow.scm (%base-groups): New variable.
* gnu/system.scm (<operating-system>)[groups]: Use it as the default.
2014-06-22 22:16:14 +02:00
Ludovic Courtès
9b762b8d7c system: Prefer packages from %FINAL-INPUTS.
* gnu/packages/base.scm (canonical-package): New procedure.
* gnu/system.scm (%base-packages): Pass BASH, COREUTILS, FINDUTILS,
  GREP, and SED through 'canonical-package'.
2014-06-19 23:35:41 +02:00
Ludovic Courtès
d3bbe992ec system: Tell module-init-tools where to look for modules.
* gnu/packages/linux.scm (module-init-tools)[source](patches): New
  field.
* gnu/packages/patches/module-init-tools-moduledir.patch: New file.
* gnu-system.am (dist_patch_DATA): Add it.
* gnu/system.scm (etc-directory): Add #:kernel parameter.  Set
  'LINUX_MODULE_DIRECTORY' in bashrc.
  (operating-system-etc-directory): Pass #:kernel to 'etc-directory'.
2014-06-04 18:15:50 +02:00
Ludovic Courtès
4654439be7 system: Rename activation script.
* gnu/system.scm (operating-system-activation-script): Change file name
  to "activate".
2014-06-04 18:15:50 +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
585c651951 system: Make sure /run/setuid-programs comes first in $PATH.
* gnu/system.scm (etc-directory) <bashrc>: Move /run/setuid-programs
  first in $PATH.
2014-06-03 11:48:41 +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
548d4c1395 system: Add 'issue' field.
* gnu/system.scm (<operating-system>)[issue]: New field.
  (%default-issue): New variable.
  (etc-directory): Add #:issue parameter and honor it.
  (operating-system-etc-directory): Adjust call accordingly.
* build-aux/hydra/demo-os.scm: Add 'issue' field.
2014-05-31 22:01:05 +02:00
Ludovic Courtès
8a07c28960 system: Add 'fusermount' to the default setuid programs.
* gnu/system.scm (%setuid-programs): Add 'fusermount'.
2014-05-29 23:32:46 +02:00
Ludovic Courtès
55ccc388b7 services: Support per-service activation scripts.
* gnu/services.scm (<service>)[activate]: New field.
* gnu/system.scm (operating-system-activation-script)[service-activations]:
  New procedure.  Use it, and primitive-load each activation.
2014-05-24 18:10:05 +02:00