enable build for ocaml bytecode
by Olaf Hering
This is a first attempt to build libguestfs with just a ocaml bytecode
compiler. The three tools written in ocaml will be build only when an
ocamlopt compiler is available.
Olaf
---
Makefile.am | 5 ++++-
configure.ac | 2 ++
ocaml/Makefile.am | 20 +++++++++++++++++---
resize/Makefile.am | 2 +-
sparsify/Makefile.am | 2 +-
sysprep/Makefile.am | 2 +-
6 files changed, 26 insertions(+), 7 deletions(-)
Index: libguestfs-1.20.1/Makefile.am
===================================================================
--- libguestfs-1.20.1.orig/Makefile.am
+++ libguestfs-1.20.1/Makefile.am
@@ -74,7 +74,10 @@ if HAVE_PERL
SUBDIRS += perl perl/examples
endif
if HAVE_OCAML
-SUBDIRS += ocaml ocaml/examples
+SUBDIRS += ocaml
+endif
+if HAVE_OCAMLOPT
+SUBDIRS += ocaml/examples
endif
if HAVE_PYTHON
SUBDIRS += python python/examples
Index: libguestfs-1.20.1/configure.ac
===================================================================
--- libguestfs-1.20.1.orig/configure.ac
+++ libguestfs-1.20.1/configure.ac
@@ -865,6 +865,8 @@ AS_IF([test "x$enable_ocaml" != "xno"],
])
AM_CONDITIONAL([HAVE_OCAML],
[test "x$OCAMLC" != "xno" && test "x$OCAMLFIND" != "xno"])
+AM_CONDITIONAL([HAVE_OCAMLOPT],
+ [test "x$OCAMLOPT" != "xno" && test "x$OCAMLC" != "xno" && test "x$OCAMLFIND" != "xno"])
AM_CONDITIONAL([HAVE_OCAMLDOC],
[test "x$OCAMLDOC" != "xno"])
Index: libguestfs-1.20.1/ocaml/Makefile.am
===================================================================
--- libguestfs-1.20.1.orig/ocaml/Makefile.am
+++ libguestfs-1.20.1/ocaml/Makefile.am
@@ -43,10 +43,20 @@ CLEANFILES += t/*.cmi t/*.cmo t/*.cmx t/
if HAVE_OCAML
+DATA_HOOK_FILES = META *.so *.a *.cma \
+ *.cmi $(srcdir)/*.mli
+if HAVE_OCAMLOPT
+DATA_HOOK_FILES += *.cmx *.cmxa
+endif
+
OCAMLCFLAGS = -g -warn-error CDEFLMPSUVYZX
OCAMLOPTFLAGS = $(OCAMLCFLAGS)
-noinst_DATA = mlguestfs.cma mlguestfs.cmxa META
+noinst_DATA = mlguestfs.cma
+if HAVE_OCAMLOPT
+noinst_DATA += mlguestfs.cmxa
+endif
+noinst_DATA += META
# Build the C part into a library, so that automake handles the C
# compilation step for us. Note that we don't directly use this
@@ -101,9 +111,13 @@ TESTS = run-bindtests \
$(patsubst %,%.opt,$(test_progs)))
noinst_DATA += \
- bindtests.bc bindtests.opt \
+ bindtests.bc
+if HAVE_OCAMLOPT
+noinst_DATA += \
+ bindtests.opt \
$(test_progs:%=%.bc) \
$(test_progs:%=%.opt)
+endif
bindtests.bc: bindtests.cmo mlguestfs.cma
mkdir -p t
@@ -217,7 +231,7 @@ install-data-hook:
$(OCAMLFIND) install \
-ldconf ignore -destdir $(DESTDIR)$(OCAMLLIB) \
guestfs \
- META *.so *.a *.cma *.cmx *.cmxa *.cmi $(srcdir)/*.mli
+ $(DATA_HOOK_FILES)
rm $(DESTDIR)$(OCAMLLIB)/guestfs/bindtests.*
rm $(DESTDIR)$(OCAMLLIB)/guestfs/libguestfsocaml.a
Index: libguestfs-1.20.1/resize/Makefile.am
===================================================================
--- libguestfs-1.20.1.orig/resize/Makefile.am
+++ libguestfs-1.20.1/resize/Makefile.am
@@ -40,7 +40,7 @@ SOURCES = \
resize_utils.ml \
resize_utils_tests.ml
-if HAVE_OCAML
+if HAVE_OCAMLOPT
# Note this list must be in dependency order.
OBJECTS = \
Index: libguestfs-1.20.1/sparsify/Makefile.am
===================================================================
--- libguestfs-1.20.1.orig/sparsify/Makefile.am
+++ libguestfs-1.20.1/sparsify/Makefile.am
@@ -36,7 +36,7 @@ SOURCES = \
sparsify_gettext.ml \
sparsify_utils.ml
-if HAVE_OCAML
+if HAVE_OCAMLOPT
# Note this list must be in dependency order.
OBJECTS = \
Index: libguestfs-1.20.1/sysprep/Makefile.am
===================================================================
--- libguestfs-1.20.1.orig/sysprep/Makefile.am
+++ libguestfs-1.20.1/sysprep/Makefile.am
@@ -86,7 +86,7 @@ SOURCES = \
utils.ml \
utils.mli
-if HAVE_OCAML
+if HAVE_OCAMLOPT
# Note this list must be in dependency order.
OBJECTS = \
10 years, 8 months
[PATCH] sysprep: handle distro specific sysv scripts
by Olaf Hering
Currently firstboot would only work on redhat-based images.
Handle redhat-based, suse-based and debian guests, error out in case of an
unknown distro.
Update firstboot.sh:
- make sure scripts exists and can be executed
- add LSB header to avoid insserv warnings later on
- run script only if called with "start"
Update functions, pass only required options.
Signed-off-by: Olaf Hering <olaf(a)aepfle.de>
diff --git a/sysprep/firstboot.ml b/sysprep/firstboot.ml
index 97cd8a9..c5296a1 100644
--- a/sysprep/firstboot.ml
+++ b/sysprep/firstboot.ml
@@ -28,14 +28,35 @@ let firstboot_dir = "/usr/lib/virt-sysprep"
let firstboot_sh = sprintf "\
#!/bin/sh -
+### BEGIN INIT INFO
+# Provides: virt-sysprep
+# Required-Start: $null
+# Should-Start: $all
+# Required-Stop: $null
+# Should-Stop: $all
+# Default-Start: 2 3 5
+# Default-Stop: 0 1 6
+# Short-Description: Start scripts to run once at next boot
+# Description: Start scripts to run once at next boot
+# These scripts run the first time the guest boots,
+# and then are deleted. Output or errors from the scripts
+# are written to ~root/virt-sysprep-firstboot.log.
+### END INIT INFO
+
d=%s/scripts
logfile=~root/virt-sysprep-firstboot.log
-for f in $d/* ; do
- echo '=== Running' $f '===' >>$logfile
- $f >>$logfile 2>&1
- rm $f
-done
+if test \"$1\" = \"start\"
+then
+ for f in $d/* ; do
+ if test -x \"$f\"
+ then
+ echo '=== Running' $f '===' >>$logfile
+ $f >>$logfile 2>&1
+ rm -f $f
+ fi
+ done
+fi
" firstboot_dir
let firstboot_service = sprintf "\
@@ -56,7 +77,7 @@ WantedBy=default.target
let failed fs =
ksprintf (fun msg -> failwith (s_"firstboot: failed: " ^ msg)) fs
-let rec install_service g root =
+let rec install_service g distro =
g#mkdir_p firstboot_dir;
g#mkdir_p (sprintf "%s/scripts" firstboot_dir);
g#write (sprintf "%s/firstboot.sh" firstboot_dir) firstboot_sh;
@@ -64,18 +85,18 @@ let rec install_service g root =
(* systemd, else assume sysvinit *)
if g#is_dir "/etc/systemd" then
- install_systemd_service g root
+ install_systemd_service g
else
- install_sysvinit_service g root
+ install_sysvinit_service g distro
(* Install the systemd firstboot service, if not installed already. *)
-and install_systemd_service g root =
+and install_systemd_service g =
g#write (sprintf "%s/firstboot.service" firstboot_dir) firstboot_service;
g#mkdir_p "/etc/systemd/system/default.target.wants";
g#ln_sf (sprintf "%s/firstboot.service" firstboot_dir)
"/etc/systemd/system/default.target.wants"
-and install_sysvinit_service g root =
+and install_sysvinit_redhat g =
g#mkdir_p "/etc/rc.d/rc2.d";
g#mkdir_p "/etc/rc.d/rc3.d";
g#mkdir_p "/etc/rc.d/rc5.d";
@@ -86,12 +107,51 @@ and install_sysvinit_service g root =
g#ln_sf (sprintf "%s/firstboot.sh" firstboot_dir)
"/etc/rc.d/rc5.d/99virt-sysprep-firstboot"
+(* Make firstboot.sh look like a runlevel script to avoid insserv warnings. *)
+and install_sysvinit_suse g =
+ g#mkdir_p "/etc/init.d/rc2.d";
+ g#mkdir_p "/etc/init.d/rc3.d";
+ g#mkdir_p "/etc/init.d/rc5.d";
+ g#ln_sf (sprintf "%s/firstboot.sh" firstboot_dir)
+ "/etc/init.d/virt-sysprep-firstboot";
+ g#ln_sf "../virt-sysprep-firstboot"
+ "/etc/init.d/rc2.d/S99virt-sysprep-firstboot";
+ g#ln_sf "../virt-sysprep-firstboot"
+ "/etc/init.d/rc3.d/S99virt-sysprep-firstboot";
+ g#ln_sf "../virt-sysprep-firstboot"
+ "/etc/init.d/rc5.d/S99virt-sysprep-firstboot"
+
+and install_sysvinit_debian g =
+ g#mkdir_p "/etc/init.d";
+ g#mkdir_p "/etc/rc2.d";
+ g#mkdir_p "/etc/rc3.d";
+ g#mkdir_p "/etc/rc5.d";
+ g#ln_sf (sprintf "%s/firstboot.sh" firstboot_dir)
+ "/etc/init.d/virt-sysprep-firstboot";
+ g#ln_sf "/etc/init.d/virt-sysprep-firstboot"
+ "/etc/rc2.d/S99virt-sysprep-firstboot";
+ g#ln_sf "/etc/init.d/virt-sysprep-firstboot"
+ "/etc/rc3.d/S99virt-sysprep-firstboot";
+ g#ln_sf "/etc/init.d/virt-sysprep-firstboot"
+ "/etc/rc5.d/S99virt-sysprep-firstboot"
+
+and install_sysvinit_service g distro =
+ match distro with
+ | ("fedora"|"rhel"|"centos"|"scientificlinux"|"redhat-based") ->
+ install_sysvinit_redhat g
+ | ("opensuse"|"sles"|"suse-based") ->
+ install_sysvinit_suse g
+ | "debian" ->
+ install_sysvinit_debian g
+ | _ ->
+ failed "guest type %s is not supported" distro
+
let add_firstboot_script g root id content =
let typ = g#inspect_get_type root in
let distro = g#inspect_get_distro root in
match typ, distro with
| "linux", _ ->
- install_service g root;
+ install_service g distro;
let t = Int64.of_float (Unix.time ()) in
let r = string_random8 () in
let filename = sprintf "%s/scripts/%Ld-%s-%s" firstboot_dir t r id in
--
1.7.12
10 years, 11 months
[PATCH] Use pkg-config for Python
by Hilko Bengen
At least libpython2.7-dev and libpython3.3-dev on current
Debian/unstable ship with pkg-config files. As with the pkg-config
check for Lua, we check for versioned and an unversioned .pc files.
---
configure.ac | 35 ++++++++++++++++++++---------------
python/Makefile.am | 2 +-
2 files changed, 21 insertions(+), 16 deletions(-)
diff --git a/configure.ac b/configure.ac
index c809741..0aa1716 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1106,7 +1106,6 @@ AM_CONDITIONAL([HAVE_PERL],
dnl Check for Python (optional, for Python bindings).
PYTHON_PREFIX=
PYTHON_VERSION=
-PYTHON_INCLUDEDIR=
PYTHON_INSTALLDIR=
AC_ARG_ENABLE([python],
@@ -1117,23 +1116,30 @@ AS_IF([test "x$enable_python" != "xno"],[
AC_CHECK_PROG([PYTHON],[python],[python],[no])
if test "x$PYTHON" != "xno"; then
- AC_MSG_CHECKING([Python prefix])
- PYTHON_PREFIX=`$PYTHON -c "import sys; print (sys.prefix)"`
- AC_MSG_RESULT([$PYTHON_PREFIX])
-
AC_MSG_CHECKING([Python version])
PYTHON_VERSION_MAJOR=`$PYTHON -c "import sys; print (sys.version_info@<:@0@:>@)"`
PYTHON_VERSION_MINOR=`$PYTHON -c "import sys; print (sys.version_info@<:@1@:>@)"`
PYTHON_VERSION="$PYTHON_VERSION_MAJOR.$PYTHON_VERSION_MINOR"
AC_MSG_RESULT([$PYTHON_VERSION])
-
- AC_MSG_CHECKING([for Python include path])
- if test -z "$PYTHON_INCLUDEDIR"; then
- python_path=`$PYTHON -c "import distutils.sysconfig; \
- print (distutils.sysconfig.get_python_inc ());"`
- PYTHON_INCLUDEDIR=$python_path
- fi
- AC_MSG_RESULT([$PYTHON_INCLUDEDIR])
+ # Debian: python-2.7.pc, python-3.2.pc
+ PKG_CHECK_MODULES([PYTHON], [python-"$PYTHON_VERSION"],[
+ AC_SUBST([PYTHON_CFLAGS])
+ AC_SUBST([PYTHON_LIBS])
+ AC_SUBST([PYTHON_VERSION])
+ AC_DEFINE([HAVE_PYTHON],[1],[Python library found at compile time])
+ ],[
+ PKG_CHECK_MODULES([PYTHON], [python],[
+ AC_SUBST([PYTHON_CFLAGS])
+ AC_SUBST([PYTHON_LIBS])
+ AC_SUBST([PYTHON_VERSION])
+ AC_DEFINE([HAVE_PYTHON],[1],[Python library found at compile time])
+ ],[
+ AC_MSG_WARN([python $PYTHON_VERSION not found])
+ ])
+ ])
+ AC_MSG_CHECKING([Python prefix])
+ PYTHON_PREFIX=`$PYTHON -c "import sys; print (sys.prefix)"`
+ AC_MSG_RESULT([$PYTHON_PREFIX])
AC_ARG_WITH([python-installdir],
[AS_HELP_STRING([--with-python-installdir],
@@ -1171,11 +1177,10 @@ AS_IF([test "x$enable_python" != "xno"],[
AC_SUBST(PYTHON_PREFIX)
AC_SUBST(PYTHON_VERSION)
- AC_SUBST(PYTHON_INCLUDEDIR)
AC_SUBST(PYTHON_INSTALLDIR)
])
AM_CONDITIONAL([HAVE_PYTHON],
- [test "x$PYTHON" != "xno" && test "x$PYTHON_INCLUDEDIR" != "x" && test "x$PYTHON_INSTALLDIR" != "x"])
+ [test "x$PYTHON" != "xno" && test "x$PYTHON_LIBS" != "x" ])
dnl Check for Ruby and rake (optional, for Ruby bindings).
AC_ARG_ENABLE([ruby],
diff --git a/python/Makefile.am b/python/Makefile.am
index e514a76..ecc25d5 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -43,7 +43,7 @@ libguestfsmod_la_SOURCES = guestfs-py.c guestfs-py.h guestfs-py-byhand.c
libguestfsmod_la_CPPFLAGS = \
-DGUESTFS_PRIVATE=1 \
- -I$(PYTHON_INCLUDEDIR) \
+ $(PYTHON_CFLAGS) \
-I$(top_srcdir)/src -I$(top_builddir)/src
libguestfsmod_la_CFLAGS = \
--
1.7.10.4
11 years, 4 months
Ubuntu and ZFS
by Tim Fletcher
Moved from Richard's blog to here....
A couple of people have requested removing the dependency on zfs-fuse
from the ubuntu packages that Richard released last week, and there is
some confusion about the state of ZFS in Ubuntu.
There are 2 Linux compatible implementations of ZFS, zfs-fuse
(http://gitweb.zfs-fuse.net/) and ZFS on Linux (http://zfsonlinux.org/).
ZFS-fuse is in the official Ubuntu repos but is rather outdated and
almost all development has stopped.
ZFS on Linux (aka ZoL) is an open source but license incompatible kernel
module that is under active development and released as source packages
for most major distos. There is a ppa for Ubuntu here:
https://launchpad.net/~zfs-native/+archive/stable
ZoL is actively used in various NAS distros, as well as things like
proxmox. I am currently using it as a backup target combined with rsync
and snapshots.
ZFS-fuse and ZoL packages can't be installed together and so installing
guestfish which depends on zfs-fuse causes removal of the ZoL packages.
--
Tim Fletcher
<tim(a)night-shade.org.uk>
11 years, 5 months
[PATCH] Change fallback name for external supermin helper
by Olaf Hering
Use basename of external helper instead of 'no' for external supermin
helpers. This gives a clear error messages what binary is actually
missing, and it is now possible to install the missing package without
recompiling libguestfs. In addition its now also possible to use private
builds of supermin (if they are in PATH) with a given libguestfs binary
package.
Signed-off-by: Olaf Hering <olaf(a)aepfle.de>
---
configure.ac | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 30af871..8f025d0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -442,9 +442,9 @@ AC_SUBST([ENABLE_APPLIANCE])
dnl Check for supermin >= 4.1.0 or febootstrap >= 3.20.
AC_CHECK_PROGS([SUPERMIN],
- [supermin febootstrap],[no])
+ [supermin febootstrap],[supermin])
AC_CHECK_PROGS([SUPERMIN_HELPER],
- [supermin-helper febootstrap-supermin-helper],[no])
+ [supermin-helper febootstrap-supermin-helper],[supermin-helper])
dnl Pass supermin --packager-config option.
dnl
11 years, 5 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, 5 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, 5 months