Compare commits

..

No commits in common. "c224c86fa4ffc026c0b7a4d8ff4ebbf616da5660" and "dbc8658913333451e604f526a2e6d5d18a391d21" have entirely different histories.

4 changed files with 89 additions and 276 deletions

View File

@ -1,12 +0,0 @@
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,333 +1,162 @@
%global sover 19
Name: netcdf
Version: 4.8.1
Release: 1
Summary: Libraries for the Unidata network Common Data Form
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
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
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}
%description
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.
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.
%package devel
Summary: Development files for netcdf
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: pkgconfig%{?_isa}
Requires: hdf5-devel%{?_isa}
Requires: libcurl-devel%{?_isa}
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}
%description devel
This package contains the netCDF C header files, shared devel libs, and
man pages.
This package contains the netCDF C header files, shared devel libs.
%package help
Summary: 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
%description help
Documents and helpful information for netcdf.
%prep
%autosetup -p1 -n %{name}-c-%{version}
%autosetup -n %{name}-c-%{version}
m4 libsrc/ncx.m4 > libsrc/ncx.c
%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="-ltirpc" \\\
LIBS="-ldf -ljpeg -ltirpc" \\\
--enable-hdf4 \\\
--disable-dap-remote-tests \\\
%{nil}
export LDFLAGS="%{__global_ldflags} -L%{_libdir}/hdf"
libtoolize --force
# Serial build
mkdir build
pushd build
cd build
ln -s ../configure .
%configure %{configure_opts}
%make_build
popd
make -j2
cd ../
# MPI builds
%if %{with_mpich}
for mpi in %{mpi_list}
export CC=mpicc
for mpi in mpich openmpi
do
mkdir $mpi
pushd $mpi
cd $mpi
module load mpi/$mpi-%{_arch}
ln -s ../configure .
# 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
%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
module purge
popd
cd ../
done
%endif
%install
make -C build install DESTDIR=${RPM_BUILD_ROOT}
/bin/rm -f ${RPM_BUILD_ROOT}%{_libdir}/*.la
%delete_la
chrpath --delete ${RPM_BUILD_ROOT}/%{_bindir}/nc{copy,dump,gen,gen3}
/bin/rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir
%if %{with_mpich}
for mpi in %{mpi_list}
rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir
for mpi in mpich openmpi
do
module load mpi/$mpi-%{_arch}
make -C $mpi install DESTDIR=${RPM_BUILD_ROOT}
rm $RPM_BUILD_ROOT/%{_libdir}/$mpi/lib/*.la
%delete_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
make %{?_smp_mflags} -C build check
%ldconfig_scriptlets
# 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
%files
%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/*
%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*
%files devel
%doc examples
%{_bindir}/nc-config
%{_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
%{_includedir}/{netcdf.h,netcdf_meta.h,netcdf_mem.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}/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
%{_includedir}/mpich-%{_arch}
%{_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}/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
%{_includedir}/openmpi-%{_arch}
%{_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

View File

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