forked from pool/diffutils
This commit is contained in:
commit
668135946f
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
164
cmp-eof-dev-null.diff
Normal file
164
cmp-eof-dev-null.diff
Normal file
@ -0,0 +1,164 @@
|
||||
2006-05-09 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* src/cmp.c (cmp): The previous fix wasn't quite right either, as
|
||||
it mishandled 'cmp A B >/dev/null' when A is shorter than B and
|
||||
differs before A's end-of-file, by outputting a bogus EOF message.
|
||||
Also, it was inefficient if A and B were large.
|
||||
|
||||
2006-05-07 Jim Meyering <jim@meyering.net> (tiny change)
|
||||
|
||||
Fix bug introduced in 2006-03-09 change:
|
||||
cmp always exits successfully, when stdout is redirected to /dev/null.
|
||||
* src/cmp.c (cmp): When there's a difference, arrange to return nonzero
|
||||
also when comparison_type is the new (from 2006-03-09) type_no_stdout.
|
||||
|
||||
2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* src/cmp.c (type_no_stdout): New constant.
|
||||
(main): Use it to avoid bug when the "EOF on foo" message is
|
||||
generated and stdout is /dev/null.
|
||||
Problem reported by Vincent Lefevre (Debian bug 356083).
|
||||
|
||||
Index: cmp.c
|
||||
===================================================================
|
||||
RCS file: /sources/diffutils/diffutils/src/cmp.c,v
|
||||
retrieving revision 1.39
|
||||
retrieving revision 1.40
|
||||
diff -u -a -p -u -p -a -r1.39 -r1.40
|
||||
--- cmp.c 5 Jan 2006 07:23:55 -0000 1.39
|
||||
+++ cmp.c 9 Mar 2006 20:38:11 -0000 1.40
|
||||
@@ -78,6 +78,7 @@ static enum comparison_type
|
||||
{
|
||||
type_first_diff, /* Print the first difference. */
|
||||
type_all_diffs, /* Print all differences. */
|
||||
+ type_no_stdout, /* Do not output to stdout; only stderr. */
|
||||
type_status /* Exit status only. */
|
||||
} comparison_type;
|
||||
|
||||
@@ -317,7 +318,12 @@ main (int argc, char **argv)
|
||||
if (fstat (STDOUT_FILENO, &outstat) == 0
|
||||
&& stat (NULL_DEVICE, &nullstat) == 0
|
||||
&& 0 < same_file (&outstat, &nullstat))
|
||||
- comparison_type = type_status;
|
||||
+ comparison_type =
|
||||
+ ((fstat (STDERR_FILENO, &outstat) == 0
|
||||
+ ? 0 < same_file (&outstat, &nullstat)
|
||||
+ : errno == EBADF)
|
||||
+ ? type_status
|
||||
+ : type_no_stdout);
|
||||
}
|
||||
|
||||
/* If only a return code is needed,
|
||||
@@ -356,7 +362,7 @@ main (int argc, char **argv)
|
||||
for (f = 0; f < 2; f++)
|
||||
if (close (file_desc[f]) != 0)
|
||||
error (EXIT_TROUBLE, errno, "%s", file[f]);
|
||||
- if (exit_status != 0 && comparison_type != type_status)
|
||||
+ if (exit_status != EXIT_SUCCESS && comparison_type < type_no_stdout)
|
||||
check_stdout ();
|
||||
exit (exit_status);
|
||||
return exit_status;
|
||||
@@ -536,6 +542,9 @@ cmp (void)
|
||||
while (first_diff < smaller);
|
||||
ret = EXIT_FAILURE;
|
||||
break;
|
||||
+
|
||||
+ case type_no_stdout:
|
||||
+ break;
|
||||
}
|
||||
}
|
||||
|
||||
Index: cmp.c
|
||||
===================================================================
|
||||
RCS file: /sources/diffutils/diffutils/src/cmp.c,v
|
||||
retrieving revision 1.40
|
||||
retrieving revision 1.41
|
||||
diff -u -a -p -u -p -a -r1.40 -r1.41
|
||||
--- cmp.c 9 Mar 2006 20:38:11 -0000 1.40
|
||||
+++ cmp.c 9 Mar 2006 20:54:39 -0000 1.41
|
||||
@@ -318,12 +318,7 @@ main (int argc, char **argv)
|
||||
if (fstat (STDOUT_FILENO, &outstat) == 0
|
||||
&& stat (NULL_DEVICE, &nullstat) == 0
|
||||
&& 0 < same_file (&outstat, &nullstat))
|
||||
- comparison_type =
|
||||
- ((fstat (STDERR_FILENO, &outstat) == 0
|
||||
- ? 0 < same_file (&outstat, &nullstat)
|
||||
- : errno == EBADF)
|
||||
- ? type_status
|
||||
- : type_no_stdout);
|
||||
+ comparison_type = type_no_stdout;
|
||||
}
|
||||
|
||||
/* If only a return code is needed,
|
||||
Index: cmp.c
|
||||
===================================================================
|
||||
RCS file: /sources/diffutils/diffutils/src/cmp.c,v
|
||||
retrieving revision 1.43
|
||||
retrieving revision 1.44
|
||||
diff -u -a -p -u -p -a -r1.43 -r1.44
|
||||
--- cmp.c 13 Mar 2006 19:11:17 -0000 1.43
|
||||
+++ cmp.c 8 May 2006 01:41:04 -0000 1.44
|
||||
@@ -536,10 +536,10 @@ cmp (void)
|
||||
first_diff++;
|
||||
}
|
||||
while (first_diff < smaller);
|
||||
- ret = EXIT_FAILURE;
|
||||
- break;
|
||||
|
||||
+ /* Fall through. */
|
||||
case type_no_stdout:
|
||||
+ ret = EXIT_FAILURE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
Index: cmp.c
|
||||
===================================================================
|
||||
RCS file: /sources/diffutils/diffutils/src/cmp.c,v
|
||||
retrieving revision 1.44
|
||||
retrieving revision 1.45
|
||||
diff -u -a -p -u -p -a -r1.44 -r1.45
|
||||
--- cmp.c 8 May 2006 01:41:04 -0000 1.44
|
||||
+++ cmp.c 9 May 2006 22:57:20 -0000 1.45
|
||||
@@ -382,7 +382,7 @@ cmp (void)
|
||||
word *buffer1 = buffer[1];
|
||||
char *buf0 = (char *) buffer0;
|
||||
char *buf1 = (char *) buffer1;
|
||||
- int ret = EXIT_SUCCESS;
|
||||
+ int differing = 0;
|
||||
int f;
|
||||
int offset_width IF_LINT (= 0);
|
||||
|
||||
@@ -536,17 +536,18 @@ cmp (void)
|
||||
first_diff++;
|
||||
}
|
||||
while (first_diff < smaller);
|
||||
+ differing = -1;
|
||||
+ break;
|
||||
|
||||
- /* Fall through. */
|
||||
case type_no_stdout:
|
||||
- ret = EXIT_FAILURE;
|
||||
+ differing = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (read0 != read1)
|
||||
{
|
||||
- if (comparison_type != type_status)
|
||||
+ if (differing <= 0 && comparison_type != type_status)
|
||||
{
|
||||
/* See POSIX 1003.1-2001 for this format. */
|
||||
fprintf (stderr, _("cmp: EOF on %s\n"), file[read1 < read0]);
|
||||
@@ -555,9 +556,9 @@ cmp (void)
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
- while (read0 == buf_size);
|
||||
+ while (differing <= 0 && read0 == buf_size);
|
||||
|
||||
- return ret;
|
||||
+ return differing == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* Compare two blocks of memory P0 and P1 until they differ,
|
3
diffutils-2.8.1-i18n-0.2.patch.gz
Normal file
3
diffutils-2.8.1-i18n-0.2.patch.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9289be62b118f41757d3ac267c6fbe4678717dfb26240edfdd85a5b5ddff4029
|
||||
size 4450
|
3
diffutils-2.8.7.tar.gz
Normal file
3
diffutils-2.8.7.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:53d9c10830ac322c00dfcccf60d961014e767da86d2c802ccc5cbad7e7aea07c
|
||||
size 1057977
|
154
diffutils.changes
Normal file
154
diffutils.changes
Normal file
@ -0,0 +1,154 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 27 17:15:34 CET 2006 - rguenther@suse.de
|
||||
|
||||
- removed help2man BuildRequires again. Instead prevent patches
|
||||
from invalidating the shipped manpages.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 5 18:15:13 CEST 2006 - mjancar@suse.cz
|
||||
|
||||
- readd help2man to BuildRequires (needed to build manpages)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 11 15:15:50 CEST 2006 - schwab@suse.de
|
||||
|
||||
- Update cmp patch [#198332].
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 24 18:05:18 CEST 2006 - rguenther@suse.de
|
||||
|
||||
- diffutils does not need help2man.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 10 22:01:21 CET 2006 - schwab@suse.de
|
||||
|
||||
- Fix output of EOF message when stdout is redirected to /dev/null.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 25 21:30:08 CET 2006 - mls@suse.de
|
||||
|
||||
- converted neededforbuild to BuildRequires
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 15 17:05:58 CEST 2004 - schwab@suse.de
|
||||
|
||||
- Readd mbrtowc check [#45308].
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 4 13:54:47 CEST 2004 - schwab@suse.de
|
||||
|
||||
- Update to diffutils 2.8.7.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 13 11:58:08 CEST 2004 - schwab@suse.de
|
||||
|
||||
- Update to diffutils 2.8.6.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jan 10 22:47:32 CET 2004 - adrian@suse.de
|
||||
|
||||
- build as user
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 15 19:54:36 CEST 2003 - schwab@suse.de
|
||||
|
||||
- Update to diffutils 2.8.4.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 12 21:28:14 CEST 2003 - schwab@suse.de
|
||||
|
||||
- Add %defattr.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 24 12:20:23 CEST 2003 - ro@suse.de
|
||||
|
||||
- fix install_info --delete call and move from preun to postun
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 7 13:11:23 CEST 2003 - schwab@suse.de
|
||||
|
||||
- Only delete info entries when removing last version.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 6 17:48:15 CET 2003 - schwab@suse.de
|
||||
|
||||
- Use %install_info.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 5 13:46:56 CEST 2002 - schwab@suse.de
|
||||
|
||||
- Avoid rebuilding manpage [#18930].
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 20 13:59:56 CEST 2002 - schwab@suse.de
|
||||
|
||||
- Add i18n patches.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 8 11:38:42 CEST 2002 - schwab@suse.de
|
||||
|
||||
- Update to diffutils 2.8.1.
|
||||
* Documentation fixes.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 28 18:12:30 CET 2002 - schwab@suse.de
|
||||
|
||||
- Update to diffutils 2.8.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 5 13:29:38 CEST 2001 - schwab@suse.de
|
||||
|
||||
- Update to diffutils 2.7.2.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jan 13 15:49:16 CET 2001 - schwab@suse.de
|
||||
|
||||
- Fix last change to close resource leaks.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jan 13 02:35:21 MET 2001 - draht@suse.de
|
||||
|
||||
- tmpfile security problem fixed using mkstemp().
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Dec 3 17:28:38 CET 2000 - schwab@suse.de
|
||||
|
||||
- diff: Fix a corner case in handling of directories.
|
||||
- sdiff: Fix reading of split lines.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 24 13:40:09 CEST 2000 - schwab@suse.de
|
||||
|
||||
- Renamed from diff.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 8 17:29:59 CEST 2000 - schwab@suse.de
|
||||
|
||||
- Switch to BuildRoot.
|
||||
- Add group tag.
|
||||
- Use %{_infodir}.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 18 16:25:50 CET 2000 - schwab@suse.de
|
||||
|
||||
- /usr/info -> /usr/share/info
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 13 17:23:57 CEST 1999 - bs@suse.de
|
||||
|
||||
- ran old prepare_spec on spec file to switch to new prepare_spec.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 8 12:08:47 CEST 1999 - schwab@suse.de
|
||||
|
||||
- specfile cleanup
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 18 15:44:14 MET 1998 - ro@suse.de
|
||||
|
||||
- dont use m486 on alpha :-)
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Fri Aug 23 16:13:49 MET DST 1996 - florian@suse.de
|
||||
|
||||
bug-fix for sdiff
|
143
diffutils.spec
Normal file
143
diffutils.spec
Normal file
@ -0,0 +1,143 @@
|
||||
#
|
||||
# spec file for package diffutils (Version 2.8.7)
|
||||
#
|
||||
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# This file and all modifications and additions to the pristine
|
||||
# package are under the same license as the package itself.
|
||||
#
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
|
||||
Name: diffutils
|
||||
URL: http://www.gnu.org/software/diffutils/
|
||||
License: GNU General Public License (GPL)
|
||||
Group: Productivity/Text/Utilities
|
||||
Provides: diff
|
||||
Obsoletes: diff
|
||||
Autoreqprov: on
|
||||
PreReq: %{install_info_prereq}
|
||||
Version: 2.8.7
|
||||
Release: 38
|
||||
Summary: GNU diff Utilities
|
||||
Source: diffutils-%{version}.tar.gz
|
||||
Patch1: diffutils-2.8.1-i18n-0.2.patch.gz
|
||||
Patch2: cmp-eof-dev-null.diff
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
The GNU diff utilities find differences between files. diff is used to
|
||||
make source code patches, for instance.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Paul Eggert <eggert@twinsun.com>
|
||||
David J. MacKenzie <djm@gnu.org>
|
||||
Richard Stallman <rms@gnu.org>
|
||||
Roland McGrath <roland@gnu.org>
|
||||
|
||||
%prep
|
||||
%setup
|
||||
%patch1 -p1
|
||||
cd src
|
||||
%patch2
|
||||
|
||||
%build
|
||||
autoreconf -fi
|
||||
touch man/*.1
|
||||
./configure CFLAGS="$RPM_OPT_FLAGS" \
|
||||
--prefix=/usr --infodir=%{_infodir} --mandir=%{_mandir}
|
||||
make
|
||||
|
||||
%install
|
||||
make install DESTDIR="$RPM_BUILD_ROOT"
|
||||
%find_lang %name
|
||||
|
||||
%post
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/diff.info.gz
|
||||
|
||||
%postun
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/diff.info.gz
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files -f %name.lang
|
||||
%defattr(-,root,root)
|
||||
%doc AUTHORS COPYING NEWS README THANKS
|
||||
/usr/bin/cmp
|
||||
/usr/bin/diff
|
||||
/usr/bin/diff3
|
||||
/usr/bin/sdiff
|
||||
%doc %{_infodir}/diff.info*.gz
|
||||
%doc %{_mandir}/man1/*.gz
|
||||
|
||||
%changelog -n diffutils
|
||||
* Mon Nov 27 2006 - rguenther@suse.de
|
||||
- removed help2man BuildRequires again. Instead prevent patches
|
||||
from invalidating the shipped manpages.
|
||||
* Thu Oct 05 2006 - mjancar@suse.cz
|
||||
- readd help2man to BuildRequires (needed to build manpages)
|
||||
* Fri Aug 11 2006 - schwab@suse.de
|
||||
- Update cmp patch [#198332].
|
||||
* Mon Jul 24 2006 - rguenther@suse.de
|
||||
- diffutils does not need help2man.
|
||||
* Fri Mar 10 2006 - schwab@suse.de
|
||||
- Fix output of EOF message when stdout is redirected to /dev/null.
|
||||
* Wed Jan 25 2006 - mls@suse.de
|
||||
- converted neededforbuild to BuildRequires
|
||||
* Wed Sep 15 2004 - schwab@suse.de
|
||||
- Readd mbrtowc check [#45308].
|
||||
* Tue May 04 2004 - schwab@suse.de
|
||||
- Update to diffutils 2.8.7.
|
||||
* Tue Apr 13 2004 - schwab@suse.de
|
||||
- Update to diffutils 2.8.6.
|
||||
* Sat Jan 10 2004 - adrian@suse.de
|
||||
- build as user
|
||||
* Wed Oct 15 2003 - schwab@suse.de
|
||||
- Update to diffutils 2.8.4.
|
||||
* Mon May 12 2003 - schwab@suse.de
|
||||
- Add %%defattr.
|
||||
* Thu Apr 24 2003 - ro@suse.de
|
||||
- fix install_info --delete call and move from preun to postun
|
||||
* Mon Apr 07 2003 - schwab@suse.de
|
||||
- Only delete info entries when removing last version.
|
||||
* Thu Feb 06 2003 - schwab@suse.de
|
||||
- Use %%install_info.
|
||||
* Thu Sep 05 2002 - schwab@suse.de
|
||||
- Avoid rebuilding manpage [#18930].
|
||||
* Tue Aug 20 2002 - schwab@suse.de
|
||||
- Add i18n patches.
|
||||
* Mon Apr 08 2002 - schwab@suse.de
|
||||
- Update to diffutils 2.8.1.
|
||||
* Documentation fixes.
|
||||
* Thu Mar 28 2002 - schwab@suse.de
|
||||
- Update to diffutils 2.8.
|
||||
* Fri Oct 05 2001 - schwab@suse.de
|
||||
- Update to diffutils 2.7.2.
|
||||
* Sat Jan 13 2001 - schwab@suse.de
|
||||
- Fix last change to close resource leaks.
|
||||
* Sat Jan 13 2001 - draht@suse.de
|
||||
- tmpfile security problem fixed using mkstemp().
|
||||
* Sun Dec 03 2000 - schwab@suse.de
|
||||
- diff: Fix a corner case in handling of directories.
|
||||
- sdiff: Fix reading of split lines.
|
||||
* Tue Oct 24 2000 - schwab@suse.de
|
||||
- Renamed from diff.
|
||||
* Fri Sep 08 2000 - schwab@suse.de
|
||||
- Switch to BuildRoot.
|
||||
- Add group tag.
|
||||
- Use %%{_infodir}.
|
||||
* Tue Jan 18 2000 - schwab@suse.de
|
||||
- /usr/info -> /usr/share/info
|
||||
* Mon Sep 13 1999 - bs@suse.de
|
||||
- ran old prepare_spec on spec file to switch to new prepare_spec.
|
||||
* Wed Sep 08 1999 - schwab@suse.de
|
||||
- specfile cleanup
|
||||
* Fri Dec 18 1998 - ro@suse.de
|
||||
- dont use m486 on alpha :-)
|
||||
* Thu Jan 02 1997 - florian@suse.de
|
||||
bug-fix for sdiff
|
Loading…
Reference in New Issue
Block a user