Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/2] Add dependency on bash to gzip for runtime
Date: Sun, 20 Sep 2015 10:22:40 +0200	[thread overview]
Message-ID: <20150920102240.6e8db4f5@free-electrons.com> (raw)
In-Reply-To: <alpine.DEB.2.11.1509192310350.1987@tanhuma.tkos.co.il>

Jonathan,

On Sat, 19 Sep 2015 23:36:47 +0300 (IDT), Jonathan Ben Avraham wrote:

> > I believe there is no proper way with the current gzip build system to
> > fix the problem. It is inherently wrong to assume that the $(SHELL)
> > used on the host will be available on the target. The only sane option
> > I believe is to have a --with-shell=<foo> option, which if not given
> > defaults to $(SHELL) to retain the existing behavior.
> 
> If I understand correctly you mean that the correct fix would require 
> submitting a patch to the gzip maintainer to add the --with-shell 
> configure option.

Correct.

> This would not obviate the post-install hook you suggest 
> below because we would need a heuristic to use with gzip --with-shell 
> option.

I'm not sure to follow you. We would just have to do:

GZIP_CONF_ENV += --with-shell=/the/right/value

> In order to do this post-install hook we would need to know the shells 
> that the user selected and choose one of them using some heuristic rule 
> such as:
> 
> 1. If the user chose the bash package, then use /bin/bash
> 2. If the user chose Busybox and not bash then use /bin/ash
> 3. If the user chose neither Busybox nor bash then use /bin/sh and 
> hope for the best
> 
> If the user then changes the configuration and un-selects bash we would 
> need to cause the gzip package to be re-built.

No: we don't handle such automatic rebuilds after configuration
changes. See
http://buildroot.org/downloads/manual/manual.html#full-rebuild.

> 
> I wonder if all of this is worth it. IMHO it would be enough to note in 
> the gzip package help text that the user might need to adjust the 
> hashbangs of the scripts in some post-build script.

There's some logic in the skeleton package that guarantees that /bin/sh
points to the system shell selected by the user in his configuration.
So forcing /bin/sh as the shebang should be fine.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2015-09-20  8:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-17 14:46 [Buildroot] [PATCH 1/2] Add dependency on bash to gzip for runtime Jonathan Ben-Avraham
2015-09-17 14:46 ` [Buildroot] [PATCH 2/2] Add dependency on gzip to lxc " Jonathan Ben-Avraham
2015-09-17 15:03   ` Baruch Siach
2015-09-17 15:20     ` Jonathan Ben Avraham
2015-09-17 17:16       ` Thomas Petazzoni
2015-09-17 15:01 ` [Buildroot] [PATCH 1/2] Add dependency on bash to gzip " Baruch Siach
2015-09-17 15:16   ` Jonathan Ben Avraham
2015-09-17 16:20     ` Baruch Siach
2015-09-17 16:33       ` Jonathan Ben Avraham
2015-09-17 17:23         ` Thomas Petazzoni
2015-09-17 19:04           ` Baruch Siach
2015-09-17 20:15             ` Thomas Petazzoni
2015-09-19 20:36               ` Jonathan Ben Avraham
2015-09-20  8:22                 ` Thomas Petazzoni [this message]
2015-09-20 10:39                   ` Arnout Vandecappelle
2015-09-20 11:16                     ` Thomas Petazzoni
2015-09-20 11:35                       ` Baruch Siach

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=20150920102240.6e8db4f5@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox