Blame SPECS/patch.spec

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