Include patches to fix udev.
This commit is contained in:
parent
65b8b99d0e
commit
a21344533f
@ -0,0 +1,50 @@
|
|||||||
|
From a7e4a6c692554e4207b3bdff65946427e66e9fce Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||||
|
Date: Mon, 28 May 2012 10:01:45 -0400
|
||||||
|
Subject: [PATCH 1/2] appliance: Move udev (common package name) to the common
|
||||||
|
section.
|
||||||
|
|
||||||
|
This should be just code motion.
|
||||||
|
---
|
||||||
|
appliance/packagelist.in | 4 +---
|
||||||
|
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/appliance/packagelist.in b/appliance/packagelist.in
|
||||||
|
index c4484db..980dc0e 100644
|
||||||
|
--- a/appliance/packagelist.in
|
||||||
|
+++ b/appliance/packagelist.in
|
||||||
|
@@ -40,7 +40,6 @@
|
||||||
|
reiserfs-utils
|
||||||
|
libselinux
|
||||||
|
systemd /* for /sbin/reboot */
|
||||||
|
- udev
|
||||||
|
util-linux-ng
|
||||||
|
vim-minimal
|
||||||
|
xz
|
||||||
|
@@ -64,7 +63,6 @@
|
||||||
|
ntfs-3g
|
||||||
|
ntfsprogs
|
||||||
|
reiserfsprogs
|
||||||
|
- udev
|
||||||
|
ufsutils
|
||||||
|
util-linux
|
||||||
|
vim-tiny
|
||||||
|
@@ -87,7 +85,6 @@
|
||||||
|
ntfsprogs
|
||||||
|
ntfs-3g
|
||||||
|
reiserfsprogs
|
||||||
|
- udev
|
||||||
|
util-linux-ng
|
||||||
|
xz
|
||||||
|
#endif /* ARCHLINUX */
|
||||||
|
@@ -125,6 +122,7 @@ psmisc
|
||||||
|
scrub
|
||||||
|
strace
|
||||||
|
tar
|
||||||
|
+udev
|
||||||
|
#ifndef UBUNTU
|
||||||
|
/* on Ubuntu contains a file in /lib64 which conflicts with libc6 that has
|
||||||
|
* /lib64 as a symbolic link
|
||||||
|
--
|
||||||
|
1.7.10.1
|
||||||
|
|
@ -0,0 +1,83 @@
|
|||||||
|
From a7868dd3c940b6cee0894e6033ba611f01a423dd Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||||
|
Date: Mon, 28 May 2012 16:09:15 +0100
|
||||||
|
Subject: [PATCH 2/2] appliance: 'udevd' has been renamed, since it joined
|
||||||
|
systemd.
|
||||||
|
|
||||||
|
---
|
||||||
|
appliance/init | 57 ++++++++++++++++++++++++++++----------------------------
|
||||||
|
1 file changed, 29 insertions(+), 28 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/appliance/init b/appliance/init
|
||||||
|
index 4461e30..6fac4fb 100755
|
||||||
|
--- a/appliance/init
|
||||||
|
+++ b/appliance/init
|
||||||
|
@@ -31,36 +31,37 @@ if [ ! -L /etc/init.d/udev -a -x /etc/init.d/udev ]; then
|
||||||
|
fi
|
||||||
|
elif [ -x /sbin/start_udev ] && /sbin/start_udev; then
|
||||||
|
:
|
||||||
|
-elif [ -x /sbin/udevd ]; then
|
||||||
|
- echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug
|
||||||
|
- /sbin/udevd --daemon
|
||||||
|
- udevadm trigger
|
||||||
|
- udevadm settle
|
||||||
|
-elif [ -x /lib/udev/udevd ]; then
|
||||||
|
- echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug
|
||||||
|
- /lib/udev/udevd --daemon
|
||||||
|
- udevadm trigger
|
||||||
|
- udevadm settle
|
||||||
|
else
|
||||||
|
- echo No udev, creating /dev manually
|
||||||
|
- mount -t tmpfs none /dev
|
||||||
|
- mkdir /dev/pts /dev/shm /dev/mapper
|
||||||
|
- mount -t devpts -o gid=5,mode=620 /dev/pts /dev/pts
|
||||||
|
- # Must do each MAKEDEV individually, because if one device fails,
|
||||||
|
- # MAKEDEV will quit without creating the rest (RHBZ#507374).
|
||||||
|
- for dev in mem null port zero core full ram tty console fd \
|
||||||
|
- hda hdb hdc hdd sda sdb sdc sdd loop sd; do
|
||||||
|
- MAKEDEV $dev ||:
|
||||||
|
+ # Find udevd and run it directly.
|
||||||
|
+ for f in /sbin/udevd /lib/udev/udevd /lib/systemd/systemd-udevd; do
|
||||||
|
+ if [ -x "$f" ]; then UDEVD="$f"; fi
|
||||||
|
done
|
||||||
|
- mknod /dev/ptmx c 5 2; chmod 0666 /dev/ptmx
|
||||||
|
- mknod /dev/random c 1 8; chmod 0666 /dev/random
|
||||||
|
- mknod /dev/urandom c 1 9; chmod 0444 /dev/urandom
|
||||||
|
- ln -sf /proc/self/fd/0 /dev/stdin
|
||||||
|
- ln -sf /proc/self/fd/1 /dev/stdout
|
||||||
|
- ln -sf /proc/self/fd/2 /dev/stderr
|
||||||
|
-
|
||||||
|
- modprobe virtio_pci
|
||||||
|
- modprobe virtio_net
|
||||||
|
+ if [ -n "$UDEVD" ]; then
|
||||||
|
+ echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug
|
||||||
|
+ $UDEVD --daemon
|
||||||
|
+ udevadm trigger
|
||||||
|
+ udevadm settle
|
||||||
|
+ else
|
||||||
|
+ echo No udevd, creating /dev manually.
|
||||||
|
+ mount -t tmpfs none /dev
|
||||||
|
+ mkdir /dev/pts /dev/shm /dev/mapper
|
||||||
|
+ mount -t devpts -o gid=5,mode=620 /dev/pts /dev/pts
|
||||||
|
+ # Must do each MAKEDEV individually, because if one device fails,
|
||||||
|
+ # MAKEDEV will quit without creating the rest (RHBZ#507374).
|
||||||
|
+ for dev in mem null port zero core full ram tty console fd \
|
||||||
|
+ hda hdb hdc hdd sda sdb sdc sdd loop sd; do
|
||||||
|
+ MAKEDEV $dev ||:
|
||||||
|
+ done
|
||||||
|
+ mknod /dev/ptmx c 5 2; chmod 0666 /dev/ptmx
|
||||||
|
+ mknod /dev/random c 1 8; chmod 0666 /dev/random
|
||||||
|
+ mknod /dev/urandom c 1 9; chmod 0444 /dev/urandom
|
||||||
|
+ ln -sf /proc/self/fd/0 /dev/stdin
|
||||||
|
+ ln -sf /proc/self/fd/1 /dev/stdout
|
||||||
|
+ ln -sf /proc/self/fd/2 /dev/stderr
|
||||||
|
+
|
||||||
|
+ modprobe virtio_pci
|
||||||
|
+ modprobe virtio_net
|
||||||
|
+ fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if grep -sq selinux=1 /proc/cmdline; then
|
||||||
|
--
|
||||||
|
1.7.10.1
|
||||||
|
|
11
libguestfs-1.19.2-remove-udev-from-packagelist.patch
Normal file
11
libguestfs-1.19.2-remove-udev-from-packagelist.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- libguestfs/appliance/packagelist.in.orig 2012-05-28 16:44:31.259942705 +0100
|
||||||
|
+++ libguestfs/appliance/packagelist.in 2012-05-28 16:44:33.919892387 +0100
|
||||||
|
@@ -122,7 +122,7 @@
|
||||||
|
scrub
|
||||||
|
strace
|
||||||
|
tar
|
||||||
|
-udev
|
||||||
|
+/*udev*/
|
||||||
|
#ifndef UBUNTU
|
||||||
|
/* on Ubuntu contains a file in /lib64 which conflicts with libc6 that has
|
||||||
|
* /lib64 as a symbolic link
|
@ -22,7 +22,7 @@ Summary: Access and modify virtual machine disk images
|
|||||||
Name: libguestfs
|
Name: libguestfs
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 1.19.2
|
Version: 1.19.2
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
URL: http://libguestfs.org/
|
URL: http://libguestfs.org/
|
||||||
@ -34,6 +34,16 @@ Patch1: ruby-1.9-vendor-not-site.patch
|
|||||||
BuildRequires: autoconf, automake, libtool, gettext-devel
|
BuildRequires: autoconf, automake, libtool, gettext-devel
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# Upstream patches to fix udev since it was moved into systemd.
|
||||||
|
Patch2: 0001-appliance-Move-udev-common-package-name-to-the-commo.patch
|
||||||
|
Patch3: 0002-appliance-udevd-has-been-renamed-since-it-joined-sys.patch
|
||||||
|
|
||||||
|
# Non-upstream patch to remove udev from the packagelist. systemd now
|
||||||
|
# 'obsoletes' udev, but febootstrap doesn't get this relationship
|
||||||
|
# right. When udev disappears from the repository we can remove this
|
||||||
|
# patch.
|
||||||
|
Patch4: libguestfs-1.19.2-remove-udev-from-packagelist.patch
|
||||||
|
|
||||||
%if 0%{?rhel} >= 7
|
%if 0%{?rhel} >= 7
|
||||||
ExclusiveArch: x86_64
|
ExclusiveArch: x86_64
|
||||||
%endif
|
%endif
|
||||||
@ -676,6 +686,10 @@ for %{name}.
|
|||||||
autoreconf -i
|
autoreconf -i
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%patch2 -p1
|
||||||
|
%patch3 -p1
|
||||||
|
%patch4 -p1
|
||||||
|
|
||||||
mkdir -p daemon/m4
|
mkdir -p daemon/m4
|
||||||
|
|
||||||
# Replace developer-specific README that ships with libguestfs, with
|
# Replace developer-specific README that ships with libguestfs, with
|
||||||
@ -1082,6 +1096,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon May 28 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.2-2
|
||||||
|
- Include patches to fix udev.
|
||||||
|
|
||||||
* Mon May 28 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.2-1
|
* Mon May 28 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.19.2-1
|
||||||
- New upstream version 1.19.2.
|
- New upstream version 1.19.2.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user