From 09d740ccf3c28a58c70d11817c6baad99e3e0e81 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 17 Feb 2010 01:10:18 +0000 Subject: [PATCH 1/5] Initialize branch F-13 for diffutils --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..baa94ef --- /dev/null +++ b/branch @@ -0,0 +1 @@ +F-13 From 2bf8e4203ea42f671f09f8c1c6bcdbdf9889c126 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Wed, 3 Mar 2010 15:03:04 +0000 Subject: [PATCH 2/5] - Use upstream man pages. - Ship COPYING file. --- diffutils.spec | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/diffutils.spec b/diffutils.spec index e669483..be8a6df 100644 --- a/diffutils.spec +++ b/diffutils.spec @@ -1,14 +1,10 @@ Summary: A GNU collection of diff utilities Name: diffutils Version: 2.8.1 -Release: 25%{?dist} +Release: 26%{?dist} Group: Applications/Text URL: http://www.gnu.org/software/diffutils/diffutils.html Source: ftp://ftp.gnu.org/gnu/diffutils/diffutils-%{version}.tar.gz -Source1: cmp.1 -Source2: diff.1 -Source3: diff3.1 -Source4: sdiff.1 Patch0: diffutils-2.8.4-i18n.patch Patch1: diffutils-2.8.1-badc.patch Patch2: diffutils-sdiff.patch @@ -46,15 +42,6 @@ make PR_PROGRAM=%{_bindir}/pr rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install -( cd $RPM_BUILD_ROOT - gzip -9nf .%{_infodir}/diff* - mkdir -p .%{_mandir}/man1 - for manpage in %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} - do - install -m 0644 ${manpage} .%{_mandir}/man1 - done -) - rm -f $RPM_BUILD_ROOT%{_infodir}/dir %find_lang %{name} @@ -75,12 +62,16 @@ rm -rf $RPM_BUILD_ROOT %files -f %{name}.lang %defattr(-,root,root) -%doc NEWS README +%doc COPYING NEWS README %{_bindir}/* %{_mandir}/*/* %{_infodir}/diff.info*gz %changelog +* Wed Mar 3 2010 Tim Waugh - 2.8.1-26 +- Use upstream man pages. +- Ship COPYING file. + * Tue Aug 11 2009 Tim Waugh 2.8.1-25 - Only try to install the info file if it exists so that package installation does not fail with --excludedocs (bug #515919). From b3833d561a2d05bfd0eabc029bd67e56dbdfbe5a Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Wed, 3 Mar 2010 15:08:33 +0000 Subject: [PATCH 3/5] - Added comments for all patches. --- diffutils.spec | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/diffutils.spec b/diffutils.spec index be8a6df..1ce011f 100644 --- a/diffutils.spec +++ b/diffutils.spec @@ -1,7 +1,7 @@ Summary: A GNU collection of diff utilities Name: diffutils Version: 2.8.1 -Release: 26%{?dist} +Release: 27%{?dist} Group: Applications/Text URL: http://www.gnu.org/software/diffutils/diffutils.html Source: ftp://ftp.gnu.org/gnu/diffutils/diffutils-%{version}.tar.gz @@ -29,9 +29,16 @@ Install diffutils if you need to compare text files. %prep %setup -q +# Multibyte support. %patch0 -p1 -b .i18n + +# Unintentional use of '|' instead of '||'. %patch1 -p1 -b .badc + +# Fixed sdiff exit code handling (bug #152967). %patch2 -p1 -b .sdiff + +# Fixed 'sdiff -E' (bug #484892). %patch3 -p1 -b .sdiff-E %build @@ -68,6 +75,9 @@ rm -rf $RPM_BUILD_ROOT %{_infodir}/diff.info*gz %changelog +* Wed Mar 3 2010 Tim Waugh - 2.8.1-27 +- Added comments for all patches. + * Wed Mar 3 2010 Tim Waugh - 2.8.1-26 - Use upstream man pages. - Ship COPYING file. From c5929c13a0379e215de4e616643c49062f2821d8 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Wed, 21 Apr 2010 10:23:50 +0000 Subject: [PATCH 4/5] - Build requires help2man (bug #577325). Fixes empty diff man page. --- diffutils.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/diffutils.spec b/diffutils.spec index 1ce011f..5e61fda 100644 --- a/diffutils.spec +++ b/diffutils.spec @@ -1,7 +1,7 @@ Summary: A GNU collection of diff utilities Name: diffutils Version: 2.8.1 -Release: 27%{?dist} +Release: 28%{?dist} Group: Applications/Text URL: http://www.gnu.org/software/diffutils/diffutils.html Source: ftp://ftp.gnu.org/gnu/diffutils/diffutils-%{version}.tar.gz @@ -13,6 +13,7 @@ License: GPLv2+ Requires(post): /sbin/install-info Requires(preun): /sbin/install-info BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: help2man %description Diffutils includes four utilities: diff, cmp, diff3 and sdiff. Diff @@ -75,6 +76,9 @@ rm -rf $RPM_BUILD_ROOT %{_infodir}/diff.info*gz %changelog +* Wed Apr 21 2010 Tim Waugh - 2.8.1-28 +- Build requires help2man (bug #577325). Fixes empty diff man page. + * Wed Mar 3 2010 Tim Waugh - 2.8.1-27 - Added comments for all patches. From f0bbe73c6bf98b52286d8e6108b282d9bafc6e1e Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Fri, 25 Jun 2010 14:17:51 +0000 Subject: [PATCH 5/5] - For 'cmp -s', compare file sizes only if both non-zero (bug #563618). --- diffutils-cmp-s-empty.patch | 20 ++++++++++++++++++++ diffutils.spec | 9 ++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 diffutils-cmp-s-empty.patch diff --git a/diffutils-cmp-s-empty.patch b/diffutils-cmp-s-empty.patch new file mode 100644 index 0000000..bc1c6b4 --- /dev/null +++ b/diffutils-cmp-s-empty.patch @@ -0,0 +1,20 @@ +diff -up diffutils-2.8.1/src/cmp.c.cmp-s-empty diffutils-2.8.1/src/cmp.c +--- diffutils-2.8.1/src/cmp.c.cmp-s-empty 2002-04-05 21:37:31.000000000 +0100 ++++ diffutils-2.8.1/src/cmp.c 2010-06-25 14:56:08.464802321 +0100 +@@ -316,12 +316,15 @@ main (int argc, char **argv) + + /* If only a return code is needed, + and if both input descriptors are associated with plain files, ++ and if both files are larger than 0 bytes (procfs files are always 0), + conclude that the files differ if they have different sizes + and if more bytes will be compared than are in the smaller file. */ + + if (comparison_type == type_status + && S_ISREG (stat_buf[0].st_mode) +- && S_ISREG (stat_buf[1].st_mode)) ++ && S_ISREG (stat_buf[1].st_mode) ++ && stat_buf[0].st_size > 0 ++ && stat_buf[1].st_size > 0) + { + off_t s0 = stat_buf[0].st_size - file_position (0); + off_t s1 = stat_buf[1].st_size - file_position (1); diff --git a/diffutils.spec b/diffutils.spec index 5e61fda..a935dbc 100644 --- a/diffutils.spec +++ b/diffutils.spec @@ -1,7 +1,7 @@ Summary: A GNU collection of diff utilities Name: diffutils Version: 2.8.1 -Release: 28%{?dist} +Release: 29%{?dist} Group: Applications/Text URL: http://www.gnu.org/software/diffutils/diffutils.html Source: ftp://ftp.gnu.org/gnu/diffutils/diffutils-%{version}.tar.gz @@ -9,6 +9,7 @@ Patch0: diffutils-2.8.4-i18n.patch Patch1: diffutils-2.8.1-badc.patch Patch2: diffutils-sdiff.patch Patch3: diffutils-sdiff-E.patch +Patch4: diffutils-cmp-s-empty.patch License: GPLv2+ Requires(post): /sbin/install-info Requires(preun): /sbin/install-info @@ -42,6 +43,9 @@ Install diffutils if you need to compare text files. # Fixed 'sdiff -E' (bug #484892). %patch3 -p1 -b .sdiff-E +# For 'cmp -s', compare file sizes only if both non-zero (bug #563618). +%patch4 -p1 -b .cmp-s-empty + %build %configure make PR_PROGRAM=%{_bindir}/pr @@ -76,6 +80,9 @@ rm -rf $RPM_BUILD_ROOT %{_infodir}/diff.info*gz %changelog +* Fri Jun 25 2010 Tim Waugh 2.8.1-29 +- For 'cmp -s', compare file sizes only if both non-zero (bug #563618). + * Wed Apr 21 2010 Tim Waugh - 2.8.1-28 - Build requires help2man (bug #577325). Fixes empty diff man page.