[PATCH] Set DISTRO to SUSE if /etc/SuSE-release exists
by Olaf Hering
Signed-off-by: Olaf Hering <olaf(a)aepfle.de>
---
not compile-tested.
configure.ac | 3 +++
1 file changed, 3 insertions(+)
diff --git a/configure.ac b/configure.ac
index 71f7b06..2db9593 100644
--- a/configure.ac
+++ b/configure.ac
@@ -519,6 +519,9 @@ fi
if test -f /etc/arch-release; then
DISTRO=ARCHLINUX
fi
+if test -f /etc/SuSE-release; then
+ DISTRO=SUSE
+fi
AC_MSG_RESULT([$DISTRO])
AC_SUBST([DISTRO])
11 years, 6 months
Problem inspecting Windows images with large registry hives
by Todd Mummert
Encountered the following problem and would like to know if this is a known
issue, whether there's a fix, or workaround:
Using libguestfs and the python bindings to inspect VMs. Fairly
successfully for the most part, but had one Windows image today that fails
in the following manner.
File "/usr/lib/python2.7/site-packages/guestfs.py", line 910, in
inspect_os
r = libguestfsmod.inspect_os (self._o)
RuntimeError: size of /Windows/System32/config/SOFTWARE is unreasonably
large (141819904 bytes)
Reproduced it with guestfish:
[root@cagedbird images]# guestfish --ro -i -a
windows-2008-r2-base+updates-20120518.img
libguestfs: error: size of /Windows/System32/config/SOFTWARE is
unreasonably large (141819904 bytes)
[root@cagedbird images]# guestfish --version
guestfish 1.18.12fedora=17,release=3.fc17
Unfortunately, because of this bounds check, preliminary inspection fails.
Bug, or as designed?
Thanks,
Todd
11 years, 6 months
Python fix
by Hilko Bengen
This is the same fix I posted a few days ago for hivex
(<1369351909-23821-3-git-send-email-bengen(a)hilluzination.de>).
Cheers,
-Hilko
11 years, 6 months
[PATCH 1/2] Revert "perl: Fix build and test to work with separated builds."
by Hilko Bengen
This reverts commit 4ea016dae96ed4fc3ca6d057f17fde9697f0e627.
---
.gitignore | 1 -
configure.ac | 2 --
perl/Makefile.PL.in | 6 +++---
perl/Makefile.am | 14 ++------------
perl/run-perl-tests | 21 +++++++++++++++++++++
perl/run-perl-tests.in | 21 ---------------------
run.in | 4 ++--
7 files changed, 28 insertions(+), 41 deletions(-)
create mode 100755 perl/run-perl-tests
delete mode 100755 perl/run-perl-tests.in
diff --git a/.gitignore b/.gitignore
index 135e80b..bf9d280 100644
--- a/.gitignore
+++ b/.gitignore
@@ -287,7 +287,6 @@ Makefile.in
/perl/MYMETA.json
/perl/MYMETA.yml
/perl/pm_to_blib
-/perl/run-perl-tests
/php/extension/acinclude.m4
/php/extension/aclocal.m4
/php/extension/autom4te.cache
diff --git a/configure.ac b/configure.ac
index d1f91ab..32eb255 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1557,8 +1557,6 @@ AC_CONFIG_FILES([appliance/libguestfs-make-fixed-appliance],
[chmod +x,-w appliance/libguestfs-make-fixed-appliance])
AC_CONFIG_FILES([inspector/test-xmllint.sh],
[chmod +x,-w inspector/test-xmllint.sh])
-AC_CONFIG_FILES([perl/run-perl-tests],
- [chmod +x,-w perl/run-perl-tests])
AC_CONFIG_FILES([pick-guests.pl],
[chmod +x,-w pick-guests.pl])
AC_CONFIG_FILES([podwrapper.pl],
diff --git a/perl/Makefile.PL.in b/perl/Makefile.PL.in
index 4f12bc0..59b00d6 100644
--- a/perl/Makefile.PL.in
+++ b/perl/Makefile.PL.in
@@ -19,13 +19,13 @@ use Config;
use ExtUtils::MakeMaker;
WriteMakefile (
- FIRST_MAKEFILE => '@abs_builddir@/Makefile-pl',
+ FIRST_MAKEFILE => 'Makefile-pl',
NAME => 'Sys::Guestfs',
VERSION => '0.@MAX_PROC_NR@',
- LIBS => '-L@abs_top_builddir(a)/src/.libs -lguestfs',
- INC => '-I@abs_top_builddir@/src -I@abs_top_srcdir@/src',
+ LIBS => '-L@top_builddir(a)/src/.libs -lguestfs',
+ INC => '-I@top_builddir@/src -I@top_srcdir@/src',
TYPEMAPS => [ '@srcdir@/typemap' ],
CCFLAGS => $Config{ccflags} . ' -DGUESTFS_PRIVATE=1 @CFLAGS@',
);
diff --git a/perl/Makefile.am b/perl/Makefile.am
index 780024f..7b8f5d3 100644
--- a/perl/Makefile.am
+++ b/perl/Makefile.am
@@ -64,20 +64,10 @@ TESTS_ENVIRONMENT = $(top_builddir)/run --test
INSTALLDIRS = site
all: Makefile-pl src_deps
- $(MAKE) -C $(srcdir) -f $(abs_builddir)/Makefile-pl \
- INST_ARCHLIB=$(abs_builddir)/blib/arch \
- INST_SCRIPT=$(abs_builddir)/blib/script \
- INST_BIN=$(abs_builddir)/blib/bin \
- INST_LIB=$(abs_builddir)/blib/lib \
- INST_MAN1DIR=$(abs_builddir)/blib/man1 \
- INST_MAN3DIR=$(abs_builddir)/blib/man3 \
- TEST_FILES=$(abs_srcdir)/t/*.t
+ $(MAKE) -f Makefile-pl
Makefile-pl: Makefile.PL
- cd $(srcdir); \
- perl $(abs_builddir)/Makefile.PL \
- INSTALLDIRS=$(INSTALLDIRS) PREFIX=$(prefix)
- sed -i 's,Makefile.PL,$(abs_builddir)/Makefile.PL,' $@
+ perl Makefile.PL INSTALLDIRS=$(INSTALLDIRS) PREFIX=$(prefix)
# No! Otherwise it is deleted before the clean-local rule runs.
#CLEANFILES = Makefile-pl
diff --git a/perl/run-perl-tests b/perl/run-perl-tests
new file mode 100755
index 0000000..0e7e9ab
--- /dev/null
+++ b/perl/run-perl-tests
@@ -0,0 +1,21 @@
+#!/bin/sh -
+# libguestfs Perl bindings
+# Copyright (C) 2009 Red Hat Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+set -e
+
+make -f Makefile-pl test "$@"
diff --git a/perl/run-perl-tests.in b/perl/run-perl-tests.in
deleted file mode 100755
index 11278a8..0000000
--- a/perl/run-perl-tests.in
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh -
-# libguestfs Perl bindings
-# Copyright (C) 2009 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-set -e
-
-make -C $srcdir -f @abs_builddir@/Makefile-pl test "$@"
diff --git a/run.in b/run.in
index ebdec65..ebd1225 100755
--- a/run.in
+++ b/run.in
@@ -90,9 +90,9 @@ export LD_LIBRARY_PATH
# For Perl.
if [ -z "$PERL5LIB" ]; then
- PERL5LIB="$s/perl/lib:$b/perl/blib/lib:$b/perl/blib/arch"
+ PERL5LIB="$b/perl/blib/lib:$b/perl/blib/arch"
else
- PERL5LIB="$s/perl/lib:$b/perl/blib/lib:$b/perl/blib/arch:$PERL5LIB"
+ PERL5LIB="$b/perl/blib/lib:$b/perl/blib/arch:$PERL5LIB"
fi
export PERL5LIB
--
1.7.10.4
11 years, 6 months
Standalone guestfs
by Gabriel de Perthuis
Hello,
As I understand it guestfs appliances normally work as servers
and run high-level commands from some external channel.
But it might be possible to bundle a guestfish script to run
commands from and do away with the external system.
That would make it useful on non-virtualised systems.
Has anyone tried this already?
11 years, 6 months
How to use libguestfs access LVM as non-root user?
by Qiu Yu
Hi,
Following code snippet, running as non-root user, will throw up a
'Permission denied' RuntimeError.
Could someone kindly guide me the correct way to handle LVM disk as
non-root user? Cause as http://libguestfs.org homepage claims, "libguestfs
doesn't need root permissions." A little confused somehow.
import guestfs
g = guestfs.GuestFS()
g.add_drive_opts("/dev/vg0/disk1", format="raw")
Thanks!
--
Qiu Yu
11 years, 7 months