--- parted-1.8.8.git.2008.03.24.orig/include/parted/disk.h +++ parted-1.8.8.git.2008.03.24/include/parted/disk.h @@ -1,6 +1,6 @@ /* libparted - a library for manipulating disk partitions - Copyright (C) 1999, 2000, 2001, 2002, 2007 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2001, 2002, 2007, 2008 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 @@ -52,10 +52,11 @@ PED_PARTITION_HPSERVICE=8, PED_PARTITION_PALO=9, PED_PARTITION_PREP=10, - PED_PARTITION_MSFT_RESERVED=11 + PED_PARTITION_MSFT_RESERVED=11, + PED_PARTITION_BIOS_GRUB=12 }; #define PED_PARTITION_FIRST_FLAG PED_PARTITION_BOOT -#define PED_PARTITION_LAST_FLAG PED_PARTITION_MSFT_RESERVED +#define PED_PARTITION_LAST_FLAG PED_PARTITION_BIOS_GRUB enum _PedDiskTypeFeature { PED_DISK_TYPE_EXTENDED=1, /**< supports extended partitions */ --- parted-1.8.8.git.2008.03.24.orig/include/parted/linux.h +++ parted-1.8.8.git.2008.03.24/include/parted/linux.h @@ -22,7 +22,7 @@ #include #include -#if defined __s390__ || defined __s390x__ +#if defined(__s390__) || defined(__s390x__) # include #endif --- parted-1.8.8.git.2008.03.24.orig/po/.gitignore +++ parted-1.8.8.git.2008.03.24/po/.gitignore @@ -0,0 +1,18 @@ +*.gmo +*.po +LINGUAS +Makefile.in +Makefile.in.in +Makevars +Makevars.template +POTFILES +Rules-quot +boldquot.sed +en@boldquot.header +en@quot.header +insert-header.sin +parted.pot +quot.sed +remove-potcdate.sed +remove-potcdate.sin +stamp-po --- parted-1.8.8.git.2008.03.24.orig/configure +++ parted-1.8.8.git.2008.03.24/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for GNU parted 1.8.8. +# Generated by GNU Autoconf 2.61 for GNU parted 1.8.9. # # Report bugs to . # @@ -728,8 +728,8 @@ # Identity of this package. PACKAGE_NAME='GNU parted' PACKAGE_TARNAME='parted' -PACKAGE_VERSION='1.8.8' -PACKAGE_STRING='GNU parted 1.8.8' +PACKAGE_VERSION='1.8.9' +PACKAGE_STRING='GNU parted 1.8.9' PACKAGE_BUGREPORT='bug-parted@gnu.org' ac_unique_file="include/parted/parted.h" @@ -1574,7 +1574,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures GNU parted 1.8.8 to adapt to many kinds of systems. +\`configure' configures GNU parted 1.8.9 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1644,7 +1644,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of GNU parted 1.8.8:";; + short | recursive ) echo "Configuration of GNU parted 1.8.9:";; esac cat <<\_ACEOF @@ -1779,7 +1779,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -GNU parted configure 1.8.8 +GNU parted configure 1.8.9 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1793,7 +1793,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by GNU parted $as_me 1.8.8, which was +It was created by GNU parted $as_me 1.8.9, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -2204,7 +2204,7 @@ PED_MAJOR_VERSION=1 PED_MINOR_VERSION=8 -PED_MICRO_VERSION=8 +PED_MICRO_VERSION=9 PED_INTERFACE_AGE=0 PED_BINARY_AGE=0 PED_VERSION_SUFFIX= @@ -2532,7 +2532,7 @@ # Define the identity of the package. PACKAGE='parted' - VERSION='1.8.8' + VERSION='1.8.9' cat >>confdefs.h <<_ACEOF @@ -37578,53 +37578,7 @@ -cat >conftest.$ac_ext <<_ACEOF - - /* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - #if defined __s390__ || defined __s390x__ - # message s390 defined - #endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - compile_for_s390="no" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - compile_for_s390="yes" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test "$compile_for_s390" = "yes"; then + if test "$host_cpu" = s390 || test "$host_cpu" = s390x; then COMPILE_FOR_S390_TRUE= COMPILE_FOR_S390_FALSE='#' else @@ -39292,7 +39246,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by GNU parted $as_me 1.8.8, which was +This file was extended by GNU parted $as_me 1.8.9, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -39345,7 +39299,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -GNU parted config.status 1.8.8 +GNU parted config.status 1.8.9 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" --- parted-1.8.8.git.2008.03.24.orig/configure.ac +++ parted-1.8.8.git.2008.03.24/configure.ac @@ -5,7 +5,7 @@ dnl This file may be modified and/or distributed without restriction. AC_PREREQ(2.61) -AC_INIT([GNU parted],[1.8.8],[bug-parted@gnu.org]) +AC_INIT([GNU parted],[1.8.9],[bug-parted@gnu.org]) AC_CONFIG_SRCDIR(include/parted/parted.h) @@ -24,7 +24,7 @@ dnl set PED_BINARY_AGE _and_ PED_INTERFACE_AGE to 0. PED_MAJOR_VERSION=1 PED_MINOR_VERSION=8 -PED_MICRO_VERSION=8 +PED_MICRO_VERSION=9 PED_INTERFACE_AGE=0 PED_BINARY_AGE=0 PED_VERSION_SUFFIX= @@ -471,14 +471,7 @@ ]) ]) -dnl Checks for #defines. -AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([[ - #if defined __s390__ || defined __s390x__ - # message s390 defined - #endif - ]])], [compile_for_s390="no"], [compile_for_s390="yes"]) -AM_CONDITIONAL([COMPILE_FOR_S390], [test "$compile_for_s390" = "yes"]) +AM_CONDITIONAL([COMPILE_FOR_S390], [test "$host_cpu" = s390 || test "$host_cpu" = s390x]) dnl check for "check", unit testing library/header PKG_CHECK_MODULES([CHECK], [check >= 0.9.3], have_check=yes, have_check=no) --- parted-1.8.8.git.2008.03.24.orig/debian/patches/devfs.dpatch +++ parted-1.8.8.git.2008.03.24/debian/patches/devfs.dpatch @@ -0,0 +1,63 @@ +#! /bin/sh -e +## devfs.dpatch by Joey Hess +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: If /proc/partition probing fails, don't assume standard +## DP: partitions, but try out devfs style partitions too. +## DP: Closes: #243635 +## DP: Candidate for upstream integration. + +. `dirname $0`/DPATCH + +@DPATCH@ +diff -urN parted-1.6.99+1.7.0rc5/libparted/arch/linux.c parted-1.6.99+1.7.0rc5-devfs/libparted/arch/linux.c +--- parted-1.6.99+1.7.0rc5/libparted/arch/linux.c 2004-03-09 11:16:18.000000000 +0100 ++++ parted-1.6.99+1.7.0rc5-devfs/libparted/arch/linux.c 2004-04-14 10:01:05.000000000 +0200 +@@ -28,7 +28,8 @@ + #include + #include + #include ++#include + #include + #include + #include + #include +diff -Nur parted-1.6.99+1.7.0rc5/libparted/arch/linux.c parted-1.6.99+1.7.0rc5-devfs/libparted/arch/linux.c +--- parted-1.6.99+1.7.0rc5/libparted/arch/linux.c 2006-04-06 17:56:29.000000000 -0300 ++++ parted-1.6.99+1.7.0rc5-devfs/libparted/arch/linux.c 2006-05-08 15:08:37.000000000 -0300 +@@ -1589,6 +1589,23 @@ + } + + static int ++_probe_devfs_entry (const char *file, const struct stat *sb, int flag) ++{ ++ int len=strlen(file); ++ if (flag == FTW_F && file[len-1] == 'c' && file[len-2] == 's' && ++ file[len-3] == 'i' && file[len-4] == 'd' && file[len-5] == '/') { ++ _ped_device_probe(file); ++ } ++ return 0; ++} ++ ++static void ++_probe_devfs_devices () ++{ ++ ftw ("/dev", _probe_devfs_entry, 32); ++} ++ ++static int + _probe_standard_devices () + { + _ped_device_probe ("/dev/hda"); +@@ -1617,7 +1634,10 @@ + * because /proc/partitions might return devfs stuff, and we might not + * have devfs available + */ +- _probe_standard_devices (); ++ if (_have_devfs ()) ++ _probe_devfs_devices (); ++ else ++ _probe_standard_devices (); + + /* /sys/block is more reliable and consistent; fall back to using + * /proc/partitions if the former is unavailable, however. --- parted-1.8.8.git.2008.03.24.orig/debian/patches/baseline-symbols-update.dpatch +++ parted-1.8.8.git.2008.03.24/debian/patches/baseline-symbols-update.dpatch @@ -0,0 +1,37 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## baseline-symbols-update.dpatch by Otavio Salvador +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Update the library symbols to detect ABI changes. + +@DPATCH@ +diff -urNad parted-1.7.1~/scripts/data/abi/baseline_symbols.txt parted-1.7.1/scripts/data/abi/baseline_symbols.txt +--- parted-1.7.1~/scripts/data/abi/baseline_symbols.txt 2006-05-29 09:56:17.000000000 -0300 ++++ parted-1.7.1/scripts/data/abi/baseline_symbols.txt 2006-05-29 09:56:25.000000000 -0300 +@@ -28,6 +28,7 @@ + FUNC:ext2_commit_metadata + FUNC:ext2_copy_block + FUNC:ext2_destroy_dev_handle ++FUNC:ext2_determine_itoffset + FUNC:ext2_do_inode + FUNC:ext2_find_free_block + FUNC:ext2_find_free_inode +@@ -291,6 +292,8 @@ + FUNC:ped_disk_print + FUNC:ped_disk_probe + FUNC:ped_disk_remove_partition ++FUNC:ped_disk_s390_done ++FUNC:ped_disk_s390_init + FUNC:ped_disk_set_partition_geom + FUNC:ped_disk_sun_done + FUNC:ped_disk_sun_init +@@ -408,6 +411,9 @@ + FUNC:ped_unit_set_default + FUNC:ped_unregister_disk_type + FUNC:raw_part_parse ++FUNC:s390_alloc ++FUNC:s390_clobber ++FUNC:s390_probe + NOTYPE:__bss_start + NOTYPE:_edata + NOTYPE:_end --- parted-1.8.8.git.2008.03.24.orig/debian/patches/loop-partitions.dpatch +++ parted-1.8.8.git.2008.03.24/debian/patches/loop-partitions.dpatch @@ -0,0 +1,21 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## loop-partitions.dpatch by Colin Watson +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Loop devices can only have one partition, so don't generate device +## DP: names such as "/dev/loop0p1". + +@DPATCH@ +diff -urNad parted-1.8.8.git.2008.03.24~/libparted/arch/linux.c parted-1.8.8.git.2008.03.24/libparted/arch/linux.c +--- parted-1.8.8.git.2008.03.24~/libparted/arch/linux.c 2006-05-08 19:08:37.000000000 +0100 ++++ parted-1.8.8.git.2008.03.24/libparted/arch/linux.c 2008-06-24 12:48:19.000000000 +0100 +@@ -1993,6 +1993,9 @@ + /* replace /disc with /path%d */ + strcpy (result, dev->path); + snprintf (result + path_len - 5, 16, "/part%d", num); ++ } else if (!strncmp (dev->path, "/dev/loop", 9)) { ++ /* Loop devices can only have one partition. */ ++ strcpy (result, dev->path); + } else if (dev->type == PED_DEVICE_DAC960 + || dev->type == PED_DEVICE_CPQARRAY + || dev->type == PED_DEVICE_ATARAID --- parted-1.8.8.git.2008.03.24.orig/debian/patches/swap-uuid.dpatch +++ parted-1.8.8.git.2008.03.24/debian/patches/swap-uuid.dpatch @@ -0,0 +1,32 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## swap-uuid.dpatch by Colin Watson +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Create UUIDs on new swap partitions. + +@DPATCH@ +diff -urNad parted-1.8.8.git.2008.03.24~/libparted/fs/linux_swap/linux_swap.c parted-1.8.8.git.2008.03.24/libparted/fs/linux_swap/linux_swap.c +--- parted-1.8.8.git.2008.03.24~/libparted/fs/linux_swap/linux_swap.c 2008-03-24 22:29:03.000000000 +0000 ++++ parted-1.8.8.git.2008.03.24/libparted/fs/linux_swap/linux_swap.c 2008-06-24 02:06:19.000000000 +0100 +@@ -31,6 +31,7 @@ + #endif /* ENABLE_NLS */ + + #include ++#include + + #define SWAP_SPECIFIC(fs) ((SwapSpecific*) (fs->type_specific)) + #define BUFFER_SIZE 128 +@@ -388,9 +389,13 @@ + if (fs_info->version == 0) { + memcpy (sig, "SWAP-SPACE", 10); + } else { ++ uuid_t uuid_dat; + fs_info->header->new.version = 1; + fs_info->header->new.last_page = fs_info->page_count - 1; + fs_info->header->new.nr_badpages = 0; ++ uuid_generate (uuid_dat); ++ memcpy (fs_info->header->new.sws_uuid, uuid_dat, ++ sizeof (fs_info->header->new.sws_uuid)); + memcpy (sig, "SWAPSPACE2", 10); + } + --- parted-1.8.8.git.2008.03.24.orig/debian/patches/reiserfs-libname.dpatch +++ parted-1.8.8.git.2008.03.24/debian/patches/reiserfs-libname.dpatch @@ -0,0 +1,29 @@ +#! /bin/sh -e +## reiserfs-libname.dpatch by Timshel Knoll +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: loading proper reiserfs shared library names. +## DP: Closes: #163107 +## DP: Debian specific patch, uneeded because libreiserfs is not in sarge. + +. `dirname $0`/DPATCH + +@DPATCH@ +--- parted-1.7.0rc5.orig/libparted/fs/reiserfs/reiserfs.c ++++ parted-1.7.0rc5/libparted/fs/reiserfs/reiserfs.c +@@ -698,13 +698,13 @@ + + static int reiserfs_ops_init(void) + { +- if (!(libreiserfs_handle = dlopen("libreiserfs.so", RTLD_NOW))) ++ if (!(libreiserfs_handle = dlopen("libreiserfs-0.3.so.0", RTLD_NOW))) + goto error; + + if (!reiserfs_ops_interface_version_check()) + goto error_free_libreiserfs_handle; + +- if (!(libdal_handle = dlopen("libdal.so", RTLD_NOW))) ++ if (!(libdal_handle = dlopen("libdal-0.3.so.0", RTLD_NOW))) + goto error_free_libreiserfs_handle; + + INIT_SYM(reiserfs_fs_probe); --- parted-1.8.8.git.2008.03.24.orig/debian/patches/sparc-fix-raid.dpatch +++ parted-1.8.8.git.2008.03.24/debian/patches/sparc-fix-raid.dpatch @@ -0,0 +1,99 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## sparc-fix-raid.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad parted-1.6.25.1~/libparted/disk_sun.c parted-1.6.25.1/libparted/disk_sun.c +--- parted-1.6.25.1~/libparted/labels/sun.c 2006-04-16 07:18:49.000000000 +0200 ++++ parted-1.6.25.1/libparted/labels/sun.c 2006-04-16 07:19:22.000000000 +0200 +@@ -82,6 +82,7 @@ + int is_boot; + int is_root; + int is_lvm; ++ int is_raid; + }; + + typedef struct { +@@ -342,6 +343,7 @@ + sun_data->is_boot = sun_data->type == 0x1; + sun_data->is_root = sun_data->type == 0x2; + sun_data->is_lvm = sun_data->type == 0x8e; ++ sun_data->is_raid = sun_data->type == 0xfd; + + part->num = i + 1; + part->fs_type = ped_file_system_probe (&part->geom); +@@ -477,6 +479,7 @@ + sun_data->is_boot = 0; + sun_data->is_root = 0; + sun_data->is_lvm = 0; ++ sun_data->is_raid = 0; + } else { + part->disk_specific = NULL; + } +@@ -511,6 +514,7 @@ + new_sun_data->is_boot = old_sun_data->is_boot; + new_sun_data->is_root = old_sun_data->is_root; + new_sun_data->is_lvm = old_sun_data->is_lvm; ++ new_sun_data->is_raid = old_sun_data->is_raid; + return new_part; + } + +@@ -543,6 +547,10 @@ + sun_data->type = 0x8e; + return 1; + } ++ if (sun_data->is_raid) { ++ sun_data->type = 0xfd; ++ return 1; ++ } + + sun_data->type = 0x83; + if (fs_type) { +@@ -570,19 +578,25 @@ + case PED_PARTITION_BOOT: + sun_data->is_boot = state; + if (state) +- sun_data->is_root = sun_data->is_lvm = 0; ++ sun_data->is_root = sun_data->is_lvm = sun_data->is_raid = 0; + return ped_partition_set_system (part, part->fs_type); + + case PED_PARTITION_ROOT: + sun_data->is_root = state; + if (state) +- sun_data->is_boot = sun_data->is_lvm = 0; ++ sun_data->is_boot = sun_data->is_lvm = sun_data->is_raid = 0; + return ped_partition_set_system (part, part->fs_type); + + case PED_PARTITION_LVM: + sun_data->is_lvm = state; + if (state) +- sun_data->is_root = sun_data->is_boot = 0; ++ sun_data->is_root = sun_data->is_boot = sun_data->is_raid = 0; ++ return ped_partition_set_system (part, part->fs_type); ++ ++ case PED_PARTITION_RAID: ++ sun_data->is_raid = state; ++ if (state) ++ sun_data->is_root = sun_data->is_boot = sun_data->is_lvm = 0; + return ped_partition_set_system (part, part->fs_type); + + default: +@@ -608,6 +622,8 @@ + return sun_data->is_root; + case PED_PARTITION_LVM: + return sun_data->is_lvm; ++ case PED_PARTITION_RAID: ++ return sun_data->is_raid; + + default: + return 0; +@@ -623,6 +639,7 @@ + case PED_PARTITION_BOOT: + case PED_PARTITION_ROOT: + case PED_PARTITION_LVM: ++ case PED_PARTITION_RAID: + return 1; + + default: --- parted-1.8.8.git.2008.03.24.orig/debian/patches/array-bounds.dpatch +++ parted-1.8.8.git.2008.03.24/debian/patches/array-bounds.dpatch @@ -0,0 +1,68 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## array-bounds.dpatch by Colin Watson +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Backport from git (and also an extra tweak to avoid a signed/unsigned +## DP: warning): +## DP: +## DP: commit 8bd3645d7c184ac6a4076414b469ece15fbcccde +## DP: Author: Jim Meyering +## DP: Date: Mon Jan 14 20:01:39 2008 +0100 +## DP: +## DP: Avoid new error detected by very latest gcc. +## DP: +## DP: * libparted/fs/fat/traverse.c (fat_dir_entry_get_name): Don't reference +## DP: ->extension[3] via a pointer into the prior ->name[8] struct member. +## DP: gcc detected the reference beyond end of name[8]. +## DP: Declare first parameter to be "const". +## DP: * libparted/fs/fat/traverse.c: Update prototype. + +@DPATCH@ +diff -urNad parted-1.8.8.git.2008.03.24~/libparted/fs/fat/traverse.c parted-1.8.8.git.2008.03.24/libparted/fs/fat/traverse.c +--- parted-1.8.8.git.2008.03.24~/libparted/fs/fat/traverse.c 2008-06-24 01:52:51.000000000 +0100 ++++ parted-1.8.8.git.2008.03.24/libparted/fs/fat/traverse.c 2008-06-24 12:57:47.000000000 +0100 +@@ -340,22 +340,24 @@ + decrypts silly DOS names to FILENAME.EXT + */ + void +-fat_dir_entry_get_name (FatDirEntry*dir_entry, char *result) { +- int i; +- char *src; ++fat_dir_entry_get_name (const FatDirEntry *dir_entry, char *result) { ++ size_t i; ++ const char *src; ++ const char *ext; + + src = dir_entry->name; + +- for (i=0; i<8; i++) { ++ for (i=0; i < sizeof dir_entry->name; i++) { + if (src[i] == ' ' || src[i] == 0) break; + *result++ = src[i]; + } + +- if (src[8] != ' ' && src[8] != 0) { ++ ext = (const char *) dir_entry->extension; ++ if (ext[0] != ' ' && ext[0] != 0) { + *result++ = '.'; +- for (i=8; i<11; i++) { +- if (src[i] == ' ' || src[i] == 0) break; +- *result++ = src[i]; ++ for (i=0; i < sizeof dir_entry->extension; i++) { ++ if (ext[i] == ' ' || ext[i] == 0) break; ++ *result++ = ext[i]; + } + } + +diff -urNad parted-1.8.8.git.2008.03.24~/libparted/fs/fat/traverse.h parted-1.8.8.git.2008.03.24/libparted/fs/fat/traverse.h +--- parted-1.8.8.git.2008.03.24~/libparted/fs/fat/traverse.h 2008-06-24 01:52:51.000000000 +0100 ++++ parted-1.8.8.git.2008.03.24/libparted/fs/fat/traverse.h 2008-06-24 12:57:47.000000000 +0100 +@@ -66,7 +66,7 @@ + extern int fat_dir_entry_is_file (FatDirEntry* dir_entry); + extern int fat_dir_entry_is_system_file (FatDirEntry* dir_entry); + extern int fat_dir_entry_is_directory (FatDirEntry* dir_entry); +-extern void fat_dir_entry_get_name (FatDirEntry* dir_entry, char* result); ++extern void fat_dir_entry_get_name (const FatDirEntry* dir_entry, char* result); + extern int fat_dir_entry_is_active (FatDirEntry* dir_entry); + extern int fat_dir_entry_has_first_cluster (FatDirEntry* dir_entry, + PedFileSystem* fs); --- parted-1.8.8.git.2008.03.24.orig/debian/patches/doc-package.dpatch +++ parted-1.8.8.git.2008.03.24/debian/patches/doc-package.dpatch @@ -0,0 +1,24 @@ +#! /bin/sh -e +## doc-package.dpatch by Timshel Knoll +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Some small debian parted-doc fixup. +## DP: Will stay as debian specific change. + +. `dirname $0`/DPATCH + +@DPATCH@ +diff --git a/doc/C/parted.8 b/doc/C/parted.8 +index 7040402..5affe32 100644 +--- a/doc/C/parted.8 ++++ b/doc/C/parted.8 +@@ -133,7 +133,7 @@ The \fIparted\fP program is fully documented in the + .BR info(1) + format + .IR "GNU partitioning software" +-manual. ++manual which is distributed with the parted-doc Debian package. + .SH AUTHOR + This manual page was written by Timshel Knoll , + for the Debian GNU/Linux system (but may be used by others). +You have new mail in /var/mail/otavio --- parted-1.8.8.git.2008.03.24.orig/debian/patches/sparc-new-label.dpatch +++ parted-1.8.8.git.2008.03.24/debian/patches/sparc-new-label.dpatch @@ -0,0 +1,214 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## sparc-new-label.dpatch by David S. Miller and +## Fabio M. Di Nitto +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix sparc disk label generation. This is required for LDOM and +## DP: parallel installations with Solaris 10. + +@DPATCH@ +diff -urNad parted-1.8.8.git.2008.03.24~/libparted/labels/sun.c parted-1.8.8.git.2008.03.24/libparted/labels/sun.c +--- parted-1.8.8.git.2008.03.24~/libparted/labels/sun.c 2008-06-24 12:52:11.000000000 +0100 ++++ parted-1.8.8.git.2008.03.24/libparted/labels/sun.c 2008-06-24 12:56:06.000000000 +0100 +@@ -38,12 +38,30 @@ + #define SUN_DISK_MAGIC 0xDABE /* Disk magic number */ + #define SUN_DISK_MAXPARTITIONS 8 + +-#define WHOLE_DISK_ID 0x05 ++#define SUN_TAG_UNASSIGNED 0x00 /* Unassigned partition */ ++#define SUN_TAG_BOOT 0x01 /* Boot partition */ ++#define SUN_TAG_ROOT 0x02 /* Root filesystem */ ++#define SUN_TAG_SWAP 0x03 /* Swap partition */ ++#define SUN_TAG_USR 0x04 /* /usr filesystem */ ++#define SUN_TAG_BACKUP 0x05 /* Full-disk slice */ ++#define SUN_TAG_STAND 0x06 /* Stand partition */ ++#define SUN_TAG_VAR 0x07 /* /var filesystem */ ++#define SUN_TAG_HOME 0x08 /* /home filesystem */ ++#define SUN_TAG_ALTSCTR 0x09 /* Alt sector partition */ ++#define SUN_TAG_CACHE 0x0a /* Cachefs partition */ ++#define SUN_TAG_RESERVED 0x0b /* SMI reserved data */ ++#define SUN_TAG_LINUX_SWAP 0x82 /* Linux SWAP */ ++#define SUN_TAG_LINUX_NATIVE 0x83 /* Linux filesystem */ ++#define SUN_TAG_LINUX_LVM 0x8e /* Linux LVM */ ++#define SUN_TAG_LINUX_RAID 0xfd /* LInux RAID */ ++ ++#define SUN_FLAG_UNMNT 0x01 /* Unmountable partition*/ ++#define SUN_FLAG_RONLY 0x10 /* Read only */ ++ + #define WHOLE_DISK_PART 2 /* as in 0, 1, 2 (3rd partition) */ +-#define LINUX_SWAP_ID 0x82 + + typedef struct _SunRawPartition SunRawPartition; +-typedef struct _SunPartitionInfo SunPartitionInfo; ++typedef struct _SunPartInfo SunPartInfo; + typedef struct _SunRawLabel SunRawLabel; + typedef struct _SunPartitionData SunPartitionData; + typedef struct _SunDiskData SunDiskData; +@@ -53,18 +71,31 @@ + u_int32_t num_sectors; /* ...and it's length */ + }; + +-struct __attribute__ ((packed)) _SunPartitionInfo { +- u_int8_t spare1; +- u_int8_t id; /* Partition type */ +- u_int8_t spare2; +- u_int8_t flags; /* Partition flags */ ++struct __attribute__ ((packed)) _SunPartInfo { ++ u_int16_t tag; /* Tagged type */ ++ u_int16_t flags; /* Partition flags */ + }; + ++#define SUN_LABEL_ID_SIZE 128 ++#define SUN_VOLUME_ID_SIZE 8 ++ ++#define SUN_LABEL_VERSION 0x00000001 ++#define SUN_LABEL_SANE 0x600ddeee ++ + struct __attribute__ ((packed)) _SunRawLabel { +- char info[128]; /* Informative text string */ +- u_int8_t spare0[14]; +- SunPartitionInfo infos[SUN_DISK_MAXPARTITIONS]; +- u_int8_t spare1[246]; /* Boot information etc. */ ++ char label_id[SUN_LABEL_ID_SIZE]; /* Informative text string */ ++ u_int32_t version; ++ char volume_id[SUN_VOLUME_ID_SIZE]; ++ u_int16_t num_part; ++ SunPartInfo infos[SUN_DISK_MAXPARTITIONS]; ++ u_int16_t pad1; ++ u_int32_t bootinfo[3]; ++ u_int32_t sanity; ++ u_int32_t resv[10]; ++ u_int32_t part_timestamps[SUN_DISK_MAXPARTITIONS]; ++ u_int32_t write_reinstruct; ++ u_int32_t read_reinstruct; ++ u_int8_t pad2[148]; + u_int16_t rspeed; /* Disk rotational speed */ + u_int16_t pcylcount; /* Physical cylinder count */ + u_int16_t sparecyl; /* extra sects per cylinder */ +@@ -193,6 +224,9 @@ + + /* #gentoo-sparc people agree that nacyl = 0 is the best option */ + label->magic = PED_CPU_TO_BE16 (SUN_DISK_MAGIC); ++ label->version = PED_CPU_TO_BE32 (SUN_LABEL_VERSION); ++ label->num_part = PED_CPU_TO_BE16 (SUN_DISK_MAXPARTITIONS); ++ label->sanity = PED_CPU_TO_BE32 (SUN_LABEL_SANE); + label->nacyl = 0; + label->pcylcount = PED_CPU_TO_BE16 (bios_geom->cylinders); + label->rspeed = PED_CPU_TO_BE16 (5400); +@@ -203,13 +237,13 @@ + label->ncyl = PED_CPU_TO_BE16 (bios_geom->cylinders - 0); + + /* Add a whole disk partition at a minimum */ +- label->infos[WHOLE_DISK_PART].id = WHOLE_DISK_ID; ++ label->infos[WHOLE_DISK_PART].tag = PED_CPU_TO_BE16 (SUN_TAG_BACKUP); + label->partitions[WHOLE_DISK_PART].start_cylinder = 0; + label->partitions[WHOLE_DISK_PART].num_sectors = + PED_CPU_TO_BE32(bios_geom->cylinders * cyl_size); + + /* Now a neato string to describe this label */ +- snprintf(label->info, sizeof(label->info) - 1, ++ snprintf(label->label_id, sizeof(label->label_id) - 1, + "GNU Parted Custom cyl %d alt %d hd %d sec %d", + PED_BE16_TO_CPU(label->ncyl), + PED_BE16_TO_CPU(label->nacyl), +@@ -326,9 +360,9 @@ + for (i = 0; i < SUN_DISK_MAXPARTITIONS; i++) { + if (!PED_BE32_TO_CPU(label->partitions[i].num_sectors)) + continue; +- if (!label->infos[i].id) ++ if (!label->infos[i].tag) + continue; +- if (label->infos[i].id == WHOLE_DISK_ID) ++ if (label->infos[i].tag == PED_CPU_TO_BE16 (SUN_TAG_BACKUP)) + continue; + + start = PED_BE32_TO_CPU(label->partitions[i].start_cylinder) +@@ -341,11 +375,11 @@ + goto error; + + sun_data = part->disk_specific; +- sun_data->type = label->infos[i].id; +- sun_data->is_boot = sun_data->type == 0x1; +- sun_data->is_root = sun_data->type == 0x2; +- sun_data->is_lvm = sun_data->type == 0x8e; +- sun_data->is_raid = sun_data->type == 0xfd; ++ sun_data->type = PED_BE16_TO_CPU (label->infos[i].tag); ++ sun_data->is_boot = sun_data->type == SUN_TAG_BOOT; ++ sun_data->is_root = sun_data->type == SUN_TAG_ROOT; ++ sun_data->is_lvm = sun_data->type == SUN_TAG_LINUX_LVM; ++ sun_data->is_raid = sun_data->type == SUN_TAG_LINUX_RAID; + + part->num = i + 1; + part->fs_type = ped_file_system_probe (&part->geom); +@@ -373,7 +407,7 @@ + + if (!ped_device_read (disk->dev, &old_label, 0, 1)) + return; +- if (old_label.info [0] ++ if (old_label.label_id [0] + && PED_BE16_TO_CPU (old_label.magic) == SUN_DISK_MAGIC) + memcpy (&sun_specific->raw_label, &old_label, 512); + } +@@ -398,7 +432,7 @@ + memset (label->partitions, 0, + sizeof (SunRawPartition) * SUN_DISK_MAXPARTITIONS); + memset (label->infos, 0, +- sizeof (SunPartitionInfo) * SUN_DISK_MAXPARTITIONS); ++ sizeof (SunPartInfo) * SUN_DISK_MAXPARTITIONS); + + for (i = 0; i < SUN_DISK_MAXPARTITIONS; i++) { + part = ped_disk_get_partition (disk, i + 1); +@@ -408,7 +442,7 @@ + partition, so let's put it there for safety + sake. */ + +- label->infos[i].id = WHOLE_DISK_ID; ++ label->infos[i].tag = PED_CPU_TO_BE16 (SUN_TAG_BACKUP); + label->partitions[i].start_cylinder = 0; + label->partitions[i].num_sectors = + PED_CPU_TO_BE32(disk_data->length); +@@ -418,7 +452,7 @@ + continue; + + sun_data = part->disk_specific; +- label->infos[i].id = sun_data->type; ++ label->infos[i].tag = PED_CPU_TO_BE16 (sun_data->type); + label->partitions[i].start_cylinder + = PED_CPU_TO_BE32 (part->geom.start + / (disk->dev->bios_geom.sectors +@@ -537,28 +571,28 @@ + part->fs_type = fs_type; + + if (sun_data->is_boot) { +- sun_data->type = 0x1; ++ sun_data->type = SUN_TAG_BOOT; + return 1; + } + if (sun_data->is_root) { +- sun_data->type = 0x2; ++ sun_data->type = SUN_TAG_ROOT; + return 1; + } + if (sun_data->is_lvm) { +- sun_data->type = 0x8e; ++ sun_data->type = SUN_TAG_LINUX_LVM; + return 1; + } + if (sun_data->is_raid) { +- sun_data->type = 0xfd; ++ sun_data->type = SUN_TAG_LINUX_RAID; + return 1; + } + +- sun_data->type = 0x83; ++ sun_data->type = SUN_TAG_LINUX_NATIVE; + if (fs_type) { + if (!strcmp (fs_type->name, "linux-swap")) +- sun_data->type = 0x82; ++ sun_data->type = SUN_TAG_LINUX_SWAP; + else if (!strcmp (fs_type->name, "ufs")) +- sun_data->type = 0x6; ++ sun_data->type = SUN_TAG_STAND; + } + + return 1; --- parted-1.8.8.git.2008.03.24.orig/debian/patches/unpartitioned-disks.dpatch +++ parted-1.8.8.git.2008.03.24/debian/patches/unpartitioned-disks.dpatch @@ -0,0 +1,49 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## unpartitioned-disks.dpatch by Colin Watson +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Don't try to call BLKPG ioctls on disks that can't be partitioned. + +@DPATCH@ +diff -urNad parted-1.8.8.git.2008.03.24~/libparted/arch/linux.c parted-1.8.8.git.2008.03.24/libparted/arch/linux.c +--- parted-1.8.8.git.2008.03.24~/libparted/arch/linux.c 2008-06-24 12:48:55.000000000 +0100 ++++ parted-1.8.8.git.2008.03.24/libparted/arch/linux.c 2008-06-24 12:50:20.000000000 +0100 +@@ -2102,6 +2102,18 @@ + } + + static int ++_has_partitions (const PedDisk* disk) ++{ ++ PED_ASSERT(disk != NULL, return 0); ++ ++ /* Some devices can't be partitioned. */ ++ if (!strcmp (disk->type->name, "loop")) ++ return 0; ++ ++ return 1; ++} ++ ++static int + _blkpg_part_command (PedDevice* dev, struct blkpg_partition* part, int op) + { + LinuxSpecific* arch_specific = LINUX_SPECIFIC (dev); +@@ -2126,6 +2138,9 @@ + PED_ASSERT(disk->dev->sector_size % PED_SECTOR_SIZE_DEFAULT == 0, + return 0); + ++ if (!_has_partitions (disk)) ++ return 0; ++ + if (ped_disk_type_check_feature (disk->type, + PED_DISK_TYPE_PARTITION_NAME)) + vol_name = ped_partition_get_name (part); +@@ -2174,6 +2189,9 @@ + { + struct blkpg_partition linux_part; + ++ if (!_has_partitions (disk)) ++ return 0; ++ + memset (&linux_part, 0, sizeof (linux_part)); + linux_part.pno = n; + return _blkpg_part_command (disk->dev, &linux_part, --- parted-1.8.8.git.2008.03.24.orig/debian/patches/00list +++ parted-1.8.8.git.2008.03.24/debian/patches/00list @@ -0,0 +1,26 @@ +# Debian specific patches +doc-package +reiserfs-libname + +# Patch susceptible to be merged upstream +devfs +#kfreebsd-gnu +swap-uuid +gptsync +loop-partitions +unpartitioned-disks + +# Will also stay debian specific, but depends on some of the above :/ +sparc-fix-raid +sparc-new-label + +# Patch which may be obsolet. +#amiga-raid-lvm_fix + +# Backports +array-bounds + +######################### +# ABI checking symbols update +######################## +baseline-symbols-update --- parted-1.8.8.git.2008.03.24.orig/debian/patches/DPATCH +++ parted-1.8.8.git.2008.03.24/debian/patches/DPATCH @@ -0,0 +1,16 @@ +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch}" + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $patch_opts -p1 -T < $0;; + -unpatch) patch $patch_opts -p1 -R < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac + +exit 0 --- parted-1.8.8.git.2008.03.24.orig/debian/patches/amiga-raid-lvm-fix.dpatch +++ parted-1.8.8.git.2008.03.24/debian/patches/amiga-raid-lvm-fix.dpatch @@ -0,0 +1,36 @@ +#!/bin/sh -e +## amiga_raid_lvm_fix.dpatch by Sven Luther +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Use real partition types instead of flags for RAID/LVM, as partition types they are. + +. `dirname $0`/DPATCH + +@DPATCH@ +--- parted-1.6.23/libparted/disk_amiga.c.orig 2005-07-11 12:24:01.000000000 +0200 ++++ parted-1.6.23/libparted/disk_amiga.c 2005-07-11 12:37:30.464024848 +0200 +@@ -941,12 +942,20 @@ + else partition->pb_Flags &= ~(PED_CPU_TO_BE32(PBFF_NOMOUNT)); + return 1; + case PED_PARTITION_RAID: +- if (state) partition->pb_Flags |= PED_CPU_TO_BE32(PBFF_RAID); +- else partition->pb_Flags &= ~(PED_CPU_TO_BE32(PBFF_RAID)); ++ if (state) partition->de_DosType = PED_CPU_TO_BE32(0x52414944); /* 'RAID' */ ++ else partition->de_DosType = PED_CPU_TO_BE32(0x00000000); ++ if (state) { ++ partition->pb_Flags |= PED_CPU_TO_BE32(PBFF_RAID); ++ partition->pb_Flags &= ~(PED_CPU_TO_BE32(PBFF_LVM)); ++ } else partition->pb_Flags &= ~(PED_CPU_TO_BE32(PBFF_RAID)); + return 1; + case PED_PARTITION_LVM: +- if (state) partition->pb_Flags |= PED_CPU_TO_BE32(PBFF_LVM); +- else partition->pb_Flags &= ~(PED_CPU_TO_BE32(PBFF_LVM)); ++ if (state) partition->de_DosType = PED_CPU_TO_BE32(0x4c564d00); /* 'LVM\0' */ ++ else partition->de_DosType = PED_CPU_TO_BE32(0x00000000); ++ if (state) { ++ partition->pb_Flags |= PED_CPU_TO_BE32(PBFF_LVM); ++ partition->pb_Flags &= ~(PED_CPU_TO_BE32(PBFF_RAID)); ++ } else partition->pb_Flags &= ~(PED_CPU_TO_BE32(PBFF_LVM)); + return 1; + default: + return 0; --- parted-1.8.8.git.2008.03.24.orig/debian/patches/gptsync.dpatch +++ parted-1.8.8.git.2008.03.24/debian/patches/gptsync.dpatch @@ -0,0 +1,397 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## gptsync.dpatch by Matthew Garrett and +## Colin Watson +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: On Intel Mac systems, write a synced MBR rather than a protective +## DP: MBR. + +@DPATCH@ +diff -urNad parted-1.8.8.git.2008.03.24~/libparted/labels/gpt.c parted-1.8.8.git.2008.03.24/libparted/labels/gpt.c +--- parted-1.8.8.git.2008.03.24~/libparted/labels/gpt.c 2008-06-24 01:52:51.000000000 +0100 ++++ parted-1.8.8.git.2008.03.24/libparted/labels/gpt.c 2008-06-24 12:43:37.000000000 +0100 +@@ -11,6 +11,11 @@ + Per Intel EFI Specification v1.02 + http://developer.intel.com/technology/efi/efi.htm + ++ DMI handling from dmidecode: ++ (C) 2000-2002 Alan Cox ++ (C) 2002-2005 Jean Delvare ++ Reduced for Intel Mac detection by Colin Watson ++ + 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 +@@ -35,6 +40,8 @@ + #include + #include + #include ++#include ++#include + #include + #include + #include +@@ -258,6 +265,201 @@ + static PedDiskType gpt_disk_type; + + ++#define WORD(x) (*(const uint16_t *)(x)) ++#define DWORD(x) (*(const uint32_t *)(x)) ++ ++struct dmi_header ++{ ++ uint8_t type; ++ uint8_t length; ++ uint16_t handle; ++}; ++ ++#define APPLE_DMI "Apple Computer, Inc." ++static int is_apple = 0; ++ ++ ++static int ++checksum (const uint8_t* buf, size_t len) ++{ ++ uint8_t sum = 0; ++ size_t a; ++ ++ for (a = 0; a < len; a++) ++ sum += buf[a]; ++ return (sum == 0); ++} ++ ++/* Copy a physical memory chunk into a memory buffer. ++ * This function allocates memory. ++ */ ++static void* ++mem_chunk (size_t base, size_t len) ++{ ++ void* p; ++ int fd; ++ size_t mmoffset; ++ void* mmp; ++ ++ fd = open ("/dev/mem", O_RDONLY); ++ if (fd == -1) ++ return NULL; ++ ++ p = malloc (len); ++ if (p == NULL) ++ { ++ close (fd); ++ return NULL; ++ } ++ ++#ifdef _SC_PAGESIZE ++ mmoffset = base % sysconf (_SC_PAGESIZE); ++#else ++ mmoffset = base % getpagesize (); ++#endif ++ /* Please note that we don't use mmap() for performance reasons here, ++ * but to workaround problems many people encountered when trying ++ * to read from /dev/mem using regular read() calls. ++ */ ++ mmp = mmap (0, mmoffset + len, PROT_READ, MAP_SHARED, fd, ++ base - mmoffset); ++ if (mmp == MAP_FAILED) { ++ free (p); ++ close (fd); ++ return NULL; ++ } ++ ++ memcpy (p, mmp + mmoffset, len); ++ ++ munmap (mmp, mmoffset + len); ++ ++ close (fd); ++ ++ return p; ++} ++ ++static const char* ++dmi_string (struct dmi_header* dm, uint8_t s) ++{ ++ char* bp = (char*)dm; ++ size_t i, len; ++ ++ if (s == 0) ++ return "Not Specified"; ++ ++ bp += dm->length; ++ while (s > 1 && *bp) ++ { ++ bp += strlen (bp); ++ bp++; ++ s--; ++ } ++ ++ if (!*bp) ++ return ""; ++ ++ /* ASCII filtering */ ++ len = strlen (bp); ++ for (i = 0; i < len; i++) ++ if (bp[i] < 32 || bp[i] == 127) ++ bp[i] = '.'; ++ ++ return bp; ++} ++ ++static char* ++dmi_table (uint32_t base, uint16_t len, uint16_t num) ++{ ++ uint8_t* buf; ++ uint8_t* data; ++ int i = 0; ++ char* ret = NULL; ++ ++ buf = mem_chunk (base, len); ++ if (buf == NULL) ++ return NULL; ++ ++ data = buf; ++ while (i < num && data + sizeof (struct dmi_header) <= buf + len) { ++ uint8_t* next; ++ struct dmi_header* h = (struct dmi_header*)data; ++ ++ /* Stop decoding at end of table marker */ ++ if (h->type == 127) ++ break; ++ ++ /* Look for the next handle */ ++ next = data + h->length; ++ while (next - buf + 1 < len && (next[0] != 0 || next[1] != 0)) ++ next++; ++ next += 2; ++ /* system-manufacturer */ ++ if (h->type == 1 && h->length > 0x04) { ++ ret = strdup (dmi_string (h, data[0x04])); ++ break; ++ } ++ ++ data = next; ++ i++; ++ } ++ ++ free (buf); ++ return ret; ++} ++ ++static char* ++smbios_decode (uint8_t* buf) ++{ ++ if (checksum (buf, buf[0x05]) && ++ memcmp (buf + 0x10, "_DMI_", 5) == 0 && ++ checksum (buf + 0x10, 0x0F)) { ++ return dmi_table (DWORD (buf + 0x18), WORD (buf + 0x16), ++ WORD (buf + 0x1C)); ++ } ++ ++ return NULL; ++} ++ ++static char* ++legacy_decode (uint8_t* buf) ++{ ++ if (checksum (buf, 0x0F)) { ++ return dmi_table (DWORD (buf + 0x08), WORD (buf + 0x06), ++ WORD (buf + 0x0C)); ++ } ++ ++ return NULL; ++} ++ ++static char* ++dmi_system_manufacturer (void) ++{ ++ uint8_t* buf; ++ size_t fp; ++ char* ret = NULL; ++ ++ buf = mem_chunk (0xF0000, 0x10000); ++ if (buf == NULL) ++ return NULL; ++ ++ for (fp = 0; fp <= 0xFFF0; fp += 16) { ++ if (memcmp (buf + fp, "_SM_", 4) == 0 && fp <= 0xFFE0) { ++ ret = smbios_decode (buf + fp); ++ if (ret) ++ break; ++ fp += 16; ++ } else if (memcmp (buf + fp, "_DMI_", 5) == 0) { ++ ret = legacy_decode (buf + fp); ++ if (ret) ++ break; ++ } ++ } ++ ++ free (buf); ++ return ret; ++} ++ ++ + static inline uint32_t + pth_get_size (const PedDevice* dev) + { +@@ -450,7 +652,8 @@ + if (!gpt_sig_found) + return 0; + +- if (ped_device_read(dev, &legacy_mbr, 0, GPT_HEADER_SECTORS)) { ++ if (!is_apple && ++ ped_device_read(dev, &legacy_mbr, 0, GPT_HEADER_SECTORS)) { + if (!_pmbr_is_valid (&legacy_mbr)) { + int ex_status = ped_exception_throw ( + PED_EXCEPTION_WARNING, +@@ -801,6 +1004,10 @@ + * warn if it's not there, and treat the disk as MSDOS, with a note + * for users to use Parted to "fix up" their disk if they + * really want it to be considered GPT. ++ * ++ * Of course, this is incompatible with how Apple handle things. For ++ * legacy BIOS compatibility on Apple machines, we need a valid legacy MBR ++ * rather than a protective one. Aren't standards wonderful? + ************************************************************/ + static int + gpt_read (PedDisk * disk) +@@ -959,6 +1166,95 @@ + return ped_device_write (dev, &pmbr, GPT_PMBR_LBA, GPT_PMBR_SECTORS); + } + ++static int ++fill_raw_part (PartitionRecord_t* raw_part, PedPartition *part, PedSector offset, int number) ++{ ++ GPTPartitionData* gpt_part_data = part->disk_specific; ++ ++ if (part->fs_type) { ++ if (strncmp (part->fs_type->name, "fat", 3) == 0) ++ raw_part->OSType = 0x0b; ++ else if (strncmp (part->fs_type->name, "ntfs", 4) == 0) ++ raw_part->OSType = 0x07; ++ else if (strncmp (part->fs_type->name, "hfs", 3) == 0) ++ raw_part->OSType = 0xaf; ++ else if (strncmp (part->fs_type->name, "ext3", 4) == 0) ++ raw_part->OSType = 0x83; ++ else if (strncmp (part->fs_type->name, "linux-swap", 10) == 0) ++ raw_part->OSType = 0x82; ++ else ++ raw_part->OSType = 0xef; ++ } ++ ++ /* EFI system partitions will have a FAT filesystem and ++ PARTITION_SYSTEM_GUID */ ++ ++ if (!guid_cmp (gpt_part_data->type, PARTITION_SYSTEM_GUID)) { ++ if (raw_part->OSType == 0x0b) { ++ raw_part->OSType = 0xee; ++ } ++ } ++ ++ /* Apple's firmware appears to become unhappy if the second partition ++ isn't bootable */ ++ ++ if (number == 2) ++ raw_part->BootIndicator = 0x80; ++ ++ raw_part->StartingLBA = PED_CPU_TO_LE32 ((part->geom.start - offset) ++ / (part->disk->dev->sector_size / 512)); ++ ++ raw_part->SizeInLBA = PED_CPU_TO_LE32 (part->geom.length ++ / (part->disk->dev->sector_size / 512)); ++ ++ /* Apple's firmware also appears to be unhappy if the EFI system ++ partition doesn't extend all the way to the start of the disk */ ++ ++ if (raw_part->OSType == 0xee) { ++ raw_part->SizeInLBA += raw_part->StartingLBA - 1; ++ raw_part->StartingLBA = 1; ++ } ++ ++ raw_part->StartHead = 0xfe; ++ raw_part->StartSector = 0xff; ++ raw_part->StartTrack = 0xff; ++ raw_part->EndHead = 0xfe; ++ raw_part->EndSector = 0xff; ++ raw_part->EndTrack = 0xff; ++ ++ return 1; ++} ++ ++static int ++_gptsync (const PedDisk * disk) ++{ ++ LegacyMBR_t pmbr; ++ PedPartition* part; ++ int i; ++ ++ if (!ped_device_read (disk->dev, (void*) &pmbr, GPT_PMBR_LBA, ++ GPT_PMBR_SECTORS)) ++ return 0; ++ ++ memset(&pmbr.PartitionRecord, 0, sizeof(pmbr.PartitionRecord)); ++ pmbr.Signature = PED_CPU_TO_LE16(MSDOS_MBR_SIGNATURE); ++ ++ for (i=1; i<=4; i++) { ++ part = ped_disk_get_partition (disk, i); ++ if (!part) ++ continue; ++ ++ if (!fill_raw_part (&pmbr.PartitionRecord [i - 1], part, 0, i)) ++ return 0; ++ } ++ ++ if (!ped_device_write (disk->dev, (void*) &pmbr, GPT_PMBR_LBA, ++ GPT_PMBR_SECTORS)) ++ return 0; ++ ++ return ped_device_sync (disk->dev); ++} ++ + static void + _generate_header (const PedDisk* disk, int alternate, uint32_t ptes_crc, + GuidPartitionTableHeader_t** gpt_p) +@@ -1057,9 +1353,15 @@ + + ptes_crc = efi_crc32 (ptes, ptes_size); + +- /* Write protective MBR */ +- if (!_write_pmbr (disk->dev)) +- goto error_free_ptes; ++ if (is_apple) { ++ /* Write synced MBR */ ++ if (!_gptsync (disk)) ++ goto error_free_ptes; ++ } else { ++ /* Write protective MBR */ ++ if (!_write_pmbr (disk->dev)) ++ goto error_free_ptes; ++ } + + /* Write PTH and PTEs */ + _generate_header (disk, 0, ptes_crc, &gpt); +@@ -1523,10 +1825,25 @@ + void + ped_disk_gpt_init() + { ++ const char* force_gpt_apple; ++ + PED_ASSERT (sizeof (GuidPartitionEntryAttributes_t) == 8, return); + PED_ASSERT (sizeof (GuidPartitionEntry_t) == 128, return); + + ped_disk_type_register (&gpt_disk_type); ++ ++ force_gpt_apple = getenv ("PARTED_GPT_APPLE"); ++ if (force_gpt_apple) { ++ if (strcmp (force_gpt_apple, "1") == 0) ++ is_apple = 1; ++ } else { ++ char* manufacturer = dmi_system_manufacturer (); ++ if (manufacturer && ++ strncasecmp (APPLE_DMI, manufacturer, ++ strlen (APPLE_DMI)) == 0) ++ is_apple = 1; ++ free (manufacturer); ++ } + } + + void --- parted-1.8.8.git.2008.03.24.orig/debian/patches/kfreebsd-gnu.dpatch +++ parted-1.8.8.git.2008.03.24/debian/patches/kfreebsd-gnu.dpatch @@ -0,0 +1,1407 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## kfreebsd-gnu.dpatch by Otavio Salvador +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: This dpatch was make to include the patch built by Robert Millan. +## DP: Closes: #363381 +## DP: Upstream: not merged + +@DPATCH@ +diff -urNad parted-1.7.0~/configure.ac parted-1.7.0/configure.ac +--- parted-1.7.0~/configure.ac 2006-05-19 03:54:01.000000000 -0300 ++++ parted-1.7.0/configure.ac 2006-05-19 03:54:02.000000000 -0300 +@@ -48,6 +48,8 @@ + linux*) OS=linux ;; + gnu*) OS=gnu ;; + beos*) OS=beos ;; ++ freebsd* | kfreebsd*-gnu) ++ OS=freebsd ;; + *) AC_MSG_ERROR([Unknown or unsupported OS "$host_os". Only "linux", "gnu" and "beos" are supported in this version of GNU Parted.]) ;; + esac + AC_SUBST(OS) +@@ -164,6 +166,7 @@ + #include + #include + ]) ++AC_CHECK_TYPE(loff_t, long long) + + AM_ENABLE_SHARED + if test "$OS" = linux -a $ac_cv_sizeof_off_t -lt 8; then +@@ -331,6 +334,20 @@ + OS_LIBS="$OS_LIBS -lsocket" + fi + ++dnl FreeBSD (and GNU/kFreeBSD): ++if test "$OS" = freebsd; then ++dnl CFLAGS="$CFLAGS -D_GNU_SOURCE=1" ++ ++dnl libgeom ++ AC_CHECK_LIB(geom, gctl_get_handle, ++ OS_LIBS="$OS_LIBS -lgeom", ++ AC_MSG_ERROR( ++GNU Parted requires libgeom when running on FreeBSD or derivative systems. ++ ) ++ exit ++ ) ++fi ++ + AC_SUBST(OS_LIBS) + + dnl One day, gettext might support libtool... +@@ -352,7 +369,7 @@ + exit + ) + +-AC_CHECK_HEADERS(getopt.h) ++AC_CHECK_HEADERS(getopt.h endian.h sys/endian.h) + + dnl required for libparted/llseek.c (TODO: make linux-x86 only) + if test "$OS" = linux; then +@@ -399,7 +416,9 @@ + + + dnl Checks for library functions. +-AC_CHECK_FUNCS(sigaction) ++if test "$OS" != freebsd; then ++ AC_CHECK_FUNCS(sigaction) ++fi + AC_CHECK_FUNCS(getuid) + + if test "$with_readline" = yes; then +diff -urNad parted-1.7.0~/include/parted/Makefile.am parted-1.7.0/include/parted/Makefile.am +--- parted-1.7.0~/include/parted/Makefile.am 2006-05-19 03:54:01.000000000 -0300 ++++ parted-1.7.0/include/parted/Makefile.am 2006-05-19 03:54:02.000000000 -0300 +@@ -1,6 +1,7 @@ + partedincludedir = $(includedir)/parted + partedinclude_HEADERS = gnu.h \ + linux.h \ ++ freebsd.h \ + constraint.h \ + debug.h \ + device.h \ +diff -urNad parted-1.7.0~/include/parted/freebsd.h parted-1.7.0/include/parted/freebsd.h +--- parted-1.7.0~/include/parted/freebsd.h 1969-12-31 21:00:00.000000000 -0300 ++++ parted-1.7.0/include/parted/freebsd.h 2006-05-19 03:54:02.000000000 -0300 +@@ -0,0 +1,47 @@ ++/* ++ libparted - a library for manipulating disk partitions ++ Copyright (C) 2001 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 2 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, write to the Free Software ++ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA ++*/ ++ ++#ifndef PED_FREEBSD_H_INCLUDED ++#define PED_FREEBSD_H_INCLUDED ++ ++#include ++#include ++ ++#include ++ ++#if !defined(__FreeBSD_version) && defined(__FreeBSD_kernel_version) ++#define __FreeBSD_version __FreeBSD_kernel_version ++#endif ++ ++#define FREEBSD_SPECIFIC(dev) ((FreeBSDSpecific*) (dev)->arch_specific) ++ ++typedef struct _FreeBSDSpecific FreeBSDSpecific; ++ ++struct _FreeBSDSpecific { ++#if (__FreeBSD_version >= 500000) && (__FreeBSD_version < 600000) ++ unsigned char channel; ++ unsigned char device; ++#endif ++ int fd; ++}; ++ ++extern PedArchitecture ped_freebsd_arch; ++ ++#endif /* PED_FREEBSD_H_INCLUDED */ ++ +diff -urNad parted-1.7.0~/libparted/Makefile.am parted-1.7.0/libparted/Makefile.am +--- parted-1.7.0~/libparted/Makefile.am 2006-05-19 03:54:01.000000000 -0300 ++++ parted-1.7.0/libparted/Makefile.am 2006-05-19 03:54:02.000000000 -0300 +@@ -28,7 +28,8 @@ + + EXTRA_libparted_la_SOURCES = arch/linux.c \ + arch/gnu.c \ +- arch/beos.c ++ arch/beos.c \ ++ arch/freebsd.c + + libparted_la_LIBADD = @OS_LIBS@ \ + fs/libfs.la \ +diff -urNad parted-1.7.0~/libparted/arch/freebsd.c parted-1.7.0/libparted/arch/freebsd.c +--- parted-1.7.0~/libparted/arch/freebsd.c 1969-12-31 21:00:00.000000000 -0300 ++++ parted-1.7.0/libparted/arch/freebsd.c 2006-05-19 03:54:02.000000000 -0300 +@@ -0,0 +1,1197 @@ ++/* ++ libparted - a library for manipulating disk partitions ++ Copyright (C) 1999 - 2005 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 2 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, write to the Free Software ++ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA ++*/ ++ ++#include "config.h" ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#if ENABLE_NLS ++# include ++# define _(String) dgettext (PACKAGE, String) ++#else ++# define _(String) (String) ++#endif /* ENABLE_NLS */ ++ ++static char* _device_get_part_path (PedDevice* dev, int num); ++static int _partition_is_mounted_by_path (const char* path); ++ ++static int ++_device_stat (PedDevice* dev, struct stat * dev_stat) ++{ ++ PED_ASSERT (dev != NULL, return 0); ++ PED_ASSERT (!dev->external_mode, return 0); ++ ++ while (1) { ++ if (!stat (dev->path, dev_stat)) { ++ return 1; ++ } else { ++ if (ped_exception_throw ( ++ PED_EXCEPTION_ERROR, ++ PED_EXCEPTION_RETRY_CANCEL, ++ _("Could not stat device %s - %s."), ++ dev->path, ++ strerror (errno)) ++ != PED_EXCEPTION_RETRY) ++ return 0; ++ } ++ } ++} ++ ++static int ++_device_probe_type (PedDevice* dev) ++{ ++ struct stat dev_stat; ++ char *np; ++ PedExceptionOption ex_status; ++ ++#if (__FreeBSD_version >= 500000) && (__FreeBSD_version < 600000) ++ FreeBSDSpecific* arch_specific = FREEBSD_SPECIFIC (dev); ++#endif ++ ++ if (!_device_stat (dev, &dev_stat)) ++ return 0; ++ ++ if (!S_ISCHR(dev_stat.st_mode)) { ++ dev->type = PED_DEVICE_FILE; ++ return 1; ++ } ++ ++ /* On FreeBSD ad0 ist the ATA device */ ++ np = strrchr(dev->path, '/'); ++ if(np == NULL) ++ { ++ dev->type = PED_DEVICE_UNKNOWN; ++ return 0; ++ } ++ np += 1; /* advance past '/' */ ++ ++ if(strncmp(np, "ad", 2) == 0) ++ { ++ dev->type = PED_DEVICE_IDE; ++ ++ /* ad0 -> channel 0, master ++ * ad1 -> channel 0, slave ++ * ad2 -> channel 1, master ++ * ad3 -> channel 1, slave ++ */ ++#if (__FreeBSD_version >= 500000) && (__FreeBSD_version < 600000) ++ switch(*(np+3)) ++ { ++ case 0: ++ arch_specific->channel = 0; ++ arch_specific->device = 0; ++ break; ++ case 1: ++ arch_specific->channel = 0; ++ arch_specific->device = 1; ++ break; ++ case 2: ++ arch_specific->channel = 1; ++ arch_specific->device = 0; ++ break; ++ case 4: ++ arch_specific->channel = 1; ++ arch_specific->device = 1; ++ break; ++ } ++#endif ++ ++ } ++ else ++ { ++ dev->type = PED_DEVICE_UNKNOWN; ++ } ++ ++ return 1; ++} ++ ++static int ++_device_get_sector_size (PedDevice* dev) ++{ ++ FreeBSDSpecific* arch_specific = FREEBSD_SPECIFIC (dev); ++ u_int sector_size = PED_SECTOR_SIZE_DEFAULT; /*makes Valgrind happy*/ ++ ++ PED_ASSERT (dev->open_count, return 0); ++ ++ if (ioctl (arch_specific->fd, DIOCGSECTORSIZE, §or_size) == -1) ++ return PED_SECTOR_SIZE_DEFAULT; ++ ++ if (sector_size != PED_SECTOR_SIZE_DEFAULT) { ++ if (ped_exception_throw ( ++ PED_EXCEPTION_BUG, ++ PED_EXCEPTION_IGNORE_CANCEL, ++ _("The sector size on %s is %d bytes. Parted is known " ++ "not to work properly with drives with sector sizes " ++ "other than %d bytes."), ++ dev->path, ++ sector_size, ++ PED_SECTOR_SIZE_DEFAULT) ++ == PED_EXCEPTION_IGNORE) ++ return sector_size; ++ else ++ return PED_SECTOR_SIZE_DEFAULT; ++ } ++ ++ return sector_size; ++} ++ ++static PedSector ++_device_get_length (PedDevice* dev) ++{ ++ FreeBSDSpecific* arch_specific = FREEBSD_SPECIFIC (dev); ++ off_t bytes = 0; ++ ++ PED_ASSERT (dev->open_count > 0, return 0); ++ ++ if(ioctl(arch_specific->fd, DIOCGMEDIASIZE, &bytes) == 0) { ++ return bytes / PED_SECTOR_SIZE_DEFAULT; ++ } ++ ++ return 0; ++} ++ ++ ++#if (__FreeBSD_version >= 500000) && (__FreeBSD_version < 600000) ++# define freebsd_get_ata_params freebsd_get_ata_params_compat5 ++#elif (__FreeBSD_version >= 600000) ++# define freebsd_get_ata_params freebsd_get_ata_params_compat6 ++#else ++# error "parted currently compiles on FreeBSD 5.X and 6.X only" ++#endif ++ ++#if (__FreeBSD_version >= 500000) && (__FreeBSD_version < 600000) ++ ++static int freebsd_get_ata_params_compat5(PedDevice *dev, ++ struct ata_params *ap) ++{ ++ struct ata_cmd iocmd; ++ int fd, ret; ++ FreeBSDSpecific* arch_specific = FREEBSD_SPECIFIC (dev); ++ ++ if ((fd = open("/dev/ata", O_RDWR)) == -1) ++ { ++ ped_exception_throw ( ++ PED_EXCEPTION_ERROR, ++ PED_EXCEPTION_CANCEL, ++ _("Could not get open /dev/ata.")); ++ ++ ret = -1; ++ goto out; ++ } ++ ++ bzero(&iocmd, sizeof(struct ata_cmd)); ++ iocmd.channel = arch_specific->channel; ++ iocmd.device = arch_specific->device; ++ iocmd.cmd = ATAGPARM; ++ ++ if (ioctl(fd, IOCATA, &iocmd) == -1) ++ { ++ ped_exception_throw ( ++ PED_EXCEPTION_ERROR, ++ PED_EXCEPTION_CANCEL, ++ _("Could not get ATA parameters. Please" ++ "contact the maintainer.")); ++ ++ ret = -1; ++ goto out; ++ } ++ ++ if (iocmd.u.param.type[arch_specific->device]) { ++ *ap = iocmd.u.param.params[arch_specific->device]; ++ } else ++ { ++ ped_exception_throw ( ++ PED_EXCEPTION_ERROR, ++ PED_EXCEPTION_CANCEL, ++ _("Could not get ATA parameters. Please" ++ "contact the maintainer.")); ++ ret = -1; ++ goto out; ++ } ++ ++ ret = 0; ++ ++out: ++ close(fd); ++ ++ return ret; ++} ++ ++#elif __FreeBSD_version >= 600000 ++ ++static int freebsd_get_ata_params_compat6(PedDevice *dev, ++ struct ata_params *ap) ++{ ++ FreeBSDSpecific* arch_specific = FREEBSD_SPECIFIC (dev); ++ ++ return ioctl (arch_specific->fd, IOCATAGPARM, &ap); ++} ++ ++#endif ++ ++static int ++_device_probe_geometry (PedDevice* dev) ++{ ++ FreeBSDSpecific* arch_specific = FREEBSD_SPECIFIC (dev); ++ struct stat dev_stat; ++ struct ata_params ap; ++ ++ if (!_device_stat (dev, &dev_stat)) ++ return 0; ++ PED_ASSERT (S_ISCHR (dev_stat.st_mode), return 0); ++ ++ dev->length = _device_get_length (dev); ++ if (!dev->length) ++ return 0; ++ ++ dev->sector_size = _device_get_sector_size (dev); ++ if (!dev->sector_size) ++ return 0; ++ ++ dev->bios_geom.sectors = 63; ++ dev->bios_geom.heads = 255; ++ dev->bios_geom.cylinders ++ = dev->length / (63 * 255) ++ / (dev->sector_size / PED_SECTOR_SIZE_DEFAULT); ++ ++ if (freebsd_get_ata_params (dev, &ap) == 0) { ++ dev->hw_geom.sectors = ap.sectors; ++ dev->hw_geom.heads = ap.heads; ++ dev->hw_geom.cylinders = ap.cylinders; ++ } else { ++ dev->hw_geom = dev->bios_geom; ++ } ++ ++ return 1; ++} ++ ++static char* ++strip_name(char* str) ++{ ++ int i; ++ int end = 0; ++ ++ for (i = 0; str[i] != 0; i++) { ++ if (!isspace (str[i]) ++ || (isspace (str[i]) && !isspace (str[i+1]) && str[i+1])) { ++ str [end] = str[i]; ++ end++; ++ } ++ } ++ str[end] = 0; ++ return strdup (str); ++} ++ ++static int ++init_ide (PedDevice* dev) ++{ ++ FreeBSDSpecific* arch_specific = FREEBSD_SPECIFIC(dev); ++ struct stat dev_stat; ++ struct ata_params ap; ++ PedExceptionOption ex_status; ++ char vendor_buf[64]; ++ ++ if (!_device_stat (dev, &dev_stat)) ++ goto error; ++ ++ if (!ped_device_open (dev)) ++ goto error; ++ ++ if (freebsd_get_ata_params (dev, &ap) == -1) { ++ ex_status = ped_exception_throw ( ++ PED_EXCEPTION_WARNING, ++ PED_EXCEPTION_IGNORE_CANCEL, ++ _("Could not get identity of device %s - %s"), ++ dev->path, strerror (errno)); ++ switch (ex_status) { ++ case PED_EXCEPTION_CANCEL: ++ goto error_close_dev; ++ ++ case PED_EXCEPTION_UNHANDLED: ++ ped_exception_catch (); ++ case PED_EXCEPTION_IGNORE: ++ dev->model = strdup(_("IDE")); ++ } ++ } else { ++ snprintf(vendor_buf, 64, "%s/%s", ap.model, ap.revision); ++ dev->model = strip_name (vendor_buf); ++ } ++ ++ if (!_device_probe_geometry (dev)) ++ goto error_close_dev; ++ ++ ped_device_close (dev); ++ return 1; ++ ++error_close_dev: ++ ped_device_close (dev); ++error: ++ return 0; ++} ++ ++static int ++init_file (PedDevice* dev) ++{ ++ struct stat dev_stat; ++ ++ if (!_device_stat (dev, &dev_stat)) ++ goto error; ++ if (!ped_device_open (dev)) ++ goto error; ++ ++ if (S_ISCHR(dev_stat.st_mode)) ++ dev->length = _device_get_length (dev); ++ else ++ dev->length = dev_stat.st_size / 512; ++ if (dev->length <= 0) { ++ ped_exception_throw ( ++ PED_EXCEPTION_ERROR, ++ PED_EXCEPTION_CANCEL, ++ _("The device %s is zero-length, and can't possibly " ++ "store a file system or partition table. Perhaps " ++ "you selected the wrong device?"), ++ dev->path); ++ goto error_close_dev; ++ } ++ ++ ped_device_close (dev); ++ ++ dev->bios_geom.cylinders = dev->length / 4 / 32; ++ dev->bios_geom.heads = 4; ++ dev->bios_geom.sectors = 32; ++ dev->hw_geom = dev->bios_geom; ++ dev->sector_size = 512; ++ dev->model = strdup (""); ++ return 1; ++ ++error_close_dev: ++ ped_device_close (dev); ++error: ++ return 0; ++} ++ ++static int ++init_generic (PedDevice* dev, char* model_name) ++{ ++ struct stat dev_stat; ++ PedExceptionOption ex_status; ++ ++ if (!_device_stat (dev, &dev_stat)) ++ goto error; ++ ++ if (!ped_device_open (dev)) ++ goto error; ++ ++ ped_exception_fetch_all (); ++ if (_device_probe_geometry (dev)) { ++ ped_exception_leave_all (); ++ } else { ++ /* hack to allow use of files, for testing */ ++ ped_exception_catch (); ++ ped_exception_leave_all (); ++ ++ ex_status = ped_exception_throw ( ++ PED_EXCEPTION_WARNING, ++ PED_EXCEPTION_IGNORE_CANCEL, ++ _("Unable to determine geometry of " ++ "file/device. You should not use Parted " ++ "unless you REALLY know what you're doing!")); ++ switch (ex_status) { ++ case PED_EXCEPTION_CANCEL: ++ goto error_close_dev; ++ ++ case PED_EXCEPTION_UNHANDLED: ++ ped_exception_catch (); ++ case PED_EXCEPTION_IGNORE: ++ ; // just workaround for gcc 3.0 ++ } ++ ++ /* what should we stick in here? */ ++ dev->length = dev_stat.st_size / PED_SECTOR_SIZE_DEFAULT; ++ dev->bios_geom.cylinders = dev->length / 4 / 32; ++ dev->bios_geom.heads = 4; ++ dev->bios_geom.sectors = 32; ++ dev->sector_size = PED_SECTOR_SIZE_DEFAULT; ++ } ++ ++ dev->model = strdup (model_name); ++ ++ ped_device_close (dev); ++ return 1; ++ ++error_close_dev: ++ ped_device_close (dev); ++error: ++ return 0; ++} ++ ++static PedDevice* ++freebsd_new (const char* path) ++{ ++ PedDevice* dev; ++ ++ PED_ASSERT (path != NULL, return NULL); ++ ++ dev = (PedDevice*) ped_malloc (sizeof (PedDevice)); ++ if (!dev) ++ goto error; ++ ++ dev->path = strdup (path); ++ if (!dev->path) ++ goto error_free_dev; ++ ++ dev->arch_specific ++ = (FreeBSDSpecific*) ped_malloc (sizeof (FreeBSDSpecific)); ++ if (!dev->arch_specific) ++ goto error_free_path; ++ ++ dev->open_count = 0; ++ dev->read_only = 0; ++ dev->external_mode = 0; ++ dev->dirty = 0; ++ dev->boot_dirty = 0; ++ ++ if (!_device_probe_type (dev)) ++ goto error_free_arch_specific; ++ ++ switch (dev->type) { ++ case PED_DEVICE_IDE: ++ if (!init_ide (dev)) ++ goto error_free_arch_specific; ++ break; ++ ++ default: ++ ped_exception_throw (PED_EXCEPTION_NO_FEATURE, ++ PED_EXCEPTION_CANCEL, ++ _("ped_device_new() Unsupported device type")); ++ goto error_free_arch_specific; ++ } ++ return dev; ++ ++error_free_arch_specific: ++ ped_free (dev->arch_specific); ++error_free_path: ++ ped_free (dev->path); ++error_free_dev: ++ ped_free (dev); ++error: ++ return NULL; ++} ++ ++static void ++freebsd_destroy (PedDevice* dev) ++{ ++ ped_free (dev->arch_specific); ++ ped_free (dev->path); ++ ped_free (dev->model); ++ ped_free (dev); ++} ++ ++static int ++freebsd_is_busy (PedDevice* dev) ++{ ++ int i; ++ char* part_name; ++ ++ if (_partition_is_mounted_by_path (dev->path)) ++ return 1; ++ ++ for (i = 0; i < 32; i++) { ++ int status; ++ ++ part_name = _device_get_part_path (dev, i); ++ if (!part_name) ++ return 1; ++ status = _partition_is_mounted_by_path (part_name); ++ ped_free (part_name); ++ ++ if (status) ++ return 1; ++ } ++ ++ return 0; ++} ++ ++#if (__FreeBSD_version >= 500000) && (__FreeBSD_version < 600000) ++# define _flush_cache freebsd_flush_cache_compat5 ++#elif (__FreeBSD_version >= 600000) ++# define _flush_cache freebsd_flush_cache_compat6 ++#else ++# error "parted currently compiles on FreeBSD 5.X and 6.X only" ++#endif ++ ++#if (__FreeBSD_version >= 500000) && (__FreeBSD_version < 600000) ++ ++static void ++freebsd_flush_cache_compat5 (PedDevice* dev) ++{ ++ FreeBSDSpecific* arch_specific = FREEBSD_SPECIFIC (dev); ++ int fd; ++ struct ata_cmd iocmd; ++ ++ if (freebsd_is_busy(dev)) ++ printf("FreeBSD: Device %s is mounted. Not flushing cache.\n", ++ dev->path); ++ ++ if ((fd = open("/dev/ata", O_RDWR)) == -1) ++ { ++ ped_exception_throw ( ++ PED_EXCEPTION_ERROR, ++ PED_EXCEPTION_CANCEL, ++ _("Could not open /dev/ata.")); ++ ++ goto out; ++ } ++ ++ if (dev->read_only) ++ goto out; ++ dev->dirty = 0; ++ ++ bzero(&iocmd, sizeof(struct ata_cmd)); ++ iocmd.channel = arch_specific->channel; ++ iocmd.device = arch_specific->device; ++ iocmd.cmd = ATAREQUEST; ++ iocmd.u.request.u.ata.command = ATA_FLUSHCACHE; ++ ++ if (ioctl(fd, IOCATA, &iocmd) == -1) ++ { ++ ped_exception_throw ( ++ PED_EXCEPTION_ERROR, ++ PED_EXCEPTION_CANCEL, ++ _("Could not flush cache.")); ++ ++ goto out; ++ } ++ ++out: ++ close (fd); ++ ++ return; ++} ++ ++#elif __FreeBSD_version >= 600000 ++ ++static void ++freebsd_flush_cache_compat6 (PedDevice* dev) ++{ ++ FreeBSDSpecific* arch_specific = FREEBSD_SPECIFIC (dev); ++ struct ata_ioc_request ioreq; ++ ++ if (freebsd_is_busy(dev)) ++ printf("FreeBSD: Device %s is mounted. Not flushing cache.\n", ++ dev->path); ++ ++ if (dev->read_only) ++ return; ++ dev->dirty = 0; ++ ++ bzero(&ioreq, sizeof(struct ata_ioc_request)); ++ ioreq.u.ata.command = ATA_FLUSHCACHE; ++ ++ if (ioctl(arch_specific->fd, IOCATAREQUEST, &ioreq) == -1) ++ { ++ ped_exception_throw ( ++ PED_EXCEPTION_ERROR, ++ PED_EXCEPTION_CANCEL, ++ _("Could not flush cache.")); ++ return; ++ } ++ ++ return; ++} ++ ++#endif ++ ++/* By default, kernel of FreeBSD does not allow overwriting MBR */ ++#define GEOM_SYSCTL "kern.geom.debugflags" ++ ++static int ++freebsd_open (PedDevice* dev) ++{ ++ int old_flags, flags; ++ size_t sizeof_int = sizeof (int); ++ FreeBSDSpecific* arch_specific = FREEBSD_SPECIFIC (dev); ++ ++retry: ++ if (sysctlbyname (GEOM_SYSCTL, &old_flags, &sizeof_int, NULL, 0) != 0) ++ ped_exception_throw (PED_EXCEPTION_WARNING, PED_EXCEPTION_OK, ++ _("Unable to get %s sysctl (%s)."), GEOM_SYSCTL, ++ strerror (errno)); ++ ++ if ((old_flags & 0x10) == 0) ++ { ++ /* "allow foot shooting", see geom(4) */ ++ flags = old_flags | 0x10; ++ ++ if (sysctlbyname (GEOM_SYSCTL, NULL, NULL, &flags, sizeof (int)) != 0) ++ { ++ flags = old_flags; ++ ped_exception_throw (PED_EXCEPTION_WARNING, PED_EXCEPTION_OK, ++ _("Unable to set %s sysctl (%s)."), GEOM_SYSCTL, ++ strerror (errno)); ++ } ++ } ++ else ++ flags = old_flags; ++ ++ arch_specific->fd = open (dev->path, O_RDWR); ++ ++ if (flags != old_flags) ++ { ++ if (sysctlbyname (GEOM_SYSCTL, NULL, NULL, &old_flags, sizeof (int)) != 0) ++ ped_exception_throw (PED_EXCEPTION_WARNING, PED_EXCEPTION_OK, ++ _("Unable to set %s sysctl (%s)."), GEOM_SYSCTL, ++ strerror (errno)); ++ } ++ ++ if (arch_specific->fd == -1) { ++ char* rw_error_msg = strerror (errno); ++ ++ arch_specific->fd = open (dev->path, O_RDONLY); ++ if (arch_specific->fd == -1) { ++ if (ped_exception_throw ( ++ PED_EXCEPTION_ERROR, ++ PED_EXCEPTION_RETRY_CANCEL, ++ _("Error opening %s: %s"), ++ dev->path, strerror (errno)) ++ != PED_EXCEPTION_RETRY) { ++ return 0; ++ } else { ++ goto retry; ++ } ++ } else { ++ ped_exception_throw ( ++ PED_EXCEPTION_WARNING, ++ PED_EXCEPTION_OK, ++ _("Unable to open %s read-write (%s). %s has " ++ "been opened read-only."), ++ dev->path, rw_error_msg, dev->path); ++ dev->read_only = 1; ++ } ++ } else { ++ dev->read_only = 0; ++ } ++ ++ _flush_cache (dev); ++ ++ return 1; ++} ++ ++static int ++freebsd_refresh_open (PedDevice* dev) ++{ ++ return 1; ++} ++ ++static int ++freebsd_close (PedDevice* dev) ++{ ++ FreeBSDSpecific* arch_specific = FREEBSD_SPECIFIC (dev); ++ ++ if (dev->dirty) ++ _flush_cache (dev); ++ close (arch_specific->fd); ++ return 1; ++} ++ ++static int ++freebsd_refresh_close (PedDevice* dev) ++{ ++ if (dev->dirty) ++ _flush_cache (dev); ++ return 1; ++} ++ ++static int ++_device_seek (const PedDevice* dev, PedSector sector) ++{ ++ FreeBSDSpecific* arch_specific; ++ off_t pos; ++ ++ PED_ASSERT (dev != NULL, return 0); ++ PED_ASSERT (!dev->external_mode, return 0); ++ ++ arch_specific = FREEBSD_SPECIFIC (dev); ++ ++ pos = sector * PED_SECTOR_SIZE_DEFAULT; ++ return lseek (arch_specific->fd, pos, SEEK_SET) == pos; ++} ++ ++static int ++freebsd_read (const PedDevice* dev, void* buffer, PedSector start, PedSector count) ++{ ++ FreeBSDSpecific* arch_specific = FREEBSD_SPECIFIC (dev); ++ int status; ++ PedExceptionOption ex_status; ++ size_t read_length = count * PED_SECTOR_SIZE_DEFAULT; ++ ++ while (1) { ++ if (_device_seek (dev, start)) ++ break; ++ ++ ex_status = ped_exception_throw ( ++ PED_EXCEPTION_ERROR, ++ PED_EXCEPTION_RETRY_IGNORE_CANCEL, ++ _("%s during seek for read on %s"), ++ strerror (errno), dev->path); ++ ++ switch (ex_status) { ++ case PED_EXCEPTION_IGNORE: ++ return 1; ++ ++ case PED_EXCEPTION_RETRY: ++ break; ++ ++ case PED_EXCEPTION_UNHANDLED: ++ ped_exception_catch (); ++ case PED_EXCEPTION_CANCEL: ++ return 0; ++ } ++ } ++ ++ while (1) { ++ status = read (arch_specific->fd, buffer, read_length); ++ if (status == count * PED_SECTOR_SIZE_DEFAULT) break; ++ if (status > 0) { ++ read_length -= status; ++ buffer += status; ++ continue; ++ } ++ ++ ex_status = ped_exception_throw ( ++ PED_EXCEPTION_ERROR, ++ PED_EXCEPTION_RETRY_IGNORE_CANCEL, ++ _("%s during read on %s"), ++ strerror (errno), ++ dev->path); ++ ++ switch (ex_status) { ++ case PED_EXCEPTION_IGNORE: ++ return 1; ++ ++ case PED_EXCEPTION_RETRY: ++ break; ++ ++ case PED_EXCEPTION_UNHANDLED: ++ ped_exception_catch (); ++ case PED_EXCEPTION_CANCEL: ++ return 0; ++ } ++ } ++ ++ return 1; ++} ++ ++static int ++freebsd_write (PedDevice* dev, const void* buffer, PedSector start, ++ PedSector count) ++{ ++ FreeBSDSpecific* arch_specific = FREEBSD_SPECIFIC (dev); ++ int status; ++ PedExceptionOption ex_status; ++ size_t write_length = count * PED_SECTOR_SIZE_DEFAULT; ++ ++ if (dev->read_only) { ++ if (ped_exception_throw ( ++ PED_EXCEPTION_ERROR, ++ PED_EXCEPTION_IGNORE_CANCEL, ++ _("Can't write to %s, because it is opened read-only."), ++ dev->path) ++ != PED_EXCEPTION_IGNORE) ++ return 0; ++ else ++ return 1; ++ } ++ ++ while (1) { ++ if (_device_seek (dev, start)) ++ break; ++ ++ ex_status = ped_exception_throw ( ++ PED_EXCEPTION_ERROR, PED_EXCEPTION_RETRY_IGNORE_CANCEL, ++ _("%s during seek for write on %s"), ++ strerror (errno), dev->path); ++ ++ switch (ex_status) { ++ case PED_EXCEPTION_IGNORE: ++ return 1; ++ ++ case PED_EXCEPTION_RETRY: ++ break; ++ ++ case PED_EXCEPTION_UNHANDLED: ++ ped_exception_catch (); ++ case PED_EXCEPTION_CANCEL: ++ return 0; ++ } ++ } ++ ++#ifdef READ_ONLY ++ printf ("ped_device_write (\"%s\", %p, %d, %d)\n", ++ dev->path, buffer, (int) start, (int) count); ++#else ++ dev->dirty = 1; ++ while (1) { ++ status = write (arch_specific->fd, buffer, write_length); ++ if (status == count * PED_SECTOR_SIZE_DEFAULT) break; ++ if (status > 0) { ++ write_length -= status; ++ buffer += status; ++ continue; ++ } ++ ++ ex_status = ped_exception_throw ( ++ PED_EXCEPTION_ERROR, ++ PED_EXCEPTION_RETRY_IGNORE_CANCEL, ++ _("%s during write on %s"), ++ strerror (errno), dev->path); ++ ++ switch (ex_status) { ++ case PED_EXCEPTION_IGNORE: ++ return 1; ++ ++ case PED_EXCEPTION_RETRY: ++ break; ++ ++ case PED_EXCEPTION_UNHANDLED: ++ ped_exception_catch (); ++ case PED_EXCEPTION_CANCEL: ++ return 0; ++ } ++ } ++#endif /* !READ_ONLY */ ++ return 1; ++} ++ ++/* returns the number of sectors that are ok. ++ */ ++static PedSector ++freebsd_check (PedDevice* dev, void* buffer, PedSector start, PedSector count) ++{ ++ FreeBSDSpecific* arch_specific = FREEBSD_SPECIFIC (dev); ++ PedSector done = 0; ++ int status; ++ ++ if (!_device_seek (dev, start)) ++ return 0; ++ ++ for (done = 0; done < count; done += status / PED_SECTOR_SIZE_DEFAULT) { ++ status = read (arch_specific->fd, buffer, ++ (size_t) ((count-done) * PED_SECTOR_SIZE_DEFAULT)); ++ if (status < 0) ++ break; ++ } ++ ++ return done; ++} ++ ++static int ++_do_fsync (PedDevice* dev) ++{ ++ FreeBSDSpecific* arch_specific = FREEBSD_SPECIFIC (dev); ++ int status; ++ PedExceptionOption ex_status; ++ ++ while (1) { ++ status = fsync (arch_specific->fd); ++ if (status >= 0) break; ++ ++ ex_status = ped_exception_throw ( ++ PED_EXCEPTION_ERROR, ++ PED_EXCEPTION_RETRY_IGNORE_CANCEL, ++ _("%s during write on %s"), ++ strerror (errno), dev->path); ++ ++ switch (ex_status) { ++ case PED_EXCEPTION_IGNORE: ++ return 1; ++ ++ case PED_EXCEPTION_RETRY: ++ break; ++ ++ case PED_EXCEPTION_UNHANDLED: ++ ped_exception_catch (); ++ case PED_EXCEPTION_CANCEL: ++ return 0; ++ } ++ } ++ return 1; ++} ++ ++static int ++freebsd_sync (PedDevice* dev) ++{ ++ PED_ASSERT (dev != NULL, return 0); ++ PED_ASSERT (!dev->external_mode, return 0); ++ ++ if (dev->read_only) ++ return 1; ++ if (!_do_fsync (dev)) ++ return 0; ++ _flush_cache (dev); ++ return 1; ++} ++ ++static int ++freebsd_sync_fast (PedDevice* dev) ++{ ++ PED_ASSERT (dev != NULL, return 0); ++ PED_ASSERT (!dev->external_mode, return 0); ++ ++ if (dev->read_only) ++ return 1; ++ if (!_do_fsync (dev)) ++ return 0; ++ /* no cache flush... */ ++ return 1; ++} ++ ++/* XXX code from /usr/src/lib/libdisk/disk.c */ ++static int ++_probe_standard_devices () ++{ ++ char dev_name [16]; ++ char dev_type [16]; ++ char fullpath [256]; ++ int ret; ++ char* conftxt; ++ char* cptr; ++ size_t txtsize; ++ ++ ++ ret = sysctlbyname("kern.geom.conftxt", NULL, &txtsize, NULL, 0); ++ if (ret) { ++ printf("kern.geom.conftxt sysctl not available, giving up!"); ++ return 0; ++ } ++ conftxt = ped_malloc(txtsize+1); ++ if (conftxt == NULL) { ++ printf("cannot malloc memory for conftxt"); ++ return 0; ++ } ++ ret = sysctlbyname("kern.geom.conftxt", conftxt, &txtsize, NULL, 0); ++ if (ret) { ++ printf("error reading kern.geom.conftxt from the system"); ++ free (conftxt); ++ return 0; ++ } ++ ++ cptr = conftxt; ++ ++ while (sscanf (cptr, "%*d %s %s", ++ dev_type, dev_name) != EOF) { ++ if (strcmp(dev_type, "DISK") == 0) ++ { ++ strcpy (fullpath, _PATH_DEV); ++ strcat (fullpath, dev_name); ++ printf("FreeBSD: probing %s...\n", fullpath); ++ _ped_device_probe (fullpath); ++ } ++ ++ cptr = strchr(cptr, '\n'); ++ cptr++; ++ } ++ ++ ped_free(conftxt); ++ ++ return 1; ++} ++ ++static void ++freebsd_probe_all () ++{ ++ _probe_standard_devices (); ++} ++ ++static char* ++_device_get_part_path (PedDevice* dev, int num) ++{ ++ int path_len = strlen (dev->path); ++ int result_len = path_len + 16; ++ char* result; ++ ++ result = (char*) ped_malloc (result_len); ++ if (!result) ++ return NULL; ++ ++ /* append slice number (ad0, partition 1 => ad0s1)*/ ++ snprintf (result, result_len, "%ss%d", dev->path, num); ++ ++ return result; ++} ++ ++static char* ++freebsd_partition_get_path (const PedPartition* part) ++{ ++ return _device_get_part_path (part->disk->dev, part->num); ++} ++ ++/* XXX code from /usr/src/sbin/mount/mount.c:getmntpt() */ ++static int ++_partition_is_mounted_by_path (const char *path) ++{ ++ struct stat part_stat, mntdevstat; ++ struct statfs *mntbuf, *statfsp; ++ char *devname; ++ char device[256]; ++ int mntsize, i; ++ ++ if (stat (path, &part_stat) != 0) ++ return 0; ++ ++ if (!S_ISCHR(part_stat.st_mode)) ++ return 0; ++ ++ mntsize = getmntinfo(&mntbuf, MNT_NOWAIT); ++ for (i = 0; i < mntsize; i++) { ++ statfsp = &mntbuf[i]; ++ devname = statfsp->f_mntfromname; ++ if (*devname != '/') { ++ strcpy(device, _PATH_DEV); ++ strcat(device, devname); ++ strcpy(statfsp->f_mntfromname, device); ++ } ++ if (stat(devname, &mntdevstat) == 0 && ++ mntdevstat.st_rdev == part_stat.st_rdev) ++ return 1; ++ } ++ ++ return 0; ++} ++ ++static int ++_partition_is_mounted (const PedPartition *part) ++{ ++ dev_t dev; ++ if (!ped_partition_is_active (part)) ++ return 0; ++ ++ return _partition_is_mounted_by_path (part->disk->dev->path); ++} ++ ++static int ++freebsd_partition_is_busy (const PedPartition* part) ++{ ++ PedPartition* walk; ++ ++ PED_ASSERT (part != NULL, return 0); ++ ++ if (_partition_is_mounted (part)) ++ return 1; ++ if (part->type == PED_PARTITION_EXTENDED) { ++ for (walk = part->part_list; walk; walk = walk->next) { ++ if (freebsd_partition_is_busy (walk)) ++ return 1; ++ } ++ } ++ return 0; ++} ++ ++/* XXX maybe read the MBR again and hand it over to geom? */ ++static int ++_kernel_reread_part_table (PedDevice* dev) ++{ ++ FreeBSDSpecific* arch_specific = FREEBSD_SPECIFIC (dev); ++ int retry_count = 5; ++ struct gctl_req *grq; ++ char mbr_buf[512]; ++ const char *q; ++ ++ sync(); ++ ++ freebsd_read (dev, mbr_buf, 0, 1); ++ ++ grq = gctl_get_handle(); ++ gctl_ro_param(grq, "verb", -1, "write MBR"); ++ gctl_ro_param(grq, "class", -1, "MBR"); ++ q = strrchr(dev->path, '/'); ++ if (q == NULL) ++ q = dev->path; ++ else ++ q++; ++ gctl_ro_param(grq, "geom", -1, q); ++ gctl_ro_param(grq, "data", dev->sector_size, mbr_buf); ++ q = gctl_issue(grq); ++ if (q == NULL) { ++ gctl_free(grq); ++ return(0); ++ } ++ ++ gctl_free(grq); ++ ++ return 1; ++} ++ ++static int ++freebsd_disk_commit (PedDisk* disk) ++{ ++ if (disk->dev->type != PED_DEVICE_FILE) ++ return _kernel_reread_part_table (disk->dev); ++ ++ return 1; ++} ++ ++static PedDeviceArchOps freebsd_dev_ops = { ++ _new: freebsd_new, ++ destroy: freebsd_destroy, ++ is_busy: freebsd_is_busy, ++ open: freebsd_open, ++ refresh_open: freebsd_refresh_open, ++ close: freebsd_close, ++ refresh_close: freebsd_refresh_close, ++ read: freebsd_read, ++ write: freebsd_write, ++ check: freebsd_check, ++ sync: freebsd_sync, ++ sync_fast: freebsd_sync_fast, ++ probe_all: freebsd_probe_all ++}; ++ ++PedDiskArchOps freebsd_disk_ops = { ++ partition_get_path: freebsd_partition_get_path, ++ partition_is_busy: freebsd_partition_is_busy, ++ disk_commit: freebsd_disk_commit ++}; ++ ++PedArchitecture ped_freebsd_arch = { ++ dev_ops: &freebsd_dev_ops, ++ disk_ops: &freebsd_disk_ops ++}; +diff -urNad parted-1.7.0~/libparted/fs/xfs/platform_defs.h parted-1.7.0/libparted/fs/xfs/platform_defs.h +--- parted-1.7.0~/libparted/fs/xfs/platform_defs.h 2006-05-19 03:54:01.000000000 -0300 ++++ parted-1.7.0/libparted/fs/xfs/platform_defs.h 2006-05-19 03:54:02.000000000 -0300 +@@ -38,7 +38,11 @@ + #include + #include + #include +-#include ++#if HAVE_ENDIAN_H ++# include ++#elif HAVE_SYS_ENDIAN_H ++# include ++#endif + #include + #include + #include +diff -urNad parted-1.7.0~/libparted/labels/bsd.c parted-1.7.0/libparted/labels/bsd.c +--- parted-1.7.0~/libparted/labels/bsd.c 2006-05-19 03:54:01.000000000 -0300 ++++ parted-1.7.0/libparted/labels/bsd.c 2006-05-19 03:54:02.000000000 -0300 +@@ -24,6 +24,8 @@ + + #include + ++#include ++ + #include + #include + #include +diff -urNad parted-1.7.0~/libparted/labels/sun.c parted-1.7.0/libparted/labels/sun.c +--- parted-1.7.0~/libparted/labels/sun.c 2006-05-19 03:54:01.000000000 -0300 ++++ parted-1.7.0/libparted/labels/sun.c 2006-05-19 03:54:02.000000000 -0300 +@@ -24,6 +24,8 @@ + + #include + ++#include ++ + #include + #include + #include +diff -urNad parted-1.7.0~/libparted/libparted.c parted-1.7.0/libparted/libparted.c +--- parted-1.7.0~/libparted/libparted.c 2006-05-19 03:54:01.000000000 -0300 ++++ parted-1.7.0/libparted/libparted.c 2006-05-19 03:54:02.000000000 -0300 +@@ -26,6 +26,8 @@ + # include + #elif defined(__BEOS__) + # include ++#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ++# include + #else + # include + #endif +@@ -182,6 +184,8 @@ + ped_set_architecture (&ped_linux_arch); + #elif defined(__BEOS__) + ped_set_architecture (&ped_beos_arch); ++#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ++ ped_set_architecture (&ped_freebsd_arch); + #else + ped_set_architecture (&ped_gnu_arch); + #endif --- parted-1.8.8.git.2008.03.24.orig/debian/patches/UPSTREAM +++ parted-1.8.8.git.2008.03.24/debian/patches/UPSTREAM @@ -0,0 +1,8 @@ +These are the patches we want to include upstream : + +s390.dpatch * copyright * + +# Should be already merged on 1.6.25 + +# Backport from 1.6.26 +fix_rescue_segfault.dpatch --- parted-1.8.8.git.2008.03.24.orig/debian/patches/freebsd.dpatch +++ parted-1.8.8.git.2008.03.24/debian/patches/freebsd.dpatch @@ -0,0 +1,92 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## kfreebsd-gnu.dpatch by Otavio Salvador +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: This dpatch was make to include the patch built by Robert Millan. +## DP: Closes: #363381 +## DP: Upstream: not merged +## DP: Status: broken part of kfreebsd-gnu.dpatch, separated for reference, but not applied. + +@DPATCH@ +diff -urNad parted-1.7.0~/parted/strlist.h parted-1.7.0/parted/strlist.h +--- parted-1.7.0~/parted/strlist.h 2004-02-23 22:02:20.000000000 -0300 ++++ parted-1.7.0/parted/strlist.h 2006-05-19 03:54:02.000000000 -0300 +@@ -20,7 +20,18 @@ + #ifndef STRLIST_H_INCLUDED + #define STRLIST_H_INCLUDED + +-#include ++ ++#ifdef ENABLE_NLS ++# define _GNU_SOURCE ++# include ++#else ++# ifdef wchar_t ++# undef wchar_t ++# endif ++# define _GNU_SOURCE ++# include ++# define wchar_t char ++#endif + + typedef struct _StrList StrList; + struct _StrList { +diff -urNad parted-1.7.0~/parted/table.c parted-1.7.0/parted/table.c +--- parted-1.7.0~/parted/table.c 2006-05-19 03:54:01.000000000 -0300 ++++ parted-1.7.0/parted/table.c 2006-05-19 03:54:36.000000000 -0300 +@@ -25,6 +25,7 @@ + + #include + #include ++#include + + #include + +@@ -48,8 +49,24 @@ + size_t strnlen (const char *, size_t); + #endif + +-#include "strlist.h" ++size_t strnlen (const char *s, size_t maxlen) ++{ ++ size_t len = 0; ++ const char *tp = s; ++ ++ if(s == NULL) ++ return 0; ++ ++ while(*tp && len < maxlen) ++ { ++ len++; ++ tp++; ++ } + ++ return len; ++} ++ ++#include "strlist.h" + + static const unsigned int MAX_WIDTH = 512; + #ifdef ENABLE_NLS +@@ -186,7 +203,8 @@ + { + wchar_t** row = t->rows[rownum]; + int len = 1, i; +- size_t newsize; ++ size_t newsize, oldsize; ++ wchar_t *temps; + + assert(t); + assert(s != NULL); +@@ -197,7 +215,11 @@ + len += wcslen(COLSUFFIX); + + newsize = (wcslen(*s) + len + 1) * sizeof(wchar_t); ++ oldsize = (wcslen(*s) + 1) * sizeof(wchar_t); ++ ++ temps = *s; + *s = realloc (*s, newsize); ++ memcpy(*s, temps, oldsize); + + for (i = 0; i < ncols; ++i) + { --- parted-1.8.8.git.2008.03.24.orig/debian/libparted-dev.files +++ parted-1.8.8.git.2008.03.24/debian/libparted-dev.files @@ -0,0 +1,6 @@ +usr/lib/libparted.a +usr/lib/libparted.la +usr/lib/libparted.so +usr/lib/pkgconfig +usr/include + --- parted-1.8.8.git.2008.03.24.orig/debian/libparted1.8-i18n.files +++ parted-1.8.8.git.2008.03.24/debian/libparted1.8-i18n.files @@ -0,0 +1 @@ +usr/share/locale --- parted-1.8.8.git.2008.03.24.orig/debian/watch +++ parted-1.8.8.git.2008.03.24/debian/watch @@ -0,0 +1,3 @@ +version=3 + +ftp://ftp.gnu.org/gnu/parted/parted-(.*).tar.gz --- parted-1.8.8.git.2008.03.24.orig/debian/parted-doc.postinst +++ parted-1.8.8.git.2008.03.24/debian/parted-doc.postinst @@ -0,0 +1,49 @@ +#! /bin/sh +# postinst script for parted-doc +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package +# +# quoting from the policy: +# Any necessary prompting should almost always be confined to the +# post-installation script, and should be protected with a conditional +# so that unnecessary prompting doesn't happen if a package's +# installation fails and the `postinst' is called with `abort-upgrade', +# `abort-remove' or `abort-deconfigure'. + +case "$1" in + configure) + install-info --quiet --section "Disk Management" "Disk Management" \ + /usr/share/info/parted.info.gz + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + --- parted-1.8.8.git.2008.03.24.orig/debian/control.in +++ parted-1.8.8.git.2008.03.24/debian/control.in @@ -0,0 +1,253 @@ +Source: parted@BINPKGVER@ +Section: admin +Priority: optional +Maintainer: Ubuntu Core developers +XSBC-Original-Maintainer: Parted Maintainer Team +Uploaders: Sven Luther , Otavio Salvador , Bastian Blank , Xavier Oswald +Standards-Version: 3.7.2 +Build-Depends: debhelper (>= 5.0.22), dpatch, libncurses-dev | libncurses5-dev, libreadline5-dev | libreadline-dev, libdevmapper-dev, uuid-dev, gettext, texinfo (>= 4.2), debianutils (>= 1.13.1), autoconf, automake1.10, libtool, libgeom-dev [kfreebsd-i386 kfreebsd-amd64], cvs, po4a, pkg-config + +Package: parted@BINPKGVER@ +Architecture: any +Section: admin +Depends: ${shlibs:Depends} +Suggests: parted@BINPKGVER@-doc +Conflicts: fsresize, parted1.6 +Replaces: fsresize, parted1.6 +Description: The GNU Parted disk partition resizing program + GNU Parted is a program that allows you to create, destroy, + resize, move and copy hard disk partitions. This is useful + for creating space for new operating systems, reorganising + disk usage, and copying data to new hard disks. This package + contains the Parted binary and manual page. + . + Parted currently supports DOS, Mac, Sun, BSD, GPT, MIPS and + PC98 disklabels/partition tables, as well as a 'loop' (raw + disk) type which allows use on RAID/LVM. Filesystems which + are currently fully supported are ext2, ext3, fat (FAT16 + and FAT32), ReiserFS (with libreiserfs) and linux-swap. + Parted can also detect and remove HFS (Mac OS), JFS, NTFS, + UFS (Sun and HP), XFS and ASFS/AFFS/APFS (Amiga) filesystems, + but cannot create, resize or check these filesystems yet. + . + Note that ReiserFS support is only enabled if you install + the libreiserfs0.3-0 package. Since libreiserfs0.3-0 has been + removed from sarge, ReiserFS support is not compiled in the + default package. + . + The nature of this software means that any bugs could cause + massive data loss. While there are no known bugs at the moment, + they could exist, so please back up all important files before + running it, and do so at your own risk. + +Package: parted@BINPKGVER@-udeb +XC-Package-Type: udeb +Architecture: any +Section: debian-installer +Priority: extra +XB-Installer-Menu-Item: 99999 +Depends: ${shlibs:Depends} +Description: Manually partition a hard drive (parted) + +Package: libparted@SHAREDLIBPKGVER@ +Architecture: any +Section: libs +Depends: ${shlibs:Depends} +Suggests: parted | nparted, libparted@LIBPKGVER@-dev, libparted@LIBPKGVER@-i18n (= ${source:Version}) +Conflicts: parted (<< 1.4.13+14pre1), libparted0, libparted1, libparted2 +Replaces: libparted0, libparted1, libparted2, libparted1.4 (<< 1.4.24-2) +Provides: libparted +Description: The GNU Parted disk partitioning shared library + GNU Parted is a program that allows you to create, destroy, + resize, move and copy hard disk partitions. This is useful + for creating space for new operating systems, reorganising + disk usage, and copying data to new hard disks. This package + contains the Parted binary and manual page. + . + This package contains libparted, the required shared library + used by Parted. + . + Parted currently supports DOS, Mac, Sun, BSD, GPT, MIPS and + PC98 disklabels/partition tables, as well as a 'loop' (raw + disk) type which allows use on RAID/LVM. Filesystems which + are currently fully supported are ext2, ext3, fat (FAT16 + and FAT32), ReiserFS (with libreiserfs) and linux-swap. + Parted can also detect and remove HFS (Mac OS), JFS, NTFS, + UFS (Sun and HP), XFS and ASFS/AFFS/APFS (Amiga) filesystems, + but cannot create, resize or check these filesystems yet. + . + Note that ReiserFS support is only enabled if you install + the libreiserfs0.3-0 package. Since libreiserfs0.3-0 has been + removed from sarge, ReiserFS support is not compiled in the + default package. + . + The nature of this software means that any bugs could cause + massive data loss. While there are no known bugs at the moment, + they could exist, so please back up all important files before + running it, and do so at your own risk. + +Package: libparted@LIBPKGVER@-udeb +XC-Package-Type: udeb +Architecture: any +Section: debian-installer +Priority: extra +Depends: ${shlibs:Depends} +Description: The GNU Parted disk partitioning shared library + GNU Parted is a program that allows you to create, destroy, + resize, move and copy hard disk partitions. This is useful + for creating space for new operating systems, reorganising + disk usage, and copying data to new hard disks. This package + contains the Parted binary and manual page. + . + This package contains libparted, the required shared library + used by Parted. This is a cut-down package with no normal + documentation intended to be used in debian-installer. + . + Parted currently supports DOS, Mac, Sun, BSD, GPT, MIPS and + PC98 disklabels/partition tables, as well as a 'loop' (raw + disk) type which allows use on RAID/LVM. Filesystems which + are currently fully supported are ext2, ext3, fat (FAT16 + and FAT32), ReiserFS (with libreiserfs) and linux-swap. + Parted can also detect and remove HFS (Mac OS), JFS, NTFS, + UFS (Sun and HP), XFS and ASFS/AFFS/APFS (Amiga) filesystems, + but cannot create, resize or check these filesystems yet. + . + Note that ReiserFS support is only enabled if you install + the libreiserfs0.3-0 package. Since libreiserfs0.3-0 has been + removed from sarge, ReiserFS support is not compiled in the + default package. + . + The nature of this software means that any bugs could cause + massive data loss. While there are no known bugs at the moment, + they could exist, so please back up all important files before + running it, and do so at your own risk. + +Package: libparted@LIBPKGVER@-i18n +Architecture: all +Section: libs +Depends: libparted@SHAREDLIBPKGVER@ +Replaces: libparted0, libparted1, libparted2, libparted1.4 (<< 1.4.24-2), libparted1.6 (<< 1.5+1.6.0-pre3-2), libparted1.4-i18n, parted (<< 1.4.13+14pre1) +Conflicts: libparted-i18n +Provides: libparted-i18n +Description: The GNU Parted disk partitioning library i18n support + GNU Parted is a program that allows you to create, destroy, + resize, move and copy hard disk partitions. This is useful + for creating space for new operating systems, reorganising + disk usage, and copying data to new hard disks. This package + contains the Parted binary and manual page. + . + This package contains the i18n message catalogs for + libparted and parted. + . + Parted currently supports DOS, Mac, Sun, BSD, GPT, MIPS and + PC98 disklabels/partition tables, as well as a 'loop' (raw + disk) type which allows use on RAID/LVM. Filesystems which + are currently fully supported are ext2, ext3, fat (FAT16 + and FAT32), ReiserFS (with libreiserfs) and linux-swap. + Parted can also detect and remove HFS (Mac OS), JFS, NTFS, + UFS (Sun and HP), XFS and ASFS/AFFS/APFS (Amiga) filesystems, + but cannot create, resize or check these filesystems yet. + . + Note that ReiserFS support is only enabled if you install + the libreiserfs0.3-0 package. Since libreiserfs0.3-0 has been + removed from sarge, ReiserFS support is not compiled in the + default package. + . + The nature of this software means that any bugs could cause + massive data loss. While there are no known bugs at the moment, + they could exist, so please back up all important files before + running it, and do so at your own risk. + +Package: libparted@LIBPKGVER@-dev +Architecture: any +Section: libdevel +Depends: libc6-dev, libparted@SHAREDLIBPKGVER@ (= ${binary:Version}) +Suggests: parted@BINPKGVER@ (= ${binary:Version}), parted-doc +Conflicts: libparted-dev, parted (<< 1.2.11) +Replaces: libparted-dev, libparted0-dev, libparted2-dev +Provides: libparted-dev +Description: The GNU Parted disk partitioning library development files + GNU Parted is a program that allows you to create, destroy, + resize, move and copy hard disk partitions. This is useful + for creating space for new operating systems, reorganising + disk usage, and copying data to new hard disks. This package + contains the Parted binary and manual page. + . + This package contains the static library and header files + for libparted, which are really only of interest to parted + developers. + . + Parted currently supports DOS, Mac, Sun, BSD, GPT, MIPS and + PC98 disklabels/partition tables, as well as a 'loop' (raw + disk) type which allows use on RAID/LVM. Filesystems which + are currently fully supported are ext2, ext3, fat (FAT16 + and FAT32), ReiserFS (with libreiserfs) and linux-swap. + Parted can also detect and remove HFS (Mac OS), JFS, NTFS, + UFS (Sun and HP), XFS and ASFS/AFFS/APFS (Amiga) filesystems, + but cannot create, resize or check these filesystems yet. + . + Note that ReiserFS support is only enabled if you install + the libreiserfs0.3-0 package. Since libreiserfs0.3-0 has been + removed from sarge, ReiserFS support is not compiled in the + default package. + . + The nature of this software means that any bugs could cause + massive data loss. While there are no known bugs at the moment, + they could exist, so please back up all important files before + running it, and do so at your own risk. + +Package: libparted@LIBPKGVER@-dbg +Architecture: any +Section: libdevel +Priority: extra +Depends: libparted@SHAREDLIBPKGVER@ (= ${binary:Version}), libparted@LIBPKGVER@-dev (= ${binary:Version}) +Conflicts: libparted-dbg +Replaces: libparted-dbg +Provides: libparted-dbg +Description: The GNU Parted disk partitioning library debug development files + GNU Parted is a program that allows you to create, destroy, + resize, move and copy hard disk partitions. This is useful + for creating space for new operating systems, reorganising + disk usage, and copying data to new hard disks. This package + contains the Parted binary and manual page. + . + This package contains the debugging static library for + libparted, which are really only of interest to parted + developers who need to debug their programs. + . + The debugging libraries are installed as /usr/lib/libparted_g.a + Link specifically with them if you want to debug. + . + Parted currently supports DOS, Mac, Sun, BSD, GPT, MIPS and + PC98 disklabels/partition tables, as well as a 'loop' (raw + disk) type which allows use on RAID/LVM. Filesystems which + are currently fully supported are ext2, ext3, fat (FAT16 + and FAT32), ReiserFS (with libreiserfs) and linux-swap. + Parted can also detect and remove HFS (Mac OS), JFS, NTFS, + UFS (Sun and HP), XFS and ASFS/AFFS/APFS (Amiga) filesystems, + but cannot create, resize or check these filesystems yet. + . + Note that ReiserFS support is only enabled if you install + the libreiserfs0.3-0 package. Since libreiserfs0.3-0 has been + removed from sarge, ReiserFS support is not compiled in the + default package. + . + The nature of this software means that any bugs could cause + massive data loss. While there are no known bugs at the moment, + they could exist, so please back up all important files before + running it, and do so at your own risk. + +Package: parted@BINPKGVER@-doc +Architecture: all +Section: doc +Suggests: parted@BINPKGVER@ | libparted@LIBPKGVER@-dev +Conflicts: parted1.6-doc +Replaces: parted1.6-doc +Description: The GNU Parted disk partition resizing program documentation + GNU Parted is a program that allows you to create, destroy, + resize, move and copy hard disk partitions. This is useful + for creating space for new operating systems, reorganising + disk usage, and copying data to new hard disks. This package + contains user documentation for parted (for the 'parted@BINPKGVER@' + package) and API documentation for libparted (for the + 'libparted@LIBPKGVER@' and 'libparted@LIBPKGVER@-dev' packages). --- parted-1.8.8.git.2008.03.24.orig/debian/libparted-i18n.files +++ parted-1.8.8.git.2008.03.24/debian/libparted-i18n.files @@ -0,0 +1 @@ +usr/share/locale --- parted-1.8.8.git.2008.03.24.orig/debian/libparted.files +++ parted-1.8.8.git.2008.03.24/debian/libparted.files @@ -0,0 +1 @@ +lib/libparted*.so.* --- parted-1.8.8.git.2008.03.24.orig/debian/parted.files +++ parted-1.8.8.git.2008.03.24/debian/parted.files @@ -0,0 +1,3 @@ +sbin +usr/share/man/man8/parted.8 +usr/share/man/man8/partprobe.8 --- parted-1.8.8.git.2008.03.24.orig/debian/libparted1.8-dev.files +++ parted-1.8.8.git.2008.03.24/debian/libparted1.8-dev.files @@ -0,0 +1,6 @@ +usr/lib/libparted.a +usr/lib/libparted.la +usr/lib/libparted.so +usr/lib/pkgconfig +usr/include + --- parted-1.8.8.git.2008.03.24.orig/debian/control +++ parted-1.8.8.git.2008.03.24/debian/control @@ -0,0 +1,253 @@ +Source: parted +Section: admin +Priority: optional +Maintainer: Ubuntu Core developers +XSBC-Original-Maintainer: Parted Maintainer Team +Uploaders: Sven Luther , Otavio Salvador , Bastian Blank , Xavier Oswald +Standards-Version: 3.7.2 +Build-Depends: debhelper (>= 5.0.22), dpatch, libncurses-dev | libncurses5-dev, libreadline5-dev | libreadline-dev, libdevmapper-dev, uuid-dev, gettext, texinfo (>= 4.2), debianutils (>= 1.13.1), autoconf, automake1.10, libtool, libgeom-dev [kfreebsd-i386 kfreebsd-amd64], cvs, po4a, pkg-config + +Package: parted +Architecture: any +Section: admin +Depends: ${shlibs:Depends} +Suggests: parted-doc +Conflicts: fsresize, parted1.6 +Replaces: fsresize, parted1.6 +Description: The GNU Parted disk partition resizing program + GNU Parted is a program that allows you to create, destroy, + resize, move and copy hard disk partitions. This is useful + for creating space for new operating systems, reorganising + disk usage, and copying data to new hard disks. This package + contains the Parted binary and manual page. + . + Parted currently supports DOS, Mac, Sun, BSD, GPT, MIPS and + PC98 disklabels/partition tables, as well as a 'loop' (raw + disk) type which allows use on RAID/LVM. Filesystems which + are currently fully supported are ext2, ext3, fat (FAT16 + and FAT32), ReiserFS (with libreiserfs) and linux-swap. + Parted can also detect and remove HFS (Mac OS), JFS, NTFS, + UFS (Sun and HP), XFS and ASFS/AFFS/APFS (Amiga) filesystems, + but cannot create, resize or check these filesystems yet. + . + Note that ReiserFS support is only enabled if you install + the libreiserfs0.3-0 package. Since libreiserfs0.3-0 has been + removed from sarge, ReiserFS support is not compiled in the + default package. + . + The nature of this software means that any bugs could cause + massive data loss. While there are no known bugs at the moment, + they could exist, so please back up all important files before + running it, and do so at your own risk. + +Package: parted-udeb +XC-Package-Type: udeb +Architecture: any +Section: debian-installer +Priority: extra +XB-Installer-Menu-Item: 99999 +Depends: ${shlibs:Depends} +Description: Manually partition a hard drive (parted) + +Package: libparted1.8-9 +Architecture: any +Section: libs +Depends: ${shlibs:Depends} +Suggests: parted | nparted, libparted1.8-dev, libparted1.8-i18n (= ${source:Version}) +Conflicts: parted (<< 1.4.13+14pre1), libparted0, libparted1, libparted2 +Replaces: libparted0, libparted1, libparted2, libparted1.4 (<< 1.4.24-2) +Provides: libparted +Description: The GNU Parted disk partitioning shared library + GNU Parted is a program that allows you to create, destroy, + resize, move and copy hard disk partitions. This is useful + for creating space for new operating systems, reorganising + disk usage, and copying data to new hard disks. This package + contains the Parted binary and manual page. + . + This package contains libparted, the required shared library + used by Parted. + . + Parted currently supports DOS, Mac, Sun, BSD, GPT, MIPS and + PC98 disklabels/partition tables, as well as a 'loop' (raw + disk) type which allows use on RAID/LVM. Filesystems which + are currently fully supported are ext2, ext3, fat (FAT16 + and FAT32), ReiserFS (with libreiserfs) and linux-swap. + Parted can also detect and remove HFS (Mac OS), JFS, NTFS, + UFS (Sun and HP), XFS and ASFS/AFFS/APFS (Amiga) filesystems, + but cannot create, resize or check these filesystems yet. + . + Note that ReiserFS support is only enabled if you install + the libreiserfs0.3-0 package. Since libreiserfs0.3-0 has been + removed from sarge, ReiserFS support is not compiled in the + default package. + . + The nature of this software means that any bugs could cause + massive data loss. While there are no known bugs at the moment, + they could exist, so please back up all important files before + running it, and do so at your own risk. + +Package: libparted1.8-udeb +XC-Package-Type: udeb +Architecture: any +Section: debian-installer +Priority: extra +Depends: ${shlibs:Depends} +Description: The GNU Parted disk partitioning shared library + GNU Parted is a program that allows you to create, destroy, + resize, move and copy hard disk partitions. This is useful + for creating space for new operating systems, reorganising + disk usage, and copying data to new hard disks. This package + contains the Parted binary and manual page. + . + This package contains libparted, the required shared library + used by Parted. This is a cut-down package with no normal + documentation intended to be used in debian-installer. + . + Parted currently supports DOS, Mac, Sun, BSD, GPT, MIPS and + PC98 disklabels/partition tables, as well as a 'loop' (raw + disk) type which allows use on RAID/LVM. Filesystems which + are currently fully supported are ext2, ext3, fat (FAT16 + and FAT32), ReiserFS (with libreiserfs) and linux-swap. + Parted can also detect and remove HFS (Mac OS), JFS, NTFS, + UFS (Sun and HP), XFS and ASFS/AFFS/APFS (Amiga) filesystems, + but cannot create, resize or check these filesystems yet. + . + Note that ReiserFS support is only enabled if you install + the libreiserfs0.3-0 package. Since libreiserfs0.3-0 has been + removed from sarge, ReiserFS support is not compiled in the + default package. + . + The nature of this software means that any bugs could cause + massive data loss. While there are no known bugs at the moment, + they could exist, so please back up all important files before + running it, and do so at your own risk. + +Package: libparted1.8-i18n +Architecture: all +Section: libs +Depends: libparted1.8-9 +Replaces: libparted0, libparted1, libparted2, libparted1.4 (<< 1.4.24-2), libparted1.6 (<< 1.5+1.6.0-pre3-2), libparted1.4-i18n, parted (<< 1.4.13+14pre1) +Conflicts: libparted-i18n +Provides: libparted-i18n +Description: The GNU Parted disk partitioning library i18n support + GNU Parted is a program that allows you to create, destroy, + resize, move and copy hard disk partitions. This is useful + for creating space for new operating systems, reorganising + disk usage, and copying data to new hard disks. This package + contains the Parted binary and manual page. + . + This package contains the i18n message catalogs for + libparted and parted. + . + Parted currently supports DOS, Mac, Sun, BSD, GPT, MIPS and + PC98 disklabels/partition tables, as well as a 'loop' (raw + disk) type which allows use on RAID/LVM. Filesystems which + are currently fully supported are ext2, ext3, fat (FAT16 + and FAT32), ReiserFS (with libreiserfs) and linux-swap. + Parted can also detect and remove HFS (Mac OS), JFS, NTFS, + UFS (Sun and HP), XFS and ASFS/AFFS/APFS (Amiga) filesystems, + but cannot create, resize or check these filesystems yet. + . + Note that ReiserFS support is only enabled if you install + the libreiserfs0.3-0 package. Since libreiserfs0.3-0 has been + removed from sarge, ReiserFS support is not compiled in the + default package. + . + The nature of this software means that any bugs could cause + massive data loss. While there are no known bugs at the moment, + they could exist, so please back up all important files before + running it, and do so at your own risk. + +Package: libparted1.8-dev +Architecture: any +Section: libdevel +Depends: libc6-dev, libparted1.8-9 (= ${binary:Version}) +Suggests: parted (= ${binary:Version}), parted-doc +Conflicts: libparted-dev, parted (<< 1.2.11) +Replaces: libparted-dev, libparted0-dev, libparted2-dev +Provides: libparted-dev +Description: The GNU Parted disk partitioning library development files + GNU Parted is a program that allows you to create, destroy, + resize, move and copy hard disk partitions. This is useful + for creating space for new operating systems, reorganising + disk usage, and copying data to new hard disks. This package + contains the Parted binary and manual page. + . + This package contains the static library and header files + for libparted, which are really only of interest to parted + developers. + . + Parted currently supports DOS, Mac, Sun, BSD, GPT, MIPS and + PC98 disklabels/partition tables, as well as a 'loop' (raw + disk) type which allows use on RAID/LVM. Filesystems which + are currently fully supported are ext2, ext3, fat (FAT16 + and FAT32), ReiserFS (with libreiserfs) and linux-swap. + Parted can also detect and remove HFS (Mac OS), JFS, NTFS, + UFS (Sun and HP), XFS and ASFS/AFFS/APFS (Amiga) filesystems, + but cannot create, resize or check these filesystems yet. + . + Note that ReiserFS support is only enabled if you install + the libreiserfs0.3-0 package. Since libreiserfs0.3-0 has been + removed from sarge, ReiserFS support is not compiled in the + default package. + . + The nature of this software means that any bugs could cause + massive data loss. While there are no known bugs at the moment, + they could exist, so please back up all important files before + running it, and do so at your own risk. + +Package: libparted1.8-dbg +Architecture: any +Section: libdevel +Priority: extra +Depends: libparted1.8-9 (= ${binary:Version}), libparted1.8-dev (= ${binary:Version}) +Conflicts: libparted-dbg +Replaces: libparted-dbg +Provides: libparted-dbg +Description: The GNU Parted disk partitioning library debug development files + GNU Parted is a program that allows you to create, destroy, + resize, move and copy hard disk partitions. This is useful + for creating space for new operating systems, reorganising + disk usage, and copying data to new hard disks. This package + contains the Parted binary and manual page. + . + This package contains the debugging static library for + libparted, which are really only of interest to parted + developers who need to debug their programs. + . + The debugging libraries are installed as /usr/lib/libparted_g.a + Link specifically with them if you want to debug. + . + Parted currently supports DOS, Mac, Sun, BSD, GPT, MIPS and + PC98 disklabels/partition tables, as well as a 'loop' (raw + disk) type which allows use on RAID/LVM. Filesystems which + are currently fully supported are ext2, ext3, fat (FAT16 + and FAT32), ReiserFS (with libreiserfs) and linux-swap. + Parted can also detect and remove HFS (Mac OS), JFS, NTFS, + UFS (Sun and HP), XFS and ASFS/AFFS/APFS (Amiga) filesystems, + but cannot create, resize or check these filesystems yet. + . + Note that ReiserFS support is only enabled if you install + the libreiserfs0.3-0 package. Since libreiserfs0.3-0 has been + removed from sarge, ReiserFS support is not compiled in the + default package. + . + The nature of this software means that any bugs could cause + massive data loss. While there are no known bugs at the moment, + they could exist, so please back up all important files before + running it, and do so at your own risk. + +Package: parted-doc +Architecture: all +Section: doc +Suggests: parted | libparted1.8-dev +Conflicts: parted1.6-doc +Replaces: parted1.6-doc +Description: The GNU Parted disk partition resizing program documentation + GNU Parted is a program that allows you to create, destroy, + resize, move and copy hard disk partitions. This is useful + for creating space for new operating systems, reorganising + disk usage, and copying data to new hard disks. This package + contains user documentation for parted (for the 'parted' + package) and API documentation for libparted (for the + 'libparted1.8' and 'libparted1.8-dev' packages). --- parted-1.8.8.git.2008.03.24.orig/debian/copyright +++ parted-1.8.8.git.2008.03.24/debian/copyright @@ -0,0 +1,27 @@ +This package was debianized by Timshel Knoll on +Fri, 5 Nov 1999 18:11:28 +1100. + +It was downloaded from ftp://ftp.gnu.org/gnu/parted/ + +Upstream Authors: Andrew Clausen + Lennert Buytanhek + Matthew Wilson + +Copyright: + + Copyright (C) 1998-2007 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. + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License v3 can be found in `/usr/share/common-licenses/GPL-3'. + + -- Otavio Salvador Mon, 24 Mar 2008 23:30:11 +0000 --- parted-1.8.8.git.2008.03.24.orig/debian/README.Debian +++ parted-1.8.8.git.2008.03.24/debian/README.Debian @@ -0,0 +1,67 @@ +GNU Parted for Debian +---------------------- + +The nature of this software means that any bugs could cause massive data loss. +While there are no known bugs at the moment, they could exist, so please back +up all important files before running it, and do so at your own risk. + +General: + * Actively maintained + * Support for CHS and LBA addressing modes + * Support for logical sector sizes not equal to 512 + * Support for device's alignment requirements (e.g. physical sector sizes that + are a multiple of the logical sector size) + * Uses SI units (byte multiples of 1000), supporting arbitrary specification + of disk locations in sectors, bytes, kilobytes, megabytes, gigabytes, + cylinders and CHS notation + * Knows about, detects and works around quirks of other partitioning tools and + operating system implementations + +Operating system support: + * GNU/Linux + * GNU/Hurd + * BeOS + * FreeBSD + +Parted currently supports: + * Intel EFI/GPT parition tables + * MS-DOS partition tables + * Raw access (useful for RAID/LVM) + * MIPS/DVH partition tables + * Amiga partition tables + * PC98 partition tabled + * Sun disk labels + * BSD disk labels (Linux-style; currently broken from a BSD view) + * Macintosh parition maps + +Filesystems currently supported: +[from the user documentation] + +Filesystem | Supported Operations + |detect |create |resize | copy | check +----------------|-------|-------|-------|-------|-------- +ext2 | * | * | *[1] | *[2] | *[3] +ext3 | * | | *[1] | *[2] | *[3] +fat16 | * | * | *[4] | *[4] | * +fat32 | * | * | * | * | * +linux-swap | * | * | * | * | * +hfs/hfs+ | * | | *[1,5]| | +jfs | * | | | | +ntfs | * | | | | +reiserfs | * | *[6] | *[1,6]| *[6] | *[3,6] +ufs | * | | | | +xfs | * | | | | + +[1] The start of the partition must stay fixed. +[2] The partition you copy to must be bigger or exactly the same size as the + partition you copy from. +[3] Limited checking is done when the file system is opened. This is the only + checking at the moment. All commands (including resize) will gracefully + fail, leaving the file system intact, if there are any errors. +[4] You can always shrink your partition. If you can't use FAT32 for some + reason, you may not be able to grow your partition due to restrictions in + cluster size. +[5] Parted can only shrink HFS and HFS+ filesystems. +[6] ReiserFS support is enabled if you install libreiserfs. + + -- Xavier Oswald Wed, 25 Apr 2007 23:31:15 +0200 --- parted-1.8.8.git.2008.03.24.orig/debian/parted-bf.manpages +++ parted-1.8.8.git.2008.03.24/debian/parted-bf.manpages @@ -0,0 +1 @@ +doc/parted.8 --- parted-1.8.8.git.2008.03.24.orig/debian/changelog +++ parted-1.8.8.git.2008.03.24/debian/changelog @@ -0,0 +1,1782 @@ +parted (1.8.8.git.2008.03.24-7ubuntu1) intrepid; urgency=low + + * Resynchronise with Debian (LP: #237568). Remaining changes: + - swap-uuid.dpatch: Create UUIDs on new swap partitions. + - gptsync.dpatch: On Intel Mac systems, write a synced MBR rather than a + protective MBR. + - Add -fno-stack-protector on sparc. + - sparc-new-label.dpatch: Fix sparc disk label generation. This is + required for LDOM and parallel installations with Solaris 10. + - loop-partitions.dpatch: Loop devices can only have one partition, so + don't generate device names such as "/dev/loop0p1". + - unpartitioned-disks.dpatch: Don't try to call BLKPG ioctls on + unpartitionable disks (only implemented for loop devices at the + moment), as they will always fail. + - When building with gcc-4.3, add -Wno-array-bounds to CFLAGS. + - Cell partition tables are misdetected as pc98, so disable pc98 support + on powerpc. + - array-bounds.dpatch: Backport patch from git to allow building with + gcc-4.3. + + -- Colin Watson Tue, 24 Jun 2008 14:31:05 +0100 + +parted (1.8.8.git.2008.03.24-7) unstable; urgency=low + + * Upload to unstable + + -- Otavio Salvador Sat, 21 Jun 2008 15:58:02 -0300 + +parted (1.8.8.git.2008.03.24-6) experimental; urgency=low + + [ Otavio Salvador ] + * Give the parted udeb a menu item number. This allows it to be + selected manually in anna. Update the udeb description for + consistency and remove the long description to save space. Thanks to + Frans Pop (closes: #466826). + + [ Jim Meyering ] + * test for improved DOS-partition-table recognition + + [ Colin Watson ] + * bug fix: improve DOS partition table recognition + + [ Jim Meyering ] + * avoid const-related compiler warnings + + -- Otavio Salvador Tue, 03 Jun 2008 19:25:27 -0300 + +parted (1.8.8.git.2008.03.24-5) experimental; urgency=low + + * Disable LVM support for dasd labels + + -- Otavio Salvador Tue, 27 May 2008 21:52:48 -0300 + +parted (1.8.8.git.2008.03.24-4) experimental; urgency=low + + [ Otavio Salvador ] + * properly test for __s390__ and __s390x__ macros to disable O_DIRECT + on that + + [ Matt Davis ] + * Corrected a few memory leaks from unallocated ped_unit_format calls. + * Corrected memory leak when displaying partition flags. + * Corrected a small memory leak when displaying partition information + + [ Otavio Salvador ] + * do not loop in case message exception has no message + * fix memory leak in exception handler + * Ensure that autoreconf uses aclocal 1.0 + + -- Otavio Salvador Tue, 06 May 2008 14:35:08 -0300 + +parted (1.8.8.git.2008.03.24-3) experimental; urgency=low + + [ Otavio Salvador ] + * Bump version to 1.8.9 since it broke ABI interface + * Ensure that autoreconf uses automake 1.10 + * Add debian/libparted-i18n.files and debian/libparted-dev.files + removed by mistake + * Change soname and dependency requirements due ABI change + + [ Robert Millan ] + * Add support for GRUB / BIOS partition in GPT. + + -- Otavio Salvador Sat, 12 Apr 2008 16:18:46 -0300 + +parted (1.8.8.git.2008.03.24-2) experimental; urgency=low + + [ Bastian Blank ] + * Fix syntax error. + * Use host_cpu for s390 check. + + [ Jim Meyering ] + * Fix a typo: s/to defragmenting/to defragment/, Remove trailing + blanks. + * Don't write into line[-1] when line starts with a NUL byte. + + -- Otavio Salvador Wed, 09 Apr 2008 19:12:54 -0300 + +parted (1.8.8.git.2008.03.24-1) experimental; urgency=low + + [ Cyril Brulebois ] + * debian/rules: + - add “-fgnu89-inline” to “CFLAGS” and “UDEB_CFLAGS” to fix FTBFS + (Closes: #442308). + * debian/control.in: + - make the packages binNMU-safe by using binary:Version and + source:Version instead of Source-Version. + + [ Otavio Salvador ] + * Really duplicate disks instead of readd each partition so it preserves + the ordering and like (Closes: #294520). + * Point to GPL-3 instead of including it since it is now available. + * Package Patches: + - lvm2.dpatch: droped, equivalent code merged upstream; + + -- Otavio Salvador Mon, 24 Mar 2008 20:37:45 -0300 + +parted (1.8.7.git.2007.07.30-1) experimental; urgency=low + + * New upstream release. + + [ Xavier Oswald ] + * debian/README.Debian updated + * debian/parted-doc.docs updated + + [ Otavio Salvador ] + * Package Patches: + - doc-package.dpatch: redone from scratch; + - s390.dpatch: dropped, equivalent code merged upstream; + - parted-print-name.dpatch: likewise. + - errors-to-stderr.dpatch: likewise. + - devfs.dpatch: rediff. + - sparc-fix-raid.dpatch: likewise. + - lvm2.dpatch: readd the missing parts for the LVM partitions + probing; + * debian/rules: + - configure called with --enable-device-mapper to include + device-mapper support in; + - build gnulib when building udeb and debugging packages otherwise + they'd fail; + - change soname version; + * debian/control: + - add libdevmapper-dev as build-dependency; + - add pkg-config as build-dependency; + - cleanup udeb dependencies. Thanks to Frans Pop + by the patch; (Closes: #419609) + * debian/watch: use the GNU ftp since the HTTP address was giving + timeout; + * debian/libparted-dev.files: stop to provide parted.m4 but provides + pkgconfig, instead; + * debian/parted-doc.docs: drop COPYING; + * debian/copyright: updated since parted is now licensed on GPL3; + * debian/rules: change package names to follow soname; + + -- Otavio Salvador Mon, 30 Jul 2007 20:49:10 -0300 + +parted (1.8.1~git1-1) experimental; urgency=low + + * New git snapshot + * doc-package.dpatch: removed hunk that was merge upstream; + * debian/copyright: update FSF address; + * debian/control.in, debian/rules: bump automake requirement to 1.10; + * debian/patches/00list: disabled kfreebsd support by now; + + -- Otavio Salvador Mon, 27 Nov 2006 11:35:20 -0200 + +parted (1.8.0~rc3-1) experimental; urgency=low + + * New upstream release. + + [ Otavio Salvador ] + * doc-package.dpatch: fixed file paths; + * devfs.dpatch: minor change to make it apply again since linux.c had + its #includes massively changed; + * lvm2.dpatch: removed since upstream version now has device-manager + support natively; + * s390.dpatch: removed since upstream version now has device-manager + support natively; + * parted.files: we're not installing pt_BR manpage anymore since it + needs to be updated to new translation systems that is being use in + Parted now; + + [ Xavier Oswald ] + * add po4a as build-dependancy. + * Adding myself as comaintainer of the package. + * policy 3.7.2 + + -- Sven Luther Wed, 1 Nov 2006 19:27:46 +0100 + +parted (1.7.1-5.1ubuntu11) intrepid; urgency=low + + * array-bounds.dpatch: Backport patch from git to allow building with + gcc-4.3 (closes: #474822, LP: #185882). + + -- Colin Watson Thu, 29 May 2008 21:14:14 +0100 + +parted (1.7.1-5.1ubuntu10) intrepid; urgency=low + + * fat-partition-table.dpatch: Instead of checking for FAT file system + signatures (which has false positives), check whether the boot indicator + on each partition is 0 or 0x80 (LP: #232175). This matches the behaviour + of both the Linux kernel and fdisk. + + -- Colin Watson Thu, 29 May 2008 12:09:09 +0100 + +parted (1.7.1-5.1ubuntu9) hardy; urgency=low + + * gptsync.dpatch: Only write a synced legacy MBR on Apple systems; + otherwise, write a protective MBR per the EFI standard (LP: #107326). + This behaviour may be overridden by setting the environment variable + PARTED_GPT_APPLE to 1 (always write synced legacy MBR) or 0 (always + write protective MBR). + + -- Colin Watson Sun, 30 Mar 2008 21:35:47 +0100 + +parted (1.7.1-5.1ubuntu8) gutsy; urgency=low + + * Cell partition tables are misdetected as pc98, so disable pc98 support + on powerpc. + + -- Colin Watson Wed, 26 Sep 2007 12:52:08 +0100 + +parted (1.7.1-5.1ubuntu7) gutsy; urgency=low + + * When building with gcc-4.3, add -Wno-array-bounds to CFLAGS. + LP: #138638. + * debian/control*: Update maintainer address. + + -- Matthias Klose Sat, 15 Sep 2007 08:45:15 +0000 + +parted (1.7.1-5.1ubuntu6) gutsy; urgency=low + + * unpartitioned-disks.dpatch: Don't try to call BLKPG ioctls on + unpartitionable disks (only implemented for loop devices at the moment), + as they will always fail. + + -- Colin Watson Fri, 07 Sep 2007 12:08:04 +0100 + +parted (1.7.1-5.1ubuntu5) gutsy; urgency=low + + * Fix up lvm2.dpatch to apply again. + + -- Colin Watson Mon, 20 Aug 2007 16:35:00 +0100 + +parted (1.7.1-5.1ubuntu4) gutsy; urgency=low + + * loop-partitions.dpatch: Rearrange test order so that this actually + works. + + -- Colin Watson Mon, 20 Aug 2007 15:31:02 +0100 + +parted (1.7.1-5.1ubuntu3) gutsy; urgency=low + + * loop-partitions.dpatch: Loop devices can only have one partition, so + don't generate device names such as "/dev/loop0p1". + + -- Colin Watson Mon, 30 Jul 2007 12:24:48 +0100 + +parted (1.7.1-5.1ubuntu2) gutsy; urgency=low + + * Fix sparc disk label generation. This is required for LDOM + and parallel installations with Solaris 10. + Add patch: sparc-new-label + + Many thanks to David S. Miller for the patch. + + -- Fabio M. Di Nitto Mon, 02 Jul 2007 07:55:46 +0200 + +parted (1.7.1-5.1ubuntu1) gutsy; urgency=low + + * Merge from debian unstable, remaining changes: + - set Maintainer to ubuntu + - swap-uuid: create UUIDs on new swap partitions + - hfs-endian: support for resizing little endian HFS+ + - gptsync.dpatch: automatic GPT/MBR partition table synchronisation + - add -fno-stack-protector on sparc + + -- Michael Vogt Mon, 14 May 2007 11:39:42 +0200 + +parted (1.7.1-5.1) unstable; urgency=high + + * Non-maintainer upload. + * High-urgency upload for RC bugfix. + * Patch to ensure changes to RAID/LVM flags on mac partitions are + saved and reloaded correctly, so that debian-installer can use RAID for + install on mac powerpcs; thanks to David Härdeman for the patch. + Closes: #413184. + + -- Steve Langasek Tue, 6 Mar 2007 00:51:09 -0800 + +parted (1.7.1-5) unstable; urgency=low + + * ntfs-align.dpatch: Disabled. We found regressions on it. + + -- Otavio Salvador Mon, 22 Jan 2007 08:44:06 -0200 + +parted (1.7.1-4) unstable; urgency=low + + * ntfs-align.dpatch: Fix align issue with new NTFS release (used by + Windows Vista). Thanks to David Cantrell by + working on the patch for it. Closes: #380226 + + -- Otavio Salvador Fri, 19 Jan 2007 17:21:26 -0200 + +parted (1.7.1-3ubuntu4) feisty; urgency=low + + * gptsync.dpatch: Fix = vs. == typo. + + -- Colin Watson Wed, 7 Mar 2007 16:29:14 +0000 + +parted (1.7.1-3ubuntu3) feisty; urgency=low + + [ Matthew Garrett ] + * gptsync.dpatch: Perform automatic GPT/MBR partition table + synchronisation (LP: #46853). + + [ Colin Watson ] + * Set Maintainer to ubuntu-devel-discuss, not ubuntu-devel. + + -- Colin Watson Wed, 7 Mar 2007 12:50:09 +0000 + +parted (1.7.1-3ubuntu2) feisty; urgency=low + + * hfs-endian.dpatch: Add support for resizing little endian HFS+ journals + (thanks, Matthew Garrett; LP: #84764). + * Set Maintainer to ubuntu-devel. + + -- Colin Watson Wed, 28 Feb 2007 15:46:59 +0000 + +parted (1.7.1-3ubuntu1) feisty; urgency=low + + * Merge from debian unstable. + + -- Fabio M. Di Nitto Tue, 14 Nov 2006 16:03:43 -0800 + +parted (1.7.1-3) unstable; urgency=low + + * parted-print-name.dpatch : Fix bug in parted print, when there are no + extended partitions, but partition names. + * disabled parted part of kfreebsd-gnu.dpatch, since the patch caused + parted to have trouble in a d-i environment to print the partition table, + thus causing tools relying on parted -s print to find information about + the partition table to break, like the one checking for RAID partitions + in d-i. (Closes: #392767) + + -- Sven Luther Tue, 7 Nov 2006 17:45:28 +0100 + +parted (1.7.1-2.1ubuntu3) edgy; urgency=low + + * Disable stack protector on sparc. It doesn't work otherwise. + + -- Fabio M. Di Nitto Mon, 18 Sep 2006 13:15:18 +0200 + +parted (1.7.1-2.1ubuntu2) edgy; urgency=low + + * kfreebsd-gnu.dpatch: Fix memory corruption in table_render_row. + + -- Colin Watson Mon, 11 Sep 2006 12:19:35 +0100 + +parted (1.7.1-2.1ubuntu1) edgy; urgency=low + + * swap-uuid.dpatch: Create UUIDs on new swap partitions. + + -- Colin Watson Thu, 31 Aug 2006 10:04:49 +0100 + +parted (1.7.1-2.1) unstable; urgency=low + + * Non-maintainer upload. + * gpt.dpatch: Put the alternative GPT partition table one sector further + out, to avoid having it overlap with the last sector of one partition. + (Closes: #349718) + + -- Steinar H. Gunderson Wed, 5 Jul 2006 21:13:07 +0200 + + +parted (1.7.1-2) unstable; urgency=low + + [ Bastian Blank ] + * Fix s390 patch to not intend to use ibm disklabels on FBA. (Closes: #369580) + + [ Otavio Salvador ] + * Ack NMU. (Closes: #369491) + * Add Bastian Blank as uploader. + * Add libparted changelog in libparted1.7-1 and libparted1.7-dev + packages. (Closes: #369780) + * Apply patch from David Härdeman to improve lvm + support to include all kind of device-mapper devices. (Closes: #367965) + * Fix s390 patch to apply again after lvm support improvement. + + -- Otavio Salvador Fri, 2 Jun 2006 11:17:12 -0300 + +parted (1.7.1-1.1) unstable; urgency=low + + * Non-maintainer upload. + * Fix abi check. + + -- Bastian Blank Tue, 30 May 2006 17:00:54 +0200 + +parted (1.7.1-1) unstable; urgency=low + + * New upstream release. + - change soname version due a ABI change; + - update minor dependency requirement due ABI change; + * Update the baseline symbols to allow us to detect ABI changes. + * Enable ABI checking in build process (just in i386). + * Add cvs as build-dependency. (Closes: #368363). + + -- Otavio Salvador Mon, 29 May 2006 10:16:06 -0300 + +parted (1.7.0-1) unstable; urgency=low + + [ This version has some changes regarting to API and ABI so you'll + probably need to check your code if you link anything against it. ] + + * New upstream release. + - doc-package.dpatch: rediff since some parts was applied upstream + by me; + - reiserfs-libname.dpatch: rediff 'cause of files reorganization; + - devfs.dpatch: likewise; + - lvm2.dpatch: likewise; + - s390.dpatch: likewise; + - sparc-fix-raid: likewise; + - fix_rescue_segfault.dpatch: dropped since it was backport from + upstream; + - remove FAQ from parted-doc since upstream do not suply it + anymore. + * Use ABI brokeness detection code; + + -- Otavio Salvador Sat, 20 May 2006 00:32:36 -0300 + +parted (1.6.25.1-3) unstable; urgency=low + + * Apply patch to include kFreeBSD support. Thanks to Robert Millan + (Closes: #363381) + * Apply patch to use debhelper support for shlibs in udebs. Thanks to + Frans Pop (Closes: #360213) + * Apply patch to fix RAID usage in SPARC. Thanks to Fabio Di Nitto + (Closes: #355467) + + -- Otavio Salvador Thu, 20 Apr 2006 17:45:22 -0300 + +parted (1.6.25.1-2) unstable; urgency=medium + + [ Otavio Salvador ] + * New s390 patch. Urgency set to medium to try to hit testing in time to + release s390 in D-I Beta2 timeframe (Closes: #328992); + * Set capabitility level of debhelper to 4; + + -- Otavio Salvador Mon, 6 Feb 2006 21:37:10 -0200 + +parted (1.6.25.1-1) unstable; urgency=low + + [ Otavio Salvador ] + * New upstream release: + - sync_r388.dpatch: drop since is unneeded + * Really change libreadline dependency (Closes: #333957) + * Change DEPVER to 1.6.24 to force the right version number as + dependencie and to avoid ABI mistake (Closes: #322262) + * fix_rescue_segfault.dpatch: added. Backported from current development + version to avoid a segfault in some uses of rescue command. + + -- Otavio Salvador Thu, 17 Nov 2005 13:31:38 -0200 + +parted (1.6.24-4) unstable; urgency=low + + *** This version doesn't apply s390 support by default *** + + [ Otavio Salvador ] + * ubd.dpatch: update to new source code. + * Drop merged upstream patches: + - parted.8.dpatch + - id.po.dpatch + - es.po.dpatch + - sparc.dpatch + - gcc_warnings_fix.dpatch + - ubd.dpatch + - udev-devfs-rules.dpatch + * sync_r388.dpatch: add to include current upstream fixes. + * s390.dpatch: Resync with current upstream code. + * *Disable* s390.dpatch by default. It has some strange things that need + to be cleared. + + [ Bastian Blank ] + * s390.dpatch: Update to apply again. + + -- Otavio Salvador Mon, 10 Oct 2005 16:40:00 -0300 + +parted (1.6.24-3) unstable; urgency=high + + [ Otavio Salvador ] + * Applied patch from A. Costa to update README.Debian + about hfs support + * parted.8.dpatch: manpage patch from A. Costa + * id.po.dpatch: include Indonesian language + * es.po.dpatch: update Spanish language translation + * sparc.dpatch: recognize partitions on sun disklabel (Closes: #328694) + + -- Otavio Salvador Fri, 9 Sep 2005 10:49:35 -0300 + +parted (1.6.24-2) unstable; urgency=medium + + [ Otavio Salvador ] + * Bumb Standards-Version to 3.6.2 (no changes need) + * Update debian/watch to version 3 standard + * Change the build-dependency to libreadline5-dev | libreadline-dev to + allow the libreadline4-dev removal from archive ASAP. (Closes: #326309) + * Urgency set to medium since it hasn't code changes. + + -- Otavio Salvador Sat, 3 Sep 2005 12:57:49 -0300 + +parted (1.6.24-1) unstable; urgency=low + + [ Sven Luther ] + * New Upstream release. + + [ Otavio Salvador ] + * Applied my patch to solve building using Sarge's toolchain. (Closes: #321212) + * Patch included upstream to fix some small typos on German translation + (Jens Seidel ). (Closes: #313948) + * Really include udev-devfs-rules.dpatch but already on the updated + version (Colin Watson ). (Closes: #311664) + * Patch included upstream to update documentation for HFS and HFS+ + current status (Nikolaus Schulz ). (Closes: #298020) + * Applied patch to fix FTBFS on Hurd (Michael Banck + ). (Closes: #297580) + * gcc_warnings_fix.dpatch: Created to fix current warnings while + building using GCC 4.0. + * Change library soname to 13. + * Add myself on uploaders field. + + -- Otavio Salvador Sun, 21 Aug 2005 15:56:50 -0300 + +parted (1.6.23-3) unstable; urgency=low + + * Oh well, built -2 in a broken chroot, fixed now. + * Notice, i wwish to remember all readers that i have put out a request for + help for this package, and altough people replied, no long standing help + happened. As i am going to also need to take more upstream + responsabilities, i definitively want to recall for help on parted + packaging, especially for arches i am not so good with (and yes, this + includes x86 :). For the ubuntu guys, next time you make a patch, you are + welcome to do it in the parted subversion repository on alioth, and upload + both packages if i don't comment for a longer time like i did in June. + + -- Sven Luther Sun, 17 Jul 2005 07:33:11 +0200 + +parted (1.6.23-2) unstable; urgency=low + + * The following patches where taken from the ubuntu parted package : + - Fix gcc4 warning in lvm2 patch (Matthias Klose ) + - udev-devfs-rules.dpatch: Check for devfs-style /disc => /partN + transformation unconditionally; the system might be using udev with + devfs rules, and if not the test is harmless. + (Colin Watson ) + + -- Sven Luther Sat, 16 Jul 2005 22:15:46 +0000 + +parted (1.6.23-1) unstable; urgency=low + + * New upstream release (1.6.23) + - PedUnit: support for different units for sizes and offsets. + - Error message/UI cleanup. + - More CHS cleanup. + - Check /sys before trying deprecated SCSI_IOCTL_SEND_COMMAND. + - Better Apple_Free partition support. + - Allow resizing of extended partitions, even if some logical partitions + are mounted + - Various DVH changes. + - mac RAID and LVM support. + * New upstream release (1.6.22) + - hfs and hfs+ shrinking support merged in upstream. + - gcc4 fixes. + - minor UI and documentation changes/fixes. + - support lvm on mac partition tables. + * Backed out again the size column addition, was a patch from Jari Aalto + with regard to Bug #109613, but a new patch will + hopefully make it to 1.6.24. + * Unbashized dpatches (Closes: #298017) + * Fixed amiga partition tables to use RAID/LVM partition types instead of + subverting flags for it. + * Removed the s390 patch, which needs a full review with regard to the + PedUnit stuff i believe. In particular with regard to the sector size + support. Please try to get this one integrated upstream, as it is the last + problematic big debian-specific patch remaining. + + -- Sven Luther Mon, 11 Jul 2005 12:41:06 +0200 + +parted (1.6.21-1) unstable; urgency=low + + * Unstable build, as we will be moving 1.6.21 into sarge after all. + * Readded bunch of missing fixes from the sarge/sid branch : + - Dropped libreiserfs support. + - Now build depends on libreadline4-dev | libreadline-dev, to work around + the bogus libreadline5 upload during the sarge freeze. (Bug: #279574) + - Drop any udeb magic, fixing .udeb dependency generation (Bastian Blank). + (Bug: #270133) + - Added mention of HFS and HFS+ resize feature in manpage. (Bug: #275650) + + -- Sven Luther Sun, 30 Jan 2005 19:07:42 +0100 + +parted (1.6.21-0.exp.2) experimental; urgency=low + + * Dropped ubd patch, since it may be superceded by another fix in 1.6.21 : + - Sets the type to PED_DEVICE_UNKNOWN on block devices that don't fall + into the standard categories. This makes libparted correctly update + the kernel's view of partition tables, etc. + * Added comments about upstream status to all .dpatches. + * Dropped parted-bf, we no longer build this package in the sarge/sid version. + * Changed libparted1.6-udeb to provide libparted1.6-12. (Bug: #292781) + + -- Sven Luther Sun, 30 Jan 2005 18:47:10 +0100 + +parted (1.6.21-0.exp.1) experimental; urgency=low + + * New upstream release. + - renamed prep-boot PReP boot partition name to prep. + - Fixed PED_SWAP macros missing, obsoleting amiga-64bit dpatch. + - Fixed sun cylinder recording stuff, obsoleting sun_disklabel dpatch. + - Removed bogus assertion, obsoleting no-clobber dpatch. + - Only treat the device as devfs if it has /disc on the end. + - Now use _partition_is_mounted_by_dev instead of guessing the partition + device name. + - Sets the type to PED_DEVICE_UNKNOWN on block devices that don't fall + into the standard categories. This makes libparted correctly update + the kernel's view of partition tables, etc. + - Improved heuristic for finding broken dos partition tables: test if + any feasible solution geometry exists against the end cylinder rather + than 1024. This heuristic now has fewer false negatives and no false + positives. + + -- Sven Luther Sat, 29 Jan 2005 17:06:56 +0100 + +parted (1.6.20-0.exp.2) experimental; urgency=low + + * Fixed 64bit FTBFS in disk_amiga.c introduced by Andrew's cosmetic changes. + (Closes: #286462) + + -- Sven Luther Tue, 4 Jan 2005 22:52:18 +0100 + +parted (1.6.20-0.exp.1) experimental; urgency=low + + * New upstream release : + - now includes assorted debian patches, like the amiga partition table + support and the Smart BootManager stuff. + - dvh: zero out the boot file name record before writing the name in. + - only attempt to check file systems if checking is implemented for + that file system type. + - when correcting the boot sector, use fat_boot_sector_write() to make + sure the backup copy gets written (if applicable). + + -- Sven Luther Sat, 18 Dec 2004 19:26:17 +0100 + +parted (1.6.19-0.exp.3) experimental; urgency=low + + * Enabled MS-DOS disk label detection when Smart BootManager patch which was + forgotten previously :/ + + -- Sven Luther Tue, 14 Dec 2004 14:13:37 +0100 + +parted (1.6.19-0.exp.2) experimental; urgency=low + + * Re-enabled hfs patch, since i got a new version from Guillaume Knispel. + + -- Sven Luther Fri, 3 Dec 2004 18:45:16 +0100 + +parted (1.6.19-0.exp.1) experimental; urgency=low + + * New upstream release : + - refuses to resize Windows Dynamic Disk partitions. + - allows reparation of damaged FAT file systems with "check". + - assorted smaller changes. + + -- Sven Luther Sun, 28 Nov 2004 11:41:39 +0100 + +parted (1.6.18-0.exp.1) experimental; urgency=low + + * New upstream release : + - More dos CHS geometry fixes. + - Now knows about the new sun-ufs partition ID (0xbf). + - Longer than 32bit GPT partition fix. + - removed bogus (int) casts, may fix large partition table problem, see + Bug #279732. + * Legacy amiga hardware compatibility fixes : + - non-full blocks should be padded by 0x00 and not 0xff. + - builtin filesystem driver pointer offset was off by one, thus + causing libparted to overwrite them if partitions are added. + * Added RAID & LVM flag for partitions on amiga partition tables. + * Readded missing 1.6.9-3.2 fixes : + - MS-DOS disk label detection when Smart BootManager is installed fix by + Matt Kraai (Bug #259248). + - Recognize UML UBD devices by Matt Zimmerman (Bug #258188). + * Added PREP flag for MBR partition tables. (Bug #245451) + * Dropped hfs resize patch for now, as it doesn't apply cleanly to 1.6.18. + + -- Sven Luther Sat, 27 Nov 2004 11:57:51 +0100 + +parted (1.6.14-0.exp.2) experimental; urgency=low + + * Added new hfs patch. + + -- Sven Luther Wed, 8 Sep 2004 07:55:18 +0200 + +parted (1.6.14-0.exp.1) experimental; urgency=low + + * New upstream release. + + -- Sven Luther Mon, 6 Sep 2004 15:28:59 +0200 + +parted (1.6.12-0.exp.1) experimental; urgency=low + + * New upstream release. (Closes: #254502) + - should fix 2.6 kernel BIOS CHS geometry problems. Broke binary + compatibility though, thus the soname change. + * Substituted some inaccurate terms in the doc (Fabio Tranchitella). + (Closes: #211746) + * Update s390 patch (Bastian Blank). + * Always regenerate autoconf/automake files (Bastian Blank). + * Dropped dvh patch, since a cleaner version is now upstream (Sven Luther). + * New updated hfs-resize patch (Guillaume Knispel) + + * Thanks to Fabio Tranchitella, Bastian Blank, Guillaume Knispel and + Peter Samuelson who made this release possible. + + -- Sven Luther Thu, 2 Sep 2004 09:41:29 +0200 + +parted (1.6.11-9) unstable; urgency=low + + * Applied large-partitions patch to show correct partition data. Thanks + go to Peter Chubb for providing the patch. + (Closes: #279732) + + -- Sven Luther Thu, 25 Nov 2004 14:32:36 +0100 + +parted (1.6.11-8) unstable; urgency=low + + * Now build depends on libreadline4-dev | libreadline-dev, to work around + the bogus libreadline5 upload during the sarge freeze. (Closes: #279574) + + -- Sven Luther Thu, 4 Nov 2004 14:42:11 +0100 + +parted (1.6.11-7) unstable; urgency=low + + * Added LVM flag for partitions on amiga partition tables. + * Added PREP flag for MBR partition tables. (Closes: #245451) + * Added mention of HFS and HFS+ resize feature in manpage. + (Closes: #275650) + * Dropped libreiserfs0.3-0 recommend, as it is no more part of sarge. + (Closes: #276887) + * Really readded missing 1.6.9-3.2 fixes : + - MS-DOS disk label detection when Smart BootManager is installed fix by + Matt Kraai (Bug #259248). + + -- Sven Luther Mon, 1 Nov 2004 12:03:25 +0100 + +parted (1.6.11-6) unstable; urgency=low + + * Really apply the chs patch this time. + * Rewrote description and README.Debian to take care of removed reiserfs + support as well as added amiga filesystem probing support. + (Closes: #273751) + + -- Sven Luther Tue, 28 Sep 2004 06:11:58 +0200 + +parted (1.6.11-5) unstable; urgency=low + + * Added RAID flag to amiga partition tables. + * Removed libreiserfs support, since progreiserfs will be kicked from sarge + (Closes: #272783). + + -- Sven Luther Sat, 25 Sep 2004 00:32:15 +0200 + +parted (1.6.11-4) unstable; urgency=low + + * Legacy amiga hardware compatibility fixes : + - non-full blocks should be padded by 0x00 and not 0xff. + - builtin filesystem driver pointer offset was off by one, thus causing + libparted to overwrite them if partitions are added. + * Readded missing 1.6.9-3.2 fixes : + - MS-DOS disk label detection when Smart BootManager is installed fix by + Matt Kraai (Bug #259248). + - Recognize UML UBD devices by Matt Zimmerman (Bug #258188). + - gcc 3.4 build fixes by Andreas Jochens (Bug #259534). + * Dropped last remains of the parted-bf package. + + -- Sven Luther Fri, 17 Sep 2004 10:51:34 +0200 + +parted (1.6.11-3) unstable; urgency=low + + * Drop any udeb magic, fixing .udeb dependency generation (Bastian Blank). + (Closes: #270133) + * Moved the maintainer address to the parted-maintainers alioth list. + + -- Sven Luther Mon, 6 Sep 2004 14:13:12 +0200 + +parted (1.6.11-2) unstable; urgency=low + + * Should have gone into unstable, not experimental :/ + + -- Sven Luther Fri, 3 Sep 2004 19:27:47 +0200 + +parted (1.6.11-1) experimental; urgency=low + + * New upstream release. (Closes: #254502) + - should fix 2.6 kernel BIOS CHS geometry problems. Broke binary + compatibility though, thus the soname change. + * Substituted some inaccurate terms in the doc (Fabio Tranchitella). + (Closes: #211746) + * Update s390 patch (Bastian Blank). + * Always regenerate autoconf/automake files (Bastian Blank). + * New updated hfs-resize patch (Guillaume Knispel) + * Added backported CHS BIOS geometry fix. + - libparted/disk_dos.c (read_table, process_bad_chs): now probes + Microsoft file systems for BIOS CHS geometry. This idea was + suggested by Steffen Winterfeldt . + + * Thanks to Fabio Tranchitella, Bastian Blank, Guillaume Knispel and + Peter Samuelson who made this release possible. + + -- Sven Luther Thu, 2 Sep 2004 09:41:29 +0200 + +parted (1.6.9-3.2) unstable; urgency=low + + * Non-maintainer upload with maintainer approval. + * Detect a MS-DOS disk label when Smart BootManager is installed + (closes: #259248). + * Fix build failure, thanks to Andreas Jochens (closes: #259534). + * Recognize UML UBD devices, thanks to Matt Zimmerman (closes: #258188). + + -- Matt Kraai Sun, 08 Aug 2004 11:00:32 -0700 + +parted (1.6.9-3.1) unstable; urgency=low + + * Non-maintainer upload with permission of the maintainer. + * Add patch to write a proper DVH header. Thanks to Thiemo Seufer. + (Closes: #239371) + + -- Martin Michlmayr Sun, 20 Jun 2004 14:10:44 +0100 + +parted (1.6.9-3) unstable; urgency=low + + * Non-maintainer upload with permission of the maintainer. + * Add patch to find LVM2 devices by looking in /dev/mapper. Thanks + to Andres Salomon. (Closes: #247174) + + -- Martin Michlmayr Sun, 09 May 2004 00:23:33 +0100 + +parted (1.6.9-2) unstable; urgency=low + + * Add devfs partition detection patch for 2.6 kernels, thanks to + Joey Hess . (Closes: #243635) + * Added a more complete s390 sector size patch by Lucius Leland + . (Closes: #243554) + + -- Sven Luther Wed, 14 Apr 2004 10:27:58 +0200 + +parted (1.6.9-1) unstable; urgency=low + + * New upstream release, gcc-33, linux-kernel-header, m68k-padding, palo and + parted-m4 are now included upstream. + * Really apply sun disk label patch. + + -- Sven Luther Wed, 14 Apr 2004 09:14:21 +0200 + +parted (1.6.6-11) unstable; urgency=low + + * Fixed broken sun disk label reading. Thanks to Peter Samuelson for testing + and providing the patch. (Closes: #238091) + * libparted-udeb not provides libparted1.6-0 too. (Closes: #239334) + + -- Sven Luther Mon, 29 Mar 2004 14:50:31 +0200 + +parted (1.6.6-10) unstable; urgency=low + + * Added patch by Bastian Blank to take sector size in account on hardware + needing bigger than 512 byte. (Closes: #236325) + + -- Sven Luther Thu, 18 Mar 2004 14:18:58 +0100 + +parted (1.6.6-9) unstable; urgency=low + + * debian/control.in: Added dpatch Build-Dependancy, debian/control is + generated from this file, which is why this build-dep kept being deleted. + (closes: #232570) + * Created new errors-to-stderr patch to print exceptions to stderr when in + script mode (closes: #196040) + + -- Timshel Knoll-Miller Tue, 24 Feb 2004 10:54:11 +1100 + +parted (1.6.6-8) unstable; urgency=low + + * Added read-gpt-1.02 patch to allow reading GPT header revision 1.02 + (closes: #210584) + * Added minor documenation fix to doc-package patch + (closes: #211747) + + -- Timshel Knoll-Miller Wed, 11 Feb 2004 18:08:14 +1100 + +parted (1.6.6-7) unstable; urgency=low + + * Added palo patch needed on parisc, thanks go to Richard Hirst + for providing a patch. + (Closes: #229626). + * Added parted.m4 patch provided by Petter Reinholdtsen , + (Closes: #223764). + + -- Sven Luther Tue, 27 Jan 2004 11:16:30 +0100 + +parted (1.6.6-6) unstable; urgency=low + + * dpatch build-depency got lost again :(. + + -- Sven Luther Sun, 25 Jan 2004 12:34:20 +0100 + +parted (1.6.6-5) unstable; urgency=low + + * Added hfs resize patch from Guillaume Knispel . + (Closes: #226115) + + -- Sven Luther Sat, 24 Jan 2004 16:33:14 +0100 + +parted (1.6.6-4) unstable; urgency=low + + * Aknowledge Petter's NMU. (Closes: #225875) + * Fix amiga block checksum fixing. + + -- Sven Luther Thu, 22 Jan 2004 19:48:50 +0100 + +parted (1.6.6-3.1) unstable; urgency=low + + * Non-maintainer upload to fix d-i problem before deadline. + * Add build-depend on dpatch. (Closes: #225875) + + -- Petter Reinholdtsen Fri, 2 Jan 2004 18:27:52 +0100 + +parted (1.6.6-3) unstable; urgency=low + + * Removed some extra () around BLKGETSIZE64 that were not really needed. + * Removed a fs->clobber assertion that did break since the amiga filesystem + doesn't provide a clobber op. (Closes: #225754) + + -- Sven Luther Thu, 1 Jan 2004 20:40:39 +0100 + +parted (1.6.6-2) unstable; urgency=low + + * Adding myself as comaintainer of the package, as discussed with Timshel + Knoll. + * Start using dpatch, and move all debian specific patches into + debian/patches/*.dpatch. Thanks to Petter Reinholdtsen + for doing the work. + * Added libuuid dependency to udebs. Thanks to Matt Kraai + for providing the patch and following this. (Closes: #221225, #221226) + + -- Sven Luther Wed, 31 Dec 2003 08:54:24 +0100 + +parted (1.6.6-1.2) unstable; urgency=low + + * Added amiga filesystem probing support. (Closes: #219947) + * Fixed wrong linux/fs.h header copying. (Closes: #218980) + * Now build-depends on the fixed version of linux-kernel-headers, so we + don't get bit by the __invalid_size_argument_for_IOC signedness problem. + (See bug #219940) + + -- Sven Luther Tue, 16 Dec 2003 14:22:33 +0100 + +parted (1.6.6-1.1) unstable; urgency=low + + * Added amiga RDB partitioning support. (Closes: #212536) + * Do not install policy-prohibited control files in udebs. + Thanks to Matt Kraai for the patch. (Closes: #216133) + + -- Sven Luther Wed, 29 Oct 2003 16:11:35 +0100 + +parted (1.6.6-1) unstable; urgency=low + + * New upstream release + + -- Timshel Knoll Tue, 2 Sep 2003 00:43:00 +1000 + +parted (1.6.5-3) unstable; urgency=low + + * Policy 3.5.9, Made udebs Priority: extra + * Changed descriptions to add that parted can remove all listed + filesystems (closes: #191523) + * Applied missing type suffix compile fix patch for gcc-3.3 and hurd, + thanks to Ognyan Kulev and Sven Luther (closes: #195318, #200337) + * m68k padding fix patch patch from Sven Luther (closes: #207634) + + -- Timshel Knoll Sat, 30 Aug 2003 10:44:52 +1000 + +parted (1.6.5-2) unstable; urgency=low + + * NMU with maintainers consent. + * Fixed some gcc 3.3 build problems. (Closes: #200337) + + -- Sven Luther Thu, 24 Jul 2003 10:36:15 +0200 + +parted (1.6.5-1) unstable; urgency=low + + * New upstream release + * Made libparted1.6-dev and libparted1.6-dbg Section: libdevel + + -- Timshel Knoll Wed, 30 Apr 2003 16:01:19 +1000 + +parted (1.6.4-2) unstable; urgency=low + + * debian/control.in: Build-Depends: debhelper (>= 4.1.1), as dh_shlibdeps' + -L flag was introduced in that version (closes: #179473) + * debian/rules: Update config.sub and config.guess on clean + + -- Timshel Knoll Wed, 19 Feb 2003 22:13:22 +1100 + +parted (1.6.4-1) unstable; urgency=low + + * New upstream release + + ped_disk_destroy API documentation inconsistency fixed (closes: #168850) + + the invalidate: busy buffer warning message issue was actually fixed + in the 1.6.0-pre5 release (closes: #146607) + + Mention is now made of the root disk in the info docs (closes: #157003) + * Standards-Version: 3.5.8: + + Support building with gcc -g by default, support DEB_BUILD_OPTIONS=noopt + * Made libparted1.6-0 Suggests: parted | nparted (closes: #168177) + * Removed . from end of libparted1.6-0 synopsis to fix lintian error + * Build udeb packages libparted1.6-udeb and parted-udeb for + debian-installer, built with the -Os gcc flag to optimise for size + (parted-bf is also now built with -Os) (thanks to + Dann Frazier for a udeb patch) (closes: #172020) + * Made libparted's reiserfs support dlopen the full filename of libreiserfs, + rather than just the libreiserfs.so symlink. This means that parted's + reiserfs support will now work without the libreiserfs0.3-dev package + being installed (closes: #163107) + + -- Timshel Knoll Tue, 10 Dec 2002 23:25:59 +1100 + +parted (1.6.3-3) unstable; urgency=low + + * GNU Parted is now built against libreiserfs (closes: #156149) + * debian/control: + + Build-Depend on libreiserfs0.3-dev + + libparted1.6-0 now Recommends: libreiserfs0.3-0 + + -- Timshel Knoll Wed, 11 Sep 2002 01:45:21 +1000 + +parted (1.6.3-2) unstable; urgency=low + + * debian/rules: use readlink to read link destination (closes: #157821) + + -- Timshel Knoll Thu, 22 Aug 2002 18:18:23 +1000 + +parted (1.6.3-1) unstable; urgency=low + + * New upstream release + * debian/control: + + Fixed Priority: override disparities (default Priority was still extra + from when these were experimental parted1.6 packages) + + Remove details of pre-release status notice from package description + (closes: #152655, #154818) + * Direct people looking for info docs to the parted-doc package + (closes: #152042) + * Wierd ... ls -l x | awk '{ print $11 }' is no longer giving the symlink + dest, $10 is though :-/. I'll see how this goes with $10 ... + + -- Timshel Knoll Tue, 20 Aug 2002 19:40:44 +1000 + +parted (1.6.2-1) unstable; urgency=low + + * New upstream release + * Build-Depend on texinfo (>= 4.2), as parted.texi uses a new 4.2 directive + + -- Timshel Knoll Wed, 10 Jul 2002 08:51:17 +1000 + +parted (1.6.1-1) unstable; urgency=low + + * New upstream release + + -- Timshel Knoll Tue, 18 Jun 2002 16:42:47 +1000 + +parted (1.6.0-1) unstable; urgency=low + + * New upstream release + * Source package renamed back to "parted", 1.6 is now considered + "stable" so uploaded to sid + + -- Timshel Knoll Tue, 30 Apr 2002 23:05:42 +1000 + +parted1.6 (1.5+1.6.0-pre10-1) experimental; urgency=low + + * New upstream pre-release + * This upstream release supports creating/resizing reiserfs filesystems, + if Yury Umanets' libreiserfs is installed. However, there is no Debian + package of libreiserfs (yet - I am working on it). So if you want this + support, you'll have to fetch progsreiserfs from + http://reiserfs.linux.kiev.ua/ and compile/install it yourself for this + support to be activated. + + -- Timshel Knoll Fri, 26 Apr 2002 01:51:04 +1000 + +parted1.6 (1.5+1.6.0-pre9-1) experimental; urgency=low + + * New upstream pre-release + + -- Timshel Knoll Wed, 10 Apr 2002 15:11:52 +1000 + +parted1.6 (1.5+1.6.0-pre8-1) experimental; urgency=low + + * New upstream pre-release + + -- Timshel Knoll Mon, 8 Apr 2002 23:23:20 +1000 + +parted1.6 (1.5+1.6.0-pre7-1) experimental; urgency=low + + * New upstream pre-release + + -- Timshel Knoll Sat, 6 Apr 2002 01:08:35 +1000 + +parted1.6 (1.5+1.6.0-pre6-1) experimental; urgency=low + + * New upstream pre-release + + -- Timshel Knoll Sat, 6 Apr 2002 00:42:30 +1000 + +parted1.6 (1.5+1.6.0-pre5-2) experimental; urgency=low + + * Recompile against latest e2fsprogs to fix dependancy issues + (see e2fsprogs #139274) + + -- Timshel Knoll Tue, 26 Mar 2002 18:19:58 +1100 + +parted1.6 (1.5+1.6.0-pre5-1) experimental; urgency=low + + * New upstream pre-release + * debian/{partprobe.8, parted.manpages, rules}: manpage added for partprobe + (closes: #137104) + * debian/control.in: make all parted1.6 packages Priority: extra, as + parted1.6 and parted1.6-doc Conflict: with the optional parted and + parted-doc packages. + * removed "#include " from libparted/fs_linux_swap/linux_swap.c, + which should fix build problems on ia64. + + -- Timshel Knoll Tue, 26 Mar 2002 17:09:08 +1100 + +parted1.6 (1.5+1.6.0-pre4-1) experimental; urgency=low + + * New upstream pre-release + * debian/control.in, debian/rules: ship locales package separately. This + means that libparted1.6-0 no longer needs to Conflict: libparted1.4, + both packages can be installed concurrently. Actually, I just realised + that libparted1.6-0 never actually needed to Conflict: libparted1.4, + Replaces: libparted1.4 would have been enough ... + * debian/control.in: + - Added pre-release status of package to package descriptions + (closes: #137475) + - Made libparted1.6-0 Replaces: libparted1.4 (<< 1.4.24-2). + libparted1.4 (>= 1.4.24-2) should be able to co-exist with libparted1.6, + but I forgot about the (<< 1.4.24-2) case ... (closes: #137567) + * debian/rules: + - debian/rules: use DESTDIR rather than prefix when 'make install'ing. + Use $(CURDIR) instead of `pwd`. + - lots of small fixes + - remove the locales dir from debian/tmp before checking if any files + are left after dh_movefiles + * debian/parted.files: Grab all of sbin rather than just sbin/parted. + This picks up partprobe + * debian/parted.undocumented: partprobe currently has no manpage (will be + fixed before 1.6.0-1 goes into sid) + + -- Timshel Knoll Wed, 13 Mar 2002 15:18:43 +1100 + +parted1.6 (1.5+1.6.0-pre3-1) experimental; urgency=low + + * New upstream pre-release + * debian/control.in: -doc package name changed to parted1.6-doc ... + * debian/rules: generate parted1.6-doc.* files + + -- Timshel Knoll Tue, 5 Mar 2002 14:20:04 +1100 + +parted1.6 (1.5+1.6.0-pre2-1) experimental; urgency=low + + * New upstream pre-release, built for experimental + * Don't include doc/USER in parted-doc, use the doc/parted.info texinfo file + instead ... + * Build the library packages as libparted[upstream 2 digit version]-[soname] + eg. libparted1.6-0 + + -- Timshel Knoll Fri, 1 Feb 2002 21:02:00 +1100 + +parted1.6 (1.5+1.6.0-pre1-1) unstable; urgency=low + + * New packages of 1.6 pre-release series + * Fixed compile warnings (hence errors with -Werror) in + libparted/disk_mips.c + + -- Timshel Knoll Fri, 1 Feb 2002 18:41:31 +1100 + +parted (1.4.23-1) unstable; urgency=low + + * New upstream release + + -- Timshel Knoll Wed, 16 Jan 2002 00:02:03 +1100 + +parted (1.4.22-1) unstable; urgency=low + + * New upstream release + + -- Timshel Knoll Sun, 30 Dec 2001 00:51:42 +1100 + +parted (1.4.21-1) unstable; urgency=low + + * New upstream release + * Disable -Werror when building on s390 (closes: #121267) + + -- Timshel Knoll Fri, 7 Dec 2001 23:51:02 +1100 + +parted (1.4.20-1) unstable; urgency=low + + * New upstream release + * Upstream now uses C99's PRIx64 for printf'ing __u64's - this fixes + compilation warnings on alpha and ia64 (closes: #115369) + * This should fix all alpha compile warnings, so removed --disable-Werror + configure flag when compiling on alpha (-Werror will help find bugs) + + -- Timshel Knoll Mon, 15 Oct 2001 11:00:29 +1000 + +parted (1.4.19-2) unstable; urgency=low + + * debian/rules: call ./configure with --disable-Werror flag on + alpha as well ... (closes: #114172) + + -- Timshel Knoll Mon, 8 Oct 2001 12:51:47 +1000 + +parted (1.4.19-1) unstable; urgency=low + + * New upstream release + + -- Timshel Knoll Sun, 30 Sep 2001 18:51:41 +1000 + +parted (1.4.18+19pre2-5) unstable; urgency=low + + * Applied Matt Domsch 's GPT (GUID Partition Tables) + support patch (closes: #105555) + + -- Timshel Knoll Sat, 15 Sep 2001 10:46:55 +1000 + +parted (1.4.18+19pre2-4) unstable; urgency=low + + * debian/control: Build-Depend on libtool (closes: #112110) + + -- Timshel Knoll Thu, 13 Sep 2001 11:20:56 +1000 + +parted (1.4.18+19pre2-3) unstable; urgency=low + + * Fixes to *really* fix building on m68k (yes really this time ... grrr): + - configure.in: hacked to add --disable-Werror argument + - debian/control: added Build-Depends on recent autoconf and automake + - debian/rules: + + run aclocal, autoconf and automake before ./configure'ing + + run configure with --disable-Werror argument on m68k + + -- Timshel Knoll Wed, 12 Sep 2001 16:43:59 +1000 + +parted (1.4.18+19pre2-2) unstable; urgency=low + + * debian/control: + + Fixed typo - fixed typo - libparted1.4 package was Priority: extra + instead of parted-bf package for the last 2 releases - fixed this + + Updated the file system support list in package descriptions + + Removed Build-Depends: on autoconf, automake and libtool - these are + only needed if autoconf/automake need to be re-run ... (not the case) + * debian/rules: + + pass the correct libparted library directory to dh_shlibdeps for + correct parted package dependancies (closes: #102359) + * debian/README.Debian: Updated the file system support list + + -- Timshel Knoll Mon, 10 Sep 2001 00:40:49 +0000 + +parted (1.4.18+19pre2-1) unstable; urgency=low + + * New upstream (pre-) release + * Build with -Wno-uninitialized on m68k (really closes: #110264) + + -- Timshel Knoll Mon, 10 Sep 2001 00:28:47 +1000 + +parted (1.4.18+19pre1-1) unstable; urgency=low + + * New upstream (pre-) release (closes: #110264) + * debian/rules, debian/control: + + Build parted-bf package, built with --disable-readline (closes: #109161) + + Now using debhelper v3 + + -- Timshel Knoll Wed, 5 Sep 2001 13:08:56 +1000 + +parted (1.4.18-1) unstable; urgency=low + + * New upstream release (never uploaded) + + -- Timshel Knoll Mon, 20 Aug 2001 20:23:41 +1000 + +parted (1.4.17-1) unstable; urgency=low + + * New upstream release + * debian/rules: build with CFLAGS += -Wno-unused on m68k to work around + compiler bug (closes: #105819) + + -- Timshel Knoll Mon, 23 Jul 2001 09:39:22 +1000 + +parted (1.4.16-1) unstable; urgency=low + + * New upstream release + + -- Timshel Knoll Tue, 17 Jul 2001 14:14:38 +1000 + +parted (1.4.15-2) unstable; urgency=low + + * Fixed ia64 compile errors (thanks to Jeff Licquia) (closes: #105529) + + -- Timshel Knoll Tue, 17 Jul 2001 10:22:56 +1000 + +parted (1.4.15-1) unstable; urgency=low + + * New upstream release + + -- Timshel Knoll Tue, 10 Jul 2001 11:43:26 +1000 + +parted (1.4.14-1) unstable; urgency=low + + * New upstream release + * debian/control: libparted1.4 Conflicts: parted (<< 1.4.13+14pre1), to + make sure that the soname change doesn't break stuff. + + -- Timshel Knoll Wed, 30 May 2001 21:55:26 +1000 + +parted (1.4.13+14pre2-1) unstable; urgency=low + + * New upstream release + * This means I don't need a patched configure.in, so don't need to + Build-Depend: auto{conf,make}, libtool ... (closes: Bug#99015) + Left the Build-Depends there anyway (just in case) + * This upstream release uses libtool 1.4 anyway, so that alone would fix + #99015 as well :-) + * debian/rules: + - explicitly specify --enable-shared to configure in configure target + (bug workaround for this version, shared libs aren't built by default) + - explicitly specify --disable-shared to configure in configure-dbg + target, this should substantially shorten the build time. + + -- Timshel Knoll Tue, 29 May 2001 10:10:09 +1000 + +parted (1.4.13-1) unstable; urgency=low + + * New upstream release + + -- Timshel Knoll Sat, 26 May 2001 22:48:13 +1000 + +parted (1.4.12-2) unstable; urgency=low + + * debian/rules: Lots of updates to get stuff building properly, merged + binary-common and binary-libparted$(LIBPKGVER)-dbg rules. + * debian/control updates: + - added Build-Depends: autoconf (>= 2.50), automake (>= 1.4-p1), libtool + (closes: Bug#98673) + - Added '| libncurses5-dev' to libncurses-dev Build-Depends to provide + non-virtual installation candidate. + - Standards-Version: 3.5.4 + + -- Timshel Knoll Sat, 26 May 2001 14:53:59 +1000 + +parted (1.4.12-1) unstable; urgency=low + + * New upstream release + * debian/rules: made {build{,-dbg},configure{,-dbg}}-stamp stuff depend + directly on $(GENFILES), which stops ./configure from being repeatedly + run unnecessarily during the build procedure. + + -- Timshel Knoll Tue, 22 May 2001 17:26:34 +1000 + +parted (1.4.11-4) unstable; urgency=low + + * debian/control: libparted1.4-dbg Priority: extra + * debian/control: parted & libparted-dev now Suggests: parted-doc + (closes: Bug#97556) + + -- Timshel Knoll Tue, 15 May 2001 23:13:41 +1000 + +parted (1.4.11-3) unstable; urgency=low + + * Some big updates - lots of library versioning stuff automated ... + - debian/control and debian/shlibs.local now being generated from + debian/control.in and debian/shlibs.local.in respectively, with + debian/rules + - debian/libparted2{,-dev}.* moved to debian/libparted{,-dev}.*, + these are now copied to their appropriate places when necessary + - LIBPKGVER variable added to debian/rules, this is the library + package version (part of the library name). Initially set to + 1.4, which is the new version number of libparted (ie. the + libparted package is now named libparted1.4, to keep in line + with upstream). I'll add a letter which will be bumped whenever + upstream's soname changes, if necessary (ie. libparted1.4a) ... + * Added support for DEB_BUILD_OPTIONS=noopt (compiles without -O2). + * debian/control.in debian/rules: Added building of libparted2-dbg + package, unstripped static lib with malloc debugging enabled. + * Fixed problem with ./configure being run twice, once on + 'debian/rules build' and again on 'debian/rules binary-arch' + * Fixed shlibs library version _properly_, I changed the depends: + version but not the soname version :-(. With the versioning automation + stuff I have also added a LIBSONAME substitution, and also check that + parted's soname is what debian/rules (and thus debian/shlibs.local) + think that it is ... + + -- Timshel Knoll Wed, 2 May 2001 15:15:20 +1000 + +parted (1.4.11-2) unstable; urgency=low + + * Apparently 1.4.11 has a new soname, changed shlibs.local and + dh_makeshlibs to use (>= 1.4.11) (closes: Bug#95846) + + -- Timshel Knoll Tue, 1 May 2001 12:03:56 +1000 + +parted (1.4.11-1) unstable; urgency=low + + * New upstream release + + -- Timshel Knoll Thu, 19 Apr 2001 01:49:23 +1000 + +parted (1.4.10-2) unstable; urgency=low + + * debian/rules: Added support for $DEB_BUILD_OPTIONS + * debian/rules: removed call to deprecated dh_suidregister + * debian/rules: added separate configure[-stamp] targets which call configure + * debian/control: updated disklabel list in package descriptions, added + list of supported filesystems. + * debian/control: libparted2: added Conflicts: and Replaces: libparted + * debian/README.Debian: updated disklabel list, added detailed list + of supported filesystem and the amount of support for each + + -- Timshel Knoll Thu, 29 Mar 2001 19:57:58 -0800 + +parted (1.4.10-1) unstable; urgency=low + + * New upstream release + * Converted to cvs-buildpackage. + * debian/rules: removed call to obsolete dh_testversion. + * debian/parted-doc.docs: removed reference to 0 byte file BUGS + (well, no bugs, great) :-) + + -- Timshel Knoll Tue, 20 Mar 2001 00:47:22 +1100 + +parted (1.4.9-1) unstable; urgency=low + + * New upstream release + + -- Timshel Knoll Mon, 19 Feb 2001 18:21:43 +1100 + +parted (1.4.8-1) unstable; urgency=low + + * New upstream release + * debian/control: Made libparted2 Suggest: libparted2-dev + + -- Timshel Knoll Sat, 10 Feb 2001 09:51:10 +1100 + +parted (1.4.7-1) unstable; urgency=low + + * New upstream release + * debian/control, debian/libparted1[-dev]*, debian/rules: + Updated library package names to libparted2 and libparted2-dev, as + this upstream version contains incompatible changes to the library + versioning system + * debian/control: Updated build-depends: on debhelper to version + >= 2.0 (for DH_COMPAT=2), added gettext. + * debian/README.Debian: updated list of supported partition tables + (added BSD disklabels to the list) + + -- Timshel Knoll Sun, 4 Feb 2001 18:30:05 +1100 + +parted (1.4.6-1) unstable; urgency=low + + * New upstream release + + -- Timshel Knoll Sun, 7 Jan 2001 18:57:46 +1100 + +parted (1.4.5-1) unstable; urgency=low + + * New upstream release + * Updated package descriptions and README.Debian with a list of + supported partition tables / disklabels. + * debian/copyright: fixed bad email addresses of upstream authors, changed + copyright to Free Software Foundation, Inc. (it has been signed over + to the FSF). + + -- Timshel Knoll Sun, 7 Jan 2001 18:39:59 +1100 + +parted (1.4.4-1) unstable; urgency=low + + * New upstream release + + -- Timshel Knoll Sun, 3 Dec 2000 18:58:28 +1100 + +parted (1.4.3-1) unstable; urgency=low + + * New upstream release + + -- Timshel Knoll Tue, 28 Nov 2000 11:05:45 +1100 + +parted (1.4.2-1) unstable; urgency=low + + * New upstream release + * Removed empty NEWS file from parted-doc - fixes lintian warning. + * Changed all calls to dh_testversion in debian/rules to version 2. + * Modified debian/rules to not call dh_makeshlibs for arch-independent + parted-doc package. + + -- Timshel Knoll Wed, 22 Nov 2000 01:16:52 +1100 + +parted (1.4.0-1) unstable; urgency=low + + * New upstream release + * Renamed libparted0 to libparted1, and libparted0-dev to libparted1-dev. + * Changed shlibs to depend on 'libparted1 (>= 1.4.0)' rather than + 'libparted1 (= ${Source-Version})'. + * Made libparted1 Conflicts: libparted0 Replaces: libparted0 (since both + have their NLS messages in /usr/share/locale/*/LC_MESSAGES/parted.mo) - + I must find some way to work around this!!! + + -- Timshel Knoll Sun, 19 Nov 2000 22:52:57 +1100 + +parted (1.2.13-1) unstable; urgency=low + + * New upstream release + + -- Timshel Knoll Mon, 13 Nov 2000 09:49:54 +1100 + +parted (1.2.12-1) unstable; urgency=low + + * New upstream release + * Changed build system to use DH_COMPAT=2, so the 'parted' package now + builds in the debian/parted directory. This included moving the 'dirs' + file to 'parted.dirs', and 'docs' to 'parted.docs', amongst other things. + + -- Timshel Knoll Sun, 5 Nov 2000 14:59:25 +1100 + +parted (1.2.11-1) unstable; urgency=low + + * New upstream release + * Moved parted.m4 (in /usr/share/aclocal) from parted to libparted0-dev. + * Moved all locales (from /usr/share/locales) from parted to libparted0. + This is the right behavior since most of the messages are for libparted, + I have asked the author if it is possible to split parted and libparted + locales ... + * Made libparted0 and libparted0-dev Conflict: parted (<< 1.2.11) to + avoid dpkg needing --force-overwrite ... + * Added -D_REENTRANT to CFLAGS in libparted/Makefile.am - to conform + to policy 3.2.1. + * Policy 3.2.1 + + -- Timshel Knoll Wed, 18 Oct 2000 12:59:48 +1100 + +parted (1.2.10-1) unstable; urgency=low + + * New upstream release + + -- Timshel Knoll Sun, 15 Oct 2000 23:24:15 +1100 + +parted (1.2.9-1) unstable; urgency=low + + * New upstream release + + -- Timshel Knoll Tue, 12 Sep 2000 22:41:38 +1100 + +parted (1.2.8-2) unstable; urgency=low + + * debian/docs: debian/libparted0.docs: debian/libparted0-dev.docs: + Removed all documentation from packages other than parted-doc. All + packages have changelog and copyright, however (as per Debian + policy) + + -- Timshel Knoll Wed, 30 Aug 2000 20:01:15 +1100 + +parted (1.2.8-1) unstable; urgency=low + + * New upstream release + * Changed Build-Depends on libuuid-dev to uuid-dev (closes: Bug#69536) + + -- Timshel Knoll Tue, 22 Aug 2000 21:27:59 +1000 + +parted (1.2.7-1) unstable; urgency=low + + * New upstream release + + -- Timshel Knoll Sun, 13 Aug 2000 13:33:42 +1000 + +parted (1.2.6-1) unstable; urgency=low + + * New upstream release + * Shared libs in libparted0 now install to /lib (otherwise it's pointless + having the parted executable in /sbin ...) + * Now building shlibs with `libparted 0 libparted0 (= ${Source-Version})' + rather than >= ... This is because the libparted API is still changing + quite regularly. + + -- Timshel Knoll Wed, 2 Aug 2000 21:13:42 +1000 + +parted (1.2.5-1) unstable; urgency=low + + * New upstream release + + -- Timshel Knoll Thu, 20 Jul 2000 09:49:29 +1000 + +parted (1.2.3-1) unstable; urgency=low + + * New upstream release + + -- Timshel Knoll Wed, 28 Jun 2000 21:04:42 +1000 + +parted (1.2.1-2) unstable; urgency=low + + * Removed parted-doc Recommends: parted, and got rid of versions + from Suggests: parted, libparted0, libparted0-dev + * Changed description of libparted0-dev for consistency + (the word 'disk' was missing) + + -- Timshel Knoll Thu, 15 Jun 2000 13:25:56 +1000 + +parted (1.2.1-1) unstable; urgency=low + + * New upstream release + * The last release (1.2.0) didn't build on systems without libparted-dev + or libparted0-dev already installed, fixed in this version. + * Maintainer email addresses updated to `timshel@debian.org' + * debian/README.Debian updated to remove stuff about why shared libs + won't build (because they can be now) :) + + -- Timshel Knoll Thu, 15 Jun 2000 12:57:29 +1000 + +parted (1.2.0-1) unstable; urgency=low + + * New upstream release + * Merged a whole heap of changes from my locally built series of 1.1.x + packages, listed below: + * Can now build shared libraries. Split off package libparted0 which + contains the shared libraries. + * Renamed libparted-dev to libparted0-dev. This still Provides: libparted-dev + however. + + -- Timshel Knoll Thu, 15 Jun 2000 02:24:05 +1000 + +parted (1.0.17-2) unstable; urgency=low + + * Rebuild to get rid of config.log junk in the .diff.gz (hmmm ... must've + killed ./configure ... dammit) + * Split docs off into new, separate package (parted-doc) + * libparted-dev now Suggests: parted + + -- Timshel Knoll Tue, 13 Jun 2000 01:34:34 +1000 + +parted (1.0.17-1) unstable; urgency=low + + * New upstream release + * parted executable moved from /usr/sbin to /sbin + * "Section: " in debian/control changed for both 'parted' source & + 'parted' binary packages from 'utils' to 'admin' (admin is more suitable) + * "Architecture: any" for both packages, (was 'i386 alpha'), so + packages will now be built for other arches (for resizing old DOS + drives, as parted currently only support DOS partition tables) + + -- Timshel Knoll Mon, 12 Jun 2000 15:41:48 +1000 + +parted (1.0.15-1) unstable; urgency=low + + * New upstream release + + -- Timshel Knoll Fri, 12 May 2000 19:08:52 +1000 + +parted (1.0.14-1) unstable; urgency=low + + * New upstream release + * Updated debian/README.Debian with current parted shared libs status ... + + -- Timshel Knoll Sun, 16 Apr 2000 16:46:47 +1000 + +parted (1.0.13-1) frozen unstable; urgency=low + + * New upstream release + * This needs to go into frozen because it fixes a release critical bug: + * Fixed a severe bug which can cause massive data loss when converting + between FAT16 and FAT32 (closes: #62029). + * dh_testversion (in debian/rules) and Build-depends debhelper version + updated to 1.2.9 for dh_link ... + * Fixed typo in debian/control: Build-Depends: liuuid-dev -> libuuid-dev :) + * Policy 3.1.1 + + -- Timshel Knoll Tue, 11 Apr 2000 17:44:42 +1000 + +parted (1.0.12-1) unstable; urgency=low + + * New upstream release + * libparted-dev.docs updated to reflect movement of API docs to doc/ + * Updated to Standards-Version 3.1.0 (with Build-Depends) + + -- Timshel Knoll Tue, 28 Mar 2000 20:07:51 +1000 + +parted (1.0.10-1) unstable; urgency=low + + * New upstream release + * libparted-dev moved from libs to devel section + + -- Timshel Knoll Fri, 3 Mar 2000 09:59:32 +1100 + +parted (1.0.9-1) frozen unstable; urgency=low + + * New upstream release (closes: Bug#58301) + + -- Timshel Knoll Thu, 17 Feb 2000 21:28:53 +1100 + +parted (1.0.7-1) frozen unstable; urgency=low + + * New upstream release (closes: Bug#55871, parted fails on disks >16Gb) + * Manpage moved to upstream sources + + -- Timshel Knoll Tue, 25 Jan 2000 23:29:56 +1100 + +parted (1.0.5-1) frozen unstable; urgency=low + + * New upstream release (closes: Bug#55613) + * Added Conflicts: fsresize and Replaces: fsresize (closes: Bug#54110) + * Updates to manpage, parted(8) + + -- Timshel Knoll Wed, 19 Jan 2000 13:28:53 +1100 + +parted (1.0.4-1) unstable; urgency=low + + * New upstream release + + -- Timshel Knoll Wed, 5 Jan 2000 17:23:57 +1100 + +parted (1.0.2-1) unstable; urgency=low + + * New upstream release + * Updated debian/copyright with date/time last updated + * Updated package descripion and README.Debian warnings + + -- Timshel Knoll Mon, 3 Jan 2000 13:30:02 +1100 + +parted (1.0pre8-1.1) unstable; urgency=low + + * Sponsor upload. + * Recompiled against libreadline2g as libreadline4 is not yet in + potato. (closes: Bug#52205) + + -- Torsten Landschoff Sun, 19 Dec 1999 12:05:41 +0100 + +parted (1.0pre8-1) unstable; urgency=low + + * New upstream release + + -- Timshel Knoll Mon, 15 Nov 1999 22:40:06 +1100 + +parted (1.0pre7-2) unstable; urgency=low + + * Copyright message and Authors updated + * Updated package description, descriptions are now more consistant + * Added warning about software being unstable to package description + * Changed libparted-dev to Section: devel + * Removed debian/dirs (not required) + * Manpage parted.8 is now only installed in the parted package + + -- Timshel Knoll Sun, 14 Nov 1999 23:29:01 +1100 + +parted (1.0pre7-1) unstable; urgency=low + + * New upstream release + + -- Timshel Knoll Tue, 9 Nov 1999 13:52:14 +1100 + +parted (1.0pre4-2) unstable; urgency=low + + * Package split into parted and libparted-dev + + -- Timshel Knoll Mon, 8 Nov 1999 18:41:28 +1100 + +parted (1.0pre4-1) unstable; urgency=low + + * Initial Release. + + -- Timshel Knoll Fri, 5 Nov 1999 18:11:28 +1100 --- parted-1.8.8.git.2008.03.24.orig/debian/parted-doc.prerm +++ parted-1.8.8.git.2008.03.24/debian/parted-doc.prerm @@ -0,0 +1,39 @@ +#! /bin/sh +# prerm script for parted-doc +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + remove|upgrade|deconfigure) + install-info --quiet --remove /usr/share/info/parted.info.gz + ;; + failed-upgrade) + ;; + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + --- parted-1.8.8.git.2008.03.24.orig/debian/rules +++ parted-1.8.8.git.2008.03.24/debian/rules @@ -0,0 +1,423 @@ +#!/usr/bin/make -f +# GNU Parted debian/rules +# +# This file is used by dpkg-buildpackage to build the parted packages. +# To build a package, run `dpkg-buildpackage' or `debuild' from the +# parent directory. (You may need to specify `-rfakeroot' to +# dpkg-buildpackage if you are not running it as root ...) +# +# $Id: rules,v 1.50 2003/02/19 11:13:18 timshel Exp $ +# +# Copyright (C) 1999, 2000, 2001, 2002 Timshel Knoll +# Licensed under the terms of the GNU General Public License +# +# Based (a long time ago) on parted's debian/rules, which in turn is based on +# `Sample debian/rules that uses debhelper' from dh_make, +# GNU Copyright (C) 1997 to 1999 by Joey Hess + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This has to be exported to make some magic below work. +export DH_OPTIONS + +# The version of the debian package, used in naming the udeb +DEBPKGVER = $(shell dpkg-parsechangelog | sed -n -e '/^Version: /{s///;p;q;}') + +# The library package version, ie. version 0.2 will build package +# libparted0.2, libparted0.2-dev etc. +# When incrementing this because of a new library SONAME, add an 'a' to the +# end if there isn't already one, otherwise increment the letter that is +# already there. +# When incrementing this, also set DEPVER to the current package version. +LIBPKGVER = 1.8 + +# Append the LIBPKGVER to non-lib package names? This is useful when building +# packages of the development versions of parted (eg. to build a parted1.5 +# package) +# BINPKGVER = $(LIBPKGVER) + +# The first version of the package to build with the current LIBPKGVER +# This should be changed to the current version when LIBPKGVER is changed ... +DEPVER = 1.8.8.git.2008.03.24-3 + +# This is the library's soname. The build will fail if this is wrong, since +# if the soname has changed we need to update stuff ... +LIBSONAME = 9 + +# This is for the version for the shared library +SHAREDLIBPKGVER = $(LIBPKGVER)-$(LIBSONAME) + +# The list of sed substitutions we need to do when generating files ... +# if you put `x' in here somewhere, the substitution `s/@x@/$(x)/' +# will be done ... +SUBSTS = LIBPKGVER BINPKGVER DEPVER LIBSONAME SHAREDLIBPKGVER + +# Files which are generated by this script ... +# You will probably need to change this depending on what files your package +# needs ... +GENFILES = debian/control \ + debian/libparted$(SHAREDLIBPKGVER).files \ + debian/libparted$(LIBPKGVER)-dev.files \ + debian/libparted$(LIBPKGVER)-i18n.files \ + +ifneq (, $(BINPKGVER)) +GENFILES += debian/parted$(BINPKGVER).files \ + debian/parted$(BINPKGVER)-doc.files \ + debian/parted$(BINPKGVER)-doc.docs \ + debian/parted$(BINPKGVER)-doc.postinst \ + debian/parted$(BINPKGVER)-doc.prerm +endif + +ifeq (, $(DEB_BUILD_ARCH)) +DEB_BUILD_ARCH = $(shell dpkg-architecture -qDEB_BUILD_ARCH) +endif + +ifeq (, $(DEB_BUILD_GNU_TYPE)) +DEB_BUILD_GNU_TYPE = $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +endif + +ifeq (, $(DEB_HOST_ARCH)) +DEB_HOST_ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH) +endif + +ifeq (, $(DEB_HOST_GNU_TYPE)) +DEB_HOST_GNU_TYPE = $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +endif + +ifeq (, $(DEB_BUILD_GNU_SYSTEM)) +DEB_BUILD_GNU_SYSTEM = $(shell dpkg-architecture -qDEB_BUILD_GNU_SYSTEM) +endif + +ifeq (, $(ARCH)) +ARCH = $(DEB_BUILD_ARCH) +endif + +ifeq (, $(CFLAGS)) +CFLAGS = -g +UDEB_CFLAGS = -g + +ifeq (, $(findstring noopt, $(DEB_BUILD_OPTIONS))) +CFLAGS += -O2 +UDEB_CFLAGS += -Os +else +CFLAGS += -O0 +UDEB_CFLAGS += -O0 +endif + +_P=) +GCC_VERSION := $(shell gcc --version | sed -n "/^gcc/s/^[^$(_P)]*$(_P) \(.\..\).*/\1/p") +ifeq ($(GCC_VERSION),4.3) + CFLAGS += -Wno-array-bounds + UDEB_CFLAGS += -Wno-array-bounds +endif + +endif + +# disable ssp on sparc +ifeq (sparc, $(DEB_BUILD_ARCH)) +CFLAGS += -fno-stack-protector +UDEB_CFLAGS += -fno-stack-protector +endif + +# This is a workaround for a m68k compiler bug ... +ifeq (m68k, $(DEB_BUILD_ARCH)) + CONFFLAGS += --disable-Werror +endif +ifeq (s390, $(DEB_BUILD_ARCH)) + CONFFLAGS += --disable-Werror +endif +ifeq (gnu, $(DEB_BUILD_GNU_SYSTEM)) + CONFFLAGS += --disable-Werror +endif + +# Cell partition tables get misdetected for pc98; we don't need pc98 support +# on powerpc +ifeq (powerpc, $(DEB_HOST_ARCH)) + CONFFLAGS += --disable-pc98 +endif + +# Workaround/fix bug #442308 +CFLAGS += -fgnu89-inline +UDEB_CFLAGS += -fgnu89-inline + +# This builds a substitution list for sed based on the SUBSTS variable +# and the variables whose names SUBSTS contains ... +SUBSTLIST = $(foreach subst, $(SUBSTS), s/@$(subst)@/$($(subst))/g;) + +# Pattern rules: + +# How to generate various files ... +debian/%: debian/%.in debian/rules + sed -e '$(SUBSTLIST)' < $< > $@ + +# This puts the libparted* packaging files in their right places +debian/libparted$(SHAREDLIBPKGVER)%: debian/libparted% + cp $< $@ + +debian/libparted$(LIBPKGVER)%: debian/libparted% + cp $< $@ + +debian/parted$(BINPKGVER)%: debian/parted% + cp $< $@ + +# by default, do something sane ... +default: echo-vars + +echo-vars: + @echo "Try: debian/rules [configure|build|install|binary|binary-arch|binary-indep|clean]" + @echo "CFLAGS: $(CFLAGS)" + @echo "DEB_BUILD_ARCH: $(DEB_BUILD_ARCH)" + @echo "DEB_BUILD_GNU_TYPE: $(DEB_BUILD_GNU_TYPE)" + @echo "DEB_HOST_GNU_TYPE: $(DEB_HOST_GNU_TYPE)" + @echo "LIBSONAME: $(LIBSONAME)" + @echo "LIBPKGVER: $(LIBPKGVER)" + @echo "BINPKGVER: $(BINPKGVER)" + @echo "GENFILES: $(GENFILES)" + @echo "SUBSTLIST: $(SUBSTLIST)" + +packaging-files: $(GENFILES) + +autotools-update: autotools-update-stamp +autotools-update-stamp: patch-stamp + AUTOMAKE=automake-1.10 ACLOCAL=aclocal-1.10 autoreconf + touch $@ + +build-deb/config.status: autotools-update-stamp + dh_testdir + [ -d build-deb ] || mkdir build-deb + +ifneq (, $(findstring debug, $(DEB_BUILD_OPTIONS))) + @echo "warning: option \`debug' in \$$DEB_BUILD_OPTIONS: building with gcc option \`-g'" >&2 +endif + +# Add here commands to configure the package. +# Install the `parted' executable to /sbin ... + cd build-deb && CFLAGS="$(CFLAGS)" ../configure --prefix=/usr \ + --sbindir=/sbin --mandir=\$${prefix}/share/man \ + --infodir=\$${prefix}/share/info --enable-shared \ + --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) \ + --enable-device-mapper \ + $(CONFFLAGS) + +build-udeb/config.status: autotools-update-stamp + dh_testdir + [ -d build-udeb ] || mkdir build-udeb + + cd build-udeb && CFLAGS="$(UDEB_CFLAGS)" ../configure --prefix=/usr \ + --sbindir=/sbin --libdir=/lib --mandir=\$${prefix}/share/man \ + --infodir=\$${prefix}/share/info --enable-shared --disable-static \ + --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) \ + --without-readline --enable-device-mapper \ + $(CONFFLAGS) + +build-dbg/config.status: autotools-update-stamp + dh_testdir + [ -d build-dbg ] || mkdir build-dbg + +# Add here commands to configure the package. + cd build-dbg && CFLAGS="-g $(CFLAGS)" ../configure --prefix=/usr \ + --enable-mtrace --disable-shared $(CONFFLAGS) \ + --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) + + touch $@ + +build: build-deb build-udeb build-dbg + +build-deb: build-deb/build-stamp +build-deb/build-stamp: build-deb/config.status + dh_testdir + + $(MAKE) -C build-deb + +# By now just use ABI detection on i386 machines. (enable in 1.7.1) + if [ $(DEB_BUILD_ARCH) = "i386" ]; then $(MAKE) -C build-deb check-abi; fi + + touch $@ + +build-udeb: build-udeb/build-stamp +build-udeb/build-stamp: build-udeb/config.status + dh_testdir + +# Only build binaries + $(MAKE) -C build-udeb/lib + $(MAKE) -C build-udeb/libparted + $(MAKE) -C build-udeb/parted + + touch $@ + +build-dbg: build-dbg/build-stamp +build-dbg/build-stamp: build-dbg/config.status + dh_testdir + +# Add here commands to compile the package. +# Don't need to build headers or doco rubbish, just the library ... +# Note: this assumes that the library source code is in the +# libparted directory, change this if it isn't ... + $(MAKE) -C build-dbg/lib + $(MAKE) -C build-dbg/libparted + + touch $@ + +clean: unpatch packaging-files + dh_testdir + dh_testroot + +# Add here commands to clean up after the build process + rm -rf build-deb build-udeb build-dbg + + rm -f autotools-update-stamp + +# Remove all debian/libparted*.* except for libparted.*, +# libparted-dev.* and libparted$(LIBPKGVER)* + @for file in debian/libparted*; do \ + file="`basename $$file`"; \ + case "$$file" in \ + libparted.*|libparted-dev.*|libparted-i18n.*|\ + libparted$(LIBPKGVER).*|libparted$(LIBPKGVER)-dev.*|\ + libparted$(LIBPKGVER)-i18n.*|libparted$(LIBPKGVER)-udeb.*) \ + ;; \ + *) \ + echo "rm -rf \"debian/$$file\""; \ + rm -rf "debian/$$file" ;; \ + esac; \ + done + + dh_clean + +install: DH_OPTIONS=-Nparted$(BINPKGVER)-udeb -Nlibparted$(LIBPKGVER)-udeb -Nlibparted$(LIBPKGVER)-dbg +install: build packaging-files + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + $(MAKE) -C build-deb install DESTDIR=$(CURDIR)/debian/tmp + +# We need to do 2 things here: +# 1. Check that $(LIBSONAME) is actually what the library's SONAME is +# 2. Fix the libparted.so symlink to point to /lib/libparted.so.x.x.x +# rather than being relative & pointing to the current directory + @(cd debian/tmp/usr/lib; \ + SONAME=`ls libparted-$(LIBPKGVER).so.*.*.* | \ + sed -e 's/^.*\.so\.\([0-9]\+\)\..*$$/\1/'`; \ + if [ "$(LIBSONAME)" -ne "$$SONAME" ]; then \ + echo " *** error: debian/rules thinks that libparted is" \ + "version $(LIBSONAME)" >&2; \ + echo " *** library is actually version $$SONAME. These should" \ + "be the same." >&2; \ + echo " *** Change the value of LIBSONAME to $$SONAME in" \ + "debian/rules, and" >&2; \ + echo " *** while you're there, bump the value of LIBPKGVER and" \ + "also set"; \ + echo " *** DEPVER to the current version of the package that" \ + "you are building." >&2; \ + exit 1; \ + fi; \ + ln -sf /lib/`readlink libparted.so` libparted.so) + + exit +# Make sure the shared libs are in /lib (otherwise there's no point +# installing the executable to /sbin ...) :-) + mkdir -p debian/tmp/lib + mv debian/tmp/usr/lib/*.so.* debian/tmp/lib + + dh_movefiles + +# Remove all empty directories under debian/tmp +# The `sort -r' makes sure that the dir `x/y' is removed before `x' + rmdir --ignore-fail-on-non-empty `find debian/tmp -type d | sort -r` + + @if [ -d debian/tmp ]; then \ + echo " *** WARNING: files exists in debian/tmp after" \ + "dh_movefiles!!!" >&2; \ + echo " *** Maybe the debian/*.files files need updating ..." >&2; \ + fi + +install-udeb: DH_OPTIONS=-pparted$(BINPKGVER)-udeb -plibparted$(LIBPKGVER)-udeb +install-udeb: LIBPARTED_UDEB=$(shell dh_listpackages | grep -E '^libparted$(LIBPKGVER)-udeb$$') +install-udeb: PARTED_UDEB=$(shell dh_listpackages | grep -E '^parted$(BINPKGVER)-udeb$$') +install-udeb: build-udeb + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + [ -z "$(LIBPARTED_UDEB)" ] || \ + $(MAKE) -C build-udeb/libparted install \ + DESTDIR=$(CURDIR)/debian/libparted$(LIBPKGVER)-udeb + + [ -z "$(LIBPARTED_UDEB)" ] || \ + rm -f debian/libparted$(LIBPKGVER)-udeb/lib/libparted.so \ + debian/libparted$(LIBPKGVER)-udeb/lib/libparted.la + + [ -z "$(PARTED_UDEB)" ] || $(MAKE) -C build-udeb/parted install \ + DESTDIR=$(CURDIR)/debian/parted$(BINPKGVER)-udeb + +install-dbg: DH_OPTIONS=-plibparted$(LIBPKGVER)-dbg +install-dbg: build-dbg + dh_testdir + dh_testroot + dh_clean -k -plibparted$(LIBPKGVER)-dbg + + install -D -m644 build-dbg/libparted/.libs/libparted.a \ + debian/libparted$(LIBPKGVER)-dbg/usr/lib/libparted_g.a + +# This single target is used to build all the packages, all at once, or +# one at a time. So keep in mind: any options passed to commands here will +# affect _all_ packages. Anything you want to only affect one package +# should be put in another target, such as the install target. +binary-common: + dh_testdir + dh_testroot + dh_installdocs + dh_installchangelogs + dh_installexamples + dh_installmenu + dh_installcron + dh_installman + dh_installinfo + dh_strip + dh_link + dh_compress + dh_fixperms + dh_makeshlibs -V'libparted$(SHAREDLIBPKGVER) (>= $(DEPVER))' \ + --add-udeb=$(shell dh_listpackages | grep -E '^libparted$(LIBPKGVER)-udeb$$') + dh_shlibdeps -Llibparted$(SHAREDLIBPKGVER) \ + -l/debian/libparted$(SHAREDLIBPKGVER)/lib + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +# Build architecture independant packages using the common target. +# Unfortunately, we still need to build since the info file has to be +# re-generated before installation and the locales need to be installed :-( +binary-indep: build install +# (Uncomment this next line if you have such packages.) + $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common + +# Build architecture dependant packages using the common target. +# FIXME: this is an ugly hack :-( Work out a better way to build the +# separate debug package ... +binary-arch: build install install-udeb + $(MAKE) -f debian/rules DH_OPTIONS="-a -Nlibparted$(LIBPKGVER)-dbg" binary-common + $(MAKE) -f debian/rules binary-libparted$(LIBPKGVER)-dbg + +# Any other binary targets build just one binary package at a time. +binary-%-dbg: build-dbg install-dbg + $(MAKE) -f debian/rules DH_OPTIONS="-p$(*)-dbg" binary-common + +binary-%: build install + $(MAKE) -f debian/rules DH_OPTIONS=-p$* binary-common + +binary: binary-arch binary-indep + +.PHONY: configure configure-udeb configure-dbg +.PHONY: build build-udeb build-dbg +.PHONY: install install-udeb install-dbg +.PHONY: clean binary-indep binary-arch binary +.PHONY: binary-%-dbg binary-%-udeb binary-% +.PHONY: packaging-files autotools + +include /usr/share/dpatch/dpatch.make --- parted-1.8.8.git.2008.03.24.orig/debian/parted-doc.files +++ parted-1.8.8.git.2008.03.24/debian/parted-doc.files @@ -0,0 +1 @@ +usr/share/info/parted.info --- parted-1.8.8.git.2008.03.24.orig/debian/parted-doc.docs +++ parted-1.8.8.git.2008.03.24/debian/parted-doc.docs @@ -0,0 +1,10 @@ +NEWS +AUTHORS +BUGS +README +README-hacking +THANKS +TODO +doc/API +doc/FAT +doc/USER.jp --- parted-1.8.8.git.2008.03.24.orig/debian/compat +++ parted-1.8.8.git.2008.03.24/debian/compat @@ -0,0 +1 @@ +5 --- parted-1.8.8.git.2008.03.24.orig/parted/ui.c +++ parted-1.8.8.git.2008.03.24/parted/ui.c @@ -154,17 +154,17 @@ # define ILL_BADSTK (INTMAX - 8) #endif -char* prog_name = "GNU Parted " VERSION "\n"; +const char* prog_name = "GNU Parted " VERSION "\n"; -static char* banner_msg = N_( +static const char* banner_msg = N_( "Welcome to GNU Parted! Type 'help' to view a list of commands.\n"); -static char* usage_msg = N_( +static const char* usage_msg = N_( "Usage: parted [OPTION]... [DEVICE [COMMAND [PARAMETERS]...]...]\n" "Apply COMMANDs with PARAMETERS to DEVICE. If no COMMAND(s) are given, " "run in\ninteractive mode.\n"); -static char* bug_msg = N_( +static const char* bug_msg = N_( "\n\nYou found a bug in GNU Parted! Here's what you have to do:\n\n" "Don't panic! The bug has most likely not affected any of your data.\n" "Help us to fix this bug by doing the following:\n\n" @@ -218,7 +218,7 @@ /* HACK: don't specify termcap separately - it'll annoy the users. */ #ifdef HAVE_LIBREADLINE - width = tgetnum ("co"); + width = tgetnum ((char *) "co"); #endif if (width <= 0) @@ -569,7 +569,9 @@ fputs (line, stdout); fflush (stdout); #endif - line [strlen (line) - 1] = 0; /* kill trailing CR */ + /* kill trailing NL */ + if (strlen (line)) + line [strlen (line) - 1] = 0; } else { free (line); line = NULL; --- parted-1.8.8.git.2008.03.24.orig/parted/.gitignore +++ parted-1.8.8.git.2008.03.24/parted/.gitignore @@ -0,0 +1 @@ +parted --- parted-1.8.8.git.2008.03.24.orig/parted/parted.c +++ parted-1.8.8.git.2008.03.24/parted/parted.c @@ -79,7 +79,7 @@ time_t predicted_time_left; } TimerContext; -static struct option options[] = { +static const struct option const options[] = { /* name, has-arg, string-return-val, char-return-val */ {"help", 0, NULL, 'h'}, {"list", 0, NULL, 'l'}, @@ -90,7 +90,7 @@ {NULL, 0, NULL, 0} }; -static char* options_help [][2] = { +static const char *const options_help [][2] = { {"help", N_("displays this help message")}, {"list", N_("lists partition layout on all block devices")}, {"machine", N_("displays machine parseable output")}, @@ -107,26 +107,26 @@ int disk_is_modified = 0; int is_toggle_mode = 0; -static char* number_msg = N_( +static const char* number_msg = N_( "NUMBER is the partition number used by Linux. On MS-DOS disk labels, the " "primary partitions number from 1 to 4, logical partitions from 5 onwards.\n"); -static char* label_type_msg_start = N_("LABEL-TYPE is one of: "); -static char* flag_msg_start = N_("FLAG is one of: "); -static char* unit_msg_start = N_("UNIT is one of: "); -static char* part_type_msg = N_("PART-TYPE is one of: primary, logical, " +static const char* label_type_msg_start = N_("LABEL-TYPE is one of: "); +static const char* flag_msg_start = N_("FLAG is one of: "); +static const char* unit_msg_start = N_("UNIT is one of: "); +static const char* part_type_msg = N_("PART-TYPE is one of: primary, logical, " "extended\n"); -static char* fs_type_msg_start = N_("FS-TYPE is one of: "); -static char* start_end_msg = N_("START and END are disk locations, such as " +static const char* fs_type_msg_start = N_("FS-TYPE is one of: "); +static const char* start_end_msg = N_("START and END are disk locations, such as " "4GB or 10%. Negative values count from the end of the disk. " "For example, -1s specifies exactly the last sector.\n"); -static char* state_msg = N_("STATE is one of: on, off\n"); -static char* device_msg = N_("DEVICE is usually /dev/hda or /dev/sda\n"); -static char* name_msg = N_("NAME is any word you want\n"); -static char* resize_msg_start = N_("The partition must have one of the " +static const char* state_msg = N_("STATE is one of: on, off\n"); +static const char* device_msg = N_("DEVICE is usually /dev/hda or /dev/sda\n"); +static const char* name_msg = N_("NAME is any word you want\n"); +static const char* resize_msg_start = N_("The partition must have one of the " "following FS-TYPEs: "); -static char* copyright_msg = N_( +static const char* copyright_msg = N_( "Copyright (C) 1998 - 2006 Free Software Foundation, Inc.\n" "This program is free software, covered by the GNU General Public License.\n" "\n" @@ -1264,16 +1264,17 @@ int has_free_arg = 0; int has_list_arg = 0; int has_num_arg = 0; - char* transport[14] = {"unknown", "scsi", "ide", "dac960", - "cpqarray", "file", "ataraid", "i2o", - "ubd", "dasd", "viodasd", "sx8", "dm", - "xvd"}; + const char *const transport[14] = {"unknown", "scsi", "ide", "dac960", + "cpqarray", "file", "ataraid", "i2o", + "ubd", "dasd", "viodasd", "sx8", "dm", + "xvd"}; char* peek_word; char* start; char* end; char* size; const char* name; char* tmp; + char* flags; wchar_t* table_rendered; disk = ped_disk_new (*dev); @@ -1473,7 +1474,9 @@ str_list_append (row, name); } - str_list_append (row, partition_print_flags (part)); + flags = partition_print_flags (part); + str_list_append (row, flags); + ped_free (flags); } else { if (has_extended) str_list_append (row, ""); @@ -1486,6 +1489,10 @@ //PED_ASSERT (row.cols == caption.cols) table_add_row_from_strlist (table, row); str_list_destroy (row); + ped_free (tmp); + ped_free (start); + ped_free (end); + ped_free (size); } table_rendered = table_render (table); --- parted-1.8.8.git.2008.03.24.orig/parted/ui.h +++ parted-1.8.8.git.2008.03.24/parted/ui.h @@ -1,6 +1,6 @@ /* parted - a frontend to libparted - Copyright (C) 1999, 2000, 2001, 2007 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2001, 2007-2008 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 @@ -21,7 +21,7 @@ #include "strlist.h" -extern char* prog_name; +extern const char *prog_name; extern int init_ui (); extern int non_interactive_mode (PedDevice** dev, Command* cmd_list[], --- parted-1.8.8.git.2008.03.24.orig/.gitignore +++ parted-1.8.8.git.2008.03.24/.gitignore @@ -0,0 +1,35 @@ +*.o +*~ +.deps +.libs +ABOUT-NLS +ChangeLog +INSTALL +Makefile +Makefile.in +aclocal.m4 +autom4te.cache +config.cache +config.h +config.hin +config.log +config.status +configure +doc/C/po/parted.8.pot +doc/pt_BR/parted.8.pt_BR.po +gnulib/ +libparted.pc +libparted/tests/init.sh +libparted/tests/label +libtool +m4 +parted-*.tar.bz2 +parted-*.tar.bz2.sig +parted-*.tar.gz +parted-*.tar.gz.sig +parted-*.xdelta +parted-*.xdelta.sig +parted.spec +partprobe/partprobe +stamp-h1 +tests/init.sh --- parted-1.8.8.git.2008.03.24.orig/build-aux/.gitignore +++ parted-1.8.8.git.2008.03.24/build-aux/.gitignore @@ -0,0 +1,14 @@ +announce-gen +compile +config.guess +config.rpath +config.sub +depcomp +gnupload +install-sh +link-warning.h +ltmain.sh +mdate-sh +missing +mkinstalldirs +texinfo.tex --- parted-1.8.8.git.2008.03.24.orig/libparted/labels/dos.c +++ parted-1.8.8.git.2008.03.24/libparted/labels/dos.c @@ -190,14 +190,16 @@ if (PED_LE16_TO_CPU (part_table->magic) != MSDOS_MAGIC) goto probe_fail; - /* if this is a FAT fs, fail here. Note that the Smart Boot Manager - * Loader (SBML) signature indicates a partition table, not a file - * system. + /* If this is a FAT fs, fail here. Checking for the FAT signature + * has some false positives; instead, do what the Linux kernel does + * and ensure that each partition has a boot indicator that is + * either 0 or 0x80. */ - if ((!strncmp (part_table->boot_code + 0x36, "FAT", 3) - && strncmp (part_table->boot_code + 0x40, "SBML", 4) != 0) - || !strncmp (part_table->boot_code + 0x52, "FAT", 3)) - goto probe_fail; + for (i = 0; i < 4; i++) { + if (part_table->partitions[i].boot_ind != 0 + && part_table->partitions[i].boot_ind != 0x80) + goto probe_fail; + } /* If this is a GPT disk, fail here */ for (i = 0; i < 4; i++) { --- parted-1.8.8.git.2008.03.24.orig/libparted/labels/fdasd.c +++ parted-1.8.8.git.2008.03.24/libparted/labels/fdasd.c @@ -149,7 +149,7 @@ case device_verification_failed: sprintf(error, "fdasd: %s -- %s\n", _("Device verification failed"), - _("The specified device is not a valid DASD device"));, + _("The specified device is not a valid DASD device")); break; default: sprintf(error, "fdasd: %s: %s\n", _("Fatal error"), str); --- parted-1.8.8.git.2008.03.24.orig/libparted/labels/dasd.c +++ parted-1.8.8.git.2008.03.24/libparted/labels/dasd.c @@ -689,7 +689,7 @@ case PED_PARTITION_RAID: return 1; case PED_PARTITION_LVM: - return 1; + return 0; /* disable LVM support */ default: return 0; } --- parted-1.8.8.git.2008.03.24.orig/libparted/labels/mac.c +++ parted-1.8.8.git.2008.03.24/libparted/labels/mac.c @@ -1,6 +1,6 @@ /* libparted - a library for manipulating disk partitions - Copyright (C) 2000, 2002, 2004, 2007 Free Software Foundation, Inc. + Copyright (C) 2000, 2002, 2004, 2007-2008 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 @@ -376,19 +376,19 @@ #endif /* !DISCOVER_ONLY */ static int -_rawpart_cmp_type (MacRawPartition* raw_part, char* type) +_rawpart_cmp_type (const MacRawPartition* raw_part, const char* type) { return strncasecmp (raw_part->type, type, 32) == 0; } static int -_rawpart_cmp_name (MacRawPartition* raw_part, char* name) +_rawpart_cmp_name (const MacRawPartition* raw_part, const char* name) { return strncasecmp (raw_part->name, name, 32) == 0; } static int -_rawpart_is_partition_map (MacRawPartition* raw_part) +_rawpart_is_partition_map (const MacRawPartition* raw_part) { return _rawpart_cmp_type (raw_part, "Apple_partition_map"); } @@ -408,7 +408,7 @@ } static int -_rawpart_is_boot (MacRawPartition* raw_part) +_rawpart_is_boot (const MacRawPartition* raw_part) { if (!strcasecmp(raw_part->type, "Apple_Bootstrap")) return 1; @@ -420,7 +420,7 @@ } static int -_rawpart_is_driver (MacRawPartition* raw_part) +_rawpart_is_driver (const MacRawPartition* raw_part) { if (strncmp (raw_part->type, "Apple_", 6) != 0) return 0; @@ -430,7 +430,7 @@ } static int -_rawpart_has_driver (MacRawPartition* raw_part, MacDiskData* mac_disk_data) +_rawpart_has_driver (const MacRawPartition* raw_part, MacDiskData* mac_disk_data) { MacDeviceDriver *driverlist; uint16_t i, bsz; --- parted-1.8.8.git.2008.03.24.orig/libparted/labels/gpt.c +++ parted-1.8.8.git.2008.03.24/libparted/labels/gpt.c @@ -4,7 +4,7 @@ original version by Matt Domsch Disclaimed into the Public Domain - Portions Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007 + Portions Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. EFI GUID Partition Table handling @@ -86,6 +86,10 @@ ((efi_guid_t) { PED_CPU_TO_LE32 (0xC12A7328), PED_CPU_TO_LE16 (0xF81F), \ PED_CPU_TO_LE16 (0x11d2), 0xBA, 0x4B, \ { 0x00, 0xA0, 0xC9, 0x3E, 0xC9, 0x3B }}) +#define PARTITION_BIOS_GRUB_GUID \ + ((efi_guid_t) { PED_CPU_TO_LE32 (0x21686148), PED_CPU_TO_LE16 (0x6449), \ + PED_CPU_TO_LE16 (0x6E6f), 0x74, 0x4E, \ + { 0x65, 0x65, 0x64, 0x45, 0x46, 0x49 }}) #define LEGACY_MBR_PARTITION_GUID \ ((efi_guid_t) { PED_CPU_TO_LE32 (0x024DEE41), PED_CPU_TO_LE16 (0x33E7), \ PED_CPU_TO_LE16 (0x11d3, 0x9D, 0x69, \ @@ -245,6 +249,7 @@ int lvm; int raid; int boot; + int bios_grub; int hp_service; int hidden; int msftres; @@ -753,13 +758,16 @@ gpt_part_data->lvm = gpt_part_data->raid = gpt_part_data->boot = gpt_part_data->hp_service - = gpt_part_data->hidden = gpt_part_data->msftres = 0; + = gpt_part_data->hidden = gpt_part_data->msftres + = gpt_part_data->bios_grub = 0; if (pte->Attributes.RequiredToFunction & 0x1) gpt_part_data->hidden = 1; if (!guid_cmp (gpt_part_data->type, PARTITION_SYSTEM_GUID)) gpt_part_data->boot = 1; + else if (!guid_cmp (gpt_part_data->type, PARTITION_BIOS_GRUB_GUID)) + gpt_part_data->bios_grub = 1; else if (!guid_cmp (gpt_part_data->type, PARTITION_RAID_GUID)) gpt_part_data->raid = 1; else if (!guid_cmp (gpt_part_data->type, PARTITION_LVM_GUID)) @@ -1130,6 +1138,7 @@ gpt_part_data->lvm = 0; gpt_part_data->raid = 0; gpt_part_data->boot = 0; + gpt_part_data->bios_grub = 0; gpt_part_data->hp_service = 0; gpt_part_data->hidden = 0; gpt_part_data->msftres = 0; @@ -1208,6 +1217,10 @@ gpt_part_data->type = PARTITION_SYSTEM_GUID; return 1; } + if (gpt_part_data->bios_grub) { + gpt_part_data->type = PARTITION_BIOS_GRUB_GUID; + return 1; + } if (gpt_part_data->hp_service) { gpt_part_data->type = PARTITION_HPSERVICE_GUID; return 1; @@ -1306,6 +1319,16 @@ if (state) gpt_part_data->raid = gpt_part_data->lvm + = gpt_part_data->bios_grub + = gpt_part_data->hp_service + = gpt_part_data->msftres = 0; + return gpt_partition_set_system (part, part->fs_type); + case PED_PARTITION_BIOS_GRUB: + gpt_part_data->bios_grub = state; + if (state) + gpt_part_data->raid + = gpt_part_data->lvm + = gpt_part_data->boot = gpt_part_data->hp_service = gpt_part_data->msftres = 0; return gpt_partition_set_system (part, part->fs_type); @@ -1314,6 +1337,7 @@ if (state) gpt_part_data->boot = gpt_part_data->lvm + = gpt_part_data->bios_grub = gpt_part_data->hp_service = gpt_part_data->msftres = 0; return gpt_partition_set_system (part, part->fs_type); @@ -1322,6 +1346,7 @@ if (state) gpt_part_data->boot = gpt_part_data->raid + = gpt_part_data->bios_grub = gpt_part_data->hp_service = gpt_part_data->msftres = 0; return gpt_partition_set_system (part, part->fs_type); @@ -1331,6 +1356,7 @@ gpt_part_data->boot = gpt_part_data->raid = gpt_part_data->lvm + = gpt_part_data->bios_grub = gpt_part_data->msftres = 0; return gpt_partition_set_system (part, part->fs_type); case PED_PARTITION_MSFT_RESERVED: @@ -1339,6 +1365,7 @@ gpt_part_data->boot = gpt_part_data->raid = gpt_part_data->lvm + = gpt_part_data->bios_grub = gpt_part_data->hp_service = 0; return gpt_partition_set_system (part, part->fs_type); case PED_PARTITION_HIDDEN: @@ -1367,6 +1394,8 @@ return gpt_part_data->lvm; case PED_PARTITION_BOOT: return gpt_part_data->boot; + case PED_PARTITION_BIOS_GRUB: + return gpt_part_data->bios_grub; case PED_PARTITION_HPSERVICE: return gpt_part_data->hp_service; case PED_PARTITION_MSFT_RESERVED: @@ -1390,6 +1419,7 @@ case PED_PARTITION_RAID: case PED_PARTITION_LVM: case PED_PARTITION_BOOT: + case PED_PARTITION_BIOS_GRUB: case PED_PARTITION_HPSERVICE: case PED_PARTITION_MSFT_RESERVED: case PED_PARTITION_HIDDEN: --- parted-1.8.8.git.2008.03.24.orig/libparted/.gitignore +++ parted-1.8.8.git.2008.03.24/libparted/.gitignore @@ -0,0 +1,2 @@ +*.lo +*.la --- parted-1.8.8.git.2008.03.24.orig/libparted/disk.c +++ parted-1.8.8.git.2008.03.24/libparted/disk.c @@ -2162,6 +2162,8 @@ switch (flag) { case PED_PARTITION_BOOT: return N_("boot"); + case PED_PARTITION_BIOS_GRUB: + return N_("bios_grub"); case PED_PARTITION_ROOT: return N_("root"); case PED_PARTITION_SWAP: --- parted-1.8.8.git.2008.03.24.orig/libparted/fs/ext2/ext2_mkfs.c +++ parted-1.8.8.git.2008.03.24/libparted/fs/ext2/ext2_mkfs.c @@ -1,6 +1,6 @@ /* ext2_mkfs.c -- ext2 fs creator - Copyright (C) 1999, 2000, 2001, 2007 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2001, 2007-2008 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 @@ -263,7 +263,7 @@ /* returns the offset into the buffer of the start of the next dir entry */ static int _set_dirent(void* buf, int offset, int block_size, int is_last, - uint32_t inode, char* name, int file_type) + uint32_t inode, const char* name, int file_type) { struct ext2_dir_entry_2 *dirent = (void*) (((char*)buf) + offset); int name_len = strlen(name); --- parted-1.8.8.git.2008.03.24.orig/libparted/fs/ext2/ext2_block_relocator.c +++ parted-1.8.8.git.2008.03.24/libparted/fs/ext2/ext2_block_relocator.c @@ -691,10 +691,11 @@ { /* FIXXXME gross hack */ fprintf(stderr, "relocating %s blocks", - ((char *[4]){"direct", - "singly indirect", - "doubly indirect", - "triply indirect"})[i]); + ((const char *const [4]) + {"direct", + "singly indirect", + "doubly indirect", + "triply indirect"})[i]); fflush(stderr); } --- parted-1.8.8.git.2008.03.24.orig/libparted/fs/fat/traverse.c +++ parted-1.8.8.git.2008.03.24/libparted/fs/fat/traverse.c @@ -120,7 +120,7 @@ FatTraverseInfo* fat_traverse_begin (PedFileSystem* fs, FatCluster start_cluster, - char* dir_name) + const char* dir_name) { FatSpecific* fs_info = FAT_SPECIFIC (fs); FatTraverseInfo* trav_info; --- parted-1.8.8.git.2008.03.24.orig/libparted/fs/fat/traverse.h +++ parted-1.8.8.git.2008.03.24/libparted/fs/fat/traverse.h @@ -42,7 +42,8 @@ /* starts traversal at an arbitary cluster. if start_cluster==0, then uses root directory */ extern FatTraverseInfo* fat_traverse_begin (PedFileSystem* fs, - FatCluster start_cluster, char* dir_name); + FatCluster start_cluster, + const char* dir_name); extern int fat_traverse_complete (FatTraverseInfo* trav_info); --- parted-1.8.8.git.2008.03.24.orig/libparted/fs/fat/resize.c +++ parted-1.8.8.git.2008.03.24/libparted/fs/fat/resize.c @@ -1,6 +1,6 @@ /* libparted - Copyright (C) 1998, 1999, 2000, 2007 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2007-2008 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 @@ -481,8 +481,8 @@ { FatSpecific* fs_info = FAT_SPECIFIC (fs); PedExceptionOption status; - char* fat16_msg; - char* fat32_msg; + const char* fat16_msg; + const char* fat32_msg; if (fs_info->fat_type == FAT_TYPE_FAT16) fat16_msg = _("If you leave your file system as FAT16, " --- parted-1.8.8.git.2008.03.24.orig/libparted/exception.c +++ parted-1.8.8.git.2008.03.24/libparted/exception.c @@ -1,6 +1,6 @@ /* libparted - a library for manipulating disk partitions - Copyright (C) 1999, 2000, 2007 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2007-2008 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 @@ -73,7 +73,7 @@ static PedException* ex = NULL; static int ex_fetch_count = 0; -static char* type_strings [] = { +static const char *const type_strings [] = { N_("Information"), N_("Warning"), N_("Error"), @@ -82,7 +82,7 @@ N_("No Implementation") }; -static char* option_strings [] = { +static const char *const option_strings [] = { N_("Fix"), N_("Yes"), N_("No"), @@ -98,7 +98,7 @@ char* ped_exception_get_type_string (PedExceptionType ex_type) { - return type_strings [ex_type - 1]; + return (char *) type_strings [ex_type - 1]; } /* FIXME: move this out to the prospective math.c */ @@ -121,7 +121,7 @@ char* ped_exception_get_option_string (PedExceptionOption ex_opt) { - return option_strings [ped_log2 (ex_opt)]; + return (char *) option_strings [ped_log2 (ex_opt)]; } static PedExceptionOption @@ -243,8 +243,8 @@ ex->type = ex_type; ex->options = ex_opts; - while (1) { - ex->message = (char*) malloc (size); + while (message) { + ex->message = (char*) malloc (size * sizeof (char)); if (!ex->message) goto no_memory; @@ -256,6 +256,7 @@ break; size += 10; + ped_free (ex->message); } return do_throw (); --- parted-1.8.8.git.2008.03.24.orig/libparted/arch/linux.c +++ parted-1.8.8.git.2008.03.24/libparted/arch/linux.c @@ -64,7 +64,7 @@ #define HDIO_GETGEO 0x0301 /* get device geometry */ #define HDIO_GET_IDENTITY 0x030d /* get IDE identification info */ -#if defined(O_DIRECT) && (!defined(__s390__) || !defined(__s390x__)) +#if defined(O_DIRECT) && !(defined(__s390__) || defined(__s390x__)) #define RD_MODE (O_RDONLY | O_DIRECT) #define WR_MODE (O_WRONLY | O_DIRECT) #define RW_MODE (O_RDWR | O_DIRECT) @@ -986,7 +986,7 @@ } static int -init_dasd (PedDevice* dev, char* model_name) +init_dasd (PedDevice* dev, const char* model_name) { struct stat dev_stat; struct hd_geometry geo; @@ -1042,7 +1042,7 @@ } static int -init_generic (PedDevice* dev, char* model_name) +init_generic (PedDevice* dev, const char* model_name) { struct stat dev_stat; PedExceptionOption ex_status; --- parted-1.8.8.git.2008.03.24.orig/lib/.gitignore +++ parted-1.8.8.git.2008.03.24/lib/.gitignore @@ -0,0 +1,94 @@ +*.la +*.lo +__fpending.c +__fpending.h +alloca.c +alloca.h +alloca_.h +atexit.c +basename.c +calloc.c +charset.alias +close-stream.c +close-stream.h +closeout.c +closeout.h +config.charset +config.h.in +configmake.h +dirname.c +dirname.h +error.c +error.h +exitfail.c +exitfail.h +free.c +full-write.c +full-write.h +getopt.c +getopt.h +getopt1.c +getopt_.h +getopt_int.h +gettext.h +gnulib.mk +inttypes.h +inttypes_.h +localcharset.c +localcharset.h +long-options.c +long-options.h +malloc.c +memchr.c +memcmp.c +memcpy.c +memmove.c +memset.c +quotearg.c +quotearg.h +realloc.c +ref-add.sed +ref-add.sin +ref-del.sed +ref-del.sin +regcomp.c +regex.c +regex.h +regex_internal.c +regex_internal.h +regexec.c +rename.c +rpmatch.c +safe-read.c +safe-read.h +safe-write.c +safe-write.h +stdbool.h +stdbool_.h +stdint.h +stdint_.h +stdlib.h +stdlib_.h +strcspn.c +string.h +string_.h +stripslash.c +strndup.c +strnlen.c +strtod.c +strtol.c +unistd.h +unistd_.h +utime.c +version-etc-fsf.c +version-etc.c +version-etc.h +wchar.h +wchar_.h +wctype.h +wctype_.h +xalloc-die.c +xalloc.h +xmalloc.c +xstrndup.c +xstrndup.h --- parted-1.8.8.git.2008.03.24.orig/tests/t2200-dos-label-recog.sh +++ parted-1.8.8.git.2008.03.24/tests/t2200-dos-label-recog.sh @@ -0,0 +1,61 @@ +#!/bin/sh + +# Copyright (C) 2008 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 . + +test_description='improved MSDOS partition-table recognition' + +. ./init.sh + +###################################################################### +# With vestiges of a preceding FAT file system boot sector in the MBR, +# parted 1.8.8.1.29 and earlier would fail to recognize a DOS +# partition table. +###################################################################### +N=100k +dev=loop-file +test_expect_success \ + 'create a file to simulate the underlying device' \ + 'dd if=/dev/null of=$dev bs=1 seek=$N 2> /dev/null' + +test_expect_success \ + 'label the test disk' \ + 'parted -s $dev mklabel msdos > out 2>&1' +test_expect_success 'expect no output' '$compare out /dev/null' + +test_expect_success \ + 'create two partition' \ + ' + parted -s $dev mkpart primary 1s 40s > out 2>&1 && + parted -s $dev mkpart primary 41s 80s > out 2>&1 + + ' +test_expect_success 'expect no output' '$compare out /dev/null' + +test_expect_success \ + 'write "FAT" where it would cause trouble' \ + 'printf FAT|dd bs=1c seek=82 count=3 of=$dev conv=notrunc' + +test_expect_success \ + 'print the partition table' \ + ' + parted -m -s $dev unit s p > out && + tail -2 out > k && mv k out && + printf "1:1s:40s:40s:::;\n2:41s:80s:40s:::;\n" > exp + + ' +test_expect_success 'expect two partitions' '$compare out exp' + +test_done --- parted-1.8.8.git.2008.03.24.orig/tests/Makefile.am +++ parted-1.8.8.git.2008.03.24/tests/Makefile.am @@ -5,8 +5,10 @@ t1100-busy-label.sh \ t1500-small-ext2.sh \ t2000-mkfs.sh \ + t2200-dos-label-recog.sh \ t3000-constraints.sh \ - t3100-resize-ext2-partion.sh + t3100-resize-ext2-partion.sh \ + t5000-tags.sh EXTRA_DIST = \ $(TESTS) test-lib.sh mkdtemp --- parted-1.8.8.git.2008.03.24.orig/tests/t5000-tags.sh +++ parted-1.8.8.git.2008.03.24/tests/t5000-tags.sh @@ -0,0 +1,81 @@ +#!/bin/sh + +# Copyright (C) 2007,2008 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 . + +test_description="test bios_grub flag in gpt labels" + +. ./init.sh + +dev=loop-file + +test_expect_success \ + "setup: create zeroed device" \ + '{ dd if=/dev/zero bs=1024 count=64; } > $dev' + +test_expect_success \ + 'create gpt label' \ + 'parted -s $dev mklabel gpt >out 2>&1' + +test_expect_success \ + 'add a partition' \ + 'parted -s $dev mkpart primary 0 1 >>out 2>&1' + +test_expect_success \ + 'print the table (before manual modification)' \ + 'parted -s $dev print >>out 2>&1' + +# Using bios_boot_magic='\x48\x61' looks nicer, but isn't portable. +# dash's builtin printf doesn't recognize such \xHH hexadecimal escapes. +bios_boot_magic='\110\141\150\41\111\144\157\156\164\116\145\145\144\105\106\111' + +printf "$bios_boot_magic" | dd of=$dev bs=1024 seek=1 conv=notrunc + +test_expect_success \ + 'print the table (after manual modification)' \ + 'parted -s $dev print >>out 2>&1' + +pwd=`pwd` + +fail=0 +{ + cat < exp || fail=1 + +test_expect_success \ + 'prepare actual and expected output' \ + 'test $fail = 0 && + mv out o2 && sed "s,^Disk .*/$dev:,Disk .../$dev:," o2 > out' + +test_expect_success 'check for expected output' '$compare out exp' + +test_done --- parted-1.8.8.git.2008.03.24.orig/tests/Makefile.in +++ parted-1.8.8.git.2008.03.24/tests/Makefile.in @@ -365,8 +365,10 @@ t1100-busy-label.sh \ t1500-small-ext2.sh \ t2000-mkfs.sh \ + t2200-dos-label-recog.sh \ t3000-constraints.sh \ - t3100-resize-ext2-partion.sh + t3100-resize-ext2-partion.sh \ + t5000-tags.sh EXTRA_DIST = \ $(TESTS) test-lib.sh mkdtemp --- parted-1.8.8.git.2008.03.24.orig/debug/clearfat/.gitignore +++ parted-1.8.8.git.2008.03.24/debug/clearfat/.gitignore @@ -0,0 +1 @@ +clearfat --- parted-1.8.8.git.2008.03.24.orig/doc/.gitignore +++ parted-1.8.8.git.2008.03.24/doc/.gitignore @@ -0,0 +1,9 @@ +C/log +C/sync.1 +C/x.1 +C/x.pot +parted.info +pt_BR/parted.8 +pt_BR/partprobe.8 +stamp-vti +version.texi --- parted-1.8.8.git.2008.03.24.orig/doc/version.texi +++ parted-1.8.8.git.2008.03.24/doc/version.texi @@ -1,4 +1,4 @@ -@set UPDATED 22 January 2008 -@set UPDATED-MONTH January 2008 -@set EDITION 1.8.8 -@set VERSION 1.8.8 +@set UPDATED 21 June 2008 +@set UPDATED-MONTH June 2008 +@set EDITION 1.8.9 +@set VERSION 1.8.9 --- parted-1.8.8.git.2008.03.24.orig/doc/stamp-vti +++ parted-1.8.8.git.2008.03.24/doc/stamp-vti @@ -1,4 +1,4 @@ -@set UPDATED 22 January 2008 -@set UPDATED-MONTH January 2008 -@set EDITION 1.8.8 -@set VERSION 1.8.8 +@set UPDATED 21 June 2008 +@set UPDATED-MONTH June 2008 +@set EDITION 1.8.9 +@set VERSION 1.8.9 --- parted-1.8.8.git.2008.03.24.orig/doc/parted.texi +++ parted-1.8.8.git.2008.03.24/doc/parted.texi @@ -14,7 +14,7 @@ @ifnottex @c texi2pdf don't understand copying and insertcopying ??? @c modifications must also be done in the titlepage @copying -Copyright @copyright{} 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 +Copyright @copyright{} 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document @@ -63,7 +63,7 @@ @c WTF doesn't texi2html include the titlepage? @ifhtml -@insertcopying +@insertcopying @end ifhtml This document describes the use of GNU Parted, a program for creating, @@ -257,7 +257,7 @@ However, there are a few options for @command{configure}: @table @code -@item --without-readline +@item --without-readline turns off use of readline. This is useful for making rescue disks, etc., where few libraries are available. @@ -275,12 +275,12 @@ @item --disable-fs disable all file system support -@item --disable-nls +@item --disable-nls turns off native language support. This is useful for use with old versions of glibc, or a trimmed down version of glibc suitable for rescue disks. -@item --disable-shared +@item --disable-shared turns off shared libraries. This may be necessary for use with old versions of GNU libc, if you get a compile error about a ``spilled register''. Also useful for boot/rescue disks. @@ -301,7 +301,7 @@ @node Static binaries @section Using static binaries of GNU Parted -@cindex static binary +@cindex static binary @cindex unsupported platforms @cindex resizing root device @@ -320,7 +320,7 @@ @subsection Creating the Parted disk @enumerate -@item Boot your system +@item Boot your system @item Download @file{parted-static-VERSION.tgz} from @uref{ftp://ftp.gnu.org/gnu/parted/static} @item Unpack the tarball, resulting in a file called ``parted.static". @@ -329,7 +329,7 @@ @item Do a low-level format on it (on GNU/Linux this can be achieved with the tool ``fdformat" from the ``util-linux" package. - This is basically a sanity check because floppy disks often + This is basically a sanity check because floppy disks often contain bad blocks. @item Create a file system. Example: @@ -359,7 +359,7 @@ @subsection Using the Parted disk @enumerate -@item Choose a rescue disk that suits you. +@item Choose a rescue disk that suits you. @item Boot off your rescue disk. Mount the disk you copied Parted onto. @@ -383,7 +383,7 @@ @end menu @node Partitioning -@section Introduction to Partitioning +@section Introduction to Partitioning @cindex partitioning overview Unfortunately, partitioning your disk is rather complicated. This is @@ -566,7 +566,7 @@ (provided the destination partition is larger than the source partition) @item fat16, fat32 -@item linux-swap +@item linux-swap (equivalent to mkswap on destination partition) @item reiserfs (if libreiserfs is installed) @@ -918,7 +918,7 @@ completely contains all logical partitions. Note that Parted can manipulate partitions whether or not they have been -defragmented, so you do not need to defragmenting the disk before +defragmented, so you do not need to defragment the disk before using Parted. Supported file systems: @@ -1031,7 +1031,7 @@ @item raid (MS-DOS) - this flag can be enabled to tell linux the partition is a -software RAID partition. +software RAID partition. @item LVM (MS-DOS) - this flag can be enabled to tell linux the partition is a @@ -1109,59 +1109,59 @@ an unit (without any space or other character between them), in which case this unit apply instead of the default unit for this particular number, but CHS and cylinder units are not supported as -a suffix. If no suffix is given, then the default unit is assumed. +a suffix. If no suffix is given, then the default unit is assumed. Parted will compute sensible ranges for the locations you specify (e.g. a range of +/- 500 MB when you specify the location in ``G'') and will select the nearest location in this range from the one you wrote that satisfies constraints from both the operation, the filesystem being worked on, the disk label, other partitions and so on. Use the sector unit ``s'' to specify exact locations (if they -do not satisfy all onstraints, Parted will ask you for the nearest +do not satisfy all onstraints, Parted will ask you for the nearest solution). Note that negative numbers count back from the end of -the disk, with ``-1s'' pointing to the end of the disk. +the disk, with ``-1s'' pointing to the end of the disk. Example: @example @group -(parted) unit compact -(parted) print +(parted) unit compact +(parted) print Disk geometry for /dev/hda: 0kB - 123GB Disk label type: msdos Number Start End Size Type File system Flags 1 32kB 1078MB 1077MB primary reiserfs boot -2 1078MB 2155MB 1078MB primary linux-swap -3 2155MB 123GB 121GB extended -5 2155MB 7452MB 5297MB logical reiserfs +2 1078MB 2155MB 1078MB primary linux-swap +3 2155MB 123GB 121GB extended +5 2155MB 7452MB 5297MB logical reiserfs @end group @group -(parted) unit chs print +(parted) unit chs print Disk geometry for /dev/hda: 0,0,0 - 14946,225,62 BIOS cylinder,head,sector geometry: 14946,255,63. Each cylinder is 8225kB. Disk label type: msdos Number Start End Type File system Flags 1 0,1,0 130,254,62 primary reiserfs boot -2 131,0,0 261,254,62 primary linux-swap -3 262,0,0 14945,254,62 extended -5 262,2,0 905,254,62 logical reiserfs +2 131,0,0 261,254,62 primary linux-swap +3 262,0,0 14945,254,62 extended +5 262,2,0 905,254,62 logical reiserfs @end group @group -(parted) unit mb print +(parted) unit mb print Disk geometry for /dev/hda: 0MB - 122942MB Disk label type: msdos Number Start End Size Type File system Flags 1 0MB 1078MB 1077MB primary reiserfs boot -2 1078MB 2155MB 1078MB primary linux-swap -3 2155MB 122935MB 120780MB extended -5 2155MB 7452MB 5297MB logical reiserfs +2 1078MB 2155MB 1078MB primary linux-swap +3 2155MB 122935MB 120780MB extended +5 2155MB 7452MB 5297MB logical reiserfs @end group @end example @end deffn @node Related information -@chapter Related information +@chapter Related information @cindex further reading @cindex related documentation --- parted-1.8.8.git.2008.03.24.orig/doc/parted.info +++ parted-1.8.8.git.2008.03.24/doc/parted.info @@ -4,8 +4,8 @@ This file documents the use of GNU Parted, a program for creating, resizing, checking and copy partitions and file systems on them. - Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 -Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, +2008 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or @@ -28,7 +28,7 @@ destroying, resizing, checking and copying hard drive partitions, and the file systems on them. - This document applies roughly to version *1.8.8* of GNU Parted. + This document applies roughly to version *1.8.9* of GNU Parted. The original version was written by Andrew Clausen in text format. Richard M. Kreuter translated it into Texinfo format in 2002, to be @@ -805,8 +805,8 @@ extended partition completely contains all logical partitions. Note that Parted can manipulate partitions whether or not they - have been defragmented, so you do not need to defragmenting the - disk before using Parted. + have been defragmented, so you do not need to defragment the disk + before using Parted. Supported file systems: * ext2, ext3 - restriction: the new START must be the same as @@ -1557,41 +1557,41 @@  Tag Table: -Node: Top821 -Node: Introduction1708 -Node: Overview2278 -Node: Software Required4323 -Node: Supported Platforms5682 -Node: License6398 -Node: Compiling7029 -Node: Static binaries8674 -Node: Using Parted10509 -Node: Partitioning10928 -Node: Running Parted11384 -Node: Invoking Parted13925 -Node: Command explanations14597 -Node: check14967 -Node: cp15246 -Node: help16183 -Node: mklabel16457 -Ref: mklabel-Footnote-117338 -Node: mkfs17467 -Node: mkpart17963 -Node: mkpartfs19226 -Node: move20206 -Node: name21093 -Node: print21469 -Node: quit22358 -Node: rescue22853 -Node: resize24378 -Node: rm25597 -Node: select26494 -Node: set26963 -Node: unit29004 -Node: Related information32552 -Node: Copying This Manual33375 -Node: GNU Free Documentation License33619 -Node: History53496 -Node: Index54293 +Node: Top827 +Node: Introduction1714 +Node: Overview2284 +Node: Software Required4329 +Node: Supported Platforms5688 +Node: License6404 +Node: Compiling7035 +Node: Static binaries8680 +Node: Using Parted10515 +Node: Partitioning10934 +Node: Running Parted11390 +Node: Invoking Parted13931 +Node: Command explanations14603 +Node: check14973 +Node: cp15252 +Node: help16189 +Node: mklabel16463 +Ref: mklabel-Footnote-117344 +Node: mkfs17473 +Node: mkpart17969 +Node: mkpartfs19232 +Node: move20212 +Node: name21099 +Node: print21475 +Node: quit22364 +Node: rescue22859 +Node: resize24384 +Node: rm25600 +Node: select26497 +Node: set26966 +Node: unit29007 +Node: Related information32555 +Node: Copying This Manual33378 +Node: GNU Free Documentation License33622 +Node: History53499 +Node: Index54296  End Tag Table --- parted-1.8.8.git.2008.03.24.orig/aclocal.m4 +++ parted-1.8.8.git.2008.03.24/aclocal.m4 @@ -21,7 +21,7 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# serial 52 Debian 1.5.26-1 AC_PROG_LIBTOOL +# serial 52 Debian 1.5.26-4 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)