Accepting request 86994 from shells

- remove libeditline dependency again as libeditline lives in /usr

- 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)

- Remove redundant tags/sections from specfile
  (cf. packaging guidelines)

OBS-URL: https://build.opensuse.org/request/show/86994
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/dash?expand=0&rev=8
This commit is contained in:
Lars Vogdt 2011-10-07 08:29:27 +00:00 committed by Git OBS Bridge
parent 5c7758eb7f
commit 0521d315a4
6 changed files with 96 additions and 20 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8737ae474532742d44cfd9809add7719df897f3677a5753db46c174705dd9913
size 167245

View File

@ -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 */

3
dash-0.5.7.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ae89fa9f1145b7748cf0740e1df04cd52fdf8a285da4911dd0f04983efba4e39
size 223794

View File

@ -0,0 +1,37 @@
From 1ed728ca0ea91cac348e1baf070399df5d575115 Mon Sep 17 00:00:00 2001
From: Jilles Tjoelker <jilles@stack.nl>
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 <jrnieder@gmail.com>
---
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

View File

@ -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 Mon Jul 19 10:57:38 UTC 2010 - guido+opensuse.org@berhoerster.name

View File

@ -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) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2010 Guido Berhoerster. # Copyright (c) 2011 Guido Berhoerster.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -20,12 +20,15 @@
Name: dash Name: dash
Summary: POSIX-compliant Implementation of /bin/sh Summary: POSIX-compliant Implementation of /bin/sh
Version: 0.5.6.1 Version: 0.5.7
Release: 1 Release: 1
License: BSD3c License: BSD3c
Group: System/Shells Group: System/Shells
AutoReqProv: on Source: dash-%{version}.tar.gz
Source: dash-%{version}.tar.bz2 # 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/ Url: http://gondor.apana.org.au/~herbert/dash/
BuildRoot: %{_tmppath}/%{name}-%{version}-build 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 DASH is a POSIX-compliant implementation of /bin/sh that aims to be as small as
possible without sacrificing speed where possible. possible without sacrificing speed where possible.
Authors:
--------
The Regents of the University of California
Christos Zoulas
Herbert Xu <herbert@gondor.apana.org.au>
%prep %prep
%setup -q %setup -q
%patch0 -p1
%patch1 -p1
%build %build
%configure %configure
@ -55,9 +52,6 @@ make %{?_smp_mflags}
%__mv $RPM_BUILD_ROOT/usr/bin/dash $RPM_BUILD_ROOT/bin %__mv $RPM_BUILD_ROOT/usr/bin/dash $RPM_BUILD_ROOT/bin
%__ln_s ../../bin/dash $RPM_BUILD_ROOT/usr/bin/dash %__ln_s ../../bin/dash $RPM_BUILD_ROOT/usr/bin/dash
%clean
rm -rf $RPM_BUILD_ROOT
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc ChangeLog %doc ChangeLog