Blame SPECS/nettle.spec

661b5b
Name:           nettle
c687f3
Version:        2.7.1
b0ccf1
Release:        8%{?dist}
661b5b
Summary:        A low-level cryptographic library
661b5b
661b5b
Group:          Development/Libraries
661b5b
License:        LGPLv2+
661b5b
URL:            http://www.lysator.liu.se/~nisse/nettle/
c687f3
Source0:	%{name}-%{version}-hobbled.tar.gz
c687f3
#Source0:        http://www.lysator.liu.se/~nisse/archive/%{name}-%{version}.tar.gz
c687f3
Patch0:		nettle-2.7.1-remove-ecc-testsuite.patch
c687f3
Patch1:		nettle-2.7.1-tmpalloc.patch
b0ccf1
Patch2:		nettle-2.7.1-sha3-fix.patch
b0ccf1
Patch3:		nettle-2.7.1-ecc-cve.patch
b0ccf1
Patch4:		nettle-2.7.1-powm-sec.patch
661b5b
661b5b
BuildRequires:  gmp-devel m4 texinfo-tex texlive-dvips ghostscript
b0ec10
BuildRequires:  fipscheck
b0ccf1
BuildRequires:	libtool, automake, autoconf, texinfo
661b5b
661b5b
Requires(post): info
661b5b
Requires(preun): info
661b5b
661b5b
661b5b
%package devel
661b5b
Summary:        Development headers for a low-level cryptographic library
661b5b
Group:          Development/Libraries
661b5b
Requires:       %{name} = %{version}-%{release}
661b5b
Requires:       gmp-devel%{?_isa}
661b5b
661b5b
%description
661b5b
Nettle is a cryptographic library that is designed to fit easily in more
661b5b
or less any context: In crypto toolkits for object-oriented languages
661b5b
(C++, Python, Pike, ...), in applications like LSH or GNUPG, or even in
661b5b
kernel space.
661b5b
661b5b
%description devel
661b5b
Nettle is a cryptographic library that is designed to fit easily in more
661b5b
or less any context: In crypto toolkits for object-oriented languages
661b5b
(C++, Python, Pike, ...), in applications like LSH or GNUPG, or even in
c687f3
kernel space.  This package contains the files needed for developing 
c687f3
applications with nettle.
661b5b
661b5b
661b5b
%prep
661b5b
%setup -q
661b5b
# Disable -ggdb3 which makes debugedit unhappy
661b5b
sed s/ggdb3/g/ -i configure
c687f3
sed 's/ecc-192.c//g' -i Makefile.in
c687f3
sed 's/ecc-224.c//g' -i Makefile.in
c687f3
%patch0 -p1
c687f3
%patch1 -p1 -b .tmpalloc
b0ccf1
%patch2 -p1 -b .sha3
b0ccf1
%patch3 -p1 -b .ecc-cve
b0ccf1
%patch4 -p1 -b .powm-sec
661b5b
661b5b
%build
661b5b
%configure --enable-shared
661b5b
make %{?_smp_mflags}
661b5b
b0ec10
%define __spec_install_post \
b0ec10
	%{?__debug_package:%{__debug_install_post}} \
b0ec10
	%{__arch_install_post} \
b0ec10
	%{__os_install_post} \
b0ec10
	fipshmac -d $RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_libdir}/libnettle.so.4.* \
b0ec10
	fipshmac -d $RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_libdir}/libhogweed.so.2.* \
b0ec10
	file=`basename $RPM_BUILD_ROOT%{_libdir}/libnettle.so.4.*.hmac` && mv $RPM_BUILD_ROOT%{_libdir}/$file $RPM_BUILD_ROOT%{_libdir}/.$file && ln -s .$file $RPM_BUILD_ROOT%{_libdir}/.libnettle.so.4.hmac \
b0ec10
	file=`basename $RPM_BUILD_ROOT%{_libdir}/libhogweed.so.2.*.hmac` && mv $RPM_BUILD_ROOT%{_libdir}/$file $RPM_BUILD_ROOT%{_libdir}/.$file && ln -s .$file $RPM_BUILD_ROOT%{_libdir}/.libhogweed.so.2.hmac \
b0ec10
%{nil}
b0ec10
661b5b
661b5b
%install
661b5b
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
661b5b
make install-shared DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
661b5b
mkdir -p $RPM_BUILD_ROOT%{_infodir}
661b5b
install -p -m 644 nettle.info $RPM_BUILD_ROOT%{_infodir}/
661b5b
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
661b5b
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
661b5b
chmod 0755 $RPM_BUILD_ROOT%{_libdir}/libnettle.so.4.*
661b5b
chmod 0755 $RPM_BUILD_ROOT%{_libdir}/libhogweed.so.2.*
661b5b
%check
661b5b
make check
661b5b
661b5b
%files
661b5b
%doc AUTHORS ChangeLog COPYING.LIB NEWS README TODO
661b5b
%{_infodir}/nettle.info.gz
661b5b
%{_bindir}/nettle-lfib-stream
661b5b
%{_bindir}/pkcs1-conv
661b5b
%{_bindir}/sexp-conv
661b5b
%{_bindir}/nettle-hash
661b5b
%{_libdir}/libnettle.so.4
661b5b
%{_libdir}/libnettle.so.4.*
661b5b
%{_libdir}/libhogweed.so.2
661b5b
%{_libdir}/libhogweed.so.2.*
b0ec10
%{_libdir}/.libhogweed.so.*.hmac
b0ec10
%{_libdir}/.libnettle.so.*.hmac
661b5b
661b5b
661b5b
%files devel
661b5b
%doc descore.README nettle.html nettle.pdf COPYING.LIB
661b5b
%{_includedir}/nettle
661b5b
%{_libdir}/libnettle.so
661b5b
%{_libdir}/libhogweed.so
661b5b
%{_libdir}/pkgconfig/hogweed.pc
661b5b
%{_libdir}/pkgconfig/nettle.pc
661b5b
661b5b
%post
661b5b
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
661b5b
/sbin/ldconfig
661b5b
661b5b
%preun
661b5b
if [ $1 = 0 ]; then
661b5b
  /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
661b5b
fi
661b5b
661b5b
%postun -p /sbin/ldconfig
661b5b
661b5b
661b5b
661b5b
%changelog
b0ccf1
* Mon Aug  8 2016 Nikos Mavrogiannopoulos <nmav@redhat.com> - 2.7.1-8
b0ccf1
- Use a cache-silent version of mpz_powm to prevent cache-timing
b0ccf1
  attacks against RSA and DSA in shared VMs. (#1364897,CVE-2016-6489)
b0ccf1
b0ccf1
* Wed Mar  2 2016 Nikos Mavrogiannopoulos <nmav@redhat.com> - 2.7.1-5
b0ccf1
- Fixed SHA-3 implementation to conform to final standard (#1252936)
b0ccf1
- Fixed CVE-2015-8803 CVE-2015-8804 CVE-2015-8805 which caused issues
b0ccf1
  in secp256r1 and secp384r1 calculations (#1314374)
b0ccf1
b0ec10
* Tue Jul 29 2014 Nikos Mavrogiannopoulos <nmav@redhat.com> - 2.7.1-4
b0ec10
- Correct path of links (#1117782)
b0ec10
b0ec10
* Mon Jul 28 2014 Nikos Mavrogiannopoulos <nmav@redhat.com> - 2.7.1-3
b0ec10
- Added fipshmac checksum (#1117782)
b0ec10
c687f3
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 2.7.1-2
c687f3
- Mass rebuild 2014-01-24
c687f3
c687f3
* Wed Jan 15 2014 Tomáš Mráz <tmraz@redhat.com> - 2.7.1-1
c687f3
- Updated to nettle 2.7.1
c687f3
c687f3
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 2.6-4
c687f3
- Mass rebuild 2013-12-27
c687f3
c687f3
* Fri Dec 13 2013 Nikos Mavrogiannopoulos <nmav@redhat.com> - 2.6-3
c687f3
- Added patch nettle-tmpalloc.patch (#1033570)
c687f3
661b5b
* Wed Feb  6 2013 Tomáš Mráz <tmraz@redhat.com> - 2.6-2
661b5b
- nettle includes use gmp.h
661b5b
661b5b
* Tue Feb  5 2013 Tomáš Mráz <tmraz@redhat.com> - 2.6-1
661b5b
- New upstream release
661b5b
661b5b
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4-4
661b5b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
661b5b
661b5b
* Thu Jul 05 2012 David Woodhouse <dwmw2@infradead.org> - 2.4-3
661b5b
- Remove explicit buildroot handling and defattr.
661b5b
661b5b
* Wed Jul 04 2012 David Woodhouse <dwmw2@infradead.org> - 2.4-2
661b5b
- Review feedback
661b5b
661b5b
* Mon Jun 18 2012 David Woodhouse <dwmw2@infradead.org> - 2.4-1
661b5b
- Revive package (GnuTLS needs it), disable static, update to current release 2.4
661b5b
661b5b
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.15-7
661b5b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
661b5b
661b5b
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.15-6
661b5b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
661b5b
661b5b
* Thu Apr 10 2008 Ian Weller <ianweller@gmail.com> 1.15-5
661b5b
- Moved static lib to -static
661b5b
661b5b
* Mon Mar 24 2008 Ian Weller <ianweller@gmail.com> 1.15-4
661b5b
- Added libraries and ldconfig
661b5b
661b5b
* Mon Feb 18 2008 Ian Weller <ianweller@gmail.com> 1.15-3
661b5b
- Added provides -static to -devel
661b5b
661b5b
* Sun Feb 17 2008 Ian Weller <ianweller@gmail.com> 1.15-2
661b5b
- Removed redundant requires
661b5b
- Removed redundant documentation between packages
661b5b
- Fixed license tag
661b5b
- Fixed -devel description
661b5b
- Added the static library back to -devel
661b5b
- Added make clean
661b5b
661b5b
* Fri Feb 08 2008 Ian Weller <ianweller@gmail.com> 1.15-1
661b5b
- First package build.