Compare commits

...

No commits in common. "c8" and "c10s" have entirely different histories.
c8 ... c10s

11 changed files with 3668 additions and 2084 deletions

12
.gitignore vendored
View File

@ -1 +1,11 @@
SOURCES/gmp-6.1.2.tar.bz2
/gmp-5.0.5.tar.xz
/gmp-5.1.0.tar.bz2
/gmp-5.1.1.tar.bz2
/gmp-5.1.2.tar.bz2
/gmp-5.1.3.tar.bz2
/gmp-6.0.0a.tar.bz2
/gmp-6.1.0.tar.bz2
/gmp-6.1.1.tar.bz2
/gmp-6.1.2.tar.bz2
/gmp-6.2.0.tar.bz2
/gmp-6.2.1.tar.xz

View File

@ -1 +0,0 @@
366ded6a44cd108ba6b3f5b9a252eab3f3a95cdf SOURCES/gmp-6.1.2.tar.bz2

View File

@ -1,25 +0,0 @@
# HG changeset patch
# User Marco Bodrato <bodrato@mail.dm.unipi.it>
# Date 1634836009 -7200
# Node ID 561a9c25298e17bb01896801ff353546c6923dbd
# Parent e1fd9db13b475209a864577237ea4b9105b3e96e
mpz/inp_raw.c: Avoid bit size overflows
diff -r e1fd9db13b47 -r 561a9c25298e mpz/inp_raw.c
--- a/mpz/inp_raw.c Tue Dec 22 23:49:51 2020 +0100
+++ b/mpz/inp_raw.c Thu Oct 21 19:06:49 2021 +0200
@@ -88,8 +88,11 @@
abs_csize = ABS (csize);
+ if (UNLIKELY (abs_csize > ~(mp_bitcnt_t) 0 / 8))
+ return 0; /* Bit size overflows */
+
/* round up to a multiple of limbs */
- abs_xsize = BITS_TO_LIMBS (abs_csize*8);
+ abs_xsize = BITS_TO_LIMBS ((mp_bitcnt_t) abs_csize * 8);
if (abs_xsize != 0)
{

File diff suppressed because it is too large Load Diff

22
STAGE1-gmp Normal file
View File

@ -0,0 +1,22 @@
L=$1
srpm $L
mcd $BUILDDIR/t-$L
$SRC/${L}-*/configure $TCONFIGARGS
make $J
# The contents of libdir (which in this case is
# /usr/lib${SUFFIX}), will get passed to -L in one of the
# (re)link stages while installing, thus getting libgcc_so.*
# from the host.
#
# ?? I don't understand why --libdir=/usr/lib64 is being
# passed in $TCONFIGARGS instead of
# --libdir=${ROOTFS}/usr/lib64, but assuming that's the way
# it's supposed to to be, then fix libdir here right before
# installing the binaries. ??--aldyh
for i in *.la; do
sed -i~ -e "s;libdir='/usr/lib;libdir='$ROOTFS/usr/lib;" $i
done
make $J install DESTDIR=${ROOTFS}
fix_la $L

3515
gmp-intel-cet.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -3,27 +3,41 @@
# This rpm has to be build on a CPU with sse2 support like Pentium 4 !
#
Summary: A GNU arbitrary precision library
Summary: GNU arbitrary precision library
Name: gmp
Version: 6.1.2
Release: 11%{?dist}
Version: 6.2.1
Release: 10%{?dist}
Epoch: 1
URL: http://gmplib.org/
Source0: ftp://ftp.gmplib.org/pub/gmp-%{version}/gmp-%{version}.tar.bz2
# or ftp://ftp.gnu.org/pub/gnu/gmp/gmp-%{version}.tar.xz
URL: https://gmplib.org/
Source0: https://gmplib.org/download/gmp/gmp-%{version}.tar.xz
Source2: gmp.h
Source3: gmp-mparam.h
Patch2: gmp-6.0.0-debuginfo.patch
Patch3: gmp-fcf-protection.patch
Patch4: cve-2021-43618.patch
License: LGPLv3+ or GPLv2+
Group: System Environment/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Patch3: gmp-intel-cet.patch
# * Main sources are dual licensed under LGPL-3.0-or-later and GPL-2.0-or-later
# Either only one may be active or both simultaneously.
# * Some docs are under GFDL-1.3-invariants-or-later.
# * demos are under GPL-3.0-or-later but they are NOT shipped.
# * tests are under GPL-3.0-or-later but they are NOT shipped.
License: (LGPL-3.0-or-later OR GPL-2.0-or-later OR (LGPL-3.0-or-later AND GPL-2.0-or-later)) AND GFDL-1.3-invariants-or-later
BuildRequires: autoconf automake libtool
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: git
#autoreconf on arm needs:
BuildRequires: perl-Carp
# Generate the .hmac checksum unless --without fips is used
# RHEL 9 and later include gmp in the gnutls module boundary,
# and HMAC is calculated there with its own tool.
%if %{defined rhel} && 0%{?rhel} < 9
%bcond_without fips
%endif
%if %{with fips}
BuildRequires: fipscheck
%endif
BuildRequires: make
%description
The gmp package contains GNU MP, a library for arbitrary precision
@ -39,7 +53,6 @@ library.
%package c++
Summary: C++ bindings for the GNU MP arbitrary precision library
Group: System Environment/Libraries
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
%description c++
@ -47,11 +60,8 @@ Bindings for using the GNU MP arbitrary precision library in C++ applications.
%package devel
Summary: Development tools for the GNU MP arbitrary precision library
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}-c++%{?_isa} = %{epoch}:%{version}-%{release}
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
%description devel
The libraries, header files and documentation for using the GNU MP
@ -63,7 +73,6 @@ install the gmp package.
%package static
Summary: Development tools for the GNU MP arbitrary precision library
Group: Development/Libraries
Requires: %{name}-devel = %{epoch}:%{version}-%{release}
%description static
@ -90,10 +99,6 @@ fi
export CXXFLAGS=$(echo %{optflags} | sed -e "s/-mtune=[^ ]*//g" | sed -e "s/-march=[^ ]*/-march=i686/g")
%endif
export CCAS="$CCAS -Wa,--generate-missing-build-notes=yes"
export CFLAGS="$(echo %{optflags}) -fplugin=annobin"
export CXXFLAGS="$(echo %{optflags}) -fplugin=annobin"
%configure --enable-cxx --enable-fat
sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
@ -101,23 +106,23 @@ sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
-e 's|-lstdc++ -lm|-lstdc++|' \
-i libtool
export LD_LIBRARY_PATH=`pwd`/.libs
make %{?_smp_mflags}
make check
%make_build
# Add generation of HMAC checksums of the final stripped binaries
# bz#1117188
%if %{with fips}
%define __spec_install_post \
%{?__debug_package:%{__debug_install_post}} \
%{__arch_install_post} \
%{__os_install_post} \
mkdir -p $RPM_BUILD_ROOT%{_libdir}/fipscheck \
fipshmac -d $RPM_BUILD_ROOT%{_libdir}/fipscheck $RPM_BUILD_ROOT%{_libdir}/libgmp.so.10.3.2 \
ln -s libgmp.so.10.3.2.hmac $RPM_BUILD_ROOT%{_libdir}/fipscheck/libgmp.so.10.hmac \
%{nil}
%{?__debug_package:%{__debug_install_post}} \
%{__arch_install_post} \
%{__os_install_post} \
fipshmac -d $RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_libdir}/libgmp.so.10.* \
file=`basename $RPM_BUILD_ROOT%{_libdir}/libgmp.so.10.*.hmac` && \
mv $RPM_BUILD_ROOT%{_libdir}/$file $RPM_BUILD_ROOT%{_libdir}/.$file && \
ln -s .$file $RPM_BUILD_ROOT%{_libdir}/.libgmp.so.10.hmac
%{nil}
%endif
%install
export LD_LIBRARY_PATH=`pwd`/.libs
make install DESTDIR=$RPM_BUILD_ROOT
%make_install
install -m 644 gmp-mparam.h ${RPM_BUILD_ROOT}%{_includedir}
rm -f $RPM_BUILD_ROOT%{_libdir}/lib{gmp,mp,gmpxx}.la
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
@ -151,72 +156,114 @@ install -m644 %{SOURCE3} %{buildroot}/%{_includedir}/gmp-mparam.h
%check
%ifnarch ppc
export LD_LIBRARY_PATH=`pwd`/.libs
make %{?_smp_mflags} check
%make_build check
%endif
%post -p /sbin/ldconfig
%ldconfig_scriptlets
%postun -p /sbin/ldconfig
%post c++ -p /sbin/ldconfig
%postun c++ -p /sbin/ldconfig
%post devel
if [ -f %{_infodir}/gmp.info.gz ]; then
/sbin/install-info %{_infodir}/gmp.info.gz %{_infodir}/dir || :
fi
exit 0
%preun devel
if [ $1 = 0 ]; then
if [ -f %{_infodir}/gmp.info.gz ]; then
/sbin/install-info --delete %{_infodir}/gmp.info.gz %{_infodir}/dir || :
fi
fi
exit 0
%ldconfig_scriptlets c++
%files
%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license COPYING COPYING.LESSERv3 COPYINGv2 COPYINGv3
%doc NEWS README
%{_libdir}/libgmp.so.*
%{_libdir}/fipscheck/libgmp.so.10.3.2.hmac
%{_libdir}/fipscheck/libgmp.so.10.hmac
%if %{with fips}
%{_libdir}/.libgmp.so.*.hmac
%endif
%files c++
%{_libdir}/libgmpxx.so.*
%files devel
%defattr(-,root,root,-)
%{_libdir}/libgmp.so
%{_libdir}/libgmpxx.so
%{_libdir}/pkgconfig/gmp.pc
%{_libdir}/pkgconfig/gmpxx.pc
%{_includedir}/*.h
%{_infodir}/gmp.info*
%files static
%defattr(-,root,root,-)
%{_libdir}/libgmp.a
%{_libdir}/libgmpxx.a
%changelog
* Mon Jan 29 2024 Jakub Martisko <jamartis@redhat.com> - 1:6.1.2-11
- Fix: CVE-2021-43618
Resolves: RHEL-23055
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1:6.2.1-10
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Fri Jun 14 2019 Jakub Martisko <jamartis@redhat.com> - 1:6.1.2-10
- Add gating.yaml
Related: #1681026
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1:6.2.1-9
- Bump release for June 2024 mass rebuild
* Tue Jun 11 2019 Jakub Martisko <jamartis@redhat.com> - 1:6.1.2-9
- Add support for intel CET and -fcf-protection
- Add missing compiler/linker flags
Related: #1630567
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:6.2.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Jul 26 2018 David Kaspar [Dee'Kej] <dkaspar@redhat.com> - 1:6.1.2-8
- Missing fipschecks added into build process (bug #1553679)
- --enable-fat option added to %%configure (bug #1493218)
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:6.2.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Aug 07 2023 Lukáš Zaoral <lzaoral@redhat.com> - 1:6.2.1-6
- migrate to SPDX license format
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:6.2.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:6.2.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:6.2.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:6.2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Tue Aug 31 2021 Jakub Martisko <jamartis@redhat.com> - 1:6.2.1-1
- Rebase to gmp-6.2.1
- Minor update of the cet patch
Resolves: rhbz#1897831
* Tue Aug 31 2021 Jakub Martisko <jamartis@redhat.com> - 1:6.2.0-8
- Enable intel CET
- Fix based on the patches provided by H.J. Lu
Resolves: rhbz#1795709
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:6.2.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:6.2.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Sep 15 2020 Kalev Lember <klember@redhat.com> - 1:6.2.0-5
- Move gmpxx.pc to -devel subpackage as well
* Fri Aug 07 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 1:6.2.0-4
- The pkgcfg file should be in devel
* Tue Jul 28 2020 Jakub Martisko <jamartis@redhat.com> - 1:6.2.0-3
- Use make macros
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:6.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Feb 17 2020 Jakub Martisko <jamartis@redhat.com> - 1:6.2.0-1
- Rebase to 6.2.0
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:6.1.2-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Tue Dec 03 2019 Jakub Martisko <jamartis@redhat.com> - 1:6.1.2-12
- Reenable the fat binaries build option
Resolves: #1779060
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:6.1.2-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Feb 15 2019 Anderson Toshiyuki Sasaki <ansasaki@redhat.com> - 1:6.1.2-10
- Create HMAC checksum for FIPS integrity self tests
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:6.1.2-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:6.1.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:6.1.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (gmp-6.2.1.tar.xz) = c99be0950a1d05a0297d65641dd35b75b74466f7bf03c9e8a99895a3b2f9a0856cd17887738fa51cf7499781b65c049769271cbcb77d057d2e9f1ec52e07dd84