Compare commits
No commits in common. "c8" and "imports/c8-beta/diffutils-3.6-5.el8" have entirely different histories.
c8
...
imports/c8
@ -1,45 +0,0 @@
|
|||||||
commit ffd63aedad3c0eb08ebb27103e5f242f8732dc0c
|
|
||||||
Author: Paul Eggert <eggert@cs.ucla.edu>
|
|
||||||
Date: Tue Jul 24 10:18:28 2018 -0700
|
|
||||||
|
|
||||||
cmp: fix bug in -b diagnostic
|
|
||||||
|
|
||||||
Problem reported by mancha (Bug#32249).
|
|
||||||
* src/cmp.c (count_newlines): Restore old value of sentinel.
|
|
||||||
* tests/cmp: Test for the bug.
|
|
||||||
|
|
||||||
diff --git a/src/cmp.c b/src/cmp.c
|
|
||||||
index 04638e3..2811392 100644
|
|
||||||
--- a/src/cmp.c
|
|
||||||
+++ b/src/cmp.c
|
|
||||||
@@ -639,9 +639,11 @@ count_newlines (char *buf, size_t bufsize)
|
|
||||||
size_t count = 0;
|
|
||||||
char *p;
|
|
||||||
char *lim = buf + bufsize;
|
|
||||||
+ char ch = *lim;
|
|
||||||
*lim = '\n';
|
|
||||||
for (p = buf; (p = rawmemchr (p, '\n')) != lim; p++)
|
|
||||||
count++;
|
|
||||||
+ *lim = ch;
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/tests/cmp b/tests/cmp
|
|
||||||
index 160c1ea..ca0fe5e 100755
|
|
||||||
--- a/tests/cmp
|
|
||||||
+++ b/tests/cmp
|
|
||||||
@@ -208,4 +208,14 @@ done >out1
|
|
||||||
|
|
||||||
compare exp1 out1 || fail=1
|
|
||||||
|
|
||||||
+printf 'bad\n' >bad
|
|
||||||
+printf 'bug\n' >bug
|
|
||||||
+echo LC_ALL=C cmp -b bad bug
|
|
||||||
+LC_ALL=C cmp -b bad bug
|
|
||||||
+test $? -eq 1 || fail=1
|
|
||||||
+case `LC_ALL=C cmp -b bad bug` in
|
|
||||||
+ 'bad bug differ: byte 2, line 1 is '*' a '*' u') ;;
|
|
||||||
+ *) echo 'expected cmp -b to report a and u'; fail=1;;
|
|
||||||
+esac
|
|
||||||
+
|
|
||||||
Exit $fail
|
|
||||||
@ -1,14 +1,13 @@
|
|||||||
Summary: A GNU collection of diff utilities
|
Summary: A GNU collection of diff utilities
|
||||||
Name: diffutils
|
Name: diffutils
|
||||||
Version: 3.6
|
Version: 3.6
|
||||||
Release: 6%{?dist}
|
Release: 5%{?dist}
|
||||||
Group: Applications/Text
|
Group: Applications/Text
|
||||||
URL: http://www.gnu.org/software/diffutils/diffutils.html
|
URL: http://www.gnu.org/software/diffutils/diffutils.html
|
||||||
Source: ftp://ftp.gnu.org/gnu/diffutils/diffutils-%{version}.tar.xz
|
Source: ftp://ftp.gnu.org/gnu/diffutils/diffutils-%{version}.tar.xz
|
||||||
Patch1: diffutils-cmp-s-empty.patch
|
Patch1: diffutils-cmp-s-empty.patch
|
||||||
Patch2: diffutils-i18n.patch
|
Patch2: diffutils-i18n.patch
|
||||||
Patch3: diffutils-3.6-covscan.patch
|
Patch3: diffutils-3.6-covscan.patch
|
||||||
Patch4: diffutils-3.6-shows_incorrect_data.patch
|
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
Requires(post): info
|
Requires(post): info
|
||||||
Requires(preun): info
|
Requires(preun): info
|
||||||
@ -35,13 +34,9 @@ Install diffutils if you need to compare text files.
|
|||||||
%patch1 -p1 -b .cmp-s-empty
|
%patch1 -p1 -b .cmp-s-empty
|
||||||
|
|
||||||
%patch2 -p1 -b .i18n
|
%patch2 -p1 -b .i18n
|
||||||
|
|
||||||
# covscan issues
|
# covscan issues
|
||||||
%patch3 -p1 -b .covscan
|
%patch3 -p1 -b .covscan
|
||||||
|
|
||||||
# bz#1732960, cmp -b shows incorrect data
|
|
||||||
%patch4 -p1 -b .shows_incorrect_data
|
|
||||||
|
|
||||||
# Run autoreconf for aarch64 support (bug #925256).
|
# Run autoreconf for aarch64 support (bug #925256).
|
||||||
autoreconf
|
autoreconf
|
||||||
|
|
||||||
@ -83,9 +78,6 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_infodir}/diffutils.info*gz
|
%{_infodir}/diffutils.info*gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Tue Nov 19 2019 Than Ngo <than@redhat.com> - 3.6-6
|
|
||||||
- Resolves: #1732960 - cmp -b shows incorrect data
|
|
||||||
|
|
||||||
* Mon Aug 13 2018 Than Ngo <than@redhat.com> - 3.6-5
|
* Mon Aug 13 2018 Than Ngo <than@redhat.com> - 3.6-5
|
||||||
- Resolves: #1606949, covscan issues
|
- Resolves: #1606949, covscan issues
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user