36743d7
34320dc
# NOTE: packages that can use jasper:
36743d7
# ImageMagick
36743d7
# netpbm
36743d7
36743d7
Summary: Implementation of the JPEG-2000 standard, Part 1
85fc436
Name:    jasper
85fc436
Group:   System Environment/Libraries
0d6a035
Version: 1.900.1
f9ae9f5
Release: 21%{?dist}
71e660f
6a36164
License: JasPer
c73923e
URL:     http://www.ece.uvic.ca/~frodo/jasper/
c73923e
Source0: http://www.ece.uvic.ca/~frodo/jasper/software/jasper-%{version}.zip
36743d7
5564610
Patch1: jasper-1.701.0-GL.patch
422270c
# autoconf/automake bits of patch1
422270c
Patch2: jasper-1.701.0-GL-ac.patch
a52270f
# CVE-2007-2721 (bug #240397)
a52270f
# borrowed from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=413041;msg=88
a52270f
Patch3: patch-libjasper-stepsizes-overflow.diff
9f262ed
# borrowed from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=469786 
9f262ed
Patch4: jpc_dec.c.patch
1c0f91f
# OpenBSD hardening patches addressing couple of possible integer overflows
1c0f91f
# during the memory allocations
1c0f91f
# https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2008-3520
1c0f91f
Patch5: jasper-1.900.1-CVE-2008-3520.patch
1c0f91f
# https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2008-3522
1c0f91f
Patch6: jasper-1.900.1-CVE-2008-3522.patch
8210e5a
# add pkg-config support
8210e5a
Patch7: jasper-pkgconfig.patch
5564610
c73923e
Patch8: jasper-1.900.1-CVE-2011-4516-CVE-2011-4517-CERT-VU-887409.patch
c73923e
c73923e
# Issues found by static analysis of code
c73923e
Patch10: jasper-1.900.1-Coverity-BAD_SIZEOF.patch
c73923e
Patch11: jasper-1.900.1-Coverity-CHECKED_RETURN.patch
c73923e
Patch12: jasper-1.900.1-Coverity-FORWARD_NULL.patch
c73923e
Patch13: jasper-1.900.1-Coverity-NULL_RETURNS.patch
c73923e
Patch14: jasper-1.900.1-Coverity-RESOURCE_LEAK.patch
c73923e
Patch15: jasper-1.900.1-Coverity-UNREACHABLE.patch
c73923e
Patch16: jasper-1.900.1-Coverity-UNUSED_VALUE.patch
c73923e
8210e5a
BuildRequires: automake libtool
220401e
BuildRequires: freeglut-devel 
220401e
BuildRequires: libGLU-devel
8210e5a
BuildRequires: libjpeg-devel
8210e5a
BuildRequires: pkgconfig
36743d7
c73923e
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
22a6c72
36743d7
%description
36743d7
This package contains an implementation of the image compression
36743d7
standard JPEG-2000, Part 1. It consists of tools for conversion to and
36743d7
from the JP2 and JPC formats.
36743d7
36743d7
%package devel
ad50a46
Summary: Header files, libraries and developer documentation
36743d7
Group:   Development/Libraries
c5cba16
Provides: libjasper-devel = %{version}-%{release}
c73923e
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
36743d7
Requires: libjpeg-devel
8210e5a
Requires: pkgconfig
85fc436
%description devel
9c08482
%{summary}.
36743d7
2971918
%package libs 
ad50a46
Summary: Runtime libraries for %{name}
ad50a46
Group:   System Environment/Libraries
220401e
Conflicts: jasper < 1.900.1-4
2971918
%description libs 
2971918
%{summary}.
2971918
2971918
%package utils 
ad50a46
Summary: Nonessential utilities for %{name}
2971918
Group:   Development/Libraries
2971918
Requires: %{name} = %{version}-%{release}
c73923e
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
2971918
%description utils 
2971918
%{summary}, including jiv and tmrdemo.
2971918
2971918
36743d7
36743d7
%prep
c5cba16
%setup -q -n %{name}-%{version}
36743d7
5564610
%patch1 -p1 -b .GL
8210e5a
%patch2 -p1 -b .GL-ac
a52270f
%patch3 -p1 -b .CVE-2007-2721
9f262ed
%patch4 -p1 -b .jpc_dec_assertion
1c0f91f
%patch5 -p1 -b .CVE-2008-3520
1c0f91f
%patch6 -p1 -b .CVE-2008-3522
8210e5a
%patch7 -p1 -b .pkgconfig
c73923e
%patch8 -p1 -b .CVE-2011-4516-4517
c73923e
c73923e
%patch10 -p1 -b .BAD_SIZEOF
c73923e
%patch11 -p1 -b .CHECKED_RETURN
c73923e
%patch12 -p1 -b .FORWARD_NULL
c73923e
%patch13 -p1 -b .NULL_RETURNS
c73923e
%patch14 -p1 -b .RESOURCE_LEAK
c73923e
%patch15 -p1 -b .UNREACHABLE
c73923e
%patch16 -p1 -b .UNUSED_VALUE
8210e5a
8210e5a
autoreconf -i
5564610
a52270f
36743d7
%build
cd2a97a
f9ae9f5
# jas_icc.c:744:2: warning: assuming signed overflow does not occur
f9ae9f5
# when assuming that (X + c) < X is always false [-Wstrict-overflow]
f9ae9f5
#
f9ae9f5
# comment from Red Hat Security Response Team:
f9ae9f5
# gcc inlines jas_iccattrtab_resize into jas_iccattrtab_add. Additionally, it
f9ae9f5
# essentially removes the "assert(maxents >= tab->numattrs);" assertion in
f9ae9f5
# jas_iccattrtab_resize, because it assumes that "maxents >= tab->numattrs" will
f9ae9f5
# always be true due to jas_iccattrtab_resize(attrtab, attrtab->numattrs + 32),
f9ae9f5
# especially the + 32. This assumption can only be true if it completely ignores
f9ae9f5
# the problem of signed integer overflows. I don't think it's a smart idea to
f9ae9f5
# accept that.
f9ae9f5
# -fno-strict-overflow forces gcc into keeping the assertion there.
f9ae9f5
CFLAGS="%{optflags} -fno-strict-overflow" \
36743d7
%configure \
89b65bb
  --enable-shared \
9c08482
  --disable-static 
36743d7
85fc436
make %{?_smp_mflags}
36743d7
36743d7
36743d7
%install
9c08482
85fc436
make install DESTDIR=$RPM_BUILD_ROOT
36743d7
36743d7
# Unpackaged files
36743d7
rm -f doc/README
9c08482
rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.la
36743d7
36743d7
34320dc
%check
34320dc
make check
34320dc
34320dc
34320dc
ad50a46
%post libs -p /sbin/ldconfig
34320dc
ad50a46
%postun libs -p /sbin/ldconfig
34320dc
34320dc
36743d7
%files
5564610
%{_bindir}/imgcmp
5564610
%{_bindir}/imginfo
2971918
%{_bindir}/jasper
2971918
%{_mandir}/man1/img*
2971918
%{_mandir}/man1/jasper.1*
36743d7
85fc436
%files devel
36743d7
%doc doc/*
cd2a97a
%{_includedir}/jasper/
9f262ed
%{_libdir}/libjasper.so
8210e5a
%{_libdir}/pkgconfig/jasper.pc
36743d7
2971918
%files libs
c5cba16
%doc COPYRIGHT LICENSE NEWS README
9f262ed
%{_libdir}/libjasper.so.1*
2971918
2971918
%files utils
2971918
%{_bindir}/jiv
2971918
%{_bindir}/tmrdemo
2971918
%{_mandir}/man1/jiv.1*
2971918
36743d7
85fc436
%changelog
f9ae9f5
* Thu Dec 06 2012 Jiri Popelka <jpopelka@redhat.com> - 1.900.1-21
f9ae9f5
- build with -fno-strict-overflow
f9ae9f5
8d8eca9
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.900.1-20
8d8eca9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
8d8eca9
b2aef1b
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.900.1-19
b2aef1b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
b2aef1b
c73923e
* Fri Dec 09 2011 Jiri Popelka <jpopelka@redhat.com> - 1.900.1-18
c73923e
- CVE-2011-4516, CVE-2011-4517 jasper: heap buffer overflow flaws
c73923e
  lead to arbitrary code execution (CERT VU#887409) (#765660)
c73923e
- Fixed problems found by static analysis of code (#761440)
c73923e
- spec file modernized
c73923e
927cdea
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.900.1-17
927cdea
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
927cdea
7f3c6dd
* Wed Jun 30 2010 Rex Dieter <rdieter@fedoraproject.org> - 1.900.1-16
7f3c6dd
- rebuild
7f3c6dd
1166674
* Sun Feb 14 2010 Rex Dieter <rdieter@fedoraproject.org> - 1.900.1-15
1166674
- FTBFS jasper-1.900.1-14.fc12: ImplicitDSOLinking (#564794)
1166674
8210e5a
* Thu Oct 29 2009 Rex Dieter <rdieter@fedoraproject.org> - 1.900.1-14
8210e5a
- add pkgconfig support
8210e5a
1c0f91f
* Mon Oct 13 2009 Rex Dieter <rdieter@fedoraproject.org> - 1.900.1-13
1c0f91f
- CVE-2008-3520 jasper: multiple integer overflows in jas_alloc calls (#461476)
1c0f91f
- CVE-2008-3522 jasper: possible buffer overflow in 
1c0f91f
  jas_stream_printf() (#461478)
1c0f91f
c474ec6
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.900.1-12
c474ec6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
c474ec6
220401e
* Sat Jul 18 2009 Rex Dieter <rdieter@fedoraproject.org> - 1.900.1-11
220401e
- FTBFS jasper-1.900.1-10.fc11 (#511743)
220401e
c1fb5d4
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.900.1-10
c1fb5d4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
c1fb5d4
9f262ed
* Sun Jan 25 2009 Rex Dieter <rdieter@fedoraproject.org> 1.900.1-9
9f262ed
- patch for "jpc_dec_tiledecode: Assertion `dec->numcomps == 3' failed)
9f262ed
  (#481284, #481291)
9f262ed
519a20f
* Fri Feb 08 2008 Rex Dieter <rdieter@fedoraproject.org> 1.900.1-8
519a20f
- respin (gcc43)
519a20f
ad50a46
* Mon Oct 15 2007 Rex Dieter <rdieter[AT]fedoraproject.org> 1.900.1-7
ad50a46
- -libs: %%post/%%postun -p /sbin/ldconfig
ad50a46
22a6c72
* Mon Sep 17 2007 Rex Dieter <rdieter[AT]fedoraproject.org> 1.900.1-6
22a6c72
- -libs: -Requires: %%name
22a6c72
- -devel: +Provides: libjasper-devel
c5cba16
- drop (unused) geojasper bits
c5cba16
2971918
* Wed Aug 22 2007 Rex Dieter <rdieter[AT]fedoraproject.org> 1.900.1-4
2971918
- -libs subpkg to be multilib friendlier
2971918
- -utils subpkg for non-essential binaries jiv, tmrdemo (#244153)
2971918
6a36164
* Fri Aug 17 2007 Rex Dieter <rdieter[AT]fedoraproject.org> 1.900.1-3
6a36164
- License: JasPer
6a36164
a52270f
* Wed May 23 2007 Rex Dieter <rdieter[AT]fedoraproject.org> 1.900.1-2
a52270f
- CVE-2007-2721 (#240397)
a52270f
0d6a035
* Thu Mar 29 2007 Rex Dieter <rdieter[AT]fedoraproject.org> 1.900.1-1
0d6a035
- jasper-1.900.1
0d6a035
8a381b5
* Fri Dec 08 2006 Rex Dieter <rexdieter[AT]users.sf.net> 1.900.0-3
8a381b5
- omit deprecated memleak patch
8a381b5
656e9a8
* Fri Dec 08 2006 Rex Dieter <rexdieter[AT]users.sf.net> 1.900.0-2
dde856a
- jasper-1.900.0 (#218947)
eee7cff
ebbe666
* Mon Sep 18 2006 Rex Dieter <rexdieter[AT]users.sf.net> 1.701.0-15
0b5f866
- memory leak (#207006)
0b5f866
99a59b1
* Tue Aug 29 2006 Rex Dieter <rexdieter[AT]users.sf.net> 1.701.0-13
99a59b1
- fc6 respin
99a59b1
7cf76da
* Wed Mar 1 2006 Rex Dieter <rexdieter[AT]users.sf.net> 1.701.0-12
422270c
- fixup build issues introduced by geojasper integration
422270c
cd2a97a
* Wed Mar 1 2006 Rex Dieter <rexdieter[AT]users.sf.net> 1.701.0-10
cd2a97a
- support/use geojasper (optional, default no)
cd2a97a
- fc5: gcc/glibc respin
cd2a97a
b7ce063
* Fri Feb 10 2006 Rex Dieter <rexdieter[AT]users.sf.net>
b7ce063
- fc5: gcc/glibc respin
b7ce063
3ff7691
* Tue Jan 31 2006 Rex Dieter <rexdieter[AT]users.sf.net> 1.701.0-9
3ff7691
- workaround "freeglut-devel should Requires: libGL-devel, libGLU-devel"
3ff7691
  (#179464)
3ff7691
5564610
* Tue Jan 31 2006 Rex Dieter <rexdieter[AT]users.sf.net> 1.701.0-8
5564610
- revert jasper to jaspertool rename (#176773)
5564610
- actually use/apply GL patch
5564610
89b65bb
* Tue Oct 18 2005 Rex Dieter <rexdieter[AT]users.sf.net> 1.701.0-7
89b65bb
- GL patch to remove libGL dependancy (using only freeglut)
89b65bb
89b65bb
* Tue Oct 18 2005 Rex Dieter <rexdieter[AT]users.sf.net> 1.701.0-6
89b65bb
- token %%check section
89b65bb
- --enable-shared 
89b65bb
9c08482
* Mon Oct 17 2005 Rex Dieter <rexdieter[AT]users.sf.net> 1.701.0-5
9c08482
- use %%{?dist}
7644efe
- BR: libGL-devel 
9c08482
71e660f
* Fri Apr  7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
71e660f
- rebuilt
71e660f
36743d7
* Sat Oct 23 2004 Rex Dieter <rexdieter at sf.net> 0:1.701.0-0.fdr.3
36743d7
- Capitalize summary
36743d7
- remove 0-length ChangeLog
36743d7
36743d7
* Fri Jun 04 2004 Rex Dieter <rexdieter at sf.net> 0:1.701.0-0.fdr.2
36743d7
- nuke .la file
36743d7
- BR: glut-devel -> freeglut-devel
36743d7
36743d7
* Tue Jun 01 2004 Rex Dieter <rexdieter at sf.net> 0:1.701.0-0.fdr.1
36743d7
- 1.701.0
36743d7
36743d7
* Tue Jun 01 2004 Rex Dieter <rexdieter at sf.net> 0:1.700.5-0.fdr.2
36743d7
- avoid conflicts with fc'2 tomcat by renaming /usr/bin/jasper -> jaspertool
36743d7
36743d7
* Mon Mar 08 2004 Rex Dieter <rexdieter at sf.net> 0:1.700.5-0.fdr.1
36743d7
- use Epochs.
36743d7
- -devel: Requires: %%name = %%epoch:%%version
36743d7
36743d7
* Thu Jan 22 2004 Rex Dieter <rexdieter at sf.net> 1.700.5-0.fdr.0
36743d7
- first try
36743d7