Commit graph

17 commits

Author SHA1 Message Date
Ludovic Courtès
356a62b8e6 activation: Make user copies of the skeletons writable.
* gnu/build/activation.scm (make-file-writable,
  make-skeletons-writable): New procedures.
  (copy-account-skeletons): Call 'make-file-writable' after 'copy-file'.
  (add-user): Add call to 'make-skeletons-writable'.
2015-05-05 23:46:54 +02:00
Ludovic Courtès
b158f1d751 system: Allow users to PTRACE_ATTACH to their own processes.
* gnu/build/activation.scm (activate-ptrace-attach): New procedure.
* gnu/system.scm (operating-system-activation-script): Use it.
2015-04-12 15:33:42 +02:00
Ludovic Courtès
9bea87a542 activation: Remove undeclared user accounts and groups.
Fixes <http://bugs.gnu.org/19795>.
Reported by David Thompson <dthompson2@worcester.edu>.

* gnu/build/activation.scm (enumerate, current-users, current-groups,
  delete-user, delete-group): New procedures.
  (activate-users+groups): Add calls to 'delete-user' and
  'delete-group'.
* doc/guix.texi (User Accounts): Add a paragraph about statelessness.
  Explain that passwords are preserved.
2015-04-08 21:41:04 +02:00
Mark H Weaver
78ab0746a5 system: Add /etc/ssl symlink; set needed variables in /etc/profile.
* gnu/build/activation.scm (activate-etc): Create /etc/ssl symlink.
* gnu/system.scm (etc-directory): Set SSL_CERT_DIR, SSL_CERT_FILE,
  and GIT_SSL_CAINFO in /etc/profile.

Co-Authored-By: Ludovic Courtès <ludo@gnu.org>
2015-03-03 13:49:12 -05:00
Ludovic Courtès
45c5b47b96 activation: Copy the account skeletons when creating the 'root' account.
* gnu/build/activation.scm (%skeleton-directory): New variable.
  (dot-or-dot-dot?, copy-account-skeletons): New procedure.
  (add-user): Use 'copy-account-skeletons'.
  (activate-etc): Use 'dot-or-dot-dot?'.
2014-12-13 22:31:08 +01:00
Ludovic Courtès
6496de9bc2 activation: Don't create unneeded "/var/guix/gcroots/etc-directory".
* gnu/build/activation.scm (activate-etc): Don't create
  "/var/guix/gcroots/etc-directory".
2014-12-06 16:03:49 +01:00
Ludovic Courtès
f34c56be3a activation: Set the firmware search path.
* gnu/build/activation.scm (activate-firmware): New procedure.
* gnu/system.scm (<operating-system>)[firmware]: New field.
  (directory-union): New procedure.
  (%base-firmware): New variable.
  (operating-system-activation-script): Use 'directory-union', and call
  'activate-firmware'.
* doc/guix.texi (operating-system Reference): Document 'firmware'.
2014-11-11 22:42:39 +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
e2b464b7f4 activation: Ensure existing user accounts have the right settings.
* gnu/build/activation.scm (modify-user, ensure-user): New procedures.
  (activate-users+groups): Systematically call 'ensure-user'.
2014-09-22 10:10:08 +02:00
Ludovic Courtès
6d49355d8b activation: Honor $GUIX_NEW_SYSTEM for use by 'guix system reconfigure'.
* gnu/build/activation.scm (activate-current-system): Honor
  $GUIX_NEW_SYSTEM by default.
* guix/scripts/system.scm (switch-to-system): Set $GUIX_NEW_SYSTEM
  before loading SCRIPT.
2014-09-12 22:13:52 +02:00
Ludovic Courtès
ee7bae3bbd activation: Set the permissions of /etc/sudoers to 440.
* gnu/build/activation.scm (activate-etc): Move 'rm-f' to a local
  'define'.  When TARGET is "sudoers", make it 440.
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
c6a0536d08 activation: Make sure /etc/sudoers & co. are regular files.
Before that, 'sudo' would exit with:

  sudo: /etc/sudoers is not a regular file
  sudo: no valid sudoers sources found, quitting

* gnu/build/activation.scm (activate-etc): Check if SOURCE matches
  'file-is-directory?'.  If not, use 'copy-file' instead of 'symlink'.
2014-09-12 00:14:52 +02:00
Ludovic Courtès
286cacaded activation: Remove outdated comment.
* gnu/build/activation.scm (activate-etc): Remove outdated comment.
2014-09-12 00:14:52 +02:00
Ludovic Courtès
095f4deb4b activation: Factorize the link-or-copy trick.
* gnu/build/activation.scm (link-or-copy): New procedure.
  (activate-setuid-programs): Use it.
2014-09-12 00:14:52 +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
Renamed from guix/build/activation.scm (Browse further)