Package: e2fsprogs
Version: 1.41.3-1
Severity: important
Tags: patch

Hello,

e2fsprogs currently FTBFS on hurd-i386 because of unconditional use of
the PATH_MAX limit which hurd-i386 doesn't have.  The attached patch
just exactly allocates what is required.

Samuel

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.29 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages e2fsprogs depends on:
ii  e2fslibs                      1.41.3-1   ext2 filesystem libraries
ii  libblkid1                     1.41.3-1   block device id library
ii  libc6                         2.9-4      GNU C Library: Shared libraries
ii  libcomerr2                    1.41.3-1   common error description library
ii  libss2                        1.41.3-1   command-line interface parsing lib
ii  libuuid1                      1.41.3-1   universally unique id library

e2fsprogs recommends no packages.

Versions of packages e2fsprogs suggests:
ii  e2fsck-static  1.41.3-1                  statically-linked version of the e
pn  gpart          <none>                    (no description available)
ii  parted         1.8.8.git.2008.03.24-11.1 The GNU Parted disk partition resi

-- no debconf information

-- 
Samuel
       La  fonction  memfrob() crypte les n premiers octets de la
       zone de mémoire  s  en  effectuant  un  OU-exclusif  entre
       chaque  octet  et le nombre 42.
(extrait de la page de man de memfrob -- Manuel du programmeur Linux)
--- ./misc/tune2fs.c.orig       2009-03-28 20:46:07.000000000 +0000
+++ ./misc/tune2fs.c    2009-03-28 20:47:13.000000000 +0000
@@ -1370,7 +1370,7 @@
 {
        errcode_t retval = 0;
        const char *tdb_dir;
-       char tdb_file[PATH_MAX];
+       char *tdb_file;
        char *dev_name, *tmp_name;
 
 #if 0 /* FIXME!! */
@@ -1393,6 +1393,7 @@
            access(tdb_dir, W_OK))
                return 0;
 
+       tdb_file = malloc(strlen(tdb_dir) + 9 + strlen(dev_name) + 7 + 1);
        sprintf(tdb_file, "%s/tune2fs-%s.e2undo", tdb_dir, dev_name);
 
        if (!access(tdb_file, F_OK)) {
@@ -1401,6 +1402,7 @@
                        com_err(program_name, retval,
                                _("while trying to delete %s"),
                                tdb_file);
+                       free(tdb_file);
                        return retval;
                }
        }
@@ -1411,6 +1413,7 @@
        printf(_("To undo the tune2fs operations please run "
                 "the command\n    e2undo %s %s\n\n"),
                 tdb_file, name);
+       free(tdb_file);
        free(tmp_name);
        return retval;
 }
--- ./misc/mke2fs.c.orig        2009-03-28 20:46:10.000000000 +0000
+++ ./misc/mke2fs.c     2009-03-28 20:47:53.000000000 +0000
@@ -1777,7 +1777,7 @@
 static int mke2fs_setup_tdb(const char *name, io_manager *io_ptr)
 {
        errcode_t retval = 0;
-       char *tdb_dir, tdb_file[PATH_MAX];
+       char *tdb_dir, *tdb_file;
        char *device_name, *tmp_name;
 
        /*
@@ -1796,6 +1796,7 @@
 
        tmp_name = strdup(name);
        device_name = basename(tmp_name);
+       tdb_file = malloc(strlen(tdb_dir) + 8 + strlen(device_name) + 7 + 1);
        sprintf(tdb_file, "%s/mke2fs-%s.e2undo", tdb_dir, device_name);
 
        if (!access(tdb_file, F_OK)) {
@@ -1804,6 +1805,7 @@
                        com_err(program_name, retval,
                                _("while trying to delete %s"),
                                tdb_file);
+                       free(tdb_file);
                        return retval;
                }
        }
@@ -1815,6 +1817,7 @@
                 "using the command:\n"
                 "    e2undo %s %s\n\n"), tdb_file, name);
 
+       free(tdb_file);
        free(tmp_name);
        return retval;
 }

Reply via email to