]> git.pld-linux.org Git - packages/glibc.git/commitdiff
- merged sotruss-sh and posix-sh patches, rewritten the first to actually disable...
authorJakub Bogusz <qboosh@pld-linux.org>
Sat, 10 Jan 2015 08:26:07 +0000 (09:26 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Sat, 10 Jan 2015 08:26:07 +0000 (09:26 +0100)
  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-no-bash-nls.patch [moved from glibc-posix-sh.patch with 50% similarity]
glibc-sotruss-sh.patch [deleted file]
glibc.spec

similarity index 50%
rename from glibc-posix-sh.patch
rename to glibc-no-bash-nls.patch
index 01f356f8f65fa6a9b7f5359ab76681d12517d1b7..29a2f9311755de81957d0612ef0331182ea75e98 100644 (file)
      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 (file)
index c972c9c..0000000
+++ /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.
index 3869a029f3a0388802b57a562508a12874912bf0..cc95af39a84d64dde4fc853e5e11f61ea566c14e 100644 (file)
@@ -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
This page took 0.047706 seconds and 4 git commands to generate.