!52 [sync] PR-49: 修复h5c++ ,h5cc ,h5fc 命令执行出错的问题

From: @openeuler-sync-bot 
Reviewed-by: @starlet-dx 
Signed-off-by: @starlet-dx
This commit is contained in:
openeuler-ci-bot 2023-04-11 05:50:29 +00:00 committed by Gitee
commit 33d44a53cb
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 17 additions and 15 deletions

10
h5comp Normal file
View File

@ -0,0 +1,10 @@
#!/bin/bash
ARCH=$(uname -m)
case $ARCH in
x86_64 ) BITS=64;;
* ) BITS=32;;
esac
exec $0-${BITS} "$@"

View File

@ -11,12 +11,13 @@
Name: hdf5
Version: 1.12.1
Release: 2
Release: 3
Summary: A data model, library, and file format for storing and managing data
License: GPL-2.0-or-later
URL: https://portal.hdfgroup.org/display/HDF5/HDF5
Source0: https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.1/src/hdf5-1.12.1.tar.bz2
Source1: h5comp
Patch0: hdf5-LD_LIBRARY_PATH.patch
Patch1: hdf5-gfortran12.patch
@ -174,18 +175,6 @@ done
%install
%make_install -C build
%delete_la
cat >h5comp <<EOF
#!/bin/bash
ARCH=$(uname -m)
case $ARCH in
x86_64 ) BITS=64;;
* ) BITS=32;;
esac
exec $0-${BITS} "$@"
EOF
mkdir -p ${RPM_BUILD_ROOT}%{_fmoddir}
mv ${RPM_BUILD_ROOT}%{_includedir}/*.mod ${RPM_BUILD_ROOT}%{_fmoddir}
@ -210,7 +199,7 @@ for x in h5c++ h5cc h5fc
do
mv ${RPM_BUILD_ROOT}%{_bindir}/${x} \
${RPM_BUILD_ROOT}%{_bindir}/${x}-64
install -m 0755 h5comp ${RPM_BUILD_ROOT}%{_bindir}/${x}
install -m 0755 %SOURCE1 ${RPM_BUILD_ROOT}%{_bindir}/${x}
done
%else
sed -i -e s/H5pubconf.h/H5pubconf-32.h/ ${RPM_BUILD_ROOT}%{_includedir}/H5public.h
@ -220,7 +209,7 @@ for x in h5c++ h5cc h5fc
do
mv ${RPM_BUILD_ROOT}%{_bindir}/${x} \
${RPM_BUILD_ROOT}%{_bindir}/${x}-32
install -m 0755 h5comp ${RPM_BUILD_ROOT}%{_bindir}/${x}
install -m 0755 %SOURCE1 ${RPM_BUILD_ROOT}%{_bindir}/${x}
done
%endif
@ -381,6 +370,9 @@ make %{?_smp_mflags} -C build check
%endif
%changelog
* Mon Apr 10 2023 xu_ping <707078654@qq.com> - 1.12.1-3
- fix some commands failed
* Tue Mar 28 2023 yaoxin <yaoxin30@h-partners.com> - 1.12.1-2
- Fix CVE-2018-13867,CVE-2018-14031,CVE-2018-16438,CVE-2019-8396,CVE-2020-10812 and CVE-2021-37501