Package: parted / 3.2-24

Metadata

Package Version Patches format
parted 3.2-24 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
doc package.patch | (download)

doc/C/parted.8 | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 small documentation fixes

preserve hidden parts.patch | (download)

libparted/labels/dos.c | 11 8 + 3 - 0 !
1 file changed, 8 insertions(+), 3 deletions(-)

 avoid overwriting empty or hidden partitions

It changes the DOS partition rewriting code to avoid overwriting empty
or hidden primary partitions so long as their entries aren't reused.
This makes fatresize and similar front-ends safe to use in the presence
of hidden partitions.

kfreebsd gnu.patch | (download)

configure.ac | 8 6 + 2 - 0 !
libparted/Makefile.am | 3 2 + 1 - 0 !
libparted/arch/freebsd.c | 1292 1292 + 0 - 0 !
libparted/architecture.c | 3 3 + 0 - 0 !
libparted/fs/xfs/platform_defs.h | 6 5 + 1 - 0 !
libparted/labels/bsd.c | 1 1 + 0 - 0 !
libparted/labels/sun.c | 1 1 + 0 - 0 !
7 files changed, 1310 insertions(+), 4 deletions(-)

 add gnu/kfreebsd support

freebsd ufs.patch | (download)

libparted/fs/ufs/ufs.c | 103 96 + 7 - 0 !
libparted/labels/dos.c | 3 3 + 0 - 0 !
libparted/labels/gpt.c | 9 9 + 0 - 0 !
tests/Makefile.am | 1 1 + 0 - 0 !
tests/t2500-freebsd-ufs.sh | 44 44 + 0 - 0 !
5 files changed, 153 insertions(+), 7 deletions(-)

 add freebsd ufs support

This patch adds support for detection of FreeBSD UFS file systems and
creation of the partition on DOS and GPT labels. It doesn't use the
system of slices used by default on FreeBSD and places the partition
directly in the dos label. This is something supported by the FreeBSD
kernel, and the default on Debian GNU/kFreeBSD. Even on plain FreeBSD,
some persons prefer to not use slices.

This patch is used by debian-installer on Debian GNU/kFreeBSD for some
months already.

zfs.patch | (download)

libparted/fs/Makefile.am | 3 2 + 1 - 0 !
libparted/fs/zfs/zfs.c | 77 77 + 0 - 0 !
libparted/libparted.c | 4 4 + 0 - 0 !
3 files changed, 83 insertions(+), 1 deletion(-)

 add zfs support

freebsd zvol.patch | (download)

libparted/arch/freebsd.c | 40 40 + 0 - 0 !
1 file changed, 40 insertions(+)

 detection of zfs volumes (zvol)

ZFS volumes (ZVOL) are the ZFS equivalent of Logical Volumes in LVM.

They implement a block device which can be used for swap or legacy
filesystems.

Bug-Debian: http://bugs.debian.org/635384
freebsd geli.patch | (download)

libparted/arch/freebsd.c | 6 6 + 0 - 0 !
1 file changed, 6 insertions(+)

 detection of geom encryption devices (geli)

Bug-Debian: http://bugs.debian.org/635393
kfreebsd_lvm.patch | (download)

libparted/arch/freebsd.c | 27 27 + 0 - 0 !
1 file changed, 27 insertions(+)

 add lvm support on kfreebsd

Patch-Name: kfreebsd_lvm.patch

hurd partition path.patch | (download)

libparted/arch/gnu.c | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 fix partition paths on gnu/hurd

Patch-Name: hurd-partition-path.patch

hurd reread.patch | (download)

libparted/arch/gnu.c | 84 78 + 6 - 0 !
1 file changed, 78 insertions(+), 6 deletions(-)

 implement partition table rereading on gnu/hurd

Patch-Name: hurd-reread.patch

gptsync.patch | (download)

libparted/labels/gpt.c | 205 195 + 10 - 0 !
tests/Makefile.am | 1 1 + 0 - 0 !
tests/t0290-gptsync.sh | 175 175 + 0 - 0 !
3 files changed, 371 insertions(+), 10 deletions(-)

 gpt syncing for intel macs

On Intel Mac systems, write a synced MBR rather than a protective MBR.

udevadm settle.patch | (download)

libparted/arch/linux.c | 56 54 + 2 - 0 !
1 file changed, 54 insertions(+), 2 deletions(-)

 udev handling

Run udevadm settle around partition table rereads, to avoid races.

This should be replaced by a proper completion-notification mechanism
between the kernel and udev.

fat resize large sectors.patch | (download)

libparted/fs/r/fat/bootsector.c | 12 0 + 12 - 0 !
1 file changed, 12 deletions(-)

 remove stray non-512-byte-logical-sector assertion for fat resizing

This was removed from one copy of fat_boot_sector_analyse in 3.2, but
not from the other.

align new partitions on fresh disks.patch | (download)

libparted/disk.c | 3 2 + 1 - 0 !
1 file changed, 2 insertions(+), 1 deletion(-)

 align new partitions created on fresh disks

Commit fa815ad05db248d78ef214ea79a78c22772a9ffe arranged to skip
partition alignment while reading disks, but also has the effect of
skipping partition alignment when creating a partition on a fresh disk,
which is incorrect.

The proper upstream fix probably involves adding a new member to PedDisk
to keep track of whether we're in the middle of the initial read in
ped_disk_new or not.  To avoid changing ABI, we instead take this hacky
approach of overloading an extra bit on PedDisk.needs_clobber.

Bug-Ubuntu: https://bugs.launchpad.net/bugs/1352252
probe lvs again.patch | (download)

libparted/arch/linux.c | 4 2 + 2 - 0 !
1 file changed, 2 insertions(+), 2 deletions(-)

 probe lvm logical volumes again

parted 3.2 stopped probing LVM logical volumes.  This breaks
debian-installer, which wants to be able to "partition" these, at least
to the extent of being able to see them in the partitioner and operate
on them somewhat like ordinary partitions.  Revert to the old behaviour.

Bug-Debian: http://bugs.debian.org/757417
fat16 resize crash.patch | (download)

libparted/fs/r/fat/resize.c | 12 9 + 3 - 0 !
1 file changed, 9 insertions(+), 3 deletions(-)

 lib-fs-resize: prevent crash resizing fat16 file systems

Resizing FAT16 file system crashes in libparted/fs/r/fat/resize.c
create_resize_context() because it was dereferencing NULL pointer
fs_info->info_sector to copy the info_sector.

Only FAT32 file systems have info_sector populated by fat_open() ->
fat_info_sector_read().  FAT12 and FAT16 file systems don't have an
info_sector so pointer fs_info->info_sector remains assigned NULL from
fat_alloc().  When resizing a FAT file system create_resize_context()
was always dereferencing fs_info->info_sector to memory copy the
info_sector, hence it crashed for FAT12 and FAT16.

Make create_resize_context() only copy the info_sector for FAT32 file
systems.

Reported by Christian Hesse in
https://bugzilla.gnome.org/show_bug.cgi?id=735669

fdasd update geometry handling.patch | (download)

include/parted/fdasd.h | 4 3 + 1 - 0 !
include/parted/fdasd.in.h | 4 3 + 1 - 0 !
libparted/labels/fdasd.c | 166 116 + 50 - 0 !
3 files changed, 122 insertions(+), 52 deletions(-)

 fdasd: geometry handling updated from upstream s390-tools

Remove the necessity for DASD-specific ioctls for partition handling.
This allows to correctly handle DASD-backed virtio block devices.

Note that this is necessary because virtio is just the transport.
A DASD, even if provided via virtio, still has it's unique
characteristics, which means that only traditional DASD partition
table formats can be used (no MBR, GPT, or similar).

Use bzero for initialization to make sure all struct members are
properly cleared. Also changed partition list handling code to be
more similar to upstream s390-tools fdasd.

Further, enhanced error handling capabilities by providing a
return code by fdasd_get_geometry.

Code is largely backported from s390-tools project.

Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
dasd enhance probing.patch | (download)

libparted/arch/linux.c | 85 70 + 15 - 0 !
libparted/device.c | 14 4 + 10 - 0 !
libparted/labels/dasd.c | 18 8 + 10 - 0 !
3 files changed, 82 insertions(+), 35 deletions(-)

 dasd: enhance device probing

Probe for all device/transport types as every block device
could be a DASD on s390.

Since the calculation of the minimum and optimum alignment
dm 512b sectors.patch | (download)

libparted/arch/linux.c | 21 17 + 4 - 0 !
1 file changed, 17 insertions(+), 4 deletions(-)

 libparted: device mapper uses 512b sectors

device mapper doesn't use the device's sector size when creating a
table. It always uses 512b units. This causes partitions to be created
8x smaller than expected on devices with 4906b sectors.

fdasd check geometry.patch | (download)

libparted/labels/fdasd.c | 11 9 + 2 - 0 !
1 file changed, 9 insertions(+), 2 deletions(-)

 fdasd.c: safeguard against geometry misprobing

Fixes an issue with parted print being run against a logical
volume realised by extents on a physical volume residing on
a DASD.
We must make sure that geometry, device blocksize and DASD
attributes are present before we start format verifications
If any of it is missing this is not a DASD.

Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
Signed-off-by: Brian C. Lane <bcl@redhat.com>

tests move get sector size.patch | (download)

libparted/tests/common.c | 14 14 + 0 - 0 !
libparted/tests/common.h | 5 5 + 0 - 0 !
libparted/tests/disk.c | 15 0 + 15 - 0 !
3 files changed, 19 insertions(+), 15 deletions(-)

 libparted:tests: move get_sector_size() to common.c

Moving get_sector_size() from disk.c to common.c allows
us to use it in _implemented_disk_label() to test for
512-byte sectors. This change is required to be able to
enable this test for atari partition tables for which
support is added in a follow-up patch.

Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>

Bug: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=16134
Bug-Debian: https://bugs.debian.org/239816
atari.patch | (download)

libparted/labels/Makefile.am | 1 1 + 0 - 0 !
libparted/labels/atari.c | 1968 1968 + 0 - 0 !
libparted/labels/pt-limit.gperf | 1 1 + 0 - 0 !
libparted/libparted.c | 4 4 + 0 - 0 !
libparted/tests/common.c | 3 3 + 0 - 0 !
po/POTFILES.in | 1 1 + 0 - 0 !
tests/t9021-maxima.sh | 5 4 + 1 - 0 !
7 files changed, 1982 insertions(+), 1 deletion(-)

 libparted: add support for atari partition tables

Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>

Bug: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=16134
Bug-Debian: https://bugs.debian.org/239816
nvme devices.patch | (download)

include/parted/device.h | 3 2 + 1 - 0 !
include/parted/device.in.h | 3 2 + 1 - 0 !
libparted/arch/linux.c | 14 14 + 0 - 0 !
parted/parted.c | 2 1 + 1 - 0 !
4 files changed, 19 insertions(+), 3 deletions(-)

 add support for nvme devices

Recognize NVMe Devices, so "parted -s /dev/nvme0n1" now prints
"NVMe Device (nvme)" instead of "Model: Unknown (unknown)".

In order for a device to be recognized as NVMe, it has to
have a 'blkext' major number. But since this major can be
used also by other device types, we also check the device
path contains 'nvme' as a substring.

* NEWS: Mention the change
* include/parted/device.h.in(PedDeviceType): Add PED_DEVICE_NVME
* libparted/arch/linux.c(BLKEXT_MAJOR): New define.
* libparted/arch/linux.c(_is_blkext_major): New function.
* libparted/arch/linux.c(_device_probe_type): Recognize NVMe devices.
* libparted/arch/linux.c(linux_new): Handle NVMe devices.
* parted/parted.c(do_print): Add "nvme" to list of transports.

Signed-off-by: Brian C. Lane <bcl@redhat.com>

libparted dasd unify vtoc handling for cdl ldl.patch | (download)

include/parted/vtoc.h | 34 19 + 15 - 0 !
include/parted/vtoc.in.h | 34 19 + 15 - 0 !
libparted/labels/dasd.c | 8 3 + 5 - 0 !
libparted/labels/vtoc.c | 38 17 + 21 - 0 !
4 files changed, 58 insertions(+), 56 deletions(-)

 libparted/dasd: unify vtoc handling for cdl/ldl

Merge volume label cdl and ldl. It is convenient to manipulate
the same structure. Also remove unused arguments in the functions.

Signed-off-by: Wang Dong <dongdwdw@linux.vnet.ibm.com>
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Brian C. Lane <bcl@redhat.com>

libparted dasd update and improve fdasd functions.patch | (download)

include/parted/fdasd.h | 14 6 + 8 - 0 !
include/parted/fdasd.in.h | 14 6 + 8 - 0 !
libparted/labels/fdasd.c | 56 29 + 27 - 0 !
3 files changed, 41 insertions(+), 43 deletions(-)

 libparted/dasd: update and improve fdasd functions

Update the fdasd_anchor_t data structure and the fdasd_cleanup()
function. Also correct vtoc_changed and vlabel_changed accounting
because they are important to rewrite vtoc to save the changes.

Wang Dong <dongdwdw@linux.vnet.ibm.com>
Hendrik Brueckner <brueckner@linux.vnet.ibm.com>

Signed-off-by: Brian C. Lane <bcl@redhat.com>

libparted dasd add new fdasd functions.patch | (download)

include/parted/fdasd.h | 4 4 + 0 - 0 !
include/parted/fdasd.in.h | 4 4 + 0 - 0 !
libparted/labels/fdasd.c | 123 123 + 0 - 0 !
3 files changed, 131 insertions(+)

 libparted/dasd: add new fdasd functions

Introduce a set of new functions from the fdasd utility of the s390-tools
to keep the code base in parted and s390-tools in sync.

These new functions are:
  fdasd_check_volser():  validate the volser input
  fdasd_get_volser():    get volume serial (volser)
  fdasd_change_volser(): change volser with string
  fdasd_reuse_vtoc():    re-create vtoc labels based on the existing vtoc

Signed-off-by: Wang Dong <dongdwdw@linux.vnet.ibm.com>
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Brian C. Lane <bcl@redhat.com>

libparted dasd add test cases for the new fdasd func.patch | (download)

libparted/tests/Makefile.am | 5 3 + 2 - 0 !
1 file changed, 3 insertions(+), 2 deletions(-)

 libparted/dasd: add test cases for the new fdasd functions

The test case uses a temporary file in libparted/tests under
Check framwork. It can be issued by "make check" in the test dir.

Signed-off-by: Wang Dong <dongdwdw@linux.vnet.ibm.com>
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Brian C. Lane <bcl@redhat.com>

fat resize long path.patch | (download)

libparted/fs/r/fat/count.c | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 lib-fs-resize: prevent crash resizing fat with very deep directories

Resizing a FAT file system crashes in libparted/fs/r/fat/count.c
flag_traverse_dir() if the length of any path name in the file system
overflows the 512 byte file_name local buffer.  Increase buffer to 4096,
PATH_MAX on Linux.

Reported in
https://bugzilla.gnome.org/show_bug.cgi?id=762448

Signed-off-by: Brian C. Lane <bcl@redhat.com>

fat resize retain boot code.patch | (download)

libparted/fs/r/fat/bootsector.c | 9 7 + 2 - 0 !
libparted/fs/r/fat/bootsector.h | 2 1 + 1 - 0 !
libparted/fs/r/fat/fat.c | 2 1 + 1 - 0 !
3 files changed, 9 insertions(+), 4 deletions(-)

 lib-fs-resize: fix recognition of fat file system after resizing

When resizing a FAT partition, an extra boot_sector memory allocation
was causing the original boot_sector information to be lost.  The
resulting FAT file system was still recognized by GNU/Linux, but not
recognized by the proprietary Windows operating system.

The problem with Windows FAT32 recognition was introduced with:

  Fix filesystem detection on non 512 byte sectors
  80678bdd957cf49a9ccfc8b88ba3fb8b4c63fc12

Fix by removing the extra boot_sector memory allocation.

Note that since parted-3.0 another code path to the extra memory
allocation of fat_create(...) via ped_file_system_create(...) is
inaccessible.  In an effort to maintain the ability to re-instate the
code, add a new boot_sector memory allocation where it is needed in
the alternate code path.

GNU bug report logs - #22266
[libparted] jump instruction and boot code is corrupted with random
bytes after fat is resized
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22266

sysmacros for major minor.patch | (download)

libparted/arch/linux.c | 1 1 + 0 - 0 !
1 file changed, 1 insertion(+)

 linux: include <sys/sysmacros.h> for major() macro.

Since glibc 2.27 this header is required.

Bug-Debian: https://bugs.debian.org/910326
nvme model names from sysfs.patch | (download)

libparted/arch/linux.c | 18 17 + 1 - 0 !
1 file changed, 17 insertions(+), 1 deletion(-)

 read nvme model names from sysfs

parted currently shows the same generic model name for all NVMe devices:

  # parted /dev/nvme0n1 -s print | grep Model
  Model: NVMe Device (nvme)

If the model information is available in sysfs, display that instead:

  # parted /dev/nvme0n1 -s print | grep Model
  Model: THNSN5512GPU7 NVMe TOSHIBA 512GB (nvme)

Signed-off-by: Brian C. Lane <bcl@redhat.com>

Bug-Debian: https://bugs.debian.org/911273