Blame SPECS/patch.spec

5c22bb
%global gnulib_ver 20120926
5c22bb
864b1f
Summary: Utility for modifying/upgrading files
864b1f
Name: patch
864b1f
Version: 2.7.1
5c22bb
Release: 11%{?dist}
864b1f
License: GPLv3+
864b1f
URL: http://www.gnu.org/software/patch/patch.html
864b1f
Group: Development/Tools
864b1f
Source: ftp://ftp.gnu.org/gnu/patch/patch-%{version}.tar.xz
864b1f
Patch1: patch-remove-empty-dir.patch
864b1f
Patch2: patch-args.patch
864b1f
Patch3: patch-args-segfault.patch
bc059a
Patch4: patch-2.7.1-CVE-2018-1000156.patch
5c22bb
Patch5: patch-2.7.1-CVE-2016-10713.patch
5c22bb
Patch6: patch-2.7.1-CVE-2018-6952.patch
5c22bb
Patch7: patch-2.7.1-newmode.patch
864b1f
Patch100: patch-selinux.patch
864b1f
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
864b1f
864b1f
BuildRequires: libselinux-devel
864b1f
BuildRequires: libattr-devel
864b1f
BuildRequires: ed
bc059a
BuildRequires: automake autoconf
864b1f
5c22bb
Provides: bundled(gnulib) = %{gnulib_ver}
5c22bb
864b1f
%description
864b1f
The patch program applies diff files to originals.  The diff command
864b1f
is used to compare an original to a changed file.  Diff lists the
864b1f
changes made to the file.  A person who has the original file can then
864b1f
use the patch command with the diff file to add the changes to their
864b1f
original file (patching the file).
864b1f
864b1f
Patch should be installed because it is a common way of upgrading
864b1f
applications.
864b1f
864b1f
%prep
864b1f
%setup -q
864b1f
864b1f
# Upstream patch to fix removal of empty directories (bug #919489).
864b1f
%patch1 -p1 -b .remove-empty-dir
864b1f
864b1f
# Don't document unsupported -m option; document -x option (bug #948972).
864b1f
%patch2 -p1 -b .args
864b1f
864b1f
# Don't segfault when given bad arguments (bug #972330).
864b1f
%patch3 -p1 -b .args-segfault
864b1f
bc059a
# CVE-2018-1000156, Malicious patch files cause ed to execute arbitrary commands
bc059a
%patch4 -p1 -b .CVE-2018-1000156
bc059a
5c22bb
# CVE-2016-10713, Out-of-bounds access in pch_write_line function
5c22bb
%patch5 -p1 -b .CVE-2016-10713
5c22bb
5c22bb
# CVE-2018-6952, Double free of memory
5c22bb
%patch6 -p1 -b .CVE-2018-6952
5c22bb
5c22bb
# honor the new file mode
5c22bb
%patch7 -p1 -b .newmode
5c22bb
864b1f
# SELinux support.
864b1f
%patch100 -p1 -b .selinux
864b1f
864b1f
%build
864b1f
CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE"
864b1f
%ifarch sparcv9
864b1f
CFLAGS=`echo $CFLAGS|sed -e 's|-fstack-protector||g'`
864b1f
%endif
864b1f
%configure --disable-silent-rules
864b1f
make %{?_smp_mflags}
864b1f
864b1f
%check
864b1f
make check
864b1f
864b1f
%install
864b1f
rm -rf $RPM_BUILD_ROOT
864b1f
%makeinstall
864b1f
864b1f
%clean
864b1f
rm -rf $RPM_BUILD_ROOT
864b1f
864b1f
%files
864b1f
%defattr(-,root,root,-)
864b1f
%doc COPYING NEWS README
864b1f
%{_bindir}/*
864b1f
%{_mandir}/*/*
864b1f
864b1f
%changelog
5c22bb
* Thu Nov 22 2018 Than Ngo <than@redhat.com> - 2.7.1-11
5c22bb
- Fixed CVE-2016-10713 - Out-of-bounds access in pch_write_line function 
5c22bb
- Fixed CVE-2018-6952 - Double free of memory
5c22bb
- Resolves: #1626473, honor new file mode 100755 when applying patches
5c22bb
- Resolves: #1653294, Added virtual provides for bundled gnulib library
5c22bb
bc059a
* Fri Apr 13 2018 Than Ngo <than@redhat.com> - 2.7.1-10
bc059a
- Fixed Coverity reported issues
bc059a
bc059a
* Mon Apr 09 2018 Than Ngo <than@redhat.com> - 2.7.1-9
bc059a
- Fixed CVE-2018-1000156 - Malicious patch files cause ed to execute arbitrary commands
bc059a
be1d6c
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 2.7.1-8
be1d6c
- Mass rebuild 2014-01-24
be1d6c
be1d6c
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 2.7.1-7
be1d6c
- Mass rebuild 2013-12-27
be1d6c
864b1f
* Wed Jun 12 2013 Tim Waugh <twaugh@redhat.com> 2.7.1-6
864b1f
- Don't segfault when given bad arguments (bug #972330).
864b1f
864b1f
* Thu Apr 11 2013 Tim Waugh <twaugh@redhat.com> 2.7.1-5
864b1f
- Don't document unsupported -m option; document -x option (bug #948972).
864b1f
864b1f
* Mon Mar 25 2013 Ville Skyttä <ville.skytta@iki.fi> - 2.7.1-4
864b1f
- Build with xattr support.
864b1f
- Make build output more verbose.
864b1f
- Fix bogus date in %%changelog.
864b1f
864b1f
* Mon Mar 11 2013 Tim Waugh <twaugh@redhat.com> 2.7.1-3
864b1f
- Upstream patch to fix removal of empty directories (bug #919489).
864b1f
864b1f
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.1-2
864b1f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
864b1f
864b1f
* Thu Oct 18 2012 Tim Waugh <twaugh@redhat.com> 2.7.1-1
864b1f
- Fixed license (since 2.6 it has been GPLv3+).
864b1f
- 2.7.1.
864b1f
864b1f
* Thu Oct 18 2012 Tim Waugh <twaugh@redhat.com> 2.7-1
864b1f
- 2.7.  No longer need sigsegv, get-arg, CVE-2010-4651,
864b1f
  backup-if-mismatch or coverity-leak patches.
864b1f
864b1f
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6.1-13
864b1f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
864b1f
864b1f
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6.1-12
864b1f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
864b1f
864b1f
* Fri Nov 25 2011 Tim Waugh <twaugh@redhat.com> 2.6.1-11
864b1f
- Fixed NULL dereference in selinux patch.
864b1f
864b1f
* Mon May 16 2011 Tim Waugh <twaugh@redhat.com> 2.6.1-10
864b1f
- Applied Jiri Popelka's fixes from Coverity scan (bug #704554):
864b1f
  - Avoid unchecked return from getfilecon() in patch-selinux.patch.
864b1f
  - Fix memory leak.
864b1f
864b1f
* Wed Feb 16 2011 Tim Waugh <twaugh@redhat.com> 2.6.1-9
864b1f
- Let --posix cause --no-backup-if-mismatch (bug #678016).
864b1f
864b1f
* Thu Feb 10 2011 Tim Waugh <twaugh@redhat.com> 2.6.1-8
864b1f
- Incorporate upstream fix for CVE-2010-4651 patch so that a target
864b1f
  name given on the command line is not validated (bug #667529).
864b1f
864b1f
* Tue Feb  8 2011 Tim Waugh <twaugh@redhat.com> 2.6.1-7
864b1f
- Applied upstream patch to fix CVE-2010-4651 so that malicious
864b1f
  patches cannot create files above the current directory
864b1f
  (bug #667529).
864b1f
864b1f
* Tue Jan  4 2011 Tim Waugh <twaugh@redhat.com> 2.6.1-6
864b1f
- Use smp_mflags correctly (bug #665770).
864b1f
864b1f
* Mon Aug 16 2010 Tim Waugh <twaugh@redhat.com> 2.6.1-5
864b1f
- Another fix for the selinux patch (bug #618215).
864b1f
864b1f
* Fri Aug  6 2010 Tim Waugh <twaugh@redhat.com> 2.6.1-4
864b1f
- Fixed interpretation of return value from getfilecon().
864b1f
- Fixed argument type for --get (bug #553624).
864b1f
864b1f
* Fri Aug  6 2010 Dennis Gilmore <dennis@ausil.us>
864b1f
- using -fstack-projector causes weirdness on 32 bit sparc so disabling for now
864b1f
864b1f
* Tue Jul 27 2010 Tim Waugh <twaugh@redhat.com> 2.6.1-3
864b1f
- Fixed argument type for --get (bug #553624).
864b1f
864b1f
* Wed Mar  3 2010 Tim Waugh <twaugh@redhat.com> 2.6.1-2
864b1f
- Added comments for all patches.
864b1f
- Ship COPYING file.
864b1f
- Removed sparc ifdefs in spec file.
864b1f
864b1f
* Mon Jan  4 2010 Tim Waugh <twaugh@redhat.com> 2.6.1-1
864b1f
- 2.6.1 (bug #551569).  No longer need best-name patch.
864b1f
864b1f
* Thu Dec 24 2009 Tim Waugh <twaugh@redhat.com> 2.6-2
864b1f
- Applied upstream patch to prevent incorrect filename being chosen
864b1f
  when adding a new file (bug #549122).
864b1f
864b1f
* Mon Nov 16 2009 Tim Waugh <twaugh@redhat.com> 2.6-1
864b1f
- 2.6.  No longer need stderr, suffix, stripcr, parse, allow-spaces,
864b1f
  ifdef, program_name, or posix-backup patches.
864b1f
864b1f
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.4-40
864b1f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
864b1f
864b1f
* Wed Apr 29 2009 Tim Waugh <twaugh@redhat.com> 2.5.4-39
864b1f
- Fixed operation when SELinux is disabled (bug #498102).  Patch from
864b1f
  Jan Kratochvil.
864b1f
864b1f
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.4-38
864b1f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
864b1f
864b1f
* Tue Feb 17 2009 Tim Waugh <twaugh@redhat.com> 2.5.4-37
864b1f
- Don't set SELinux file context if it is already correct.
864b1f
864b1f
* Mon Nov 24 2008 Tim Waugh <twaugh@redhat.com> 2.5.4-36
864b1f
- Better summary.
864b1f
864b1f
* Mon Jun 30 2008 Tim Waugh <twaugh@redhat.com> 2.5.4-35
864b1f
- Don't fail if setfilecon() returns EPERM (bug #453365), although the
864b1f
  setfilecon man page suggests that ENOTSUP will be returned in this
864b1f
  case.
864b1f
864b1f
* Mon Jun 16 2008 Tim Waugh <twaugh@redhat.com> 2.5.4-34
864b1f
- Only write simple backups for each file once during a run
864b1f
  (bug #234822).
864b1f
864b1f
* Thu Jun 12 2008 Tim Waugh <twaugh@redhat.com> 2.5.4-33
864b1f
- Fix selinux patch and apply it.  Build requires libselinux-devel.
864b1f
864b1f
* Fri Feb  8 2008 Tim Waugh <twaugh@redhat.com> 2.5.4-32
864b1f
- Applied patch from 2.5.9 to allow spaces in filenames (bug #431887).
864b1f
864b1f
* Mon Dec  3 2007 Tim Waugh <twaugh@redhat.com> 2.5.4-31
864b1f
- Convert spec file to UTF-8 (bug #226233).
864b1f
- Use _bindir macro in %%files (bug #226233).
864b1f
- Parallel make (bug #226233).
864b1f
- Better defattr declaration (bug #226233).
864b1f
864b1f
* Thu Oct  4 2007 Tim Waugh <twaugh@redhat.com>
864b1f
- Beginnings of an SELinux patch (bug #165799); not applied yet.
864b1f
864b1f
* Wed Aug 29 2007 Tim Waugh <twaugh@redhat.com> 2.5.4-30
864b1f
- Added dist tag.
864b1f
- More specific license tag.
864b1f
- Fixed summary.
864b1f
- Better buildroot tag.
864b1f
864b1f
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4-29.2.2
864b1f
- rebuild
864b1f
864b1f
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4-29.2.1
864b1f
- bump again for double-long bug on ppc(64)
864b1f
864b1f
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4-29.2
864b1f
- rebuilt for new gcc4.1 snapshot and glibc changes
864b1f
864b1f
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
864b1f
- rebuilt
864b1f
864b1f
* Thu Sep  8 2005 Tim Waugh <twaugh@redhat.com> 2.5.4-29
864b1f
- Remove SELinux patch for now (bug #167822).
864b1f
864b1f
* Wed Sep  7 2005 Tim Waugh <twaugh@redhat.com> 2.5.4-27
864b1f
- Applied patch from Ulrich Drepper to fix string overread (bug #167675).
864b1f
864b1f
* Tue Sep  6 2005 Tim Waugh <twaugh@redhat.com> 2.5.4-26
864b1f
- Preserve SELinux file contexts (bug #165799).
864b1f
864b1f
* Thu Aug 11 2005 Tim Waugh <twaugh@redhat.com> 2.5.4-25
864b1f
- Fixed CRLF detection (bug #154283).
864b1f
864b1f
* Wed May  4 2005 Tim Waugh <twaugh@redhat.com> 2.5.4-24
864b1f
- Reverted last change (bug #154283, bug #156762).
864b1f
864b1f
* Fri Apr 29 2005 Tim Waugh <twaugh@redhat.com> 2.5.4-23
864b1f
- Applied patch from Toshio Kuratomi to avoid problems with DOS-format
864b1f
  newlines (bug #154283).
864b1f
864b1f
* Wed Mar  2 2005 Tim Waugh <twaugh@redhat.com> 2.5.4-22
864b1f
- Rebuild for new GCC.
864b1f
864b1f
* Wed Feb  9 2005 Tim Waugh <twaugh@redhat.com> 2.5.4-21
864b1f
- Rebuilt.
864b1f
864b1f
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
864b1f
- rebuilt
864b1f
864b1f
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
864b1f
- rebuilt
864b1f
864b1f
* Sat Oct 25 2003 Tim Waugh <twaugh@redhat.com> 2.5.4-18
864b1f
- Rebuilt.
864b1f
864b1f
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
864b1f
- rebuilt
864b1f
864b1f
* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
864b1f
- rebuilt
864b1f
864b1f
* Wed Nov 20 2002 Tim Powers <timp@redhat.com>
864b1f
- rebuilt in current collinst
864b1f
864b1f
* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
864b1f
- automated rebuild
864b1f
864b1f
* Thu May 23 2002 Tim Powers <timp@redhat.com>
864b1f
- automated rebuild
864b1f
864b1f
* Tue Apr  9 2002 Tim Waugh <twaugh@redhat.com> 2.5.4-12
864b1f
- Fix error reporting when given bad options (bug #62981).
864b1f
864b1f
* Tue Mar  5 2002 Tim Waugh <twaugh@redhat.com> 2.5.4-11
864b1f
- s/Copyright:/License:/.
864b1f
- Fix -D behaviour (bug #60688).
864b1f
864b1f
* Tue May 29 2001 Tim Waugh <twaugh@redhat.com> 2.5.4-10
864b1f
- Merge Mandrake patch:
864b1f
  - fix possible segfault
864b1f
864b1f
* Fri Dec  1 2000 Tim Waugh <twaugh@redhat.com>
864b1f
- Rebuild because of fileutils bug.
864b1f
864b1f
* Thu Nov  2 2000 Tim Waugh <twaugh@redhat.com>
864b1f
- use .orig as default suffix, as per man page and previous behaviour
864b1f
  (bug #20202).
864b1f
- use better patch for this, from maintainer.
864b1f
864b1f
* Wed Oct  4 2000 Tim Waugh <twaugh@redhat.com>
864b1f
- actually use the RPM_OPT_FLAGS
864b1f
864b1f
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
864b1f
- automatic rebuild
864b1f
864b1f
* Tue Jun 13 2000 Trond Eivind Glomsrød <teg@redhat.com>
864b1f
- Use %%makeinstall, %%{_tmppath} and %%{_mandir}
864b1f
864b1f
* Fri May 12 2000 Trond Eivind Glomsrød <teg@redhat.com>
864b1f
- added URL
864b1f
864b1f
* Wed Feb 16 2000 Bernhard Rosenkraenzer <bero@redhat.com>
864b1f
- 2.5.4
864b1f
- Fix up LFS support on Alpha (Bug #5732)
864b1f
864b1f
* Mon Feb  7 2000 Bill Nottingham <notting@redhat.com>
864b1f
- handle compressed manpages
864b1f
864b1f
* Sun Jun 06 1999 Alan Cox <alan@redhat.com>
864b1f
- Fix the case where stderr isnt flushed for ask(). Now the 'no such file'
864b1f
  appears before the skip patch question, not at the very end, Doh!
864b1f
864b1f
* Mon Mar 22 1999 Jeff Johnson <jbj@redhat.com>
864b1f
- (ultra?) sparc was getting large file system support.
864b1f
864b1f
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
864b1f
- auto rebuild in the new build environment (release 7)
864b1f
864b1f
* Fri Dec 18 1998 Cristian Gafton <gafton@redhat.com>
864b1f
- build against glibc 2.1
864b1f
864b1f
* Tue Sep  1 1998 Jeff Johnson <jbj@redhat.com>
864b1f
- bump release to preserve newer than back-ported 4.2.
864b1f
864b1f
* Tue Jun 09 1998 Prospector System <bugs@redhat.com>
864b1f
- translations modified for de, fr
864b1f
864b1f
* Tue Jun  9 1998 Jeff Johnson <jbj@redhat.com>
864b1f
- Fix for problem #682 segfault.
864b1f
864b1f
* Fri Apr 24 1998 Prospector System <bugs@redhat.com>
864b1f
- translations modified for de, fr, tr
864b1f
864b1f
* Tue Apr 07 1998 Cristian Gafton <gafton@redhat.com>
864b1f
- added buildroot
864b1f
864b1f
* Tue Oct 21 1997 Cristian Gafton <gafton@redhat.com>
864b1f
- updated to 2.5
864b1f
864b1f
* Mon Jun 02 1997 Erik Troan <ewt@redhat.com>
864b1f
- built against glibc