]> git.pld-linux.org Git - packages/mksh.git/commitdiff
rel 3; drop builtin cat and sleep master auto/th/mksh-59c-3
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 5 Oct 2023 17:14:27 +0000 (19:14 +0200)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 5 Oct 2023 17:14:27 +0000 (19:14 +0200)
Buildin cat and sleep break signal delivery to shell (visible in
timelimit.spec test suite). Upstream already removed these builtins.

drop-builtins.patch [new file with mode: 0644]
mksh.spec

diff --git a/drop-builtins.patch b/drop-builtins.patch
new file mode 100644 (file)
index 0000000..740c3aa
--- /dev/null
@@ -0,0 +1,45 @@
+diff -urN mksh.org/funcs.c mksh/funcs.c
+--- mksh.org/funcs.c   2020-08-27 21:53:11.000000000 +0200
++++ mksh/funcs.c       2023-10-05 19:06:16.456613978 +0200
+@@ -98,7 +98,6 @@
+       {Tsgbreak, c_brkcont},
+       {T__builtin, c_builtin},
+       {Tbuiltin, c_builtin},
+-      {Tbcat, c_cat},
+       {Tcd, c_cd},
+       /* dash compatibility hack */
+       {"chdir", c_cd},
+@@ -152,9 +151,6 @@
+ #ifdef MKSH_PRINTF_BUILTIN
+       {"~printf", c_printf},
+ #endif
+-#if HAVE_SELECT
+-      {"sleep", c_sleep},
+-#endif
+ #ifdef __MirBSD__
+       /* alias to "true" for historical reasons */
+       {"domainname", c_true},
+From 2f8a1b53b98c24c6506afdf1dd272febd49e65d2 Mon Sep 17 00:00:00 2001
+From: tg <tg@mirbsd.org>
+Date: Sun, 24 Jan 2021 19:41:07 +0000
+Subject: [PATCH] fix builtin removal-related fuckup
+
+---
+ check.t | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/check.t b/check.t
+index f22cf367a..c6e25d712 100644
+--- a/check.t
++++ b/check.t
+@@ -150,9 +150,8 @@ name: selftest-direct-builtin-call
+ description:
+       Check that direct builtin calls work
+ stdin:
+-      ln -s "$__progname" cat || cp "$__progname" cat
+       ln -s "$__progname" echo || cp "$__progname" echo
+-      ./echo -c 'echo  foo' | ./cat -u
++      ./echo -c 'echo  foo'
+ expected-stdout:
+       -c echo  foo
+ ---
index e3f103c47ceb1f60e1b916d62af5bceb75e14876..2ee61f353b31269af4c1801e8ddb5518391ee5e1 100644 (file)
--- a/mksh.spec
+++ b/mksh.spec
@@ -10,7 +10,7 @@ Summary:      MirBSD Korn Shell
 Summary(pl.UTF-8):     Powłoka Korna z MirBSD
 Name:          mksh
 Version:       59c
 Summary(pl.UTF-8):     Powłoka Korna z MirBSD
 Name:          mksh
 Version:       59c
-Release:       2
+Release:       3
 License:       BSD
 Group:         Applications/Shells
 Source0:       https://www.mirbsd.org/MirOS/dist/mir/mksh/%{name}-R%{version}.tgz
 License:       BSD
 Group:         Applications/Shells
 Source0:       https://www.mirbsd.org/MirOS/dist/mir/mksh/%{name}-R%{version}.tgz
@@ -19,6 +19,7 @@ Source1:      %{name}-mkshrc
 Source2:       get-source.sh
 Patch0:                %{name}-mkshrc_support.patch
 Patch1:                %{name}-circumflex.patch
 Source2:       get-source.sh
 Patch0:                %{name}-mkshrc_support.patch
 Patch1:                %{name}-circumflex.patch
+Patch2:         drop-builtins.patch
 URL:           https://www.mirbsd.org/mksh.htm
 %if %{with tests}
 BuildRequires: ed
 URL:           https://www.mirbsd.org/mksh.htm
 %if %{with tests}
 BuildRequires: ed
@@ -85,6 +86,9 @@ W tym pakiecie jest mksh skonsolidowany statycznie.
 
 %patch0 -p1
 %patch1 -p1
 
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
+
+sed -i -e 's|fgrep|grep -F|g' check.t
 
 # sed rules instead of patch (needed update for every release)
 sed -i -e 's|\(#define.*MKSH_VERSION.*\)"|\1 @DISTRO@"|g' sh.h
 
 # sed rules instead of patch (needed update for every release)
 sed -i -e 's|\(#define.*MKSH_VERSION.*\)"|\1 @DISTRO@"|g' sh.h
This page took 0.134411 seconds and 4 git commands to generate.