From 35b079cbb44a7a8dadb62659cb14b03deb07e03f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 1 Feb 2011 16:15:20 +0000 Subject: [PATCH] - Add temporary non-upstream patch to fix /etc/mtab. See: https://www.redhat.com/archives/libguestfs/2011-February/msg00006.html --- ...etc-mtab-to-be-a-symlink-to-proc-mou.patch | 35 +++++++++++++++++++ ...for-etc-mtab-to-be-updated-print-con.patch | 25 ------------- libguestfs.spec | 11 ++++-- 3 files changed, 43 insertions(+), 28 deletions(-) create mode 100644 0001-appliance-Force-etc-mtab-to-be-a-symlink-to-proc-mou.patch delete mode 100644 0001-hack-Allow-time-for-etc-mtab-to-be-updated-print-con.patch diff --git a/0001-appliance-Force-etc-mtab-to-be-a-symlink-to-proc-mou.patch b/0001-appliance-Force-etc-mtab-to-be-a-symlink-to-proc-mou.patch new file mode 100644 index 0000000..2190459 --- /dev/null +++ b/0001-appliance-Force-etc-mtab-to-be-a-symlink-to-proc-mou.patch @@ -0,0 +1,35 @@ +From 522da71ebdbca3b69978292a818b9317905a7d3c Mon Sep 17 00:00:00 2001 +From: Richard W.M. Jones +Date: Wed, 2 Feb 2011 18:33:25 +0000 +Subject: [PATCH] appliance: Force /etc/mtab to be a symlink to /proc/mounts + +Since Fedora util-linux 2.19, the %post script has done: + + rm -f /etc/mtab + ln -s /proc/mounts /etc/mtab + +We now parse /etc/mtab, and it seems to be a good idea in +general to make it work like this. +--- + appliance/init | 5 +++++ + 1 files changed, 5 insertions(+), 0 deletions(-) + +diff --git a/appliance/init b/appliance/init +index 4a9476d..207aa79 100755 +--- a/appliance/init ++++ b/appliance/init +@@ -16,6 +16,11 @@ rm -f /proc; mkdir /proc + mount -t proc /proc /proc + mount -t sysfs /sys /sys + ++# util-linux >= 2.19 %post script does this. It seems to ++# be a good idea in general. ++rm -f /etc/mtab ++ln -s /proc/mounts /etc/mtab ++ + if [ ! -L /etc/init.d/udev -a -x /etc/init.d/udev ]; then + if type service >/dev/null 2>&1; then + service udev start +-- +1.7.3.5 + diff --git a/0001-hack-Allow-time-for-etc-mtab-to-be-updated-print-con.patch b/0001-hack-Allow-time-for-etc-mtab-to-be-updated-print-con.patch deleted file mode 100644 index 70f9f59..0000000 --- a/0001-hack-Allow-time-for-etc-mtab-to-be-updated-print-con.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 529d2f57621a3a525759ca9c09f605f2f2f1ae66 Mon Sep 17 00:00:00 2001 -From: Richard W.M. Jones -Date: Tue, 1 Feb 2011 13:34:20 +0000 -Subject: [PATCH] hack: Allow time for /etc/mtab to be updated, print contents. - ---- - images/guest-aux/make-windows-img.sh | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) - -diff --git a/images/guest-aux/make-windows-img.sh b/images/guest-aux/make-windows-img.sh -index 5a0cd6d..ee464ac 100755 ---- a/images/guest-aux/make-windows-img.sh -+++ b/images/guest-aux/make-windows-img.sh -@@ -39,6 +39,8 @@ mkfs ntfs /dev/sda2 - - # Enough to fool inspection API. - mount-options "" /dev/sda2 / -+sleep 5 -+debug sh "cat /etc/mtab" - mkdir-p /Windows/System32/Config - - upload guest-aux/windows-software /Windows/System32/Config/SOFTWARE --- -1.7.3.5 - diff --git a/libguestfs.spec b/libguestfs.spec index 022e655..31b5051 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -30,7 +30,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.9.7 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPLv2+ Group: Development/Libraries URL: http://libguestfs.org/ @@ -40,7 +40,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root # Disable FUSE tests, not supported in Koji at the moment. Patch0: libguestfs-1.7.13-no-fuse-test.patch -Patch1: 0001-hack-Allow-time-for-etc-mtab-to-be-updated-print-con.patch +# Temporary non-upstream patch to fix /etc/mtab. +# See: https://www.redhat.com/archives/libguestfs/2011-February/msg00006.html +Patch1: 0001-appliance-Force-etc-mtab-to-be-a-symlink-to-proc-mou.patch # Basic build requirements: BuildRequires: /usr/bin/pod2man @@ -760,9 +762,12 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Feb 2 2011 Richard W.M. Jones - 1:1.9.7-4 +- Add temporary non-upstream patch to fix /etc/mtab. + See: https://www.redhat.com/archives/libguestfs/2011-February/msg00006.html + * Tue Feb 1 2011 Richard W.M. Jones - 1:1.9.7-3 - Enable trace in 'make check' section. -- Add hack to track down problem in is_root_mounted (only affects Koji). * Sun Jan 30 2011 Richard W.M. Jones - 1:1.9.7-1 - New upstream version 1.9.7.