Blame SPECS/nettle.spec

f410dd
# Recent so-version, so we do not bump accidentally.
f410dd
%global nettle_so_ver 8
f410dd
%global hogweed_so_ver 6
f410dd
f410dd
# Set to 1 when building a bootstrap for a bumped so-name.
f410dd
%global bootstrap 0
f410dd
f410dd
%if 0%{?bootstrap}
f410dd
%global version_old 3.5.1
f410dd
%global nettle_so_ver_old 7
f410dd
%global hogweed_so_ver_old 5
f410dd
%endif
f410dd
f410dd
%bcond_without fips
f410dd
f410dd
Name:           nettle
9405f7
Version:        3.8
9405f7
Release:        3%{?dist}
f410dd
Summary:        A low-level cryptographic library
f410dd
f410dd
License:        LGPLv3+ or GPLv2+
f410dd
URL:            http://www.lysator.liu.se/~nisse/nettle/
f410dd
Source0:	%{name}-%{version}-hobbled.tar.xz
9405f7
#Source0:        http://www.lysator.liu.se/~nisse/archive/%%{name}-%%{version}.tar.gz
f410dd
%if 0%{?bootstrap}
f410dd
Source1:	%{name}-%{version_old}-hobbled.tar.xz
f410dd
Source2:	nettle-3.5-remove-ecc-testsuite.patch
f410dd
%endif
9405f7
Patch:		nettle-3.4-annocheck.patch
9405f7
Patch:		nettle-3.8-zeroize-stack.patch
9405f7
9405f7
Source100:	gmp-6.2.1.tar.xz
9405f7
# Taken from the main gmp package
9405f7
Source101:	gmp-6.2.1-intel-cet.patch
9405f7
Source102:	gmp-6.2.1-zeroize-allocator.patch
f410dd
f410dd
BuildRequires: make
f410dd
BuildRequires:  gcc
9405f7
%if !%{with fips}
9405f7
BuildRequires:  gmp-devel
9405f7
%endif
9405f7
BuildRequires:  m4
f410dd
BuildRequires:	libtool, automake, autoconf, gettext-devel
f410dd
%if %{with fips}
f410dd
BuildRequires:  fipscheck
f410dd
%endif
f410dd
f410dd
%package devel
f410dd
Summary:        Development headers for a low-level cryptographic library
f410dd
Requires:       %{name} = %{version}-%{release}
f410dd
Requires:       gmp-devel%{?_isa}
f410dd
f410dd
%description
f410dd
Nettle is a cryptographic library that is designed to fit easily in more
f410dd
or less any context: In crypto toolkits for object-oriented languages
f410dd
(C++, Python, Pike, ...), in applications like LSH or GNUPG, or even in
f410dd
kernel space.
f410dd
f410dd
%description devel
f410dd
Nettle is a cryptographic library that is designed to fit easily in more
f410dd
or less any context: In crypto toolkits for object-oriented languages
f410dd
(C++, Python, Pike, ...), in applications like LSH or GNUPG, or even in
f410dd
kernel space.  This package contains the files needed for developing 
f410dd
applications with nettle.
f410dd
f410dd
f410dd
%prep
f410dd
%autosetup -Tb 0 -p1
f410dd
9405f7
%if %{with fips}
9405f7
mkdir -p bundled_gmp
9405f7
pushd bundled_gmp
9405f7
tar --strip-components=1 -xf %{SOURCE100}
9405f7
patch -p1 < %{SOURCE101}
9405f7
patch -p1 < %{SOURCE102}
9405f7
popd
9405f7
9405f7
# Prevent -lgmp appearing in the compiler command line in dependent components
9405f7
sed -i '/^Libs.private:/d' hogweed.pc.in
9405f7
%endif
9405f7
f410dd
%if 0%{?bootstrap}
f410dd
mkdir -p bootstrap_ver
f410dd
pushd bootstrap_ver
f410dd
tar --strip-components=1 -xf %{SOURCE1}
f410dd
patch -p1 < %{SOURCE2}
f410dd
f410dd
# Disable -ggdb3 which makes debugedit unhappy
f410dd
sed s/ggdb3/g/ -i configure
f410dd
sed 's/ecc-192.c//g' -i Makefile.in
f410dd
sed 's/ecc-224.c//g' -i Makefile.in
f410dd
popd
f410dd
%endif
f410dd
f410dd
# Disable -ggdb3 which makes debugedit unhappy
f410dd
sed s/ggdb3/g/ -i configure
f410dd
sed 's/ecc-secp192r1.c//g' -i Makefile.in
f410dd
sed 's/ecc-secp224r1.c//g' -i Makefile.in
f410dd
f410dd
%build
9405f7
%if %{with fips}
9405f7
pushd bundled_gmp
f410dd
autoreconf -ifv
9405f7
%configure --disable-cxx --disable-shared --enable-fat --with-pic
9405f7
%make_build
9405f7
popd
9405f7
%endif
9405f7
9405f7
autoreconf -ifv
9405f7
9405f7
%configure --enable-shared --enable-fat \
9405f7
%if %{with fips}
9405f7
--with-include-path=$PWD/bundled_gmp --with-lib-path=$PWD/bundled_gmp/.libs \
9405f7
%endif
9405f7
%{nil}
9405f7
f410dd
%make_build
f410dd
f410dd
%if 0%{?bootstrap}
f410dd
pushd bootstrap_ver
f410dd
autoconf
f410dd
%configure --with-tests
f410dd
%make_build
f410dd
popd
f410dd
%endif
f410dd
f410dd
%if %{with fips}
f410dd
%define fipshmac() \
f410dd
	fipshmac -d $RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_libdir}/%1.* \
f410dd
	file=`basename $RPM_BUILD_ROOT%{_libdir}/%1.*.hmac` && \
f410dd
	mv $RPM_BUILD_ROOT%{_libdir}/$file $RPM_BUILD_ROOT%{_libdir}/.$file && \
f410dd
	ln -s .$file $RPM_BUILD_ROOT%{_libdir}/.%1.hmac
f410dd
f410dd
%if 0%{?bootstrap}
f410dd
%define bootstrap_fips 1
f410dd
%endif
f410dd
f410dd
%define __spec_install_post \
f410dd
	%{?__debug_package:%{__debug_install_post}} \
f410dd
	%{__arch_install_post} \
f410dd
	%{__os_install_post} \
f410dd
	%fipshmac libnettle.so.%{nettle_so_ver} \
f410dd
	%fipshmac libhogweed.so.%{hogweed_so_ver} \
f410dd
	%{?bootstrap_fips:%fipshmac libnettle.so.%{nettle_so_ver_old}} \
f410dd
	%{?bootstrap_fips:%fipshmac libhogweed.so.%{hogweed_so_ver_old}} \
f410dd
%{nil}
f410dd
%endif
f410dd
f410dd
f410dd
%install
f410dd
%if 0%{?bootstrap}
f410dd
make -C bootstrap_ver install-shared-nettle DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
f410dd
make -C bootstrap_ver install-shared-hogweed DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
f410dd
f410dd
chmod 0755 $RPM_BUILD_ROOT%{_libdir}/libnettle.so.%{nettle_so_ver_old}.*
f410dd
chmod 0755 $RPM_BUILD_ROOT%{_libdir}/libhogweed.so.%{hogweed_so_ver_old}.*
f410dd
%endif
f410dd
f410dd
%make_install
f410dd
make install-shared DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
f410dd
mkdir -p $RPM_BUILD_ROOT%{_infodir}
f410dd
install -p -m 644 nettle.info $RPM_BUILD_ROOT%{_infodir}/
f410dd
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
f410dd
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
f410dd
rm -f $RPM_BUILD_ROOT%{_bindir}/nettle-lfib-stream
f410dd
rm -f $RPM_BUILD_ROOT%{_bindir}/pkcs1-conv
f410dd
rm -f $RPM_BUILD_ROOT%{_bindir}/sexp-conv
f410dd
rm -f $RPM_BUILD_ROOT%{_bindir}/nettle-hash
f410dd
rm -f $RPM_BUILD_ROOT%{_bindir}/nettle-pbkdf2
f410dd
f410dd
chmod 0755 $RPM_BUILD_ROOT%{_libdir}/libnettle.so.%{nettle_so_ver}.*
f410dd
chmod 0755 $RPM_BUILD_ROOT%{_libdir}/libhogweed.so.%{hogweed_so_ver}.*
f410dd
f410dd
%check
f410dd
make check
f410dd
f410dd
%files
f410dd
%doc AUTHORS NEWS README
f410dd
%license COPYINGv2 COPYING.LESSERv3
f410dd
%{_infodir}/nettle.info.*
f410dd
%{_libdir}/libnettle.so.%{nettle_so_ver}
f410dd
%{_libdir}/libnettle.so.%{nettle_so_ver}.*
f410dd
%{_libdir}/libhogweed.so.%{hogweed_so_ver}
f410dd
%{_libdir}/libhogweed.so.%{hogweed_so_ver}.*
f410dd
%if 0%{?bootstrap}
f410dd
%{_libdir}/libnettle.so.%{nettle_so_ver_old}
f410dd
%{_libdir}/libnettle.so.%{nettle_so_ver_old}.*
f410dd
%{_libdir}/libhogweed.so.%{hogweed_so_ver_old}
f410dd
%{_libdir}/libhogweed.so.%{hogweed_so_ver_old}.*
f410dd
%endif
f410dd
%if %{with fips}
f410dd
%{_libdir}/.libhogweed.so.*.hmac
f410dd
%{_libdir}/.libnettle.so.*.hmac
f410dd
%endif
f410dd
f410dd
%files devel
f410dd
%doc descore.README nettle.html nettle.pdf
f410dd
%{_includedir}/nettle
f410dd
%{_libdir}/libnettle.so
f410dd
%{_libdir}/libhogweed.so
f410dd
%{_libdir}/pkgconfig/hogweed.pc
f410dd
%{_libdir}/pkgconfig/nettle.pc
f410dd
f410dd
%ldconfig_scriptlets
f410dd
f410dd
f410dd
%changelog
9405f7
* Thu Aug 25 2022 Daiki Ueno <dueno@redhat.com> - 3.8-3
9405f7
- Rebuild in new side-tag
9405f7
9405f7
* Thu Aug 18 2022 Daiki Ueno <dueno@redhat.com> - 3.8-2
9405f7
- Bundle GMP to privatize memory functions
9405f7
- Zeroize stack allocated intermediate data
9405f7
9405f7
* Tue Jun 28 2022 Daiki Ueno <dueno@redhat.com> - 3.8-1
9405f7
- Update to nettle 3.8 (#2100350)
9405f7
f410dd
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 3.7.3-2
f410dd
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
f410dd
  Related: rhbz#1991688
f410dd
f410dd
* Wed Jul 28 2021 Daiki Ueno <dueno@redhat.com> - 3.7.3-1
f410dd
- Update to nettle 3.7.3 (#1986712)
f410dd
f410dd
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 3.7.2-2
f410dd
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
f410dd
f410dd
* Sun Mar 21 2021 Daiki Ueno <dueno@redhat.com> - 3.7.2-1
f410dd
- Update to nettle 3.7.2
f410dd
- Merge nettle-3.6-remove-ecc-testsuite.patch to hobble-nettle script
f410dd
f410dd
* Tue Mar  9 2021 Daiki Ueno <dueno@redhat.com> - 3.7.1-1
f410dd
- Update to nettle 3.7.1
f410dd
f410dd
* Wed Feb 10 2021 Daiki Ueno <dueno@redhat.com> - 3.7-3
f410dd
- Port a fix for chacha counter issue on ppc64le
f410dd
f410dd
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.7-2
f410dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
f410dd
f410dd
* Mon Jan 11 2021 Daiki Ueno <dueno@redhat.com> - 3.7-1
f410dd
- Update to nettle 3.7
f410dd
f410dd
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.6-3
f410dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
f410dd
f410dd
* Tue Jul 14 2020 Tom Stellard <tstellar@redhat.com> - 3.6-2
f410dd
- Use make macros
f410dd
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
f410dd
f410dd
* Mon May  4 2020 Daiki Ueno <dueno@redhat.com> - 3.6-1
f410dd
- Update to nettle 3.6
f410dd
f410dd
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.1-5
f410dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
f410dd
f410dd
* Thu Oct 31 2019 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.5.1-4
f410dd
- New upstream release
f410dd
f410dd
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.1-3
f410dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
f410dd
f410dd
* Tue Jul 16 2019 Daiki Ueno <dueno@redhat.com> - 3.5.1-2
f410dd
- Rebuild with bootstrap enabled
f410dd
f410dd
* Mon Jul 15 2019 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.5.1-1
f410dd
- New upstream release
f410dd
f410dd
* Wed Apr 24 2019 Björn Esser <besser82@fedoraproject.org> - 3.4.1rc1-3
f410dd
- Remove hardcoded gzip suffix from GNU info pages
f410dd
f410dd
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.1rc1-2
f410dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
f410dd
f410dd
* Fri Nov 30 2018 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.4.1rc1-1
f410dd
- New upstream release; provides API for constant memory access RSA operations
f410dd
f410dd
* Tue Oct 16 2018 Tomáš Mráz <tmraz@redhat.com> - 3.4-7
f410dd
- Generate the .hmac checksums unless --without fips is used
f410dd
f410dd
* Tue Oct 16 2018 Tomáš Mráz <tmraz@redhat.com> - 3.4-6
f410dd
- Cover the gaps in annotation coverage for assembler sources
f410dd
f410dd
* Fri Aug 31 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.4-5
f410dd
- update libary versions used for fips
f410dd
f410dd
* Sat Jul 28 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 3.4-4
f410dd
- Replace obsolete scriptlets
f410dd
f410dd
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.4-3
f410dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
f410dd
f410dd
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.4-2
f410dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
f410dd
f410dd
* Mon Nov 20 2017 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.4-1
f410dd
- New upstream release
f410dd
f410dd
* Wed Aug 09 2017 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.3-5
f410dd
- Removed executables from the library to allow parallel installation
f410dd
  of x86-64 and x86 packages. The executables had testing purpose, and
f410dd
  may be re-introduced in a separate package if needed.
f410dd
f410dd
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.3-4
f410dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
f410dd
f410dd
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.3-3
f410dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
f410dd
f410dd
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.3-2
f410dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
f410dd
f410dd
* Tue Jul 19 2016 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.3-1
f410dd
- New upstream release
f410dd
- Allow arm neon instructions (they are enabled via fat builds)
f410dd
f410dd
* Tue Jul 19 2016 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.2-3
f410dd
- Backported a fix for more cache silence on RSA and DSA.
f410dd
f410dd
* Thu Feb 18 2016 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.2-2
f410dd
- Enabled fat builds by default
f410dd
f410dd
* Wed Feb  3 2016 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.2-1
f410dd
- updated to 3.2 (#1301310)
f410dd
- Fixed CVE-2015-8803 secp256r1 calculation bug (#1304305)
f410dd
f410dd
* Wed Dec  9 2015 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.1.1-6
f410dd
- Made version.h architecture independent (#1289938)
f410dd
f410dd
* Wed Dec  2 2015 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.1.1-5
f410dd
- Disabled arm-neon unconditionally (#1287298)
f410dd
f410dd
* Thu Oct 22 2015 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.1.1-4
f410dd
- Fixed SHA3 implementation to conform to published version (#1252935)
f410dd
f410dd
* Sun Aug  2 2015 Peter Robinson <pbrobinson@fedoraproject.org> 3.1.1-3
f410dd
- No need to ship license in devel too
f410dd
- Drop ChangeLog as details are in NEWS
f410dd
f410dd
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.1-2
f410dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
f410dd
f410dd
* Thu Apr 30 2015 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.1.1-1
f410dd
- Updated to nettle 3.1.1
f410dd
f410dd
* Sat Feb 21 2015 Till Maas <opensource@till.name> - 2.7.1-6
f410dd
- Rebuilt for Fedora 23 Change
f410dd
  https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code
f410dd
f410dd
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.1-5
f410dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
f410dd
f410dd
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.1-4
f410dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
f410dd
f410dd
* Fri Jan 10 2014 Nikos Mavrogiannopoulos <nmav@redhat.com> - 2.7.1-3
f410dd
- Corrected bug number in previous comment.
f410dd
f410dd
* Fri Dec 13 2013 Nikos Mavrogiannopoulos <nmav@redhat.com> - 2.7.1-2
f410dd
- Added patch nettle-tmpalloc.patch to solve #1051455
f410dd
f410dd
* Mon Nov 25 2013 Nikos Mavrogiannopoulos <nmav@redhat.com> - 2.7.1-1
f410dd
- Updated to nettle 2.7.1
f410dd
f410dd
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6-3
f410dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
f410dd
f410dd
* Wed Feb  6 2013 Tomáš Mráz <tmraz@redhat.com> - 2.6-2
f410dd
- nettle includes use gmp.h
f410dd
f410dd
* Tue Feb  5 2013 Tomáš Mráz <tmraz@redhat.com> - 2.6-1
f410dd
- New upstream release
f410dd
f410dd
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4-4
f410dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
f410dd
f410dd
* Thu Jul 05 2012 David Woodhouse <dwmw2@infradead.org> - 2.4-3
f410dd
- Remove explicit buildroot handling and defattr.
f410dd
f410dd
* Wed Jul 04 2012 David Woodhouse <dwmw2@infradead.org> - 2.4-2
f410dd
- Review feedback
f410dd
f410dd
* Mon Jun 18 2012 David Woodhouse <dwmw2@infradead.org> - 2.4-1
f410dd
- Revive package (GnuTLS needs it), disable static, update to current release 2.4
f410dd
f410dd
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.15-7
f410dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
f410dd
f410dd
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.15-6
f410dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
f410dd
f410dd
* Thu Apr 10 2008 Ian Weller <ianweller@gmail.com> 1.15-5
f410dd
- Moved static lib to -static
f410dd
f410dd
* Mon Mar 24 2008 Ian Weller <ianweller@gmail.com> 1.15-4
f410dd
- Added libraries and ldconfig
f410dd
f410dd
* Mon Feb 18 2008 Ian Weller <ianweller@gmail.com> 1.15-3
f410dd
- Added provides -static to -devel
f410dd
f410dd
* Sun Feb 17 2008 Ian Weller <ianweller@gmail.com> 1.15-2
f410dd
- Removed redundant requires
f410dd
- Removed redundant documentation between packages
f410dd
- Fixed license tag
f410dd
- Fixed -devel description
f410dd
- Added the static library back to -devel
f410dd
- Added make clean
f410dd
f410dd
* Fri Feb 08 2008 Ian Weller <ianweller@gmail.com> 1.15-1
f410dd
- First package build.