[PATCH] hivex: Fix building on platforms without O_CLOEXEC such as FreeBSD
by Hilko Bengen
---
lib/hivex.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/lib/hivex.c b/lib/hivex.c
index a3f5171..4b9fcf0 100644
--- a/lib/hivex.c
+++ b/lib/hivex.c
@@ -294,9 +294,16 @@ hivex_open (const char *filename, int flags)
if (h->filename == NULL)
goto error;
+#ifdef O_CLOEXEC
h->fd = open (filename, O_RDONLY | O_CLOEXEC);
+#else
+ h->fd = open (filename, O_RDONLY);
+#endif
if (h->fd == -1)
goto error;
+#ifndef O_CLOEXEC
+ fcntl (h->fd, F_SETFD, FD_CLOEXEC);
+#endif
struct stat statbuf;
if (fstat (h->fd, &statbuf) == -1)
--
1.7.5.4
13 years, 4 months
[PATCH] hivex: Don't build static library, .so.* symlinks for Python bindings
by Hilko Bengen
---
python/Makefile.am | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/python/Makefile.am b/python/Makefile.am
index 8599863..89e66f8 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -36,6 +36,7 @@ libhivexmod_la_SOURCES = hivex-py.c
libhivexmod_la_CFLAGS = -Wall -I$(PYTHON_INCLUDEDIR) \
-I$(top_srcdir)/lib -I$(top_builddir)/lib
libhivexmod_la_LIBADD = $(top_builddir)/lib/libhivex.la
+libhivexmod_la_LDFLAGS = -avoid-version -shared
TESTS_ENVIRONMENT = \
PYTHONPATH=$(builddir):$(builddir)/.libs
--
1.7.5.4
13 years, 4 months
Re: [Libguestfs] libguestfs, porting to FreeBSD
by Richard W.M. Jones
On Fri, Aug 19, 2011 at 12:23:56PM -0700, Jason Helfman wrote:
> I was interested in porting libguestfs to FreeBSD, and see that it
> requires febootstrap, which I believe is specific to RedHat.
febootstrap is nowadays a cross-platform appliance builder which
supports currently yum+rpm (Fedora and RHEL), apt+dpkg (ie. Debian and
Ubuntu), and pacman (ArchLinux).
If you want to use febootstrap to build the appliance, it may be
possible to modify febootstrap to use FreeBSD packages (not ports).
See this page for more information on what is involved:
https://www.redhat.com/archives/libguestfs/2011-March/msg00098.html
Also it's a good idea to read the man pages for febootstrap(8) and
febootstrap-supermin-helper(8) online at http://libguestfs.org/
An alternative is that you have your own technology for building a
FreeBSD-based appliance. All you need to do is to build a small
appliance which contains the daemon (guestfsd) and starts the daemon
on boot.
Another alternative, which is probably not very appealing to you,
would be to prebuild the Fedora appliance and ship that. There would
of course be licensing conditions around this.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top
13 years, 4 months
[PATCH 1/6] out-of-tree build: fix documentation generation
by Hilko Bengen
---
cat/Makefile.am | 6 +++---
df/Makefile.am | 2 +-
edit/Makefile.am | 2 +-
examples/Makefile.am | 12 ++++++------
fish/Makefile.am | 18 +++++++++---------
fuse/Makefile.am | 2 +-
inspector/Makefile.am | 2 +-
java/examples/Makefile.am | 6 +++---
ocaml/examples/Makefile.am | 6 +++---
perl/examples/Makefile.am | 6 +++---
po-docs/ja/Makefile.am | 18 +++++++++---------
po-docs/uk/Makefile.am | 18 +++++++++---------
podwrapper.sh.in | 1 +
python/examples/Makefile.am | 6 +++---
rescue/Makefile.am | 2 +-
resize/Makefile.am | 2 +-
ruby/examples/Makefile.am | 6 +++---
src/Makefile.am | 8 ++++----
test-tool/Makefile.am | 4 ++--
tools/Makefile.am | 4 ++--
20 files changed, 66 insertions(+), 65 deletions(-)
diff --git a/cat/Makefile.am b/cat/Makefile.am
index 6022cd6..91abfac 100644
--- a/cat/Makefile.am
+++ b/cat/Makefile.am
@@ -102,7 +102,7 @@ noinst_DATA = \
virt-cat.1 $(top_builddir)/html/virt-cat.1.html: stamp-virt-cat.pod
stamp-virt-cat.pod: virt-cat.pod
- $(top_srcdir)/podwrapper.sh \
+ $(top_builddir)/podwrapper.sh \
--man virt-cat.1 \
--html $(top_builddir)/html/virt-cat.1.html \
$<
@@ -111,7 +111,7 @@ stamp-virt-cat.pod: virt-cat.pod
virt-ls.1 $(top_builddir)/html/virt-ls.1.html: stamp-virt-ls.pod
stamp-virt-ls.pod: virt-ls.pod
- $(top_srcdir)/podwrapper.sh \
+ $(top_builddir)/podwrapper.sh \
--man virt-ls.1 \
--html $(top_builddir)/html/virt-ls.1.html \
$<
@@ -120,7 +120,7 @@ stamp-virt-ls.pod: virt-ls.pod
virt-filesystems.1 $(top_builddir)/html/virt-filesystems.1.html: stamp-virt-filesystems.pod
stamp-virt-filesystems.pod: virt-filesystems.pod
- $(top_srcdir)/podwrapper.sh \
+ $(top_builddir)/podwrapper.sh \
--man virt-filesystems.1 \
--html $(top_builddir)/html/virt-filesystems.1.html \
$<
diff --git a/df/Makefile.am b/df/Makefile.am
index 88e32af..6281c96 100644
--- a/df/Makefile.am
+++ b/df/Makefile.am
@@ -66,7 +66,7 @@ noinst_DATA = $(top_builddir)/html/virt-df.1.html
virt-df.1 $(top_builddir)/html/virt-df.1.html: stamp-virt-df.pod
stamp-virt-df.pod: virt-df.pod
- $(top_srcdir)/podwrapper.sh \
+ $(top_builddir)/podwrapper.sh \
--man virt-df.1 \
--html $(top_builddir)/html/virt-df.1.html \
$<
diff --git a/edit/Makefile.am b/edit/Makefile.am
index e33b33c..eac2877 100644
--- a/edit/Makefile.am
+++ b/edit/Makefile.am
@@ -58,7 +58,7 @@ noinst_DATA = $(top_builddir)/html/virt-edit.1.html
virt-edit.1 $(top_builddir)/html/virt-edit.1.html: stamp-virt-edit.pod
stamp-virt-edit.pod: virt-edit.pod
- $(top_srcdir)/podwrapper.sh \
+ $(top_builddir)/podwrapper.sh \
--man virt-edit.1 \
--html $(top_builddir)/html/virt-edit.1.html \
$<
diff --git a/examples/Makefile.am b/examples/Makefile.am
index b8a2ffe..c84285f 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -64,20 +64,20 @@ noinst_DATA = \
guestfs-examples.3 $(top_builddir)/html/guestfs-examples.3.html: stamp-guestfs-examples.pod
-stamp-guestfs-examples.pod: guestfs-examples.pod create_disk.c inspect_vm.c
- $(top_srcdir)/podwrapper.sh \
+stamp-guestfs-examples.pod: $(srcdir)/guestfs-examples.pod $(srcdir)/create_disk.c $(srcdir)/inspect_vm.c
+ $(top_builddir)/podwrapper.sh \
--section 3 \
--man guestfs-examples.3 \
--html $(top_builddir)/html/guestfs-examples.3.html \
- --verbatim create_disk.c:@EXAMPLE1@ \
- --verbatim inspect_vm.c:@EXAMPLE2@ \
+ --verbatim $(srcdir)/create_disk.c:@EXAMPLE1@ \
+ --verbatim $(srcdir)/inspect_vm.c:@EXAMPLE2@ \
$<
touch $@
guestfs-recipes.1 $(top_builddir)/html/guestfs-recipes.1.html: stamp-guestfs-recipes.pod
-stamp-guestfs-recipes.pod: guestfs-recipes.pod create_disk.c inspect_vm.c
- $(top_srcdir)/podwrapper.sh \
+stamp-guestfs-recipes.pod: $(builddir)/guestfs-recipes.pod create_disk.c inspect_vm.c
+ $(top_builddir)/podwrapper.sh \
--section 1 \
--man guestfs-recipes.1 \
--html $(top_builddir)/html/guestfs-recipes.1.html \
diff --git a/fish/Makefile.am b/fish/Makefile.am
index 22aaf4c..6018868 100644
--- a/fish/Makefile.am
+++ b/fish/Makefile.am
@@ -170,7 +170,7 @@ noinst_DATA = \
guestfish.1 $(top_builddir)/html/guestfish.1.html: stamp-guestfish.pod
stamp-guestfish.pod: guestfish.pod guestfish-actions.pod guestfish-commands.pod
- $(top_srcdir)/podwrapper.sh \
+ $(top_builddir)/podwrapper.sh \
--man guestfish.1 \
--html $(top_builddir)/html/guestfish.1.html \
--insert guestfish-actions.pod:@ACTIONS@ \
@@ -180,8 +180,8 @@ stamp-guestfish.pod: guestfish.pod guestfish-actions.pod guestfish-commands.pod
virt-copy-in.1 $(top_builddir)/html/virt-copy-in.1.html: stamp-virt-copy-in.pod
-stamp-virt-copy-in.pod: virt-copy-in.pod
- $(top_srcdir)/podwrapper.sh \
+stamp-virt-copy-in.pod: $(srcdir)/virt-copy-in.pod
+ $(top_builddir)/podwrapper.sh \
--man virt-copy-in.1 \
--html $(top_builddir)/html/virt-copy-in.1.html \
$<
@@ -189,8 +189,8 @@ stamp-virt-copy-in.pod: virt-copy-in.pod
virt-copy-out.1 $(top_builddir)/html/virt-copy-out.1.html: stamp-virt-copy-out.pod
-stamp-virt-copy-out.pod: virt-copy-out.pod
- $(top_srcdir)/podwrapper.sh \
+stamp-virt-copy-out.pod: $(srcdir)/virt-copy-out.pod
+ $(top_builddir)/podwrapper.sh \
--man virt-copy-out.1 \
--html $(top_builddir)/html/virt-copy-out.1.html \
$<
@@ -198,8 +198,8 @@ stamp-virt-copy-out.pod: virt-copy-out.pod
virt-tar-in.1 $(top_builddir)/html/virt-tar-in.1.html: stamp-virt-tar-in.pod
-stamp-virt-tar-in.pod: virt-tar-in.pod
- $(top_srcdir)/podwrapper.sh \
+stamp-virt-tar-in.pod: $(srcdir)/virt-tar-in.pod
+ $(top_builddir)/podwrapper.sh \
--man virt-tar-in.1 \
--html $(top_builddir)/html/virt-tar-in.1.html \
$<
@@ -207,8 +207,8 @@ stamp-virt-tar-in.pod: virt-tar-in.pod
virt-tar-out.1 $(top_builddir)/html/virt-tar-out.1.html: stamp-virt-tar-out.pod
-stamp-virt-tar-out.pod: virt-tar-out.pod
- $(top_srcdir)/podwrapper.sh \
+stamp-virt-tar-out.pod: $(srcdir)/virt-tar-out.pod
+ $(top_builddir)/podwrapper.sh \
--man virt-tar-out.1 \
--html $(top_builddir)/html/virt-tar-out.1.html \
$<
diff --git a/fuse/Makefile.am b/fuse/Makefile.am
index b7558ee..10bbc9d 100644
--- a/fuse/Makefile.am
+++ b/fuse/Makefile.am
@@ -66,7 +66,7 @@ noinst_DATA = $(top_builddir)/html/guestmount.1.html
guestmount.1 $(top_builddir)/html/guestmount.1.html: stamp-guestmount.pod
stamp-guestmount.pod: guestmount.pod
- $(top_srcdir)/podwrapper.sh \
+ $(top_builddir)/podwrapper.sh \
--man guestmount.1 \
--html $(top_builddir)/html/guestmount.1.html \
$<
diff --git a/inspector/Makefile.am b/inspector/Makefile.am
index 5c48724..03e13d8 100644
--- a/inspector/Makefile.am
+++ b/inspector/Makefile.am
@@ -81,7 +81,7 @@ noinst_DATA = $(top_builddir)/html/virt-inspector.1.html
virt-inspector.1 $(top_builddir)/html/virt-inspector.1.html: stamp-virt-inspector.pod
stamp-virt-inspector.pod: virt-inspector.pod
- $(top_srcdir)/podwrapper.sh \
+ $(top_builddir)/podwrapper.sh \
--man virt-inspector.1 \
--html $(top_builddir)/html/virt-inspector.1.html \
$<
diff --git a/java/examples/Makefile.am b/java/examples/Makefile.am
index 503b55d..60fd958 100644
--- a/java/examples/Makefile.am
+++ b/java/examples/Makefile.am
@@ -31,12 +31,12 @@ noinst_DATA = $(top_builddir)/html/guestfs-java.3.html
guestfs-java.3 $(top_builddir)/html/guestfs-java.3.html: stamp-guestfs-java.pod
stamp-guestfs-java.pod: guestfs-java.pod CreateDisk.java InspectVM.java
- $(top_srcdir)/podwrapper.sh \
+ $(top_builddir)/podwrapper.sh \
--section 3 \
--man guestfs-java.3 \
--html $(top_builddir)/html/guestfs-java.3.html \
- --verbatim CreateDisk.java:@EXAMPLE1@ \
- --verbatim InspectVM.java:@EXAMPLE2@ \
+ --verbatim $(srcdir)/CreateDisk.java:@EXAMPLE1@ \
+ --verbatim $(srcdir)/InspectVM.java:@EXAMPLE2@ \
$<
touch $@
diff --git a/ocaml/examples/Makefile.am b/ocaml/examples/Makefile.am
index 61a94af..43e579c 100644
--- a/ocaml/examples/Makefile.am
+++ b/ocaml/examples/Makefile.am
@@ -31,12 +31,12 @@ noinst_DATA = $(top_builddir)/html/guestfs-ocaml.3.html
guestfs-ocaml.3 $(top_builddir)/html/guestfs-ocaml.3.html: stamp-guestfs-ocaml.pod
stamp-guestfs-ocaml.pod: guestfs-ocaml.pod create_disk.ml inspect_vm.ml
- $(top_srcdir)/podwrapper.sh \
+ $(top_builddir)/podwrapper.sh \
--section 3 \
--man guestfs-ocaml.3 \
--html $(top_builddir)/html/guestfs-ocaml.3.html \
- --verbatim create_disk.ml:@EXAMPLE1@ \
- --verbatim inspect_vm.ml:@EXAMPLE2@ \
+ --verbatim $(srcdir)/create_disk.ml:@EXAMPLE1@ \
+ --verbatim $(srcdir)/inspect_vm.ml:@EXAMPLE2@ \
$<
touch $@
diff --git a/perl/examples/Makefile.am b/perl/examples/Makefile.am
index 354531a..387cdf1 100644
--- a/perl/examples/Makefile.am
+++ b/perl/examples/Makefile.am
@@ -29,11 +29,11 @@ noinst_DATA = $(top_builddir)/html/guestfs-perl.3.html
guestfs-perl.3 $(top_builddir)/html/guestfs-perl.3.html: stamp-guestfs-perl.pod
stamp-guestfs-perl.pod: guestfs-perl.pod create_disk.pl inspect_vm.pl
- $(top_srcdir)/podwrapper.sh \
+ $(top_builddir)/podwrapper.sh \
--section 3 \
--man guestfs-perl.3 \
--html $(top_builddir)/html/guestfs-perl.3.html \
- --verbatim create_disk.pl:@EXAMPLE1@ \
- --verbatim inspect_vm.pl:@EXAMPLE2@ \
+ --verbatim $(srcdir)/create_disk.pl:@EXAMPLE1@ \
+ --verbatim $(srcdir)/inspect_vm.pl:@EXAMPLE2@ \
$<
touch $@
diff --git a/po-docs/ja/Makefile.am b/po-docs/ja/Makefile.am
index 4b149fe..07778b5 100644
--- a/po-docs/ja/Makefile.am
+++ b/po-docs/ja/Makefile.am
@@ -52,26 +52,26 @@ EXTRA_DIST = \
all-local: $(MANPAGES)
guestfs.3: guestfs.pod guestfs-actions.pod guestfs-availability.pod guestfs-structs.pod
- $(top_srcdir)/podwrapper.sh \
+ $(top_builddir)/podwrapper.sh \
--section 3 \
--man $@ \
- --insert guestfs-actions.pod:@ACTIONS@ \
- --insert guestfs-availability.pod:@AVAILABILITY@ \
- --insert guestfs-structs.pod:@STRUCTS@ \
+ --insert $(srcdir)/guestfs-actions.pod:@ACTIONS@ \
+ --insert $(srcdir)/guestfs-availability.pod:@AVAILABILITY@ \
+ --insert $(srcdir)/guestfs-structs.pod:@STRUCTS@ \
$<
guestfish.1: guestfish.pod guestfish-actions.pod guestfish-commands.pod
- $(top_srcdir)/podwrapper.sh \
+ $(top_builddir)/podwrapper.sh \
--man $@ \
- --insert guestfish-actions.pod:@ACTIONS@ \
- --insert guestfish-commands.pod:@FISH_COMMANDS@ \
+ --insert $(srcdir)/guestfish-actions.pod:@ACTIONS@ \
+ --insert $(srcdir)/guestfish-commands.pod:@FISH_COMMANDS@ \
$<
%.1: %.pod
- $(top_srcdir)/podwrapper.sh --man $@ $<
+ $(top_builddir)/podwrapper.sh --man $@ $<
%.1: %.pl
- $(top_srcdir)/podwrapper.sh --man $@ $<
+ $(top_builddir)/podwrapper.sh --man $@ $<
# XXX Can automake do this properly?
install-data-hook:
diff --git a/po-docs/uk/Makefile.am b/po-docs/uk/Makefile.am
index 4b149fe..07778b5 100644
--- a/po-docs/uk/Makefile.am
+++ b/po-docs/uk/Makefile.am
@@ -52,26 +52,26 @@ EXTRA_DIST = \
all-local: $(MANPAGES)
guestfs.3: guestfs.pod guestfs-actions.pod guestfs-availability.pod guestfs-structs.pod
- $(top_srcdir)/podwrapper.sh \
+ $(top_builddir)/podwrapper.sh \
--section 3 \
--man $@ \
- --insert guestfs-actions.pod:@ACTIONS@ \
- --insert guestfs-availability.pod:@AVAILABILITY@ \
- --insert guestfs-structs.pod:@STRUCTS@ \
+ --insert $(srcdir)/guestfs-actions.pod:@ACTIONS@ \
+ --insert $(srcdir)/guestfs-availability.pod:@AVAILABILITY@ \
+ --insert $(srcdir)/guestfs-structs.pod:@STRUCTS@ \
$<
guestfish.1: guestfish.pod guestfish-actions.pod guestfish-commands.pod
- $(top_srcdir)/podwrapper.sh \
+ $(top_builddir)/podwrapper.sh \
--man $@ \
- --insert guestfish-actions.pod:@ACTIONS@ \
- --insert guestfish-commands.pod:@FISH_COMMANDS@ \
+ --insert $(srcdir)/guestfish-actions.pod:@ACTIONS@ \
+ --insert $(srcdir)/guestfish-commands.pod:@FISH_COMMANDS@ \
$<
%.1: %.pod
- $(top_srcdir)/podwrapper.sh --man $@ $<
+ $(top_builddir)/podwrapper.sh --man $@ $<
%.1: %.pl
- $(top_srcdir)/podwrapper.sh --man $@ $<
+ $(top_builddir)/podwrapper.sh --man $@ $<
# XXX Can automake do this properly?
install-data-hook:
diff --git a/podwrapper.sh.in b/podwrapper.sh.in
index c883c6a..9accaf9 100755
--- a/podwrapper.sh.in
+++ b/podwrapper.sh.in
@@ -180,6 +180,7 @@ if [ -n "$text_output" ]; then
fi
if [ -n "$html_output" ]; then
+ mkdir -p "$abs_top_builddir/html"
"$POD2HTML" \
--css "pod.css" --htmldir "$abs_top_builddir/html" \
< $tmpdir/full.pod > "$html_output".tmp
diff --git a/python/examples/Makefile.am b/python/examples/Makefile.am
index 208fecd..434c8f7 100644
--- a/python/examples/Makefile.am
+++ b/python/examples/Makefile.am
@@ -29,11 +29,11 @@ noinst_DATA = $(top_builddir)/html/guestfs-python.3.html
guestfs-python.3 $(top_builddir)/html/guestfs-python.3.html: stamp-guestfs-python.pod
stamp-guestfs-python.pod: guestfs-python.pod create_disk.py inspect_vm.py
- $(top_srcdir)/podwrapper.sh \
+ $(top_builddir)/podwrapper.sh \
--section 3 \
--man guestfs-python.3 \
--html $(top_builddir)/html/guestfs-python.3.html \
- --verbatim create_disk.py:@EXAMPLE1@ \
- --verbatim inspect_vm.py:@EXAMPLE2@ \
+ --verbatim $(srcdir)/create_disk.py:@EXAMPLE1@ \
+ --verbatim $(srcdir)/inspect_vm.py:@EXAMPLE2@ \
$<
touch $@
diff --git a/rescue/Makefile.am b/rescue/Makefile.am
index d3783ae..85a70f9 100644
--- a/rescue/Makefile.am
+++ b/rescue/Makefile.am
@@ -57,7 +57,7 @@ noinst_DATA = $(top_builddir)/html/virt-rescue.1.html
virt-rescue.1 $(top_builddir)/html/virt-rescue.1.html: stamp-virt-rescue.pod
stamp-virt-rescue.pod: virt-rescue.pod
- $(top_srcdir)/podwrapper.sh \
+ $(top_builddir)/podwrapper.sh \
--man virt-rescue.1 \
--html $(top_builddir)/html/virt-rescue.1.html \
$<
diff --git a/resize/Makefile.am b/resize/Makefile.am
index fd7f71a..93a2600 100644
--- a/resize/Makefile.am
+++ b/resize/Makefile.am
@@ -68,7 +68,7 @@ noinst_DATA = $(top_builddir)/html/virt-resize.1.html
virt-resize.1 $(top_builddir)/html/virt-resize.1.html: stamp-virt-resize.pod
stamp-virt-resize.pod: virt-resize.pod
- $(top_srcdir)/podwrapper.sh \
+ $(top_builddir)/podwrapper.sh \
--man virt-resize.1 \
--html $(top_builddir)/html/virt-resize.1.html \
$<
diff --git a/ruby/examples/Makefile.am b/ruby/examples/Makefile.am
index 6e94acf..7183e80 100644
--- a/ruby/examples/Makefile.am
+++ b/ruby/examples/Makefile.am
@@ -29,11 +29,11 @@ noinst_DATA = $(top_builddir)/html/guestfs-ruby.3.html
guestfs-ruby.3 $(top_builddir)/html/guestfs-ruby.3.html: stamp-guestfs-ruby.pod
stamp-guestfs-ruby.pod: guestfs-ruby.pod create_disk.rb inspect_vm.rb
- $(top_srcdir)/podwrapper.sh \
+ $(top_builddir)/podwrapper.sh \
--section 3 \
--man guestfs-ruby.3 \
--html $(top_builddir)/html/guestfs-ruby.3.html \
- --verbatim create_disk.rb:@EXAMPLE1@ \
- --verbatim inspect_vm.rb:@EXAMPLE2@ \
+ --verbatim $(srcdir)/create_disk.rb:@EXAMPLE1@ \
+ --verbatim $(srcdir)/inspect_vm.rb:@EXAMPLE2@ \
$<
touch $@
diff --git a/src/Makefile.am b/src/Makefile.am
index fa088fe..0666f9f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -192,12 +192,12 @@ stamp-guestfs.pod: guestfs.pod \
guestfs-actions.pod \
guestfs-availability.pod \
guestfs-structs.pod
- $(top_srcdir)/podwrapper.sh \
+ $(top_builddir)/podwrapper.sh \
--section 3 \
--man guestfs.3 \
--html $(top_builddir)/html/guestfs.3.html \
- --insert guestfs-actions.pod:@ACTIONS@ \
- --insert guestfs-availability.pod:@AVAILABILITY@ \
- --insert guestfs-structs.pod:@STRUCTS@ \
+ --insert $(srcdir)/guestfs-actions.pod:@ACTIONS@ \
+ --insert $(srcdir)/guestfs-availability.pod:@AVAILABILITY@ \
+ --insert $(srcdir)/guestfs-structs.pod:@STRUCTS@ \
$<
touch $@
diff --git a/test-tool/Makefile.am b/test-tool/Makefile.am
index 9fa4033..af1bffb 100644
--- a/test-tool/Makefile.am
+++ b/test-tool/Makefile.am
@@ -33,7 +33,7 @@ libguestfs_test_tool_CFLAGS = \
libguestfs_test_tool_LDADD = \
$(top_builddir)/src/libguestfs.la
-libguestfs-test-tool.1: libguestfs-test-tool.pod
- $(top_srcdir)/podwrapper.sh \
+libguestfs-test-tool.1: $(builddir)/libguestfs-test-tool.pod
+ $(top_builddir)/podwrapper.sh \
--man $@ \
$<
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 6059d35..5586bf8 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -44,12 +44,12 @@ man_MANS = virt-tar.1 $(patsubst %,virt-%.1,$(filter-out tar,$(tools)))
noinst_DATA = $(tools:%=$(top_builddir)/html/virt-%.1.html)
virt-%.1: virt-%
- $(top_srcdir)/podwrapper.sh \
+ $(top_builddir)/podwrapper.sh \
--man $@ \
$<
$(top_builddir)/html/virt-%.1.html: virt-%
- $(top_srcdir)/podwrapper.sh \
+ $(top_builddir)/podwrapper.sh \
--html $@ \
$<
--
1.7.5.4
13 years, 4 months
building a supermin appliance with febootstrap...
by Kashyap Chamarthy
Rich,
So, I tried to build the simple supermin app. from your blog. I can confirm that I did get
to the shell when I invoked qemu-kvm.
I used the standard qemu-kvm cmdline (but appended a serial console). This boots fine.
########################################################
[root@moon appliance-test]# qemu-kvm -kernel kernel -append "console=tty0
console=ttyS0,115200" -initrd initrd -hda root -nographic
.
.
.
insmod: error inserting 'ideapad-laptop.ko': -1 Unknown symbol in module
insmod: wait: File exists
febootstrap: insmod sym53c8xx.ko
febootstrap: picked /sys/block/sda/dev as root device
febootstrap: creating /dev/root as block special 8:0
febootstrap: mounting new root on /root
febootstrap: chroot
/proc/uptime: No such file or directory
Welcome to my world
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
bash-4.2# [ 1.103034] input: ImExPS/2 Generic Explorer Mouse as
/devices/platform/i8042/serio1/input/input2
[ 1.334183] Refined TSC clocksource calibration: 1995.006 MHz.
bash-4.2#
########################################################
But when I try to 'exit', I notice a kernel panic. And it just seems to hung there, no
more budging. I had to do 'ctl a + x' to get out of the serial console.
Is this expected?
########################################################
bash-4.2# exit
exit
[ 153.520309] Kernel panic - not syncing: Attempted to kill init!
[ 153.523584] Pid: 1, comm: init Not tainted 2.6.40-4.fc15.x86_64 #1
[ 153.526990] Call Trace:
[ 153.529039] [<ffffffff814ae2cd>] panic+0x91/0x19c
[ 153.531914] [<ffffffff810580a2>] do_exit+0xb9/0x77b
[ 153.534798] [<ffffffff810589e9>] do_group_exit+0x7a/0xa2
[ 153.537835] [<ffffffff81058a28>] sys_exit_group+0x17/0x17
[ 153.540924] [<ffffffff814bd7c2>] system_call_fastpath+0x16/0x1b
########################################################
--
/kashyap
13 years, 4 months
Re: [Libguestfs] [virt-devel] End-user review of the native KVM tool
by Richard W.M. Jones
On Tue, Aug 16, 2011 at 11:47:55PM +0530, Kashyap Chamarthy wrote:
> On 08/16/2011 11:35 PM, Richard W.M. Jones wrote:
> >On Tue, Aug 16, 2011 at 11:21:44PM +0530, Kashyap Chamarthy wrote:
> >>I see. From a quick look at the spec file, I do notice post, preun,
> >>postun operations where it deals w/ seliux policy modules, and other
> >>system commands etc. Can you please elaborate a little on what kind
> >>of workarounds are we talking here?
> >
> >You have to imagine that the appliance will boot with just the files
> >specified directly from the RPMs (ie. the %files sections). Any other
> >adjustments done by %pre or %post scripts will not be done.
>
> Just a question, is there a technical/design reason why febootstrap
> doesn't do this? Or like you mentioned at the end, it is purely for
> more control for libguestfs ?
It's a technical reason. We don't install the RPMs in the regular way
(ie. using rpm), but instead we unpack them. We *used* to install the
RPMs in the regular way into a chroot, but it was a gigantic pain in
the rear the whole time, and we were glad to get away from doing that.
In any case, installing the RPMs like that didn't really solve the
problem, it just added a lot more complication for what is in practice
only a minor issue.
(The way forward in some distant future febootstrap 4 is to install
the RPMs in a virtual machine using kickstart or the equivalent
mechanism on other distros ...)
> Meanwhile, my run of 'febootstrap' looks like still(2 hrs or so
> now) it's hung. Would you suggest me to wait? or do a ctl+c ; cleaup
> all the febootstrap temp. directories; and retry?
Try the simpler example from the blog to make sure it's generally
working.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/
13 years, 4 months
Re: [Libguestfs] [virt-devel] End-user review of the native KVM tool
by Richard W.M. Jones
On Tue, Aug 16, 2011 at 11:21:44PM +0530, Kashyap Chamarthy wrote:
> I see. From a quick look at the spec file, I do notice post, preun,
> postun operations where it deals w/ seliux policy modules, and other
> system commands etc. Can you please elaborate a little on what kind
> of workarounds are we talking here?
You have to imagine that the appliance will boot with just the files
specified directly from the RPMs (ie. the %files sections). Any other
adjustments done by %pre or %post scripts will not be done.
Before you can boot the appliance (see [1]) you need to write a /init
script, which could jump into the existing initscripts/systemd/..., or
it could do its own thing. We do our own thing in libguestfs[2].
Therefore, this /init script can do all the operations that are needed
by the IPA %post scripts, such as (from the scripts you sent me)
enabling services, running ipa-upgradeconfig, and doing selinux
tweaks.
Interestingly Debian debootstrap has the same problem, and what they
do is to collect together all the scripts and generate an init script
automatically which does all the required operations. We don't do
this in febootstrap because we wanted a bit more control for
libguestfs.
Rich.
[1] https://rwmj.wordpress.com/2010/12/10/tip-creating-throwaway-appliances-w...
[2] http://git.annexia.org/?p=libguestfs.git;a=blob;f=appliance/init;hb=HEAD
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
13 years, 4 months
Re: [Libguestfs] [virt-devel] End-user review of the native KVM tool
by Richard W.M. Jones
On Tue, Aug 16, 2011 at 10:54:37PM +0530, Kashyap Chamarthy wrote:
> Is there a something I can do to see it is actually progressing and
> not hung somewhere? Or do I just have to show some patience? :)
Maybe --verbose? I can't remember if that displays all the individual
downloads. In any case it took about 30 minutes for me to get all the
packages over my rather slow DSL.
Here are the warnings that febootstrap finally displays:
febootstrap: warning: some host files are unreadable by non-root
febootstrap: warning: get your distro to fix these files:
/etc/selinux/targeted/modules/active/commit_num
/etc/selinux/targeted/modules/active/file_contexts
/etc/selinux/targeted/modules/active/file_contexts.template
/etc/selinux/targeted/modules/active/homedir_template
/etc/selinux/targeted/modules/active/netfilter_contexts
/etc/selinux/targeted/modules/active/seusers.final
/etc/selinux/targeted/modules/active/users_extra
/lib64/dbus-1/dbus-daemon-launch-helper
/sbin/unix_update
/usr/bin/chfn
/usr/bin/chsh
/usr/libexec/utempter/utempter
/usr/sbin/build-locale-archive
/usr/sbin/glibc_post_upgrade.x86_64
/usr/sbin/groupadd
/usr/sbin/groupdel
/usr/sbin/groupmems
/usr/sbin/groupmod
/usr/sbin/redhat_lsb_trigger.x86_64
/usr/sbin/suexec
/usr/sbin/tzdata-update
/usr/sbin/useradd
/usr/sbin/userdel
/usr/sbin/usermod
/var/lib/hsqldb/sqltool.rc
febootstrap-supermin-helper relies on reading the host files when it
reconstructs the appliance, so it has to skip files that aren't
readable by non-root (assuming you run the appliance as non-root which
is the usual advice). I think all of the above can probably be
ignored however.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
13 years, 4 months