Accepting request 30481 from Base:System

Copy from Base:System/parted based on submit request 30481 from user puzel

OBS-URL: https://build.opensuse.org/request/show/30481
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/parted?expand=0&rev=45
This commit is contained in:
OBS User autobuild 2010-01-27 16:34:39 +00:00 committed by Git OBS Bridge
commit afe0e4522b
4 changed files with 59 additions and 3 deletions

View File

@ -1,9 +1,15 @@
-------------------------------------------------------------------
Mon Jan 25 15:54:17 UTC 2010 - puzel@novell.com
- use-ext-range.patch (bnc#567652)
-------------------------------------------------------------------
Thu Dec 3 14:10:59 UTC 2009 - puzel@novell.com
- avoid-unnecessary-open-close.patch,
do-not-unnecessarily-open-part-dev.patch,
fix-race-call-udevadm-settle.patch (bnc#539521)
fix-race-call-udevadm-settle.patch,
retry-blkpg-ioctl.patch (bnc#539521)
-------------------------------------------------------------------
Wed Oct 7 14:12:15 UTC 2009 - puzel@novell.com

View File

@ -1,7 +1,7 @@
#
# spec file for package parted (Version 1.9.0)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -31,7 +31,7 @@ Group: System/Filesystems
Requires: /sbin/udevadm
Summary: GNU partitioner
Version: 1.9.0
Release: 3
Release: 4
Source0: %{name}-%{version}.tar.bz2
Patch0: always-resize-part.dif
Patch1: parted-type.patch
@ -60,6 +60,10 @@ Patch18: avoid-unnecessary-open-close.patch
Patch19: do-not-unnecessarily-open-part-dev.patch
#PATCH-FIX-UPSTREAM fix-race-call-udevadm-settle.patch bnc#539521 petr.uzel@suse.cz
Patch20: fix-race-call-udevadm-settle.patch
#PATCH-FIX-UPSTREAM retry-blkpg-ioctl.patch bnc#539521 petr.uzel@suse.cz
Patch21: retry-blkpg-ioctl.patch
#PATCH-FIX-UPSTREAM use-ext-range.patch bnc#567652 petr.uzel@suse.cz
Patch22: use-ext-range.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Url: http://www.gnu.org/software/parted/
PreReq: %install_info_prereq
@ -123,6 +127,8 @@ Authors:
%patch18 -p1
%patch19 -p1
%patch20 -p1
%patch21 -p1
%patch22 -p1
%build
AUTOPOINT=true autoreconf --force --install

22
retry-blkpg-ioctl.patch Normal file
View File

@ -0,0 +1,22 @@
Index: parted-1.9.0/libparted/arch/linux.c
===================================================================
--- parted-1.9.0.orig/libparted/arch/linux.c 2010-01-25 16:24:54.000000000 +0100
+++ parted-1.9.0/libparted/arch/linux.c 2010-01-25 16:26:35.000000000 +0100
@@ -2360,8 +2360,17 @@ _disk_sync_part_table (PedDisk* disk)
int i;
for (i = 1; i <= lpn; i++) {
+ /* try to BLKPG_REMOVE the partition
+ * retry once more after short sleep if EBUSY
+ */
rets[i - 1] = _blkpg_remove_partition (disk, i);
errnums[i - 1] = errno;
+
+ if ( !rets[i - 1] && errnums[i - 1] == EBUSY ) {
+ sleep(1);
+ rets[i - 1] = _blkpg_remove_partition (disk, i);
+ errnums[i - 1] = errno;
+ }
}
for (i = 1; i <= lpn; i++) {

22
use-ext-range.patch Normal file
View File

@ -0,0 +1,22 @@
Index: parted-1.9.0/libparted/arch/linux.c
===================================================================
--- parted-1.9.0.orig/libparted/arch/linux.c 2010-01-25 16:32:09.000000000 +0100
+++ parted-1.9.0/libparted/arch/linux.c 2010-01-25 16:33:18.000000000 +0100
@@ -2296,7 +2296,7 @@ _blkpg_remove_partition (PedDisk* disk,
/*
* The number of partitions that a device can have depends on the kernel.
- * If we don't find this value in /sys/block/DEV/range, we will use our own
+ * If we don't find this value in /sys/block/DEV/ext_range, we will use our own
* value.
*/
static unsigned int
@@ -2307,7 +2307,7 @@ _device_get_partition_range(PedDevice* d
FILE* fp;
bool ok;
- r = snprintf(path, sizeof(path), "/sys/block/%s/range",
+ r = snprintf(path, sizeof(path), "/sys/block/%s/ext_range",
last_component(dev->path));
if(r < 0 || r >= sizeof(path))
return MAX_NUM_PARTS;