[Parted-maintainers] Bug#676593: parted: diff for NMU version 2.3-9.2
Samuel Thibault
sthibault at debian.org
Fri Jun 8 01:26:49 UTC 2012
Package: parted
Version: 2.3-9.1
Severity: normal
Tags: patch pending
Dear maintainer,
I've prepared an NMU for parted (versioned as 2.3-9.2) and
uploaded it to DELAYED/7. Please feel free to tell me if I
should delay it longer.
Regards.
-------------- next part --------------
diff -u parted-2.3/debian/changelog parted-2.3/debian/changelog
--- parted-2.3/debian/changelog
+++ parted-2.3/debian/changelog
@@ -1,3 +1,12 @@
+parted (2.3-9.2) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Add partition table re-read on hurd-i386 (Closes: #669936).
+ * Backport gnulib fix for set but not used variables (Closes: #676590).
+ * Update ABI symbol list (Closes: #676591).
+
+ -- Samuel Thibault <sthibault at debian.org> Fri, 08 Jun 2012 02:04:11 +0200
+
parted (2.3-9.1) unstable; urgency=low
* Non-maintainer upload.
diff -u parted-2.3/debian/patches/series parted-2.3/debian/patches/series
--- parted-2.3/debian/patches/series
+++ parted-2.3/debian/patches/series
@@ -26,3 +26,6 @@
+
kfreebsd_lvm.patch
hurd-partition-path.patch
non-registered-device.diff
+hurd-reread.patch
+gnulib.patch
diff -u parted-2.3/debian/patches/update-abi-symbols.patch parted-2.3/debian/patches/update-abi-symbols.patch
--- parted-2.3/debian/patches/update-abi-symbols.patch
+++ parted-2.3/debian/patches/update-abi-symbols.patch
@@ -200,7 +200,7 @@
FUNC:ped_round_down_to
FUNC:ped_round_to_nearest
FUNC:ped_round_up_to
-@@ -406,45 +449,112 @@
+@@ -406,45 +449,116 @@
FUNC:ped_unit_parse
FUNC:ped_unit_parse_custom
FUNC:ped_unit_set_default
@@ -258,11 +258,15 @@
+FUNC:version_etc_ar
+FUNC:version_etc_arn
+FUNC:version_etc_va
++FUNC:x2nrealloc
+FUNC:x2realloc
+FUNC:xalloc_die
+FUNC:xcalloc
++FUNC:xcharalloc
+FUNC:xmalloc
+FUNC:xmemdup
++FUNC:xnmalloc
++FUNC:xnrealloc
+FUNC:xrealloc
+FUNC:xstrdup
+FUNC:xstrndup
only in patch2:
unchanged:
--- parted-2.3.orig/debian/patches/gnulib.patch
+++ parted-2.3/debian/patches/gnulib.patch
@@ -0,0 +1,22 @@
+--- a/lib/regex_internal.c.orig 2012-06-08 02:15:54.083227641 +0200
++++ b/lib/regex_internal.c 2012-06-08 02:20:44.364702306 +0200
+@@ -738,16 +738,18 @@
+ unsigned char buf[6];
+ size_t mbclen;
+
++ const unsigned char *pp = p;
+ if (BE (pstr->trans != NULL, 0))
+ {
+ int i = mlen < 6 ? mlen : 6;
+ while (--i >= 0)
+ buf[i] = pstr->trans[p[i]];
++ pp = buf;
+ }
+ /* XXX Don't use mbrtowc, we know which conversion
+ to use (UTF-8 -> UCS4). */
+ memset (&cur_state, 0, sizeof (cur_state));
+- mbclen = __mbrtowc (&wc2, (const char *) p, mlen,
++ mbclen = __mbrtowc (&wc2, (const char *) pp, mlen,
+ &cur_state);
+ if (raw + offset - p <= mbclen
+ && mbclen < (size_t) -2)
only in patch2:
unchanged:
--- parted-2.3.orig/debian/patches/hurd-reread.patch
+++ parted-2.3/debian/patches/hurd-reread.patch
@@ -0,0 +1,118 @@
+--- a/libparted/arch/gnu.c.original 2012-04-22 00:06:18.000000000 +0000
++++ b/libparted/arch/gnu.c 2012-04-22 02:34:58.000000000 +0000
+@@ -185,7 +185,7 @@
+ if (!dev->arch_specific)
+ goto error_free_path;
+
+- dev->type = PED_DEVICE_FILE; /* FIXME? */
++ dev->type = PED_DEVICE_UNKNOWN; /* It's deprecated anyway */
+ dev->open_count = 0;
+ dev->read_only = 0;
+ dev->external_mode = 0;
+@@ -204,11 +204,83 @@
+ return NULL;
+ }
+
+-static int
+-_kernel_reread_part_table (PedDevice* dev)
+-{
+- /* XXX: We must wait for partfs to be finished. */
+- return 1;
++/* Ask the kernel and translators to reload the partition table.
++ XXX: Will probably be replaced by some RPC to partfs when it's finished. In
++ the meantime, gnumach's glue layer will pass BLKRRPART to the Linux drivers.
++ */
++#define BLKRRPART 0x125F
++static int
++_reread_part_table (PedDevice* dev)
++{
++ struct store *store = GNU_SPECIFIC (dev)->store;
++ int retry_count = 9;
++ int len = strlen (dev->path);
++ char path[len + 3 + 1];
++ int i;
++ int done = 1;
++
++ sync ();
++
++ if(strcmp (store->class->name, "device") == 0) {
++ while (device_set_status (store->port, BLKRRPART, NULL, 0)) {
++ retry_count--;
++ sync ();
++ if (retry_count == 3)
++ sleep (1); /* Pause to allow system to settle */
++
++ if (!retry_count) {
++ ped_exception_throw (
++ PED_EXCEPTION_WARNING,
++ PED_EXCEPTION_IGNORE,
++ _("WARNING: the kernel failed to re-read the "
++ "partition table on %s (%s). As a result, "
++ "it may not reflect all of your changes "
++ "until after reboot."),
++ dev->path, strerror (errno));
++ return 0;
++ }
++ }
++ }
++
++ i = 1;
++ while (1) {
++ file_t node;
++ error_t err;
++
++ /* Throw away all active parted-based translators */
++ snprintf (path, sizeof (path), "%ss%u", dev->path, i);
++ node = file_name_lookup (path, O_NOTRANS, 0666);
++ if (node == MACH_PORT_NULL) {
++ if (errno == ENOENT)
++ /* Finished looping over them */
++ break;
++
++ ped_exception_throw (
++ PED_EXCEPTION_WARNING,
++ PED_EXCEPTION_IGNORE,
++ _("Warning: unable to open %s (%s). As a "
++ "result, it may not reflect all of your "
++ "changes until after reboot."),
++ path, strerror (errno));
++ done = 0;
++ }
++
++ err = file_set_translator (node, 0, FS_TRANS_SET,
++ 0, 0, 0, MACH_PORT_NULL, MACH_MSG_TYPE_COPY_SEND);
++ if (err) {
++ ped_exception_throw (
++ PED_EXCEPTION_WARNING,
++ PED_EXCEPTION_IGNORE,
++ _("Warning: failed to make translator go away "
++ "on %s (%s). As a result, it may not reflect "
++ "all of your changes until after reboot."),
++ dev->path, strerror (errno));
++ done = 0;
++ }
++ i++;
++ }
++
++ return done;
+ }
+
+ /* Free the memory associated with a PedDevice structure. */
+@@ -355,7 +427,7 @@
+ _flush_cache (dev);
+
+ if (dev->dirty && dev->type != PED_DEVICE_FILE) {
+- if (_kernel_reread_part_table (dev))
++ if (_reread_part_table (dev))
+ dev->dirty = 0;
+ }
+
+@@ -858,7 +930,7 @@
+ static int
+ gnu_disk_commit (PedDisk* disk)
+ {
+- return 1;
++ return _reread_part_table (disk->dev);
+ }
+
+ static PedDeviceArchOps gnu_dev_ops = {
More information about the Parted-maintainers
mailing list