Add patch for new parted PED_DISK_GPT_PMBR_BOOT flag
This commit is contained in:
parent
29abf9759e
commit
60646ab6a7
@ -0,0 +1,53 @@
|
|||||||
|
From f017d3197bd063af62cc7f380edbd8fa0a70705a Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Brian C. Lane" <bcl@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
|
||||||
|
|
@ -1,16 +1,18 @@
|
|||||||
Summary: Python module for GNU parted
|
Summary: Python module for GNU parted
|
||||||
Name: pyparted
|
Name: pyparted
|
||||||
Version: 3.8
|
Version: 3.8
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
URL: http://fedorahosted.org/pyparted
|
URL: http://fedorahosted.org/pyparted
|
||||||
|
|
||||||
Source0: http://fedorahosted.org/releases/p/y/%{name}/%{name}-%{version}.tar.gz
|
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)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
|
||||||
BuildRequires: python-devel
|
BuildRequires: python-devel
|
||||||
BuildRequires: parted-devel >= 3.0
|
BuildRequires: parted-devel >= 3.0-6
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -19,6 +21,7 @@ partition tables.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
@ -38,6 +41,9 @@ rm -rf %{buildroot}
|
|||||||
%{python_sitearch}/%{name}-%{version}-*.egg-info
|
%{python_sitearch}/%{name}-%{version}-*.egg-info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Feb 02 2012 Brian C. Lane <bcl@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@lists.fedoraproject.org> - 3.8-2
|
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.8-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user