From: Richard W.M. Jones <"Richard W.M. Jones "> Date: Tue, 20 Jan 2009 18:50:02 +0000 (+0000) Subject: Fix bug where virt-p2v couldn't mount root if not on LVM. X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=121fdfdccc5425f7965bb210f197e33ac047d5b7;p=virt-p2v.git Fix bug where virt-p2v couldn't mount root if not on LVM. Rebase to Fedora 10. Version 0.9.9. --- 121fdfdccc5425f7965bb210f197e33ac047d5b7 diff --cc MANIFEST index 984f0cd,984f0cd..86c0540 --- a/MANIFEST +++ b/MANIFEST @@@ -47,6 -47,6 +47,7 @@@ po/pl.p po/POTFILES po/pt_BR.po po/virt-p2v.pot ++po/zh_CN.po README README.developers TODO diff --cc configure.ac index a3b7ff9,a3b7ff9..3d2c46f --- a/configure.ac +++ b/configure.ac @@@ -16,7 -16,7 +16,7 @@@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA dnl Process this file with autoconf to produce a configure script. --AC_INIT(virt-p2v,0.9.8) ++AC_INIT(virt-p2v,0.9.9) AC_PROG_INSTALL @@@ -45,7 -45,7 +45,7 @@@ AC_ARG_ENABLE([cd-base] [AS_HELP_STRING([--enable-cd-base], [set base Fedora for CD @<:@default=8@:>@])], [CD_BASE=$enableval], -- [CD_BASE=9]) ++ [CD_BASE=10]) AC_ARG_ENABLE([cd-base-url], [AS_HELP_STRING([--enable-cd-base-url], [set download URL for packages])], diff --cc p2v.ks.in index 4010439,4010439..116a04f --- a/p2v.ks.in +++ b/p2v.ks.in @@@ -132,6 -132,6 +132,12 @@@ cp -a $INSTALL_ROOT/etc/lvm $INSTALL_RO install -m 0644 -o root -g root @abs_top_srcdir@/lvm.conf \ $INSTALL_ROOT/etc/lvm.new ++# Overwrite /etc/event.d/tty1 (normally from initscripts). ++install -m 0644 -o root -g root @abs_top_srcdir@/tty1 $INSTALL_ROOT/etc/event.d/ ++ ++# Also /etc/inittab (from initscripts). ++install -m 0644 -o root -g root @abs_top_srcdir@/inittab $INSTALL_ROOT/etc/ ++ # Copy everything under extras to the squashfs /extras. cp -a @abs_top_srcdir@/extras $INSTALL_ROOT/extras diff --cc virt-p2v index 67cd4cf,67cd4cf..29228b2 --- a/virt-p2v +++ b/virt-p2v @@@ -1820,7 -1820,7 +1820,9 @@@ let rec main ttyname (match config_root_filesystem with | Part (dev, p) -> let snapshot_dev = snapshot_name dev in -- sh ("mount " ^ quote ("/dev/mapper/" ^ snapshot_dev) ^ " /mnt/root") ++ sh ("mount " ++ ^ quote ("/dev/mapper/" ^ snapshot_dev ^ p) ++ ^ " /mnt/root") | (LV _) as lv -> (* The LV will be backed by a snapshot device, so just mount @@@ -2051,7 -2051,7 +2053,7 @@@ with Not_found -> assert false (* internal error *) in let () = -- printf (f_ "\nSending /dev/%s (%.3f GB) to remote machine\n\n%!") ++ printf (f_ "\nSending %s (%.3f GB) to remote machine\n\n%!") (dev_of_block_device origin_dev) ((Int64.to_float size) /. (1024.*.1024.*.1024.)) in diff --cc virt-p2v.spec.in index 8cbcfa0,8cbcfa0..15d7300 --- a/virt-p2v.spec.in +++ b/virt-p2v.spec.in @@@ -54,8 -54,8 +54,6 @@@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/ mkdir -p $RPM_BUILD_ROOT%{_datadir}/locale install -m 0755 virt-p2v virt-p2v-update-wrapper iso-attach \ $RPM_BUILD_ROOT%{_bindir} --install -m 0644 inittab $RPM_BUILD_ROOT%{_sysconfdir} --install -m 0644 tty1 $RPM_BUILD_ROOT%{_sysconfdir}/event.d make -C po install PODIR=$RPM_BUILD_ROOT%{_datadir}/locale @@@ -66,8 -66,8 +64,6 @@@ rm -rf $RPM_BUILD_ROO %files %defattr(-,root,root,-) %{_bindir}/* --%{_sysconfdir}/inittab --%{_sysconfdir}/event.d/tty1 %{_datadir}/locale/*