51031d
%global library_version 1.0.6
51031d
51031d
Summary: A file compression utility
51031d
Name: bzip2
51031d
Version: 1.0.6
51031d
Release: 26%{?dist}
51031d
License: BSD
51031d
Group: Applications/File
51031d
URL: http://www.bzip.org/
51031d
Source0: http://www.bzip.org/%{version}/%{name}-%{version}.tar.gz
51031d
Source1: bzip2.pc
51031d
51031d
Patch0: bzip2-1.0.4-saneso.patch
51031d
Patch1: bzip2-1.0.4-cflags.patch
51031d
# resolves: #226979
51031d
Patch2: bzip2-1.0.4-bzip2recover.patch
51031d
Patch3: bzip2-ldflags.patch
51031d
# resolves: #1348179
51031d
Patch4: set-out-file-to-null.patch
51031d
51031d
%description
51031d
Bzip2 is a freely available, patent-free, high quality data compressor.
51031d
Bzip2 compresses files to within 10 to 15 percent of the capabilities
51031d
of the best techniques available.  However, bzip2 has the added benefit
51031d
of being approximately two times faster at compression and six times
51031d
faster at decompression than those techniques.  Bzip2 is not the
51031d
fastest compression utility, but it does strike a balance between speed
51031d
and compression capability.
51031d
51031d
Install bzip2 if you need a compression utility.
51031d
51031d
%package devel
51031d
Summary: Libraries and header files for apps which will use bzip2
51031d
Group: Development/Libraries
51031d
Requires: bzip2-libs = %{version}-%{release}
51031d
51031d
%description devel
51031d
51031d
Header files and a library of bzip2 functions, for developing apps
51031d
which will use the library.
51031d
51031d
%package libs
51031d
Summary: Libraries for applications using bzip2
51031d
Group: System Environment/Libraries
51031d
51031d
%description libs
51031d
51031d
Libraries for applications using the bzip2 compression format.
51031d
51031d
%package static
51031d
Summary: Libraries for applications using bzip2
51031d
Group: System Environment/Libraries
51031d
51031d
%description static
51031d
51031d
Static libraries for applications using the bzip2 compression format.
51031d
51031d
%prep
51031d
%setup -q
51031d
%patch0 -p1 -b .saneso
51031d
%patch1 -p1 -b .cflags
51031d
%patch2 -p1 -b .bz2recover
51031d
%patch3 -p1 -b .ldflags
51031d
%patch4 -p1 -b .bzip2recover
51031d
51031d
cp -a %{SOURCE1} .
51031d
sed -i "s|^libdir=|libdir=%{_libdir}|" bzip2.pc
51031d
51031d
%build
51031d
%if 0%{?rhel} >= 7
51031d
    %ifarch ppc64
51031d
        export O3="-O3"
51031d
    %else
51031d
        export O3=""
51031d
    %endif
51031d
%else
51031d
    export O3=""
51031d
%endif
51031d
51031d
make -f Makefile-libbz2_so CC="%{__cc}" AR="%{__ar}" RANLIB="%{__ranlib}" \
51031d
    CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64 -fpic -fPIC $O3" \
51031d
    LDFLAGS="%{__global_ldflags}" \
51031d
    %{?_smp_mflags} all
51031d
51031d
rm -f *.o
51031d
make CC="%{__cc}" AR="%{__ar}" RANLIB="%{__ranlib}" \
51031d
    CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64 $O3" \
51031d
    LDFLAGS="%{__global_ldflags}" \
51031d
    %{?_smp_mflags} all
51031d
51031d
%install
51031d
chmod 644 bzlib.h
51031d
mkdir -p $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_libdir}/pkgconfig,%{_includedir}}
51031d
cp -p bzlib.h $RPM_BUILD_ROOT%{_includedir}
51031d
install -m 755 libbz2.so.%{library_version} $RPM_BUILD_ROOT%{_libdir}
51031d
install -m 644 libbz2.a $RPM_BUILD_ROOT%{_libdir}
51031d
install -m 644 bzip2.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig/bzip2.pc
51031d
install -m 755 bzip2-shared  $RPM_BUILD_ROOT%{_bindir}/bzip2
51031d
install -m 755 bzip2recover bzgrep bzdiff bzmore  $RPM_BUILD_ROOT%{_bindir}/
51031d
cp -p bzip2.1 bzdiff.1 bzgrep.1 bzmore.1  $RPM_BUILD_ROOT%{_mandir}/man1/
51031d
ln -s bzip2 $RPM_BUILD_ROOT%{_bindir}/bunzip2
51031d
ln -s bzip2 $RPM_BUILD_ROOT%{_bindir}/bzcat
51031d
ln -s bzdiff $RPM_BUILD_ROOT%{_bindir}/bzcmp
51031d
ln -s bzmore $RPM_BUILD_ROOT%{_bindir}/bzless
51031d
ln -s bzgrep $RPM_BUILD_ROOT%{_bindir}/bzegrep
51031d
ln -s bzgrep $RPM_BUILD_ROOT%{_bindir}/bzfgrep
51031d
ln -s libbz2.so.%{library_version} $RPM_BUILD_ROOT%{_libdir}/libbz2.so.1
51031d
ln -s libbz2.so.1 $RPM_BUILD_ROOT%{_libdir}/libbz2.so
51031d
ln -s bzip2.1 $RPM_BUILD_ROOT%{_mandir}/man1/bzip2recover.1
51031d
ln -s bzip2.1 $RPM_BUILD_ROOT%{_mandir}/man1/bunzip2.1
51031d
ln -s bzip2.1 $RPM_BUILD_ROOT%{_mandir}/man1/bzcat.1
51031d
ln -s bzdiff.1 $RPM_BUILD_ROOT%{_mandir}/man1/bzcmp.1
51031d
ln -s bzmore.1 $RPM_BUILD_ROOT%{_mandir}/man1/bzless.1
51031d
ln -s bzgrep.1 $RPM_BUILD_ROOT%{_mandir}/man1/bzegrep.1
51031d
ln -s bzgrep.1 $RPM_BUILD_ROOT%{_mandir}/man1/bzfgrep.1
51031d
51031d
%ldconfig_scriptlets libs
51031d
51031d
%files
51031d
%doc LICENSE CHANGES README
51031d
%{!?_licensedir:%global license %%doc}
51031d
%license LICENSE
51031d
%{_bindir}/*
51031d
%{_mandir}/*/*
51031d
51031d
%files libs
51031d
%{!?_licensedir:%global license %%doc}
51031d
%license LICENSE
51031d
%{_libdir}/libbz2.so.1*
51031d
51031d
%files static
51031d
%{!?_licensedir:%global license %%doc}
51031d
%license LICENSE
51031d
%{_libdir}/libbz2.a
51031d
51031d
%files devel
51031d
%doc manual.html manual.pdf
51031d
%{_includedir}/*
51031d
%{_libdir}/*.so
51031d
%{_libdir}/pkgconfig/bzip2.pc
51031d
51031d
%changelog
51031d
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.6-26
51031d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
51031d
51031d
* Sat Feb 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.0.6-25
51031d
- Switch to %%ldconfig_scriptlets
51031d
51031d
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.6-24
51031d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
51031d
51031d
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.6-23
51031d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
51031d
51031d
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.6-22
51031d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
51031d
51031d
* Sat Dec 31 2016 Jan Chaloupka <jchaloup@redhat.com> - 1.0.6-21
51031d
- CVE-2016-3189 bzip2: heap use after free in bzip2recover
51031d
  resolves: #1348179
51031d
51031d
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.6-20
51031d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
51031d
51031d
* Tue Dec 08 2015 Jaromir Capik <jcapik@redhat.com> - 1.0.6-19
51031d
- Adding static lib (#1253934)
51031d
51031d
* Tue Dec 08 2015 Jaromir Capik <jcapik@redhat.com> - 1.0.6-18
51031d
- Adding bzip2.pc to the devel subpackage (#1289576)
51031d
51031d
* Fri Aug 14 2015 Adam Jackson <ajax@redhat.com> 1.0.6-17
51031d
- Pass ldflags through so hardening actually works
51031d
51031d
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.6-16
51031d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
51031d
51031d
* Sat Feb 21 2015 Till Maas <opensource@till.name> - 1.0.6-15
51031d
- Rebuilt for Fedora 23 Change
51031d
  https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code
51031d
51031d
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.6-14
51031d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
51031d
51031d
* Fri Jul 11 2014 Tom Callaway <spot@fedoraproject.org> - 1.0.6-13
51031d
- fix license marking
51031d
51031d
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.6-12
51031d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
51031d
51031d
* Tue Feb 11 2014 jchaloup <jchaloup@redhat.com> - 1.0.6-11
51031d
- resolves: #1063849
51031d
  recompiled with -O3 flag for ppc64 arch
51031d
51031d
* Wed Dec 11 2013 Peter Schiffer <pschiffe@redhat.com> - 1.0.6-10
51031d
- resolves: #1034855
51031d
  provided missing bzegrep and bzfgrep shortcuts
51031d
51031d
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.6-9
51031d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
51031d
51031d
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.6-8
51031d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
51031d
51031d
* Fri Oct 26 2012 Peter Schiffer <pschiffe@redhat.com> - 1.0.6-7
51031d
- moved libraries from /lib to /usr/lib
51031d
51031d
* Fri Oct 26 2012 Peter Schiffer <pschiffe@redhat.com> - 1.0.6-6
51031d
- .spec file cleanup
51031d
51031d
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.6-5
51031d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
51031d
51031d
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.6-4
51031d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
51031d
51031d
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.6-3
51031d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
51031d
51031d
* Wed Sep 29 2010 jkeating - 1.0.6-2
51031d
- Rebuilt for gcc bug 634757
51031d
51031d
* Wed Sep 22 2010 Ivana Hutarova Varekova <varekova@redhat.com> - 1.0.6-1
51031d
- update to 1.0.6
51031d
51031d
* Mon Jul 12 2010 Ivana Hutarova Varekova <varekova@redhat.com> - 1.0.5-7
51031d
- add LICENSE to bzip2-libs
51031d
51031d
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.5-6
51031d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
51031d
51031d
* Tue Mar 17 2009 Ivana Varekova <varekova@redhat.com> 1.0.5-5
51031d
- remove static library
51031d
51031d
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.5-4
51031d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
51031d
51031d
* Mon Sep  1 2008 Ivana Varekova <varekova@redhat.com> 1.0.5-3
51031d
- minor spec file changew
51031d
51031d
* Thu Apr 10 2008 Ivana Varekova <varekova@redhat.com> 1.0.5-2
51031d
- Resolves: #441775
51031d
  fix libs link
51031d
51031d
* Tue Mar 25 2008 Ivana Varekova <varekova@redhat.com> 1.0.5-1
51031d
- update to 1.0.5
51031d
51031d
* Wed Feb 20 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.0.4-14
51031d
- Autorebuild for GCC 4.3
51031d
51031d
* Wed Jan 23 2008 Ivana Varekova <varekova@redhat.com> 1.0.4-13
51031d
- rebuild
51031d
51031d
* Mon May 21 2007 Ivana Varekova <varekova@redhat.com> 1.0.4-12
51031d
- fix *.so,*.a directory
51031d
51031d
* Mon May 21 2007 Ivana Varekova <varekova@redhat.com> 1.0.4-11
51031d
- remove libbz2.* from /usr/lib* to /lib*
51031d
51031d
* Wed Apr  4 2007 Ivana Varekova <varekova@redhat.com> 1.0.4-10
51031d
- change libz.a permissions
51031d
51031d
* Wed Apr  4 2007 Ivana Varekova <varekova@redhat.com> 1.0.4-9
51031d
- remove useless -p 
51031d
51031d
* Thu Mar 15 2007 Ivana Varekova <varekova@redhat.com> 1.0.4-8
51031d
- remove unnecessary "/" after RPM_BUILD_ROOT macro
51031d
51031d
* Mon Feb 19 2007 Jesse Keating <jkeating@redhat.com> 1.0.4-7
51031d
- Temporarily add static lib back in for rpm
51031d
51031d
* Fri Feb 16 2007 Ivana Varekova <varekova@redhat.com> 1.0.4-6
51031d
- incorporate the next review feedback
51031d
51031d
* Thu Feb 15 2007 Ivana Varekova <varekova@redhat.com> 1.0.4-5
51031d
- incorporate package review feedback
51031d
51031d
* Tue Feb  6 2007 Ivana Varekova <varekova@redhat.com> 1.0.4-4
51031d
- fix bzip2recover patch
51031d
51031d
* Mon Feb  5 2007 Ivana Varekova <varekova@redhat.com> 1.0.4-3
51031d
- Resolves: 226979 
51031d
  Buffer overflow in bzip2's bzip2recover
51031d
51031d
* Mon Jan  8 2007 Ivana Varekova <varekova@redhat.com> 1.0.4-1
51031d
- update to 1.0.4
51031d
- spec file cleanup
51031d
51031d
* Mon Jul 17 2006 Ivana Varekova <varekova@redhat.com> 1.0.3-3
51031d
- add cflags (#198926)
51031d
51031d
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1.0.3-2.2.2
51031d
- rebuild
51031d
51031d
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 1.0.3-2.2.1
51031d
- bump again for double-long bug on ppc(64)
51031d
51031d
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 1.0.3-2.2
51031d
- rebuilt for new gcc4.1 snapshot and glibc changes
51031d
51031d
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
51031d
- rebuilt
51031d
51031d
* Fri Nov 25 2005 Ivana Varekova <varekova@redhat.com> 1.0.3-2
51031d
- fix bug 174172 - CAN-2005-0758 bzgrep has security issue in sed usage
51031d
51031d
* Mon Aug 29 2005 Ivana Varekova <varekova@redhat.com> 1.0.3-1
51031d
- 1.0.3
51031d
- add NULL-ptr-check patch 
51031d
  (patch author: Mihai Limbasan 
51031d
51031d
* Thu May 19 2005 Jiri Ryska <jryska@redhat.com>
51031d
- fixed permission setting for decompressed files #155742
51031d
- fixed decompression bomb (DoS) #157548
51031d
51031d
* Fri Mar 04 2005 Jiri Ryska <jryska@redhat.com>
51031d
- rebuilt
51031d
51031d
* Thu Dec 09 2004 Jiri Ryska <jryska@redhat.com>
51031d
- changed temp file creation in bzdiff #92444
51031d
51031d
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
51031d
- rebuilt
51031d
51031d
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
51031d
- rebuilt
51031d
51031d
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
51031d
- rebuilt
51031d
51031d
* Tue Jun 17 2003 Jeff Johnson <jbj@redhat.com> 1.0.2-11
51031d
- rebuilt because of crt breakage on ppc64.
51031d
51031d
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
51031d
- rebuilt
51031d
51031d
* Mon Mar 31 2003 Jeff Johnson <jbj@redhat.com> 1.0.2-9
51031d
- rebuild to get rid of undefined __ctype_b in libbz2.a.
51031d
51031d
* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
51031d
- rebuilt
51031d
51031d
* Thu Nov 21 2002 Elliot Lee <sopwith@redhat.com>
51031d
- Pass __cc/__ar/__ranlib to makefiles
51031d
- Use _smp_mflags
51031d
51031d
* Tue Nov 19 2002 Tim Powers <timp@redhat.com>
51031d
- rebuild on all arches
51031d
- fix %%doc file list
51031d
51031d
* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
51031d
- automated rebuild
51031d
51031d
* Thu May 23 2002 Tim Powers <timp@redhat.com>
51031d
- automated rebuild
51031d
51031d
* Thu Apr 25 2002 Trond Eivind Glomsrød <teg@redhat.com> 1.0.2-3
51031d
- Rebuild in new environment
51031d
51031d
* Thu Feb 21 2002 Trond Eivind Glomsrød <teg@redhat.com> 1.0.2-2
51031d
- Rebuild
51031d
51031d
* Wed Jan 30 2002 Trond Eivind Glomsrød <teg@redhat.com> 1.0.2-1
51031d
- 1.0.2
51031d
- Total overhaul of build precedure
51031d
- Add many small helper programs added to 1.0.2
51031d
- drop old patches
51031d
51031d
* Wed Jan 09 2002 Tim Powers <timp@redhat.com>
51031d
- automated rebuild
51031d
51031d
* Mon Nov 26 2001 Trond Eivind Glomsrød <teg@redhat.com> 1.0.1-5
51031d
- Don't segfault when infile is a directory and "-f" is used (#56623)
51031d
- Automake is evil. Add workaround
51031d
51031d
* Fri Mar 30 2001 Trond Eivind Glomsrød <teg@redhat.com>
51031d
- use "License" instead of "Copyright"
51031d
- split out libs
51031d
51031d
* Fri Jul 21 2000 Trond Eivind Glomsrød <teg@redhat.com>
51031d
- new URL and source location
51031d
51031d
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
51031d
- automatic rebuild
51031d
51031d
* Sat Jul 01 2000 Trond Eivind Glomsrød <teg@redhat.com>
51031d
- 1.0.1
51031d
- ported my patch
51031d
51031d
* Tue Jun 13 2000 Jeff Johnson <jbj@redhat.com>
51031d
- FHS packaging to build on solaris2.5.1.
51031d
- remove config.cache from autoconf patch.
51031d
- sparc: use %%configure, but not the m4 macros.
51031d
51031d
* Tue Jun 06 2000 Trond Eivind Glomsrød <teg@redhat.com>
51031d
- Use %%configure, %%makeinstall, %%{_manpath} and %%{_tmpdir}
51031d
51031d
* Wed May 17 2000 Trond Eivind Glomsrød <teg@redhat.com>
51031d
- 1.0.0 - ported my 1.0pre8 libtoolizedautoconf patch
51031d
51031d
* Tue May 16 2000 Trond Eivind Glomsrød <teg@redhat.com>
51031d
- use soft links, not hardlinks, for binaries
51031d
- mv .so to devel
51031d
51031d
* Mon May 15 2000 Trond Eivind Glomsrød <teg@redhat.com>
51031d
- autoconfed and libtoolized package 
51031d
- fixed Copyright (it's BSD, not GPL)
51031d
- dumped bzless (less works fine with bz2-files)
51031d
- rewrote build and install parts
51031d
- separated main package and devel package
51031d
51031d
* Mon May  8 2000 Bernhard Rosenkränzer <bero@redhat.com>
51031d
- 1.0pre8
51031d
51031d
* Fri Apr 14 2000 Bernhard Rosenkränzer <bero@redhat.com>
51031d
- Add bzgrep (a version of zgrep hacked to do bzip2)
51031d
51031d
* Mon Feb  7 2000 Bill Nottingham <notting@redhat.com>
51031d
- handle compressed manpages
51031d
51031d
* Fri Dec 31 1999 Bernhard Rosenkränzer <bero@redhat.com>
51031d
- 0.9.5d
51031d
- Update download URL, add URL: tag in header
51031d
51031d
* Tue Aug 10 1999 Jeff Johnson <jbj@redhat.com>
51031d
- upgrade to 0.9.5c.
51031d
51031d
* Mon Aug  9 1999 Bill Nottingham <notting@redhat.com>
51031d
- install actual bzip2 binary, not libtool cruft.
51031d
51031d
* Sun Aug  8 1999 Jeff Johnson <jbj@redhat.com>
51031d
- run ldconfig to get shared library.
51031d
51031d
* Mon Aug  2 1999 Jeff Johnson <jbj@redhat.com>
51031d
- create shared libbz1.so.* library.
51031d
51031d
* Sun Apr  4 1999 Jeff Johnson <jbj@redhat.com>
51031d
- update to bzip2-0.9.0c.
51031d
51031d
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
51031d
- auto rebuild in the new build environment (release 4)
51031d
51031d
* Thu Dec 17 1998 Cristian Gafton <gafton@redhat.com>
51031d
- build against glibc 2.1
51031d
51031d
* Wed Sep 30 1998 Cristian Gafton <gafton@redhat.com>
51031d
- force compilation with egcs to avoid gcc optimization bug (thank God 
51031d
  we haven't been beaten by it)
51031d
51031d
* Wed Sep 09 1998 Cristian Gafton <gafton@redhat.com>
51031d
- version 0.9.0b
51031d
51031d
* Tue Sep 08 1998 Cristian Gafton <gafton@redhat.com>
51031d
- updated to 0.9.0
51031d
51031d
* Thu Apr 09 1998 Cristian Gafton <gafton@redhat.com>
51031d
- first build for Manhattan