From: Marcin Krol Date: Mon, 9 Apr 2018 12:19:50 +0000 (+0000) Subject: - merged 56c from PLD X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=d7634fca1c726c672daab14db9e474a97594bfe1;p=packages%2Fmksh.git - merged 56c from PLD --- diff --git a/mksh-circumflex.patch b/mksh-circumflex.patch index 97ddc42..36ad817 100644 --- a/mksh-circumflex.patch +++ b/mksh-circumflex.patch @@ -1,46 +1,46 @@ -diff -urp mksh.orig/check.t mksh/check.t ---- mksh.orig/check.t 2016-08-12 16:48:28.000000000 +0000 -+++ mksh/check.t 2016-08-18 06:51:31.069554000 +0000 -@@ -2274,7 +2274,7 @@ expected-stdout: - cbc - -bc cbc - abc bbc -- ^bc abc bbc -+ !bc -bc ^bc cbc - !bc -bc ^bc cbc - --- - name: glob-range-2 -diff -urp mksh.orig/eval.c mksh/eval.c ---- mksh.orig/eval.c 2016-08-01 21:38:27.000000000 +0000 -+++ mksh/eval.c 2016-08-18 06:51:31.063554000 +0000 -@@ -972,6 +972,7 @@ expand( - switch (c) { - case '[': - case '!': -+ case NOT2: - case '-': - case ']': +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 @@ + switch (ord(c)) { + case ORD('['): + case ORD('!'): ++ case ORD(NOT2): + case ORD('-'): + case ORD(']'): /* -diff -urp mksh.orig/misc.c mksh/misc.c ---- mksh.orig/misc.c 2016-08-01 18:43:08.000000000 +0000 -+++ mksh/misc.c 2016-08-18 06:51:31.064554000 +0000 -@@ -902,7 +902,7 @@ gmatch_cclass(const unsigned char *p, un - bool notp, found = false; - const unsigned char *orig_p = p; +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 @@ + char *subp; -- if ((notp = tobool(ISMAGIC(*p) && *++p == '!'))) -+ if ((notp = tobool(ISMAGIC(*p) && (*++p == '!' || *p == NOT2)))) - p++; - do { - c = *p++; -diff -urp mksh.orig/sh.h mksh/sh.h ---- mksh.orig/sh.h 2016-08-12 16:48:31.000000000 +0000 -+++ mksh/sh.h 2016-08-18 06:51:31.066554000 +0000 -@@ -501,6 +501,7 @@ extern int __cdecl setegid(gid_t); + /* check for negation */ +- if (ISMAGIC(p[0]) && ord(p[1]) == ORD('!')) { ++ if (ISMAGIC(p[0]) && (ord(p[1]) == ORD('!') || ord(p[1]) == ORD(NOT2))) { + 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 @@ */ - #define MAGIC (7) /* prefix for *?[!{,} during expand */ - #define ISMAGIC(c) ((unsigned char)(c) == MAGIC) + #define MAGIC KSH_BEL /* prefix for *?[!{,} during expand */ + #define ISMAGIC(c) (ord(c) == ORD(MAGIC)) +#define NOT2 '^' 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 + --- diff --git a/mksh-mkshrc_support.patch b/mksh-mkshrc_support.patch index 38baf33..3cde184 100644 --- a/mksh-mkshrc_support.patch +++ b/mksh-mkshrc_support.patch @@ -1,13 +1,11 @@ -diff -urp mksh.orig/main.c mksh/main.c ---- mksh.orig/main.c 2016-08-04 20:52:01.000000000 +0000 -+++ mksh/main.c 2016-08-18 06:47:50.115554000 +0000 -@@ -611,10 +611,14 @@ main_init(int argc, const char *argv[], +--- 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 @@ if (Flag(FLOGIN)) include(substitute("$HOME/.profile", 0), 0, NULL, true); if (Flag(FTALKING)) { -- cp = substitute(substitute("${ENV:-" MKSHRC_PATH "}", -- 0), DOTILDE); -+ cp = substitute(substitute("${ENV}", 0), DOTILDE); +- cp = substitute("${ENV:-" MKSHRC_PATH "}", DOTILDE); ++ cp = substitute("${ENV}", DOTILDE); if (cp[0] != '\0') include(cp, 0, NULL, true); + else { diff --git a/mksh.spec b/mksh.spec index 2565c5e..513a655 100644 --- a/mksh.spec +++ b/mksh.spec @@ -1,18 +1,20 @@ # # Conditional build: +%bcond_with lto # enable link time optimisations (breaks tests) %bcond_without static # static version of mksh %bcond_without tests # rtchecks and test.sh checks Summary: MirBSD Korn Shell Summary(pl.UTF-8): Powłoka Korna z MirBSD Name: mksh -Version: 54 +Version: 56c Release: 1 License: BSD Group: Applications/Shells -Source0: http://www.mirbsd.org/MirOS/dist/mir/mksh/%{name}-R%{version}.tgz -# Source0-md5: be0a6fb93b4a5f927bcc1893bb6692f8 +Source0: https://www.mirbsd.org/MirOS/dist/mir/mksh/%{name}-R%{version}.tgz +# Source0-md5: 4799a9ac6d55871d79ba66713d928663 Source1: %{name}-mkshrc +Source2: get-source.sh Patch0: %{name}-mkshrc_support.patch Patch1: %{name}-circumflex.patch URL: https://www.mirbsd.org/mksh.htm @@ -77,7 +79,7 @@ W tym pakiecie jest mksh skonsolidowany statycznie. %prep %setup -qc -mv mksh/* .; rmdir mksh +%{__mv} mksh/* .; rmdir mksh %patch0 -p1 %patch1 -p1 @@ -134,7 +136,7 @@ CC="%{__cc}" \ CFLAGS="%{rpmcflags} -DMKSH_GCC55009" \ LDFLAGS="%{rpmldflags}" \ CPPFLAGS="%{rpmcppflags}" \ -sh ./Build.sh -Q -r -j -c lto +sh ./Build.sh -Q -r -j %{?with_lto:-c lto} # skip some tests if not on terminal if ! tty -s; then @@ -157,7 +159,7 @@ CC="%{__cc}" \ CFLAGS="%{rpmcflags} -DMKSH_GCC55009" \ LDFLAGS="%{rpmldflags} -static" \ CPPFLAGS="%{rpmcppflags}" \ -sh ./Build.sh -Q -r -j -c lto +sh ./Build.sh -Q -r -j %{?with_lto:-c lto} %if %{with tests} ./test.sh -v $skip_tests