Browse Source

gmp-6.2.1-2

Tomohiro "Tomo-p" KATO 2 years ago
parent
commit
79c15211e2
1 changed files with 17 additions and 27 deletions
  1. 17 27
      g/gmp/gmp-vl.spec

+ 17 - 27
g/gmp/gmp-vl.spec

@@ -1,7 +1,7 @@
-#
+%bcond_without test
+
 # Important for %{ix86}:
 # This rpm has to be build on a CPU with sse2 support like Pentium 4 !
-#
 %ifarch %{ix86}
 %define              SSE2       1
 %else
@@ -12,14 +12,14 @@
 %{?_without_sse2%define SSE2 	0}
 
 %define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
-
+# to disable "Provides: pkgconfig(foo)" in compat32-*
 %global __provides_exclude_from ^%{_libdir}/pkgconfig/.*$
 
 Summary: A GNU arbitrary precision library.
 Summary(ja): GNU 多倍長演算ライブラリ
 Name: gmp
 Version: 6.2.1
-Release: 1%{?_dist_release}
+Release: 2%{?_dist_release}
 Group: system
 Vendor: Project Vine
 Distribution: Vine Linux
@@ -31,6 +31,8 @@ Source: https://gmplib.org/download/gmp/gmp-%{version}.tar.xz
 Source2: gmp.h
 Source3: gmp-mparam.h
 Patch2: gmp-6.0.0-debuginfo.patch
+Patch1000: CVE-2021-43618.patch
+
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
 BuildRequires: autoconf libtool
 Obsoletes: gmp4
@@ -52,8 +54,6 @@ library.
 Summary: Development tools for the GNU MP arbitrary precision library.
 Group: programming
 Requires: %{name} = %{version}-%{release}
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
 Provides: pkgconfig(gmp) = %{version}
 Provides: pkgconfig(gmpxx) = %{version}
 #Obsoletes: gmp4-devel
@@ -79,7 +79,7 @@ in applications.
 
 %package -n compat32-%{name}
 Summary: A GNU arbitrary precision library.
-Group: system
+Group: system,legacy
 Requires: %{name} = %{version}-%{release}
 
 %description -n compat32-%{name}
@@ -97,11 +97,9 @@ library.
 
 %package -n compat32-%{name}-devel
 Summary: Development tools for the GNU MP arbitrary precision library.
-Group: programming
+Group: programming,legacy
 Requires: compat32-%{name} = %{version}-%{release}
 Requires: %{name}-devel = %{version}-%{release}
-Provides: pkgconfig(gmp) = %{version}
-Provides: pkgconfig(gmpxx) = %{version}
 
 %description -n compat32-%{name}-devel 
 The libraries, header files and documentation for using the GNU MP 
@@ -114,7 +112,7 @@ install the gmp package.
 
 %package -n compat32-%{name}-static
 Summary: Development tools for the GNU MP arbitrary precision library
-Group: programming
+Group: programming,legacy
 Requires: compat32-%{name}-devel = %{version}-%{release}
 
 %description -n compat32-%{name}-static
@@ -128,6 +126,7 @@ in applications.
 %prep
 %setup -q
 %patch2 -p1 -b .debuginfo
+%patch1000 -p1
 
 
 %build
@@ -209,6 +208,7 @@ mv %{buildroot}/%{_includedir}/gmp-mparam.h %{buildroot}/%{_includedir}/gmp-mpar
 install -m644 %{SOURCE3} %{buildroot}/%{_includedir}/gmp-mparam.h
 
 
+%if %{with test}
 %check
 %ifnarch ppc
 cd base
@@ -223,30 +223,16 @@ export LD_LIBRARY_PATH=`pwd`/.libs
 make %{?_smp_mflags} check
 cd ..
 %endif
+%endif
 
 
 %clean
 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
 
 
-%post -p /sbin/ldconfig
-%postun -p /sbin/ldconfig
-
-%post devel
-/sbin/install-info %{_infodir}/gmp.info.gz %{_infodir}/dir
-
-%preun devel
-if [ "$1" = 0 ]; then
-	/sbin/install-info --delete %{_infodir}/gmp.info.gz %{_infodir}/dir
-fi
-
-%post -n compat32-%{name} -p /sbin/ldconfig
-%postun -n compat32-%{name} -p /sbin/ldconfig
-
-
 %files
 %defattr(-,root,root,-)
-%license COPYING COPYING.LIB
+%license COPYING*
 %doc NEWS README
 %{_libdir}/libgmp.so.*
 %{_libdir}/libgmpxx.so.*
@@ -296,6 +282,10 @@ fi
 
 
 %changelog
+* Fri Nov 19 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 6.2.1-2
+- imported Patch1000 from upstream to fix CVE-2021-43618.
+- dropped scriptlets.
+
 * Tue Feb 02 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 6.2.1-1
 - new upstream release.