all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: "Carlos Sánchez de La Lama" <csanchezdll@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: Boostrap tar cannot exec xz
Date: Sat, 01 Oct 2016 14:11:31 +0200	[thread overview]
Message-ID: <87k2dsi80c.fsf@gnu.org> (raw)
In-Reply-To: <7th98xnjq0.fsf@gmail.com> ("Carlos Sánchez de La Lama"'s message of "Fri, 30 Sep 2016 23:47:19 +0200")

Hi!

csanchezdll@gmail.com (Carlos Sánchez de La Lama) skribis:

>> In ‘raw-build’ in bootstrap.scm, we run:
>>
>>   xz -dc thing.tar.xz | tar xv
>
> If I have understood correctly the code, raw-build is only used for
> %bootstrap-guile. However, the problem arises when building make (I do
> not have access to that machine righg now, so I am unsure of the exact
> package). i guess one option would be to create bootstrap versions of
> all packages on which tar depends (most probably already exist) and use
> xz | tar on them, until the requirements for a new non-bootstrap tar
> build can be met.

The question is how ‘tar’ in the ‘bootstrap-binaries’ we use on other
arches differs from the one you just built.

--8<---------------cut here---------------start------------->8---
$ guix build bootstrap-binaries --fallback
/gnu/store/zh914iy23h97fwskh12vl3py1frkhrqn-bootstrap-binaries-0
ludo@pluto ~/src/guix$ /gnu/store/zh914iy23h97fwskh12vl3py1frkhrqn-bootstrap-binaries-0/bin/tar --version
tar (GNU tar) 1.27
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
$ strings /gnu/store/zh914iy23h97fwskh12vl3py1frkhrqn-bootstrap-binaries-0/bin/tar |grep bin/sh
/bin/sh
$ touch foo.tar.xz
$ strace -e execve -f /gnu/store/zh914iy23h97fwskh12vl3py1frkhrqn-bootstrap-binaries-0/bin/tar xf foo.tar.xz
execve("/gnu/store/zh914iy23h97fwskh12vl3py1frkhrqn-bootstrap-binaries-0/bin/tar", ["/gnu/store/zh914iy23h97fwskh12vl"..., "xf", "foo.tar.xz"], [/* 63 vars */]) = 0
/gnu/store/zh914iy23h97fwskh12vl3py1frkhrqn-bootstrap-binaries-0/bin/tar: This does not look like a tar archive
Process 28766 attached
[pid 28766] execve("/home/ludo/.guix-profile/bin/xz", ["xz", "-d"], [/* 63 vars */]) = 0
xz: (stdin): File format not recognized
[pid 28766] +++ exited with 1 +++
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=28766, si_status=1, si_utime=0, si_stime=0} ---
/gnu/store/zh914iy23h97fwskh12vl3py1frkhrqn-bootstrap-binaries-0/bin/tar: Child returned status 1
/gnu/store/zh914iy23h97fwskh12vl3py1frkhrqn-bootstrap-binaries-0/bin/tar: Error is not recoverable: exiting now
+++ exited with 2 +++
--8<---------------cut here---------------end--------------->8---

So apparently, tar 1.27 did not execute xz via /bin/sh, but current tar
does not either:

--8<---------------cut here---------------start------------->8---
$ strace -e execve -f tar xf ~/src/guix/foo.tar.gz 
execve("/run/current-system/profile/bin/tar", ["tar", "xf", "/home/ludo/src/guix/foo.tar.gz"], [/* 63 vars */]) = 0
Process 29347 attached
[pid 29347] execve("/home/ludo/soft/bin/gzip", ["gzip", "-d"], [/* 63 vars */]) = -1 ENOENT (No such file or directory)
[pid 29347] execve("/home/ludo/.opam/system/bin/gzip", ["gzip", "-d"], [/* 63 vars */]) = -1 ENOENT (No such file or directory)
[pid 29347] execve("/home/ludo/.guix-profile/bin/gzip", ["gzip", "-d"], [/* 63 vars */]) = -1 ENOENT (No such file or directory)
[pid 29347] execve("/home/ludo/.guix-profile/sbin/gzip", ["gzip", "-d"], [/* 63 vars */]) = -1 ENOENT (No such file or directory)
[pid 29347] execve("/run/setuid-programs/gzip", ["gzip", "-d"], [/* 63 vars */]) = -1 ENOENT (No such file or directory)
[pid 29347] execve("/run/current-system/profile/bin/gzip", ["gzip", "-d"], [/* 63 vars */]) = 0
[pid 29347] +++ exited with 0 +++
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=29347, si_status=0, si_utime=0, si_stime=0} ---
+++ exited with 0 +++
$ tar --version
tar (GNU tar) 1.29
Copyright (C) 2015 Free Software Foundation, Inc.
Permeso GPLv3+: GNU GPL versio 3 aŭ posta <http://gnu.org/licenses/gpl.html>.
Tio ĉi estas libera programaro: vi estas libera por ŝanĝi kaj redisdoni ĝin.
Ekzistas NENIU GARANTIO, laŭ plej amplekse permesate de la leĝoj.

Verkita de John Gilmore kaj Jay Fenlason.
--8<---------------cut here---------------end--------------->8---

Could you check exactly what’s going on and send more details?

> Another option that just csme to my mind is replacing all the nuked
> store referenced in the static binaries with references to the unpacked
> store path after extraction. As the nuked references can be easily
> identified by the "eeeeee..." fake path, this should be doable.

That’s not doable because we don’t know the hash in advance.

Thanks,
Ludo’.

  reply	other threads:[~2016-10-01 12:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-30 11:06 Boostrap tar cannot exec xz Carlos Sánchez de La Lama
2016-09-30 20:08 ` Ludovic Courtès
2016-09-30 21:47   ` Carlos Sánchez de La Lama
2016-10-01 12:11     ` Ludovic Courtès [this message]
2016-10-03  7:22       ` Carlos Sánchez de La Lama
2016-10-03  9:07         ` Boostrap tar cannot exec /bin/sh Danny Milosavljevic
2016-10-03  9:19           ` Carlos Sánchez de La Lama
2016-10-03 16:06         ` Boostrap tar cannot exec xz 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k2dsi80c.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=csanchezdll@gmail.com \
    --cc=guix-devel@gnu.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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.