All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/3] package/bash: use --bindir instead of exec_prefix=
@ 2021-04-23 20:23 Thomas Petazzoni
  2021-04-23 20:23 ` [Buildroot] [PATCH 2/3] package/bash: add option to keep or remove loadable examples Thomas Petazzoni
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Thomas Petazzoni @ 2021-04-23 20:23 UTC (permalink / raw)
  To: buildroot

We want bash to be installed as /bin/bash. For ages, Buildroot has
been doing this by overriding exec_prefix at install time. First of
all, it would be preferred to do this at configure time. But also,
overriding exec_prefix not only changes where "bash" goes, but also
where the pkgconfig file goes. Due to this, bash.pc goes into
/lib/pkgconfig/, and doesn't get removed by target-finalize.

Since all we want is to have 'bash' as /bin/bash, simply pass
--bindir=/bin at configure time. This allows to use the default target
installation logic for autotools-package. We keep a post-install
target hook to remove /bin/bashbug.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
---
 package/bash/bash.mk | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/package/bash/bash.mk b/package/bash/bash.mk
index efe7cbbe59..996c6a6097 100644
--- a/package/bash/bash.mk
+++ b/package/bash/bash.mk
@@ -7,11 +7,16 @@
 BASH_VERSION = 5.1
 BASH_SITE = $(BR2_GNU_MIRROR)/bash
 BASH_DEPENDENCIES = ncurses readline host-bison
-BASH_CONF_OPTS = --with-installed-readline --without-bash-malloc
 BASH_LICENSE = GPL-3.0+
 BASH_LICENSE_FILES = COPYING
 BASH_CPE_ID_VENDOR = gnu
 
+# We want the bash binary in /bin
+BASH_CONF_OPTS = \
+	--bindir=/bin \
+	--with-installed-readline \
+	--without-bash-malloc
+
 BASH_CONF_ENV += \
 	ac_cv_rl_prefix="$(STAGING_DIR)" \
 	ac_cv_rl_version="$(READLINE_VERSION)" \
@@ -38,11 +43,10 @@ BASH_CONF_ENV += bash_cv_getenv_redef=yes
 endif
 endif
 
-define BASH_INSTALL_TARGET_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
-		DESTDIR=$(TARGET_DIR) exec_prefix=/ install
+define BASH_REMOVE_UNUSED_FILES
 	rm -f $(TARGET_DIR)/bin/bashbug
 endef
+BASH_POST_INSTALL_TARGET_HOOKS += BASH_REMOVE_UNUSED_FILES
 
 # Add /bin/bash to /etc/shells otherwise some login tools like dropbear
 # can reject the user connection. See man shells.
-- 
2.30.2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 2/3] package/bash: add option to keep or remove loadable examples
  2021-04-23 20:23 [Buildroot] [PATCH 1/3] package/bash: use --bindir instead of exec_prefix= Thomas Petazzoni
@ 2021-04-23 20:23 ` Thomas Petazzoni
  2021-04-24  7:47   ` Yann E. MORIN
  2021-04-23 20:23 ` [Buildroot] [PATCH 3/3] package/bash: drop SHOBJ_STATUS from BASH_CONF_ENV Thomas Petazzoni
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2021-04-23 20:23 UTC (permalink / raw)
  To: buildroot

bash has a concept of "loadables", which are "plugins" that can be
loaded at runtime by bash to add new builtin. For example:

whoami is /usr/bin/whoami
root
whoami is a shell builtin
root

bash comes with a set of example loadables, installed in
/usr/lib/bash/. They take 312 KB on ARM32, and are by default not
used, and provide builtins that are for the most part already
available as external commands in Busybox/coreutils:

Makefile.inc  finfo         mkfifo        realpath      sync
accept        head          mktemp        rm            tee
basename      id            mypid         rmdir         truefalse
csv           ln            pathchk       seq           tty
cut           loadables.h   print         setpgid       uname
dirname       logname       printenv      sleep         unlink
fdflags       mkdir         push          strftime      whoami

So instead of having them unconditionally installed, add an option to
enable/disable their installation (their build apparently cannot be
disabled via a configure option).

Normally, we try to keep backward compatibility by preserving the
existing behavior. In this case, this would have meant making this
option "default y". But this also breaks our principle of "being
minimal by default", and in this case, it feels preferable to be
"minimal by default" than preserving existing behavior.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
---
 package/bash/Config.in | 14 ++++++++++++++
 package/bash/bash.mk   | 13 +++++++++++++
 2 files changed, 27 insertions(+)

diff --git a/package/bash/Config.in b/package/bash/Config.in
index 5a9ebb8d02..0212df6bfd 100644
--- a/package/bash/Config.in
+++ b/package/bash/Config.in
@@ -9,3 +9,17 @@ config BR2_PACKAGE_BASH
 	  The standard GNU Bourne again shell.
 
 	  http://tiswww.case.edu/php/chet/bash/bashtop.html
+
+if BR2_PACKAGE_BASH
+
+config BR2_PACKAGE_BASH_LOADABLE_EXAMPLES
+	bool "loadable examples"
+	depends on !BR2_STATIC_LIBS
+	help
+	  This option will enable the installation of the "loadable"
+	  examples, which are dynamically loadable extension providing
+	  additional built-ins commands to bash. There are typically
+	  not needed as they are provided as regular, external
+	  commands.
+
+endif
diff --git a/package/bash/bash.mk b/package/bash/bash.mk
index 996c6a6097..6913ccafd8 100644
--- a/package/bash/bash.mk
+++ b/package/bash/bash.mk
@@ -48,6 +48,19 @@ define BASH_REMOVE_UNUSED_FILES
 endef
 BASH_POST_INSTALL_TARGET_HOOKS += BASH_REMOVE_UNUSED_FILES
 
+ifeq ($(BR2_PACKAGE_BASH_LOADABLE_EXAMPLES),y)
+define BASH_REMOVE_LOADABLE_UNUSED_FILES
+	rm -f $(TARGET_DIR)/usr/lib/bash/Makefile.inc
+	rm -f $(TARGET_DIR)/usr/lib/bash/loadables.h
+endef
+BASH_POST_INSTALL_TARGET_HOOKS += BASH_REMOVE_LOADABLE_UNUSED_FILES
+else
+define BASH_REMOVE_LOADABLE_EXAMPLES
+	rm -rf $(TARGET_DIR)/usr/lib/bash
+endef
+BASH_POST_INSTALL_TARGET_HOOKS += BASH_REMOVE_LOADABLE_EXAMPLES
+endif
+
 # Add /bin/bash to /etc/shells otherwise some login tools like dropbear
 # can reject the user connection. See man shells.
 define BASH_ADD_MKSH_TO_SHELLS
-- 
2.30.2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 3/3] package/bash: drop SHOBJ_STATUS from BASH_CONF_ENV
  2021-04-23 20:23 [Buildroot] [PATCH 1/3] package/bash: use --bindir instead of exec_prefix= Thomas Petazzoni
  2021-04-23 20:23 ` [Buildroot] [PATCH 2/3] package/bash: add option to keep or remove loadable examples Thomas Petazzoni
@ 2021-04-23 20:23 ` Thomas Petazzoni
  2021-04-24  7:46   ` Yann E. MORIN
  2021-04-26 19:08   ` Peter Korsgaard
  2021-04-24  7:46 ` [Buildroot] [PATCH 1/3] package/bash: use --bindir instead of exec_prefix= Yann E. MORIN
  2021-04-26 19:02 ` Peter Korsgaard
  3 siblings, 2 replies; 9+ messages in thread
From: Thomas Petazzoni @ 2021-04-23 20:23 UTC (permalink / raw)
  To: buildroot

SHOBJ_STATUS=unsupported was added in commit
4a2af11cba83ef176672609dd7321712fa7f6a28 to work around a limitation
of the configure script that forgot to set this variable in
static-linking configurations.

It turns out that this issue has been fixed upstream as of bash 5.0:

  https://git.savannah.gnu.org/cgit/bash.git/diff/configure.ac?id=d233b485e83c3a784b803fb894280773f16f2deb

  (see hunk @@ -1151,6 +1179,9 @@)

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Baruch Siach <baruch@tkos.co.il>
---
 package/bash/bash.mk | 1 -
 1 file changed, 1 deletion(-)

diff --git a/package/bash/bash.mk b/package/bash/bash.mk
index 6913ccafd8..7b853ece08 100644
--- a/package/bash/bash.mk
+++ b/package/bash/bash.mk
@@ -29,7 +29,6 @@ BASH_CONF_ENV += \
 # The static build needs some trickery
 ifeq ($(BR2_STATIC_LIBS),y)
 BASH_CONF_OPTS += --enable-static-link
-BASH_CONF_ENV += SHOBJ_STATUS=unsupported
 # bash wants to redefine the getenv() function. To check whether this is
 # possible, AC_TRY_RUN is used which is not possible in
 # cross-compilation.
-- 
2.30.2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 1/3] package/bash: use --bindir instead of exec_prefix=
  2021-04-23 20:23 [Buildroot] [PATCH 1/3] package/bash: use --bindir instead of exec_prefix= Thomas Petazzoni
  2021-04-23 20:23 ` [Buildroot] [PATCH 2/3] package/bash: add option to keep or remove loadable examples Thomas Petazzoni
  2021-04-23 20:23 ` [Buildroot] [PATCH 3/3] package/bash: drop SHOBJ_STATUS from BASH_CONF_ENV Thomas Petazzoni
@ 2021-04-24  7:46 ` Yann E. MORIN
  2021-04-26 19:02 ` Peter Korsgaard
  3 siblings, 0 replies; 9+ messages in thread
From: Yann E. MORIN @ 2021-04-24  7:46 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2021-04-23 22:23 +0200, Thomas Petazzoni spake thusly:
> We want bash to be installed as /bin/bash. For ages, Buildroot has
> been doing this by overriding exec_prefix at install time. First of
> all, it would be preferred to do this at configure time. But also,
> overriding exec_prefix not only changes where "bash" goes, but also
> where the pkgconfig file goes. Due to this, bash.pc goes into
> /lib/pkgconfig/, and doesn't get removed by target-finalize.
> 
> Since all we want is to have 'bash' as /bin/bash, simply pass
> --bindir=/bin at configure time. This allows to use the default target
> installation logic for autotools-package. We keep a post-install
> target hook to remove /bin/bashbug.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Cc: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  package/bash/bash.mk | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/package/bash/bash.mk b/package/bash/bash.mk
> index efe7cbbe59..996c6a6097 100644
> --- a/package/bash/bash.mk
> +++ b/package/bash/bash.mk
> @@ -7,11 +7,16 @@
>  BASH_VERSION = 5.1
>  BASH_SITE = $(BR2_GNU_MIRROR)/bash
>  BASH_DEPENDENCIES = ncurses readline host-bison
> -BASH_CONF_OPTS = --with-installed-readline --without-bash-malloc
>  BASH_LICENSE = GPL-3.0+
>  BASH_LICENSE_FILES = COPYING
>  BASH_CPE_ID_VENDOR = gnu
>  
> +# We want the bash binary in /bin
> +BASH_CONF_OPTS = \
> +	--bindir=/bin \
> +	--with-installed-readline \
> +	--without-bash-malloc
> +
>  BASH_CONF_ENV += \
>  	ac_cv_rl_prefix="$(STAGING_DIR)" \
>  	ac_cv_rl_version="$(READLINE_VERSION)" \
> @@ -38,11 +43,10 @@ BASH_CONF_ENV += bash_cv_getenv_redef=yes
>  endif
>  endif
>  
> -define BASH_INSTALL_TARGET_CMDS
> -	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
> -		DESTDIR=$(TARGET_DIR) exec_prefix=/ install
> +define BASH_REMOVE_UNUSED_FILES
>  	rm -f $(TARGET_DIR)/bin/bashbug
>  endef
> +BASH_POST_INSTALL_TARGET_HOOKS += BASH_REMOVE_UNUSED_FILES
>  
>  # Add /bin/bash to /etc/shells otherwise some login tools like dropbear
>  # can reject the user connection. See man shells.
> -- 
> 2.30.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 3/3] package/bash: drop SHOBJ_STATUS from BASH_CONF_ENV
  2021-04-23 20:23 ` [Buildroot] [PATCH 3/3] package/bash: drop SHOBJ_STATUS from BASH_CONF_ENV Thomas Petazzoni
@ 2021-04-24  7:46   ` Yann E. MORIN
  2021-04-26 19:08   ` Peter Korsgaard
  1 sibling, 0 replies; 9+ messages in thread
From: Yann E. MORIN @ 2021-04-24  7:46 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2021-04-23 22:23 +0200, Thomas Petazzoni spake thusly:
> SHOBJ_STATUS=unsupported was added in commit
> 4a2af11cba83ef176672609dd7321712fa7f6a28 to work around a limitation
> of the configure script that forgot to set this variable in
> static-linking configurations.
> 
> It turns out that this issue has been fixed upstream as of bash 5.0:
> 
>   https://git.savannah.gnu.org/cgit/bash.git/diff/configure.ac?id=d233b485e83c3a784b803fb894280773f16f2deb
> 
>   (see hunk @@ -1151,6 +1179,9 @@)
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Cc: Baruch Siach <baruch@tkos.co.il>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  package/bash/bash.mk | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/package/bash/bash.mk b/package/bash/bash.mk
> index 6913ccafd8..7b853ece08 100644
> --- a/package/bash/bash.mk
> +++ b/package/bash/bash.mk
> @@ -29,7 +29,6 @@ BASH_CONF_ENV += \
>  # The static build needs some trickery
>  ifeq ($(BR2_STATIC_LIBS),y)
>  BASH_CONF_OPTS += --enable-static-link
> -BASH_CONF_ENV += SHOBJ_STATUS=unsupported
>  # bash wants to redefine the getenv() function. To check whether this is
>  # possible, AC_TRY_RUN is used which is not possible in
>  # cross-compilation.
> -- 
> 2.30.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 2/3] package/bash: add option to keep or remove loadable examples
  2021-04-23 20:23 ` [Buildroot] [PATCH 2/3] package/bash: add option to keep or remove loadable examples Thomas Petazzoni
@ 2021-04-24  7:47   ` Yann E. MORIN
  2021-04-24  9:25     ` Thomas Petazzoni
  0 siblings, 1 reply; 9+ messages in thread
From: Yann E. MORIN @ 2021-04-24  7:47 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2021-04-23 22:23 +0200, Thomas Petazzoni spake thusly:
> bash has a concept of "loadables", which are "plugins" that can be
> loaded at runtime by bash to add new builtin. For example:
> 
> whoami is /usr/bin/whoami
> root
> whoami is a shell builtin
> root

I was not sure what you meant with those examples, so I've rewritten
that part with a capture of a session enabling and disabling whoami
as a shell builtin.

> bash comes with a set of example loadables, installed in
> /usr/lib/bash/. They take 312 KB on ARM32, and are by default not
> used, and provide builtins that are for the most part already
> available as external commands in Busybox/coreutils:
> 
> Makefile.inc  finfo         mkfifo        realpath      sync
> accept        head          mktemp        rm            tee
> basename      id            mypid         rmdir         truefalse
> csv           ln            pathchk       seq           tty
> cut           loadables.h   print         setpgid       uname
> dirname       logname       printenv      sleep         unlink
> fdflags       mkdir         push          strftime      whoami
> 
> So instead of having them unconditionally installed, add an option to
> enable/disable their installation (their build apparently cannot be
> disabled via a configure option).
> 
> Normally, we try to keep backward compatibility by preserving the
> existing behavior. In this case, this would have meant making this
> option "default y". But this also breaks our principle of "being
> minimal by default", and in this case, it feels preferable to be
> "minimal by default" than preserving existing behavior.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Cc: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  package/bash/Config.in | 14 ++++++++++++++
>  package/bash/bash.mk   | 13 +++++++++++++
>  2 files changed, 27 insertions(+)
> 
> diff --git a/package/bash/Config.in b/package/bash/Config.in
> index 5a9ebb8d02..0212df6bfd 100644
> --- a/package/bash/Config.in
> +++ b/package/bash/Config.in
> @@ -9,3 +9,17 @@ config BR2_PACKAGE_BASH
>  	  The standard GNU Bourne again shell.
>  
>  	  http://tiswww.case.edu/php/chet/bash/bashtop.html
> +
> +if BR2_PACKAGE_BASH
> +
> +config BR2_PACKAGE_BASH_LOADABLE_EXAMPLES
> +	bool "loadable examples"
> +	depends on !BR2_STATIC_LIBS
> +	help
> +	  This option will enable the installation of the "loadable"
> +	  examples, which are dynamically loadable extension providing
> +	  additional built-ins commands to bash. There are typically
> +	  not needed as they are provided as regular, external
> +	  commands.
> +
> +endif
> diff --git a/package/bash/bash.mk b/package/bash/bash.mk
> index 996c6a6097..6913ccafd8 100644
> --- a/package/bash/bash.mk
> +++ b/package/bash/bash.mk
> @@ -48,6 +48,19 @@ define BASH_REMOVE_UNUSED_FILES
>  endef
>  BASH_POST_INSTALL_TARGET_HOOKS += BASH_REMOVE_UNUSED_FILES
>  
> +ifeq ($(BR2_PACKAGE_BASH_LOADABLE_EXAMPLES),y)
> +define BASH_REMOVE_LOADABLE_UNUSED_FILES
> +	rm -f $(TARGET_DIR)/usr/lib/bash/Makefile.inc
> +	rm -f $(TARGET_DIR)/usr/lib/bash/loadables.h
> +endef
> +BASH_POST_INSTALL_TARGET_HOOKS += BASH_REMOVE_LOADABLE_UNUSED_FILES
> +else
> +define BASH_REMOVE_LOADABLE_EXAMPLES
> +	rm -rf $(TARGET_DIR)/usr/lib/bash
> +endef
> +BASH_POST_INSTALL_TARGET_HOOKS += BASH_REMOVE_LOADABLE_EXAMPLES
> +endif
> +
>  # Add /bin/bash to /etc/shells otherwise some login tools like dropbear
>  # can reject the user connection. See man shells.
>  define BASH_ADD_MKSH_TO_SHELLS
> -- 
> 2.30.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 2/3] package/bash: add option to keep or remove loadable examples
  2021-04-24  7:47   ` Yann E. MORIN
@ 2021-04-24  9:25     ` Thomas Petazzoni
  0 siblings, 0 replies; 9+ messages in thread
From: Thomas Petazzoni @ 2021-04-24  9:25 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 24 Apr 2021 09:47:31 +0200
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:

> > whoami is /usr/bin/whoami
> > root
> > whoami is a shell builtin
> > root  
> 
> I was not sure what you meant with those examples, so I've rewritten
> that part with a capture of a session enabling and disabling whoami
> as a shell builtin.

Gah, the commands went away, as they were prefix with my "#" shell
prompt :-/

This whole thing should have been:

# type whoami
whoami is /usr/bin/whoami
# whoami
root
# enable -f /usr/lib/bash/whoami whoami
# type whoami
whoami is a shell builtin
# whoami
root

Except that all lines starting with a # got eaten by Git :-/

Sorry about that, and thanks for applying the patches.

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 1/3] package/bash: use --bindir instead of exec_prefix=
  2021-04-23 20:23 [Buildroot] [PATCH 1/3] package/bash: use --bindir instead of exec_prefix= Thomas Petazzoni
                   ` (2 preceding siblings ...)
  2021-04-24  7:46 ` [Buildroot] [PATCH 1/3] package/bash: use --bindir instead of exec_prefix= Yann E. MORIN
@ 2021-04-26 19:02 ` Peter Korsgaard
  3 siblings, 0 replies; 9+ messages in thread
From: Peter Korsgaard @ 2021-04-26 19:02 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:

 > We want bash to be installed as /bin/bash. For ages, Buildroot has
 > been doing this by overriding exec_prefix at install time. First of
 > all, it would be preferred to do this at configure time. But also,
 > overriding exec_prefix not only changes where "bash" goes, but also
 > where the pkgconfig file goes. Due to this, bash.pc goes into
 > /lib/pkgconfig/, and doesn't get removed by target-finalize.

 > Since all we want is to have 'bash' as /bin/bash, simply pass
 > --bindir=/bin at configure time. This allows to use the default target
 > installation logic for autotools-package. We keep a post-install
 > target hook to remove /bin/bashbug.

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
 > Cc: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>

Committed to 2021.02.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH 3/3] package/bash: drop SHOBJ_STATUS from BASH_CONF_ENV
  2021-04-23 20:23 ` [Buildroot] [PATCH 3/3] package/bash: drop SHOBJ_STATUS from BASH_CONF_ENV Thomas Petazzoni
  2021-04-24  7:46   ` Yann E. MORIN
@ 2021-04-26 19:08   ` Peter Korsgaard
  1 sibling, 0 replies; 9+ messages in thread
From: Peter Korsgaard @ 2021-04-26 19:08 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:

 > SHOBJ_STATUS=unsupported was added in commit
 > 4a2af11cba83ef176672609dd7321712fa7f6a28 to work around a limitation
 > of the configure script that forgot to set this variable in
 > static-linking configurations.

 > It turns out that this issue has been fixed upstream as of bash 5.0:

 >   https://git.savannah.gnu.org/cgit/bash.git/diff/configure.ac?id=d233b485e83c3a784b803fb894280773f16f2deb

 >   (see hunk @@ -1151,6 +1179,9 @@)

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
 > Cc: Baruch Siach <baruch@tkos.co.il>

Committed to 2021.02.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-04-26 19:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-23 20:23 [Buildroot] [PATCH 1/3] package/bash: use --bindir instead of exec_prefix= Thomas Petazzoni
2021-04-23 20:23 ` [Buildroot] [PATCH 2/3] package/bash: add option to keep or remove loadable examples Thomas Petazzoni
2021-04-24  7:47   ` Yann E. MORIN
2021-04-24  9:25     ` Thomas Petazzoni
2021-04-23 20:23 ` [Buildroot] [PATCH 3/3] package/bash: drop SHOBJ_STATUS from BASH_CONF_ENV Thomas Petazzoni
2021-04-24  7:46   ` Yann E. MORIN
2021-04-26 19:08   ` Peter Korsgaard
2021-04-24  7:46 ` [Buildroot] [PATCH 1/3] package/bash: use --bindir instead of exec_prefix= Yann E. MORIN
2021-04-26 19:02 ` Peter Korsgaard

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.