[hdf5] 03/05: Update an rework path_max.diff

Gilles Filippini pini at debian.org
Wed Apr 1 21:13:14 UTC 2015


This is an automated email from the git hooks/post-receive script.

pini pushed a commit to branch master
in repository hdf5.

commit b9552cf04f37a7dabc0f52b43efd902fd2c4fd6b
Author: Gilles Filippini <pini at debian.org>
Date:   Wed Apr 1 22:18:56 2015 +0200

    Update an rework path_max.diff
    
    Call realpath() the POSIX way to avoid PATH_MAX usage.
---
 debian/changelog             |  3 ++-
 debian/patches/path_max.diff | 57 +++++++++++++++++++++-----------------------
 2 files changed, 29 insertions(+), 31 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index b84c1c1..b6c958d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,10 @@
-hdf5 (1.8.14+docs-3) UNRELEASED; urgency=medium
+hdf5 (1.8.14+docs-2) UNRELEASED; urgency=medium
 
   * debian/control: drop libhdf5-mpich2-* transitional packages.
   * Fix helper script debian/sort-symbols to workaround bug #773718
     against dpkg-dev (dpkg-gensymbols).
   * Add hppa to openmpi enabled architectures (closes: #776845).
+  * Rework path_max.diff patch to call realpath() the POSIX way.
 
  -- Gilles Filippini <pini at debian.org>  Mon, 02 Feb 2015 20:35:28 +0100
 
diff --git a/debian/patches/path_max.diff b/debian/patches/path_max.diff
index 2d2a60f..464fce5 100644
--- a/debian/patches/path_max.diff
+++ b/debian/patches/path_max.diff
@@ -1,35 +1,32 @@
 Description: avoid the issue of PATH_MAX not being available on Hurd.
- Not really clean and suitable for upstream though, but can do the job
- for making hdf5 compile and available in Debian.
-Author: Pino Toscano <toscano.pino at tiscali.it>
+ Call realpath() the POSIX way, with NULL as second parameter so that
+ the returned string is dynamically allocated. This way there is no
+ more need for the strdup() call.
+Author: Gilles Filippini <pini at debian.org>
 Bug-Debian: http://bugs.debian.org/627896
-Index: hdf5/src/H5F.c
+Index: hdf5/src/H5Fint.c
 ===================================================================
---- hdf5.orig/src/H5F.c
-+++ hdf5/src/H5F.c
-@@ -116,6 +116,10 @@ done:
-     FUNC_LEAVE_NOAPI(ret_value)
- } /* H5F__init_pub_interface() */
+--- hdf5.orig/src/H5Fint.c
++++ hdf5/src/H5Fint.c
+@@ -1569,7 +1569,6 @@ H5F_build_actual_name(const H5F_t *f, co
+             int *fd;                    /* POSIX I/O file descriptor */
+             h5_stat_t st;               /* Stat info from stat() call */
+             h5_stat_t fst;              /* Stat info from fstat() call */
+-            char realname[PATH_MAX];    /* Fully resolved path name of file */
+             hbool_t want_posix_fd;      /* Flag for retrieving file descriptor from VFD */
  
-+#ifndef PATH_MAX
-+#define PATH_MAX    4096
-+#endif  /* !PATH_MAX */
-+
- 

- /*-------------------------------------------------------------------------
-  * Function:	H5F_init
-Index: hdf5/testpar/t_cache.c
-===================================================================
---- hdf5.orig/testpar/t_cache.c
-+++ hdf5/testpar/t_cache.c
-@@ -35,6 +35,10 @@
- 
- #include "H5Fpkg.h"
- 
-+#ifndef PATH_MAX
-+#define PATH_MAX    512
-+#endif  /* !PATH_MAX */
-+
+             /* Perform a sanity check that the file or link wasn't switched
+@@ -1606,12 +1605,8 @@ H5F_build_actual_name(const H5F_t *f, co
+                 HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "files' st_ino or st_dev fields changed!")
  
- int     	nerrors = 0;
- int		failures = 0;
+             /* Get the resolved path for the file name */
+-            if(NULL == HDrealpath(name, realname))
++            if(NULL == (*actual_name = HDrealpath(name, NULL)))
+                 HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve real path for file")
+-
+-            /* Duplicate the resolved path for the file name */
+-            if(NULL == (*actual_name = (char *)H5MM_strdup(realname)))
+-                HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "can't duplicate real path")
+         } /* end if */
+     } /* end if */
+ #endif /* H5_HAVE_SYMLINK */

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/hdf5.git



More information about the Pkg-grass-devel mailing list