guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: install: Omit /, /root, and /var from binary tarball.


From: Mark H. Weaver
Subject: 01/02: install: Omit /, /root, and /var from binary tarball.
Date: Wed, 20 May 2015 17:06:55 +0000

mhw pushed a commit to branch master
in repository guix.

commit b2a5fa594e66b9d929df11fc7a38e4b367a00a5e
Author: Mark H Weaver <address@hidden>
Date:   Wed May 20 12:57:50 2015 -0400

    install: Omit /, /root, and /var from binary tarball.
    
    * gnu/system/install.scm (self-contained-tarball): Pass
      "./root/.guix-profile", "./var/guix", and "./gnu" to 'tar' command instead
      of ".".
---
 gnu/system/install.scm |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index 799851c..007bd25 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014, 2015 Ludovic Courtès <address@hidden>
+;;; Copyright © 2015 Mark H Weaver <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -71,7 +72,14 @@ under /root/.guix-profile where GUIX is installed."
           (with-directory-excursion %root
             (zero? (system* "tar" "--xz" "--format=gnu"
                             "--owner=root:0" "--group=root:0"
-                            "-cvf" #$output ".")))))
+                            "-cvf" #$output
+                            ;; Avoid adding /, /var, or /root to the tarball,
+                            ;; so that the ownership and permissions of those
+                            ;; directories will not be overwritten when
+                            ;; extracting the archive.
+                            "./root/.guix-profile"
+                            "./var/guix"
+                            "./gnu")))))
 
     (gexp->derivation "guix-tarball.tar.xz" build
                       #:references-graphs `(("profile" ,profile))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]