Compare commits

...

11 Commits

Author SHA1 Message Date
openeuler-ci-bot
c224c86fa4
!29 【轻量级 PR】:fix bad date in changelog
From: @zhangshaoning_uniontech 
Reviewed-by: @wk333 
Signed-off-by: @wk333
2024-06-17 06:12:32 +00:00
张少宁
e2fda4c227
fix bad date in changelog
Signed-off-by: 张少宁 <zhangshaoning@uniontech.com>
2024-06-17 05:46:27 +00:00
openeuler-ci-bot
8eaa10e88f
!22 Update to 4.8.1
From: @starlet-dx 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
2023-03-30 03:49:07 +00:00
starlet-dx
13bc21b0a0 Update to 4.8.1 2023-03-29 15:10:05 +08:00
openeuler-ci-bot
74cf358677
!16 更新netcdf.spec文件中license为BSD-3-Clause
From: @zjay998 
Reviewed-by: @myeuler 
Signed-off-by: @myeuler
2022-08-31 09:24:35 +00:00
Zhang Jun
55c3eb89ec update License 2022-08-12 10:50:01 +08:00
openeuler-ci-bot
463dc6972e
!9 fix CVE-2021-31348
From: @deng-yuyu-01 
Reviewed-by: @starlet-dx, @jingxiaolu 
Signed-off-by: @jingxiaolu
2022-07-15 09:55:00 +00:00
dengyuyu
97b24e5cf6 fix CVE-2021-31348 2022-07-15 15:52:39 +08:00
openeuler-ci-bot
bb244631d0
!6 同步sp2的修改
Merge pull request !6 from Wieder/openEuler-20.03-LTS-SP2
2022-01-11 09:21:40 +00:00
openeuler-ci-bot
7d91342967 !3 同步master的netcdf-4.7.3到SP2分支
From: @caodongxia
Reviewed-by: @overweight
Signed-off-by: @overweight
2021-05-22 10:39:52 +08:00
caodongxia
35adbd5802 synchronize 2021-05-18 21:29:00 +08:00
4 changed files with 276 additions and 89 deletions

12
CVE-2021-31348.patch Normal file
View File

@ -0,0 +1,12 @@
diff -Naru "netcdf-c-4.7.3 copy/libdap4/ezxml.c" netcdf-c-4.7.3/libdap4/ezxml.c
--- "netcdf-c-4.7.3 copy/libdap4/ezxml.c" 2022-07-13 10:24:32.128424000 +0800
+++ netcdf-c-4.7.3/libdap4/ezxml.c 2022-07-13 10:24:57.220170000 +0800
@@ -574,7 +574,7 @@
for (l = 0; *s && ((! l && *s != '>') || (l && (*s != ']' ||
*(s + strspn(s + 1, EZXML_WS) + 1) != '>')));
l = (*s == '[') ? 1 : l) s += strcspn(s + 1, "[]>") + 1;
- if (! *s && e != '>')
+ if (! *s)
return ezxml_err(root, d, "unclosed <!DOCTYPE");
d = (l) ? strchr(d, '[') + 1 : d;
if (l && ! ezxml_internal_dtd(root, d, s++ - d)) return &root->xml;

View File

@ -1,162 +1,333 @@
%global sover 19
Name: netcdf
Version: 4.4.1.1
Release: 11
Summary: Unidata network Common Data Format Libraries
License: NetCDF
URL: http://www.unidata.ucar.edu/software/netcdf/
Source0: https://github.com/Unidata/netcdf-c/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Version: 4.8.1
Release: 1
Summary: Libraries for the Unidata network Common Data Form
BuildRequires: libtool chrpath doxygen hdf-static hdf5-devel gawk libcurl-devel
BuildRequires: m4 zlib-devel openssh-clients mpich-devel hdf5-mpich-devel >= 1.8.4
BuildRequires: openssh-clients openmpi-devel hdf5-openmpi-devel >= 1.8.4
Requires: hdf5 = %{_hdf5_version} hdf5-mpich = %{_hdf5_version} hdf5-openmpi = %{_hdf5_version}
Provides: %{name}-mpich2 = %{version}-%{release} %{name}-mpich = %{version}-%{release}
Provides: %{name}-openmpi = %{version}-%{release}
Obsoletes: %{name}-mpich2 < 4.3.0-4 %{name}-mpich < %{version}-%{release}
Obsoletes: %{name}-openmpi < %{version}-%{release}
License: BSD-3-Clause
URL: https://github.com/Unidata/netcdf-c
Source0: https://github.com/Unidata/netcdf-c/archive/v%{version}/%{name}-%{version}.tar.gz
Patch0000: CVE-2021-31348.patch
BuildRequires: make
BuildRequires: environment-modules
BuildRequires: libtool
BuildRequires: chrpath
BuildRequires: doxygen
BuildRequires: hdf-static
BuildRequires: hdf5-devel
BuildRequires: gawk
BuildRequires: libcurl-devel
BuildRequires: m4
BuildRequires: zlib-devel
%ifarch %{valgrind_arches}
BuildRequires: valgrind
%endif
BuildRequires: openssh-clients
Requires: hdf5%{?_isa} = %{_hdf5_version}
%global with_mpich 1
%global with_openmpi 1
%if %{with_mpich}
%global mpi_list mpich
%endif
%if %{with_openmpi}
%global mpi_list %{?mpi_list} openmpi
%endif
%description
NetCDF (Network Common Data Form) is a set of software libraries and machine-independent data formats
that support the creation, accessand sharing of array-oriented scientific data.
It is also a community standard for sharing scientific data.
The Unidata Program Center supports and maintains netCDF programming interfaces for C, C++, Java and Fortran.
Programming interfaces are also available for Python, IDL, MATLAB, R, Ruby and Perl.
NetCDF (network Common Data Form) is an interface for array-oriented
data access and a freely-distributed collection of software libraries
for C, Fortran, C++, and perl that provides an implementation of the
interface. The NetCDF library also defines a machine-independent
format for representing scientific data. Together, the interface,
library, and format support the creation, access, and sharing of
scientific data. The NetCDF software was developed at the Unidata
Program Center in Boulder, Colorado.
%package devel
Summary: Development files for netcdf
Requires: %{name} = %{version}-%{release} pkgconfig hdf5-devel libcurl-devel
Requires: %{name}-mpich-devel = %{version}-%{release} %{name}-openmpi = %{version}-%{release} openmpi-devel hdf5-openmpi-devel
Requires: %{name}-openmpi-devel = %{version}-%{release}
Provides: %{name}-static = %{version}-%{release} %{name}-mpich-devel = %{version}-%{release} %{name}-mpich-static = %{version}-%{release}
Provides: %{name}-mpich2-devel = %{version}-%{release} %{name}-mpich2-static = %{version}-%{release}
Provides: %{name}-openmpi-devel = %{version}-%{release} %{name}-openmpi-static = %{version}-%{release}
Obsoletes: %{name}-static < %{version}-%{release} %{name}-mpich-devel < %{version}-%{release} %{name}-mpich-static < %{version}-%{release}
Obsoletes: %{name}-mpich2-devel < 4.3.0-4 %{name}-mpich2-static < 4.3.0-4
Obsoletes: %{name}-openmpi-devel < %{version}-%{release} %{name}-openmpi-static < %{version}-%{release}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: pkgconfig%{?_isa}
Requires: hdf5-devel%{?_isa}
Requires: libcurl-devel%{?_isa}
%description devel
This package contains the netCDF C header files, shared devel libs.
This package contains the netCDF C header files, shared devel libs, and
man pages.
%package help
Summary: Helpful information for netcdf
%description help
Documents and helpful information for netcdf.
%package static
Summary: Static libs for netcdf
Requires: %{name}%{?_isa} = %{version}-%{release}
%description static
This package contains the netCDF C static libs.
%if %{with_mpich}
%package mpich
Summary: NetCDF mpich libraries
Requires: hdf5-mpich%{?_isa} = %{_hdf5_version}
BuildRequires: mpich-devel
BuildRequires: hdf5-mpich-devel >= 1.8.4
Provides: %{name}-mpich2 = %{version}-%{release}
Obsoletes: %{name}-mpich2 < 4.3.0-4
%description mpich
NetCDF parallel mpich libraries
%package mpich-devel
Summary: NetCDF mpich development files
Requires: %{name}-mpich%{?_isa} = %{version}-%{release}
Requires: pkgconfig%{?_isa}
Requires: hdf5-mpich-devel%{?_isa}
Requires: libcurl-devel%{?_isa}
Provides: %{name}-mpich2-devel = %{version}-%{release}
Obsoletes: %{name}-mpich2-devel < 4.3.0-4
%description mpich-devel
NetCDF parallel mpich development files
%package mpich-static
Summary: NetCDF mpich static libraries
Requires: %{name}-mpich-devel%{?_isa} = %{version}-%{release}
Provides: %{name}-mpich2-static = %{version}-%{release}
Obsoletes: %{name}-mpich2-static < 4.3.0-4
%description mpich-static
NetCDF parallel mpich static libraries
%endif
%if %{with_openmpi}
%package openmpi
Summary: NetCDF openmpi libraries
Requires: hdf5-openmpi%{?_isa} = %{_hdf5_version}
BuildRequires: openmpi-devel
BuildRequires: hdf5-openmpi-devel >= 1.8.4
%description openmpi
NetCDF parallel openmpi libraries
%package openmpi-devel
Summary: NetCDF openmpi development files
Requires: %{name}-openmpi%{_isa} = %{version}-%{release}
Requires: openmpi-devel%{?_isa}
Requires: pkgconfig%{?_isa}
Requires: hdf5-openmpi-devel%{?_isa}
Requires: libcurl-devel%{?_isa}
%description openmpi-devel
NetCDF parallel openmpi development files
%package openmpi-static
Summary: NetCDF openmpi static libraries
Requires: %{name}-openmpi-devel%{?_isa} = %{version}-%{release}
%description openmpi-static
NetCDF parallel openmpi static libraries
%endif
%prep
%autosetup -n %{name}-c-%{version}
m4 libsrc/ncx.m4 > libsrc/ncx.c
%autosetup -p1 -n %{name}-c-%{version}
%build
%global _configure ../configure
export LDFLAGS="%{__global_ldflags} -L%{_libdir}/hdf"
export CFLAGS="%{optflags} -fno-strict-aliasing"
%global configure_opts \\\
--enable-shared \\\
--enable-netcdf-4 \\\
--enable-dap \\\
--enable-extra-example-tests \\\
CPPFLAGS=-I%{_includedir}/hdf \\\
LIBS="-ldf -ljpeg -ltirpc" \\\
LIBS="-ltirpc" \\\
--enable-hdf4 \\\
--disable-dap-remote-tests \\\
%{nil}
export LDFLAGS="%{__global_ldflags} -L%{_libdir}/hdf"
libtoolize --force
# Serial build
mkdir build
cd build
pushd build
ln -s ../configure .
%configure %{configure_opts}
make -j2
cd ../
%make_build
popd
export CC=mpicc
for mpi in mpich openmpi
# MPI builds
%if %{with_mpich}
for mpi in %{mpi_list}
do
mkdir $mpi
cd $mpi
pushd $mpi
module load mpi/$mpi-%{_arch}
ln -s ../configure .
%configure %{configure_opts} --libdir=%{_libdir}/$mpi/lib \
--bindir=%{_libdir}/$mpi/bin --sbindir=%{_libdir}/$mpi/sbin --includedir=%{_includedir}/$mpi-%{_arch} \
--datarootdir=%{_libdir}/$mpi/share --mandir=%{_libdir}/$mpi/share/man \
%{nil}
make -j2
# parallel tests hang on s390(x)
%configure %{configure_opts} \
CC=mpicc \
--libdir=%{_libdir}/$mpi/lib \
--bindir=%{_libdir}/$mpi/bin \
--sbindir=%{_libdir}/$mpi/sbin \
--includedir=%{_includedir}/$mpi-%{_arch} \
--datarootdir=%{_libdir}/$mpi/share \
--mandir=%{_libdir}/$mpi/share/man \
--enable-parallel-tests
%make_build
module purge
cd ../
popd
done
%endif
%install
make -C build install DESTDIR=${RPM_BUILD_ROOT}
%delete_la
/bin/rm -f ${RPM_BUILD_ROOT}%{_libdir}/*.la
chrpath --delete ${RPM_BUILD_ROOT}/%{_bindir}/nc{copy,dump,gen,gen3}
rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir
for mpi in mpich openmpi
/bin/rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir
%if %{with_mpich}
for mpi in %{mpi_list}
do
module load mpi/$mpi-%{_arch}
make -C $mpi install DESTDIR=${RPM_BUILD_ROOT}
%delete_la
rm $RPM_BUILD_ROOT/%{_libdir}/$mpi/lib/*.la
chrpath --delete ${RPM_BUILD_ROOT}/%{_libdir}/$mpi/bin/nc{copy,dump,gen,gen3}
module purge
done
%endif
chrpath -d %{buildroot}/%{_libdir}/openmpi/lib/libh5bzip2.so
chrpath -d %{buildroot}/%{_libdir}/mpich/lib/libh5bzip2.so
chrpath -d %{buildroot}/%{_libdir}/mpich/lib/libnetcdf.so.19.0.1
chrpath -d %{buildroot}/%{_libdir}/openmpi/lib/libnetcdf.so.19.0.1
chrpath -d %{buildroot}/%{_libdir}/mpich/bin/nc4print
chrpath -d %{buildroot}/%{_libdir}/openmpi/bin/nc4print
chrpath -d %{buildroot}/%{_libdir}/mpich/bin/ocprint
chrpath -d %{buildroot}/%{_libdir}/openmpi/bin/ocprint
%check
# Set to 1 to fail if tests fail
fail=1
make -C build check || ( cat build/*/test-suite.log && exit $fail )
for mpi in mpich openmpi
do
module load mpi/$mpi-%{_arch}
make -C $mpi check || ( cat $mpi/*/test-suite.log && exit $fail )
module purge
done
%post
/sbin/ldconfig
%postun
/sbin/ldconfig
make %{?_smp_mflags} -C build check
%ldconfig_scriptlets
%files
%doc COPYRIGHT README.md RELEASE_NOTES.md
%{_bindir}/{nccopy,ncdump,ncgen,ncgen3}
%{_libdir}/*.so.11*
%{_libdir}/mpich/bin/{nccopy,ncdump,ncgen,ncgen3}
%{_libdir}/mpich/lib/*.so.11*
%{_libdir}/openmpi/bin/{nccopy,ncdump,ncgen,ncgen3}
%{_libdir}/openmpi/lib/*.so.11*
%license COPYRIGHT
%doc README.md RELEASE_NOTES.md
%{_bindir}/nccopy
%{_bindir}/ncdump
%{_bindir}/ncgen
%{_bindir}/ncgen3
%{_bindir}/nc4print
%{_bindir}/ocprint
%{_libdir}/*.so.%{sover}*
%{_mandir}/man1/*
%files devel
%doc examples
%{_bindir}/nc-config
%{_includedir}/{netcdf.h,netcdf_meta.h,netcdf_mem.h}
%{_includedir}/netcdf.h
%{_includedir}/netcdf_aux.h
%{_includedir}/netcdf_dispatch.h
%{_includedir}/netcdf_filter.h
%{_includedir}/netcdf_meta.h
%{_includedir}/netcdf_mem.h
%ifarch x86_64
%{_includedir}/mpich-x86_64/netcdf_filter_build.h
%{_includedir}/openmpi-x86_64/netcdf_filter_build.h
%endif
%ifarch aarch64
%{_includedir}/mpich-aarch64/netcdf_filter_build.h
%{_includedir}/openmpi-aarch64/netcdf_filter_build.h
%endif
%{_includedir}/netcdf_filter_build.h
%{_libdir}/libnetcdf.settings
%{_libdir}/*.so
%{_libdir}/pkgconfig/netcdf.pc
%{_mandir}/man3/*
%files static
%{_libdir}/*.a
%if %{with_mpich}
%files mpich
%license COPYRIGHT
%doc README.md RELEASE_NOTES.md
%{_libdir}/mpich/bin/nccopy
%{_libdir}/mpich/bin/ncdump
%{_libdir}/mpich/bin/ncgen
%{_libdir}/mpich/bin/ncgen3
%{_libdir}/mpich/bin/nc4print
%{_libdir}/mpich/bin/ocprint
%{_libdir}/mpich/lib/*.so.%{sover}*
%doc %{_libdir}/mpich/share/man/man1/*.1*
%files mpich-devel
%{_libdir}/mpich/bin/nc-config
%{_includedir}/mpich-%{_arch}
%{_includedir}/mpich-%{_arch}/netcdf.h
%{_includedir}/mpich-%{_arch}/netcdf_aux.h
%{_includedir}/mpich-%{_arch}/netcdf_dispatch.h
%{_includedir}/mpich-%{_arch}/netcdf_filter.h
%{_includedir}/mpich-%{_arch}/netcdf_meta.h
%{_includedir}/mpich-%{_arch}/netcdf_mem.h
%{_includedir}/mpich-%{_arch}/netcdf_par.h
%{_libdir}/mpich/lib/libnetcdf.settings
%{_libdir}/mpich/lib/*.so
%{_libdir}/mpich/lib/pkgconfig/%{name}.pc
%doc %{_libdir}/mpich/share/man/man3/*.3*
%files mpich-static
%{_libdir}/mpich/lib/*.a
%endif
%if %{with_openmpi}
%files openmpi
%license COPYRIGHT
%doc README.md RELEASE_NOTES.md
%{_libdir}/openmpi/bin/nccopy
%{_libdir}/openmpi/bin/ncdump
%{_libdir}/openmpi/bin/ncgen
%{_libdir}/openmpi/bin/ncgen3
%{_libdir}/openmpi/bin/nc4print
%{_libdir}/openmpi/bin/ocprint
%{_libdir}/openmpi/lib/*.so.%{sover}*
%doc %{_libdir}/openmpi/share/man/man1/*.1*
%files openmpi-devel
%{_libdir}/openmpi/bin/nc-config
%{_includedir}/openmpi-%{_arch}
%{_includedir}/openmpi-%{_arch}/netcdf.h
%{_includedir}/openmpi-%{_arch}/netcdf_aux.h
%{_includedir}/openmpi-%{_arch}/netcdf_dispatch.h
%{_includedir}/openmpi-%{_arch}/netcdf_filter.h
%{_includedir}/openmpi-%{_arch}/netcdf_meta.h
%{_includedir}/openmpi-%{_arch}/netcdf_mem.h
%{_includedir}/openmpi-%{_arch}/netcdf_par.h
%{_libdir}/openmpi/lib/libnetcdf.settings
%{_libdir}/openmpi/lib/*.so
%{_libdir}/openmpi/lib/pkgconfig/%{name}.pc
%{_libdir}/openmpi/lib/*.a
%files help
%{_mandir}/man1/*
%{_mandir}/man3/*
%doc %{_libdir}/mpich/share/man/man1/*.1*
%doc %{_libdir}/mpich/share/man/man3/*.3*
%doc %{_libdir}/openmpi/share/man/man1/*.1*
%doc %{_libdir}/openmpi/share/man/man3/*.3*
%files openmpi-static
%{_libdir}/openmpi/lib/*.a
%endif
%changelog
* Wed Mar 29 2023 yaoxin <yaoxin30@h-partners.com> - 4.8.1-1
- Update to 4.8.1
* Fri Aug 12 2022 zhangjun <zhangjun@kylinos.cn> - 4.7.3-3
- Upgrade license to BSD-3-Clause
* Wed Jul 13 2022 dengyuyu <yuyu.deng@epro.com.cn> - 4.7.3-2
- fix CVE-2021-31348
* Fri Apr 30 2021 caodongxia <caodongxia@huawei.com> - 4.7.3-1
- Upgrade to 4.7.3
* Mon Mar 9 2020 tangjing <tangjing30@huawei.com> - 4.4.1.1-11
- Package init

4
netcdf.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: Unidata/netcdf-c
tag_prefix: "v^"
separator: "."