[packages/pdksh] - added eval-var-expansion patch from OpenBSD cvs; fixes ${strip_debug#-Wl,} evaluation in linux ker
qboosh
qboosh at pld-linux.org
Fri Sep 10 19:09:07 CEST 2021
commit 62e1caa0a850a74150a0443b1999c872ed0d0c38
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri Sep 10 19:13:32 2021 +0200
- added eval-var-expansion patch from OpenBSD cvs; fixes ${strip_debug#-Wl,} evaluation in linux kernel
pdksh-eval-var-expansion.patch | 26 ++++++++++++++++++++++++++
pdksh.spec | 2 ++
2 files changed, 28 insertions(+)
---
diff --git a/pdksh.spec b/pdksh.spec
index a499624..d1f7114 100644
--- a/pdksh.spec
+++ b/pdksh.spec
@@ -38,6 +38,7 @@ Patch14: %{name}-kshrc_support.patch
Patch15: %{name}-openbsd.patch
Patch16: %{name}-empty-for-loop.patch
Patch17: %{name}-format.patch
+Patch18: %{name}-eval-var-expansion.patch
URL: http://www.cs.mun.ca/~michael/pdksh/
%{?with_static:BuildRequires: glibc-static}
BuildRequires: rpmbuild(macros) >= 1.462
@@ -131,6 +132,7 @@ W tym pakiecie jest pdksh skonsolidowany statycznie.
%patch15 -p1
%patch16 -p1
%patch17 -p1
+%patch18 -p3
%build
CFLAGS="%{rpmcflags} -D_FILE_OFFSET_BITS=64 -DDEBIAN=1"
diff --git a/pdksh-eval-var-expansion.patch b/pdksh-eval-var-expansion.patch
new file mode 100644
index 0000000..fe1c513
--- /dev/null
+++ b/pdksh-eval-var-expansion.patch
@@ -0,0 +1,26 @@
+ fix the cases where ${name#pat} and ${name%pat} will generate an empty word
+ when they shouldn't. originally from mksh but modified to handle the case
+ when the expr is quoted as noticed by halex at .
+ input from guenther@ and halex@, millert@ ok
+
+===================================================================
+RCS file: /cvs/src/bin/ksh/eval.c,v
+retrieving revision 1.34
+retrieving revision 1.35
+#-/* $OpenBSD: eval.c,v 1.34 2009/01/29 23:27:26 jaredy Exp $ */
+#+/* $OpenBSD: eval.c,v 1.35 2010/03/24 08:27:26 fgsch Exp $ */
+diff -u -r1.34 -r1.35
+--- src/bin/ksh/eval.c 2009/01/29 23:27:26 1.34
++++ src/bin/ksh/eval.c 2010/03/24 08:27:26 1.35
+@@ -375,7 +375,10 @@
+ */
+ x.str = trimsub(str_val(st->var),
+ dp, st->stype);
+- type = XSUB;
++ if (x.str[0] != '\0' || st->quote)
++ type = XSUB;
++ else
++ type = XNULLSUB;
+ if (f&DOBLANK)
+ doblank++;
+ st = st->prev;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/pdksh.git/commitdiff/62e1caa0a850a74150a0443b1999c872ed0d0c38
More information about the pld-cvs-commit
mailing list