[Parted-commits] GNU Parted Official Repository: Changes to 'debian/master'
Otavio Salvador
otavio at alioth.debian.org
Thu Apr 24 18:29:30 UTC 2008
configure.ac | 4 +-
debian/changelog | 14 +++++++
debian/libparted-dev.files | 6 +++
debian/libparted-i18n.files | 1
debian/rules | 6 +--
include/parted/disk.h | 7 ++-
libparted/disk.c | 2 +
libparted/labels/gpt.c | 34 +++++++++++++++++-
tests/Makefile.am | 3 +
tests/t5000-tags.sh | 81 ++++++++++++++++++++++++++++++++++++++++++++
10 files changed, 147 insertions(+), 11 deletions(-)
New commits:
commit 3f077208393eded8349ce66a1aa1f94307ae4c1c
Author: Otavio Salvador <otavio at ossystems.com.br>
Date: Thu Apr 24 15:29:41 2008 -0300
Ensure that autoreconf uses aclocal 1.0
diff --git a/debian/rules b/debian/rules
index 6d36960..f2f14c9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -157,7 +157,7 @@ packaging-files: $(GENFILES)
autotools-update: autotools-update-stamp
autotools-update-stamp: patch-stamp
- AUTOMAKE=automake-1.10 autoreconf
+ AUTOMAKE=automake-1.10 ACLOCAL=aclocal-1.10 autoreconf
touch $@
build-deb/config.status: autotools-update-stamp
commit fd6d78c98fe1b9e758f27a2b67fde91d80b04cdd
Author: Otavio Salvador <otavio at ossystems.com.br>
Date: Sat Apr 12 16:22:18 2008 -0300
Release 1.8.8.git.2008.03.24-3
diff --git a/debian/changelog b/debian/changelog
index 7474a3f..f860793 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,17 @@
+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 <otavio at ossystems.com.br> Sat, 12 Apr 2008 16:18:46 -0300
+
parted (1.8.8.git.2008.03.24-2) experimental; urgency=low
[ Bastian Blank ]
commit 7e46a3964089804bfa1b4e4e0149ed948fe5f4c2
Author: Otavio Salvador <otavio at ossystems.com.br>
Date: Sat Apr 12 16:14:33 2008 -0300
Bump version to 1.8.9 since it broke ABI interface
diff --git a/configure.ac b/configure.ac
index a6be2e6..9f0971b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,7 +5,7 @@ dnl
dnl This file may be modified and/or distributed without restriction.
AC_PREREQ(2.61)
-AC_INIT([GNU parted],[1.8.8],[bug-parted at gnu.org])
+AC_INIT([GNU parted],[1.8.9],[bug-parted at gnu.org])
AC_CONFIG_SRCDIR(include/parted/parted.h)
@@ -24,7 +24,7 @@ dnl function signatures changed),
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=
commit c003e4d0eae5331ec1938a4f465223bbfcf2bc39
Author: Otavio Salvador <otavio at ossystems.com.br>
Date: Sat Apr 12 16:05:53 2008 -0300
Ensure that autoreconf uses automake 1.10
diff --git a/debian/rules b/debian/rules
index ecba42b..6d36960 100755
--- a/debian/rules
+++ b/debian/rules
@@ -157,7 +157,7 @@ packaging-files: $(GENFILES)
autotools-update: autotools-update-stamp
autotools-update-stamp: patch-stamp
- autoreconf
+ AUTOMAKE=automake-1.10 autoreconf
touch $@
build-deb/config.status: autotools-update-stamp
commit 17b21e950a69509acbb4713be7cef451278d1d0c
Author: Otavio Salvador <otavio at ossystems.com.br>
Date: Sat Apr 12 12:50:21 2008 -0300
Add debian/libparted-i18n.files and debian/libparted-dev.files removed by mistake
diff --git a/debian/libparted-dev.files b/debian/libparted-dev.files
new file mode 100644
index 0000000..218a0a0
--- /dev/null
+++ b/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
+
diff --git a/debian/libparted-i18n.files b/debian/libparted-i18n.files
new file mode 100644
index 0000000..3635480
--- /dev/null
+++ b/debian/libparted-i18n.files
@@ -0,0 +1 @@
+usr/share/locale
commit 5903e4f22f109946361417673828bbc842956ead
Author: Otavio Salvador <otavio at ossystems.com.br>
Date: Sat Apr 12 12:39:28 2008 -0300
Change soname and dependency requirements due ABI change
diff --git a/debian/rules b/debian/rules
index edbd0f9..ecba42b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -39,11 +39,11 @@ LIBPKGVER = 1.8
# 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-1
+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 = 8
+LIBSONAME = 9
# This is for the version for the shared library
SHAREDLIBPKGVER = $(LIBPKGVER)-$(LIBSONAME)
commit fe6724aae9b1e84258cd1b7a32cddc9c17d5ac4e
Author: Robert Millan <rmh at aybabtu.com>
Date: Mon Feb 25 21:51:13 2008 +0100
Add support for GRUB / BIOS partition in GPT.
diff --git a/include/parted/disk.h b/include/parted/disk.h
index b82ea0f..1b0133d 100644
--- a/include/parted/disk.h
+++ b/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 @@ enum _PedPartitionFlag {
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 */
diff --git a/libparted/disk.c b/libparted/disk.c
index 52095d0..c465d40 100644
--- a/libparted/disk.c
+++ b/libparted/disk.c
@@ -2162,6 +2162,8 @@ ped_partition_flag_get_name (PedPartitionFlag flag)
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:
diff --git a/libparted/labels/gpt.c b/libparted/labels/gpt.c
index 4dc4f10..cb90d11 100644
--- a/libparted/labels/gpt.c
+++ b/libparted/labels/gpt.c
@@ -4,7 +4,7 @@
original version by Matt Domsch <Matt_Domsch at dell.com>
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 @@ typedef struct {
((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 @@ typedef struct _GPTPartitionData {
int lvm;
int raid;
int boot;
+ int bios_grub;
int hp_service;
int hidden;
int msftres;
@@ -753,13 +758,16 @@ _parse_part_entry (PedDisk* disk, GuidPartitionEntry_t* pte)
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_partition_new (const PedDisk* disk,
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_partition_set_system (PedPartition* part, const PedFileSystemType* fs_type)
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 @@ gpt_partition_set_flag(PedPartition *part,
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 @@ gpt_partition_set_flag(PedPartition *part,
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 @@ gpt_partition_set_flag(PedPartition *part,
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_partition_set_flag(PedPartition *part,
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_partition_set_flag(PedPartition *part,
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 @@ gpt_partition_get_flag(const PedPartition *part, PedPartitionFlag flag)
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 @@ gpt_partition_is_flag_available(const PedPartition * part,
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:
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 0a42a8d..06fc397 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -6,7 +6,8 @@ TESTS = \
t1500-small-ext2.sh \
t2000-mkfs.sh \
t3000-constraints.sh \
- t3100-resize-ext2-partion.sh
+ t3100-resize-ext2-partion.sh \
+ t5000-tags.sh
EXTRA_DIST = \
$(TESTS) test-lib.sh mkdtemp
diff --git a/tests/t5000-tags.sh b/tests/t5000-tags.sh
new file mode 100755
index 0000000..dab48ae
--- /dev/null
+++ b/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 <http://www.gnu.org/licenses/>.
+
+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 <<EOF
+Model: (file)
+Disk .../$dev: 65.5kB
+Sector size (logical/physical): 512B/512B
+Partition Table: gpt
+
+Number Start End Size File system Name Flags
+ 1 17.4kB 48.6kB 31.2kB primary
+
+Model: (file)
+Disk .../$dev: 65.5kB
+Sector size (logical/physical): 512B/512B
+Partition Table: gpt
+
+Number Start End Size File system Name Flags
+ 1 17.4kB 48.6kB 31.2kB primary bios_grub
+
+EOF
+} > 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
More information about the Parted-commits
mailing list