Hello community,

here is the log from the commit of package libguestfs for openSUSE:Factory 
checked in at 2016-07-24 19:52:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libguestfs (Old)
 and      /work/SRC/openSUSE:Factory/.libguestfs.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libguestfs"

Changes:
--------
--- /work/SRC/openSUSE:Factory/libguestfs/libguestfs.changes    2016-07-21 
08:18:36.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libguestfs.new/libguestfs.changes       
2016-07-24 19:53:13.000000000 +0200
@@ -1,0 +2,8 @@
+Wed Jul 20 19:47:22 UTC 2016 - [email protected]
+
+- appliance fixes (fate#316274):
+  * re-add helper script mount-rootfs-and-chroot.sh for virt-rescue
+    appliance.patch
+  * make guestfs-data a requirement of guestfs-tools
+
+-------------------------------------------------------------------

New:
----
  appliance.patch
  mount-rootfs-and-chroot.sh

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libguestfs.spec ++++++
--- /var/tmp/diff_new_pack.QLqpFJ/_old  2016-07-24 19:53:15.000000000 +0200
+++ /var/tmp/diff_new_pack.QLqpFJ/_new  2016-07-24 19:53:15.000000000 +0200
@@ -199,9 +199,11 @@
 License:        GPL-2.0
 Group:          System/Filesystems
 Patch0:         0000-hotfix.patch
+Patch100:       appliance.patch
 
 Source0:        %{name}-%{version}.tar.xz
 Source1:        libguestfs.rpmlintrc
+Source100:      mount-rootfs-and-chroot.sh
 Source789653:   Pod-Simple-3.23.tar.xz
 #
 Source10001:    libguestfs.test.simple.run-libugestfs-test-tool.sh
@@ -256,7 +258,7 @@
 Requires:       perl(Win::Hivex::Regedit)
 %endif
 %endif
-Recommends:     guestfs-data
+Requires:       guestfs-data
 Conflicts:      guestfs-data < %{version}
 Conflicts:      libguestfs0 < %{version}
 
@@ -558,6 +560,7 @@
 : _ignore_exclusive_arch '%{?_ignore_exclusive_arch}'
 %setup -q -a 789653
 %patch0 -p1
+%patch100 -p1
 
 %build
 bison --version
@@ -681,6 +684,14 @@
 %endif
 %endif
 
+mkdir -p $RPM_BUILD_ROOT/tmp/usr/bin
+cp %{S:100} $RPM_BUILD_ROOT/tmp/usr/bin
+chmod a+x $RPM_BUILD_ROOT/tmp/usr/bin/*
+pushd $RPM_BUILD_ROOT/tmp
+tar czf $RPM_BUILD_ROOT/%{_libdir}/guestfs/supermin.d/zz-scripts.tar.gz usr
+popd
+rm -rf $RPM_BUILD_ROOT/tmp
+
 %if %{with p2v}
 # Remove the kickstart files from p2v package
 rm $RPM_BUILD_ROOT/%{_datadir}/virt-p2v/p2v.ks.in

++++++ appliance.patch ++++++
Index: libguestfs-1.32.4/appliance/init
===================================================================
--- libguestfs-1.32.4.orig/appliance/init
+++ libguestfs-1.32.4/appliance/init
@@ -182,7 +182,9 @@ else
   echo
   echo "Note: The contents of / are the rescue appliance."
   echo "You have to mount the guest's partitions under /sysroot"
-  echo "before you can examine them."
+  echo "before you can examine them. A helper script for that exists:"
+  echo "mount-rootfs-and-chroot.sh /dev/sda2"
+
   echo
   bash -i
   echo
++++++ mount-rootfs-and-chroot.sh ++++++
#!/bin/bash
# Usage: $0 /dev/sda5
rootfs=$1
mnt=/sysroot
mounts=

if test -b "${rootfs}"
then

    mkdir -v -p "${mnt}"

    if mount -v "${rootfs}" "${mnt}"
    then

        for i in dev dev/pts proc sys selinux
        do
            if test -d /${i} && test -d "${mnt}/${i}" && test "`stat -c %D /`" 
!= "`stat -c %D ${i}`"
            then
                mount -v --bind /${i} "${mnt}/${i}"
            fi
        done

        chroot "${mnt}" su -

        while read b m rest
        do
            case "${m}" in
                ${mnt}*)
                    mounts="${m} ${mounts}"
                ;;
            esac
        done <<-EOF
`
cat < /proc/mounts
`
EOF

        for i in ${mounts}
        do
            umount -v "${i}"
        done

    fi

fi

Reply via email to