Your message dated Mon, 17 Jun 2013 09:19:57 +0000
with message-id <[email protected]>
and subject line Bug#644657: fixed in libmemcached 1.0.17-2
has caused the Debian Bug report #644657,
regarding libmemcached: 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.)


-- 
644657: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=644657
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libmemcached
Version: 0.44-1.1
Severity: important
Tags: patch
User: [email protected]
Usertags: hurd

Hi,

libmemcached FTBFS mainly due to PATH_MAX issues on GNU/Hurd. The
attached patch resolves these problems, and enables a portable solution for all
architectures.

Thanks!
diff -ur libmemcached-0.44/clients/ms_conn.c libmemcached-0.44.modified//clients/ms_conn.c
--- libmemcached-0.44/clients/ms_conn.c	2010-07-22 17:06:58.000000000 +0200
+++ libmemcached-0.44.modified//clients/ms_conn.c	2011-09-26 21:47:14.000000000 +0200
@@ -2125,6 +2125,9 @@
     limit_to_mtu= c->udp;
 
     /* We may need to start a new msghdr if this one is full. */
+#ifndef IOV_MAX
+#define IOV_MAX 1024
+#endif
     if ((m->msg_iovlen == IOV_MAX)
         || (limit_to_mtu && (c->msgbytes >= UDP_MAX_SEND_PAYLOAD_SIZE)))
     {
diff -ur libmemcached-0.44/clients/ms_setting.c libmemcached-0.44.modified//clients/ms_setting.c
--- libmemcached-0.44/clients/ms_setting.c	2010-08-03 02:34:02.000000000 +0200
+++ libmemcached-0.44.modified//clients/ms_setting.c	2011-10-05 18:17:52.000000000 +0200
@@ -304,13 +304,17 @@
  */
 static void ms_no_config_file()
 {
-  char userpath[PATH_MAX];
+  char *userpath= NULL;
+  size_t len;
   struct passwd *usr= NULL;
   FILE *fd;
 
   usr= getpwuid(getuid());
 
-  snprintf(userpath, PATH_MAX, "%s/%s", usr->pw_dir, DEFAULT_CONFIG_NAME);
+  len= strlen(usr->pw_dir) + 1 + strlen(DEFAULT_CONFIG_NAME) + 1;
+  if ((userpath = malloc(len)) == NULL)
+      exit(1);
+  snprintf(userpath, len, "%s/%s", usr->pw_dir, DEFAULT_CONFIG_NAME);
 
   if (access (userpath, F_OK | R_OK) == 0)
     goto exit;
@@ -321,6 +325,7 @@
   {
     fprintf(stderr, "Could not create default configure file %s\n", userpath);
     perror(strerror(errno));
+    free(userpath);
     exit(1);
   }
   fprintf(fd, "%s", DEFAULT_CONGIF_STR);
@@ -328,6 +333,7 @@
 
 exit:
   ms_setting.cfg_file= strdup(userpath);
+  free(userpath);
 } /* ms_no_config_file */
 
 
--- libmemcached-0.44/tests/server.c	2010-08-03 08:30:54.000000000 +0200
+++ libmemcached-0.44.modified/tests/server.c	2011-10-05 19:08:08.000000000 +0200
@@ -117,18 +117,30 @@
           }
         }
 
-        char buffer[PATH_MAX];
-        snprintf(buffer, sizeof(buffer), PID_FILE_BASE, x);
+        char *buffer= NULL;
+        size_t len= 0;
+
+        len= strlen(PID_FILE_BASE) + sizeof(int) - 2 + 1;
+        if ((buffer = malloc(len)) == NULL)
+            assert(buffer);
+        snprintf(buffer, len, PID_FILE_BASE, x);
         kill_file(buffer);
 
         if (x == 0)
         {
-          snprintf(buffer, sizeof(buffer), "%s -d -u root -P "PID_FILE_BASE" -t 1 -p %u -U %u -m 128",
+          len= strlen("%s -d -u root -P "PID_FILE_BASE" -t 1 -p %u -U %u -m 128") + strlen(MEMCACHED_BINARY) + 3*sizeof(int) - 4*2 + 1;
+        if ((buffer = malloc(len)) == NULL)
+            assert(buffer);
+          snprintf(buffer, len, "%s -d -u root -P "PID_FILE_BASE" -t 1 -p %u -U %u -m 128",
                    MEMCACHED_BINARY, x, port, port);
         }
         else
         {
-          snprintf(buffer, sizeof(buffer), "%s -d -u root -P "PID_FILE_BASE" -t 1 -p %u -U %u",
+          len= strlen("%s -d -u root -P "PID_FILE_BASE" -t 1 -p %u -U %u") +
+	    strlen(MEMCACHED_BINARY) + 3*sizeof(int) - 4*2 + 1;
+        if ((buffer = malloc(len)) == NULL)
+            assert(buffer);
+          snprintf(buffer, len, "%s -d -u root -P "PID_FILE_BASE" -t 1 -p %u -U %u",
                    MEMCACHED_BINARY, x, port, port);
         }
 	if (libmemcached_util_ping("localhost", port, NULL))
@@ -142,6 +154,7 @@
 	}
         count= sprintf(end_ptr, "localhost:%u,", port);
         end_ptr+= count;
+        free(buffer);
       }
       *end_ptr= 0;
 
@@ -149,9 +162,13 @@
       int *pids= calloc(construct->count, sizeof(int));
       for (uint32_t x= 0; x < construct->count; x++)
       {
-        char buffer[PATH_MAX]; /* Nothing special for number */
+        char *buffer= NULL; /* Nothing special for number */
+        size_t len= 0;
 
-        snprintf(buffer, sizeof(buffer), PID_FILE_BASE, x);
+        len= strlen(PID_FILE_BASE) + sizeof(int) - 2 + 1;
+        if ((buffer= malloc(len)) == NULL)
+          assert(buffer);
+        snprintf(buffer, len, PID_FILE_BASE, x);
 
         uint32_t counter= 3000; // Absurd, just to catch run away process
         while (pids[x] <= 0  && --counter)
@@ -198,8 +215,10 @@
             if (pids[y] > 0)
               kill(pids[y], SIGTERM);
           }
+          free(buffer);
           abort();
         }
+        free(buffer);
       }
       free(pids);
 
@@ -229,9 +248,15 @@
   {
     for (uint32_t x= 0; x < construct->count; x++)
     {
-      char file_buffer[PATH_MAX]; /* Nothing special for number */
-      snprintf(file_buffer, sizeof(file_buffer), PID_FILE_BASE, x);
+      char *file_buffer=NULL; /* Nothing special for number */
+      size_t len= 0;
+
+      len= strlen(PID_FILE_BASE) + sizeof(int) - 2 + 1;
+      if ((file_buffer = malloc(len)) == NULL)
+        assert(file_buffer);
+      snprintf(file_buffer, len, PID_FILE_BASE, x);
       kill_file(file_buffer);
+      free(file_buffer);
     }
 
     free(construct->server_list);

--- End Message ---
--- Begin Message ---
Source: libmemcached
Source-Version: 1.0.17-2

We believe that the bug you reported is fixed in the latest version of
libmemcached, 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.
Michael Fladischer <[email protected]> (supplier of updated 
libmemcached 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: SHA256

Format: 1.8
Date: Mon, 17 Jun 2013 08:43:46 +0200
Source: libmemcached
Binary: libmemcached11 libmemcached-dev libmemcached-dbg libmemcachedutil2 
libhashkit2 libhashkit-dev libmemcached-tools
Architecture: source amd64
Version: 1.0.17-2
Distribution: experimental
Urgency: low
Maintainer: Michael Fladischer <[email protected]>
Changed-By: Michael Fladischer <[email protected]>
Description: 
 libhashkit-dev - libmemcached hashing functions and algorithms (development 
files)
 libhashkit2 - libmemcached hashing functions and algorithms
 libmemcached-dbg - Debug Symbols for libmemcached
 libmemcached-dev - C and C++ client library to the memcached server 
(development fil
 libmemcached-tools - Commandline tools for talking to memcached via 
libmemcached
 libmemcached11 - C and C++ client library to the memcached server
 libmemcachedutil2 - library implementing connection pooling for libmemcached
Closes: 644657
Changes: 
 libmemcached (1.0.17-2) experimental; urgency=low
 .
   * Add hurd.patch to fix build failures on GNU/Hurd, thanks to Pino Toscano
     (Closes: #644657).
Checksums-Sha1: 
 7d00397f1ff9d421ed818751f38313f2387845bc 2299 libmemcached_1.0.17-2.dsc
 76d9b984e1b119bfe404a940ecd68526e6f856bf 11897 
libmemcached_1.0.17-2.debian.tar.gz
 dca9b6cf7ad2d5d5a83e8401883b36e94ad05a37 112238 
libmemcached11_1.0.17-2_amd64.deb
 d665b33827a50ccb9d3616d88f026095f8fe79c7 297464 
libmemcached-dev_1.0.17-2_amd64.deb
 882df9cb97caa952a2484c54bcd913bffa9db3c7 812664 
libmemcached-dbg_1.0.17-2_amd64.deb
 d0947daa19489abef03d9f102642bbcd7dd10777 22876 
libmemcachedutil2_1.0.17-2_amd64.deb
 68c508910dad2b36b81ceb23e2910661fd083018 51706 libhashkit2_1.0.17-2_amd64.deb
 d3af3a14c666f85cf1c62d33da87855ba96939d8 45390 
libhashkit-dev_1.0.17-2_amd64.deb
 e7bdbdb3139972dafb2e5748d6bb00acc72af478 106852 
libmemcached-tools_1.0.17-2_amd64.deb
Checksums-Sha256: 
 6140999afbadeae76d74e49c7e419ca5b2b250715f0401cdefd3ceb0bb090c21 2299 
libmemcached_1.0.17-2.dsc
 12c12b0e53b44af464db0b0e509cfc5d0af1ca2738a38f2c7d6983203cd1803e 11897 
libmemcached_1.0.17-2.debian.tar.gz
 1f83036615933fd730c1430beb345a445e2e3f004512ec2d638c6aabde56eaa4 112238 
libmemcached11_1.0.17-2_amd64.deb
 4e70ed2e3a77e2e764308e5169319a48461a428b5de59f01075da607cf2ac056 297464 
libmemcached-dev_1.0.17-2_amd64.deb
 ed1084e280dd45103ad1c139ba28c86b597b31cec59ce0bbb8b74ab79d9d1cbd 812664 
libmemcached-dbg_1.0.17-2_amd64.deb
 e52a702d415ccfdbd59395d441c73dcc0092de838f2c6c339506a1ed25d24fae 22876 
libmemcachedutil2_1.0.17-2_amd64.deb
 a8e990ab7c36f1fab8b7f78d5aff5745711d255de887d01bd0984f197d3dd979 51706 
libhashkit2_1.0.17-2_amd64.deb
 395b2758daad551dd7d2db5544a8adfefe2f4a3037633fd1e3e4505a2ec8df18 45390 
libhashkit-dev_1.0.17-2_amd64.deb
 ad961af366d6605ca1b3fc15660991ebe79181d6690dda42a76f8a1079db429f 106852 
libmemcached-tools_1.0.17-2_amd64.deb
Files: 
 9b57544b866d6a716dd26a0743cdc968 2299 libs optional libmemcached_1.0.17-2.dsc
 45975e297b08dc192aebddbf8d442dbe 11897 libs optional 
libmemcached_1.0.17-2.debian.tar.gz
 96d6be90862dff4710295825e27baf83 112238 libs optional 
libmemcached11_1.0.17-2_amd64.deb
 6c4189b40068619db6dfa02015f09823 297464 libdevel optional 
libmemcached-dev_1.0.17-2_amd64.deb
 c516a315a3a5e41881c9bffc05e057b4 812664 debug extra 
libmemcached-dbg_1.0.17-2_amd64.deb
 0c3c62c161b06301d0c8065ef004bcc0 22876 libs optional 
libmemcachedutil2_1.0.17-2_amd64.deb
 5631fa004281c5691e23097cd4d122c4 51706 libs optional 
libhashkit2_1.0.17-2_amd64.deb
 bb9c20670c216fc85a9b85cbdda8062c 45390 libdevel optional 
libhashkit-dev_1.0.17-2_amd64.deb
 80e07f0359d88648631b9f05f67bcbeb 106852 utils optional 
libmemcached-tools_1.0.17-2_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBCAAGBQJRvtMBAAoJEBLZsEqQy9jkwbcP/0zTgIVgXV6O3dqRxFypDaW5
P2todcCSEgXM9kqATb0CiXEMYBYRm5uDHGGZ7oADo4rqXlXLqS+FMhJcybiWH1v1
WvkwH1exi9HKCwp3dfPfkRssWxNWJ2zUuN2Qp7a2IFyfh6N6sQ2uVvO6lUbJyBg/
dh20xGc2irNxXzm/vrbGYmKK4TQfnYfTwefHw9XHA5R36K6bkjupSiEJXNaYt+LJ
D1w5Sz1Jt6iM1yAQXi57FuAmF7ldUFkb9zO5DkgK2sgaLKi2a91XnAM/My5FaL30
TJBbProJ0p8zPnJUKF1NKlK8HwLfCW8VPk+6H+QPXgUUBKxjL70W/BhmG74gv/xM
zDWWrvSbSbVd+bFKOBvS4/QZDSuRUDc088yPJxSBiOuQGTTLadPaWrOHKyuSGItn
gtWq8LnmANFC9OIeuRn2kdLXbTFlVkmsuyQW6jE+W3Wa0ZLEWaTqRnHtHmSP4BCj
hircUGYnZNKwH/jVPTbXMGI+FL5OUF7cl4/gJj1PfLrCc60CAx6GgDbcMJb4aUB/
EyNXjRE+OXIXWt1RluMEq/UwZG5+DR9tJKcYwKZ8g1j9PGifqjP1WyD46yn0YPti
4nh3n68/7FHxtgu1GnWosCh9WmoFdPncMRLmmDK5dKz67fOJVG0sOTEH7oXy/VaT
LSYecYEHLU+uKM7zN+gG
=OcGZ
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to