Blame SPECS/nettle.spec

28a07f
%bcond_without fips
28a07f
28a07f
Name:           nettle
28a07f
Version:        3.4.1
b1b31a
Release:        2%{?dist}
28a07f
Summary:        A low-level cryptographic library
28a07f
28a07f
Group:          Development/Libraries
28a07f
License:        LGPLv3+ or GPLv2+
28a07f
URL:            http://www.lysator.liu.se/~nisse/nettle/
28a07f
Source0:	%{name}-%{version}-hobbled.tar.xz
28a07f
#Source0:        http://www.lysator.liu.se/~nisse/archive/%{name}-%{version}.tar.gz
28a07f
Patch0:		nettle-3.3-remove-ecc-testsuite.patch
28a07f
Patch1:		nettle-3.4-annocheck.patch
b1b31a
Patch2:		nettle-3.4.1-enable-intel-cet.patch
28a07f
28a07f
BuildRequires:  gcc
28a07f
BuildRequires:  gmp-devel, m4
28a07f
BuildRequires:	libtool, automake, autoconf, gettext-devel
28a07f
%if %{with fips}
28a07f
BuildRequires:  fipscheck
28a07f
%endif
28a07f
28a07f
Requires(post): info
28a07f
Requires(preun): info
28a07f
28a07f
28a07f
%package devel
28a07f
Summary:        Development headers for a low-level cryptographic library
28a07f
Group:          Development/Libraries
28a07f
Requires:       %{name} = %{version}-%{release}
28a07f
Requires:       gmp-devel%{?_isa}
28a07f
28a07f
%description
28a07f
Nettle is a cryptographic library that is designed to fit easily in more
28a07f
or less any context: In crypto toolkits for object-oriented languages
28a07f
(C++, Python, Pike, ...), in applications like LSH or GNUPG, or even in
28a07f
kernel space.
28a07f
28a07f
%description devel
28a07f
Nettle is a cryptographic library that is designed to fit easily in more
28a07f
or less any context: In crypto toolkits for object-oriented languages
28a07f
(C++, Python, Pike, ...), in applications like LSH or GNUPG, or even in
28a07f
kernel space.  This package contains the files needed for developing 
28a07f
applications with nettle.
28a07f
28a07f
28a07f
%prep
28a07f
%setup -q
28a07f
# Disable -ggdb3 which makes debugedit unhappy
28a07f
sed s/ggdb3/g/ -i configure
28a07f
sed 's/ecc-192.c//g' -i Makefile.in
28a07f
sed 's/ecc-224.c//g' -i Makefile.in
28a07f
%patch0 -p1
28a07f
%patch1 -p1
b1b31a
%patch2 -p1
28a07f
28a07f
%build
28a07f
autoreconf -ifv
28a07f
%configure --enable-shared --enable-fat
28a07f
make %{?_smp_mflags}
28a07f
28a07f
%if %{with fips}
28a07f
%define __spec_install_post \
28a07f
	%{?__debug_package:%{__debug_install_post}} \
28a07f
	%{__arch_install_post} \
28a07f
	%{__os_install_post} \
28a07f
	fipshmac -d $RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_libdir}/libnettle.so.6.* \
28a07f
	fipshmac -d $RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_libdir}/libhogweed.so.4.* \
28a07f
	file=`basename $RPM_BUILD_ROOT%{_libdir}/libnettle.so.6.*.hmac` && mv $RPM_BUILD_ROOT%{_libdir}/$file $RPM_BUILD_ROOT%{_libdir}/.$file && ln -s .$file $RPM_BUILD_ROOT%{_libdir}/.libnettle.so.6.hmac \
28a07f
	file=`basename $RPM_BUILD_ROOT%{_libdir}/libhogweed.so.4.*.hmac` && mv $RPM_BUILD_ROOT%{_libdir}/$file $RPM_BUILD_ROOT%{_libdir}/.$file && ln -s .$file $RPM_BUILD_ROOT%{_libdir}/.libhogweed.so.4.hmac \
28a07f
%{nil}
28a07f
%endif
28a07f
28a07f
%install
28a07f
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
28a07f
make install-shared DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
28a07f
mkdir -p $RPM_BUILD_ROOT%{_infodir}
28a07f
install -p -m 644 nettle.info $RPM_BUILD_ROOT%{_infodir}/
28a07f
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
28a07f
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
28a07f
rm -f $RPM_BUILD_ROOT%{_bindir}/nettle-lfib-stream
28a07f
rm -f $RPM_BUILD_ROOT%{_bindir}/pkcs1-conv
28a07f
rm -f $RPM_BUILD_ROOT%{_bindir}/sexp-conv
28a07f
rm -f $RPM_BUILD_ROOT%{_bindir}/nettle-hash
28a07f
rm -f $RPM_BUILD_ROOT%{_bindir}/nettle-pbkdf2
28a07f
28a07f
chmod 0755 $RPM_BUILD_ROOT%{_libdir}/libnettle.so.6.*
28a07f
chmod 0755 $RPM_BUILD_ROOT%{_libdir}/libhogweed.so.4.*
28a07f
28a07f
%check
28a07f
make check
28a07f
28a07f
%files
28a07f
%doc AUTHORS NEWS README TODO
28a07f
%license COPYINGv2 COPYING.LESSERv3
28a07f
%{_infodir}/nettle.info.gz
28a07f
%{_libdir}/libnettle.so.6
28a07f
%{_libdir}/libnettle.so.6.*
28a07f
%{_libdir}/libhogweed.so.4
28a07f
%{_libdir}/libhogweed.so.4.*
28a07f
%if %{with fips}
28a07f
%{_libdir}/.libhogweed.so.*.hmac
28a07f
%{_libdir}/.libnettle.so.*.hmac
28a07f
%endif
28a07f
28a07f
%files devel
28a07f
%doc descore.README nettle.html nettle.pdf
28a07f
%{_includedir}/nettle
28a07f
%{_libdir}/libnettle.so
28a07f
%{_libdir}/libhogweed.so
28a07f
%{_libdir}/pkgconfig/hogweed.pc
28a07f
%{_libdir}/pkgconfig/nettle.pc
28a07f
28a07f
%post
28a07f
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
28a07f
/sbin/ldconfig
28a07f
28a07f
%preun
28a07f
if [ $1 = 0 ]; then
28a07f
  /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
28a07f
fi
28a07f
28a07f
%postun -p /sbin/ldconfig
28a07f
28a07f
28a07f
28a07f
%changelog
b1b31a
* Fri May 15 2020 Anderson Sasaki <ansasaki@redhat.com> - 3.4.1-2
b1b31a
- Enable Intel CET support (#1737542)
b1b31a
28a07f
* Tue Dec 11 2018 Daiki Ueno <dueno@redhat.com> - 3.4.1-1
28a07f
- New upstream release
28a07f
28a07f
* Tue Oct 16 2018 Tomáš Mráz <tmraz@redhat.com> - 3.4-4
28a07f
- Cover the gaps in annotation coverage for assembler sources
28a07f
- Add .hmac checksums for FIPS mode integrity checking
28a07f
28a07f
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.4-2
28a07f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
28a07f
28a07f
* Mon Nov 20 2017 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.4-1
28a07f
- New upstream release
28a07f
28a07f
* Wed Aug 09 2017 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.3-5
28a07f
- Removed executables from the library to allow parallel installation
28a07f
  of x86-64 and x86 packages. The executables had testing purpose, and
28a07f
  may be re-introduced in a separate package if needed.
28a07f
28a07f
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.3-4
28a07f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
28a07f
28a07f
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.3-3
28a07f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
28a07f
28a07f
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.3-2
28a07f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
28a07f
28a07f
* Tue Jul 19 2016 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.3-1
28a07f
- New upstream release
28a07f
- Allow arm neon instructions (they are enabled via fat builds)
28a07f
28a07f
* Tue Jul 19 2016 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.2-3
28a07f
- Backported a fix for more cache silence on RSA and DSA.
28a07f
28a07f
* Thu Feb 18 2016 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.2-2
28a07f
- Enabled fat builds by default
28a07f
28a07f
* Wed Feb  3 2016 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.2-1
28a07f
- updated to 3.2 (#1301310)
28a07f
- Fixed CVE-2015-8803 secp256r1 calculation bug (#1304305)
28a07f
28a07f
* Wed Dec  9 2015 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.1.1-6
28a07f
- Made version.h architecture independent (#1289938)
28a07f
28a07f
* Wed Dec  2 2015 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.1.1-5
28a07f
- Disabled arm-neon unconditionally (#1287298)
28a07f
28a07f
* Thu Oct 22 2015 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.1.1-4
28a07f
- Fixed SHA3 implementation to conform to published version (#1252935)
28a07f
28a07f
* Sun Aug  2 2015 Peter Robinson <pbrobinson@fedoraproject.org> 3.1.1-3
28a07f
- No need to ship license in devel too
28a07f
- Drop ChangeLog as details are in NEWS
28a07f
28a07f
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.1-2
28a07f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
28a07f
28a07f
* Thu Apr 30 2015 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.1.1-1
28a07f
- Updated to nettle 3.1.1
28a07f
28a07f
* Sat Feb 21 2015 Till Maas <opensource@till.name> - 2.7.1-6
28a07f
- Rebuilt for Fedora 23 Change
28a07f
  https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code
28a07f
28a07f
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.1-5
28a07f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
28a07f
28a07f
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.1-4
28a07f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
28a07f
28a07f
* Fri Jan 10 2014 Nikos Mavrogiannopoulos <nmav@redhat.com> - 2.7.1-3
28a07f
- Corrected bug number in previous comment.
28a07f
28a07f
* Fri Dec 13 2013 Nikos Mavrogiannopoulos <nmav@redhat.com> - 2.7.1-2
28a07f
- Added patch nettle-tmpalloc.patch to solve #1051455
28a07f
28a07f
* Mon Nov 25 2013 Nikos Mavrogiannopoulos <nmav@redhat.com> - 2.7.1-1
28a07f
- Updated to nettle 2.7.1
28a07f
28a07f
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6-3
28a07f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
28a07f
28a07f
* Wed Feb  6 2013 Tomáš Mráz <tmraz@redhat.com> - 2.6-2
28a07f
- nettle includes use gmp.h
28a07f
28a07f
* Tue Feb  5 2013 Tomáš Mráz <tmraz@redhat.com> - 2.6-1
28a07f
- New upstream release
28a07f
28a07f
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4-4
28a07f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
28a07f
28a07f
* Thu Jul 05 2012 David Woodhouse <dwmw2@infradead.org> - 2.4-3
28a07f
- Remove explicit buildroot handling and defattr.
28a07f
28a07f
* Wed Jul 04 2012 David Woodhouse <dwmw2@infradead.org> - 2.4-2
28a07f
- Review feedback
28a07f
28a07f
* Mon Jun 18 2012 David Woodhouse <dwmw2@infradead.org> - 2.4-1
28a07f
- Revive package (GnuTLS needs it), disable static, update to current release 2.4
28a07f
28a07f
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.15-7
28a07f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
28a07f
28a07f
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.15-6
28a07f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
28a07f
28a07f
* Thu Apr 10 2008 Ian Weller <ianweller@gmail.com> 1.15-5
28a07f
- Moved static lib to -static
28a07f
28a07f
* Mon Mar 24 2008 Ian Weller <ianweller@gmail.com> 1.15-4
28a07f
- Added libraries and ldconfig
28a07f
28a07f
* Mon Feb 18 2008 Ian Weller <ianweller@gmail.com> 1.15-3
28a07f
- Added provides -static to -devel
28a07f
28a07f
* Sun Feb 17 2008 Ian Weller <ianweller@gmail.com> 1.15-2
28a07f
- Removed redundant requires
28a07f
- Removed redundant documentation between packages
28a07f
- Fixed license tag
28a07f
- Fixed -devel description
28a07f
- Added the static library back to -devel
28a07f
- Added make clean
28a07f
28a07f
* Fri Feb 08 2008 Ian Weller <ianweller@gmail.com> 1.15-1
28a07f
- First package build.