[pyparted] Add patch for new parted PED_DISK_GPT_PMBR_BOOT flag
Brian C. Lane
bcl at fedoraproject.org
Thu Feb 2 22:14:14 UTC 2012
commit 60646ab6a762eb151e8181fdcc947e0dd5ef177d
Author: Brian C. Lane <bcl at redhat.com>
Date: Thu Feb 2 14:12:45 2012 -0800
Add patch for new parted PED_DISK_GPT_PMBR_BOOT flag
...-for-new-disk-flag-PED_DISK_GPT_PMBR_BOOT.patch | 53 ++++++++++++++++++++
pyparted.spec | 10 +++-
2 files changed, 61 insertions(+), 2 deletions(-)
---
diff --git a/0001-Add-support-for-new-disk-flag-PED_DISK_GPT_PMBR_BOOT.patch b/0001-Add-support-for-new-disk-flag-PED_DISK_GPT_PMBR_BOOT.patch
new file mode 100644
index 0000000..62f968d
--- /dev/null
+++ b/0001-Add-support-for-new-disk-flag-PED_DISK_GPT_PMBR_BOOT.patch
@@ -0,0 +1,53 @@
+From f017d3197bd063af62cc7f380edbd8fa0a70705a Mon Sep 17 00:00:00 2001
+From: "Brian C. Lane" <bcl at redhat.com>
+Date: Tue, 31 Jan 2012 13:26:28 -0800
+Subject: [PATCH] Add support for new disk flag PED_DISK_GPT_PMBR_BOOT
+
+parted can now set the boot flag on the GPT PMBR parition. Add support
+for this new disk flag.
+---
+ src/_pedmodule.c | 1 +
+ src/parted/__init__.py | 1 +
+ tests/test__ped_disk.py | 2 +-
+ 3 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/src/_pedmodule.c b/src/_pedmodule.c
+index 8604556..ab38b1c 100644
+--- a/src/_pedmodule.c
++++ b/src/_pedmodule.c
+@@ -512,6 +512,7 @@ PyMODINIT_FUNC init_ped(void) {
+ PyModule_AddIntConstant(m, "PARTITION_LEGACY_BOOT", PED_PARTITION_LEGACY_BOOT);
+
+ PyModule_AddIntConstant(m, "DISK_CYLINDER_ALIGNMENT", PED_DISK_CYLINDER_ALIGNMENT);
++ PyModule_AddIntConstant(m, "DISK_GPT_PMBR_BOOT", PED_DISK_GPT_PMBR_BOOT);
+
+ PyModule_AddIntConstant(m, "DISK_TYPE_EXTENDED", PED_DISK_TYPE_EXTENDED);
+ PyModule_AddIntConstant(m, "DISK_TYPE_PARTITION_NAME", PED_DISK_TYPE_PARTITION_NAME);
+diff --git a/src/parted/__init__.py b/src/parted/__init__.py
+index 5ca37e8..9fcd63d 100644
+--- a/src/parted/__init__.py
++++ b/src/parted/__init__.py
+@@ -117,6 +117,7 @@ from _ped import PARTITION_DIAG
+ from _ped import PARTITION_LEGACY_BOOT
+
+ from _ped import DISK_CYLINDER_ALIGNMENT
++from _ped import DISK_GPT_PMBR_BOOT
+
+ from _ped import DISK_TYPE_EXTENDED
+ from _ped import DISK_TYPE_PARTITION_NAME
+diff --git a/tests/test__ped_disk.py b/tests/test__ped_disk.py
+index df92d51..cdd59d4 100755
+--- a/tests/test__ped_disk.py
++++ b/tests/test__ped_disk.py
+@@ -143,7 +143,7 @@ class DiskIsFlagAvailableTestCase(RequiresDisk):
+ # We don't know which flags should be available and which shouldn't,
+ # but we can at least check that there aren't any tracebacks from
+ # trying all of the valid ones.
+- for flag in [_ped.DISK_CYLINDER_ALIGNMENT]:
++ for flag in [_ped.DISK_CYLINDER_ALIGNMENT, _ped.DISK_GPT_PMBR_BOOT]:
+ self.assertTrue(isinstance(self._disk.is_flag_available(flag), bool))
+
+ # However, an invalid flag should definitely not be available.
+--
+1.7.6.5
+
diff --git a/pyparted.spec b/pyparted.spec
index 2f7e4f2..27e6966 100644
--- a/pyparted.spec
+++ b/pyparted.spec
@@ -1,16 +1,18 @@
Summary: Python module for GNU parted
Name: pyparted
Version: 3.8
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv2+
Group: System Environment/Libraries
URL: http://fedorahosted.org/pyparted
Source0: http://fedorahosted.org/releases/p/y/%{name}/%{name}-%{version}.tar.gz
+Patch1: 0001-Add-support-for-new-disk-flag-PED_DISK_GPT_PMBR_BOOT.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
BuildRequires: python-devel
-BuildRequires: parted-devel >= 3.0
+BuildRequires: parted-devel >= 3.0-6
BuildRequires: pkgconfig
%description
@@ -19,6 +21,7 @@ partition tables.
%prep
%setup -q
+%patch1 -p1
%build
make %{?_smp_mflags}
@@ -38,6 +41,9 @@ rm -rf %{buildroot}
%{python_sitearch}/%{name}-%{version}-*.egg-info
%changelog
+* Thu Feb 02 2012 Brian C. Lane <bcl at redhat.com> - 3.8-3
+- Add patch for new parted PED_DISK_GPT_PMBR_BOOT flag
+
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
More information about the scm-commits
mailing list