From 70294de0af805c0733808b7b30e3eb14ff7a7688 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Mon, 18 Jan 2021 19:15:25 +0100 Subject: [PATCH] - merged 59c from PLD, recreated patches for fuzz 0 --- mksh-circumflex.patch | 49 ++++++++++++++++++++------------------- mksh-mkshrc_support.patch | 11 +++++---- mksh.spec | 8 ++++--- 3 files changed, 36 insertions(+), 32 deletions(-) diff --git a/mksh-circumflex.patch b/mksh-circumflex.patch index 36ad817..43b7804 100644 --- a/mksh-circumflex.patch +++ b/mksh-circumflex.patch @@ -1,7 +1,19 @@ -diff -ur mksh-56.orig/eval.c mksh-56/eval.c ---- mksh-56.orig/eval.c 2017-08-12 22:10:26.321676398 +0200 -+++ mksh-56/eval.c 2017-08-12 22:40:32.672676143 +0200 -@@ -1005,6 +1005,7 @@ +diff -ur mksh.orig/check.t mksh/check.t +--- mksh.orig/check.t 2020-10-31 04:53:30.000000000 +0100 ++++ mksh/check.t 2021-01-18 19:12:47.413180226 +0100 +@@ -2484,7 +2484,7 @@ + !bc +bc ,bc 0bc 1bc ^bc cbc + !bc +bc ,bc -bc 0bc 1bc ^bc cbc + abc bbc +- ^bc abc bbc ++ !bc +bc ,bc -bc 0bc 1bc ^bc cbc + +bc ,bc -bc + -bc 0bc 1bc + --- +diff -ur mksh.orig/eval.c mksh/eval.c +--- mksh.orig/eval.c 2020-05-05 23:34:54.000000000 +0200 ++++ mksh/eval.c 2021-01-18 19:12:47.411180226 +0100 +@@ -1108,6 +1108,7 @@ switch (ord(c)) { case ORD('['): case ORD('!'): @@ -9,10 +21,10 @@ diff -ur mksh-56.orig/eval.c mksh-56/eval.c case ORD('-'): case ORD(']'): /* -diff -ur mksh-56.orig/misc.c mksh-56/misc.c ---- mksh-56.orig/misc.c 2017-08-12 22:10:26.321676398 +0200 -+++ mksh-56/misc.c 2017-08-12 22:40:32.672676143 +0200 -@@ -966,7 +966,7 @@ +diff -ur mksh.orig/misc.c mksh/misc.c +--- mksh.orig/misc.c 2020-08-27 21:53:12.000000000 +0200 ++++ mksh/misc.c 2021-01-18 19:12:47.411180226 +0100 +@@ -1018,7 +1018,7 @@ char *subp; /* check for negation */ @@ -21,10 +33,10 @@ diff -ur mksh-56.orig/misc.c mksh-56/misc.c p += 2; negated = true; } -diff -ur mksh-56.orig/sh.h mksh-56/sh.h ---- mksh-56.orig/sh.h 2017-08-12 22:10:26.325009789 +0200 -+++ mksh-56/sh.h 2017-08-12 22:40:32.696009488 +0200 -@@ -550,6 +550,7 @@ +diff -ur mksh.orig/sh.h mksh/sh.h +--- mksh.orig/sh.h 2020-10-31 04:53:33.000000000 +0100 ++++ mksh/sh.h 2021-01-18 19:12:47.412180226 +0100 +@@ -580,6 +580,7 @@ */ #define MAGIC KSH_BEL /* prefix for *?[!{,} during expand */ #define ISMAGIC(c) (ord(c) == ORD(MAGIC)) @@ -32,15 +44,4 @@ diff -ur mksh-56.orig/sh.h mksh-56/sh.h EXTERN const char *safe_prompt; /* safe prompt if PS1 substitution fails */ -diff -ur mksh-56.orig/check.t mksh-56/check.t ---- mksh-56.orig/check.t 2017-08-12 22:10:26.321676398 +0200 -+++ mksh-56/check.t 2017-08-12 22:41:46.886083258 +0200 -@@ -2438,7 +2438,7 @@ - !bc +bc ,bc 0bc 1bc ^bc cbc - !bc +bc ,bc -bc 0bc 1bc ^bc cbc - abc bbc -- ^bc abc bbc -+ !bc +bc ,bc -bc 0bc 1bc ^bc cbc - +bc ,bc -bc - -bc 0bc 1bc - --- +Only in mksh: sh.h.orig diff --git a/mksh-mkshrc_support.patch b/mksh-mkshrc_support.patch index 3cde184..a80d4ed 100644 --- a/mksh-mkshrc_support.patch +++ b/mksh-mkshrc_support.patch @@ -1,6 +1,7 @@ ---- mksh-50/main.c.orig 2014-08-21 18:13:38.072682886 +0200 -+++ mksh-50/main.c 2014-08-21 18:29:13.715976954 +0200 -@@ -591,9 +591,14 @@ +diff -ur mksh.orig/main.c mksh/main.c +--- mksh.orig/main.c 2020-10-01 22:29:21.000000000 +0200 ++++ mksh/main.c 2021-01-18 19:11:59.615180226 +0100 +@@ -695,9 +695,14 @@ if (Flag(FLOGIN)) include(substitute("$HOME/.profile", 0), 0, NULL, true); if (Flag(FTALKING)) { @@ -14,5 +15,5 @@ + include(cp, 0, NULL, true); + } } - } else { - include(MKSH_SUID_PROFILE, 0, NULL, true); + } + if (restricted_shell) { diff --git a/mksh.spec b/mksh.spec index a457ebc..133f830 100644 --- a/mksh.spec +++ b/mksh.spec @@ -4,15 +4,17 @@ %bcond_without static # static version of mksh %bcond_without tests # rtchecks and test.sh checks +%define vernr %(echo %{version} | tr -d 'a-z') + Summary: MirBSD Korn Shell Summary(pl.UTF-8): Powłoka Korna z MirBSD Name: mksh -Version: 58 +Version: 59c Release: 1 License: BSD Group: Applications/Shells Source0: https://www.mirbsd.org/MirOS/dist/mir/mksh/%{name}-R%{version}.tgz -# Source0-md5: 6922a3e2228de2f0e78ff25398ccf8df +# Source0-md5: 99f8ac3c1d8a30b913d509f1969a4aaa Source1: %{name}-mkshrc Source2: get-source.sh Patch0: %{name}-mkshrc_support.patch @@ -86,7 +88,7 @@ W tym pakiecie jest mksh skonsolidowany statycznie. # sed rules instead of patch (needed update for every release) sed -i -e 's|\(#define.*MKSH_VERSION.*\)"|\1 @DISTRO@"|g' sh.h -sed -i -e 's|\(KSH R%{version}.*\)|\1 @DISTRO@|g' check.t +sed -i -e 's|\(KSH R%{vernr}.*\)|\1 @DISTRO@|g' check.t # fill distro sed -i -e 's#@DISTRO@#TLD/Linux#g' check.t sh.h -- 2.46.0