Blame SPECS/patch.spec

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