This commit is contained in:
parent
d9a6893f34
commit
3c98f9ad3c
105
perl-Bootloader-udevadm.patch
Normal file
105
perl-Bootloader-udevadm.patch
Normal file
@ -0,0 +1,105 @@
|
||||
--- lib/Bootloader/Core/GRUB.pm
|
||||
+++ lib/Bootloader/Core/GRUB.pm
|
||||
@@ -481,12 +481,12 @@
|
||||
}
|
||||
|
||||
# resolve symlinks.....
|
||||
- my $cmd = "udevinfo -q name -n $dev";
|
||||
+ my $cmd = "udevadm info -q name -n $dev";
|
||||
if (my $resolved_link = qx{$cmd 2> /dev/null}) {
|
||||
chomp ($resolved_link);
|
||||
$dev = "/dev/" . $resolved_link;
|
||||
}
|
||||
- $self->l_milestone ("GRUB::GrubDev2UnixDev: udevinfo returned: $dev");
|
||||
+ $self->l_milestone ("GRUB::GrubDev2UnixDev: udevadm info returned: $dev");
|
||||
|
||||
if (defined ($partition)) {
|
||||
foreach my $dev_ref (@{$self->{"partitions"}}) {
|
||||
@@ -544,7 +544,7 @@
|
||||
# need to be changed here
|
||||
my $original = $dev;
|
||||
my $kernel_dev;
|
||||
- my $cmd = "udevinfo -q name -n $dev";
|
||||
+ my $cmd = "udevadm info -q name -n $dev";
|
||||
if ($kernel_dev = qx{$cmd 2> /dev/null}) {
|
||||
chomp $kernel_dev;
|
||||
$kernel_dev = "/dev/" . $kernel_dev;
|
||||
@@ -574,8 +574,8 @@
|
||||
}
|
||||
|
||||
# get the symbolic link from udev, it might be used in device.map
|
||||
- # udevinfo returns a space separated list of strings
|
||||
- $cmd = "udevinfo -q symlink -n $kernel_dev";
|
||||
+ # udevadm info returns a space separated list of strings
|
||||
+ $cmd = "udevadm info -q symlink -n $kernel_dev";
|
||||
|
||||
my @udev_links = split (/ /, qx{$cmd 2>/dev/null});
|
||||
|
||||
@@ -2249,7 +2249,7 @@
|
||||
|
||||
#FIXME: sf@ need handling for /dev/dm-X devices here
|
||||
if ($device !~ /mapper/) {
|
||||
- my $cmd = "udevinfo -q symlink -n $device";
|
||||
+ my $cmd = "udevadm info -q symlink -n $device";
|
||||
my @udev_links = split (/ /, qx{$cmd 2>/dev/null});
|
||||
|
||||
foreach $device (@udev_links) {
|
||||
--- lib/Bootloader/Tools.pm
|
||||
+++ lib/Bootloader/Tools.pm
|
||||
@@ -241,7 +241,7 @@
|
||||
$mounted = `mount /sys`;
|
||||
}
|
||||
# FIXME: maybe useless code
|
||||
- my $cmd = "udevinfo -q name -p /block/$udev";
|
||||
+ my $cmd = "udevadm info -q name -p /block/$udev";
|
||||
my $dev = qx{ $cmd 2>/dev/null };
|
||||
chomp ($dev);
|
||||
|
||||
@@ -249,7 +249,7 @@
|
||||
$dev = "/dev/$dev";
|
||||
}
|
||||
|
||||
- # Fallback in case udevinfo fails
|
||||
+ # Fallback in case udevadm info fails
|
||||
else {
|
||||
|
||||
#If $udev consists of both device and partition - e.g. "sda/sda1" -
|
||||
@@ -654,7 +654,7 @@
|
||||
|
||||
=item
|
||||
C<< $majmin = Bootloader::Tools::Udev2MajMin($udev); >>
|
||||
-takes a udev device as reported from udevinfo
|
||||
+takes a udev device as reported from udevadm info
|
||||
returns a string containing major:minor
|
||||
|
||||
=cut
|
||||
@@ -663,7 +663,7 @@
|
||||
|
||||
my $udev_dev = shift;
|
||||
my $majmin;
|
||||
- my $cmd = "udevinfo -qpath -n $udev_dev";
|
||||
+ my $cmd = "udevadm info -qpath -n $udev_dev";
|
||||
|
||||
if (my $udev_path = qx{$cmd 2>/dev/null}){
|
||||
chomp ($udev_path);
|
||||
@@ -682,9 +682,9 @@
|
||||
|
||||
=item
|
||||
C<< $udev_dev = Bootloader::Tools::MajMin2Udev($majmin); >>
|
||||
-takes a string major:minor as reported from udevinfo
|
||||
+takes a string major:minor as reported from udevadm info
|
||||
returns a string containing the udev device as reported
|
||||
-by udevinfo
|
||||
+by udevadm info
|
||||
|
||||
=cut
|
||||
|
||||
@@ -741,7 +741,7 @@
|
||||
|
||||
=item
|
||||
C<< $dm_dev = Bootloader::Tools::DMDev2MajMin($majmin); >>
|
||||
-takes a string major:minor as reported from udevinfo
|
||||
+takes a string major:minor as reported from udevadm info
|
||||
returns a string containing the device as reported by
|
||||
dmsetup
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 24 23:02:14 CEST 2008 - ro@suse.de
|
||||
|
||||
- use udevadm info instead of udevinfo
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 19 15:46:10 CEST 2008 - jreidinger@suse.cz
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
Name: perl-Bootloader
|
||||
Version: 0.4.71
|
||||
Release: 1
|
||||
Release: 2
|
||||
Requires: perl-base = %{perl_version}
|
||||
Requires: e2fsprogs
|
||||
Recommends: perl-gettext
|
||||
@ -31,6 +31,7 @@ Summary: Library for Configuring Boot Loaders
|
||||
Source: perl-Bootloader-%{version}.tar.bz2
|
||||
Source1: update-bootloader
|
||||
Source2: bootloader_entry
|
||||
Patch: perl-Bootloader-udevadm.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
#!BuildIgnore: mdadm e2fsprogs limal-bootloader
|
||||
|
||||
@ -49,6 +50,7 @@ Authors:
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch
|
||||
|
||||
%build
|
||||
touch Makefile.PL
|
||||
@ -74,6 +76,8 @@ install -m 755 %{SOURCE2} $RPM_BUILD_ROOT/usr/lib/bootloader
|
||||
/usr/lib/bootloader
|
||||
|
||||
%changelog
|
||||
* Thu Sep 25 2008 ro@suse.de
|
||||
- use udevadm info instead of udevinfo
|
||||
* Fri Sep 19 2008 jreidinger@suse.cz
|
||||
- doesn't allow change between default and xen kernel during
|
||||
install (bnc #397075)
|
||||
|
Loading…
x
Reference in New Issue
Block a user