glibc: Redo tzselect bash dependency problem
PATCH v2 1/1 glibc: Redo tzselect bash dependency problem
New patch adds a knob to select needed shell interpreter for tzselect script, which then we excercise via EXTRA_OEMAKE
Signed-off-by Khem Raj <[email protected]>
Cc Hongxu Jia <[email protected]>
---
v2: Fix cross-localedef-native as well
.../glibc/cross-localedef-native_2.34.bb | 7 ++- meta/recipes-core/glibc/glibc.inc | 4 ++ ...erpreter-overridable-in-tzselect.ksh.patch | 50 +++++++++++++++++++ ...zone-re-written-tzselect-as-posix-sh.patch | 34 ------------- meta/recipes-core/glibc/glibc_2.34.bb | 2 +- 5 files changed, 61 insertions(+), 36 deletions(-) create mode 100644 meta/recipes-core/glibc/glibc/0001-Make-shell-interpreter-overridable-in-tzselect.ksh.patch delete mode 100644 meta/recipes-core/glibc/glibc/0017-timezone-re-written-tzselect-as-posix-sh.patch
meta/recipes-core/glibc/cross-localedef-native_2.34.bb +6 -1
@@ -34,13 +34,13 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ file://0001-localedef-Add-hardlink-resolver-from-util-linux.patch \ file://0002-localedef-fix-ups-hardlink-to-make-it-compile.patch \ \ - file://0017-timezone-re-written-tzselect-as-posix-sh.patch \ file://0018-Remove-bash-dependency-for-nscd-init-script.patch \ file://0019-eglibc-Cross-building-and-testing-instructions.patch \ file://0020-eglibc-Help-bootstrap-cross-toolchain.patch \ file://0021-eglibc-Resolve-__fpscr_values-on-SH4.patch \ file://0022-eglibc-Forward-port-cross-locale-generation-support.patch \ file://0024-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch \ + file://0001-Make-shell-interpreter-overridable-in-tzselect.ksh.patch \ " # Makes for a rather long rev (22 characters), but... #
@@ -49,6 +49,11 @@ SRCREV_FORMAT = "glibc_localedef" S = "${WORKDIR}/git" EXTRA_OECONF = "--with-glibc=${S}" + +# We do not need bash to run tzselect script, the default is to use +# bash but it can be configured by setting KSHELL Makefile variable +EXTRA_OEMAKE += "KSHELL=/bin/sh" + CFLAGS += "-fgnu89-inline -std=gnu99 -DIS_IN\(x\)='0'" do_install() {
meta/recipes-core/glibc/glibc.inc +4 -0
@@ -41,6 +41,10 @@ PARALLEL_MAKE = "" # ensure make uses /bin/bash EXTRA_OEMAKE += "SHELL=/bin/bash" +# We do not need bash to run tzselect script, the default is to use +# bash but it can be configured by setting KSHELL Makefile variable +EXTRA_OEMAKE += "KSHELL=/bin/sh" + do_configure:prepend() { sed -e "s#/bin/bash#/bin/sh#" -i ${S}/elf/ldd.bash.in }
meta/recipes-core/glibc/glibc/0001-Make-shell-interpreter-overridable-in-tzselect.ksh.patch new file +50 -0
50 lines not on this page · raw message
meta/recipes-core/glibc/glibc/0017-timezone-re-written-tzselect-as-posix-sh.patch deleted +0 -34
@@ -1,34 +0,0 @@ -From 2731fa0c7463cd160361a8ac92f3bd7f984d953d Mon Sep 17 00:00:00 2001 -From: Khem Raj <[email protected]> -Date: Wed, 18 Mar 2015 00:33:03 +0000 -Subject: [PATCH] timezone: re-written tzselect as posix sh - -To avoid the bash dependency. - -Upstream-Status: Pending - -Signed-off-by: Hongxu Jia <[email protected]> -Signed-off-by: Khem Raj <[email protected]> ---- - timezone/tzselect.ksh | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/timezone/tzselect.ksh b/timezone/tzselect.ksh -index 18fce27e24..7705df83d7 100755 ---- a/timezone/tzselect.ksh -+++ b/timezone/tzselect.ksh -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - # Ask the user about the time zone, and output the resulting TZ value to stdout. - # Interact with the user via stderr and stdin. - -@@ -34,7 +34,7 @@ [email protected] - - # Specify default values for environment variables if they are unset. - : ${AWK=awk} --: ${TZDIR=`pwd`} -+: ${TZDIR=$(pwd)} - - # Output one argument as-is to standard output. - # Safer than 'echo', which can mishandle '\' or leading '-'.
meta/recipes-core/glibc/glibc_2.34.bb +1 -1
@@ -32,7 +32,6 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ ${NATIVESDKFIXES} \ file://0015-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch \ file://0016-yes-within-the-path-sets-wrong-config-variables.patch \ - file://0017-timezone-re-written-tzselect-as-posix-sh.patch \ file://0018-Remove-bash-dependency-for-nscd-init-script.patch \ file://0019-eglibc-Cross-building-and-testing-instructions.patch \ file://0020-eglibc-Help-bootstrap-cross-toolchain.patch \
@@ -49,6 +48,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ file://0002-CVE-2021-38604.patch \ file://0001-fix-create-thread-failed-in-unprivileged-process-BZ-.patch \ file://CVE-2021-43396.patch \ + file://0001-Make-shell-interpreter-overridable-in-tzselect.ksh.patch \ " # Use append instead of += that way patch is applied with devupstream too SRC_URI:append = "\
Signature · 1 line
2.34.1