ca8428
ca8428
# NOTE: packages that can use jasper:
ca8428
# ImageMagick
ca8428
# netpbm
ca8428
ca8428
Summary: Implementation of the JPEG-2000 standard, Part 1
ca8428
Name:    jasper
ca8428
Group:   System Environment/Libraries
ca8428
Version: 1.900.1
ca8428
Release: 29%{?dist}
ca8428
ca8428
License: JasPer
ca8428
URL:     http://www.ece.uvic.ca/~frodo/jasper/
ca8428
Source0: http://www.ece.uvic.ca/~frodo/jasper/software/jasper-%{version}.zip
ca8428
ca8428
Patch1: jasper-1.701.0-GL.patch
ca8428
# autoconf/automake bits of patch1
ca8428
Patch2: jasper-1.701.0-GL-ac.patch
ca8428
# CVE-2007-2721 (bug #240397)
ca8428
# borrowed from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=413041;msg=88
ca8428
Patch3: patch-libjasper-stepsizes-overflow.diff
ca8428
# borrowed from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=469786 
ca8428
Patch4: jpc_dec.c.patch
ca8428
# OpenBSD hardening patches addressing couple of possible integer overflows
ca8428
# during the memory allocations
ca8428
# https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2008-3520
ca8428
Patch5: jasper-1.900.1-CVE-2008-3520.patch
ca8428
# https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2008-3522
ca8428
Patch6: jasper-1.900.1-CVE-2008-3522.patch
ca8428
# add pkg-config support
ca8428
Patch7: jasper-pkgconfig.patch
ca8428
ca8428
Patch8: jasper-1.900.1-CVE-2011-4516-CVE-2011-4517-CERT-VU-887409.patch
ca8428
ca8428
Patch9: jasper-CVE-2014-9029.patch
ca8428
Patch10: jasper-CVE-2014-8137.patch
ca8428
Patch11: jasper-CVE-2014-8138.patch
ca8428
Patch12: jasper-CVE-2014-8157.patch
ca8428
Patch13: jasper-CVE-2014-8158.patch
ca8428
ca8428
# Issues found by static analysis of code
ca8428
Patch110: jasper-1.900.1-Coverity-BAD_SIZEOF.patch
ca8428
Patch111: jasper-1.900.1-Coverity-CHECKED_RETURN.patch
ca8428
Patch112: jasper-1.900.1-Coverity-FORWARD_NULL.patch
ca8428
Patch113: jasper-1.900.1-Coverity-NULL_RETURNS.patch
ca8428
Patch114: jasper-1.900.1-Coverity-RESOURCE_LEAK.patch
ca8428
Patch115: jasper-1.900.1-Coverity-UNREACHABLE.patch
ca8428
Patch116: jasper-1.900.1-Coverity-UNUSED_VALUE.patch
ca8428
ca8428
# autoreconf
ca8428
BuildRequires: autoconf automake libtool
ca8428
BuildRequires: freeglut-devel 
ca8428
BuildRequires: libGLU-devel
ca8428
BuildRequires: libjpeg-devel
ca8428
BuildRequires: pkgconfig
ca8428
ca8428
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
ca8428
ca8428
%description
ca8428
This package contains an implementation of the image compression
ca8428
standard JPEG-2000, Part 1. It consists of tools for conversion to and
ca8428
from the JP2 and JPC formats.
ca8428
ca8428
%package devel
ca8428
Summary: Header files, libraries and developer documentation
ca8428
Group:   Development/Libraries
ca8428
Provides: libjasper-devel = %{version}-%{release}
ca8428
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
ca8428
Requires: libjpeg-devel
ca8428
Requires: pkgconfig
ca8428
%description devel
ca8428
%{summary}.
ca8428
ca8428
%package libs 
ca8428
Summary: Runtime libraries for %{name}
ca8428
Group:   System Environment/Libraries
ca8428
Conflicts: jasper < 1.900.1-4
ca8428
%description libs 
ca8428
%{summary}.
ca8428
ca8428
%package utils 
ca8428
Summary: Nonessential utilities for %{name}
ca8428
Group:   Development/Libraries
ca8428
Requires: %{name} = %{version}-%{release}
ca8428
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
ca8428
%description utils 
ca8428
%{summary}, including jiv and tmrdemo.
ca8428
ca8428
ca8428
ca8428
%prep
ca8428
%setup -q -n %{name}-%{version}
ca8428
ca8428
%patch1 -p1 -b .GL
ca8428
%patch2 -p1 -b .GL-ac
ca8428
%patch3 -p1 -b .CVE-2007-2721
ca8428
%patch4 -p1 -b .jpc_dec_assertion
ca8428
%patch5 -p1 -b .CVE-2008-3520
ca8428
%patch6 -p1 -b .CVE-2008-3522
ca8428
%patch7 -p1 -b .pkgconfig
ca8428
%patch8 -p1 -b .CVE-2011-4516-4517
ca8428
%patch9 -p1 -b .CVE-2014-9029
ca8428
%patch10 -p1 -b .CVE-2014-8137
ca8428
%patch11 -p1 -b .CVE-2014-8138
ca8428
%patch12 -p1 -b .CVE-2014-8157
ca8428
%patch13 -p1 -b .CVE-2014-8158
ca8428
ca8428
%patch110 -p1 -b .BAD_SIZEOF
ca8428
%patch111 -p1 -b .CHECKED_RETURN
ca8428
%patch112 -p1 -b .FORWARD_NULL
ca8428
%patch113 -p1 -b .NULL_RETURNS
ca8428
%patch114 -p1 -b .RESOURCE_LEAK
ca8428
%patch115 -p1 -b .UNREACHABLE
ca8428
%patch116 -p1 -b .UNUSED_VALUE
ca8428
ca8428
autoreconf --verbose --force --install
ca8428
ca8428
ca8428
%build
ca8428
ca8428
# jas_icc.c:744:2: warning: assuming signed overflow does not occur
ca8428
# when assuming that (X + c) < X is always false [-Wstrict-overflow]
ca8428
#
ca8428
# comment from Red Hat Security Response Team:
ca8428
# gcc inlines jas_iccattrtab_resize into jas_iccattrtab_add. Additionally, it
ca8428
# essentially removes the "assert(maxents >= tab->numattrs);" assertion in
ca8428
# jas_iccattrtab_resize, because it assumes that "maxents >= tab->numattrs" will
ca8428
# always be true due to jas_iccattrtab_resize(attrtab, attrtab->numattrs + 32),
ca8428
# especially the + 32. This assumption can only be true if it completely ignores
ca8428
# the problem of signed integer overflows. I don't think it's a smart idea to
ca8428
# accept that.
ca8428
# -fno-strict-overflow forces gcc into keeping the assertion there.
ca8428
CFLAGS="%{optflags} -fno-strict-overflow" \
ca8428
%configure \
ca8428
  --enable-shared \
ca8428
  --disable-static 
ca8428
ca8428
make %{?_smp_mflags}
ca8428
ca8428
ca8428
%install
ca8428
ca8428
make install DESTDIR=$RPM_BUILD_ROOT
ca8428
ca8428
# Unpackaged files
ca8428
rm -f doc/README
ca8428
rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.la
ca8428
ca8428
ca8428
%check
ca8428
make check
ca8428
ca8428
ca8428
ca8428
%post libs -p /sbin/ldconfig
ca8428
ca8428
%postun libs -p /sbin/ldconfig
ca8428
ca8428
ca8428
%files
ca8428
%{_bindir}/imgcmp
ca8428
%{_bindir}/imginfo
ca8428
%{_bindir}/jasper
ca8428
%{_mandir}/man1/img*
ca8428
%{_mandir}/man1/jasper.1*
ca8428
ca8428
%files devel
ca8428
%doc doc/*
ca8428
%{_includedir}/jasper/
ca8428
%{_libdir}/libjasper.so
ca8428
%{_libdir}/pkgconfig/jasper.pc
ca8428
ca8428
%files libs
ca8428
%doc COPYRIGHT LICENSE NEWS README
ca8428
%{_libdir}/libjasper.so.1*
ca8428
ca8428
%files utils
ca8428
%{_bindir}/jiv
ca8428
%{_bindir}/tmrdemo
ca8428
%{_mandir}/man1/jiv.1*
ca8428
ca8428
ca8428
%changelog
ca8428
* Mon Jan 19 2015 Jiri Popelka <jpopelka@redhat.com> - 1.900.1-29
ca8428
- CVE-2014-8157 - dec->numtiles off-by-one check in jpc_dec_process_sot() (#1183674)
ca8428
- CVE-2014-8158 - unrestricted stack memory use in jpc_qmfb.c (#1183682)
ca8428
ca8428
* Fri Dec 12 2014 Jiri Popelka <jpopelka@redhat.com> - 1.900.1-28
ca8428
- CVE-2014-8137 - double-free in in jas_iccattrval_destroy (#1173569)
ca8428
- CVE-2014-8138 - heap overflow in jp2_decode (#1173569)
ca8428
ca8428
* Sat Dec 06 2014 Jiri Popelka <jpopelka@redhat.com> - 1.900.1-27
ca8428
- CVE-2014-9029 - incorrect component number check in COC, RGN and QCC
ca8428
                  marker segment decoders (#1171211)
ca8428
ca8428
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 1.900.1-26
ca8428
- Mass rebuild 2014-01-24
ca8428
ca8428
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.900.1-25
ca8428
- Mass rebuild 2013-12-27
ca8428
ca8428
* Mon Mar 25 2013 Jiri Popelka <jpopelka@redhat.com> - 1.900.1-24
ca8428
- added --force option to autoreconf (#925604)
ca8428
ca8428
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.900.1-23
ca8428
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
ca8428
ca8428
* Fri Jan 18 2013 Adam Tkac <atkac redhat com> - 1.900.1-22
ca8428
- rebuild due to "jpeg8-ABI" feature drop
ca8428
ca8428
* Thu Dec 06 2012 Jiri Popelka <jpopelka@redhat.com> - 1.900.1-21
ca8428
- build with -fno-strict-overflow
ca8428
ca8428
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.900.1-20
ca8428
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
ca8428
ca8428
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.900.1-19
ca8428
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
ca8428
ca8428
* Fri Dec 09 2011 Jiri Popelka <jpopelka@redhat.com> - 1.900.1-18
ca8428
- CVE-2011-4516, CVE-2011-4517 jasper: heap buffer overflow flaws
ca8428
  lead to arbitrary code execution (CERT VU#887409) (#765660)
ca8428
- Fixed problems found by static analysis of code (#761440)
ca8428
- spec file modernized
ca8428
ca8428
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.900.1-17
ca8428
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
ca8428
ca8428
* Wed Jun 30 2010 Rex Dieter <rdieter@fedoraproject.org> - 1.900.1-16
ca8428
- rebuild
ca8428
ca8428
* Sun Feb 14 2010 Rex Dieter <rdieter@fedoraproject.org> - 1.900.1-15
ca8428
- FTBFS jasper-1.900.1-14.fc12: ImplicitDSOLinking (#564794)
ca8428
ca8428
* Thu Oct 29 2009 Rex Dieter <rdieter@fedoraproject.org> - 1.900.1-14
ca8428
- add pkgconfig support
ca8428
ca8428
* Mon Oct 13 2009 Rex Dieter <rdieter@fedoraproject.org> - 1.900.1-13
ca8428
- CVE-2008-3520 jasper: multiple integer overflows in jas_alloc calls (#461476)
ca8428
- CVE-2008-3522 jasper: possible buffer overflow in 
ca8428
  jas_stream_printf() (#461478)
ca8428
ca8428
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.900.1-12
ca8428
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
ca8428
ca8428
* Sat Jul 18 2009 Rex Dieter <rdieter@fedoraproject.org> - 1.900.1-11
ca8428
- FTBFS jasper-1.900.1-10.fc11 (#511743)
ca8428
ca8428
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.900.1-10
ca8428
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
ca8428
ca8428
* Sun Jan 25 2009 Rex Dieter <rdieter@fedoraproject.org> 1.900.1-9
ca8428
- patch for "jpc_dec_tiledecode: Assertion `dec->numcomps == 3' failed)
ca8428
  (#481284, #481291)
ca8428
ca8428
* Fri Feb 08 2008 Rex Dieter <rdieter@fedoraproject.org> 1.900.1-8
ca8428
- respin (gcc43)
ca8428
ca8428
* Mon Oct 15 2007 Rex Dieter <rdieter[AT]fedoraproject.org> 1.900.1-7
ca8428
- -libs: %%post/%%postun -p /sbin/ldconfig
ca8428
ca8428
* Mon Sep 17 2007 Rex Dieter <rdieter[AT]fedoraproject.org> 1.900.1-6
ca8428
- -libs: -Requires: %%name
ca8428
- -devel: +Provides: libjasper-devel
ca8428
- drop (unused) geojasper bits
ca8428
ca8428
* Wed Aug 22 2007 Rex Dieter <rdieter[AT]fedoraproject.org> 1.900.1-4
ca8428
- -libs subpkg to be multilib friendlier
ca8428
- -utils subpkg for non-essential binaries jiv, tmrdemo (#244153)
ca8428
ca8428
* Fri Aug 17 2007 Rex Dieter <rdieter[AT]fedoraproject.org> 1.900.1-3
ca8428
- License: JasPer
ca8428
ca8428
* Wed May 23 2007 Rex Dieter <rdieter[AT]fedoraproject.org> 1.900.1-2
ca8428
- CVE-2007-2721 (#240397)
ca8428
ca8428
* Thu Mar 29 2007 Rex Dieter <rdieter[AT]fedoraproject.org> 1.900.1-1
ca8428
- jasper-1.900.1
ca8428
ca8428
* Fri Dec 08 2006 Rex Dieter <rexdieter[AT]users.sf.net> 1.900.0-3
ca8428
- omit deprecated memleak patch
ca8428
ca8428
* Fri Dec 08 2006 Rex Dieter <rexdieter[AT]users.sf.net> 1.900.0-2
ca8428
- jasper-1.900.0 (#218947)
ca8428
ca8428
* Mon Sep 18 2006 Rex Dieter <rexdieter[AT]users.sf.net> 1.701.0-15
ca8428
- memory leak (#207006)
ca8428
ca8428
* Tue Aug 29 2006 Rex Dieter <rexdieter[AT]users.sf.net> 1.701.0-13
ca8428
- fc6 respin
ca8428
ca8428
* Wed Mar 1 2006 Rex Dieter <rexdieter[AT]users.sf.net> 1.701.0-12
ca8428
- fixup build issues introduced by geojasper integration
ca8428
ca8428
* Wed Mar 1 2006 Rex Dieter <rexdieter[AT]users.sf.net> 1.701.0-10
ca8428
- support/use geojasper (optional, default no)
ca8428
- fc5: gcc/glibc respin
ca8428
ca8428
* Fri Feb 10 2006 Rex Dieter <rexdieter[AT]users.sf.net>
ca8428
- fc5: gcc/glibc respin
ca8428
ca8428
* Tue Jan 31 2006 Rex Dieter <rexdieter[AT]users.sf.net> 1.701.0-9
ca8428
- workaround "freeglut-devel should Requires: libGL-devel, libGLU-devel"
ca8428
  (#179464)
ca8428
ca8428
* Tue Jan 31 2006 Rex Dieter <rexdieter[AT]users.sf.net> 1.701.0-8
ca8428
- revert jasper to jaspertool rename (#176773)
ca8428
- actually use/apply GL patch
ca8428
ca8428
* Tue Oct 18 2005 Rex Dieter <rexdieter[AT]users.sf.net> 1.701.0-7
ca8428
- GL patch to remove libGL dependancy (using only freeglut)
ca8428
ca8428
* Tue Oct 18 2005 Rex Dieter <rexdieter[AT]users.sf.net> 1.701.0-6
ca8428
- token %%check section
ca8428
- --enable-shared 
ca8428
ca8428
* Mon Oct 17 2005 Rex Dieter <rexdieter[AT]users.sf.net> 1.701.0-5
ca8428
- use %%{?dist}
ca8428
- BR: libGL-devel 
ca8428
ca8428
* Fri Apr  7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
ca8428
- rebuilt
ca8428
ca8428
* Sat Oct 23 2004 Rex Dieter <rexdieter at sf.net> 0:1.701.0-0.fdr.3
ca8428
- Capitalize summary
ca8428
- remove 0-length ChangeLog
ca8428
ca8428
* Fri Jun 04 2004 Rex Dieter <rexdieter at sf.net> 0:1.701.0-0.fdr.2
ca8428
- nuke .la file
ca8428
- BR: glut-devel -> freeglut-devel
ca8428
ca8428
* Tue Jun 01 2004 Rex Dieter <rexdieter at sf.net> 0:1.701.0-0.fdr.1
ca8428
- 1.701.0
ca8428
ca8428
* Tue Jun 01 2004 Rex Dieter <rexdieter at sf.net> 0:1.700.5-0.fdr.2
ca8428
- avoid conflicts with fc'2 tomcat by renaming /usr/bin/jasper -> jaspertool
ca8428
ca8428
* Mon Mar 08 2004 Rex Dieter <rexdieter at sf.net> 0:1.700.5-0.fdr.1
ca8428
- use Epochs.
ca8428
- -devel: Requires: %%name = %%epoch:%%version
ca8428
ca8428
* Thu Jan 22 2004 Rex Dieter <rexdieter at sf.net> 1.700.5-0.fdr.0
ca8428
- first try
ca8428