guix-devel
[Top][All Lists]
Advanced

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

Re: Boostrap tar cannot exec /bin/sh


From: Carlos Sánchez de La Lama
Subject: Re: Boostrap tar cannot exec /bin/sh
Date: Mon, 03 Oct 2016 11:19:01 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Hi Danny,

> sorry to butt in but why in the world does tar require a shell?

Agreed, but that's something that should be fixed upstream in tar.

> A simple (and ugly) workaround for you would be:
>
> static _Noreturn void
> xexec (const char *cmd)
> {
>   char *argv[4];
>
>   if (strchr(cmd, ' ') == NULL) {
>     argv[0] = cmd;
>     argv[1] = NULL;
>   } else {
>     argv[0] = (char *) "/bin/sh";
>     argv[1] = (char *) "-c";
>     argv[2] = (char *) cmd;
>     argv[3] = NULL;
>   }
>
>   execvp (argv[0], argv);
>   exec_fatal (cmd);
> }

Looks like that will fix it, true, thougth it might be a little bit too
agressive patching on guix side. I would be more confortable finding a
way to use current tar (until, hopefully, this gets solved upstream).

> Even better would be to use tar for creating archives and xz for
> compression (in your case, in "make").

Yup, if "de-nuking" the references is not a possibility (I am still
considering it), then I wil try changing the build system so instead of
"tar cvfa file.xz", "tar cv | xz" is used.

Thanks!

Carlos



reply via email to

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