[dpm-dsi/el5] Patch for proper EOF handling
Alejandro Alvarez
aalvarez at fedoraproject.org
Thu May 15 15:47:28 UTC 2014
commit 5225c82a6afe6f00d01c9399b9566ef9bff3a5ff
Author: aalvarez <aalvarez at cern.ch>
Date: Thu May 15 11:39:53 2014 +0200
Patch for proper EOF handling
.gitignore | 4 ----
dpm-dsi-eof.patch | 17 +++++++++++++++++
dpm-dsi.spec | 8 +++++++-
sources | 1 -
4 files changed, 24 insertions(+), 6 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 447e454..b4e3ccd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1 @@
-/dpm-dsi-1.8.2.tar.gz
-/dpm-dsi-1.8.3.tar.gz
-/dpm-dsi-1.9.0.tar.gz
-/dpm-dsi-1.8.4.tar.gz
/dpm-dsi-1.9.3.tar.gz
diff --git a/dpm-dsi-eof.patch b/dpm-dsi-eof.patch
new file mode 100644
index 0000000..0555c40
--- /dev/null
+++ b/dpm-dsi-eof.patch
@@ -0,0 +1,17 @@
+Index: src/dmlite_gridftp.c
+===================================================================
+--- src/dmlite_gridftp.c (.../dpm-dsi_1_9_3c) (révision 10416)
++++ src/dmlite_gridftp.c (.../dpm-dsi_1_9_3d) (révision 10416)
+@@ -825,9 +825,9 @@
+
+ /* Perform the actual read operation */
+ bytes_read = dmlite_fread(dmlite_handle_obj->fd, buffer, bytes_length);
+- /* Check for end of file reached (0 bytes read) */
+-
+- if (bytes_read < 0) { /* Check for errors too */
++ if (bytes_read == 0) /* EOF */
++ goto done;
++ if (bytes_read < 0) { /* Check for errors */
+ dmlite_handle_obj->cur_result = posix_error2gfs_result(_gfs_name, dmlite_handle_obj,
+ EFAULT, "failed read");
+ goto done;
diff --git a/dpm-dsi.spec b/dpm-dsi.spec
index 903e7b9..d9883cc 100644
--- a/dpm-dsi.spec
+++ b/dpm-dsi.spec
@@ -1,7 +1,7 @@
Name: dpm-dsi
Summary: Disk Pool Manager (DPM) plugin for the Globus GridFTP server
Version: 1.9.3
-Release: 1%{?dist}
+Release: 2%{?dist}
License: ASL 2.0
Group: Applications/Internet
URL: https://svnweb.cern.ch/trac/lcgdm/wiki/Dpm
@@ -10,6 +10,8 @@ URL: https://svnweb.cern.ch/trac/lcgdm/wiki/Dpm
# svn export http://svn.cern.ch/guest/lcgdm/dpm-dsi/tags/dpm-dsi_1_9_3c dpm-dsi-1.9.3
# tar -czvf dpm-dsi-1.9.3.tar.gz dpm-dsi-1.9.3
Source0: %{name}-%{version}.tar.gz
+# https://its.cern.ch/jira/browse/LCGDM-1408
+Patch0: dpm-dsi-eof.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: cmake
@@ -44,6 +46,7 @@ required to expose the data using this protocol.
%prep
%setup -q -n %{name}-%{version}
+%patch0 -p0
%build
%cmake . -DCMAKE_INSTALL_PREFIX=/
@@ -85,6 +88,9 @@ if [ $1 -ge 1 ]; then
fi
%changelog
+* Thu May 15 2014 Alejandro Alvarez <aalvarez at cern.ch> - 1.9.3-2
+- Patch for proper EOF handling
+
* Wed Mar 12 2014 Alejandro Alvarez <aalvarez at cern.ch> - 1.9.3-1
- Update for new upstream release
diff --git a/sources b/sources
index 67fff04..64c65fe 100644
--- a/sources
+++ b/sources
@@ -1,2 +1 @@
-a188ff31f54bb9f976672eb28eeb19e6 dpm-dsi-1.8.4.tar.gz
b74bbbb28efb8bbdb1d173fa008e6bad dpm-dsi-1.9.3.tar.gz
More information about the scm-commits
mailing list