Compare commits

...

5 commits

Author SHA1 Message Date
Tim Waugh
f0bbe73c6b - For 'cmp -s', compare file sizes only if both non-zero (bug #563618). 2010-06-25 14:17:51 +00:00
Tim Waugh
c5929c13a0 - Build requires help2man (bug #577325). Fixes empty diff man page. 2010-04-21 10:23:50 +00:00
Tim Waugh
b3833d561a - Added comments for all patches. 2010-03-03 15:08:33 +00:00
Tim Waugh
2bf8e4203e - Use upstream man pages.
- Ship COPYING file.
2010-03-03 15:03:04 +00:00
Jesse Keating
09d740ccf3 Initialize branch F-13 for diffutils 2010-02-17 01:10:18 +00:00
3 changed files with 48 additions and 15 deletions

1
branch Normal file
View file

@ -0,0 +1 @@
F-13

View file

@ -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);

View file

@ -1,22 +1,20 @@
Summary: A GNU collection of diff utilities Summary: A GNU collection of diff utilities
Name: diffutils Name: diffutils
Version: 2.8.1 Version: 2.8.1
Release: 25%{?dist} Release: 29%{?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.gz 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 Patch0: diffutils-2.8.4-i18n.patch
Patch1: diffutils-2.8.1-badc.patch Patch1: diffutils-2.8.1-badc.patch
Patch2: diffutils-sdiff.patch Patch2: diffutils-sdiff.patch
Patch3: diffutils-sdiff-E.patch Patch3: diffutils-sdiff-E.patch
Patch4: diffutils-cmp-s-empty.patch
License: GPLv2+ License: GPLv2+
Requires(post): /sbin/install-info Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info Requires(preun): /sbin/install-info
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: help2man
%description %description
Diffutils includes four utilities: diff, cmp, diff3 and sdiff. Diff Diffutils includes four utilities: diff, cmp, diff3 and sdiff. Diff
@ -33,11 +31,21 @@ Install diffutils if you need to compare text files.
%prep %prep
%setup -q %setup -q
# Multibyte support.
%patch0 -p1 -b .i18n %patch0 -p1 -b .i18n
# Unintentional use of '|' instead of '||'.
%patch1 -p1 -b .badc %patch1 -p1 -b .badc
# Fixed sdiff exit code handling (bug #152967).
%patch2 -p1 -b .sdiff %patch2 -p1 -b .sdiff
# Fixed 'sdiff -E' (bug #484892).
%patch3 -p1 -b .sdiff-E %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 %build
%configure %configure
make PR_PROGRAM=%{_bindir}/pr make PR_PROGRAM=%{_bindir}/pr
@ -46,15 +54,6 @@ make PR_PROGRAM=%{_bindir}/pr
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install 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 rm -f $RPM_BUILD_ROOT%{_infodir}/dir
%find_lang %{name} %find_lang %{name}
@ -75,12 +74,25 @@ rm -rf $RPM_BUILD_ROOT
%files -f %{name}.lang %files -f %{name}.lang
%defattr(-,root,root) %defattr(-,root,root)
%doc NEWS README %doc COPYING NEWS README
%{_bindir}/* %{_bindir}/*
%{_mandir}/*/* %{_mandir}/*/*
%{_infodir}/diff.info*gz %{_infodir}/diff.info*gz
%changelog %changelog
* Fri Jun 25 2010 Tim Waugh <twaugh@redhat.com> 2.8.1-29
- For 'cmp -s', compare file sizes only if both non-zero (bug #563618).
* Wed Apr 21 2010 Tim Waugh <twaugh@redhat.com> - 2.8.1-28
- Build requires help2man (bug #577325). Fixes empty diff man page.
* Wed Mar 3 2010 Tim Waugh <twaugh@redhat.com> - 2.8.1-27
- Added comments for all patches.
* Wed Mar 3 2010 Tim Waugh <twaugh@redhat.com> - 2.8.1-26
- Use upstream man pages.
- Ship COPYING file.
* Tue Aug 11 2009 Tim Waugh <twaugh@redhat.com> 2.8.1-25 * Tue Aug 11 2009 Tim Waugh <twaugh@redhat.com> 2.8.1-25
- Only try to install the info file if it exists so that package - Only try to install the info file if it exists so that package
installation does not fail with --excludedocs (bug #515919). installation does not fail with --excludedocs (bug #515919).