Skip to contentSkip to conversation

eglibc: remove dependency of eglibc-utils on bash

PATCH New Paul Eggleton 1 participant 1 message Dec 12, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 eglibc: remove dependency of eglibc-utils on bash

Adapt a patch from Peter Seebach <[email protected]> to remove the non-POSIX elements from the tzselect script, and add a separate patch to work around a bug in the current version of busybox's awk command. This replaces the /bin/bash reference in the script header with /bin/sh and thus eliminates the dependency on bash picked up during packaging.

Fixes [YOCTO #3551].

---
 .../eglibc/eglibc-2.16/tzselect-awk.patch          |   42 +++++
 .../eglibc/eglibc-2.16/tzselect-sh.patch           |  160 ++++++++++++++++++++
 meta/recipes-core/eglibc/eglibc_2.16.bb            |    4 +-
 3 files changed, 205 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-core/eglibc/eglibc-2.16/tzselect-awk.patch
 create mode 100644 meta/recipes-core/eglibc/eglibc-2.16/tzselect-sh.patch
meta/recipes-core/eglibc/eglibc-2.16/tzselect-awk.patch new file +42 -0
new file mode 100644
index 0000000..dc9949b
@@ -0,0 +1,42 @@
+tzselect: workaround bug in busybox awk
+
+busybox's version of awk in version 1.20.2 and lower doesn't support
+escape sequences in conjunction with the -F option. Use -v FS= instead
+as a workaround until the bug is fixed.
+
+Reference:
+https://bugs.busybox.net/show_bug.cgi?id=5126
+
+Upstream-Status: Inappropriate [other]
+
+Signed-off-by: Paul Eggleton <[email protected]>
+
+--- libc/timezone/tzselect.ksh
++++ libc/timezone/tzselect.ksh
+@@ -208,7 +208,7 @@ while
+ 		TZ_for_date=$TZ;;
+ 	*)
+ 		# Get list of names of countries in the continent or ocean.
+-		countries=$($AWK -F'\t' \
++		countries=$($AWK -v FS="\t" \
+ 			-v continent="$continent" \
+ 			-v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \
+ 		'
+@@ -252,7 +252,7 @@ while
+ 
+ 
+ 		# Get list of names of time zone rule regions in the country.
+-		regions=$($AWK -F'\t' \
++		regions=$($AWK -v FS="\t" \
+ 			-v country="$country" \
+ 			-v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \
+ 		'
+@@ -289,7 +289,7 @@ while
+ 		esac
+ 
+ 		# Determine TZ from country and region.
+-		TZ=$($AWK -F'\t' \
++		TZ=$($AWK -v FS="\t" \
+ 			-v country="$country" \
+ 			-v region="$region" \
+ 			-v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \
meta/recipes-core/eglibc/eglibc-2.16/tzselect-sh.patch new file +160 -0

160 lines not on this page · raw message

meta/recipes-core/eglibc/eglibc_2.16.bb +3 -1
index aa9256c..d676b09 100644
@@ -1,7 +1,7 @@
 require eglibc.inc
 
 DEPENDS += "gperf-native kconfig-frontends-native"
-PR = "r17"
+PR = "r18"
 
 SRC_URI = "http://downloads.yoctoproject.org/releases/eglibc/eglibc-${PV}-svnr21224.tar.bz2 \
            file://eglibc-svn-arm-lowlevellock-include-tls.patch \
@@ -27,6 +27,8 @@ SRC_URI = "http://downloads.yoctoproject.org/releases/eglibc/eglibc-${PV}-svnr21
            file://0001-Add-name_to_handle_at-open_by_handle-etc.-to-PowerPC.patch \
            file://fsl-ppc-no-fsqrt.patch \
            file://0001-R_ARM_TLS_DTPOFF32.patch \
+           file://tzselect-sh.patch \
+           file://tzselect-awk.patch \
           "
 
 SRC_URI[md5sum] = "88894fa6e10e58e85fbd8134b8e486a8"
Signature · 1 line
1.7.10.4