[libguestfs] - Add temporary non-upstream patch to fix /etc/mtab. See: https://www.redhat.com/archives/libguest

Richard W.M. Jones rjones at fedoraproject.org
Wed Feb 2 18:53:55 UTC 2011


commit 35b079cbb44a7a8dadb62659cb14b03deb07e03f
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Tue Feb 1 16:15:20 2011 +0000

    - Add temporary non-upstream patch to fix /etc/mtab.
      See: https://www.redhat.com/archives/libguestfs/2011-February/msg00006.html

 ...orce-etc-mtab-to-be-a-symlink-to-proc-mou.patch |   35 ++++++++++++++++++++
 ...time-for-etc-mtab-to-be-updated-print-con.patch |   25 --------------
 libguestfs.spec                                    |   11 ++++--
 3 files changed, 43 insertions(+), 28 deletions(-)
---
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 <rjones at redhat.com>
+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/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 <rjones at redhat.com> - 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 <rjones at redhat.com> - 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 <rjones at redhat.com> - 1:1.9.7-1
 - New upstream version 1.9.7.


More information about the scm-commits mailing list