From: ludo@gnu.org (Ludovic Courtès)
To: Mark H Weaver <mhw@netris.org>
Cc: guix-devel@gnu.org
Subject: Re: Guix binary tarball
Date: Wed, 20 May 2015 12:19:47 +0200 [thread overview]
Message-ID: <87y4kjczzw.fsf@gnu.org> (raw)
In-Reply-To: <87382smaoy.fsf@netris.org> (Mark H. Weaver's message of "Tue, 19 May 2015 19:03:57 -0400")
Mark H Weaver <mhw@netris.org> skribis:
> Andreas Enge <andreas@enge.fr> writes:
>
>> - The tarball also contains /, /root and /var. When unpacking it, the owner
>> and permissions are changed on the system. As a consequence, we could not
>> ssh into the machine any more (!). Could these directories be left out of
>> the tarball and only their contents be kept in?
>
> The directories could indeed be left out.
Oh you mean the *parent* directories, right? Sorry I hadn’t understood
that.
> I experimentally verified that GNU tar will still create those
> directories if they don't already exist, but will leave their
> ownership and permissions unmodified if they do exist.
>
> Here's a suggested patch:
>
> diff --git a/gnu/system/install.scm b/gnu/system/install.scm
> index 799851c..10fbfdd 100644
> --- a/gnu/system/install.scm
> +++ b/gnu/system/install.scm
> @@ -71,7 +71,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))
>
> If we did this, then we could revert 8c3a5d7059 and avoid any use of
> --skip-old-files. I would be in favor of this.
>
> What do you think?
Yes, that’s even better, please commit and revert 8c3a5d7059.
Thanks!
Ludo’.
next prev parent reply other threads:[~2015-05-20 10:34 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-15 16:46 Guix binary tarball Andreas Enge
2015-05-15 17:14 ` Ludovic Courtès
2015-05-15 17:37 ` Andreas Enge
2015-05-15 19:45 ` Taylan Ulrich Bayırlı/Kammer
2015-05-16 18:55 ` Ludovic Courtès
2015-05-16 2:53 ` Mark H Weaver
2015-05-17 21:34 ` Ludovic Courtès
2015-05-16 6:47 ` Andreas Enge
2015-05-16 18:57 ` Ludovic Courtès
2015-05-17 22:15 ` Ludovic Courtès
2015-05-17 22:45 ` Ludovic Courtès
2015-05-18 11:34 ` Andreas Enge
2015-05-18 19:38 ` Ludovic Courtès
2015-05-19 23:03 ` Mark H Weaver
2015-05-20 8:10 ` Andreas Enge
2015-05-20 10:19 ` Ludovic Courtès [this message]
2015-05-20 19:12 ` Mark H Weaver
2015-05-21 8:16 ` Ludovic Courtès
2015-06-07 12:39 ` Thomas Schwinge
2015-06-07 13:16 ` /run/current-system (was: Guix binary tarball) Thomas Schwinge
2015-06-07 16:19 ` /run/current-system Ludovic Courtès
2015-06-07 16:14 ` Guix binary tarball Ludovic Courtès
2015-06-08 9:34 ` Alex Kost
2015-06-08 21:33 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y4kjczzw.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=mhw@netris.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).