[PATCH] inspection: handle empty file in parse_suse_release
by Olaf Hering
If /etc/SuSE-release is empty then lines[0] is NULL, which is passed to
strdup. As a result virt-inspector will segfault.
This was introduced in commit 763ec36cf0c6ffa6d359b65ff7f1ee9ab1c7361e.
Signed-off-by: Olaf Hering <olaf(a)aepfle.de>
---
src/inspect-fs-unix.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/inspect-fs-unix.c b/src/inspect-fs-unix.c
index 5fabaa2..c7d52c4 100644
--- a/src/inspect-fs-unix.c
+++ b/src/inspect-fs-unix.c
@@ -339,6 +339,8 @@ parse_suse_release (guestfs_h *g, struct inspect_fs *fs, const char *filename)
return -1;
/* First line is dist release name */
+ if (lines[0] == NULL)
+ goto out;
fs->product_name = safe_strdup (g, lines[0]);
if (fs->product_name == NULL)
goto out;
11 years, 7 months
Usage of 'no' as external helper
by Olaf Hering
libguestfs and supermin use 'no' instead of either the basename of the
desired application, or 'false', as helper string. This happens when
configure does not find things like rpm or supermin during build.
Wouldnt it be more logical to use the basename instead of 'no' so that
at runtime one has the chance to install the required packages and in
addition get an obvious error message in verbose mode what external
helper is actually missing? In my package I force a few things like
'export ZYPPER=zypper' to avoid the unneeded BuildRequires: zypper. But
doing that for every binary that maybe called is cumbersome.
I think its best to rely on PATH to let libguestfs and supermin packages
find their external helpers at runtime. And one who has a need to
actually hardcode absolute paths to external helpers into his
libguestfs/supermin binaries can do that by doing the 'export
HELPER=/path/to/helper' during his own configure run.
Thoughts?
Olaf
11 years, 7 months
libguestfs-1.22.1 compilation error
by Evaggelos Balaskas
myconf
./configure \
PYTHON=/usr/bin/python2 \
--prefix=/usr --libdir=/usr/lib \
--mandir=/usr/share/man \
--sysconfdir=/etc \
--disable-probes \
--disable-gobject \
--enable-introspection=no \
--disable-lua \
--disable-erlang \
--disable-php \
--disable-haskell \
--disable-ruby \
--without-java \
--with-default-backend=direct
error msg
make[2]: Entering directory
`/opt/dnl/PKGBUILDs/kvm/libguestfs/src/libguestfs-1.22.1'
perl /home/ebal/dnl/PKGBUILDs/kvm/libguestfs/src/libguestfs-1.22.1/podwrapper.pl
\
--section 1 \
--man guestfs-release-notes.1 \
--text guestfs-release-notes.txt \
--html ./html/guestfs-release-notes.1.html \
--license GPLv2+ \
guestfs-release-notes.pod
podwrapper.pl: wrote guestfs-release-notes.1
Wide character in print at
/home/ebal/dnl/PKGBUILDs/kvm/libguestfs/src/libguestfs-1.22.1/podwrapper.pl
line 506.
podwrapper.pl: wrote ./html/guestfs-release-notes.1.html
This shouldn't happen at /usr/share/perl5/core_perl/Text/Wrap.pm line 84.
make[2]: *** [stamp-guestfs-release-notes.pod] Error 25
make[2]: Leaving directory
`/opt/dnl/PKGBUILDs/kvm/libguestfs/src/libguestfs-1.22.1'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/opt/dnl/PKGBUILDs/kvm/libguestfs/src/libguestfs-1.22.1'
make: *** [all] Error 2
--
Evaggelos Balaskas - Unix System Engineer
http://gr.linkedin.com/in/evaggelosbalaskas
11 years, 7 months
hivex: revert much of " Build and test Perl bindings out-of-tree." (887466794a40f57b84ce32524e1a650d6674c7e6)?
by Hilko Bengen
While trying to build the official Debian packages for libguestfs 1.22,
I noticed that instead of working around ExtUtils::MakeMaker's
limitations, I had made quite a mess of building the Perl bindings. I
have tried from different sides to fix things, but could not get it
quite right:
- EU::MM expects Makefile.PL to be in the same directory as the generated
Makefile (We work around that using sed.)
- In principle, there seem to be two ways to do things:
1. Call make -f builddir/Makefile-pl from srcdir (that's what we do
now), override INST_*. Problems with this:
- XS is still built in srcdir.
- there is actually code in ExtUtils::Install which is used from the
generated Makefile-pl that bases its decisions where to install
*.pm files on whether there are any files within ./blib/arch/
(hard-coded)! I have found no way to override this.
2. Call make -f Makefile-pl from builddir. I tried that and thought
that I would be able to patch absolute paths for source files
(*.xs, lib/*) and generated files (*.c, *.xs, blib/*) into the
generated Makefile-pl. Much of a perfectly good weekend went to
waste over that attempt.
I realized that I was actively working against ExtUtils::MakeMaker's
design. Separating source and build trees has never been a concern. Even
if I got it right once, I'd expect things to break in interesting ways
in the future.
>From a look at the documentation, Module::Build does not seem to have a
solution, either.
I give up and propose that we go back to the hackish, yet simple
previous solution and adopt that for libguestfs as well:
-[ $(srcdir) != $(builddir) ] && cp -rsu $(abs_srcdir)/. $(builddir)/.
I agree that this is ugly, but works and it won't hurt when building
libguestfs from within the source directory.
Cheers,
-Hilko
11 years, 7 months
Plan for libguestfs 1.22
by Richard W.M. Jones
It has been 5 months since the last stable release of libguestfs and
over that time we've accumulated many exciting new features:
http://libguestfs.org/guestfs-release-notes.1.html#release-notes-for-libg...
It's time to plan for the release of libguestfs 1.22.
As usual, bugs which have "1.22" (without quotes) in the devel
whiteboard field are nominated as blockers for the release. You can
see a list of those here, currently empty:
https://bugzilla.redhat.com/buglist.cgi?query_format=advanced&field0-0-0=...
or http://tinyurl.com/n7agtte
For a list of all bugs, go to:
https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virt...
If there are any other features / blockers / problems that need to be
addressed, let me know.
I will also be releasing Ubuntu packages (on libguestfs.org, not in a
PPA) at the same time as the release.
This release will also be the basis for Fedora 19 and RHEL 7.0.
When this release comes out, 1.16 and 1.18 branches will cease to be
supported.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW
11 years, 7 months
"make check" hangs after running for a little while
by Kashyap Chamarthy
That's what I issued and hit the hay last night.
$ make -k check LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1 |& tee /tmp/log
I woke up to see the tests still hung like that on stdout
--------------------------
[...]
make -C ../src guestfs_protocol.c
[0/9008]
make[3]: Entering directory `/home/kashyap/src/libguestfs/src'
! test -f ../generator/Makefile || \
make -C ../generator stamp-generator
make[4]: Entering directory `/home/kashyap/src/libguestfs/generator'
make[4]: `stamp-generator' is up to date.
make[4]: Leaving directory `/home/kashyap/src/libguestfs/generator'
make[3]: Leaving directory `/home/kashyap/src/libguestfs/src'
make -C ../src guestfs_protocol.h
make[3]: Entering directory `/home/kashyap/src/libguestfs/src'
! test -f ../generator/Makefile || \
make -C ../generator stamp-generator
make[4]: Entering directory `/home/kashyap/src/libguestfs/generator'
make[4]: `stamp-generator' is up to date.
make[4]: Leaving directory `/home/kashyap/src/libguestfs/generator'
make[3]: Leaving directory `/home/kashyap/src/libguestfs/src'
! test -f ../generator/Makefile || \
make -C ../generator stamp-generator
make[3]: Entering directory `/home/kashyap/src/libguestfs/generator'
make[3]: `stamp-generator' is up to date.
make[3]: Leaving directory `/home/kashyap/src/libguestfs/generator'
make[2]: Leaving directory `/home/kashyap/src/libguestfs/daemon'
make[1]: Leaving directory `/home/kashyap/src/libguestfs/daemon'
Making check in appliance
make[1]: Entering directory `/home/kashyap/src/libguestfs/appliance'
rm -f supermin.d/udev-rules.img supermin.d/udev-rules.img-t
rm -rf tmp-u
mkdir -p tmp-u/etc/udev/rules.d
for f in 99-guestfs-serial.rules; do ln $f tmp-u/etc/udev/rules.d/$(basename $f); done
( cd tmp-u && find | cpio --quiet -o -H newc ) > supermin.d/udev-rules.img-t
rm -rf tmp-u
mv supermin.d/udev-rules.img-t supermin.d/udev-rules.img
rm -f supermin.d/daemon.img supermin.d/daemon.img-t
rm -rf tmp-d
mkdir -p tmp-d/usr/sbin tmp-d/etc
ln ../daemon/guestfsd tmp-d/usr/sbin/guestfsd
ln ./guestfsd.suppressions tmp-d/etc/guestfsd.suppressions
( cd tmp-d && find | cpio --quiet -o -H newc ) > supermin.d/daemon.img-t
rm -rf tmp-d
mv supermin.d/daemon.img-t supermin.d/daemon.img
make[1]: Leaving directory `/home/kashyap/src/libguestfs/appliance'
Making check in tests/qemu
make[1]: Entering directory `/home/kashyap/src/libguestfs/tests/qemu'
make check-TESTS
make[2]: Entering directory `/home/kashyap/src/libguestfs/tests/qemu'
--------------------------
I haven't investigated further, but just posting here, if someone has any known quirks or
some such.
--------------------------
$ git describe
1.21.39-8-g95ed494
--------------------------
Thanks.
--
/kashyap
11 years, 7 months
[PATCH 1/1] guestfish: Tab-complete single / double quoted filenames containing space -- add fish_completion_word_break_characters_hook
by Jan Lieskovsky
This patch introduces fish_completion_word_break_characters_hook - Readline's
rl_completion_word_break_hook for guestfish so tab-completion on / for single /
double quoted filenames containing space would be possible too - this covers
part:
"In addition:
><fs> ls "/Program Files/<tab>
doesn't show any files to complete."
from RH BZ#547488.
Thank you, Jan.
--
Jan iankko Lieskovsky
P.S.: Feel free to remove the comment lines, if you find them unnecessary.
P.S.#2: Have got a patch for completion of unquoted filenames containing space
too already, but need to give it further testing => will submit in
separated post later.
11 years, 7 months