From 8dc8579f3221f9e877b163739998b2952949eb50 Mon Sep 17 00:00:00 2001 From: CentOS Buildsys Date: Sep 04 2013 20:46:02 +0000 Subject: import parted-3.1-14.el7.src.rpm --- diff --git a/.parted.metadata b/.parted.metadata new file mode 100644 index 0000000..0a0b277 --- /dev/null +++ b/.parted.metadata @@ -0,0 +1,3 @@ +4faf5b4eb2c78eb4f27ee3a4d6676fd4dd7f2c49 SOURCES/parted-3.1.tar.xz.sig +4bd7444e752e7cfcb922051483a8a3c0f2c0bcb4 SOURCES/pubkey.jim.meyering +4f006d29451f7cfbf6131efdb0148e7f386ebc8f SOURCES/parted-3.1.tar.xz diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/parted-2.1-libparted-use-dm_udev_wait-698121.patch b/SOURCES/parted-2.1-libparted-use-dm_udev_wait-698121.patch new file mode 100644 index 0000000..e60a7a2 --- /dev/null +++ b/SOURCES/parted-2.1-libparted-use-dm_udev_wait-698121.patch @@ -0,0 +1,86 @@ +From e3f74af78b774b235123b9d5fa40fead3b003bb2 Mon Sep 17 00:00:00 2001 +From: "Brian C. Lane" +Date: Fri, 20 Jan 2012 15:31:43 -0800 +Subject: [PATCH] libparted: use dm_udev_wait (#698121) + +This applies Peter Rajnoha's patch to use dm_udev_wait to +synchronize with udev. + +This requires libdevmapper v1.02.39 and higher. + +Patch is from: +https://lists.gnu.org/archive/html/bug-parted/2010-09/msg00007.html + +Resolves: rhbz#698121 +--- + libparted/arch/linux.c | 16 +++++++++++++++- + 1 files changed, 15 insertions(+), 1 deletions(-) + +diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c +index e2c4139..1fcbcad 100644 +--- a/libparted/arch/linux.c ++++ b/libparted/arch/linux.c +@@ -1319,6 +1319,10 @@ linux_new (const char* path) + dev->dirty = 0; + dev->boot_dirty = 0; + ++#ifdef ENABLE_DEVICE_MAPPER ++ dm_udev_set_sync_support(1); ++#endif ++ + if (!_device_probe_type (dev)) + goto error_free_arch_specific; + +@@ -2676,16 +2680,21 @@ static int + _dm_remove_map_name(char *name) + { + struct dm_task *task = NULL; +- int rc; ++ int rc = 0; ++ uint32_t cookie = 0; + + task = dm_task_create(DM_DEVICE_REMOVE); + if (!task) + return 1; + + dm_task_set_name (task, name); ++ if (!dm_task_set_cookie(task, &cookie, 0)) ++ goto err; + + rc = dm_task_run(task); ++ dm_udev_wait(cookie); + dm_task_update_nodes(); ++err: + dm_task_destroy(task); + if (!rc) + return 1; +@@ -2796,6 +2805,7 @@ _dm_add_partition (PedDisk* disk, PedPartition* part) + const char* dev_name = NULL; + char* params = NULL; + LinuxSpecific* arch_specific = LINUX_SPECIFIC (disk->dev); ++ uint32_t cookie = 0; + + /* Get map name from devicemapper */ + struct dm_task *task = dm_task_create (DM_DEVICE_INFO); +@@ -2832,14 +2842,18 @@ _dm_add_partition (PedDisk* disk, PedPartition* part) + dm_task_set_name (task, vol_name); + dm_task_add_target (task, 0, part->geom.length, + "linear", params); ++ if (!dm_task_set_cookie(task, &cookie, 0)) ++ goto err; + if (dm_task_run (task)) { + //printf("0 %ld linear %s\n", part->geom.length, params); ++ dm_udev_wait(cookie); + dm_task_update_nodes(); + dm_task_destroy(task); + free(params); + free(vol_name); + return 1; + } else { ++ dm_udev_wait(cookie); + _dm_remove_map_name(vol_name); + } + err: +-- +1.7.7.6 + diff --git a/SOURCES/parted-3.0-libparted-copy-pmbr_boot-when-duplicating-GPT-disk.patch b/SOURCES/parted-3.0-libparted-copy-pmbr_boot-when-duplicating-GPT-disk.patch new file mode 100644 index 0000000..4183f7e --- /dev/null +++ b/SOURCES/parted-3.0-libparted-copy-pmbr_boot-when-duplicating-GPT-disk.patch @@ -0,0 +1,25 @@ +From 43663f1226da0a6284b5f52f6e2f741473c077b6 Mon Sep 17 00:00:00 2001 +From: "Brian C. Lane" +Date: Fri, 3 Feb 2012 13:03:27 -0800 +Subject: [PATCH] libparted: copy pmbr_boot when duplicating GPT disk + +* libparted/labels/gpt.c (gpt_duplicate): copy pmbr_boot flag +--- + libparted/labels/gpt.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/libparted/labels/gpt.c b/libparted/labels/gpt.c +index bad9ed4..0f07250 100644 +--- a/libparted/labels/gpt.c ++++ b/libparted/labels/gpt.c +@@ -562,6 +562,7 @@ gpt_duplicate (const PedDisk *disk) + old_disk_data->data_area.length); + new_disk_data->entry_count = old_disk_data->entry_count; + new_disk_data->uuid = old_disk_data->uuid; ++ new_disk_data->pmbr_boot = old_disk_data->pmbr_boot; + return new_disk; + } + +-- +1.7.6.5 + diff --git a/SOURCES/parted-3.1-avoid-dasd-as-default-file-image-type.patch b/SOURCES/parted-3.1-avoid-dasd-as-default-file-image-type.patch new file mode 100644 index 0000000..f380792 --- /dev/null +++ b/SOURCES/parted-3.1-avoid-dasd-as-default-file-image-type.patch @@ -0,0 +1,59 @@ +Subject: [PATCH] libparted: Avoid dasd as default disk type while probe + +From: Nageswara R Sastry + +This patch avoids setting 'dasd' as a default disk type for +'disk image file' at the time of probe. + +Signed-off-by: Nageswara R Sastry +--- + include/parted/fdasd.h | 1 + + libparted/labels/fdasd.c | 6 +++++- + 2 files changed, 6 insertions(+), 1 deletion(-) + +--- a/include/parted/fdasd.h ++++ b/include/parted/fdasd.h +@@ -261,6 +261,7 @@ typedef struct fdasd_anchor { + struct fdasd_hd_geometry geo; + unsigned int label_block; + unsigned int FBA_layout; ++ bool is_file; + } fdasd_anchor_t; + + enum offset {lower, upper}; +--- a/libparted/labels/fdasd.c ++++ b/libparted/labels/fdasd.c +@@ -301,6 +301,7 @@ fdasd_initialize_anchor (fdasd_anchor_t + } + anc->hw_cylinders = 0; + anc->formatted_cylinders = 0; ++ anc->is_file = 0; + } + + /* +@@ -892,7 +893,7 @@ fdasd_check_volume (fdasd_anchor_t *anc, + /* Some times LDL formatted disks does not + contain any volume label */ + return 1; +- } else { ++ } else if (! anc->is_file) { + /* didn't find VOL1 volume label */ + anc->formatted_cylinders = anc->hw_cylinders; + anc->fspace_trk = anc->formatted_cylinders * anc->geo.heads +@@ -976,6 +977,7 @@ fdasd_get_geometry (const PedDevice *dev + dasd_info.FBA_layout = 0; + anc->hw_cylinders = ((st.st_size / blksize) / anc->geo.sectors) / + anc->geo.heads; ++ anc->is_file = 1; + } else { + if (ioctl(f, HDIO_GETGEO, &anc->geo) != 0) + fdasd_error(anc, unable_to_ioctl, +@@ -997,6 +999,8 @@ fdasd_get_geometry (const PedDevice *dev + anc->hw_cylinders = characteristics->long_no_cyl; + else + anc->hw_cylinders = characteristics->no_cyl; ++ ++ anc->is_file = 0; + } + + anc->dev_type = dasd_info.dev_type; diff --git a/SOURCES/parted-3.1-libparted-Fix-endian-error-with-FirstUsableLBA.patch b/SOURCES/parted-3.1-libparted-Fix-endian-error-with-FirstUsableLBA.patch new file mode 100644 index 0000000..f9365d2 --- /dev/null +++ b/SOURCES/parted-3.1-libparted-Fix-endian-error-with-FirstUsableLBA.patch @@ -0,0 +1,54 @@ +From 1190dc5b214ce6ba4cbeadbdd599ab3ebb2cbb13 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Fri, 8 Jun 2012 14:42:45 -0700 +Subject: [PATCH] libparted: Fix endian error with FirstUsableLBA (#829960) + +On big-endial systems (eg. ppc64) this would cause parted to +crash. + +* NEWS: add new bugfix +* libparted/labels/gpt.c (gpt_get_max_supported_partition_count): + fix endian issues with pth->FirstUsableLBA +--- + NEWS | 3 ++- + libparted/labels/gpt.c | 4 ++-- + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/NEWS b/NEWS +index b0a0657..596ab37 100644 +--- a/NEWS ++++ b/NEWS +@@ -1,9 +1,10 @@ + GNU parted NEWS -*- outline -*- + +-* Noteworthy changes in release 3.1-2 (2012-03-21) [Fedora] ++* Noteworthy changes in release 3.1-4 (2012-06-08) [Fedora] + + ** Bug Fixes + ++ libparted: Don't crash on big-endian systems when using GPT + libparted: Treat disks without a PMBR as msdos labeled disks + even if they have GPT partition tables. + +diff --git a/libparted/labels/gpt.c b/libparted/labels/gpt.c +index ab2145e..6ca33c8 100644 +--- a/libparted/labels/gpt.c ++++ b/libparted/labels/gpt.c +@@ -1787,12 +1787,12 @@ gpt_get_max_supported_partition_count (const PedDisk *disk, int *max_n) + + if (!_header_is_valid (disk, pth, 1)) + { +- pth->FirstUsableLBA = 34; ++ pth->FirstUsableLBA = PED_CPU_TO_LE64 (34); + pth->SizeOfPartitionEntry + = PED_CPU_TO_LE32 (sizeof (GuidPartitionEntry_t)); + } + +- *max_n = (disk->dev->sector_size * (pth->FirstUsableLBA - 2) ++ *max_n = (disk->dev->sector_size * (PED_LE64_TO_CPU (pth->FirstUsableLBA)-2) + / PED_LE32_TO_CPU (pth->SizeOfPartitionEntry)); + pth_free (pth); + return true; +-- +1.7.7.6 + diff --git a/SOURCES/parted-3.1-libparted-Flush-parent-device-on-open-962611.patch b/SOURCES/parted-3.1-libparted-Flush-parent-device-on-open-962611.patch new file mode 100644 index 0000000..b229f9b --- /dev/null +++ b/SOURCES/parted-3.1-libparted-Flush-parent-device-on-open-962611.patch @@ -0,0 +1,35 @@ +From dc213bf52d640c0219541afb002f71b49a888c7f Mon Sep 17 00:00:00 2001 +From: "Brian C. Lane" +Date: Wed, 4 Sep 2013 11:45:44 -0700 +Subject: [PATCH] libparted: Flush parent device on open (#962611) + +Parted probes for filesystems using geometry offsets into the parent +device, not the partition device itself. This means it may get stale +information if a partition has just been formatted. + +On kernels before 2.6 this will also flush all partition devices. On 2.6 +and newer kernels it will only flush the parent device. + +* libparted/arch/linux.c (linux_open): Always call _flush_cache +--- + libparted/arch/linux.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c +index 2c410a0..4af0d5c 100644 +--- a/libparted/arch/linux.c ++++ b/libparted/arch/linux.c +@@ -1579,9 +1579,7 @@ retry: + dev->read_only = 0; + } + +- /* With kernels < 2.6 flush cache for cache coherence issues */ +- if (!_have_kern26()) +- _flush_cache (dev); ++ _flush_cache (dev); + + return 1; + } +-- +1.8.3.1 + diff --git a/SOURCES/parted-3.1-libparted-Recognize-btrfs-filesystem.patch b/SOURCES/parted-3.1-libparted-Recognize-btrfs-filesystem.patch new file mode 100644 index 0000000..50f5e2f --- /dev/null +++ b/SOURCES/parted-3.1-libparted-Recognize-btrfs-filesystem.patch @@ -0,0 +1,184 @@ +From 242217de0268d6036a6e6a3f196abd79bfcb98b8 Mon Sep 17 00:00:00 2001 +From: "Brian C. Lane" +Date: Tue, 27 Aug 2013 17:27:07 -0700 +Subject: [PATCH 1/2] libparted: Recognize btrfs filesystem + +Add support for showing 'btrfs' in the 'file system' column. Also +allows the used to enter btrfs as the fs type. It doesn't really do +anything -- just sets the partition type to linux. + +* NEWS (Changes in behavior): Mention it. +* doc/parted.texti: Document btrfs fs. +* (libparted/fs/Makefile.am): Add btrfs.c +* (libparted/fs/btrfs/btrfs.c): Probe for btrfs +* (libparted/libparted.c): Register btrfs +--- + NEWS | 3 ++ + doc/parted.texi | 1 + + libparted/fs/Makefile.am | 1 + + libparted/fs/btrfs/btrfs.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++ + libparted/libparted.c | 4 +++ + 5 files changed, 87 insertions(+) + create mode 100644 libparted/fs/btrfs/btrfs.c + +diff --git a/NEWS b/NEWS +index 596ab37..e2d01ed 100644 +--- a/NEWS ++++ b/NEWS +@@ -84,6 +84,9 @@ GNU parted NEWS -*- outline -*- + + ** Changes in behavior + ++ Added support for recognizing btrfs filesystem. This simply displays ++ btrfs in the 'file system' column of the parted output. ++ + Floppy drives are no longer scanned on linux: they cannot be partitioned + anyhow, and some users have a misconfigured BIOS that claims to have a + floppy when they don't, and scanning gets hung up. +diff --git a/doc/parted.texi b/doc/parted.texi +index 6561d0e..2b1ce64 100644 +--- a/doc/parted.texi ++++ b/doc/parted.texi +@@ -575,6 +575,7 @@ partition table. + @item NTFS + @item reiserfs + @item ufs ++@item btrfs + @end itemize + + Example: +diff --git a/libparted/fs/Makefile.am b/libparted/fs/Makefile.am +index 8d48ea1..a8fb313 100644 +--- a/libparted/fs/Makefile.am ++++ b/libparted/fs/Makefile.am +@@ -25,6 +25,7 @@ libfs_la_SOURCES = \ + amiga/asfs.c \ + amiga/asfs.h \ + amiga/a-interface.c \ ++ btrfs/btrfs.c \ + ext2/ext2.h \ + ext2/ext2_fs.h \ + ext2/interface.c \ +diff --git a/libparted/fs/btrfs/btrfs.c b/libparted/fs/btrfs/btrfs.c +new file mode 100644 +index 0000000..e5abed6 +--- /dev/null ++++ b/libparted/fs/btrfs/btrfs.c +@@ -0,0 +1,78 @@ ++/* ++ libparted - a library for manipulating disk partitions ++ Copyright (C) 2013 Free Software Foundation, Inc. ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . ++*/ ++ ++#include ++ ++#include ++#include ++ ++/* Located 64k inside the partition (start of the first btrfs superblock) */ ++#define BTRFS_MAGIC 0x4D5F53665248425FULL /* ascii _BHRfS_M, no null */ ++#define BTRFS_CSUM_SIZE 32 ++#define BTRFS_FSID_SIZE 16 ++ ++ ++static PedGeometry* ++btrfs_probe (PedGeometry* geom) ++{ ++ union { ++ struct { ++ /* Just enough of the btrfs_super_block to get the magic */ ++ uint8_t csum[BTRFS_CSUM_SIZE]; ++ uint8_t fsid[BTRFS_FSID_SIZE]; ++ uint64_t bytenr; ++ uint64_t flags; ++ uint64_t magic; ++ } sb; ++ int8_t sector[8192]; ++ } buf; ++ PedSector offset = (64*1024)/geom->dev->sector_size; ++ ++ if (geom->length < offset+1) ++ return 0; ++ if (!ped_geometry_read (geom, &buf, offset, 1)) ++ return 0; ++ ++ if (PED_LE64_TO_CPU(buf.sb.magic) == BTRFS_MAGIC) { ++ return ped_geometry_new (geom->dev, geom->start, geom->length); ++ } ++ return NULL; ++} ++ ++static PedFileSystemOps btrfs_ops = { ++ probe: btrfs_probe, ++}; ++ ++static PedFileSystemType btrfs_type = { ++ next: NULL, ++ ops: &btrfs_ops, ++ name: "btrfs", ++ block_sizes: ((int[2]){512, 0}) ++}; ++ ++void ++ped_file_system_btrfs_init () ++{ ++ ped_file_system_type_register (&btrfs_type); ++} ++ ++void ++ped_file_system_btrfs_done () ++{ ++ ped_file_system_type_unregister (&btrfs_type); ++} +diff --git a/libparted/libparted.c b/libparted/libparted.c +index a6d86f0..3c3b337 100644 +--- a/libparted/libparted.c ++++ b/libparted/libparted.c +@@ -109,6 +109,7 @@ extern void ped_file_system_hfs_init (void); + extern void ped_file_system_fat_init (void); + extern void ped_file_system_ext2_init (void); + extern void ped_file_system_nilfs2_init (void); ++extern void ped_file_system_btrfs_init (void); + + static void + init_file_system_types () +@@ -124,6 +125,7 @@ init_file_system_types () + ped_file_system_fat_init (); + ped_file_system_ext2_init (); + ped_file_system_nilfs2_init (); ++ ped_file_system_btrfs_init (); + } + + extern void ped_disk_aix_done (); +@@ -186,6 +188,7 @@ extern void ped_file_system_reiserfs_done (void); + extern void ped_file_system_ufs_done (void); + extern void ped_file_system_xfs_done (void); + extern void ped_file_system_amiga_done (void); ++extern void ped_file_system_btrfs_done (void); + + static void + done_file_system_types () +@@ -201,6 +204,7 @@ done_file_system_types () + ped_file_system_ufs_done (); + ped_file_system_xfs_done (); + ped_file_system_amiga_done (); ++ ped_file_system_btrfs_done (); + } + + static void _done() __attribute__ ((destructor)); +-- +1.8.3.1 + diff --git a/SOURCES/parted-3.1-libparted-add-support-for-EAV-DASD-partitions.patch b/SOURCES/parted-3.1-libparted-add-support-for-EAV-DASD-partitions.patch new file mode 100644 index 0000000..81f73a8 --- /dev/null +++ b/SOURCES/parted-3.1-libparted-add-support-for-EAV-DASD-partitions.patch @@ -0,0 +1,1058 @@ +Subject: [PATCH] libparted: add support for EAV DASD partitions + +From: Nageswara R Sastry + +Extended Address Volume (EAV) DASDs are ECKD DASDs with more than +65520 cylinders. This patch adds support for recognizing and +modifying partitions on EAV DASDs to Parted. The changes are +based on the EAV support added to version 1.8.1 [1] of the +s390-tools package. + +[1] http://www.ibm.com/developerworks/linux/linux390/s390-tools-1.8.1.html + +Signed-off-by: Nageswara R Sastry +Signed-off-by: Peter Oberparleiter + +--- + include/parted/fdasd.h | 89 ++++++++++++++++-- + include/parted/vtoc.h | 58 ++++++++++-- + libparted/labels/dasd.c | 1 + libparted/labels/fdasd.c | 226 ++++++++++++++++++++++++++++++++--------------- + libparted/labels/vtoc.c | 173 ++++++++++++++++++++++++++++++----- + 5 files changed, 435 insertions(+), 112 deletions(-) + +--- a/include/parted/fdasd.h ++++ b/include/parted/fdasd.h +@@ -74,6 +74,80 @@ typedef struct dasd_information_t { + char configuration_data[256]; /* from read_configuration_data */ + } dasd_information_t; + ++struct dasd_eckd_characteristics { ++ unsigned short cu_type; ++ struct { ++ unsigned char support:2; ++ unsigned char async:1; ++ unsigned char reserved:1; ++ unsigned char cache_info:1; ++ unsigned char model:3; ++ } __attribute__ ((packed)) cu_model; ++ unsigned short dev_type; ++ unsigned char dev_model; ++ struct { ++ unsigned char mult_burst:1; ++ unsigned char RT_in_LR:1; ++ unsigned char reserved1:1; ++ unsigned char RD_IN_LR:1; ++ unsigned char reserved2:4; ++ unsigned char reserved3:8; ++ unsigned char defect_wr:1; ++ unsigned char XRC_supported:1; ++ unsigned char reserved4:1; ++ unsigned char striping:1; ++ unsigned char reserved5:4; ++ unsigned char cfw:1; ++ unsigned char reserved6:2; ++ unsigned char cache:1; ++ unsigned char dual_copy:1; ++ unsigned char dfw:1; ++ unsigned char reset_alleg:1; ++ unsigned char sense_down:1; ++ } __attribute__ ((packed)) facilities; ++ unsigned char dev_class; ++ unsigned char unit_type; ++ unsigned short no_cyl; ++ unsigned short trk_per_cyl; ++ unsigned char sec_per_trk; ++ unsigned char byte_per_track[3]; ++ unsigned short home_bytes; ++ unsigned char formula; ++ union { ++ struct { ++ unsigned char f1; ++ unsigned short f2; ++ unsigned short f3; ++ } __attribute__ ((packed)) f_0x01; ++ struct { ++ unsigned char f1; ++ unsigned char f2; ++ unsigned char f3; ++ unsigned char f4; ++ unsigned char f5; ++ } __attribute__ ((packed)) f_0x02; ++ } __attribute__ ((packed)) factors; ++ unsigned short first_alt_trk; ++ unsigned short no_alt_trk; ++ unsigned short first_dia_trk; ++ unsigned short no_dia_trk; ++ unsigned short first_sup_trk; ++ unsigned short no_sup_trk; ++ unsigned char MDR_ID; ++ unsigned char OBR_ID; ++ unsigned char director; ++ unsigned char rd_trk_set; ++ unsigned short max_rec_zero; ++ unsigned char reserved1; ++ unsigned char RWANY_in_LR; ++ unsigned char factor6; ++ unsigned char factor7; ++ unsigned char factor8; ++ unsigned char reserved2[3]; ++ unsigned char reserved3[6]; ++ unsigned int long_no_cyl; ++} __attribute__ ((packed)); ++ + /* + * struct format_data_t + * represents all data necessary to format a dasd +@@ -116,18 +190,6 @@ typedef struct format_data_t { + #define BLKRRPART _IO(0x12,95) + /* get block device sector size */ + #define BLKSSZGET _IO(0x12,104) +- +-/***************************************************************************** +- * SECTION: Definition from hdreq.h * +- *****************************************************************************/ +- +-struct fdasd_hd_geometry { +- unsigned char heads; +- unsigned char sectors; +- unsigned short cylinders; +- unsigned long start; +-}; +- + /* get device geometry */ + #define HDIO_GETGEO 0x0301 + +@@ -189,10 +251,13 @@ typedef struct fdasd_anchor { + format4_label_t *f4; + format5_label_t *f5; + format7_label_t *f7; ++ format9_label_t *f9; /* template for all f9 labels */ + partition_info_t *first; + partition_info_t *last; + volume_label_t *vlabel; + config_data_t confdata[USABLE_PARTITIONS]; ++ u_int32_t hw_cylinders; ++ u_int32_t formatted_cylinders; + struct fdasd_hd_geometry geo; + unsigned int label_block; + unsigned int FBA_layout; +--- a/include/parted/vtoc.h ++++ b/include/parted/vtoc.h +@@ -42,7 +42,18 @@ + + #define VOLSER_LENGTH 6 + #define BIG_DISK_SIZE 0x10000 ++#define LV_COMPAT_CYL 0xFFFE + ++/***************************************************************************** ++ * SECTION: Definition from hdreq.h * ++ *****************************************************************************/ ++ ++struct fdasd_hd_geometry { ++ unsigned char heads; ++ unsigned char sectors; ++ unsigned short cylinders; ++ unsigned long start; ++}; + + typedef struct ttr ttr_t; + typedef struct cchhb cchhb_t; +@@ -59,6 +70,7 @@ typedef struct ds5ext ds5ext_t + typedef struct format5_label format5_label_t; + typedef struct ds7ext ds7ext_t; + typedef struct format7_label format7_label_t; ++typedef struct format9_label format9_label_t; + + struct __attribute__ ((packed)) ttr { + u_int16_t tt; +@@ -169,6 +181,10 @@ struct __attribute__ ((packed)) dev_cons + u_int8_t DS4DEVDB; /* number of directory blocks per track */ + }; + ++/* ++ * format 1 and format 8 label have the same layout so we use the following ++ * structure for both. ++ */ + struct __attribute__ ((packed)) format1_label { + char DS1DSNAM[44]; /* data set name */ + u_int8_t DS1FMTID; /* format identifier */ +@@ -229,7 +245,11 @@ struct __attribute__ ((packed)) format4_ + char res2[10]; /* reserved */ + u_int8_t DS4EFLVL; /* extended free-space management level */ + cchhb_t DS4EFPTR; /* pointer to extended free-space info */ +- char res3[9]; /* reserved */ ++ char res3; /* reserved */ ++ u_int32_t DS4DCYL; /* number of logical cyls */ ++ char res4[2]; /* reserved */ ++ u_int8_t DS4DEVF2; /* device flags */ ++ char res5; /* reserved */ + }; + + struct __attribute__ ((packed)) ds5ext { +@@ -261,12 +281,28 @@ struct __attribute__ ((packed)) format7_ + cchhb_t DS7PTRDS; /* pointer to next FMT7 DSCB */ + }; + ++struct __attribute__ ((packed)) format9_label { ++ u_int8_t DS9KEYID; /* key code for format 9 labels (0x09) */ ++ u_int8_t DS9SUBTY; /* subtype (0x01) */ ++ u_int8_t DS9NUMF9; /* number of F9 datasets */ ++ u_int8_t res1[41]; /* reserved */ ++ u_int8_t DS9FMTID; /* format identifier */ ++ u_int8_t res2[95]; /* reserved */ ++}; ++ + char *vtoc_ebcdic_enc (char const *source, char *target, int l); + char *vtoc_ebcdic_dec (char const *source, char *target, int l); + void vtoc_set_extent (extent_t *ext, u_int8_t typeind, u_int8_t seqno, + cchh_t *lower, cchh_t *upper); +-void vtoc_set_cchh (cchh_t *addr, u_int16_t cc, u_int16_t hh); +-void vtoc_set_cchhb (cchhb_t *addr, u_int16_t cc, u_int16_t hh, u_int8_t b); ++void vtoc_set_cchh (cchh_t *addr, u_int32_t cc, u_int16_t hh); ++u_int32_t vtoc_get_cyl_from_cchh(cchh_t *addr); ++u_int16_t vtoc_get_head_from_cchh(cchh_t *addr); ++void vtoc_set_cchhb (cchhb_t *addr, u_int32_t cc, u_int16_t hh, u_int8_t b); ++u_int32_t vtoc_get_cyl_from_cchhb(cchhb_t *addr); ++u_int16_t vtoc_get_head_from_cchhb(cchhb_t *addr); ++u_int64_t cchhb2blk(cchhb_t *p, struct fdasd_hd_geometry *geo); ++u_int64_t cchh2blk (cchh_t *p, struct fdasd_hd_geometry *geo); ++u_int32_t cchh2trk (cchh_t *p, struct fdasd_hd_geometry *geo); + void vtoc_set_date (labeldate_t *d, u_int8_t year, u_int16_t day); + + void vtoc_volume_label_init (volume_label_t *vlabel); +@@ -295,14 +331,16 @@ void vtoc_write_label (int fd, unsigned + format1_label_t const *f1, + format4_label_t const *f4, + format5_label_t const *f5, +- format7_label_t const *f7); ++ format7_label_t const *f7, ++ format9_label_t const *f9); + + void vtoc_init_format1_label (char *volid, unsigned int blksize, + extent_t *part_extent, format1_label_t *f1); + + void vtoc_init_format4_label (format4_label_t *f4lbl, + unsigned int usable_partitions, +- unsigned int cylinders, ++ unsigned int compat_cylinders, ++ unsigned int real_cylinders, + unsigned int tracks, + unsigned int blocks, + unsigned int blksize, +@@ -329,8 +367,16 @@ void vtoc_update_format7_label_add (form + void vtoc_update_format7_label_del (format7_label_t *f7, int verbose, + u_int32_t a, u_int32_t b); + ++void vtoc_init_format8_label (char *volid, unsigned int blksize, ++ extent_t *part_extent, format1_label_t *f1); ++ ++void vtoc_update_format8_label (cchhb_t *associated_f9, format1_label_t *f8); ++ ++void vtoc_init_format9_label (format9_label_t *f9); ++ + void vtoc_set_freespace(format4_label_t *f4, format5_label_t *f5, + format7_label_t *f7, char ch, int verbose, +- u_int32_t start, u_int32_t stop, int cyl, int trk); ++ u_int32_t start, u_int32_t stop, u_int32_t cyl, ++ u_int32_t trk); + + #endif /* VTOC_H */ +--- a/libparted/labels/dasd.c ++++ b/libparted/labels/dasd.c +@@ -631,6 +631,7 @@ dasd_write (const PedDisk* disk) + /* initialize the anchor */ + fdasd_initialize_anchor(&anchor); + fdasd_get_geometry(disk->dev, &anchor, arch_specific->fd); ++ fdasd_check_volume(&anchor, arch_specific->fd); + memcpy(anchor.vlabel, &disk_specific->vlabel, sizeof(volume_label_t)); + anchor.vlabel_changed++; + +--- a/libparted/labels/fdasd.c ++++ b/libparted/labels/fdasd.c +@@ -59,6 +59,48 @@ setpos (fdasd_anchor_t *anc, int dsn, in + anc->partno[dsn] = pos; + } + ++static u_int32_t ++get_usable_cylinders (fdasd_anchor_t *anc) ++{ ++ u_int32_t cyl; ++ ++ /* large volume */ ++ if (anc->f4->DS4DEVCT.DS4DSCYL == LV_COMPAT_CYL && ++ anc->f4->DS4DCYL > anc->f4->DS4DEVCT.DS4DSCYL) ++ return anc->f4->DS4DCYL; ++ /* normal volume */ ++ if (anc->f4->DS4DEVCT.DS4DEVFG & ALTERNATE_CYLINDERS_USED) ++ cyl = anc->f4->DS4DEVCT.DS4DSCYL - ++ (u_int16_t) anc->f4->DS4DEVAC; ++ else ++ cyl = anc->f4->DS4DEVCT.DS4DSCYL; ++ return cyl; ++} ++ ++static void ++get_addr_of_highest_f1_f8_label (fdasd_anchor_t *anc, cchhb_t *addr) ++{ ++ ++ u_int8_t record; ++ /* We have to count the follwing labels: ++ * one format 4 ++ * one format 5 ++ * format 7 only if we have moren then BIG_DISK_SIZE tracks ++ * one for each format 1 or format 8 label == one for each partition ++ * one for each format 9 label before the last format 8 ++ * We assume that all partitions use format 8 labels when ++ * anc->formatted_cylinders > LV_COMPAT_CYL ++ * Note: Record zero is special, so block 0 on our disk is record 1! ++ */ ++ ++ record = anc->used_partitions + 2; ++ if (anc->big_disk) ++ record++; ++ if (anc->formatted_cylinders > LV_COMPAT_CYL) ++ record += anc->used_partitions - 1; ++ vtoc_set_cchhb(addr, VTOC_START_CC, VTOC_START_HH, record); ++} ++ + void + fdasd_cleanup (fdasd_anchor_t *anchor) + { +@@ -72,6 +114,7 @@ fdasd_cleanup (fdasd_anchor_t *anchor) + free(anchor->f4); + free(anchor->f5); + free(anchor->f7); ++ free(anchor->f9); + free(anchor->vlabel); + + p = anchor->first; +@@ -82,6 +125,7 @@ fdasd_cleanup (fdasd_anchor_t *anchor) + if (p == NULL) + return; + q = p->next; ++ free(p->f1); + free(p); + p = q; + } +@@ -154,17 +198,6 @@ fdasd_error (fdasd_anchor_t *anc, enum f + } + + /* +- * converts cyl-cyl-head-head-blk to blk +- */ +-static unsigned long +-cchhb2blk (cchhb_t *p, struct fdasd_hd_geometry *geo) +-{ +- PDEBUG +- return (unsigned long) (p->cc * geo->heads * geo->sectors +- + p->hh * geo->sectors + p->b); +-} +- +-/* + * initializes the anchor structure and allocates some + * memory for the labels + */ +@@ -216,9 +249,16 @@ fdasd_initialize_anchor (fdasd_anchor_t + if (anc->f7 == NULL) + fdasd_error(anc, malloc_failed, "FMT7 DSCB."); + ++ /* template for all format 9 labels */ ++ anc->f9 = malloc(sizeof(format9_label_t)); ++ if (anc->f9 == NULL) ++ fdasd_error(anc, malloc_failed, "FMT9 DSCB."); ++ + bzero(anc->f4, sizeof(format4_label_t)); + bzero(anc->f5, sizeof(format5_label_t)); + bzero(anc->f7, sizeof(format7_label_t)); ++ bzero(anc->f9, sizeof(format9_label_t)); ++ vtoc_init_format9_label(anc->f9); + + v = malloc(sizeof(volume_label_t)); + if (v == NULL) +@@ -259,6 +299,8 @@ fdasd_initialize_anchor (fdasd_anchor_t + + q = p; + } ++ anc->hw_cylinders = 0; ++ anc->formatted_cylinders = 0; + } + + /* +@@ -269,44 +311,46 @@ fdasd_write_vtoc_labels (fdasd_anchor_t + { + PDEBUG + partition_info_t *p; +- unsigned long b; ++ unsigned long b, maxblk; + char dsno[6], s1[7], s2[45], *c1, *c2, *ch; + int i = 0, k = 0; ++ cchhb_t f9addr; ++ format1_label_t emptyf1; + + b = (cchhb2blk (&anc->vlabel->vtoc, &anc->geo) - 1) * anc->blksize; + if (b <= 0) + fdasd_error (anc, vlabel_corrupted, ""); ++ maxblk = b + anc->blksize * 9; /* f4+f5+f7+3*f8+3*f9 */ + + /* write FMT4 DSCB */ +- vtoc_write_label (fd, b, NULL, anc->f4, NULL, NULL); ++ vtoc_write_label (fd, b, NULL, anc->f4, NULL, NULL, NULL); ++ b += anc->blksize; + + /* write FMT5 DSCB */ ++ vtoc_write_label (fd, b, NULL, NULL, anc->f5, NULL, NULL); + b += anc->blksize; +- vtoc_write_label (fd, b, NULL, NULL, anc->f5, NULL); + + /* write FMT7 DSCB */ + if (anc->big_disk) { ++ vtoc_write_label (fd, b, NULL, NULL, NULL, anc->f7, NULL); + b += anc->blksize; +- vtoc_write_label (fd, b, NULL, NULL, NULL, anc->f7); + } + +- /* loop over all FMT1 DSCBs */ +- p = anc->first; +- for (i = 0; i < USABLE_PARTITIONS; i++) { +- b += anc->blksize; ++ /* loop over all partitions (format 1 or format 8 DCB) */ ++ for (p = anc->first; p != NULL; p = p->next) { + + if (p->used != 0x01) { +- vtoc_write_label (fd, b, p->f1, NULL, NULL, NULL); + continue; + } + ++ i++; + strncpy (p->f1->DS1DSSN, anc->vlabel->volid, 6); + + ch = p->f1->DS1DSNAM; + vtoc_ebcdic_dec (ch, ch, 44); + c1 = ch + 7; + +- if (getdsn (anc, i) > -1) { ++ if (getdsn (anc, i-1) > -1) { + /* re-use the existing data set name */ + c2 = strchr (c1, '.'); + if (c2 != NULL) +@@ -325,11 +369,7 @@ fdasd_write_vtoc_labels (fdasd_anchor_t + while (getpos (anc, k) > -1) + k++; + +- setpos (anc, k, i); +- +- strncpy (s2, ch, 44); +- s2[44] = 0; +- vtoc_ebcdic_dec (s2, s2, 44); ++ setpos (anc, k, i-1); + + strncpy (ch, "LINUX.V " " ", 44); + +@@ -366,8 +406,32 @@ fdasd_write_vtoc_labels (fdasd_anchor_t + + vtoc_ebcdic_enc (ch, ch, 44); + +- vtoc_write_label (fd, b, p->f1, NULL, NULL, NULL); +- p = p->next; ++ if (p->f1->DS1FMTID == 0xf8 ) { ++ /* Now as we know where which label will be written, we ++ * can add the address of the format 9 label to the ++ * format 8 label. The f9 record will be written to the ++ * block after the current blk. Remember: records are of ++ * by one, so we have to add 2 and not just one. ++ */ ++ vtoc_set_cchhb(&f9addr, VTOC_START_CC, VTOC_START_HH, ++ ((b / anc->blksize) % anc->geo.sectors) + 2); ++ vtoc_update_format8_label(&f9addr, p->f1); ++ vtoc_write_label(fd, b, p->f1, NULL, NULL, NULL, NULL); ++ b += anc->blksize; ++ vtoc_write_label(fd, b, NULL, NULL, NULL, NULL, ++ anc->f9); ++ b += anc->blksize; ++ } else { ++ vtoc_write_label(fd, b, p->f1, NULL, NULL, NULL, NULL); ++ b += anc->blksize; ++ } ++ } ++ ++ /* write empty labels to the rest of the blocks */ ++ bzero(&emptyf1, sizeof(emptyf1)); ++ while (b < maxblk) { ++ vtoc_write_label(fd, b, &emptyf1, NULL, NULL, NULL, NULL); ++ b += anc->blksize; + } + } + +@@ -394,20 +458,25 @@ int + fdasd_prepare_labels (fdasd_anchor_t *anc, int fd) + { + PDEBUG +- partition_info_t *p = anc->first; ++ partition_info_t *p; + char dsno[6], s1[7], s2[45], *c1, *c2, *ch; + int i = 0, k = 0; + +- /* loop over all FMT1 DSCBs */ +- p = anc->first; +- for (i = 0; i < USABLE_PARTITIONS; i++) { ++ /* loop over all partitions (format 1 or format 8 DCB) */ ++ for (p = anc->first; p != NULL; p = p->next) { ++ ++ if (p->used != 0x01) { ++ continue; ++ } ++ ++ i++; + strncpy (p->f1->DS1DSSN, anc->vlabel->volid, 6); + + ch = p->f1->DS1DSNAM; + vtoc_ebcdic_dec (ch, ch, 44); + c1 = ch + 7; + +- if (getdsn (anc, i) > -1) { ++ if (getdsn (anc, i-1) > -1) { + /* re-use the existing data set name */ + c2 = strchr (c1, '.'); + if (c2 != NULL) +@@ -426,11 +495,7 @@ fdasd_prepare_labels (fdasd_anchor_t *an + while (getpos (anc, k) > -1) + k++; + +- setpos (anc, k, i); +- +- strncpy (s2, ch, 44); +- s2[44] = 0; +- vtoc_ebcdic_dec (s2, s2, 44); ++ setpos (anc, k, i-1); + + strncpy (ch, "LINUX.V " " ", 44); + +@@ -466,7 +531,6 @@ fdasd_prepare_labels (fdasd_anchor_t *an + } + + vtoc_ebcdic_enc (ch, ch, 44); +- p = p->next; + } + + return 1; +@@ -482,6 +546,7 @@ fdasd_recreate_vtoc (fdasd_anchor_t *anc + vtoc_init_format4_label(anc->f4, + USABLE_PARTITIONS, + anc->geo.cylinders, ++ anc->formatted_cylinders, + anc->geo.heads, + anc->geo.sectors, + anc->blksize, +@@ -492,8 +557,8 @@ fdasd_recreate_vtoc (fdasd_anchor_t *anc + vtoc_set_freespace(anc->f4, anc->f5, anc->f7, + '+', anc->verbose, + FIRST_USABLE_TRK, +- anc->geo.cylinders * anc->geo.heads - 1, +- anc->geo.cylinders, anc->geo.heads); ++ anc->formatted_cylinders * anc->geo.heads - 1, ++ anc->formatted_cylinders, anc->geo.heads); + + for (i = 0; i < USABLE_PARTITIONS; i++) { + bzero(p->f1, sizeof(format1_label_t)); +@@ -507,7 +572,8 @@ fdasd_recreate_vtoc (fdasd_anchor_t *anc + } + + anc->used_partitions = 0; +- anc->fspace_trk = anc->geo.cylinders * anc->geo.heads - FIRST_USABLE_TRK; ++ anc->fspace_trk = anc->formatted_cylinders * anc->geo.heads - ++ FIRST_USABLE_TRK; + + for (i=0; ifirst; +- unsigned int h = anc->geo.heads; +- unsigned long max = anc->geo.cylinders * h - 1; ++ unsigned long max = anc->formatted_cylinders * anc->geo.heads - 1; + int i; + char *ch; + + anc->used_partitions = anc->geo.sectors - 2 - anc->f4->DS4DSREC; + + for (i = 1; i <= USABLE_PARTITIONS; i++) { +- if (p->f1->DS1FMTID != 0xf1) { ++ if (p->f1->DS1FMTID != 0xf1 && ++ p->f1->DS1FMTID != 0xf8) { + if (i == 1) + /* there is no partition at all */ + anc->fspace_trk = max - FIRST_USABLE_TRK + 1; +@@ -546,8 +612,8 @@ fdasd_update_partition_info (fdasd_ancho + + /* this is a valid format 1 label */ + p->used = 0x01; +- p->start_trk = p->f1->DS1EXT1.llimit.cc * h + p->f1->DS1EXT1.llimit.hh; +- p->end_trk = p->f1->DS1EXT1.ulimit.cc * h + p->f1->DS1EXT1.ulimit.hh; ++ p->start_trk = cchh2trk(&p->f1->DS1EXT1.llimit, &anc->geo); ++ p->end_trk = cchh2trk(&p->f1->DS1EXT1.ulimit, &anc->geo); + p->len_trk = p->end_trk - p->start_trk + 1; + + if (i == 1) { +@@ -618,14 +684,22 @@ fdasd_process_valid_vtoc (fdasd_anchor_t + format1_label_t q; + char s[5], *ch; + ++ if (anc->f4->DS4DEVCT.DS4DSCYL == LV_COMPAT_CYL && ++ anc->f4->DS4DCYL > anc->f4->DS4DEVCT.DS4DSCYL) ++ anc->formatted_cylinders = anc->f4->DS4DCYL; ++ else ++ anc->formatted_cylinders = anc->f4->DS4DEVCT.DS4DSCYL; ++ anc->fspace_trk = anc->formatted_cylinders * anc->geo.heads - ++ FIRST_USABLE_TRK; + b += anc->blksize; + +- for (i = 1; i <= anc->geo.sectors; i++) { ++ for (i = 1; i < anc->geo.sectors; i++) { + bzero (&q, f1size); + vtoc_read_label (fd, b, &q, NULL, NULL, NULL); + + switch (q.DS1FMTID) { + case 0xf1: ++ case 0xf8: + if (p == NULL) + break; + memcpy (p->f1, &q, f1size); +@@ -669,6 +743,12 @@ fdasd_process_valid_vtoc (fdasd_anchor_t + memcpy (anc->f7, &q, f1size); + f7_counter++; + break; ++ case 0xf9: ++ /* each format 8 lable has an associated ++ * format 9 lable, but they are of no further ++ * use to us. ++ */ ++ break; + } + + b += anc->blksize; +@@ -718,7 +798,7 @@ fdasd_check_volume (fdasd_anchor_t *anc, + { + PDEBUG + volume_label_t *v = anc->vlabel; +- unsigned long b = -1; ++ long long b = -1; + char str[LINE_LENGTH]; + + memset(v, 0, sizeof(volume_label_t)); +@@ -784,6 +864,7 @@ fdasd_get_geometry (const PedDevice *dev + PDEBUG + int blksize = 0; + dasd_information_t dasd_info; ++ struct dasd_eckd_characteristics *characteristics; + + /* We can't get geometry from a regular file, + so simulate something usable, for the sake of testing. */ +@@ -803,6 +884,8 @@ fdasd_get_geometry (const PedDevice *dev + dasd_info.devno = 513; + dasd_info.label_block = 2; + dasd_info.FBA_layout = 0; ++ anc->hw_cylinders = ((st.st_size / blksize) / anc->geo.sectors) / ++ anc->geo.heads; + } else { + if (ioctl(f, HDIO_GETGEO, &anc->geo) != 0) + fdasd_error(anc, unable_to_ioctl, +@@ -816,13 +899,20 @@ fdasd_get_geometry (const PedDevice *dev + if (ioctl(f, BIODASDINFO, &dasd_info) != 0) + fdasd_error(anc, unable_to_ioctl, + _("Could not retrieve disk information.")); ++ ++ characteristics = (struct dasd_eckd_characteristics *) ++ &dasd_info.characteristics; ++ if (characteristics->no_cyl == LV_COMPAT_CYL && ++ characteristics->long_no_cyl) ++ anc->hw_cylinders = characteristics->long_no_cyl; ++ else ++ anc->hw_cylinders = characteristics->no_cyl; + } + + anc->dev_type = dasd_info.dev_type; + anc->blksize = blksize; + anc->label_pos = dasd_info.label_block * blksize; + anc->devno = dasd_info.devno; +- anc->fspace_trk = anc->geo.cylinders * anc->geo.heads - FIRST_USABLE_TRK; + anc->label_block = dasd_info.label_block; + anc->FBA_layout = dasd_info.FBA_layout; + } +@@ -850,20 +940,17 @@ fdasd_get_partition_data (fdasd_anchor_t + unsigned int *stop_ptr) + { + PDEBUG +- unsigned int limit, cc, hh; ++ unsigned int limit; ++ u_int32_t cc, c; ++ u_int16_t hh, h; + cchh_t llimit, ulimit; + partition_info_t *q; + u_int8_t b1, b2; +- u_int16_t c, h; + unsigned int start = *start_ptr, stop = *stop_ptr; + int i; + char *ch; + +- if (anc->f4->DS4DEVCT.DS4DEVFG & ALTERNATE_CYLINDERS_USED) +- c = anc->f4->DS4DEVCT.DS4DSCYL - (u_int16_t) anc->f4->DS4DEVAC; +- else +- c = anc->f4->DS4DEVCT.DS4DSCYL; +- ++ c = get_usable_cylinders(anc); + h = anc->f4->DS4DEVCT.DS4DSTRK; + limit = (h * c - 1); + +@@ -1019,7 +1106,6 @@ fdasd_add_partition (fdasd_anchor_t *anc + cchhb_t hf1; + partition_info_t *p; + extent_t ext; +- int i; + + PDEBUG; + +@@ -1032,8 +1118,14 @@ fdasd_add_partition (fdasd_anchor_t *anc + if (fdasd_get_partition_data(anc, &ext, p, &start, &stop) != 0) + return 0; + +- PDEBUG; +- vtoc_init_format1_label(anc->vlabel->volid, anc->blksize, &ext, p->f1); ++ if (anc->formatted_cylinders > LV_COMPAT_CYL) { ++ vtoc_init_format8_label(anc->vlabel->volid, anc->blksize, &ext, ++ p->f1); ++ } else { ++ PDEBUG; ++ vtoc_init_format1_label(anc->vlabel->volid, anc->blksize, &ext, ++ p->f1); ++ } + + PDEBUG; + fdasd_enqueue_new_partition(anc); +@@ -1041,23 +1133,17 @@ fdasd_add_partition (fdasd_anchor_t *anc + PDEBUG; + anc->used_partitions += 1; + +- i = anc->used_partitions + 2; +- if (anc->big_disk) +- i++; +- PDEBUG; +- +- vtoc_set_cchhb(&hf1, VTOC_START_CC, VTOC_START_HH, i); +- ++ get_addr_of_highest_f1_f8_label(anc, &hf1); + vtoc_update_format4_label(anc->f4, &hf1, anc->f4->DS4DSREC - 1); + + PDEBUG; + +- start = ext.llimit.cc * anc->geo.heads + ext.llimit.hh; +- stop = ext.ulimit.cc * anc->geo.heads + ext.ulimit.hh; ++ start = cchh2trk(&ext.llimit, &anc->geo); ++ stop = cchh2trk(&ext.ulimit, &anc->geo); + + PDEBUG; + vtoc_set_freespace(anc->f4, anc->f5, anc->f7, '-', anc->verbose, +- start, stop, anc->geo.cylinders, anc->geo.heads); ++ start, stop, anc->formatted_cylinders, anc->geo.heads); + + anc->vtoc_changed++; + +--- a/libparted/labels/vtoc.c ++++ b/libparted/labels/vtoc.c +@@ -218,11 +218,32 @@ vtoc_set_extent (extent_t *ext, u_int8_t + } + + void +-vtoc_set_cchh (cchh_t *addr, u_int16_t cc, u_int16_t hh) ++vtoc_set_cchh (cchh_t *addr, u_int32_t cc, u_int16_t hh) + { + PDEBUG +- addr->cc = cc; +- addr->hh = hh; ++ addr->cc = (u_int16_t) cc; ++ addr->hh = cc >> 16; ++ addr->hh <<= 4; ++ addr->hh |= hh; ++} ++ ++u_int32_t ++vtoc_get_cyl_from_cchh (cchh_t *addr) ++{ ++ u_int32_t cyl; ++ ++ /*decode cylinder for large volumes */ ++ cyl = addr->hh & 0xFFF0; ++ cyl <<= 12; ++ cyl |= addr->cc; ++ return cyl; ++} ++ ++u_int16_t ++vtoc_get_head_from_cchh (cchh_t *addr) ++{ ++ /* decode heads for large volumes */ ++ return addr->hh & 0x000F; + } + + static void +@@ -234,12 +255,63 @@ vtoc_set_ttr (ttr_t *addr, u_int16_t tt, + } + + void +-vtoc_set_cchhb (cchhb_t *addr, u_int16_t cc, u_int16_t hh, u_int8_t b) ++vtoc_set_cchhb (cchhb_t *addr, u_int32_t cc, u_int16_t hh, u_int8_t b) + { + PDEBUG +- addr->cc = cc; +- addr->hh = hh; +- addr->b = b; ++ addr->cc = (u_int16_t) cc; ++ addr->hh = cc >> 16; ++ addr->hh <<= 4; ++ addr->hh |= hh; ++ addr->b = b; ++} ++ ++u_int32_t ++vtoc_get_cyl_from_cchhb(cchhb_t *addr) ++{ ++ u_int32_t cyl; ++ ++ /* decode cylinder for large volumes */ ++ cyl = addr->hh & 0xFFF0; ++ cyl <<= 12; ++ cyl |= addr->cc; ++ return cyl; ++} ++ ++u_int16_t ++vtoc_get_head_from_cchhb(cchhb_t *addr) ++{ ++ /* decode heads for large volumes */ ++ return addr->hh & 0x000F; ++} ++ ++/* ++ * some functions to convert cyl-cyl-head-head addresses to ++ * block or track numbers ++ * Note: Record zero is special, so first block on a track is ++ * in record 1! ++ */ ++u_int64_t ++cchhb2blk (cchhb_t *p, struct fdasd_hd_geometry *geo) ++{ ++ return (u_int64_t) vtoc_get_cyl_from_cchhb(p) * ++ geo->heads * geo->sectors + ++ vtoc_get_head_from_cchhb(p) * geo->sectors + ++ p->b; ++} ++ ++u_int64_t ++cchh2blk (cchh_t *p, struct fdasd_hd_geometry *geo) ++{ ++ return (u_int64_t) vtoc_get_cyl_from_cchh(p) * ++ geo->heads * geo->sectors + ++ vtoc_get_head_from_cchh(p) * geo->sectors; ++} ++ ++u_int32_t ++cchh2trk (cchh_t *p, struct fdasd_hd_geometry *geo) ++{ ++ return vtoc_get_cyl_from_cchh(p) * geo->heads + ++ vtoc_get_head_from_cchh(p); + } + + void +@@ -506,7 +578,8 @@ vtoc_write_label (int f, unsigned long p + format1_label_t const *f1, + format4_label_t const *f4, + format5_label_t const *f5, +- format7_label_t const *f7) ++ format7_label_t const *f7, ++ format9_label_t const *f9) + { + PDEBUG + int t; +@@ -542,6 +615,17 @@ vtoc_write_label (int f, unsigned long p + vtoc_error(unable_to_write, "vtoc_write_label", + _("Could not write VTOC FMT7 DSCB.")); + } ++ ++ if (f9 != NULL) ++ { ++ t = sizeof(format9_label_t); ++ if (write(f, f9, t) != t) ++ { ++ close(f); ++ vtoc_error(unable_to_write, "vtoc_write_label", ++ _("Could not write VTOC FMT9 DSCB.")); ++ } ++ } + } + + /* +@@ -549,7 +633,8 @@ vtoc_write_label (int f, unsigned long p + */ + void + vtoc_init_format4_label (format4_label_t *f4, unsigned int usable_partitions, +- unsigned int cylinders, unsigned int tracks, ++ unsigned int compat_cylinders, ++ unsigned int real_cylinders, unsigned int tracks, + unsigned int blocks, unsigned int blksize, + u_int16_t dev_type) + { +@@ -574,7 +659,7 @@ vtoc_init_format4_label (format4_label_t + f4->DS4DEVAC = 0x00; + + /* -- begin f4->DS4DEVCT -- */ +- f4->DS4DEVCT.DS4DSCYL = cylinders; ++ f4->DS4DEVCT.DS4DSCYL = compat_cylinders; + f4->DS4DEVCT.DS4DSTRK = tracks; + + switch (dev_type) { +@@ -613,7 +698,11 @@ vtoc_init_format4_label (format4_label_t + bzero(f4->res2, sizeof(f4->res2)); + f4->DS4EFLVL = 0x00; + bzero(&f4->DS4EFPTR, sizeof(f4->DS4EFPTR)); +- bzero(f4->res3, sizeof(f4->res3)); ++ bzero(&f4->res3, sizeof(f4->res3)); ++ f4->DS4DCYL = real_cylinders; ++ bzero(f4->res4, sizeof(f4->res4)); ++ f4->DS4DEVF2 = 0x40; /* allow format 8 and 9 labels */ ++ bzero(&f4->res5, sizeof(f4->res5)); + } + + /* +@@ -647,11 +736,12 @@ vtoc_init_format7_label (format7_label_t + } + + /* +- * initializes a format1 label ++ * helper function that initializes a most parts of a ++ * format1 or format 8 label, all but the field DS1FMTID + */ + void +-vtoc_init_format1_label (char *volid, unsigned int blksize, +- extent_t *part_extent, format1_label_t *f1) ++vtoc_init_format_1_8_label (char *volid, unsigned int blksize, ++ extent_t *part_extent, format1_label_t *f1) + { + PDEBUG + struct tm * creatime; +@@ -666,7 +756,6 @@ vtoc_init_format1_label (char *volid, un + sprintf(str, "PART .NEW "); + vtoc_ebcdic_enc(str, str, 44); + strncpy(f1->DS1DSNAM, str, 44); +- f1->DS1FMTID = 0xf1; + strncpy(f1->DS1DSSN, " ", 6); + f1->DS1VOLSQ = 0x0001; + +@@ -704,6 +793,37 @@ vtoc_init_format1_label (char *volid, un + vtoc_set_cchhb(&f1->DS1PTRDS, 0x0000, 0x0000, 0x00); + } + ++void ++vtoc_init_format1_label (char *volid, unsigned int blksize, ++ extent_t *part_extent, format1_label_t *f1) ++{ ++ vtoc_init_format_1_8_label(volid, blksize, part_extent, f1); ++ f1->DS1FMTID = 0xf1; ++} ++ ++void ++vtoc_init_format8_label (char *volid, unsigned int blksize, ++ extent_t *part_extent, format1_label_t *f8) ++{ ++ vtoc_init_format_1_8_label(volid, blksize, part_extent, f8); ++ f8->DS1FMTID = 0xf8; ++} ++ ++void ++vtoc_update_format8_label (cchhb_t *associated_f9, format1_label_t *f8) ++{ ++ memcpy(&f8->DS1PTRDS, associated_f9, sizeof(*associated_f9)); ++} ++ ++void ++vtoc_init_format9_label (format9_label_t *f9) ++{ ++ f9->DS9KEYID = 0x09; ++ f9->DS9SUBTY = 0x01; ++ f9->DS9NUMF9 = 1; ++ f9->DS9FMTID = 0xf9; ++} ++ + /* + * do some updates to the VTOC format4 label + */ +@@ -1060,7 +1180,7 @@ vtoc_update_format7_label_add (format7_l + if ((ext->a + ext->b) == 0x00000000) + continue; + +- if ((ext->b + 1) == tmp->a) { ++ if (ext->b == tmp->a) { + /* this extent precedes the new one */ + ext->b = tmp->b; + bzero(tmp, sizeof(ds7ext_t)); +@@ -1074,7 +1194,7 @@ vtoc_update_format7_label_add (format7_l + continue; + } + +- if (ext->a == (tmp->b + 1)) { ++ if (ext->a == tmp->b) { + /* this extent succeeds the new one */ + ext->a = tmp->a; + bzero(tmp, sizeof(ds7ext_t)); +@@ -1119,7 +1239,7 @@ vtoc_update_format7_label_del (format7_l + + if ((a == ext->a) && (b < ext->b)) { + /* left-bounded in free space gap */ +- ext->a = b + 1; ++ ext->a = b; + + if (verbose) + puts ("FMT7 add extent: left-bounded"); +@@ -1130,7 +1250,7 @@ vtoc_update_format7_label_del (format7_l + + if ((a > ext->a) && (b == ext->b)) { + /* right-bounded in free space gap */ +- ext->b = a - 1; ++ ext->b = a; + + if (verbose) + puts ("FMT7 add extent: right-bounded"); +@@ -1141,8 +1261,8 @@ vtoc_update_format7_label_del (format7_l + + if ((a > ext->a) && (b < ext->b)) { + /* partition devides free space into 2 pieces */ +- vtoc_update_format7_label_add(f7, verbose, b+1, ext->b); +- ext->b = a - 1; ++ vtoc_update_format7_label_add(f7, verbose, b, ext->b); ++ ext->b = a; + + if (verbose) + puts ("FMT7 add extent: 2 pieces"); +@@ -1172,14 +1292,19 @@ vtoc_update_format7_label_del (format7_l + void + vtoc_set_freespace(format4_label_t *f4, format5_label_t *f5, + format7_label_t *f7, char ch, int verbose, +- u_int32_t start, u_int32_t stop, int cyl, int trk) ++ u_int32_t start, u_int32_t stop, u_int32_t cyl, ++ u_int32_t trk) + { + PDEBUG + if ((cyl * trk) > BIG_DISK_SIZE) { + if (ch == '+') +- vtoc_update_format7_label_add(f7, verbose, start, stop); ++ vtoc_update_format7_label_add(f7, verbose, start, ++ /* ds7ext RTA + 1 */ ++ stop + 1); + else if (ch == '-') +- vtoc_update_format7_label_del(f7, verbose, start, stop); ++ vtoc_update_format7_label_del(f7, verbose, start, ++ /* ds7ext RTA + 1 */ ++ stop + 1); + else + puts ("BUG: syntax error in vtoc_set_freespace call"); + diff --git a/SOURCES/parted-3.1-libparted-add-support-for-implicit-FBA-DASD-partitions.patch b/SOURCES/parted-3.1-libparted-add-support-for-implicit-FBA-DASD-partitions.patch new file mode 100644 index 0000000..95d2551 --- /dev/null +++ b/SOURCES/parted-3.1-libparted-add-support-for-implicit-FBA-DASD-partitions.patch @@ -0,0 +1,187 @@ +Subject: [PATCH] libparted: add support for implicit FBA DASD partitions + +From: Nageswara R Sastry + +Fixed Block Access (FBA) DASDs are mainframe-specific disk devices +which are layed out as a sequence of 512-byte sectors. In contrast +to ECKD DASDs, these disks do not require formatting and resemble +the LBA layout of non-mainframe disks. Despite this resemblance, +the Linux kernel applies special handling during partition detection +for FBA DASDs, resulting in a single, immutable partition being +reported. + +While actual FBA DASD hardware is no longer available, the z/VM +hypervisor can simulate FBA DASD disks, backed by either ECKD or +SCSI devices. + +This patch adds support for recognizing FBA DASD partitions +to parted. + +Signed-off-by: Nageswara R Sastry +Signed-off-by: Peter Oberparleiter + +--- + include/parted/fdasd.h | 2 + + libparted/labels/dasd.c | 63 ++++++++++++++++++++++++++++++++++++++++------- + libparted/labels/fdasd.c | 5 +++ + 3 files changed, 61 insertions(+), 9 deletions(-) + +--- a/include/parted/fdasd.h ++++ b/include/parted/fdasd.h +@@ -194,6 +194,8 @@ typedef struct fdasd_anchor { + volume_label_t *vlabel; + config_data_t confdata[USABLE_PARTITIONS]; + struct fdasd_hd_geometry geo; ++ unsigned int label_block; ++ unsigned int FBA_layout; + } fdasd_anchor_t; + + enum offset {lower, upper}; +--- a/libparted/labels/dasd.c ++++ b/libparted/labels/dasd.c +@@ -71,6 +71,7 @@ typedef struct { + + typedef struct { + unsigned int format_type; ++ unsigned int label_block; + volume_label_t vlabel; + } DasdDiskSpecific; + +@@ -151,6 +152,7 @@ dasd_alloc (const PedDevice* dev) + + /* CDL format, newer */ + disk_specific->format_type = 2; ++ disk_specific->label_block = 2; + + /* Setup volume label (for fresh disks) */ + snprintf(volser, sizeof(volser), "0X%04X", arch_specific->devno); +@@ -226,7 +228,9 @@ dasd_probe (const PedDevice *dev) + + fdasd_check_api_version(&anchor, arch_specific->fd); + +- if (fdasd_check_volume(&anchor, arch_specific->fd)) ++ /* Labels are required on CDL formatted DASDs. */ ++ if (fdasd_check_volume(&anchor, arch_specific->fd) && ++ anchor.FBA_layout == 0) + goto error_cleanup; + + fdasd_cleanup(&anchor); +@@ -273,17 +277,53 @@ dasd_read (PedDisk* disk) + fdasd_initialize_anchor(&anchor); + + fdasd_get_geometry(disk->dev, &anchor, arch_specific->fd); ++ disk_specific->label_block = anchor.label_block; ++ ++ if ((anchor.geo.cylinders * anchor.geo.heads) > BIG_DISK_SIZE) ++ anchor.big_disk++; + + /* check dasd for labels and vtoc */ +- if (fdasd_check_volume(&anchor, arch_specific->fd)) +- goto error_close_dev; ++ if (fdasd_check_volume(&anchor, arch_specific->fd)) { ++ DasdPartitionData* dasd_data; ++ ++ /* Kernel partitioning code will report 'implicit' partitions ++ * for non-CDL format DASDs even when there is no ++ * label/VTOC. */ ++ if (anchor.FBA_layout == 0) ++ goto error_close_dev; ++ ++ disk_specific->format_type = 1; ++ ++ /* Register implicit partition */ ++ ped_disk_delete_all (disk); ++ ++ start = (PedSector) arch_specific->real_sector_size / ++ (PedSector) disk->dev->sector_size * ++ (PedSector) (anchor.label_block + 1); ++ end = disk->dev->length - 1; ++ part = ped_partition_new (disk, PED_PARTITION_NORMAL, NULL, ++ start, end); ++ if (!part) ++ goto error_close_dev; ++ ++ part->num = 1; ++ part->fs_type = ped_file_system_probe (&part->geom); ++ dasd_data = part->disk_specific; ++ dasd_data->raid = 0; ++ dasd_data->lvm = 0; ++ dasd_data->type = 0; ++ ++ if (!ped_disk_add_partition (disk, part, NULL)) ++ goto error_close_dev; ++ ++ fdasd_cleanup(&anchor); ++ ++ return 1; ++ } + + /* Save volume label (read by fdasd_check_volume) for writing */ + memcpy(&disk_specific->vlabel, anchor.vlabel, sizeof(volume_label_t)); + +- if ((anchor.geo.cylinders * anchor.geo.heads) > BIG_DISK_SIZE) +- anchor.big_disk++; +- + ped_disk_delete_all (disk); + + bool is_ldl = strncmp(anchor.vlabel->volkey, +@@ -348,7 +388,7 @@ dasd_read (PedDisk* disk) + / (long long) disk->dev->sector_size + * (long long) (cms_ptr->block_count - 1) - 1; + +- part = ped_partition_new (disk, PED_PARTITION_PROTECTED, NULL, start, end); ++ part = ped_partition_new (disk, PED_PARTITION_NORMAL, NULL, start, end); + if (!part) + goto error_close_dev; + +@@ -923,7 +963,12 @@ dasd_alloc_metadata (PedDisk* disk) + the start of the first partition */ + if (disk_specific->format_type == 1) { + part = ped_disk_get_partition(disk, 1); +- vtoc_end = part->geom.start - 1; ++ if (part) ++ vtoc_end = part->geom.start - 1; ++ else ++ vtoc_end = (PedSector) arch_specific->real_sector_size / ++ (PedSector) disk->dev->sector_size * ++ (PedSector) disk_specific->label_block; + } + else { + if (disk->dev->type == PED_DEVICE_FILE) +@@ -943,7 +988,7 @@ dasd_alloc_metadata (PedDisk* disk) + goto error; + } + +- if (disk_specific->format_type == 1) { ++ if (disk_specific->format_type == 1 && part) { + /* + For LDL or CMS there may be trailing metadata as well. + For example: the last block of a CMS reserved file, +--- a/libparted/labels/fdasd.c ++++ b/libparted/labels/fdasd.c +@@ -721,6 +721,7 @@ fdasd_check_volume (fdasd_anchor_t *anc, + unsigned long b = -1; + char str[LINE_LENGTH]; + ++ memset(v, 0, sizeof(volume_label_t)); + vtoc_read_volume_label (fd, anc->label_pos, v); + + if (strncmp(v->vollbl, vtoc_ebcdic_enc ("VOL1", str, 4), 4) == 0) { +@@ -800,6 +801,8 @@ fdasd_get_geometry (const PedDevice *dev + dasd_info.dev_type = 13200; + dasd_info.label_block = 2; + dasd_info.devno = 513; ++ dasd_info.label_block = 2; ++ dasd_info.FBA_layout = 0; + } else { + if (ioctl(f, HDIO_GETGEO, &anc->geo) != 0) + fdasd_error(anc, unable_to_ioctl, +@@ -820,6 +823,8 @@ fdasd_get_geometry (const PedDevice *dev + anc->label_pos = dasd_info.label_block * blksize; + anc->devno = dasd_info.devno; + anc->fspace_trk = anc->geo.cylinders * anc->geo.heads - FIRST_USABLE_TRK; ++ anc->label_block = dasd_info.label_block; ++ anc->FBA_layout = dasd_info.FBA_layout; + } + + /* diff --git a/SOURCES/parted-3.1-libparted-check-PMBR-before-GPT-partition-table-8052.patch b/SOURCES/parted-3.1-libparted-check-PMBR-before-GPT-partition-table-8052.patch new file mode 100644 index 0000000..11687b3 --- /dev/null +++ b/SOURCES/parted-3.1-libparted-check-PMBR-before-GPT-partition-table-8052.patch @@ -0,0 +1,91 @@ +From 9343e79fee796a142a4bd12674aa3fdb56526eb6 Mon Sep 17 00:00:00 2001 +From: "Brian C. Lane" +Date: Tue, 20 Mar 2012 16:08:25 -0700 +Subject: [PATCH 1/2] libparted: check PMBR before GPT partition table + (#805272) + +The UEFI spec requires that a valid GPT disk label have a PMBR +partition. This moves the PMBR check to before the GPT check, +exiting gpt_probe with a 0 if the PMBR is not valid. + +The previous behavior would cause problems in the following situation: + 1. format a disk as GPT + 2. re-format it as MSDOS using tools that don't understand GPT + +Subsequent operations with parted would then complain about the invlid +PMBR, but would not allow the disk to be used as a msdos disk. This +change causes parted to tread the disk as a msdos disk. + +* libparted/labels/gpt.c (gpt_probe): Move _pmbr_is_valid test +--- + libparted/labels/gpt.c | 44 +++++++++++++------------------------------- + 1 files changed, 13 insertions(+), 31 deletions(-) + +diff --git a/libparted/labels/gpt.c b/libparted/labels/gpt.c +index 84bdc12..e57b3a2 100644 +--- a/libparted/labels/gpt.c ++++ b/libparted/labels/gpt.c +@@ -465,6 +465,17 @@ gpt_probe (const PedDevice *dev) + if (dev->length <= 1) + return 0; + ++ void *label; ++ if (!ptt_read_sector (dev, 0, &label)) ++ return 0; ++ ++ if (!_pmbr_is_valid ((const LegacyMBR_t *) label)) ++ { ++ free (label); ++ return 0; ++ } ++ free (label); ++ + void *pth_raw = ped_malloc (pth_get_size (dev)); + if (ped_device_read (dev, pth_raw, 1, GPT_HEADER_SECTORS) + || ped_device_read (dev, pth_raw, dev->length - 1, GPT_HEADER_SECTORS)) +@@ -472,40 +483,11 @@ gpt_probe (const PedDevice *dev) + gpt = pth_new_from_raw (dev, pth_raw); + if (gpt->Signature == PED_CPU_TO_LE64 (GPT_HEADER_SIGNATURE)) + gpt_sig_found = 1; ++ pth_free (gpt); + } +- + free (pth_raw); + +- pth_free (gpt); +- +- if (!gpt_sig_found) +- return 0; +- +- void *label; +- if (!ptt_read_sector (dev, 0, &label)) +- return 0; +- +- int ok = 1; +- if (!_pmbr_is_valid ((const LegacyMBR_t *) label)) +- { +- int ex_status = ped_exception_throw +- (PED_EXCEPTION_WARNING, +- PED_EXCEPTION_YES_NO, +- _("%s contains GPT signatures, indicating that it has " +- "a GPT table. However, it does not have a valid " +- "fake msdos partition table, as it should. Perhaps " +- "it was corrupted -- possibly by a program that " +- "doesn't understand GPT partition tables. Or " +- "perhaps you deleted the GPT table, and are now " +- "using an msdos partition table. Is this a GPT " +- "partition table?"), +- dev->path); +- if (ex_status == PED_EXCEPTION_NO) +- ok = 0; +- } +- +- free (label); +- return ok; ++ return gpt_sig_found; + } + + static PedDisk * +-- +1.7.7.6 + diff --git a/SOURCES/parted-3.1-libparted-don-t-canonicalize-dev-md-paths.patch b/SOURCES/parted-3.1-libparted-don-t-canonicalize-dev-md-paths.patch new file mode 100644 index 0000000..2390881 --- /dev/null +++ b/SOURCES/parted-3.1-libparted-don-t-canonicalize-dev-md-paths.patch @@ -0,0 +1,37 @@ +From c17f0c2e68960969789427eca20ddab1b8e4fcc6 Mon Sep 17 00:00:00 2001 +From: "Brian C. Lane" +Date: Thu, 1 Nov 2012 16:22:42 -0700 +Subject: [PATCH] libparted: don't canonicalize /dev/md/ paths (#872361) + +This is the same issue we have with /dev/mapper/ paths that was fixed in +commit c1eb485b9fd8919e18f192d678bc52b0488e6ee0. When libparted +is used to setup the device the symlink should be used to reference it, +not the backing device name which could change. + +* libparted/device.c (ped_device_get): Don't canonicalize names + that start with "/dev/md/". +--- + libparted/device.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/libparted/device.c b/libparted/device.c +index 738b320..cdcc117 100644 +--- a/libparted/device.c ++++ b/libparted/device.c +@@ -152,8 +152,11 @@ ped_device_get (const char* path) + char* normal_path = NULL; + + PED_ASSERT (path != NULL); +- /* Don't canonicalize /dev/mapper paths, see tests/symlink.c */ +- if (strncmp (path, "/dev/mapper/", 12)) ++ /* Don't canonicalize /dev/mapper or /dev/md/ paths, see ++ tests/symlink.c ++ */ ++ if (strncmp (path, "/dev/mapper/", 12) && ++ strncmp (path, "/dev/md/", 8)) + normal_path = canonicalize_file_name (path); + if (!normal_path) + /* Well, maybe it is just that the file does not exist. +-- +1.7.11.7 + diff --git a/SOURCES/parted-3.1-libparted-mklabel-eav.patch b/SOURCES/parted-3.1-libparted-mklabel-eav.patch new file mode 100644 index 0000000..a8bc228 --- /dev/null +++ b/SOURCES/parted-3.1-libparted-mklabel-eav.patch @@ -0,0 +1,151 @@ +Subject: [PATCH] libparted: mklabel to support EAV DASD + +From: Nageswara R Sastry + +Extended Address Volume (EAV) DASDs are ECKD DASDs with more than +65520 cylinders. This patch adds support for mklabel to properly +handle unformatted EAV DASDs. + +Signed-off-by: Nageswara R Sastry +--- + include/parted/fdasd.h | 1 + libparted/labels/fdasd.c | 92 +++++++++++++++++++++++++++++++++++++++++++++- + 2 files changed, 90 insertions(+), 3 deletions(-) + +--- a/include/parted/fdasd.h ++++ b/include/parted/fdasd.h +@@ -288,7 +288,6 @@ void fdasd_get_geometry (const PedDevice + void fdasd_check_api_version (fdasd_anchor_t *anc, int fd); + int fdasd_check_volume (fdasd_anchor_t *anc, int fd); + int fdasd_write_labels (fdasd_anchor_t *anc, int fd); +-int fdasd_invalid_vtoc_pointer(fdasd_anchor_t *anc); + void fdasd_recreate_vtoc(fdasd_anchor_t *anc); + partition_info_t * fdasd_add_partition (fdasd_anchor_t *anc, + unsigned int start, unsigned int stop); +--- a/libparted/labels/fdasd.c ++++ b/libparted/labels/fdasd.c +@@ -581,6 +581,22 @@ fdasd_recreate_vtoc (fdasd_anchor_t *anc + anc->vtoc_changed++; + } + ++ /* ++ * initialize the VOL1 volume label ++ */ ++static void ++fdasd_init_volume_label(fdasd_anchor_t *anc, int fd) ++{ ++ volume_label_t *vlabel = anc->vlabel; ++ ++ vtoc_volume_label_init(vlabel); ++ vtoc_volume_label_set_key(vlabel, "VOL1"); ++ vtoc_volume_label_set_label(vlabel, "VOL1"); ++ ++ vtoc_set_cchhb(&vlabel->vtoc, VTOC_START_CC, VTOC_START_HH, 0x01); ++} ++ ++ + /* + * sets some important partition data + * (like used, start_trk, end_trk, len_trk) +@@ -769,6 +785,52 @@ fdasd_process_valid_vtoc (fdasd_anchor_t + fdasd_update_partition_info (anc); + } + ++static void ++fdasd_invalid_vtoc_pointer(fdasd_anchor_t *anc) ++{ ++ PDEBUG ++ anc->formatted_cylinders = anc->hw_cylinders; ++ anc->fspace_trk = anc->formatted_cylinders * anc->geo.heads ++ - FIRST_USABLE_TRK; ++ vtoc_init_format4_label(anc->f4, USABLE_PARTITIONS, ++ anc->geo.cylinders, anc->formatted_cylinders, ++ anc->geo.heads, anc->geo.sectors, ++ anc->blksize, anc->dev_type); ++ ++ vtoc_init_format5_label(anc->f5); ++ vtoc_init_format7_label(anc->f7); ++ ++ vtoc_set_freespace(anc->f4, anc->f5, anc->f7, '+', anc->verbose, ++ FIRST_USABLE_TRK, ++ anc->formatted_cylinders * anc->geo.heads - 1, ++ anc->formatted_cylinders, anc->geo.heads); ++ ++ vtoc_set_cchhb(&anc->vlabel->vtoc, VTOC_START_CC, VTOC_START_HH, 0x01); ++} ++ ++/* ++ * we have a invalid FMT4 DSCB and therefore we will re-create the VTOC ++ */ ++static void ++fdasd_process_invalid_vtoc(fdasd_anchor_t *anc) ++{ ++ anc->formatted_cylinders = anc->hw_cylinders; ++ anc->fspace_trk = anc->formatted_cylinders * anc->geo.heads ++ - FIRST_USABLE_TRK; ++ vtoc_init_format4_label(anc->f4, USABLE_PARTITIONS, ++ anc->geo.cylinders, anc->formatted_cylinders, ++ anc->geo.heads, anc->geo.sectors, ++ anc->blksize, anc->dev_type); ++ ++ vtoc_init_format5_label(anc->f5); ++ vtoc_init_format7_label(anc->f7); ++ vtoc_set_freespace(anc->f4, anc->f5, anc->f7, '+', anc->verbose, ++ FIRST_USABLE_TRK, ++ anc->formatted_cylinders * anc->geo.heads - 1, ++ anc->formatted_cylinders, anc->geo.heads); ++} ++ ++ + static int + fdasd_valid_vtoc_pointer(fdasd_anchor_t *anc, unsigned long b, int fd) + { +@@ -781,6 +843,8 @@ fdasd_valid_vtoc_pointer(fdasd_anchor_t + if (anc->f4->DS4IDFMT == 0xf4) { + fdasd_process_valid_vtoc (anc, b, fd); + return 0; ++ } else { ++ fdasd_process_invalid_vtoc(anc); + } + if (strncmp(anc->vlabel->volkey, vtoc_ebcdic_enc("LNX1",str,4),4) == 0 || + strncmp(anc->vlabel->volkey, vtoc_ebcdic_enc("CMS1",str,4),4) == 0) +@@ -817,13 +881,37 @@ fdasd_check_volume (fdasd_anchor_t *anc, + else + return 0; + } else { +- return 1; ++ fdasd_invalid_vtoc_pointer(anc); + } + } else if (strncmp (v->volkey, vtoc_ebcdic_enc ("LNX1", str, 4), 4) == 0 || + strncmp (v->volkey, vtoc_ebcdic_enc ("CMS1", str, 4), 4) == 0) { + return 0; ++ } else if (anc->FBA_layout == 1) { ++ /* Some times LDL formatted disks does not ++ contain any volume label */ ++ return 1; ++ } else { ++ /* didn't find VOL1 volume label */ ++ anc->formatted_cylinders = anc->hw_cylinders; ++ anc->fspace_trk = anc->formatted_cylinders * anc->geo.heads ++ - FIRST_USABLE_TRK; ++ ++ fdasd_init_volume_label(anc, fd); ++ ++ vtoc_init_format4_label(anc->f4, USABLE_PARTITIONS, ++ anc->geo.cylinders, anc->formatted_cylinders, ++ anc->geo.heads, anc->geo.sectors, ++ anc->blksize, anc->dev_type); ++ ++ vtoc_init_format5_label(anc->f5); ++ vtoc_init_format7_label(anc->f7); ++ ++ vtoc_set_freespace(anc->f4, anc->f5, anc->f7, '+', ++ anc->verbose, FIRST_USABLE_TRK, ++ anc->formatted_cylinders * anc->geo.heads - 1, ++ anc->formatted_cylinders, anc->geo.heads); ++ return 0; + } +- + return 1; + } + diff --git a/SOURCES/parted-3.1-libparted-mklabel-edev.patch b/SOURCES/parted-3.1-libparted-mklabel-edev.patch new file mode 100644 index 0000000..c2f869c --- /dev/null +++ b/SOURCES/parted-3.1-libparted-mklabel-edev.patch @@ -0,0 +1,48 @@ +Subject: [PATCH] libparted: mklabel to support EDEV DASD + +From: Nageswara R Sastry + +Fixed Block Access (FBA) DASDs are mainframe-specific disk devices +which are layed out as a sequence of 512-byte sectors. This patch adds +support for mklabel to properly handle FBA devices. + +Signed-off-by: Nageswara R Sastry +--- + libparted/labels/fdasd.c | 24 +++++++++++++----------- + 1 file changed, 13 insertions(+), 11 deletions(-) + +--- a/libparted/labels/fdasd.c ++++ b/libparted/labels/fdasd.c +@@ -869,19 +869,21 @@ fdasd_check_volume (fdasd_anchor_t *anc, + vtoc_read_volume_label (fd, anc->label_pos, v); + + if (strncmp(v->vollbl, vtoc_ebcdic_enc ("VOL1", str, 4), 4) == 0) { +- /* found VOL1 volume label */ +- b = (cchhb2blk (&v->vtoc, &anc->geo) - 1) * anc->blksize; ++ if (anc->FBA_layout != 1 ) { ++ /* found VOL1 volume label */ ++ b = (cchhb2blk (&v->vtoc, &anc->geo) - 1) * anc->blksize; + +- if (b > 0) { +- int rc; +- rc = fdasd_valid_vtoc_pointer (anc, b, fd); ++ if (b > 0) { ++ int rc; ++ rc = fdasd_valid_vtoc_pointer (anc, b, fd); + +- if (rc < 0) +- return 1; +- else +- return 0; +- } else { +- fdasd_invalid_vtoc_pointer(anc); ++ if (rc < 0) ++ return 1; ++ else ++ return 0; ++ } else { ++ fdasd_invalid_vtoc_pointer(anc); ++ } + } + } else if (strncmp (v->volkey, vtoc_ebcdic_enc ("LNX1", str, 4), 4) == 0 || + strncmp (v->volkey, vtoc_ebcdic_enc ("CMS1", str, 4), 4) == 0) { diff --git a/SOURCES/parted-3.1-libparted-preserve-the-uuid-on-dm-partitions.patch b/SOURCES/parted-3.1-libparted-preserve-the-uuid-on-dm-partitions.patch new file mode 100644 index 0000000..d33a272 --- /dev/null +++ b/SOURCES/parted-3.1-libparted-preserve-the-uuid-on-dm-partitions.patch @@ -0,0 +1,71 @@ +From e2b9f9051c8d9905b15af0f7fa79c85502370b25 Mon Sep 17 00:00:00 2001 +From: Brian C. Lane +Date: Fri, 3 Aug 2012 17:03:50 -0700 +Subject: [PATCH] libparted: preserve the uuid on dm partitions (#832145) + +* libparted/arch/linux.c (_dm_add_partition): Set the uuid if there was + one. +--- + libparted/arch/linux.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c +index 37ddb5f..2c410a0 100644 +--- a/libparted/arch/linux.c ++++ b/libparted/arch/linux.c +@@ -2803,6 +2803,8 @@ _dm_add_partition (PedDisk* disk, PedPartition* part) + { + char* vol_name = NULL; + const char* dev_name = NULL; ++ char* vol_uuid = NULL; ++ const char* dev_uuid = NULL; + char* params = NULL; + LinuxSpecific* arch_specific = LINUX_SPECIFIC (disk->dev); + uint32_t cookie = 0; +@@ -2820,6 +2822,7 @@ _dm_add_partition (PedDisk* disk, PedPartition* part) + goto err; + + dev_name = dm_task_get_name (task); ++ dev_uuid = dm_task_get_uuid (task); + + if (isdigit (dev_name[strlen (dev_name) - 1])) { + if ( ! (vol_name = zasprintf ("%sp%d", dev_name, part->num))) +@@ -2827,6 +2830,10 @@ _dm_add_partition (PedDisk* disk, PedPartition* part) + } else if ( ! (vol_name = zasprintf ("%s%d", dev_name, part->num))) + goto err; + ++ if ( dev_uuid && (strlen(dev_uuid) > 0) \ ++ && ! (vol_uuid = zasprintf ("part%d-%s", part->num, dev_uuid))) ++ goto err; ++ + /* Caution: dm_task_destroy frees dev_name. */ + dm_task_destroy (task); + task = NULL; +@@ -2840,6 +2847,8 @@ _dm_add_partition (PedDisk* disk, PedPartition* part) + goto err; + + dm_task_set_name (task, vol_name); ++ if (vol_uuid) ++ dm_task_set_uuid (task, vol_uuid); + dm_task_add_target (task, 0, part->geom.length, + "linear", params); + if (!dm_task_set_cookie(task, &cookie, 0)) +@@ -2850,6 +2859,7 @@ _dm_add_partition (PedDisk* disk, PedPartition* part) + dm_task_update_nodes(); + dm_task_destroy(task); + free(params); ++ free(vol_uuid); + free(vol_name); + return 1; + } else { +@@ -2861,6 +2871,7 @@ err: + if (task) + dm_task_destroy (task); + free (params); ++ free (vol_uuid); + free (vol_name); + return 0; + } +-- +1.7.11.4 + diff --git a/SOURCES/parted-3.1-libparted-reallocate-buf-after-_disk_analyse_block_s.patch b/SOURCES/parted-3.1-libparted-reallocate-buf-after-_disk_analyse_block_s.patch new file mode 100644 index 0000000..48f66bc --- /dev/null +++ b/SOURCES/parted-3.1-libparted-reallocate-buf-after-_disk_analyse_block_s.patch @@ -0,0 +1,36 @@ +From 4ee2a7d03f6720c5f97eef93c4df4b9c52e79b5e Mon Sep 17 00:00:00 2001 +From: Brian C. Lane +Date: Tue, 4 Sep 2012 15:56:47 -0700 +Subject: [PATCH] libparted: reallocate buf after _disk_analyse_block_size + call + +The call to _disk_analyse_block_size may change the +disk->dev->sector_size, if this happens buf may be too small for +subsequent reads. + +libparted/labels/mac.c (mac_read): reallocate buf +--- + libparted/labels/mac.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/libparted/labels/mac.c b/libparted/labels/mac.c +index 1f59a1a..5fa8283 100644 +--- a/libparted/labels/mac.c ++++ b/libparted/labels/mac.c +@@ -759,6 +759,13 @@ mac_read (PedDisk* disk) + mac_disk_data->block_size = raw_disk->block_size; + } + ++ /* re-allocate buf in case _disk_analyse_block_size changed ++ * the sector_size */ ++ free (buf); ++ buf = ped_malloc (disk->dev->sector_size); ++ if (!buf) ++ goto error; ++ + for (num=1; num==1 || num <= last_part_entry_num; num++) { + void *raw_part = buf; + if (!ped_device_read (disk->dev, raw_part, +-- +1.7.11.4 + diff --git a/SOURCES/parted-3.1-libparted-use-largest_partnum-in-dm_reread_part_tabl.patch b/SOURCES/parted-3.1-libparted-use-largest_partnum-in-dm_reread_part_tabl.patch new file mode 100644 index 0000000..2302751 --- /dev/null +++ b/SOURCES/parted-3.1-libparted-use-largest_partnum-in-dm_reread_part_tabl.patch @@ -0,0 +1,41 @@ +From 26fbffe8389e732be29225bd649adfdd5588b131 Mon Sep 17 00:00:00 2001 +From: "Brian C. Lane" +Date: Wed, 21 Mar 2012 15:34:20 -0700 +Subject: [PATCH] libparted: use largest_partnum in dm_reread_part_table + (#803108) + +DM devices can have more than 16 partitions, notify the kernel about +all of them. + +Resolves: rhbz#803108 + +* libparted/arch/linux.c (dm_reread_part_table): Use largest_partnum + +fixup +--- + libparted/arch/linux.c | 3 +-- + 1 files changed, 1 insertions(+), 2 deletions(-) + +diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c +index 7dd664e..ed14f50 100644 +--- a/libparted/arch/linux.c ++++ b/libparted/arch/linux.c +@@ -2516,14 +2516,13 @@ _dm_reread_part_table (PedDisk* disk) + return 1; + + int rc = 1; +- int last = PED_MIN (largest_partnum, 16); + int i; + + sync(); + if (!_dm_remove_parts(disk->dev)) + rc = 0; + +- for (i = 1; i <= last; i++) { ++ for (i = 1; i <= largest_partnum; i++) { + PedPartition* part; + + part = ped_disk_get_partition (disk, i); +-- +1.7.7.6 + diff --git a/SOURCES/parted-3.1-test-creating-20-device-mapper-partitions.patch b/SOURCES/parted-3.1-test-creating-20-device-mapper-partitions.patch new file mode 100644 index 0000000..8a860e7 --- /dev/null +++ b/SOURCES/parted-3.1-test-creating-20-device-mapper-partitions.patch @@ -0,0 +1,94 @@ +From 166491bd870df6877e04831c9da593e2f8e77ca8 Mon Sep 17 00:00:00 2001 +From: "Brian C. Lane" +Date: Thu, 19 Apr 2012 17:11:09 -0700 +Subject: [PATCH] tests: test creating 20 device-mapper partitions (#803108) + +* tests/t6002-dm-many-partitions.sh: Make sure > 17 partitions appear in + device mapper. +--- + tests/Makefile.am | 1 + + tests/t6002-dm-many-partitions.sh | 60 +++++++++++++++++++++++++++++++++++++ + 2 files changed, 61 insertions(+), 0 deletions(-) + create mode 100755 tests/t6002-dm-many-partitions.sh + +diff --git a/tests/Makefile.am b/tests/Makefile.am +index 1b37fd9..57771be 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -55,6 +55,7 @@ TESTS = \ + t5000-tags.sh \ + t6000-dm.sh \ + t6001-psep.sh \ ++ t6002-dm-many-partitions.sh \ + t6100-mdraid-partitions.sh \ + t7000-scripting.sh \ + t8000-loop.sh \ +diff --git a/tests/t6002-dm-many-partitions.sh b/tests/t6002-dm-many-partitions.sh +new file mode 100755 +index 0000000..4d08e72 +--- /dev/null ++++ b/tests/t6002-dm-many-partitions.sh +@@ -0,0 +1,60 @@ ++#!/bin/sh ++# device-mapper: create many partitions ++# This would not create partitions > 16 when using device-mapper ++ ++# Copyright (C) 2012 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3 of the License, or ++# (at your option) any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++ ++. "${srcdir=.}/init.sh"; path_prepend_ ../parted ++ ++require_root_ ++(dmsetup --help) > /dev/null 2>&1 || skip_test_ "No dmsetup installed" ++ ++ss=$sector_size_ ++ns=300 ++n_partitions=20 ++start_sector=34 ++loop_file=loop-file-$$ ++dm_name=dm-test-$$ ++ ++cleanup_() { ++ dmsetup remove $dm_name ++ test -n "$dev" && losetup -d "$dev" ++ rm -f $loop_file; ++} ++ ++# create a file large enough to hold a GPT partition table ++dd if=/dev/null of=$loop_file bs=$ss seek=$ns || framework_failure ++dev=$(losetup --show -f $loop_file) || framework_failure ++dmsetup create $dm_name --table "0 $ns linear $dev 0" || framework_failure ++ ++cmd= ++for ((i=1; i<=$n_partitions; i+=1)); do ++ s=$((start_sector + i - 1)) ++ cmd="$cmd mkpart p$i ${s}s ${s}s" ++done ++parted -m -a min -s /dev/mapper/$dm_name mklabel gpt $cmd > /dev/null 2>&1 || fail=1 ++ ++# Make sure all the partitions appeared under /dev/mapper/ ++for ((i=1; i<=$n_partitions; i+=1)); do ++ if [ ! -e "/dev/mapper/${dm_name}p$i" ]; then ++ fail=1 ++ break ++ fi ++ # remove the partitions as we go, otherwise cleanup won't work. ++ dmsetup remove /dev/mapper/${dm_name}p$i ++done ++ ++Exit $fail +-- +1.7.7.6 + diff --git a/SOURCES/parted-3.1-tests-Add-btrfs-and-xfs-to-the-fs-probe-test.patch b/SOURCES/parted-3.1-tests-Add-btrfs-and-xfs-to-the-fs-probe-test.patch new file mode 100644 index 0000000..7aa5449 --- /dev/null +++ b/SOURCES/parted-3.1-tests-Add-btrfs-and-xfs-to-the-fs-probe-test.patch @@ -0,0 +1,26 @@ +From 17027da1eda39d20b2d6dca0a59ac4afc5409318 Mon Sep 17 00:00:00 2001 +From: "Brian C. Lane" +Date: Wed, 28 Aug 2013 08:47:26 -0700 +Subject: [PATCH 69/69] tests: Add btrfs and xfs to the fs probe test + +* tests/tests/t1700-probe-fs.sh: Add btrfs and xfs +--- + tests/t1700-probe-fs.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/t1700-probe-fs.sh b/tests/t1700-probe-fs.sh +index 7ce53d0..0418e73 100755 +--- a/tests/t1700-probe-fs.sh ++++ b/tests/t1700-probe-fs.sh +@@ -22,7 +22,7 @@ require_512_byte_sector_size_ + dev=loop-file + ss=$sector_size_ + +-for type in ext2 ext3 ext4 nilfs2; do ++for type in ext2 ext3 ext4 btrfs xfs nilfs2; do + + ( mkfs.$type -V ) >/dev/null 2>&1 \ + || { warn_ "$ME: no $type support"; continue; } +-- +1.8.3.1 + diff --git a/SOURCES/parted-3.1-tests-Make-sure-dm-UUIDs-are-not-erased.patch b/SOURCES/parted-3.1-tests-Make-sure-dm-UUIDs-are-not-erased.patch new file mode 100644 index 0000000..c24bfaf --- /dev/null +++ b/SOURCES/parted-3.1-tests-Make-sure-dm-UUIDs-are-not-erased.patch @@ -0,0 +1,92 @@ +From cc96f793bb4fb088123a40fb9d802e7db1fdbffb Mon Sep 17 00:00:00 2001 +From: Brian C. Lane +Date: Tue, 7 Aug 2012 10:14:03 -0700 +Subject: [PATCH] tests: Make sure dm UUIDs are not erased + +* tests/t6003-dm-uuid.sh: Make sure dm UUIDs are not erased +--- + tests/Makefile.am | 1 + + tests/t6003-dm-uuid.sh | 59 ++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 60 insertions(+), 0 deletions(-) + create mode 100755 tests/t6003-dm-uuid.sh + +diff --git a/tests/Makefile.am b/tests/Makefile.am +index 57771be..98310f2 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -56,6 +56,7 @@ TESTS = \ + t6000-dm.sh \ + t6001-psep.sh \ + t6002-dm-many-partitions.sh \ ++ t6003-dm-uuid.sh \ + t6100-mdraid-partitions.sh \ + t7000-scripting.sh \ + t8000-loop.sh \ +diff --git a/tests/t6003-dm-uuid.sh b/tests/t6003-dm-uuid.sh +new file mode 100755 +index 0000000..1751cb4 +--- /dev/null ++++ b/tests/t6003-dm-uuid.sh +@@ -0,0 +1,59 @@ ++#!/bin/sh ++# device-mapper: preserve uuid ++# The dm's partitions uuid would be removed when creating new partitions ++ ++# Copyright (C) 2012 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3 of the License, or ++# (at your option) any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++ ++. "${srcdir=.}/init.sh"; path_prepend_ ../parted ++ ++require_root_ ++(dmsetup --help) > /dev/null 2>&1 || skip_test_ "No dmsetup installed" ++ ++ss=$sector_size_ ++ns=300 ++n_partitions=3 ++start_sector=34 ++loop_file=loop-file-$$ ++dm_name=dm-test-$$ ++ ++cleanup_() { ++ dmsetup remove $dm_name ++ test -n "$dev" && losetup -d "$dev" ++ rm -f $loop_file; ++} ++ ++# create a file large enough to hold a GPT partition table ++dd if=/dev/null of=$loop_file bs=$ss seek=$ns || framework_failure ++dev=$(losetup --show -f $loop_file) || framework_failure ++dmsetup create $dm_name --table "0 $ns linear $dev 0" || framework_failure ++dmsetup rename $dm_name --setuuid f139317b-f98a-45d7-ab3b-9b4e0a336872 || framework_failure ++ ++cmd= ++for ((i=1; i<=$n_partitions; i+=1)); do ++ s=$((start_sector + i - 1)) ++ cmd="$cmd mkpart p$i ${s}s ${s}s" ++done ++parted -m -a min -s /dev/mapper/$dm_name mklabel gpt $cmd > /dev/null 2>&1 || fail=1 ++ ++# Make sure all the partitions have UUIDs ++for ((i=1; i<=$n_partitions; i+=1)); do ++ dmsetup info /dev/mapper/${dm_name}p$i | grep UUID || fail=1 ++ ++ # remove the partitions as we go, otherwise cleanup won't work. ++ dmsetup remove /dev/mapper/${dm_name}p$i ++done ++ ++Exit $fail +-- +1.7.7.6 + diff --git a/SOURCES/parted-3.1-tests-add-t0301-overwrite-gpt-pmbr.sh.patch b/SOURCES/parted-3.1-tests-add-t0301-overwrite-gpt-pmbr.sh.patch new file mode 100644 index 0000000..99b6602 --- /dev/null +++ b/SOURCES/parted-3.1-tests-add-t0301-overwrite-gpt-pmbr.sh.patch @@ -0,0 +1,34 @@ +From 98f1556d8a134f54d62ebdac27e9d16aa7884983 Mon Sep 17 00:00:00 2001 +From: "Brian C. Lane" +Date: Tue, 20 Mar 2012 17:17:10 -0700 +Subject: [PATCH 2/2] tests: add t0301-overwrite-gpt-pmbr.sh + +Make sure parted checks the PMBR before the GPT partition table. + +* NEWS: Update with new GPT behavior +* tests/Makefile.am: Add new test +* tests/overwrite-gpt-pmbr.sh: new test +--- + NEWS | 7 +++++++ + 1 files changed, 7 insertions(+), 0 deletions(-) + +diff --git a/NEWS b/NEWS +index fe0fcdd..b0a0657 100644 +--- a/NEWS ++++ b/NEWS +@@ -1,5 +1,12 @@ + GNU parted NEWS -*- outline -*- + ++* Noteworthy changes in release 3.1-2 (2012-03-21) [Fedora] ++ ++** Bug Fixes ++ ++ libparted: Treat disks without a PMBR as msdos labeled disks ++ even if they have GPT partition tables. ++ + * Noteworthy changes in release 3.1 (2012-03-02) [stable] + + ** New features +-- +1.7.7.6 + diff --git a/SOURCES/parted-3.1-tests-cleanup-losetup-usage.patch b/SOURCES/parted-3.1-tests-cleanup-losetup-usage.patch new file mode 100644 index 0000000..06f13c8 --- /dev/null +++ b/SOURCES/parted-3.1-tests-cleanup-losetup-usage.patch @@ -0,0 +1,137 @@ +From a1aa9eb26f357bb1a5111eb332594dfb7b39ace0 Mon Sep 17 00:00:00 2001 +From: "Brian C. Lane" +Date: Mon, 15 Oct 2012 17:27:18 -0700 +Subject: [PATCH 1/2] tests: cleanup losetup usage + +The unsafe_losetup_ function was failing because losetup didn't +recognize that the 'private' /dev/loopX devices were the same as +/dev/loopX, it would fail even if one was in use. Switch to using +losetup --show which is a cleaner solution. +Also use sparse file for loop_setup to save space. +--- + tests/lvm-utils.sh | 24 ++---------------------- + tests/t-lvm.sh | 24 ++---------------------- + tests/t6001-psep.sh | 8 ++------ + tests/t6003-dm-uuid.sh | 3 +-- + 4 files changed, 7 insertions(+), 52 deletions(-) + +diff --git a/tests/lvm-utils.sh b/tests/lvm-utils.sh +index 456d265..a204b08 100644 +--- a/tests/lvm-utils.sh ++++ b/tests/lvm-utils.sh +@@ -16,34 +16,14 @@ export LVM_SUPPRESS_FD_WARNINGS=1 + ME=$(basename "$0") + warn() { echo >&2 "$ME: $@"; } + +-unsafe_losetup_() +-{ +- f=$1 +- +- test -n "$G_dev_" \ +- || fail_ "Internal error: unsafe_losetup_ called before init_root_dir_" +- +- # Iterate through $G_dev_/loop{,/}{0,1,2,3,4,5,6,7,8,9} +- for slash in '' /; do +- for i in 0 1 2 3 4 5 6 7 8 9; do +- dev=$G_dev_/loop$slash$i +- losetup $dev > /dev/null 2>&1 && continue; +- losetup "$dev" "$f" > /dev/null && { echo "$dev"; return 0; } +- break +- done +- done +- +- return 1 +-} +- + loop_setup_() + { + file=$1 +- dd if=/dev/zero of="$file" bs=1M count=1 seek=1000 > /dev/null 2>&1 \ ++ dd if=/dev/null of="$file" bs=1M count=1 seek=1000 > /dev/null 2>&1 \ + || { warn "loop_setup_ failed: Unable to create tmp file $file"; return 1; } + + # NOTE: this requires a new enough version of losetup +- dev=$(unsafe_losetup_ "$file") \ ++ dev=$(losetup --show -f "$file") 2>/dev/null \ + || { warn "loop_setup_ failed: Unable to create loopback device"; return 1; } + + echo "$dev" +diff --git a/tests/t-lvm.sh b/tests/t-lvm.sh +index b08f934..3c7657b 100644 +--- a/tests/t-lvm.sh ++++ b/tests/t-lvm.sh +@@ -16,34 +16,14 @@ export LVM_SUPPRESS_FD_WARNINGS=1 + ME=$(basename "$0") + warn() { echo >&2 "$ME: $@"; } + +-unsafe_losetup_() +-{ +- f=$1 +- +- test -n "$G_dev_" \ +- || error "Internal error: unsafe_losetup_ called before init_root_dir_" +- +- # Iterate through $G_dev_/loop{,/}{0,1,2,3,4,5,6,7,8,9} +- for slash in '' /; do +- for i in 0 1 2 3 4 5 6 7 8 9; do +- dev=$G_dev_/loop$slash$i +- losetup $dev > /dev/null 2>&1 && continue; +- losetup "$dev" "$f" > /dev/null && { echo "$dev"; return 0; } +- break +- done +- done +- +- return 1 +-} +- + loop_setup_() + { + file=$1 +- dd if=/dev/zero of="$file" bs=1M count=1 seek=1000 > /dev/null 2>&1 \ ++ dd if=/dev/null of="$file" bs=1M count=1 seek=1000 > /dev/null 2>&1 \ + || { warn "loop_setup_ failed: Unable to create tmp file $file"; return 1; } + + # NOTE: this requires a new enough version of losetup +- dev=$(unsafe_losetup_ "$file" 2>/dev/null) \ ++ dev=$(losetup --show -f "$file") 2>/dev/null \ + || { warn "loop_setup_ failed: Unable to create loopback device"; return 1; } + + echo "$dev" +diff --git a/tests/t6001-psep.sh b/tests/t6001-psep.sh +index 490c6d2..1859ac9 100644 +--- a/tests/t6001-psep.sh ++++ b/tests/t6001-psep.sh +@@ -44,14 +44,10 @@ cleanup_fn_() { + # create a file of size N bytes + N=10M + +-# create the test file +-f1=$(pwd)/1; dd if=/dev/null of=$f1 bs=1 seek=$N 2> /dev/null || fail=1 +-f2=$(pwd)/2; dd if=/dev/null of=$f2 bs=1 seek=$N 2> /dev/null || fail=1 +- +-d1=$(loop_setup_ "$f1") \ ++f1=$(pwd)/1; d1=$(loop_setup_ "$f1") \ + || skip_ "is this partition mounted with 'nodev'?" + +-d2=$(loop_setup_ "$f2") \ ++f2=$(pwd)/2 ;d2=$(loop_setup_ "$f2") \ + || skip_ "is this partition mounted with 'nodev'?" + + dmsetup_cmd="0 `blockdev --getsz $d1` linear $d1 0" +diff --git a/tests/t6003-dm-uuid.sh b/tests/t6003-dm-uuid.sh +index 1751cb4..f58cb06 100755 +--- a/tests/t6003-dm-uuid.sh ++++ b/tests/t6003-dm-uuid.sh +@@ -36,8 +36,7 @@ cleanup_() { + } + + # create a file large enough to hold a GPT partition table +-dd if=/dev/null of=$loop_file bs=$ss seek=$ns || framework_failure +-dev=$(losetup --show -f $loop_file) || framework_failure ++dev=$(loop_setup_ $loop_file) || framework_failure + dmsetup create $dm_name --table "0 $ns linear $dev 0" || framework_failure + dmsetup rename $dm_name --setuuid f139317b-f98a-45d7-ab3b-9b4e0a336872 || framework_failure + +-- +1.7.11.4 + diff --git a/SOURCES/parted-3.1-tests-rewrite-t6001-to-use-dev-mapper.patch b/SOURCES/parted-3.1-tests-rewrite-t6001-to-use-dev-mapper.patch new file mode 100644 index 0000000..0e7884d --- /dev/null +++ b/SOURCES/parted-3.1-tests-rewrite-t6001-to-use-dev-mapper.patch @@ -0,0 +1,98 @@ +From 7d4947fd094f1dda491473a57a9275971405684e Mon Sep 17 00:00:00 2001 +From: Fedora Ninjas +Date: Wed, 17 Apr 2013 14:59:36 -0700 +Subject: [PATCH] tests: rewrite t6001 to use /dev/mapper + +This test begain failing because using a private copy of /dev/mapper +confuses the system. This fixes that and generally cleans up the test. + +tests/t6001.sh: update to use /dev/mapper directly +--- + tests/t6001-psep.sh | 43 ++++++++++++++++++------------------------- + 1 file changed, 18 insertions(+), 25 deletions(-) + +diff --git a/tests/t6001-psep.sh b/tests/t6001-psep.sh +index 1859ac9..0c1ab99 100644 +--- a/tests/t6001-psep.sh ++++ b/tests/t6001-psep.sh +@@ -1,4 +1,5 @@ + #!/bin/sh ++ + # ensure that parted names partitions on dm disks correctly + + # Copyright (C) 2011-2012 Free Software Foundation, Inc. +@@ -19,10 +20,7 @@ + . "${srcdir=.}/init.sh"; path_prepend_ ../parted + + require_root_ +-lvm_init_root_dir_ +- +-test "x$ENABLE_DEVICE_MAPPER" = xyes \ +- || skip_ "no device-mapper support" ++(dmsetup --help) > /dev/null 2>&1 || skip_test_ "No dmsetup installed" + + # Device maps names - should be random to not conflict with existing ones on + # the system +@@ -41,25 +39,19 @@ cleanup_fn_() { + rm -f "$f1 $f2"; + } + +-# create a file of size N bytes +-N=10M ++loop_file_1=loop-file-1-$$ ++loop_file_2=loop-file-2-$$ + +-f1=$(pwd)/1; d1=$(loop_setup_ "$f1") \ +- || skip_ "is this partition mounted with 'nodev'?" ++d1=$(loop_setup_ $loop_file_1) || framework_failure ++d1_size=$(blockdev --getsz $d1) ++d2=$(loop_setup_ $loop_file_2) || framework_failure ++d2_size=$(blockdev --getsz $d2) + +-f2=$(pwd)/2 ;d2=$(loop_setup_ "$f2") \ +- || skip_ "is this partition mounted with 'nodev'?" +- +-dmsetup_cmd="0 `blockdev --getsz $d1` linear $d1 0" +-# setup: create a mapping +-echo "$dmsetup_cmd" | dmsetup create "$linear_" || fail=1 +-dev="$DM_DEV_DIR/mapper/$linear_" ++dmsetup create $linear_ --table "0 $d1_size linear $d1 0" || framework_failure ++dev="/dev/mapper/$linear_" + + # Create msdos partition table +-parted -s $dev mklabel msdos > out 2>&1 || fail=1 +-compare /dev/null out || fail=1 +- +-parted -s $dev mkpart primary fat32 1m 5m > out 2>&1 || fail=1 ++parted -s $dev mklabel msdos mkpart primary fat32 1m 5m > out 2>&1 || fail=1 + compare /dev/null out || fail=1 + + #make sure device name is correct +@@ -67,17 +59,18 @@ test -e ${dev}p1 || fail=1 + + #repeat on name not ending in a digit + # setup: create a mapping +-echo "$dmsetup_cmd" | dmsetup create "$linear2_" || fail=1 +-dev="$DM_DEV_DIR/mapper/$linear2_" ++dmsetup create $linear2_ --table "0 $d2_size linear $d2 0" || framework_failure ++dev="/dev/mapper/$linear2_" + + # Create msdos partition table +-parted -s $dev mklabel msdos > out 2>&1 || fail=1 +-compare /dev/null out || fail=1 +- +-parted -s $dev mkpart primary fat32 1m 5m > out 2>&1 || fail=1 ++parted -s $dev mklabel msdos mkpart primary fat32 1m 5m > out 2>&1 || fail=1 + compare /dev/null out || fail=1 + + #make sure device name is correct + test -e ${dev}1 || fail=1 + ++if [ -n "$fail" ]; then ++ ls /dev/mapper ++fi ++ + Exit $fail +-- +1.8.1.4 + diff --git a/SPECS/parted.spec b/SPECS/parted.spec new file mode 100644 index 0000000..fc22d45 --- /dev/null +++ b/SPECS/parted.spec @@ -0,0 +1,1127 @@ +%define _sbindir /sbin +%define _libdir /%{_lib} + +Summary: The GNU disk partition manipulation program +Name: parted +Version: 3.1 +Release: 14%{?dist} +License: GPLv3+ +Group: Applications/System +URL: http://www.gnu.org/software/parted + +Source0: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz +Source1: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig +Source2: pubkey.jim.meyering + +Patch0: parted-3.0-libparted-copy-pmbr_boot-when-duplicating-GPT-disk.patch +Patch1: parted-3.1-libparted-check-PMBR-before-GPT-partition-table-8052.patch +Patch2: parted-3.1-tests-add-t0301-overwrite-gpt-pmbr.sh.patch +Patch3: parted-3.1-libparted-Fix-endian-error-with-FirstUsableLBA.patch +Patch4: parted-2.1-libparted-use-dm_udev_wait-698121.patch +Patch5: parted-3.1-libparted-use-largest_partnum-in-dm_reread_part_tabl.patch +patch6: parted-3.1-test-creating-20-device-mapper-partitions.patch +Patch7: parted-3.1-libparted-preserve-the-uuid-on-dm-partitions.patch +Patch8: parted-3.1-tests-Make-sure-dm-UUIDs-are-not-erased.patch +Patch9: parted-3.1-libparted-reallocate-buf-after-_disk_analyse_block_s.patch +Patch10: parted-3.1-tests-cleanup-losetup-usage.patch +Patch11: parted-3.1-libparted-add-support-for-implicit-FBA-DASD-partitions.patch +Patch12: parted-3.1-libparted-add-support-for-EAV-DASD-partitions.patch +Patch13: parted-3.1-libparted-don-t-canonicalize-dev-md-paths.patch +Patch14: parted-3.1-libparted-mklabel-eav.patch +Patch15: parted-3.1-avoid-dasd-as-default-file-image-type.patch +Patch16: parted-3.1-libparted-mklabel-edev.patch +Patch17: parted-3.1-tests-rewrite-t6001-to-use-dev-mapper.patch +Patch18: parted-3.1-libparted-Recognize-btrfs-filesystem.patch +Patch19: parted-3.1-tests-Add-btrfs-and-xfs-to-the-fs-probe-test.patch +Patch20: parted-3.1-libparted-Flush-parent-device-on-open-962611.patch + +Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: e2fsprogs-devel +BuildRequires: readline-devel +BuildRequires: ncurses-devel +BuildRequires: gettext-devel +BuildRequires: texinfo +BuildRequires: device-mapper-devel +BuildRequires: libselinux-devel +BuildRequires: libuuid-devel +BuildRequires: libblkid-devel >= 2.17 +BuildRequires: gnupg +BuildRequires: git +BuildRequires: autoconf automake +BuildRequires: e2fsprogs +BuildRequires: dosfstools + +Requires(post): /sbin/ldconfig +Requires(post): /sbin/install-info +Requires(preun): /sbin/install-info +Requires(postun): /sbin/ldconfig + +# bundled gnulib library exception, as per packaging guidelines +# https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries +Provides: bundled(gnulib) + +%description +The GNU Parted program allows you to create, destroy, resize, move, +and copy hard disk partitions. Parted can be used for creating space +for new operating systems, reorganizing disk usage, and copying data +to new hard disks. + + +%package devel +Summary: Files for developing apps which will manipulate disk partitions +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +Requires: pkgconfig + +%description devel +The GNU Parted library is a set of routines for hard disk partition +manipulation. If you want to develop programs that manipulate disk +partitions and filesystems using the routines provided by the GNU +Parted library, you need to install this package. + + +%prep +%setup -q +gpg --import %{SOURCE2} +gpg --verify %{SOURCE1} %{SOURCE0} +git init +git config user.email "parted-owner@fedoraproject.org" +git config user.name "Fedora Ninjas" +git add . +git commit -a -q -m "%{version} baseline." +git am %{patches} +iconv -f ISO-8859-1 -t UTF8 AUTHORS > tmp; touch -r AUTHORS tmp; mv tmp AUTHORS +git commit -a -m "run iconv" + +%build +autoreconf +autoconf +CFLAGS="$RPM_OPT_FLAGS -Wno-unused-but-set-variable"; export CFLAGS +%configure --enable-selinux --disable-static +# Don't use rpath! +%{__sed} -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +%{__sed} -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool +V=1 %{__make} %{?_smp_mflags} + + +%install +%{__rm} -rf %{buildroot} +%{__make} install DESTDIR=%{buildroot} + +# Move devel package components in to the correct location +%{__mkdir} -p %{buildroot}%{_exec_prefix}/%{_lib} +%{__mv} %{buildroot}%{_libdir}/libparted.so %{buildroot}%{_exec_prefix}/%{_lib} +%{__mv} %{buildroot}%{_libdir}/pkgconfig %{buildroot}%{_exec_prefix}/%{_lib} +pushd %{buildroot}%{_exec_prefix}/%{_lib} +reallibrary="$(readlink libparted.so)" +%{__rm} -f libparted.so +ln -sf ../../%{_lib}/${reallibrary} libparted.so +popd + +# Remove components we do not ship +%{__rm} -rf %{buildroot}%{_libdir}/*.la +%{__rm} -rf %{buildroot}%{_infodir}/dir +%{__rm} -rf %{buildroot}%{_bindir}/label +%{__rm} -rf %{buildroot}%{_bindir}/disk + +%find_lang %{name} + + +%check +export LD_LIBRARY_PATH=$(pwd)/libparted/.libs +make check + + +%clean +%{__rm} -rf %{buildroot} + + +%post +/sbin/ldconfig +if [ -f %{_infodir}/parted.info.gz ]; then + /sbin/install-info %{_infodir}/parted.info.gz %{_infodir}/dir || : +fi + +%preun +if [ $1 = 0 ]; then + /sbin/install-info --delete %{_infodir}/parted.info.gz %{_infodir}/dir >/dev/null 2>&1 || : +fi + +%postun -p /sbin/ldconfig + + +%files -f %{name}.lang +%defattr(-,root,root,-) +%doc AUTHORS BUGS COPYING ChangeLog NEWS README THANKS TODO doc/API doc/FAT +%{_sbindir}/parted +%{_sbindir}/partprobe +%{_mandir}/man8/parted.8.gz +%{_mandir}/man8/partprobe.8.gz +%{_libdir}/libparted.so.* +%{_libdir}/libparted-fs-resize.so* +%{_infodir}/parted.info.gz + +%files devel +%defattr(-,root,root,-) +%{_includedir}/parted +%{_exec_prefix}/%{_lib}/libparted.so +%{_exec_prefix}/%{_lib}/pkgconfig/libparted.pc + + +%changelog +* Wed Sep 04 2013 Brian C. Lane 3.1-14 +- libparted: Flush parent device on open (#962611) + +* Wed Aug 28 2013 Brian C. Lane 3.1-13 +- libparted: Recognize btrfs filesystem (#857101) +- tests: Add btrfs and xfs to the fs probe test (#857101) + +* Wed Apr 17 2013 Brian C. Lane 3.1-12 +- libparted: mklabel to support EDEV DASD (#953146) +- tests: rewrite t6001 to use /dev/mapper + +* Thu Feb 14 2013 Fedora Release Engineering - 3.1-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Dec 12 2012 Brian C. Lane 3.1-10 +- libparted: mklabel to support EAV DASD (#707032) +- libparted: Avoid dasd as default disk type while probe (#707032) + +* Thu Nov 01 2012 Brian C. Lane 3.1-9 +- don't canonicalize /dev/md/ paths (#872361) + +* Tue Oct 16 2012 Brian C. Lane 3.1-8 +- change partition UUID to use partX-UUID (#858704) +- fixup losetup usage in tests +- add support for implicit FBA DASD partitions (#707027) +- add support for EAV DASD partitions (#707032) + +* Tue Sep 04 2012 Brian C. Lane 3.1-7 +- reallocate buf after _disk_analyse_block_size (#835601) + +* Fri Aug 03 2012 Brian C. Lane 3.1-6 +- Use dm_udev_wait for dm operations (#844257) (bcl) +- use largest_partnum in _dm_reread_part_table (bcl) +- set uuid on dm partitions (#832145) (bcl) + +* Fri Jul 20 2012 Fedora Release Engineering - 3.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Jun 08 2012 Brian C. Lane 3.1-4 +- Fix crash on ppc64 with GPT (#829960) (rwmj) + +* Tue May 15 2012 Brian C. Lane 3.1-3 +- Added Provides: bundled(gnulib) (#821782) + +* Wed Mar 21 2012 Brian C. Lane 3.1-2 +- libparted: check PMBR before GPT partition table (#805272) +- tests: add a test for the new behavior + +* Tue Mar 13 2012 Brian C. Lane 3.1-1 +- Rebase to upstream parted v3.1 +- removed merged patches +- add new libparted-fs-resize library + +* Fri Feb 03 2012 Brian C. Lane - 3.0-7 +- Update patch for copying flags so that it is generic +- Copy pmbr_boot flag in gpt_duplicate + +* Thu Feb 02 2012 Brian C. Lane - 3.0-6 +- gpt: add commands to manipulate pMBR boot flag (#754850) +- parted: when printing, also print the new disk flags +- tests: update tests for new disk flags output +- tests: add test for GPT PMBR pmbr_boot flag +- doc: update parted documentation + +* Fri Jan 13 2012 Fedora Release Engineering - 3.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Oct 31 2011 Brian C. Lane - 3.0-4 +- Fix ped_disk_duplicate on GPT so that it copies the partition flags (#747947) +- Add new test to check ped_disk_duplicate on msdos, gpt, bsd disk labels +- Add e2fsprogs and dosfstools so that skipped tests will be run + +* Fri Oct 07 2011 Brian C. Lane - 3.0-3 +- Fix handling of zero-length gpt partitions (#728949) +- Fix bug in nilfs2 probe with short partitions (#728949) +- Fix bug in hfs probe code (#714758) +- Make pc98 detection depend on specific signatures (#646053) + +* Wed Jun 29 2011 Richard W.M. Jones - 3.0-2 +- (Re-)apply patch to fix Linux "3.0" problem. + +* Tue Jun 28 2011 Brian C. Lane - 3.0-1 +- Update to parted v3.0 +- Run autoreconf so that patches to .am files will work +- Add patch to Fix snap radius and don't allow values < 1 (#665496) +- Add tests for the snap radius fix. +- Drop patches included in upstream release + +* Sun Jun 5 2011 Richard W.M. Jones - 2.4-2 +- Apply patch which may fix Linux "3.0" problem. + +* Thu May 26 2011 Brian C. Lane - 2.4-1 +- Updating to latest upstream v2.4 +- Drop patches included in upstream + +* Fri Mar 11 2011 Brian C. Lane - 2.3-8 +- Add support for legacy_boot flag for GPT partitions (680562) +- Remove PED_ASSERT for dos geometry calculations (585468) + +* Wed Feb 09 2011 Brian C. Lane - 2.3-7 +- Tell GCC to stop treating unused variable warnings as errors + +* Tue Feb 08 2011 Fedora Release Engineering - 2.3-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Mon Dec 20 2010 Brian C. Lanr - 2.3-5 +- Document the align-check command + Resolves: #642476 +- Default to 1MiB partition alignment + Resolves: #618255 + +* Fri Dec 17 2010 Peter Jones - 2.3-4 +- Handle mac labels with differing physical/logical sector sizes better + +* Wed Sep 29 2010 jkeating - 2.3-3 +- Rebuilt for gcc bug 634757 + +* Fri Sep 17 2010 Brian C. Lane 2.3-2 +- Add patch to handle syncing partition changes when using blkext majors +- Resolves rhbz#634980 +- Related rhbz#629719 + +* Tue Jul 20 2010 Hans de Goede 2.3-1 +- Rebase to new upstream 2.3 release +- Drop all patches (all upstreamed) +- Recognize scsi disks with a high major as such (#611691) + +* Thu May 6 2010 Hans de Goede 2.2-5 +- Also recognize recovery partitions with id 27 / on gpt (#589451) + +* Fri Apr 23 2010 Hans de Goede 2.2-4 +- Properly check dm_task_run return value (#585158) +- Fix mkpartfs (ext2) on partitions >2TB (#585159) + +* Mon Apr 19 2010 Hans de Goede 2.2-3 +- Add a flag for detecting diagnostics / recovery partitions (#583626) + +* Tue Apr 6 2010 Hans de Goede 2.2-2 +- Parted should not canonicalize symlinks under /dev/mapper (#577824) + +* Tue Mar 30 2010 Hans de Goede 2.2-1 +- New upstream version 2.2 (#577478) +- Drop all our patches (all upstreamed) + +* Thu Feb 18 2010 Hans de Goede 2.1-5 +- Copy needs_clobber value in ped_disk_duplicate() (#561976) + +* Wed Feb 10 2010 Hans de Goede 2.1-4 +- Don't crash when reading a DASD disk with PV's on there (#563419) +- Don't overwrite the pmbr when merely printing a gpt table (#563211) + +* Sun Jan 31 2010 Hans de Goede 2.1-3 +- If a drive does not have alignment information available default + to an alignment of 1MiB (#559639) + +* Sun Jan 17 2010 Hans de Goede 2.1-2 +- Fix various memory leaks in error paths (#556012) +- Add %%check section to the specfile, invoking make check + +* Mon Jan 11 2010 Hans de Goede 2.1-1 +- New upstream release 2.1 +- Drop all our patches (all merged upstream) + +* Sun Dec 20 2009 Hans de Goede 1.9.0-25 +- Fix crash when partitioning loopback devices (#546622) +- Drop no-cylinder-align patch: + - its functionality is superseeded by the per disk flags + - its only user (pyparted) has been updated to use those + - this is not upstream so we don't want other programs to start using it + +* Fri Dec 18 2009 Hans de Goede 1.9.0-24 +- Allow partitioning of loopback devices (#546622) +- Add libparted function to query maximum partition length and start + addresses for a given disk (#533417) +- Add per disk flags functions from upstream, this is the way upstream + has implemented the disable cylinder alignment functionality +- Add --align cmdline option to specify how to align new partitions + see the parted man page for details (#361951) +- Make the default alignment for new partitions optimal (#361951) +- When cylinder alignment is disabled, allow use of the last (incomplete) + cylinder of the disk (#533328) +- Don't crash when printing partition tables in Russian (#543029) +- Make parted work correctly with new lvm (#525095) + +* Wed Nov 11 2009 Hans de Goede 1.9.0-23 +- Fix parted not building on s390 + +* Mon Nov 9 2009 Hans de Goede 1.9.0-22 +- Fix error when creating a fresh dasd disk on a dasd device + with a corrupted dasd label (#533808) + +* Fri Nov 6 2009 Hans de Goede 1.9.0-21 +- Fix a compiler warning which is causing build errors (#532425) + +* Tue Nov 3 2009 Hans de Goede 1.9.0-20 +- Fix error when creating a fresh dasd disk (#532425) +- Rewrite dasd disk duplication patches, as the old old ones conflicted + with fixing creating a fresh dasd disk + +* Fri Oct 30 2009 Hans de Goede 1.9.0-19 +- Fix a segfault introduced by -18 when operating on plain files + +* Thu Oct 29 2009 Hans de Goede 1.9.0-18 +- Add functions to query device / partition table alignments (#528030) + +* Thu Oct 8 2009 Hans de Goede 1.9.0-17 +- Only change the partition type to 82 when setting the swap flag on dos + labels, not when resetting it + +* Tue Oct 6 2009 Hans de Goede 1.9.0-16 +- Correctly handle GPT labels on big endian machines + +* Tue Oct 6 2009 Hans de Goede 1.9.0-15 +- ped_partition_is_busy() should not throw exceptions (#527035) +- msdos_partition_is_flag_available() should return 1 for swap flag (#513729) + +* Mon Aug 31 2009 Joel Granados 1.9.0-14 +- Patchs for 'commit to os' for linux. Thx to hansg. + +* Fri Aug 28 2009 Karsten Hopp 1.9.0-13 +- volkey is only 4 chars, don't overflow destination buffer with 84 chars + +* Fri Aug 21 2009 Joel Granados - 1.9.0-12 +- libuuid-devel is now valid for s390 builds. + +* Wed Aug 12 2009 Ville Skyttä - 1.9.0-11 +- Use xz compressed upstream tarball. + +* Wed Aug 12 2009 Joel Granados - 1.9.0-10 +- Make install with exclude docs work without an error message. + +* Wed Jul 29 2009 Joel Granados - 1.9.0-9 +- Add parenthesis where needed (#511907) + +* Mon Jul 27 2009 Joel Granados - 1.9.0-8 +- Add the swap flag to the dos type labels + +* Sat Jul 25 2009 Fedora Release Engineering - 1.9.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Thu Jul 23 2009 Joel Granados - 1.9.0-6 +- Rebuild usiing the official tar.gz at http://ftp.gnu.org/gnu/parted/parted-1.9.0.tar.gz + +* Wed Jul 22 2009 Joel Granados - 1.9.0-5.20090721git980c +- Better handle a duplicate error. + +* Tue Jul 21 2009 Joel Granados - 1.9.0-4.20090721git980c +- New snapshot. +- Add patches to make dasd duplicate disk work. + +* Sat Jul 18 2009 Lubomir Rintel - 1.9.0-3.20090610git32dc +- Fix a typo in the errno patch + +* Mon Jul 13 2009 Joel Granados - 1.9.0-2.20090610git32dc +- Correctly number the snapshot. + +* Fri Jul 10 2009 Joel Granados - 1.9.0-1 +- New version. + +* Thu Mar 26 2009 Joel Granados - 1.8.8-15 +- Begin to identify virtio devices. +- Actually change the partition type in msdos lables (dcantrell). + +* Mon Mar 23 2009 Joel Granados - 1.8.8-14 +- Correct the behavior of upated_mode functions when the ASSERT fails (thx to hansg). + +* Thu Feb 26 2009 Joel Granados - 1.8.8-13 +- Fix parted build for gcc-4.4 + +* Thu Feb 26 2009 Fedora Release Engineering - 1.8.8-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Thu Jan 22 2009 Joel Granados - 1.8.8-12 +- Avoid the calling of stat for strings that don't begin with the "/" char (#353191). + +* Sat Dec 13 2008 Tom "spot" Callaway - 1.8.8-11 +- fix typo in last patch + +* Sat Dec 13 2008 Tom "spot" Callaway - 1.8.8-10 +- enable RAID partition types on sun disklabels for sparc + +* Thu Nov 06 2008 Joel Granados - 1.8.8-9 +- Fix the build for the s390(x) archs (#470211). + +* Thu Jun 05 2008 Peter Jones - 1.8.8-8 +- Fix some of the atvrecv code (and the msftres code) so that the flags + actually stick. + +* Thu Jun 05 2008 Peter Jones - 1.8.8-7 +- Added "atvrecv" flag patch from atv-bootloader project. + +* Thu May 29 2008 Joel Granados - 1.8.8-6 +- Do a better job at recognizing the dos partition. (#246423) + +* Thu Apr 10 2008 David Cantrell - 1.8.8-5 +- Allow RAID or LVM partition types on BSD disklabels. + (jay.estabrook AT hp.com, #427114) + +* Thu Apr 10 2008 Peter Jones - 1.8.8-4 +- Don't interactively ask to fix an AlternateGPT's location when not + at the end of the disk; this is so that disk images written to a + usb-key can work reasonably. + +* Mon Feb 04 2008 David Cantrell - 1.8.8-3 +- Fixes so parted compiles with gcc-4.3 (#431397) + +* Sun Jan 13 2008 David Cantrell - 1.8.8-2 +- Move libparted libraries to /lib (#428420) + +* Wed Jan 02 2008 David Cantrell - 1.8.8-1 +- Upgraded to GNU parted-1.8.8 +- License for GNU parted is now GPLv3+ + +* Thu Dec 13 2007 David Cantrell - 1.8.6-13 +- Modify parted man page to indicate which flags are valid for which + disk labels (#242711) + +* Mon Nov 05 2007 David Cantrell - 1.8.6-12 +- Add KNOWN ISSUES section to parted(8) man page explaining that we cannot + currently do ext3 resizing inside parted (#367101) +- Update the xvd patch to include 'xvd' in the string table that parted + uses when printing device types (#366971) +- Do not install the linux.h or gnu.h headers + +* Tue Oct 30 2007 David Cantrell - 1.8.6-11 +- Do not install fdasd.h and vtoc.h header files + +* Thu Oct 04 2007 David Cantrell - 1.8.6-10 +- Do not install the testsuite tools + +* Thu Oct 04 2007 David Cantrell - 1.8.6-9 +- Always define PED_DEVICE_DM regardless of compile time options + +* Tue Aug 21 2007 David Cantrell - 1.8.6-8 +- Rebuild + +* Wed Aug 08 2007 David Cantrell - 1.8.6-7 +- Update License tag to GPLv2+ + +* Tue Aug 07 2007 David Cantrell - 1.8.6-6 +- Detect Xen virtual block devices and set model name appropriately + +* Thu Apr 19 2007 David Cantrell - 1.8.6-5 +- Spec file cleanups for merge review (#226230) + +* Fri Apr 13 2007 David Cantrell - 1.8.6-4 +- Fix primary partition cylinder alignment error for DOS disk labels (#229745) +- Do not build and package up libparted.a, only the shared library + +* Wed Apr 11 2007 David Cantrell - 1.8.6-3 +- Fix off-by-one bug in parted(8) when displaying disk label (#235901) + +* Wed Mar 21 2007 David Cantrell - 1.8.6-2 +- Do not translate partition name from disk label (#224182) + +* Tue Mar 20 2007 David Cantrell - 1.8.6-1 +- Upgrade to GNU parted-1.8.6, summary of major change(s): + a) Revert linux-swap(new) and linux-swap(old) fs types, it's + linux-swap for all swap types (#233085) + +* Tue Mar 20 2007 David Cantrell - 1.8.5-1 +- Upgrade to GNU parted-1.8.5 (added missing po files) + +* Fri Mar 16 2007 David Cantrell - 1.8.4-1 +- Upgrade to GNU parted-1.8.4, summary of major changes: + a) Update to use newest GNU developer tools + b) Use gnulib, the GNU portability library + c) HFS+ resize support + d) Windows Vista fixes + e) AIX disk label fixes + f) >512 byte logical sector read support on Linux +- Spec file cleanups per Fedora packaging guidelines + +* Thu Feb 08 2007 David Cantrell - 1.8.2-5 +- Remove period from end of summary line (package review) +- Use preferred BuildRoot (package review) +- BR device-mapper-devel + +* Tue Jan 30 2007 David Cantrell - 1.8.2-4 +- Patched parted.8 man page to show partition names apply to GPT disklabels + as well as Mac and PC98 disklabels (#221600) + +* Mon Jan 22 2007 David Cantrell - 1.8.2-3 +- Remove BR for libtermcap-devel +- Specifically preserve starting alignment of 0x800 on Windows Vista + (see http://support.microsoft.com/kb/923332 for details) +- Fix incorrect sector parameter used to initialize a new PedAlignment + +* Thu Jan 18 2007 David Cantrell - 1.8.2-2 +- Preserve starting sector for primary NTFS 3.1 partitions (Windows + Vista) when modifying the DOS disk label. NTFS 3.1 partitions do + not start on the 2nd head of the 1st cylinder at the beginning of + the drive. + +* Fri Jan 12 2007 David Cantrell - 1.8.2-1 +- Upgrade to GNU parted-1.8.2 + +* Fri Dec 15 2006 David Cantrell - 1.8.1-2 +- Fix a segfault when initializing new volumes (pjones) + +* Mon Dec 04 2006 David Cantrell - 1.8.1-1 +- Upgrade to GNU parted-1.8.1 + +* Fri Nov 17 2006 David Cantrell - 1.8.0-1 +- Upgrade to GNU parted-1.8.0 + +* Thu Nov 02 2006 David Cantrell - 1.7.1-18 +- Detect Apple_Boot partition types correctly (#204714) + +* Thu Oct 26 2006 David Cantrell - 1.7.1-17 +- For init_generic() failures on user-mode Linux block devices, goto + error_free_arch_specific instead of error_free_dev. + +* Wed Oct 04 2006 David Cantrell - 1.7.1-16 +- Don't throw PED_EXCEPTION_ERROR in ped_geometry_read() if accessing + sectors outside of partition boundary, since returning false will + shift ped_geometry_check() to the correct sectors. + +* Wed Aug 23 2006 David Cantrell - 1.7.1-15 +- Fixed gpt patch (*asked_already -> asked_already, whoops) + +* Tue Aug 22 2006 David Cantrell - 1.7.1-14 +- Improve error message returned by _parse_header() on GPT-labeled disks + so users actually have an idea of how to correct the problem +- Fix off-by-one error with LastUsableLBA and PartitionEntryLBA overlap + to prevent possible data corruption when using non-parted GPT editing + tools + +* Mon Aug 21 2006 Peter Jones - 1.7.1-13 +- Don't use the "volume name" as the device node name on dm device + partitions, it isn't really what we want at all. + +* Thu Aug 17 2006 David Cantrell - 1.7.1-12 +- Updated O_DIRECT patch to work around s390 problems +- Update LastUsableLBA on GPT-labeled disks after LUN resize (#194238) +- Fix exception when backup GPT table is not in the correction location + and parted tries to move it (#194238) + +* Tue Aug 15 2006 David Cantrell - 1.7.1-11 +- Expand error buffer to 8192 bytes in vtoc_error() +- Do not apply O_DIRECT patch on S/390 or S/390x platforms + +* Mon Aug 14 2006 David Cantrell - 1.7.1-10 +- Removed bad header file patch (#200577) + +* Wed Jul 12 2006 Jesse Keating - 1.7.1-9.1 +- rebuild + +* Wed Jul 5 2006 Peter Jones - 1.7.1-9 +- add ped_exception_get_handler() + +* Mon Jun 26 2006 Florian La Roche - 1.7.1-8 +- remove info files in preun + +* Thu Jun 22 2006 David Cantrell - 1.7.1-7 +- PED_SECTOR_SIZE -> PED_SECTOR_SIZE_DEFAULT + +* Thu Jun 22 2006 David Cantrell - 1.7.1-6 +- Roll dasd patches together +- Use O_DIRECT to prevent first partition corruption on GPT disks + +* Thu Jun 15 2006 Jeremy Katz - 1.7.1-5 +- fix segfaults with dasd devices + +* Wed Jun 7 2006 Jeremy Katz - 1.7.1-4 +- move .so symlink to -devel subpackage + +* Sun May 28 2006 David Cantrell - 1.7.1-3 +- Rebuild + +* Sun May 28 2006 David Cantrell - 1.7.1-2 +- Removed mac-swraid patch (added upstream) +- Updated device-mapper patch for parted-1.7.1 + +* Sat May 27 2006 David Cantrell - 1.7.1-1 +- Upgraded to parted-1.7.1 + +* Fri May 19 2006 David Cantrell - 1.7.0-1 +- Upgraded to parted-1.7.0 + +* Thu Apr 13 2006 David Cantrell - 1.6.25.1-1 +- Upgraded to parted-1.6.25.1 +- BuildRequires libtool + +* Tue Mar 14 2006 Jeremy Katz - 1.6.25-8 +- fix ppc swraid +- BR gettext-devel + +* Wed Feb 22 2006 Peter Jones - 1.6.25-7 +- close /proc/devices correctly + +* Fri Feb 10 2006 Jesse Keating - 1.6.25-6.1 +- bump again for double-long bug on ppc(64) + +* Tue Feb 7 2006 Peter Jones 1.6.25-6 +- Fix dm partition naming. + +* Tue Feb 7 2006 Jesse Keating 1.6.25-5.2 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Fri Dec 9 2005 Jesse Keating +- rebuilt + +* Fri Dec 2 2005 Peter Jones 1.6.25-5 +- rebuild for new device-mapper + +* Thu Dec 1 2005 Peter Jones 1.6.25-4 +- change device-mapper code to call dm_task_update_nodes() after + tasks which change device nodes. + +* Wed Nov 16 2005 Peter Jones 1.6.25-3 +- fix /proc/devices parser bug + +* Tue Nov 15 2005 Peter Jones 1.6.25-2 +- add support for partitions on dm devices + +* Wed Nov 09 2005 Chris Lumens 1.6.25-1 +- Updated to 1.6.25. +- Update DASD, iseries, and SX8 patches. + +* Tue Aug 30 2005 Chris Lumens 1.6.24-1 +- Updated to 1.6.24. + +* Mon Jul 18 2005 Chris Lumens 1.6.23-2 +- Add buildreq for texinfo. + +* Fri Jul 08 2005 Chris Lumens 1.6.23-1 +- Updated to 1.6.23. +- Get rid of separate Mac patches that are now included in upstream. +- Update DASD and AIX patches. + +* Tue Jun 07 2005 Chris Lumens 1.6.22-3 +- Modified Apple_Free patch to take care of the case where the partitions + are unnamed, causing many errors to be printed (#159047). + +* Thu May 05 2005 Chris Lumens 1.6.22-2 +- Added upstream patch to display certain Apple_Free partitions (#154479). + +* Wed Mar 23 2005 Chris Lumens 1.6.22-1 +- Updated to 1.6.22. +- Get rid of separate gc4 patch that's now included upstream. +- Take Mac LVM patch from parted CVS. + +* Mon Mar 14 2005 Chris Lumens 1.6.21-3 +- Include patches from parted CVS for new gcc4 warnings. + +* Sun Feb 20 2005 Paul Nasrat 1.6.21-2 +- Support lvm flags on mac partitions (#121266) + +* Fri Jan 21 2005 Chris Lumens 1.6.21-1 +- Updated to 1.6.21 + +* Wed Jan 12 2005 Tim Waugh 1.6.20-2 +- Rebuilt for new readline. + +* Fri Jan 07 2005 Chris Lumens 1.6.20-1 +- Updated to 1.6.20 (#139257, #142100). +- Updated DASD and AIX patches for 1.6.20. + +* Tue Dec 14 2004 Jeremy Katz - 1.6.19-2 +- add support for Promise SX8 devices + +* Sun Nov 28 2004 Jeremy Katz - 1.6.19-1 +- update to 1.6.19 (#138419) + +* Sun Nov 21 2004 Jeremy Katz - 1.6.18-1 +- update to 1.6.18 + +* Sat Nov 20 2004 Miloslav Trmac - 1.6.16-3 +- Convert pt_BR-parted.8 to UTF-8 + +* Thu Nov 11 2004 Jeremy Katz - 1.6.16-2 +- add patch from Matt Domsch to fix consistency of GPT disk labels + with the EFI specification for disks > 2TB (#138480) +- understand the new Sun UFS partition ID +- merge the new geometry probing from CVS to see if that helps the + assertions people are seeing (#138419) + +* Mon Nov 8 2004 Jeremy Katz - 1.6.16-1 +- update to 1.6.16 +- rebuild for python 2.4 + +* Mon Oct 18 2004 Jeremy Katz - 1.6.15-5 +- add patch from Matt Domsch to add a unique signature to new DOS labels + so that we can later determine which BIOS disk is which (#106674) + +* Fri Oct 15 2004 Phil Knirsch 1.6.15-4 +- Fixed dasd patch (had some duplicate file patches in it) +- Fixed problem with parted segfaulting on SCSI discs on s390 (#133997) + +* Tue Oct 12 2004 Jeremy Katz - 1.6.15-3 +- add patch from peterm to fix printing of the size of large devices (#135468) + +* Thu Oct 07 2004 Phil Knirsch 1.6.15-2 +- Fixed geometry calculation for bios_geo in dasd_init() + +* Mon Sep 20 2004 Jeremy Katz - 1.6.15-1 +- 1.6.15 + +* Fri Sep 10 2004 Jeremy Katz - 1.6.14-1 +- update to 1.6.14 + +* Tue Aug 24 2004 Jeremy Katz - 1.6.12-2 +- fix assertion error when checking flags on non-active partition (#130692) +- buildrequires: gettext-devel + +* Mon Aug 16 2004 Jeremy Katz - 1.6.12-1 +- update to 1.6.12 with major changes to CHS handling to hopefully fix #115980 +- adjust dasd patch accordingly, drop some included patches + +* Mon Jul 19 2004 Karsten Hopp 1.6.11-4 +- update dasd patch for dos-type partitions on mainframes (scsi disks) + +* Fri Jun 25 2004 Jeremy Katz - 1.6.11-3 +- install-info (#77687) + +* Tue Jun 15 2004 Elliot Lee - 1.6.11-2 +- rebuilt + +* Tue Jun 1 2004 Jeremy Katz +- -devel requires main package (#124938) + +* Thu May 13 2004 Jeremy Katz - 1.6.11-1 +- update to 1.6.11 + +* Tue May 11 2004 Jeremy Katz - 1.6.9-4 +- add patch from Matt Domsch to not use the get/set last sector ioctls + with a 2.6 kernel (#121455) + +* Thu Apr 15 2004 David Woodhouse - 1.6.9-3 +- Fix Mac partition detection to close #112937 + +* Tue Apr 13 2004 Jeremy Katz - 1.6.9-2 +- another minor tweak for 2.6's lack of sane geometry handling + +* Mon Apr 12 2004 Jeremy Katz - 1.6.9-1 +- update to 1.6.9 +- need automake17 +- python-devel is superfluous with pyparted as a separate package +- lose the fake-libtool stuff, 1.6.9 was disted with newer auto* + +* Mon Mar 15 2004 Elliot Lee 1.6.6-2 +- Fix parted's "part-static" option to close #118183. Woohoo, a fake-libtool.sh :) + +* Fri Mar 12 2004 Jeremy Katz - 1.6.6-1 +- update to 1.6.6 +- split dasd into a patch instead of included in the tarball +- python module is now in the pyparted package (separate src.rpm) +- ExcludeArch: ppc64 (#118183) + +* Tue Mar 02 2004 Elliot Lee +- rebuilt + +* Fri Feb 13 2004 Elliot Lee +- rebuilt + +* Fri Feb 6 2004 Jeremy Katz +- add automake buildrequires (#115063) + +* Thu Jan 22 2004 Jeremy Katz 1.6.3-33 +- 2.6 removes the geometry fixups that used to be present for IDE disks. + According to Andries, just follow what's in the partition table and don't + worry about what Linux "detects" + +* Thu Nov 6 2003 Jeremy Katz 1.6.3-32 +- rebuild for python 2.3 + +* Mon Oct 27 2003 Jeremy Katz 1.6.3-31 +- add patch from Michael Schwendt for segfault + +* Wed Sep 17 2003 Jeremy Katz 1.6.3-30 +- rebuild + +* Wed Sep 17 2003 Jeremy Katz 1.6.3-29 +- and don't barf on the old (broken) 1.02 gpt rev + +* Tue Sep 16 2003 Jeremy Katz 1.6.3-28 +- rebuild + +* Tue Sep 16 2003 Jeremy Katz 1.6.3-27 +- write out the correct gpt revision (#103664) +- add buildrequires on ncurses-devel + +* Thu Sep 4 2003 Bill Nottingham 1.6.3-26 +- rebuild + +* Thu Sep 4 2003 Bill Nottingham 1.6.3-25 +- don't buildreq libunicode-devel + +* Thu Aug 07 2003 Elliot Lee 1.6.3-24 +- Fix libtool + +* Wed Jul 09 2003 Phil Knirsch 1.6.3-23 +- Fixed dasd_write and dasd_read to support lvm and raid partitions. + +* Wed Jun 18 2003 Phil Knirsch 1.6.3-22 +- Fixed a small bug in VTOC fdasd_check_volume() (#97300). + +* Wed Jun 04 2003 Elliot Lee 1.6.3-21 +- rebuilt + +* Wed Jun 4 2003 Matt Wilson 1.6.3-20 +- don't detect AIX physical volumes as msdos partition tables (#91748) +- added stubbed code for manipulating AIX PVs, enough to clobber the + signature. (#91748) + +* Wed Jun 04 2003 Phil Knirsch 1.6.3-19 +- Added LDL disk layout support for s390(x). + +* Sun May 18 2003 Matt Wilson 1.6.3-18 +- use metadata partitions to protect DASD VTOC +- stash DASD specific data in disk specific areas, not arch specific + areas. + +* Fri May 16 2003 Matt Wilson 1.6.3-18 +- recongnize iseries viodasd (#90449) + +* Thu May 08 2003 Phil Knirsch 1.6.3-17 +- Fixed problem with probing partitions on s390(x) with new partition code. + +* Mon May 05 2003 Phil Knirsch 1.6.3-16 +- Fixed partiton reread code for s390(x). + +* Fri May 02 2003 Phil Knirsch 1.6.3-15 +- Rewrote partition handling for s390(x) dasd devices. No more empty partitions. + +* Wed Mar 12 2003 Phil Knirsch 1.6.3-13 +- Finished updating vtoc and fdasd code to latest s390-utils version. + +* Thu Mar 06 2003 Phil Knirsch 1.6.3-12 +- Fixed vtoc handling on s390(x) dasd devices. + +* Thu Feb 06 2003 Karsten Hopp 1.6.3-11 +- use different define to enable DASD debugging + Otherwise we'll get a lot of dasd debug output because DEBUG is + always defined + +* Wed Jan 22 2003 Tim Powers +- rebuilt + +* Wed Jan 22 2003 Karsten Hopp 1.6.3-9 +- missed one debug message + +* Tue Jan 21 2003 Karsten Hopp 1.6.3-8 +- add patch from CVS to disable debug messages on s390 + +* Tue Jan 14 2003 Matt Wilson 1.6.3-7 +- updated to a new tarball of parted that includes a fs.probe_specific binding + +* Sun Dec 1 2002 Matt Wilson 1.6.3-6 +- hack in partition.native_type (#78118) + +* Thu Nov 7 2002 Matt Wilson +- added a patch to avoid SIGFPE when fat sector size is 0 + +* Tue Nov 5 2002 Matt Wilson +- use --disable-dynamic-loading + +* Mon Nov 4 2002 Matt Wilson +- add device.disk_new_fresh() + +* Fri Nov 1 2002 Matt Wilson +- 1.6.3 + +* Fri Oct 4 2002 Jeremy Katz 1.4.24-7 +- use make LIBTOOL=/usr/bin/libtool instead of recreating everything +- add patch from Jack Howarth to self host properly +- add patch to treat GPT structs as little-endian always and treat GUIDS + as little-endian blobs +- add patch to recognize hp service partitions + +* Wed Sep 25 2002 Jeremy Katz 1.4.24-6hammer +- libtoolize, etc for x86_64 +- hack to get the python module in the right place until python.m4 + from automake is fixed + +* Fri Jun 21 2002 Tim Powers 1.4.24-6 +- automated rebuild + +* Sun May 26 2002 Tim Powers 1.4.24-5 +- automated rebuild + +* Wed May 22 2002 Jeremy Katz 1.4.24-4 +- rebuild in new environment + +* Fri Mar 22 2002 Matt Wilson 1.4.24-3 +- fixed the probe-with-open behavior (again) + +* Fri Feb 22 2002 Matt Wilson 1.4.24-1 +- rebuild + +* Tue Feb 12 2002 Matt Wilson 1.4.24-1 +- 1.4.24 + +* Wed Jan 09 2002 Tim Powers +- automated rebuild + +* Mon Jan 7 2002 Jeremy Katz 1.4.20-4 +- build with final python 2.2 + +* Wed Dec 12 2001 Jeremy Katz 1.4.20-3 +- update from CVS and rebuild in new environment + +* Thu Oct 25 2001 Jeremy Katz 1.4.20-2 +- build both python1.5 and python2 modules + +* Fri Oct 19 2001 Matt Wilson 1.4.20-1 +- 1.4.20 final + +* Thu Oct 11 2001 Matt Wilson 1.4.20-0.1pre3 +- new dist from CVS with new autoconf and automake +- gpt is in 1.4.20, removed patch1 (gpt support) +- partstatic is in 1.4.20, removed patch2 (partstatic patch) + +* Tue Aug 28 2001 Matt Wilson 1.4.16-8 +- new dist from cvs with changes to the python binding: register + DEVICE_I20 and DEVICE_ATARAID, check to make sure that a partition + exists in the PedDisk when using it to find ped_disk_next_partition + +* Tue Aug 21 2001 Matt Wilson 1.4.16-7 +- really disable pc98 support (SF #51632) + +* Fri Aug 17 2001 Matt Wilson 1.4.16-6 +- added a patch (Patch1) to link the c library in dynamically, the + rest of the libs statically for the parted binary (MF #49358) + +* Tue Aug 7 2001 Matt Wilson +- made a new dist from CVS that includes binding for + disk.get_partition_by_sector and accessing the name of a disk type + +* Mon Aug 6 2001 Matt Wilson 1.4.16-4 +- created a new dist from CVS that fixes ext3 detection when + _probe_with_open is needed (#50292) + +* Fri Jul 20 2001 Matt Wilson +- rewrite scsi id code (#49533) + +* Fri Jul 20 2001 Matt Wilson +- added build requires (#49549) + +* Tue Jul 17 2001 Matt Wilson +- 1.4.16 +- regenerated gpt patch against 1.4.16, incorporated + parted-1.4.15-pre1-gpt-printf.patch into the same patch, removed Patch1 + +* Tue Jul 10 2001 Matt Wilson +- added a new dist tarball that contains python wrappers to get disk types + +* Tue Jul 10 2001 Tim Powers +- run ldconfig on un/install + +* Tue Jul 10 2001 Matt Wilson +- added a fix from clausen for border case when there is an extended + on the last cyl + +* Mon Jul 9 2001 Matt Wilson +- 1.4.15 + +* Thu Jul 5 2001 Matt Wilson +- added patch from Arjan to enable ataraid support + +* Wed Jul 4 2001 Matt Wilson +- imported 1.4.15-pre2 into CVS and made a new dist tarball + +* Tue Jun 26 2001 Matt Wilson +- added a new dist tarball that contains a check in python code to + make sure that a partition exists within a disk before trying to + remove it from the disk +- also changed _probe_with_open to make the first probed filesystem win + +* Tue Jun 26 2001 Bill Nottingham +- fix filesystem type reading on GPT disks + +* Tue Jun 26 2001 Matt Wilson +- added another fix for ext2/ext3 +- added Patch4 to move the crc32 function into its own namespace so + we don't colide with zlib when both are in the same executable space + +* Mon Jun 25 2001 Matt Wilson +- added a new dist tarball from CVS that includes + ext3 probing + +* Wed Jun 6 2001 Matt Wilson +- updated dist with binding for partition.geom.disk + +* Tue Jun 5 2001 Matt Wilson +- make a new dist tarball that has new python binding changes + +* Tue May 29 2001 Bill Nottingham +- add major numbers for cciss +- add libunicode-devel buildprereq + +* Sun May 27 2001 Matthew Wilson +- added type, heads, and sectors to the python binding for PedDevice + +* Fri May 4 2001 Matt Wilson +- added parted-1.4.11-gpt-pmbralign.patch from Matt Domsch + +* Wed May 2 2001 Matt Wilson +- include python binding +- enable shared library (for python binding, we want fpic code) + with --enable-shared +- build parted binary static with --enable-all-static +- don't run libtoolize on this. + +* Wed May 02 2001 Bill Nottingham +- update to 1.4.11 +- add EFI GPT patch from Matt Domsch () +- don't run autoconf, it relies on a newer non-released version + of autoconf... + +* Fri Feb 23 2001 Trond Eivind Glomsrød +- langify + +* Wed Jan 17 2001 Florian La Roche +- update to 1.4.7 + +* Thu Dec 14 2000 Bill Nottingham +- rebuild because of broken fileutils + +* Fri Nov 03 2000 Florian La Roche +- update to 1.2.12 + +* Wed Nov 01 2000 Florian La Roche +- update to 1.2.11 + +* Tue Oct 17 2000 Florian La Roche +- update to 1.2.10 + +* Sun Sep 10 2000 Florian La Roche +- update to 1.2.9 + +* Tue Aug 29 2000 Florian La Roche +- fix bug when just hitting "return" with no user input + +* Sun Aug 20 2000 Florian La Roche +- 1.2.8 +- blksize patch not needed anymore +- move changelog to the end of the spec file + +* Wed Aug 16 2000 Matt Wilson +- 1.2.7 +- patched configure script to ignore the 2.4 blkpg.h header (fixes #15835). + +* Fri Aug 4 2000 Florian La Roche +- update to 1.2.6 + +* Sat Jul 22 2000 Florian La Roche +- update to 1.2.5 +- add more docu + +* Wed Jul 12 2000 Prospector +- automatic rebuild + +* Mon Jun 12 2000 Matt Wilson +- initialization of spec file.