Accepting request 849512 from home:dirkmueller:branches:shells
- add check-nflag-in-evaltree.patch (bsc#1178978) - update to 0.5.11.2 (bsc#1177691): - add LICENSE file OBS-URL: https://build.opensuse.org/request/show/849512 OBS-URL: https://build.opensuse.org/package/show/shells/dash?expand=0&rev=32
This commit is contained in:
parent
16fff1998d
commit
b2987142fa
46
check-nflag-in-evaltree.patch
Normal file
46
check-nflag-in-evaltree.patch
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
From 29d6f2148f10213de4e904d515e792d2cf8c968e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Herbert Xu <herbert@gondor.apana.org.au>
|
||||||
|
Date: Thu, 4 Jun 2020 21:53:55 +1000
|
||||||
|
Subject: eval: Check nflag in evaltree instead of cmdloop
|
||||||
|
|
||||||
|
This patch moves the nflag check from cmdloop into evaltree. This
|
||||||
|
is so that nflag will be in force even if we enter the shell via a
|
||||||
|
path other than cmdloop, e.g., through sh -c.
|
||||||
|
|
||||||
|
Reported-by: Joey Hess <id@joeyh.name>
|
||||||
|
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||||
|
---
|
||||||
|
src/eval.c | 3 +++
|
||||||
|
src/main.c | 2 +-
|
||||||
|
2 files changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/eval.c b/src/eval.c
|
||||||
|
index d10be38..9476fbb 100644
|
||||||
|
--- a/src/eval.c
|
||||||
|
+++ b/src/eval.c
|
||||||
|
@@ -213,6 +213,9 @@ evaltree(union node *n, int flags)
|
||||||
|
|
||||||
|
setstackmark(&smark);
|
||||||
|
|
||||||
|
+ if (nflag)
|
||||||
|
+ goto out;
|
||||||
|
+
|
||||||
|
if (n == NULL) {
|
||||||
|
TRACE(("evaltree(NULL) called\n"));
|
||||||
|
goto out;
|
||||||
|
diff --git a/src/main.c b/src/main.c
|
||||||
|
index 7a28534..5c49fdc 100644
|
||||||
|
--- a/src/main.c
|
||||||
|
+++ b/src/main.c
|
||||||
|
@@ -233,7 +233,7 @@ cmdloop(int top)
|
||||||
|
out2str("\nUse \"exit\" to leave shell.\n");
|
||||||
|
}
|
||||||
|
numeof++;
|
||||||
|
- } else if (nflag == 0) {
|
||||||
|
+ } else {
|
||||||
|
int i;
|
||||||
|
|
||||||
|
job_warning = (job_warning == 2) ? 1 : 0;
|
||||||
|
--
|
||||||
|
cgit 1.2.3-1.el7
|
||||||
|
|
@ -1,8 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Nov 19 22:34:02 UTC 2020 - Dirk Mueller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- add check-nflag-in-evaltree.patch (bsc#1178978)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Oct 18 18:08:34 UTC 2020 - Dirk Mueller <dmueller@suse.com>
|
Sun Oct 18 18:08:34 UTC 2020 - Dirk Mueller <dmueller@suse.com>
|
||||||
|
|
||||||
- update to 0.5.11.2:
|
- update to 0.5.11.2 (bsc#1177691):
|
||||||
* shell: Group readdir64/dirent64 with open64
|
* shell: Group readdir64/dirent64 with open64
|
||||||
|
- add LICENSE file
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Aug 16 17:55:38 UTC 2020 - Dirk Mueller <dmueller@suse.com>
|
Sun Aug 16 17:55:38 UTC 2020 - Dirk Mueller <dmueller@suse.com>
|
||||||
|
@ -25,6 +25,8 @@ License: BSD-3-Clause
|
|||||||
Group: System/Shells
|
Group: System/Shells
|
||||||
URL: http://gondor.apana.org.au/~herbert/dash/
|
URL: http://gondor.apana.org.au/~herbert/dash/
|
||||||
Source: http://gondor.apana.org.au/~herbert/dash/files/dash-%{version}.tar.gz
|
Source: http://gondor.apana.org.au/~herbert/dash/files/dash-%{version}.tar.gz
|
||||||
|
# PATCH-FIX-UPSTREAM: https://git.kernel.org/pub/scm/utils/dash/dash.git/commit/?id=29d6f2148f10213de4e904d515e792d2cf8c968e
|
||||||
|
Patch1: check-nflag-in-evaltree.patch
|
||||||
BuildRequires: libedit-devel
|
BuildRequires: libedit-devel
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -33,6 +35,7 @@ possible without sacrificing speed where possible.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%autopatch -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%global optflags %{optflags} -fcommon
|
%global optflags %{optflags} -fcommon
|
||||||
@ -49,6 +52,7 @@ mkdir -p %{buildroot}/bin
|
|||||||
ln -s %{_bindir}/dash %{buildroot}/bin/dash
|
ln -s %{_bindir}/dash %{buildroot}/bin/dash
|
||||||
|
|
||||||
%files
|
%files
|
||||||
|
%license COPYING
|
||||||
%doc ChangeLog
|
%doc ChangeLog
|
||||||
%{_bindir}/dash
|
%{_bindir}/dash
|
||||||
/bin/dash
|
/bin/dash
|
||||||
|
Loading…
Reference in New Issue
Block a user