Your message dated Sat, 18 Jun 2016 16:27:08 +0000
with message-id <[email protected]>
and subject line Bug#822757: fixed in ros-rospack 2.3.0-2
has caused the Debian Bug report #822757,
regarding ros-rospack: FTBFS on hurd-i386
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
822757: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=822757
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: ros-rospack
Version: 2.2.5-3
Severity: important
Tags: patch
Usertags: hurd
User: [email protected]

Hello,

Currently ros-rospack FTBFS on GNU/Hurd due to usage of PATH_MAX, which is not
defined. The attached patch fixes this for all UNIX cases by dynamically
allocating and de-allocating the needed strings. The patch works fine for UNIX,
but has not been tested if the WIN32 or MINGW32 versions are affected. In case
of any doubts about the patch, please forward this patch to the upstream
authors, so I can communicate directly with them.

Thanks!
Index: ros-rospack-2.2.5/src/rospack.cpp
===================================================================
--- ros-rospack-2.2.5.orig/src/rospack.cpp
+++ ros-rospack-2.2.5/src/rospack.cpp
@@ -2011,11 +2011,14 @@ Rosstackage::writeCache()
   }
   else
   {
-    char tmp_cache_dir[PATH_MAX];
-    char tmp_cache_path[PATH_MAX];
-    strncpy(tmp_cache_dir, cache_path.c_str(), sizeof(tmp_cache_dir));
+    int len = cache_path.size() + 1;
+    char *tmp_cache_dir = (char *)malloc(len);
+    strncpy(tmp_cache_dir, cache_path.c_str(), len);
+    // make sure tmp_cache_dir is NULL terminated
+    tmp_cache_dir[len - 1] = '\0';
 #if defined(_MSC_VER)
     // No dirname on Windows; use _splitpath_s instead
+    char tmp_cache_path[PATH_MAX];
     char drive[_MAX_DRIVE], dir[_MAX_DIR], fname[_MAX_FNAME], ext[_MAX_EXT];
     _splitpath_s(tmp_cache_dir, drive, _MAX_DRIVE, dir, _MAX_DIR, fname, _MAX_FNAME,
                  ext, _MAX_EXT);
@@ -2023,11 +2026,18 @@ Rosstackage::writeCache()
     _makepath_s(full_dir, _MAX_DRIVE + _MAX_DIR, drive, dir, NULL, NULL);
     snprintf(tmp_cache_path, sizeof(tmp_cache_path), "%s\\.rospack_cache.XXXXXX", full_dir);
 #elif defined(__MINGW32__)
+    char tmp_cache_path[PATH_MAX];
     char* temp_name = tempnam(dirname(tmp_cache_dir),".rospack_cache.");
     snprintf(tmp_cache_path, sizeof(tmp_cache_path), temp_name);
     delete temp_name;
 #else
-    snprintf(tmp_cache_path, sizeof(tmp_cache_path), "%s/.rospack_cache.XXXXXX", dirname(tmp_cache_dir));
+    char *tmp_cache_path = NULL;
+    char *temp_dirname = strdup(dirname(tmp_cache_dir));
+    free(tmp_cache_dir);
+    len = strlen(temp_dirname) + 22 + 1;
+    tmp_cache_path = (char *)malloc(len);
+    snprintf(tmp_cache_path, len, "%s/.rospack_cache.XXXXXX", temp_dirname);
+    free(temp_dirname);
 #endif
 #if defined(__MINGW32__)
     // There is no equivalent of mkstemp or _mktemp_s on mingw, so we resort to a slightly problematic
@@ -2085,6 +2095,9 @@ Rosstackage::writeCache()
         }
       }
     }
+#if !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(WIN32)
+		 free(tmp_cache_path);
+#endif
   }
 }
 

--- End Message ---
--- Begin Message ---
Source: ros-rospack
Source-Version: 2.3.0-2

We believe that the bug you reported is fixed in the latest version of
ros-rospack, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Jochen Sprickerhof <[email protected]> (supplier of updated 
ros-rospack package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sat, 18 Jun 2016 18:08:09 +0200
Source: ros-rospack
Binary: librospack-dev librospack0d rospack-tools
Architecture: source amd64
Version: 2.3.0-2
Distribution: unstable
Urgency: medium
Maintainer: Debian Science Maintainers 
<[email protected]>
Changed-By: Jochen Sprickerhof <[email protected]>
Description:
 librospack-dev - Robot OS package information library header files
 librospack0d - Robot OS package information library
 rospack-tools - command-line tool for retrieving information about Robot OS 
packa
Closes: 822757
Changes:
 ros-rospack (2.3.0-2) unstable; urgency=medium
 .
   * Add patch for hurd-i386.
     Thanks to Svante Signell (Closes: #822757)
Checksums-Sha1:
 bde84343d12135e1324cd1463a42654c0a60cab3 2363 ros-rospack_2.3.0-2.dsc
 b2d5f6ec846add9d51995372b931e610bf7f70f4 5004 ros-rospack_2.3.0-2.debian.tar.xz
 93cdd46596713a7c31f84fc8d6ab985eba12bd62 13610 librospack-dev_2.3.0-2_amd64.deb
 007eb8de66b142f8bb12d26461b7535970aa2bf7 868826 
librospack0d-dbgsym_2.3.0-2_amd64.deb
 0f20ffa3de4214a040efdf39b2dce8748daa7f25 88866 librospack0d_2.3.0-2_amd64.deb
 301745bd7c9175a36e749da8f0ecfa12e4d79231 32484 
rospack-tools-dbgsym_2.3.0-2_amd64.deb
 693b60f8107ac7e44d77609658af7eb3d959f19b 6914 rospack-tools_2.3.0-2_amd64.deb
Checksums-Sha256:
 80801528028330401f1dbe908f02071a4e41e443deb5addd913f944bc1e882aa 2363 
ros-rospack_2.3.0-2.dsc
 4add268c1a2ae14954dba25e523d9d9b4011aba1241f2c64f7ed90add3dfd27f 5004 
ros-rospack_2.3.0-2.debian.tar.xz
 04534610e810a3c47c1ec6766ea541017edaddb6bffaed3fa3636ce2f04c7a16 13610 
librospack-dev_2.3.0-2_amd64.deb
 0b95e49ff8760b42828f54a13cab895eff5e103c4871d6f9604861635b0618a7 868826 
librospack0d-dbgsym_2.3.0-2_amd64.deb
 5856a696d8813efe2f45424416638bc0e3dafde612c183b85ff5bf12119502f7 88866 
librospack0d_2.3.0-2_amd64.deb
 ef91ee7f3be99ec0c5983e92862893cf1d2036256787a557946399ec6550ca34 32484 
rospack-tools-dbgsym_2.3.0-2_amd64.deb
 4a990f952c33fa4df9c558e5a7dabfea4b7348c4bf8eb8eba228b94b4cb8097d 6914 
rospack-tools_2.3.0-2_amd64.deb
Files:
 f9071bad93e6091bf787465292f6a33e 2363 libs optional ros-rospack_2.3.0-2.dsc
 f12fba124c155b2420ef9b70e34f4679 5004 libs optional 
ros-rospack_2.3.0-2.debian.tar.xz
 610c5dfb0b367fd1db6e73c052778b99 13610 libdevel optional 
librospack-dev_2.3.0-2_amd64.deb
 0a973dfd64a6ca3ad774f83eb352711f 868826 debug extra 
librospack0d-dbgsym_2.3.0-2_amd64.deb
 150b7b1d8259f053aebe7c392dd6931c 88866 libs optional 
librospack0d_2.3.0-2_amd64.deb
 a1786d3b77dbfe201d0259298f83fac5 32484 debug extra 
rospack-tools-dbgsym_2.3.0-2_amd64.deb
 59eb5a9795467958f353441e5b7661a0 6914 utils optional 
rospack-tools_2.3.0-2_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCgAGBQJXZXMKAAoJEFv/3MJY5pQzan0QAKECpS+WCYc6ZDsZvGasJfu1
1lRAftMeAiNTbGxEkhtsr1+2UH5LDpsF05k3kELPBZv4Pee/Tipa0g0RPEZekwSg
AF1wfL5y4SQJx5yIa2NtT5r+NAz7arDRLtGRvn7NGrLy2G2YPXH7Gd7aicF3ygCS
V85E34RU4eI+/kYH8Ws2EuBLubwRMzYYv3sr/eSTWurzxvvHXo2z+gJh8HZ616Hp
cZx0B74/AV4cB9TSs1MhbNswSkQoVfrHEfqkkStsvDmljqk9HmBjgsH0sOV3KjLf
B89qzcYqC9cp/it0T6UX/RnAULNjJjGu4qPIrz+fDE0UMRBR7NZ3u1NOCr1a6qXF
OGAXRuyKUNi3dur5V2khh5/iArISrC34SJVKES3vXwwDI/ptq+TFo06bT6imkdry
Y42nRTPiFgc3oyAL1vu23Pt3VkzYoPXuHFecCW6tG89ZU25w5+INd/zboROUOwNl
Gv6TjgaudZXBGfk6qfJUmffqYSvjBDz3mjS0Tzw3XzqCMWi30nDAAoMc9I4x9qLn
S7athChoX72wnPIHSG5Jsk+ng0uVauoOEFCgewRPA4PXVYWNxutwAtZNwmc9+LRg
qNr04/VKhVS6H/G1eYuDCXBico98T13SO4/Av7ZmUWaANEnthNt+BaSYi13M12ab
YDHHzOUXoBX/5YH+syU/
=tskA
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to