[packages/glibc] - merged sotruss-sh and posix-sh patches, rewritten the first to actually disable NLS calls not to

qboosh qboosh at pld-linux.org
Sat Jan 10 09:24:46 CET 2015


commit 982cc11658f7958baea1cce9be31241ea13898e8
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Jan 10 09:26:07 2015 +0100

    - merged sotruss-sh and posix-sh patches, rewritten the first to actually disable NLS calls
      not to rely on non-standard behaviour of particular implementation meant to be POSIX sh
    - added bash_nls bcond to restore scripts NLS at cost of /bin/bash dependency

 glibc-posix-sh.patch => glibc-no-bash-nls.patch | 85 +++++++++++++++++++++++++
 glibc-sotruss-sh.patch                          | 10 ---
 glibc.spec                                      |  7 +-
 3 files changed, 88 insertions(+), 14 deletions(-)
---
diff --git a/glibc.spec b/glibc.spec
index 3869a02..cc95af3 100644
--- a/glibc.spec
+++ b/glibc.spec
@@ -15,6 +15,7 @@
 %bcond_without	localedb	# don't build localedb-all (is time consuming)
 %bcond_with	cross		# make a cross build, skip native programs
 %bcond_without	nss_crypt	# disable crypt features based on Mozilla NSS library
+%bcond_with	bash_nls	# use bash NLS in shell scripts (ldd, sotruss); restores /bin/bash dep
 #
 %ifarch x32
 %{!?min_kernel:%global		min_kernel	3.4.0}
@@ -61,7 +62,7 @@ Patch0:		%{name}-git.patch
 #Patch1:		%{name}-pl.po-update.patch
 Patch2:		%{name}-pld.patch
 Patch3:		%{name}-crypt-blowfish.patch
-Patch4:		%{name}-sotruss-sh.patch
+Patch4:		%{name}-no-bash-nls.patch
 Patch5:		%{name}-sparc-softfp-gcc.patch
 Patch6:		%{name}-paths.patch
 Patch7:		1070_all_glibc-fadvise64_64.patch
@@ -83,7 +84,6 @@ Patch20:	%{name}-thread_start.patch
 Patch22:	%{name}-with-stroke.patch
 Patch23:	%{name}-pt_pax.patch
 Patch25:	%{name}-cv_gnu89_inline.patch
-Patch26:	%{name}-posix-sh.patch
 Patch27:	%{name}-locale-C.patch.xz
 # Patch27-md5:	34ebe52a2afb923e33af0fb7c541f540
 Patch28:	%{name}-locale-C-pld.patch
@@ -960,7 +960,7 @@ exit 1
 %patch0 -p1
 %patch2 -p1
 %patch3 -p0
-%patch4 -p1
+%{!?with_bash_nls:%patch4 -p1}
 %patch5 -p1
 %patch6 -p1
 %patch7 -p1
@@ -982,7 +982,6 @@ exit 1
 %patch23 -p0
 
 %patch25 -p1
-%patch26 -p1
 %patch27 -p1
 %patch28 -p1
 %patch29 -p1
diff --git a/glibc-posix-sh.patch b/glibc-no-bash-nls.patch
similarity index 50%
rename from glibc-posix-sh.patch
rename to glibc-no-bash-nls.patch
index 01f356f..29a2f93 100644
--- a/glibc-posix-sh.patch
+++ b/glibc-no-bash-nls.patch
@@ -106,3 +106,88 @@
      result=1
    fi
  done
+--- glibc-2.20/elf/sotruss.sh.orig	2015-01-10 09:10:21.870731775 +0100
++++ glibc-2.20/elf/sotruss.sh	2015-01-10 09:12:10.734060537 +0100
+@@ -1,4 +1,4 @@
+-#! @BASH@
++#! /bin/sh
+ # Copyright (C) 2011-2014 Free Software Foundation, Inc.
+ # This file is part of the GNU C Library.
+ 
+@@ -29,7 +29,7 @@
+ lib='@PREFIX@/$LIB/audit/sotruss-lib.so'
+ 
+ do_help() {
+-  echo $"Usage: sotruss [OPTION...] [--] EXECUTABLE [EXECUTABLE-OPTION...]
++  echo "Usage: sotruss [OPTION...] [--] EXECUTABLE [EXECUTABLE-OPTION...]
+   -F, --from FROMLIST     Trace calls from objects on FROMLIST
+   -T, --to TOLIST         Trace calls to objects on TOLIST
+ 
+@@ -43,28 +43,28 @@
+       --version           Print program version"
+ 
+   echo
+-  printf $"Mandatory arguments to long options are also mandatory for any corresponding\nshort options.\n"
++  printf "Mandatory arguments to long options are also mandatory for any corresponding\nshort options.\n"
+   echo
+ 
+-  printf $"For bug reporting instructions, please see:\\n%s.\\n" \
++  printf "For bug reporting instructions, please see:\\n%s.\\n" \
+     "@REPORT_BUGS_TO@"
+   exit 0
+ }
+ 
+ do_missing_arg() {
+-  printf >&2 $"%s: option requires an argument -- '%s'\n" sotruss "$1"
+-  printf >&2 $"Try \`%s --help' or \`%s --usage' for more information.\n" sotruss sotruss
++  printf >&2 "%s: option requires an argument -- '%s'\n" sotruss "$1"
++  printf >&2 "Try \`%s --help' or \`%s --usage' for more information.\n" sotruss sotruss
+   exit 1
+ }
+ 
+ do_ambiguous() {
+-  printf >&2 $"%s: option is ambiguous; possibilities:"
++  printf >&2 "%s: option is ambiguous; possibilities:"
+   while test $# -gt 0; do
+     printf >&2 " '%s'" $1
+     shift
+   done
+   printf >&2 "\n"
+-  printf >&2 $"Try \`%s --help' or \`%s --usage' for more information.\n" sotruss sotruss
++  printf >&2 "Try \`%s --help' or \`%s --usage' for more information.\n" sotruss sotruss
+   exit 1
+ }
+ 
+@@ -72,18 +72,18 @@
+   case "$1" in
+   --v | --ve | --ver | --vers | --versi | --versio | --version)
+     echo "sotruss @PKGVERSION@@VERSION@"
+-    printf $"Copyright (C) %s Free Software Foundation, Inc.
++    printf "Copyright (C) %s Free Software Foundation, Inc.
+ This is free software; see the source for copying conditions.  There is NO
+ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ " "2014"
+-    printf $"Written by %s.\n" "Ulrich Drepper"
++    printf "Written by %s.\n" "Ulrich Drepper"
+     exit 0
+     ;;
+   -\? | --h | --he | --hel | --help)
+     do_help
+     ;;
+   --u | --us | --usa | --usag | --usage)
+-    printf $"Usage: %s [-ef] [-F FROMLIST] [-o FILENAME] [-T TOLIST] [--exit]
++    printf "Usage: %s [-ef] [-F FROMLIST] [-o FILENAME] [-T TOLIST] [--exit]
+ 	    [--follow] [--from FROMLIST] [--output FILENAME] [--to TOLIST]
+ 	    [--help] [--usage] [--version] [--]
+ 	    EXECUTABLE [EXECUTABLE-OPTION...]\n" sotruss
+@@ -131,8 +131,8 @@
+     break
+     ;;
+   -*)
+-    printf >&2 $"%s: unrecognized option '%c%s'\n" sotruss '-' ${1#-}
+-    printf >&2 $"Try \`%s --help' or \`%s --usage' for more information.\n" sotruss sotruss
++    printf >&2 "%s: unrecognized option '%c%s'\n" sotruss '-' ${1#-}
++    printf >&2 "Try \`%s --help' or \`%s --usage' for more information.\n" sotruss sotruss
+     exit 1
+     ;;
+   *)
diff --git a/glibc-sotruss-sh.patch b/glibc-sotruss-sh.patch
deleted file mode 100644
index c972c9c..0000000
--- a/glibc-sotruss-sh.patch
+++ /dev/null
@@ -1,10 +0,0 @@
-Despite ksh shebang, sotruss is apparently bash script (function keyword, $"" NLS)
-However mksh also accepts this syntax leaving strings untranslated.
---- glibc-2.14/elf/sotruss.sh.orig	2011-05-31 06:12:33.000000000 +0200
-+++ glibc-2.14/elf/sotruss.sh	2011-06-11 09:42:22.467864393 +0200
-@@ -1,4 +1,4 @@
--#! @BASH@
-+#! /bin/mksh
- # Copyright (C) 2011-2014 Free Software Foundation, Inc.
- # This file is part of the GNU C Library.
- 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/glibc.git/commitdiff/982cc11658f7958baea1cce9be31241ea13898e8



More information about the pld-cvs-commit mailing list