Fixes a bug whereby changes to user home directories in the OS config
would never be effective.
Reported by Pierre Neidhardt <ambrevar@gmail.com>.
* gnu/build/activation.scm (modify-user): Pass '-d HOME'.
Reported by Alex Griffin <a@ajgrf.com>.
Fixes <http://bugs.gnu.org/27135>.
* gnu/build/activation.scm (add-user): When UID is zero, add 'chmod'
call.
* gnu/tests/base.scm (run-basic-test)["permissions on /root"]: New test.
Fixes a bug whereby GuixSD would create the /nonexistent directory, from
user 'nobody', even though it has 'create-home-directory?' set to #f.
* gnu/build/activation.scm (activate-users+groups): Add comment for
\#:create-home?.
(activate-user-home)[ensure-user-home]: Skip when CREATE-HOME? is #f or
SYSTEM? is #t.
* gnu/tests/base.scm (run-basic-test)["no extra home directories"]: New
tests.
This fixes a regression introduced in
ae763b5b0b whereby home directories and
skeletons would be root-owned.
* gnu/build/activation.scm (copy-account-skeletons): Make 'directory' a
keyword parameter. Add #:uid and #:gid and honor them.
[set-owner]: New procedure.
(activate-user-home): Add call to 'getpw' and 'chown'. Pass UID and GID
to 'copy-account-skeletons'.
* gnu/tests/base.scm (run-basic-test)["skeletons in home directories"]:
Test file ownership under HOME.
Fixes <http://bugs.gnu.org/21108>.
Reported by Andy Patterson <ajpatter@uwaterloo.ca>
and Leo Famulari <leo@famulari.name>.
* gnu/build/activation.scm (activate-users+groups)[activate-user]: Pass
#:create-home? #t iff CREATE-HOME? and SYSTEM?.
(activate-user-home): New procedure.
* gnu/system/shadow.scm (account-shepherd-service): New procedure.
(account-service-type)[extensions]: Add SHEPHERD-ROOT-SERVICE-TYPE
extension.
* gnu/tests/base.scm (run-basic-test)["home"]
["skeletons in home directories"]: New tests.
* gnu/tests/install.scm (%separate-home-os, %separate-home-os-source)
(%test-separate-home-os): New variables.
* gnu/build/activation.scm (make-file-writable): Move this to ...
* guix/build/utils.scm (make-file-writable): ... here. Export it.
* guix/build/gnu-build-system.scm (strip): Use it.
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.
* 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?'.
* 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'.
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.
* 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.
* 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.
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'.