[packages/mksh] rel 3; drop builtin cat and sleep

arekm arekm at pld-linux.org
Thu Oct 5 19:39:29 CEST 2023


commit e920f879d091f1fd6339fd0217c4e0cc69a12344
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Thu Oct 5 19:14:27 2023 +0200

    rel 3; drop builtin cat and sleep
    
    Buildin cat and sleep break signal delivery to shell (visible in
    timelimit.spec test suite). Upstream already removed these builtins.

 drop-builtins.patch | 45 +++++++++++++++++++++++++++++++++++++++++++++
 mksh.spec           |  6 +++++-
 2 files changed, 50 insertions(+), 1 deletion(-)
---
diff --git a/mksh.spec b/mksh.spec
index e3f103c..2ee61f3 100644
--- 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
-Release:	2
+Release:	3
 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
+Patch2:         drop-builtins.patch
 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
+%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
diff --git a/drop-builtins.patch b/drop-builtins.patch
new file mode 100644
index 0000000..740c3aa
--- /dev/null
+++ b/drop-builtins.patch
@@ -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 at 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
+ ---
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mksh.git/commitdiff/e920f879d091f1fd6339fd0217c4e0cc69a12344



More information about the pld-cvs-commit mailing list