[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Fixed RC bug in frozen parted : #392767: [mac] parted is unable to reread partition tables created by d-i/partman.

reopen 363381
# kfreebsd support patch broke parted in a RC way.

Hi Robert, debian-release, debian-boot folk.

The patch in 363381, and particularly this hunk :

  diff -urNad parted-1.7.0~/parted/table.c parted-1.7.0/parted/table.c
  --- parted-1.7.0~/parted/table.c        2006-05-19 03:54:01.000000000 -0300
  +++ parted-1.7.0/parted/table.c 2006-05-19 03:54:36.000000000 -0300
  @@ -197,7 +215,11 @@
           len += wcslen(COLSUFFIX);
           newsize = (wcslen(*s) + len + 1) * sizeof(wchar_t);
  +               oldsize = (wcslen(*s) + 1) * sizeof(wchar_t);
  +               temps = *s;
           *s = realloc (*s, newsize);
  +               memcpy(*s, temps, oldsize);
           for (i = 0; i < ncols; ++i)

Caused the bug in #392767: [mac] parted is unable to reread partition tables
created by d-i/partman, which was visible on s390 and x86 also accordying to
Bastian Blank, and thus caused parted to randomly not show the partition table
on a print command, thus breaking the lvm/raid support, which used
command-line parted in order to detect lvm/raid partitions.

The problem seems related to the ENABLE_NLS case, and the use of wide-chars,
which the memcpy trick failed to copy over properly, leaving garbage in the
string to be outputed.

I remember (but am not anymore 100% sure, so a reply from frans/joeyh would
be nice), that frans told me last week or so, that an upload of parted was ok
with regard to d-i RC1, since parted is not in the image, and not migrated to
testing, but i would like confirmation on this, and also advice from the
debian-release folk, thus posting here.

I propose to upload parted 1.7.1-3, which includes the two following changes :

  parted (1.7.1-3) unstable; urgency=low

    * parted-print-name.dpatch : Fix bug in parted print, when there are no
      extended partitions, but partition names.
    * disabled kfreebsd-gnu.dpatch, which added kfreebsd support, because the
      the patch caused parted to have trouble in a d-i environment to print the
      partition table, thus causing tools relying on parted -s print to find
      information about the partition table to break, like the one checking for
      RAID partitions in d-i.  (Closes: #392767)

   -- Sven Luther <luther@debian.org>  Tue,  7 Nov 2006 17:45:28 +0100

#392767 being one of the two parted related RC bugs still open, but the other
patch is also nice to have, since it allows to have partitions actually named
something else than primary, which may (or not) break some tools also.

Robert, we will upload a parted version without kfreebsd support, but it would
be nice if you could revisit the patch, and clean up this problem. Maybe
documenting the hacks like the one above a bit better, and/or adding *BSD
specific #ifdefs to limit this kind of problems would be nice.

Special thanks go to Bastian Blank, who helped me in the last step of
investigating this issue, and finding the responsible patch.


Sven Luther

Reply to: