[packages/mksh] add branch diff to fix "set" output being part of variable

glen glen at pld-linux.org
Wed Jan 14 16:13:04 CET 2015


commit f97693671da33fa15e5a307abd3dfc09a0e73f78
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Wed Jan 14 17:12:08 2015 +0200

    add branch diff to fix "set" output being part of variable
    
    reproducer:
    http://carme.pld-linux.org/~glen/mksh-bug.sh
    
    16:03:36 mira|AO> local x="${y:-z}" where y/z are empty is normally 'local x=' but in some buggy versions it was just 'local '

 get-source.sh | 28 ++++++++++++++++++++++++++++
 mksh.spec     |  6 +++++-
 2 files changed, 33 insertions(+), 1 deletion(-)
---
diff --git a/mksh.spec b/mksh.spec
index 88d8edf..2948aa8 100644
--- a/mksh.spec
+++ b/mksh.spec
@@ -7,12 +7,15 @@ Summary:	MirBSD Korn Shell
 Summary(pl.UTF-8):	Powłoka Korna z MirBSD
 Name:		mksh
 Version:	50d
-Release:	3
+Release:	4
 License:	BSD
 Group:		Applications/Shells
 Source0:	http://www.mirbsd.org/MirOS/dist/mir/mksh/%{name}-R%{version}.tgz
 # Source0-md5:	1c3882c07a760b23df1ad94ad0b4ed2e
 Source1:	%{name}-mkshrc
+Source2:	get-source.sh
+Patch100:	branch.diff
+# Patch100-md5:	224395dd29f7cd25ddcf7135f9e0e6fe
 Patch0:		%{name}-mkshrc_support.patch
 Patch1:		%{name}-circumflex.patch
 Patch2:		%{name}-no_stop_alias.patch
@@ -81,6 +84,7 @@ W tym pakiecie jest mksh skonsolidowany statycznie.
 %setup -qcT
 gzip -dc %{SOURCE0} | cpio -mid
 mv mksh/* .; rmdir mksh
+%patch100 -p3
 
 %patch0 -p1
 %patch1 -p1
diff --git a/get-source.sh b/get-source.sh
new file mode 100755
index 0000000..07491f1
--- /dev/null
+++ b/get-source.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+set -e
+
+CVSROOT=_anoncvs at anoncvs.mirbsd.org:/cvs
+module=mksh
+tag=mksh-R50d
+branch=mksh-R50stable
+out=branch.diff
+
+d=$-
+filter() {
+	set -$d
+	# remove revno's for smaller diffs
+	sed -e 's,^\([-+]\{3\} .*\)\t(revision [0-9]\+)$,\1,'
+}
+
+echo >&2 "Running diff: $tag -> $branch"
+
+cvs -qz8 -d "$CVSROOT" rdiff -u -r"$tag" -r"$branch" "$module" > $out.tmp
+
+if cmp -s $out{,.tmp}; then
+	echo >&2 "No new diffs..."
+	rm -f $out.tmp
+	exit 0
+fi
+mv -f $out{.tmp,}
+
+./dropin $out
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list