Accepting request 22019 from Base:System
Copy from Base:System/parted based on submit request 22019 from user puzel OBS-URL: https://build.opensuse.org/request/show/22019 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/parted?expand=0&rev=42
This commit is contained in:
parent
414ff5f46c
commit
d5087160f2
70
do-not-create-dm-nodes.patch
Normal file
70
do-not-create-dm-nodes.patch
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
Index: parted-1.9.0/libparted/arch/linux.c
|
||||||
|
===================================================================
|
||||||
|
--- parted-1.9.0.orig/libparted/arch/linux.c 2009-10-07 14:14:58.000000000 +0200
|
||||||
|
+++ parted-1.9.0/libparted/arch/linux.c 2009-10-07 14:22:58.000000000 +0200
|
||||||
|
@@ -30,6 +30,7 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <syscall.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
+#include <stdlib.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <dirent.h>
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
@@ -2551,29 +2552,41 @@ err:
|
||||||
|
static int
|
||||||
|
_dm_reread_part_table (PedDisk* disk)
|
||||||
|
{
|
||||||
|
- int largest_partnum = ped_disk_get_last_partition_num (disk);
|
||||||
|
- if (largest_partnum <= 0)
|
||||||
|
- return 1;
|
||||||
|
-
|
||||||
|
- int rc = 1;
|
||||||
|
- int last = PED_MIN (largest_partnum, 16);
|
||||||
|
- int i;
|
||||||
|
+ int dev_minor;
|
||||||
|
+ int dev_major;
|
||||||
|
+ struct stat dev_stat;
|
||||||
|
+ char name_buf[40];
|
||||||
|
+ FILE* f;
|
||||||
|
|
||||||
|
sync();
|
||||||
|
if (!_dm_remove_parts(disk->dev))
|
||||||
|
- rc = 0;
|
||||||
|
+ return 0;
|
||||||
|
|
||||||
|
- for (i = 1; i <= last; i++) {
|
||||||
|
- PedPartition* part;
|
||||||
|
+ /* Issue uevent for the device */
|
||||||
|
+ if (!_device_stat (disk->dev, &dev_stat))
|
||||||
|
+ return 0;
|
||||||
|
|
||||||
|
- part = ped_disk_get_partition (disk, i);
|
||||||
|
- if (!part)
|
||||||
|
- continue;
|
||||||
|
+ dev_major = major (dev_stat.st_rdev);
|
||||||
|
+ dev_minor = minor (dev_stat.st_rdev);
|
||||||
|
|
||||||
|
- if (!_dm_add_partition (disk, part))
|
||||||
|
- rc = 0;
|
||||||
|
+ snprintf (name_buf, sizeof (name_buf),
|
||||||
|
+ "/sys/dev/block/%d:%d/uevent", dev_major, dev_minor);
|
||||||
|
+
|
||||||
|
+ if ((f = fopen (name_buf, "w")) == NULL)
|
||||||
|
+ return 0;
|
||||||
|
+
|
||||||
|
+ if (fputs ("change", f) == EOF)
|
||||||
|
+ return 0;
|
||||||
|
+
|
||||||
|
+ fclose(f);
|
||||||
|
+
|
||||||
|
+ /* Wait for udev to finish */
|
||||||
|
+ if (system ("/sbin/udevadm settle") != 0) {
|
||||||
|
+ /* udevadm settle failed - let's sleep for a while */
|
||||||
|
+ sleep (2);
|
||||||
|
}
|
||||||
|
- return rc;
|
||||||
|
+
|
||||||
|
+ return 1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Oct 7 14:12:15 UTC 2009 - puzel@novell.com
|
||||||
|
|
||||||
|
- do-not-create-dm-nodes.patch (bnc#501773)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Jul 31 10:20:05 CEST 2009 - puzel@novell.com
|
Fri Jul 31 10:20:05 CEST 2009 - puzel@novell.com
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ License: GPL v3 or later
|
|||||||
Group: System/Filesystems
|
Group: System/Filesystems
|
||||||
Summary: GNU partitioner
|
Summary: GNU partitioner
|
||||||
Version: 1.9.0
|
Version: 1.9.0
|
||||||
Release: 1
|
Release: 2
|
||||||
Source0: %{name}-%{version}.tar.bz2
|
Source0: %{name}-%{version}.tar.bz2
|
||||||
Patch0: always-resize-part.dif
|
Patch0: always-resize-part.dif
|
||||||
Patch1: parted-type.patch
|
Patch1: parted-type.patch
|
||||||
@ -51,6 +51,8 @@ Patch14: do-not-discard-bootcode-in-extended-partition.patch
|
|||||||
Patch15: fix-dm-partition-name.patch
|
Patch15: fix-dm-partition-name.patch
|
||||||
#PATCH-FEATURE-OPENSUSE fix-tests.sh petr.uzel@suse.cz
|
#PATCH-FEATURE-OPENSUSE fix-tests.sh petr.uzel@suse.cz
|
||||||
Patch16: fix-tests.sh
|
Patch16: fix-tests.sh
|
||||||
|
#PATCH-FEATURE-OPENSUSE do-not-create-dm-nodes.patch bnc#501773 petr.uzel@suse.cz
|
||||||
|
Patch17: do-not-create-dm-nodes.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
Url: http://www.gnu.org/software/parted/
|
Url: http://www.gnu.org/software/parted/
|
||||||
PreReq: %install_info_prereq
|
PreReq: %install_info_prereq
|
||||||
@ -110,6 +112,7 @@ Authors:
|
|||||||
%patch14 -p1
|
%patch14 -p1
|
||||||
%patch15 -p1
|
%patch15 -p1
|
||||||
%patch16 -p1
|
%patch16 -p1
|
||||||
|
%patch17 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
AUTOPOINT=true autoreconf --force --install
|
AUTOPOINT=true autoreconf --force --install
|
||||||
|
Loading…
x
Reference in New Issue
Block a user