[netcdf/el5] - Update to 3.6.3 - Add upstream patch to fix nofill mode data corruption bug
Orion Poplawski
orion at fedoraproject.org
Mon Oct 21 16:20:00 UTC 2013
commit 4669baf77aa0755f98f76d2202c7013efd3f14b3
Author: Orion Poplawski <orion at nwra.com>
Date: Mon Oct 21 10:20:03 2013 -0600
- Update to 3.6.3
- Add upstream patch to fix nofill mode data corruption bug
.gitignore | 1 +
netcdf-3.6.2-gcc43.patch | 21 ---------------------
netcdf.spec | 20 ++++++++++++++------
nofill-bug.patch | 26 ++++++++++++++++++++++++++
sources | 2 +-
5 files changed, 42 insertions(+), 28 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e49105d..5df9483 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
netcdf-3.6.2.tar.bz2
+/netcdf-3.6.3.tar.gz
diff --git a/netcdf.spec b/netcdf.spec
index 943b393..94bb1b2 100644
--- a/netcdf.spec
+++ b/netcdf.spec
@@ -1,13 +1,15 @@
Name: netcdf
-Version: 3.6.2
-Release: 7%{?dist}
+Version: 3.6.3
+Release: 1%{?dist}
Summary: Libraries for the Unidata network Common Data Form (NetCDF v3)
Group: Applications/Engineering
License: NetCDF
URL: http://my.unidata.ucar.edu/content/software/netcdf/index.html
-Source0: ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-3.6.2.tar.bz2
-Patch0: netcdf-3.6.2-gcc43.patch
+Source0: ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-%{version}.tar.gz
+# Patch to fix nofill mode bug
+# http://www.unidata.ucar.edu/jira/browse/NCF-22
+Patch0: http://www.unidata.ucar.edu/netcdf/patches/nofill-bug.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gcc-gfortran, gawk
@@ -21,7 +23,7 @@ Requires: %{name} = %{version}-%{release}
%package static
Summary: Static libs for netcdf-3
Group: Development/Libraries
-Requires: %{name} = %{version}-%{release}
+Requires: %{name}-devel = %{version}-%{release}
%description
NetCDF-3 (network Common Data Form ver3) is an interface for
@@ -63,7 +65,7 @@ This package contains the netCDF-3 static libs.
%prep
%setup -q
-%patch0 -p1 -b .gcc43
+%patch0 -p0 -b .nofill
%build
export FC="gfortran"
@@ -81,6 +83,7 @@ mkdir -p ${RPM_BUILD_ROOT}%{_includedir}/netcdf-3
/bin/mv ${RPM_BUILD_ROOT}%{_includedir}/*.* \
${RPM_BUILD_ROOT}%{_includedir}/netcdf-3
/bin/rm -f ${RPM_BUILD_ROOT}%{_libdir}/*.la
+/bin/rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir
#
# Does the /usr/include/netcdf-3/netcdf.mod file really belong in
# /usr/include/netcdf-3/ or should it go in /usr/lib/netcdf-3 ???
@@ -109,6 +112,7 @@ rm -rf ${RPM_BUILD_ROOT}
%{_bindir}/*
%{_libdir}/*.so.*
%{_mandir}/man1/*
+%{_infodir}/*
%files devel
%defattr(-,root,root,-)
@@ -122,6 +126,10 @@ rm -rf ${RPM_BUILD_ROOT}
%changelog
+* Mon Oct 21 2013 Orion Poplawski <orion at cora.nwra.com> - 3.6.3-1
+- Update to 3.6.3
+- Add upstream patch to fix nofill mode data corruption bug
+
* Wed Apr 2 2008 Orion Poplawski <orion at cora.nwra.com> - 3.6.2-7
- Change patch to include <cstring>
- Remove %%{?_smp_mflags} - not parallel build safe (fortran modules)
diff --git a/nofill-bug.patch b/nofill-bug.patch
new file mode 100644
index 0000000..d77123a
--- /dev/null
+++ b/nofill-bug.patch
@@ -0,0 +1,26 @@
+Index: libsrc/posixio.c
+===================================================================
+--- libsrc/posixio.c (revision 1125)
++++ libsrc/posixio.c (working copy)
+@@ -505,6 +505,22 @@
+ /* copy upper half into lower half */
+ (void) memcpy(pxp->bf_base, middle, pxp->bf_cnt);
+ }
++ else /* added to fix nofill bug */
++ {
++ assert(pxp->bf_extent == 2 * pxp->blksz);
++ /* still have to page out lower half, if modified */
++ if(fIsSet(pxp->bf_rflags, RGN_MODIFIED))
++ {
++ assert(pxp->bf_refcount <= 0);
++ status = px_pgout(nciop,
++ pxp->bf_offset,
++ pxp->blksz,
++ pxp->bf_base,
++ &pxp->pos);
++ if(status != ENOERR)
++ return status;
++ }
++ }
+ pxp->bf_offset = blkoffset;
+ /* pxp->bf_extent = pxp->blksz; */
diff --git a/sources b/sources
index 8ae8d16..40db926 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-1eca0ea1e81e14ebc5bb93e5dd25c364 netcdf-3.6.2.tar.bz2
+334e9bdc010b6cd03fd6531a45fe50ad netcdf-3.6.3.tar.gz
More information about the scm-commits
mailing list