Accepting request 1044369 from shells

- update to 0.5.12:
  * eval: Test evalskip before flipping status for NNOT
  * parser: Add VSBIT to ensure subtype is never zero
  * eval: Check eflag after redirection error
  * eval: Always set exitstatus in evaltree
  * expand: Add ifsfree to expand to fix a logic error that causes a buffer over-read
  * expand: Always quote caret when using fnmatch
  * parser: Fix VSLENGTH parsing with trailing garbage
  * shell: Fail if building --with-libedit and can't find libedit
  * jobs: Only block in waitcmd on first run
  * redir: Retry open64 on EINTR
  * eval: Prevent recursive PS4 expansion
  * jobs: Fix waitcmd busy loop
- drop check-nflag-in-evaltree.patch (upstream)

OBS-URL: https://build.opensuse.org/request/show/1044369
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/dash?expand=0&rev=30
This commit is contained in:
Dominique Leuenberger 2022-12-24 13:51:08 +00:00 committed by Git OBS Bridge
commit dafd326a3b
5 changed files with 22 additions and 52 deletions

View File

@ -1,46 +0,0 @@
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

View File

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

BIN
dash-0.5.12.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,3 +1,21 @@
-------------------------------------------------------------------
Fri Dec 23 06:51:58 UTC 2022 - Dirk Müller <dmueller@suse.com>
- update to 0.5.12:
* eval: Test evalskip before flipping status for NNOT
* parser: Add VSBIT to ensure subtype is never zero
* eval: Check eflag after redirection error
* eval: Always set exitstatus in evaltree
* expand: Add ifsfree to expand to fix a logic error that causes a buffer over-read
* expand: Always quote caret when using fnmatch
* parser: Fix VSLENGTH parsing with trailing garbage
* shell: Fail if building --with-libedit and can't find libedit
* jobs: Only block in waitcmd on first run
* redir: Retry open64 on EINTR
* eval: Prevent recursive PS4 expansion
* jobs: Fix waitcmd busy loop
- drop check-nflag-in-evaltree.patch (upstream)
-------------------------------------------------------------------
Sat Oct 22 02:02:00 UTC 2022 - Luciano Santos <luc14n0@opensuse.org>

View File

@ -18,15 +18,13 @@
Name: dash
Version: 0.5.11.5
Version: 0.5.12
Release: 0
Summary: POSIX-compliant Implementation of /bin/sh
License: BSD-3-Clause
Group: System/Shells
URL: http://gondor.apana.org.au/~herbert/dash/
Source0: http://gondor.apana.org.au/~herbert/dash/files/%{name}-%{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
%description