diff --git a/dash-0.5.6.1.tar.bz2 b/dash-0.5.6.1.tar.bz2 deleted file mode 100644 index f0c35d6..0000000 --- a/dash-0.5.6.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8737ae474532742d44cfd9809add7719df897f3677a5753db46c174705dd9913 -size 167245 diff --git a/dash-0.5.7-do-not-close-stderr.patch b/dash-0.5.7-do-not-close-stderr.patch new file mode 100644 index 0000000..76844bb --- /dev/null +++ b/dash-0.5.7-do-not-close-stderr.patch @@ -0,0 +1,13 @@ +diff -urNp dash-0.5.7.orig/src/jobs.c dash-0.5.7/src/jobs.c +--- dash-0.5.7.orig/src/jobs.c 2011-03-15 08:45:32.000000000 +0100 ++++ dash-0.5.7/src/jobs.c 2011-10-06 18:57:38.000000000 +0200 +@@ -198,6 +198,9 @@ setjobctl(int on) + while (!isatty(fd)) + if (--fd < 0) + goto out; ++ fd = dup(fd); ++ if (fd < 0) ++ goto out; + } + fd = savefd(fd, ofd); + do { /* while we are in the background */ diff --git a/dash-0.5.7.tar.gz b/dash-0.5.7.tar.gz new file mode 100644 index 0000000..6a168a5 --- /dev/null +++ b/dash-0.5.7.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae89fa9f1145b7748cf0740e1df04cd52fdf8a285da4911dd0f04983efba4e39 +size 223794 diff --git a/dash-remove-backslash-before-in-double-quotes-in-variable.patch b/dash-remove-backslash-before-in-double-quotes-in-variable.patch new file mode 100644 index 0000000..f453f88 --- /dev/null +++ b/dash-remove-backslash-before-in-double-quotes-in-variable.patch @@ -0,0 +1,37 @@ +From 1ed728ca0ea91cac348e1baf070399df5d575115 Mon Sep 17 00:00:00 2001 +From: Jilles Tjoelker +Date: Sun, 21 Nov 2010 14:42:22 +0100 +Subject: [PARSER] Remove backslash before } in double-quotes in variable + +The backslash prevents the closing brace from terminating the +substitution, therefore it should be removed. + +FreeBSD sh test expansion/plus-minus2.0 starts working, no other tests +are affected. + +Example: + printf "%s\n" ${$+\}} ${$+"\}"} "${$+\}}" +should print } three times, without backslashes. + +Signed-off-by: Jonathan Nieder +--- + src/parser.c | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/src/parser.c b/src/parser.c +index 6de27629..4fa8c6d4 100644 +--- a/src/parser.c ++++ b/src/parser.c +@@ -926,6 +926,9 @@ readtoken1(int firstc, char const *syntax, char *eofmark, int striptabs) + c != '$' && ( + c != '"' || + eofmark != NULL ++ ) && ( ++ c != '}' || ++ varnest == 0 + ) + ) { + USTPUTC('\\', out); +-- +1.7.6 + diff --git a/dash.changes b/dash.changes index ec81d5c..1b2b35b 100644 --- a/dash.changes +++ b/dash.changes @@ -1,3 +1,35 @@ +------------------------------------------------------------------- +Thu Oct 6 22:04:40 UTC 2011 - gber@opensuse.org + +- remove libeditline dependency again as libeditline lives in /usr + +------------------------------------------------------------------- +Thu Oct 6 17:50:16 UTC 2011 - gber@opensuse.org + +- update to version 0.5.7 + - optimize dash -c "command" to avoid a fork + - improve LINENO support + - dotcmd should exit with zero when doing nothing + - replace GPL noclobberopen code with the FreeBSD version + - do not split the result of tilde expansion + - use exit status 127 when the script to run does not exist + - document optional open parenthesis for case patterns + - use faccessat if available +- added dash-0.5.7-do-not-close-stderr.patch in order to prevent + stderr from being closed when /dev/tty fails to open (backported + from upstream git) +- added + dash-remove-backslash-before-in-double-quotes-in-variable.patch + which removes a backslash before } in double-quotes in variable + as it prevents the closing brace from terminating the + substitution (from FreeBSD/Debian) + +------------------------------------------------------------------- +Sun Sep 18 17:17:12 UTC 2011 - jengelh@medozas.de + +- Remove redundant tags/sections from specfile + (cf. packaging guidelines) + ------------------------------------------------------------------- Mon Jul 19 10:57:38 UTC 2010 - guido+opensuse.org@berhoerster.name diff --git a/dash.spec b/dash.spec index c717fe3..8ecbb5f 100644 --- a/dash.spec +++ b/dash.spec @@ -1,8 +1,8 @@ # -# spec file for package dash (Version 0.5.6.1) +# spec file for package dash # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. -# Copyright (c) 2010 Guido Berhoerster. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 Guido Berhoerster. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,12 +20,15 @@ Name: dash Summary: POSIX-compliant Implementation of /bin/sh -Version: 0.5.6.1 +Version: 0.5.7 Release: 1 License: BSD3c Group: System/Shells -AutoReqProv: on -Source: dash-%{version}.tar.bz2 +Source: dash-%{version}.tar.gz +# PATCH-FIX-UPSTREAM dash-0.5.7-do-not-close-stderr.patch gber@opensuse.org -- Prevents closing stderr when /dev/tty fails to open (backported from upstream git) +Patch0: dash-0.5.7-do-not-close-stderr.patch +# PATCH-FIX-UPSTREAM dash-remove-backslash-before-in-double-quotes-in-variable.patch gber@opensuse.org -- Remove backslash before } in double-quotes in variable as it prevents the closing brace from terminating the substitution (from FreeBSD/Debian) +Patch1: dash-remove-backslash-before-in-double-quotes-in-variable.patch Url: http://gondor.apana.org.au/~herbert/dash/ BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -33,16 +36,10 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build DASH is a POSIX-compliant implementation of /bin/sh that aims to be as small as possible without sacrificing speed where possible. - -Authors: --------- - The Regents of the University of California - Christos Zoulas - Herbert Xu - - %prep %setup -q +%patch0 -p1 +%patch1 -p1 %build %configure @@ -55,9 +52,6 @@ make %{?_smp_mflags} %__mv $RPM_BUILD_ROOT/usr/bin/dash $RPM_BUILD_ROOT/bin %__ln_s ../../bin/dash $RPM_BUILD_ROOT/usr/bin/dash -%clean -rm -rf $RPM_BUILD_ROOT - %files %defattr(-,root,root,-) %doc ChangeLog