aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-06-08 23:25:51 +0200
committerLudovic Courtès <ludo@gnu.org>2015-06-08 23:25:51 +0200
commit7acd3439eab716882835228be16346c5d3b4df21 (patch)
tree563a8baa04c64a698ec8b7320a5d6cc0978bb075
parent751630c9c3f7f3e87dfccc5f5ba8cf61cdd6f8fd (diff)
downloadguix-7acd3439eab716882835228be16346c5d3b4df21.tar
guix-7acd3439eab716882835228be16346c5d3b4df21.tar.gz
install: Omit /root from the binary tarball.
Suggested by Thomas Schwinge <thomas@codesourcery.com>. * gnu/system/install.scm (self-contained-tarball): Remove "/root/.guix-profile" from the 'tar' arguments. * doc/guix.texi (Binary Installation): Add a step to create ~root/.guix-profile.
-rw-r--r--doc/guix.texi18
-rw-r--r--gnu/system/install.scm7
2 files changed, 17 insertions, 8 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 85ccd4057e..a0f3443d9e 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -284,18 +284,26 @@ As @code{root}, run:
# tar xf guix-binary-@value{VERSION}.@var{system}.tar.xz
@end example
-This creates @file{/gnu/store} (@pxref{The Store}), @file{/var/guix},
-and @file{/root/.guix-profile}. @file{/root/.guix-profile} is a
-ready-to-use profile for @code{root} where Guix is installed.
+This creates @file{/gnu/store} (@pxref{The Store}) and @file{/var/guix}.
+The latter contains a ready-to-use profile for @code{root} (see next
+step.)
Do @emph{not} unpack the tarball on a working Guix system since that
would overwrite its own essential files.
@item
+Make @code{root}'s profile available under @file{~/.guix-profile}:
+
+@example
+# ln -sf /var/guix/profiles/per-user/root/guix-profile \
+ ~root/.guix-profile
+@end example
+
+@item
Run the daemon:
@example
-# /root/.guix-profile/bin/guix-daemon --build-users-group=guixbuild
+# ~root/.guix-profile/bin/guix-daemon --build-users-group=guixbuild
@end example
@item
@@ -313,7 +321,7 @@ To use substitutes from @code{hydra.gnu.org} (@pxref{Substitutes}),
authorize them:
@example
-# guix archive --authorize < /root/.guix-profile/share/guix/hydra.gnu.org.pub
+# guix archive --authorize < ~root/.guix-profile/share/guix/hydra.gnu.org.pub
@end example
@end enumerate
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index cacd089d6b..27d8ecdefc 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -73,11 +73,12 @@ under /root/.guix-profile where GUIX is installed."
(zero? (system* "tar" "--xz" "--format=gnu"
"--owner=root:0" "--group=root:0"
"-cvf" #$output
- ;; Avoid adding /, /var, or /root to the tarball,
+ ;; Avoid adding / and /var to the tarball,
;; so that the ownership and permissions of those
;; directories will not be overwritten when
- ;; extracting the archive.
- "./root/.guix-profile"
+ ;; extracting the archive. Do not include /root
+ ;; because the root account might have a different
+ ;; home directory.
"./var/guix"
(string-append "." (%store-directory)))))))