e0682aa
# Recent so-version, so we do not bump accidentally.
e0682aa
%global nettle_so_ver 7
e0682aa
%global hogweed_so_ver 5
e0682aa
522051e
# Set to 1 when building a bootstrap for a bumped so-name.
1d839d6
%global bootstrap 1
522051e
522051e
%if 0%{?bootstrap}
522051e
%global version_old 3.4.1rc1
522051e
%global nettle_so_ver_old 6
522051e
%global hogweed_so_ver_old 4
522051e
%endif
522051e
Nikos Mavrogiannopoulos 0ea54a2
%bcond_without fips
Nikos Mavrogiannopoulos 0ea54a2
David Woodhouse b8acc93
Name:           nettle
Nikos Mavrogiannopoulos a634a64
Version:        3.5.1
d3766f2
Release:        3%{?dist}
David Woodhouse b8acc93
Summary:        A low-level cryptographic library
David Woodhouse b8acc93
Nikos Mavrogiannopoulos 23b2da4
License:        LGPLv3+ or GPLv2+
David Woodhouse b8acc93
URL:            http://www.lysator.liu.se/~nisse/nettle/
Nikos Mavrogiannopoulos 2b25156
Source0:	%{name}-%{version}-hobbled.tar.xz
Nikos Mavrogiannopoulos b71d500
#Source0:        http://www.lysator.liu.se/~nisse/archive/%{name}-%{version}.tar.gz
522051e
%if 0%{?bootstrap}
522051e
Source1:	%{name}-%{version_old}-hobbled.tar.xz
522051e
Source2:	nettle-3.3-remove-ecc-testsuite.patch
522051e
%endif
Nikos Mavrogiannopoulos a634a64
Patch0:		nettle-3.5-remove-ecc-testsuite.patch
5b3470b
Patch1:		nettle-3.4-annocheck.patch
David Woodhouse b8acc93
233a840
BuildRequires:  gcc
Nikos Mavrogiannopoulos d3e0d66
BuildRequires:  gmp-devel, m4
Nikos Mavrogiannopoulos 4ddebeb
BuildRequires:	libtool, automake, autoconf, gettext-devel
Nikos Mavrogiannopoulos 0ea54a2
%if %{with fips}
233a840
BuildRequires:  fipscheck
Nikos Mavrogiannopoulos 0ea54a2
%endif
David Woodhouse b8acc93
David Woodhouse b8acc93
%package devel
David Woodhouse b8acc93
Summary:        Development headers for a low-level cryptographic library
David Woodhouse b8acc93
Requires:       %{name} = %{version}-%{release}
1fc0040
Requires:       gmp-devel%{?_isa}
David Woodhouse b8acc93
David Woodhouse b8acc93
%description
David Woodhouse b8acc93
Nettle is a cryptographic library that is designed to fit easily in more
David Woodhouse b8acc93
or less any context: In crypto toolkits for object-oriented languages
David Woodhouse b8acc93
(C++, Python, Pike, ...), in applications like LSH or GNUPG, or even in
David Woodhouse b8acc93
kernel space.
David Woodhouse b8acc93
David Woodhouse b8acc93
%description devel
David Woodhouse b8acc93
Nettle is a cryptographic library that is designed to fit easily in more
David Woodhouse b8acc93
or less any context: In crypto toolkits for object-oriented languages
David Woodhouse b8acc93
(C++, Python, Pike, ...), in applications like LSH or GNUPG, or even in
Nikos Mavrogiannopoulos 93d7561
kernel space.  This package contains the files needed for developing 
Nikos Mavrogiannopoulos 93d7561
applications with nettle.
David Woodhouse b8acc93
David Woodhouse b8acc93
David Woodhouse b8acc93
%prep
522051e
%autosetup -Tb 0 -p1
522051e
522051e
%if 0%{?bootstrap}
522051e
mkdir -p bootstrap_ver
522051e
pushd bootstrap_ver
522051e
tar --strip-components=1 -xf %{SOURCE1}
522051e
patch -p1 < %{SOURCE2}
522051e
522051e
# Disable -ggdb3 which makes debugedit unhappy
522051e
sed s/ggdb3/g/ -i configure
522051e
sed 's/ecc-192.c//g' -i Makefile.in
522051e
sed 's/ecc-224.c//g' -i Makefile.in
522051e
popd
522051e
%endif
522051e
David Woodhouse b8acc93
# Disable -ggdb3 which makes debugedit unhappy
David Woodhouse b8acc93
sed s/ggdb3/g/ -i configure
Nikos Mavrogiannopoulos b71d500
sed 's/ecc-192.c//g' -i Makefile.in
Nikos Mavrogiannopoulos b71d500
sed 's/ecc-224.c//g' -i Makefile.in
David Woodhouse b8acc93
David Woodhouse b8acc93
%build
Nikos Mavrogiannopoulos 4ddebeb
autoreconf -ifv
Nikos Mavrogiannopoulos d3e0d66
%configure --enable-shared --enable-fat
David Woodhouse b8acc93
make %{?_smp_mflags}
David Woodhouse b8acc93
522051e
%if 0%{?bootstrap}
522051e
pushd bootstrap_ver
522051e
autoconf
522051e
%configure --with-tests
522051e
%make_build
522051e
popd
522051e
%endif
522051e
Nikos Mavrogiannopoulos 0ea54a2
%if %{with fips}
825ca61
%define fipshmac() \
825ca61
	fipshmac -d $RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_libdir}/%1.* \
825ca61
	file=`basename $RPM_BUILD_ROOT%{_libdir}/%1.*.hmac` && \
825ca61
	mv $RPM_BUILD_ROOT%{_libdir}/$file $RPM_BUILD_ROOT%{_libdir}/.$file && \
825ca61
	ln -s .$file $RPM_BUILD_ROOT%{_libdir}/.%1.hmac
825ca61
522051e
%if 0%{?bootstrap}
522051e
%define bootstrap_fips 1
522051e
%endif
522051e
Nikos Mavrogiannopoulos 0ea54a2
%define __spec_install_post \
Nikos Mavrogiannopoulos 0ea54a2
	%{?__debug_package:%{__debug_install_post}} \
Nikos Mavrogiannopoulos 0ea54a2
	%{__arch_install_post} \
Nikos Mavrogiannopoulos 0ea54a2
	%{__os_install_post} \
825ca61
	%fipshmac libnettle.so.%{nettle_so_ver} \
825ca61
	%fipshmac libhogweed.so.%{hogweed_so_ver} \
522051e
	%{?bootstrap_fips:%fipshmac libnettle.so.%{nettle_so_ver_old}} \
522051e
	%{?bootstrap_fips:%fipshmac libhogweed.so.%{hogweed_so_ver_old}} \
Nikos Mavrogiannopoulos 0ea54a2
%{nil}
Nikos Mavrogiannopoulos 0ea54a2
%endif
David Woodhouse b8acc93
522051e
David Woodhouse b8acc93
%install
522051e
%if 0%{?bootstrap}
522051e
make -C bootstrap_ver install-shared-nettle DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
522051e
make -C bootstrap_ver install-shared-hogweed DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
522051e
522051e
chmod 0755 $RPM_BUILD_ROOT%{_libdir}/libnettle.so.%{nettle_so_ver_old}.*
522051e
chmod 0755 $RPM_BUILD_ROOT%{_libdir}/libhogweed.so.%{hogweed_so_ver_old}.*
522051e
%endif
522051e
David Woodhouse b8acc93
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
David Woodhouse b8acc93
make install-shared DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
David Woodhouse b8acc93
mkdir -p $RPM_BUILD_ROOT%{_infodir}
David Woodhouse b8acc93
install -p -m 644 nettle.info $RPM_BUILD_ROOT%{_infodir}/
David Woodhouse b8acc93
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
David Woodhouse b8acc93
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
Nikos Mavrogiannopoulos 2ec204e
rm -f $RPM_BUILD_ROOT%{_bindir}/nettle-lfib-stream
Nikos Mavrogiannopoulos 2ec204e
rm -f $RPM_BUILD_ROOT%{_bindir}/pkcs1-conv
Nikos Mavrogiannopoulos 2ec204e
rm -f $RPM_BUILD_ROOT%{_bindir}/sexp-conv
Nikos Mavrogiannopoulos 2ec204e
rm -f $RPM_BUILD_ROOT%{_bindir}/nettle-hash
Nikos Mavrogiannopoulos 2ec204e
rm -f $RPM_BUILD_ROOT%{_bindir}/nettle-pbkdf2
Nikos Mavrogiannopoulos 2ec204e
e0682aa
chmod 0755 $RPM_BUILD_ROOT%{_libdir}/libnettle.so.%{nettle_so_ver}.*
e0682aa
chmod 0755 $RPM_BUILD_ROOT%{_libdir}/libhogweed.so.%{hogweed_so_ver}.*
af9aba9
David Woodhouse b8acc93
%check
David Woodhouse b8acc93
make check
David Woodhouse b8acc93
David Woodhouse b8acc93
%files
Nikos Mavrogiannopoulos a634a64
%doc AUTHORS NEWS README
Nikos Mavrogiannopoulos 23b2da4
%license COPYINGv2 COPYING.LESSERv3
fb2b558
%{_infodir}/nettle.info.*
e0682aa
%{_libdir}/libnettle.so.%{nettle_so_ver}
e0682aa
%{_libdir}/libnettle.so.%{nettle_so_ver}.*
e0682aa
%{_libdir}/libhogweed.so.%{hogweed_so_ver}
e0682aa
%{_libdir}/libhogweed.so.%{hogweed_so_ver}.*
522051e
%if 0%{?bootstrap}
522051e
%{_libdir}/libnettle.so.%{nettle_so_ver_old}
522051e
%{_libdir}/libnettle.so.%{nettle_so_ver_old}.*
522051e
%{_libdir}/libhogweed.so.%{hogweed_so_ver_old}
522051e
%{_libdir}/libhogweed.so.%{hogweed_so_ver_old}.*
522051e
%endif
Nikos Mavrogiannopoulos 0ea54a2
%if %{with fips}
Nikos Mavrogiannopoulos 0ea54a2
%{_libdir}/.libhogweed.so.*.hmac
Nikos Mavrogiannopoulos 0ea54a2
%{_libdir}/.libnettle.so.*.hmac
Nikos Mavrogiannopoulos 0ea54a2
%endif
David Woodhouse b8acc93
David Woodhouse b8acc93
%files devel
Nikos Mavrogiannopoulos 23b2da4
%doc descore.README nettle.html nettle.pdf
David Woodhouse b8acc93
%{_includedir}/nettle
David Woodhouse b8acc93
%{_libdir}/libnettle.so
David Woodhouse b8acc93
%{_libdir}/libhogweed.so
David Woodhouse b8acc93
%{_libdir}/pkgconfig/hogweed.pc
David Woodhouse b8acc93
%{_libdir}/pkgconfig/nettle.pc
David Woodhouse b8acc93
201c3be
%ldconfig_scriptlets
David Woodhouse b8acc93
David Woodhouse b8acc93
David Woodhouse b8acc93
%changelog
d3766f2
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.1-3
d3766f2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
d3766f2
1d839d6
* Tue Jul 16 2019 Daiki Ueno <dueno@redhat.com> - 3.5.1-2
1d839d6
- Rebuild with bootstrap enabled
1d839d6
Nikos Mavrogiannopoulos a634a64
* Mon Jul 15 2019 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.5.1-1
Nikos Mavrogiannopoulos a634a64
- New upstream release
Nikos Mavrogiannopoulos a634a64
fb2b558
* Wed Apr 24 2019 Björn Esser <besser82@fedoraproject.org> - 3.4.1rc1-3
fb2b558
- Remove hardcoded gzip suffix from GNU info pages
fb2b558
261edd6
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.1rc1-2
261edd6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
261edd6
Nikos Mavrogiannopoulos a7b73ea
* Fri Nov 30 2018 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.4.1rc1-1
Nikos Mavrogiannopoulos a7b73ea
- New upstream release; provides API for constant memory access RSA operations
Nikos Mavrogiannopoulos a7b73ea
cf301b7
* Tue Oct 16 2018 Tomáš Mráz <tmraz@redhat.com> - 3.4-7
cf301b7
- Generate the .hmac checksums unless --without fips is used
cf301b7
5b3470b
* Tue Oct 16 2018 Tomáš Mráz <tmraz@redhat.com> - 3.4-6
5b3470b
- Cover the gaps in annotation coverage for assembler sources
5b3470b
c1b29e1
* Fri Aug 31 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.4-5
c1b29e1
- update libary versions used for fips
c1b29e1
201c3be
* Sat Jul 28 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 3.4-4
201c3be
- Replace obsolete scriptlets
201c3be
70fcc3c
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.4-3
70fcc3c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
70fcc3c
14a769d
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.4-2
14a769d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
14a769d
Nikos Mavrogiannopoulos 2fb41d1
* Mon Nov 20 2017 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.4-1
Nikos Mavrogiannopoulos 2fb41d1
- New upstream release
Nikos Mavrogiannopoulos 2fb41d1
Nikos Mavrogiannopoulos 2ec204e
* Wed Aug 09 2017 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.3-5
Nikos Mavrogiannopoulos 2ec204e
- Removed executables from the library to allow parallel installation
Nikos Mavrogiannopoulos 2ec204e
  of x86-64 and x86 packages. The executables had testing purpose, and
Nikos Mavrogiannopoulos 2ec204e
  may be re-introduced in a separate package if needed.
Nikos Mavrogiannopoulos 2ec204e
ee36886
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.3-4
ee36886
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
ee36886
7800287
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.3-3
7800287
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
7800287
c3f0481
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.3-2
c3f0481
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
c3f0481
Nikos Mavrogiannopoulos d3e0d66
* Tue Jul 19 2016 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.3-1
Nikos Mavrogiannopoulos d3e0d66
- New upstream release
Nikos Mavrogiannopoulos d3e0d66
- Allow arm neon instructions (they are enabled via fat builds)
Nikos Mavrogiannopoulos d3e0d66
Nikos Mavrogiannopoulos 4ddebeb
* Tue Jul 19 2016 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.2-3
Nikos Mavrogiannopoulos 4ddebeb
- Backported a fix for more cache silence on RSA and DSA.
Nikos Mavrogiannopoulos 4ddebeb
Nikos Mavrogiannopoulos 95852a3
* Thu Feb 18 2016 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.2-2
Nikos Mavrogiannopoulos 95852a3
- Enabled fat builds by default
Nikos Mavrogiannopoulos 95852a3
Nikos Mavrogiannopoulos 2b25156
* Wed Feb  3 2016 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.2-1
Nikos Mavrogiannopoulos 2b25156
- updated to 3.2 (#1301310)
Nikos Mavrogiannopoulos 2b25156
- Fixed CVE-2015-8803 secp256r1 calculation bug (#1304305)
Nikos Mavrogiannopoulos 2b25156
Nikos Mavrogiannopoulos 98c1836
* Wed Dec  9 2015 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.1.1-6
Nikos Mavrogiannopoulos 98c1836
- Made version.h architecture independent (#1289938)
Nikos Mavrogiannopoulos 98c1836
Nikos Mavrogiannopoulos e13a605
* Wed Dec  2 2015 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.1.1-5
Nikos Mavrogiannopoulos e13a605
- Disabled arm-neon unconditionally (#1287298)
Nikos Mavrogiannopoulos e13a605
Nikos Mavrogiannopoulos f39703a
* Thu Oct 22 2015 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.1.1-4
Nikos Mavrogiannopoulos f39703a
- Fixed SHA3 implementation to conform to published version (#1252935)
Nikos Mavrogiannopoulos f39703a
af9aba9
* Sun Aug  2 2015 Peter Robinson <pbrobinson@fedoraproject.org> 3.1.1-3
af9aba9
- No need to ship license in devel too
af9aba9
- Drop ChangeLog as details are in NEWS
af9aba9
20b8092
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.1-2
20b8092
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
20b8092
Nikos Mavrogiannopoulos 23b2da4
* Thu Apr 30 2015 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.1.1-1
Nikos Mavrogiannopoulos 23b2da4
- Updated to nettle 3.1.1
Nikos Mavrogiannopoulos 23b2da4
b41984e
* Sat Feb 21 2015 Till Maas <opensource@till.name> - 2.7.1-6
b41984e
- Rebuilt for Fedora 23 Change
b41984e
  https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code
b41984e
a41322c
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.1-5
a41322c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
a41322c
d5d1a04
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.1-4
d5d1a04
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
d5d1a04
Nikos Mavrogiannopoulos 58a2032
* Fri Jan 10 2014 Nikos Mavrogiannopoulos <nmav@redhat.com> - 2.7.1-3
Nikos Mavrogiannopoulos 58a2032
- Corrected bug number in previous comment.
Nikos Mavrogiannopoulos 58a2032
Nikos Mavrogiannopoulos 1b66255
* Fri Dec 13 2013 Nikos Mavrogiannopoulos <nmav@redhat.com> - 2.7.1-2
Nikos Mavrogiannopoulos 58a2032
- Added patch nettle-tmpalloc.patch to solve #1051455
Nikos Mavrogiannopoulos 1b66255
Nikos Mavrogiannopoulos b71d500
* Mon Nov 25 2013 Nikos Mavrogiannopoulos <nmav@redhat.com> - 2.7.1-1
Nikos Mavrogiannopoulos b71d500
- Updated to nettle 2.7.1
Nikos Mavrogiannopoulos b71d500
07d5f3b
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6-3
07d5f3b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
07d5f3b
1fc0040
* Wed Feb  6 2013 Tomáš Mráz <tmraz@redhat.com> - 2.6-2
1fc0040
- nettle includes use gmp.h
1fc0040
563d961
* Tue Feb  5 2013 Tomáš Mráz <tmraz@redhat.com> - 2.6-1
563d961
- New upstream release
563d961
4ffb94e
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4-4
4ffb94e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
4ffb94e
David Woodhouse ff71355
* Thu Jul 05 2012 David Woodhouse <dwmw2@infradead.org> - 2.4-3
David Woodhouse ff71355
- Remove explicit buildroot handling and defattr.
David Woodhouse ff71355
David Woodhouse 975d8c9
* Wed Jul 04 2012 David Woodhouse <dwmw2@infradead.org> - 2.4-2
David Woodhouse 975d8c9
- Review feedback
David Woodhouse 975d8c9
David Woodhouse b8acc93
* Mon Jun 18 2012 David Woodhouse <dwmw2@infradead.org> - 2.4-1
David Woodhouse b8acc93
- Revive package (GnuTLS needs it), disable static, update to current release 2.4
David Woodhouse b8acc93
David Woodhouse b8acc93
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.15-7
David Woodhouse b8acc93
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
David Woodhouse b8acc93
David Woodhouse b8acc93
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.15-6
David Woodhouse b8acc93
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
David Woodhouse b8acc93
David Woodhouse b8acc93
* Thu Apr 10 2008 Ian Weller <ianweller@gmail.com> 1.15-5
David Woodhouse b8acc93
- Moved static lib to -static
David Woodhouse b8acc93
David Woodhouse b8acc93
* Mon Mar 24 2008 Ian Weller <ianweller@gmail.com> 1.15-4
David Woodhouse b8acc93
- Added libraries and ldconfig
David Woodhouse b8acc93
David Woodhouse b8acc93
* Mon Feb 18 2008 Ian Weller <ianweller@gmail.com> 1.15-3
David Woodhouse b8acc93
- Added provides -static to -devel
David Woodhouse b8acc93
David Woodhouse b8acc93
* Sun Feb 17 2008 Ian Weller <ianweller@gmail.com> 1.15-2
David Woodhouse b8acc93
- Removed redundant requires
David Woodhouse b8acc93
- Removed redundant documentation between packages
David Woodhouse b8acc93
- Fixed license tag
David Woodhouse b8acc93
- Fixed -devel description
David Woodhouse b8acc93
- Added the static library back to -devel
David Woodhouse b8acc93
- Added make clean
David Woodhouse b8acc93
David Woodhouse b8acc93
* Fri Feb 08 2008 Ian Weller <ianweller@gmail.com> 1.15-1
David Woodhouse b8acc93
- First package build.