From: Elan Ruusamäe Date: Wed, 14 Jan 2015 15:12:08 +0000 (+0200) Subject: add branch diff to fix "set" output being part of variable X-Git-Tag: auto/th/mksh-50d-4 X-Git-Url: https://git.pld-linux.org/gitweb.cgi?p=packages%2Fmksh.git;a=commitdiff_plain;h=f97693671da33fa15e5a307abd3dfc09a0e73f78 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 ' --- 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@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 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