summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/gzip/files/0001-gzip-port-zdiff-zless-to-Busybox.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/gzip/files/0001-gzip-port-zdiff-zless-to-Busybox.patch')
-rw-r--r--meta/recipes-extended/gzip/files/0001-gzip-port-zdiff-zless-to-Busybox.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/meta/recipes-extended/gzip/files/0001-gzip-port-zdiff-zless-to-Busybox.patch b/meta/recipes-extended/gzip/files/0001-gzip-port-zdiff-zless-to-Busybox.patch
new file mode 100644
index 0000000000..20d5a19f76
--- /dev/null
+++ b/meta/recipes-extended/gzip/files/0001-gzip-port-zdiff-zless-to-Busybox.patch
@@ -0,0 +1,59 @@
1From 5f712621829ed81a758077431226a86df37fbc3b Mon Sep 17 00:00:00 2001
2From: Denys Zagorui <denys.zagorui@globallogic.com>
3Date: Thu, 8 Jun 2017 16:05:50 +0300
4Subject: [PATCH] gzip: port zdiff, zless to Busybox
5
6Problem reported by Denys Zagorui (Bug#26088).
7* tests/zdiff: Check that diff uses POSIX-format output.
8* zless.in (less_version): Don't exit merely because 'less -V'
9fails; instead, assume 'less' is compatible with an old version of
10the original 'less'. Busybox 'less -V' fails, but apparently its
11'less' works anyway somehow.
12
13Signed-off-by: Denys Zagorui <denys.zagorui@globallogic.com>
14
15Upstream-Status: Accepted
16---
17 tests/zdiff | 4 +++-
18 zless.in | 2 +-
19 2 files changed, 4 insertions(+), 2 deletions(-)
20
21diff --git a/tests/zdiff b/tests/zdiff
22index 0bb7c7d..9cd4fd4 100755
23--- a/tests/zdiff
24+++ b/tests/zdiff
25@@ -22,7 +22,6 @@
26
27 echo a > a || framework_failure_
28 echo b > b || framework_failure_
29-gzip a b || framework_failure_
30
31 cat <<EOF > exp
32 1c1
33@@ -31,7 +30,10 @@ cat <<EOF > exp
34 > b
35 EOF
36
37+diff a b | diff exp - || skip_ "diff output format is incompatible with POSIX"
38+
39 fail=0
40+gzip a b || fail=1
41 zdiff a.gz b.gz > out 2>&1
42 test $? = 1 || fail=1
43
44diff --git a/zless.in b/zless.in
45index e634af6..9759ae6 100644
46--- a/zless.in
47+++ b/zless.in
48@@ -47,7 +47,7 @@ if test "${LESSMETACHARS+set}" != set; then
49 export LESSMETACHARS
50 fi
51
52-less_version=`less -V` || exit
53+less_version=`less -V 2>/dev/null`
54 case $less_version in
55 less' '45[1-9]* | \
56 less' '4[6-9][0-9]* | \
57--
581.9.1
59