[PATCH 0/3] v2 readline escaping functions
by mzatko@redhat.com
From: Maros Zatko <mzatko(a)redhat.com>
Helper functions for future support of backslash escaped spaces in filenames.
There are a few tests too. Changed according to review remarks.
Maros Zatko (3):
fish: rl.{c, h} - escaping functions for readline
fish: basic tests for readline escaping
autotools: add fish/test
Makefile.am | 1 +
configure.ac | 1 +
fish/rl.c | 158 ++++++++++++++++++++++++++++++++++++++++++++++++
fish/rl.h | 24 ++++++++
fish/test/Makefile.am | 34 +++++++++++
fish/test/testquoting.c | 93 ++++++++++++++++++++++++++++
6 files changed, 311 insertions(+)
create mode 100644 fish/rl.c
create mode 100644 fish/rl.h
create mode 100644 fish/test/Makefile.am
create mode 100644 fish/test/testquoting.c
--
1.9.3
10 years
[PATCH 0/2] hivex: small portability fixes
by Pino Toscano
Hi,
this small series cherry-picks a couple of the portability fixes
recently done in libguestfs to hivex.
There should be no actual change on Linux.
Thanks,
--
Pino
Pino Toscano (2):
normalize iconv handling
ruby: fix detection of ruby library
bootstrap | 1 +
configure.ac | 8 +++++++-
lib/utf16.c | 3 +--
3 files changed, 9 insertions(+), 3 deletions(-)
--
1.9.3
10 years
[PATCH] Use -ltinfo instead of -lncurses.
by Richard W.M. Jones
In tools except guestfish, we don't use ncurses, or even curses, just
2 termcap functions and a global variable. These are provided by
libtinfo, so just link to that.
In guestfish we use readline which needs ncurses. Leave that alone.
---
builder/Makefile.am | 2 +-
configure.ac | 12 ++++++------
customize/Makefile.am | 2 +-
mllib/Makefile.am | 6 +++---
resize/Makefile.am | 2 +-
sparsify/link.sh.in | 2 +-
sysprep/Makefile.am | 2 +-
v2v/link.sh.in | 2 +-
8 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/builder/Makefile.am b/builder/Makefile.am
index f747fc3..7b66afb 100644
--- a/builder/Makefile.am
+++ b/builder/Makefile.am
@@ -172,7 +172,7 @@ OCAMLCLIBS = \
-L../src/.libs -lutils \
-L../gnulib/lib/.libs -lgnu \
-pthread -lpthread \
- -lncurses -lcrypt
+ -ltinfo -lcrypt
if HAVE_OCAMLOPT
virt-builder: $(OBJECTS)
diff --git a/configure.ac b/configure.ac
index 3165e96..8916ebd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -355,14 +355,14 @@ struct sockaddr_un myaddr;
dnl tgetent, tputs and UP [sic] are all required. They come from libtinfo
dnl which is pulled in as a dependency of libncurses.
old_LIBS="$LIBS"
-AC_CHECK_LIB([ncurses], [tgetent], [], [
- AC_MSG_ERROR(['ncurses' library not found, or it doesn't contain 'tgetent'])
+AC_CHECK_LIB([tinfo], [tgetent], [], [
+ AC_MSG_ERROR(['libtinfo' library (usually part of ncurses) not found, or it doesn't contain 'tgetent'])
])
-AC_CHECK_LIB([ncurses], [tputs], [], [
- AC_MSG_ERROR(['ncurses' library not found, or it doesn't contain 'tputs'])
+AC_CHECK_LIB([tinfo], [tputs], [], [
+ AC_MSG_ERROR(['libtinfo' library (usually part of ncurses) not found, or it doesn't contain 'tputs'])
])
-AC_CHECK_LIB([ncurses], [UP], [], [
- AC_MSG_ERROR(['ncurses' library not found, or it doesn't contain 'UP'])
+AC_CHECK_LIB([tinfo], [UP], [], [
+ AC_MSG_ERROR(['libtinfo' library (usually part of ncurses) not found, or it doesn't contain 'UP'])
])
LIBS="$old_LIBS"
diff --git a/customize/Makefile.am b/customize/Makefile.am
index c945685..f9dccd5 100644
--- a/customize/Makefile.am
+++ b/customize/Makefile.am
@@ -124,7 +124,7 @@ OCAMLCFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR) $(OCAMLPACKAGES)
OCAMLOPTFLAGS = $(OCAMLCFLAGS)
OCAMLCLIBS = \
- $(LIBXML2_LIBS) $(LIBINTL) -lncurses -lcrypt \
+ $(LIBXML2_LIBS) $(LIBINTL) -ltinfo -lcrypt \
-L../src/.libs -lutils \
-L../gnulib/lib/.libs -lgnu
diff --git a/mllib/Makefile.am b/mllib/Makefile.am
index 567ff84..d248a72 100644
--- a/mllib/Makefile.am
+++ b/mllib/Makefile.am
@@ -99,7 +99,7 @@ OCAMLCFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR) $(OCAMLPACKAGES)
OCAMLOPTFLAGS = $(OCAMLCFLAGS)
OCAMLCLIBS = \
- $(LIBXML2_LIBS) $(LIBINTL) -lncurses -lcrypt \
+ $(LIBXML2_LIBS) $(LIBINTL) -ltinfo -lcrypt \
-L../src/.libs -lutils \
-L../gnulib/lib/.libs -lgnu
@@ -154,11 +154,11 @@ check_SCRIPTS = common_utils_tests
if HAVE_OCAMLOPT
common_utils_tests: common_gettext.cmx tty-c.o tTY.cmx common_utils.cmx common_utils_tests.cmx
$(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) \
- mlguestfs.cmxa -linkpkg $^ -cclib -lncurses -o $@
+ mlguestfs.cmxa -linkpkg $^ -cclib -ltinfo -o $@
else
common_utils_tests: common_gettext.cmo tty-c.o tTY.cmo common_utils.cmo common_utils_tests.cmo
$(OCAMLFIND) ocamlc $(OCAMLCFLAGS) \
- mlguestfs.cma -linkpkg $^ -cclib -lncurses -custom -o $@
+ mlguestfs.cma -linkpkg $^ -cclib -ltinfo -custom -o $@
endif
TESTS_ENVIRONMENT = $(top_builddir)/run --test
diff --git a/resize/Makefile.am b/resize/Makefile.am
index 3a7483c..f7aa9b4 100644
--- a/resize/Makefile.am
+++ b/resize/Makefile.am
@@ -71,7 +71,7 @@ OCAMLCFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR) $(OCAMLPACKAGES)
OCAMLOPTFLAGS = $(OCAMLCFLAGS)
OCAMLCLIBS = \
- $(LIBXML2_LIBS) $(LIBINTL) -lncurses \
+ $(LIBXML2_LIBS) $(LIBINTL) -ltinfo \
-L../src/.libs -lutils \
-L../gnulib/lib/.libs -lgnu
diff --git a/sparsify/link.sh.in b/sparsify/link.sh.in
index 50bcc1f..537e967 100644
--- a/sparsify/link.sh.in
+++ b/sparsify/link.sh.in
@@ -19,4 +19,4 @@
# Hack automake to link binary properly. There is no other way to add
# the -cclib parameter to the end of the command line.
-exec "$@" -linkpkg -cclib '-lncurses'
+exec "$@" -linkpkg -cclib '-ltinfo'
diff --git a/sysprep/Makefile.am b/sysprep/Makefile.am
index 58c63bb..70f677d 100644
--- a/sysprep/Makefile.am
+++ b/sysprep/Makefile.am
@@ -136,7 +136,7 @@ OCAMLCFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR) $(OCAMLPACKAGES)
OCAMLOPTFLAGS = $(OCAMLCFLAGS)
OCAMLCLIBS = \
- $(LIBXML2_LIBS) $(LIBINTL) -lncurses -lcrypt \
+ $(LIBXML2_LIBS) $(LIBINTL) -ltinfo -lcrypt \
-L../src/.libs -lutils \
-L../gnulib/lib/.libs -lgnu
diff --git a/v2v/link.sh.in b/v2v/link.sh.in
index d6313fe..d95a1dc 100644
--- a/v2v/link.sh.in
+++ b/v2v/link.sh.in
@@ -19,4 +19,4 @@
# Hack automake to link binary properly. There is no other way to add
# the -cclib parameter to the end of the command line.
-exec "$@" -linkpkg -cclib '-lutils -lncurses -lcrypt @LIBVIRT_LIBS@ @LIBXML2_LIBS@ @LIBINTL@ -lgnu'
+exec "$@" -linkpkg -cclib '-lutils -ltinfo -lcrypt @LIBVIRT_LIBS@ @LIBXML2_LIBS@ @LIBINTL@ -lgnu'
--
2.1.0
10 years
[PATCH 0/3] WIP readline escaping functions
by mzatko@redhat.com
From: Maros Zatko <hacxman(a)gmail.com>
Auxiliary functions for readline to support space character escaping
in filenames in future.
Escaping function is taken from fish.c (used to be parse_quoted_string)
plus its un-escaping counterpart. There are a few tests for both.
Maros Zatko (3):
fish: rl.{c,h} - escaping functions for readline
fish: basic tests for readline escaping
autotools: add fish/test
Makefile.am | 1 +
configure.ac | 1 +
fish/rl.c | 158 ++++++++++++++++++++++++++++++++++++++++++++++++
fish/rl.h | 32 ++++++++++
fish/test/Makefile.am | 39 ++++++++++++
fish/test/testquoting.c | 120 ++++++++++++++++++++++++++++++++++++
6 files changed, 351 insertions(+)
create mode 100644 fish/rl.c
create mode 100644 fish/rl.h
create mode 100644 fish/test/Makefile.am
create mode 100644 fish/test/testquoting.c
--
1.9.3
10 years, 1 month
Re: [Libguestfs] Missing libguestfs-winsupport in EL7
by Richard W.M. Jones
On Wed, Nov 05, 2014 at 05:42:24PM +0000, Craig Schenk wrote:
> Hi, the libguestfs-winsupport RPM seems gone from EL7 (I've checked
> RHEL, CentOS, Oracle Linux and Scientific and all have an existence
> underflow condition for that package). There seems to alternate way
> to guestmount or do other libguestfs operations on an NTFS qcow2
> image, and all return an error including:
[...]
I know. There is a bug open about this.
In the meantime I have put libguestfs-winsupport RPMs here:
http://people.redhat.com/~rjones/libguestfs-winsupport/
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW
10 years, 1 month
[PATCH 0/9] Small bits of non-Linux porting - #2
by Pino Toscano
Hi,
continuing what started a couple of weeks ago [1], the attached patch
series continues the work in making it easier to build and run
libguestfs (in fixed appliance mode) on OSes different than Linux.
The provided changes should cause no functional changes on Linux.
[1] https://www.redhat.com/archives/libguestfs/2014-October/msg00176.html
Thanks,
--
Pino
Pino Toscano (9):
build: check for UNIX_PATH_MAX, and properly define it if not
src: launch: cast the sockaddr args to sockaddr*
build: check for libintl, and use it
builder: fix inclusion of <config.h> in lex-generated source
build: isolate the libdb tools search in an own autoconf macro
test-charset-fidelity: use and link against gnulib
python: fix detection of libpython features
ruby: fix detection of ruby library
tests/qemu: isolate MD5 calculation in an own shared function
align/Makefile.am | 1 +
builder/Makefile.am | 2 ++
builder/index-scan.l | 4 ++-
cat/Makefile.am | 4 +++
configure.ac | 51 ++++++++++++++++++++++++++---------
customize/Makefile.am | 2 +-
df/Makefile.am | 1 +
diff/Makefile.am | 1 +
edit/Makefile.am | 1 +
erlang/Makefile.am | 1 +
fish/Makefile.am | 1 +
format/Makefile.am | 1 +
fuse/Makefile.am | 4 +++
inspector/Makefile.am | 1 +
m4/guestfs-find-db-tool.m4 | 42 +++++++++++++++++++++++++++++
make-fs/Makefile.am | 1 +
mllib/Makefile.am | 2 +-
ocaml/Makefile.am | 2 ++
rescue/Makefile.am | 1 +
resize/Makefile.am | 2 +-
src/Makefile.am | 6 +++--
src/guestfs-internal-all.h | 6 -----
src/launch-direct.c | 3 ++-
src/launch-libvirt.c | 5 ++--
src/launch-unix.c | 2 +-
sysprep/Makefile.am | 2 +-
test-tool/Makefile.am | 1 +
tests/c-api/Makefile.am | 4 +++
tests/charsets/Makefile.am | 5 +++-
tests/events/Makefile.am | 1 +
tests/qemu/Makefile.am | 3 +++
tests/qemu/guestfs-md5.sh | 30 +++++++++++++++++++++
tests/qemu/qemu-liveness.sh | 6 +++--
tests/qemu/qemu-snapshot-isolation.sh | 14 +++++-----
v2v/link.sh.in | 2 +-
35 files changed, 175 insertions(+), 40 deletions(-)
create mode 100644 m4/guestfs-find-db-tool.m4
create mode 100755 tests/qemu/guestfs-md5.sh
--
1.9.3
10 years, 1 month
[PATCH] Fix, simplify out-of-tree build/install for bash completions
by Hilko Bengen
---
bash/Makefile.am | 54 +++++++++++++++---------------------------------------
1 file changed, 15 insertions(+), 39 deletions(-)
diff --git a/bash/Makefile.am b/bash/Makefile.am
index 10f0861..780da64 100644
--- a/bash/Makefile.am
+++ b/bash/Makefile.am
@@ -21,6 +21,10 @@ scripts = \
guestfish \
guestmount \
virt-alignment-scan \
+ virt-rescue \
+ virt-resize
+
+symlinks = \
virt-builder \
virt-cat \
virt-df \
@@ -30,53 +34,21 @@ scripts = \
virt-inspector \
virt-log \
virt-ls \
- virt-rescue \
- virt-resize \
virt-sparsify \
virt-sysprep
# Note: Don't distribute the symbolic links, only the real files.
EXTRA_DIST = \
README \
- guestfish \
- guestmount \
- virt-alignment-scan \
- virt-rescue \
- virt-resize
+ $(scripts)
# Some of the scripts are simply symbolic links.
-virt-cat:
- rm -f $@
- $(LN_S) virt-alignment-scan $@
-virt-df:
- rm -f $@
- $(LN_S) virt-alignment-scan $@
-virt-edit:
- rm -f $@
- $(LN_S) virt-alignment-scan $@
-virt-filesystems:
- rm -f $@
- $(LN_S) virt-alignment-scan $@
-virt-format:
- rm -f $@
- $(LN_S) virt-alignment-scan $@
-virt-inspector:
- rm -f $@
- $(LN_S) virt-alignment-scan $@
-virt-log:
- rm -f $@
- $(LN_S) virt-alignment-scan $@
-virt-ls:
- rm -f $@
- $(LN_S) virt-alignment-scan $@
-virt-sysprep:
+virt-cat virt-df virt-edit virt-filesystems virt-format virt-inspector \
+virt-log virt-ls virt-sysprep:
rm -f $@
$(LN_S) virt-alignment-scan $@
-virt-builder:
- rm -f $@
- $(LN_S) virt-resize $@
-virt-sparsify:
+virt-builder virt-sparsify:
rm -f $@
$(LN_S) virt-resize $@
@@ -87,10 +59,14 @@ if HAVE_BASH_COMPLETION
bashcompletiondir = $(BASH_COMPLETIONS_DIR)
#bashcompletion_DATA = $(scripts)
-all-local: $(scripts)
+all-local: $(scripts) $(symlinks)
+ test $(srcdir) != $(builddir) && cd $(srcdir) && cp $(scripts) $(abs_builddir)/
-install-data-local: $(scripts)
+install-data-local:
$(mkdir_p) $(DESTDIR)$(bashcompletiondir)
- cp -d $(scripts) $(DESTDIR)$(bashcompletiondir)
+ cp -d $(scripts) $(symlinks) $(DESTDIR)$(bashcompletiondir)
+
+clean-local:
+ test $(srcdir) != $(builddir) && rm -f $(symlinks) $(scripts)
endif
--
2.1.1
10 years, 1 month
Large Dependency List on Ubuntu Server 14
by Joshua Padilla
Forgive me if this is the wrong area to ask this question. I'm happy to
inquire to a diff list if that's better.
From:
http://libguestfs.org/
"Downloads
For source see the downloads directory.
In Fedora or Red Hat Enterprise Linux:
sudo yum install libguestfs-tools
On Debian/Ubuntu:
sudo apt-get install libguestfs-tools
Open a disk image:
guestfish --ro -i -a disk.img
Other distros, compiling from source ..."
So on Ubunu Server 14:
~:% sudo apt-get install libguestfs-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
apt-xapian-index aptitude aptitude-common binutils btrfs-tools dosfstools
fontconfig-config ghostscript gsfonts icoutils jfsutils ldmtool
libauthen-sasl-perl libboost-iostreams1.54.0 libclass-accessor-perl
libconfig9 libcups2 libcupsfilters1 libcupsimage2 libcwidget3
libencode-locale-perl libept1.4.12 libfile-listing-perl libfont-afm-perl
libfontconfig1 libgs9 libgs9-common libguestfs-perl libguestfs0 libhivex0
libhtml-form-perl libhtml-format-perl libhtml-parser-perl
libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl
libhttp-daemon-perl libhttp-date-perl libhttp-message-perl
libhttp-negotiate-perl libijs-0.35 libintl-perl libio-html-perl
libio-socket-inet6-perl libio-socket-ssl-perl libio-string-perl libjbig0
libjbig2dec0 libjson-glib-1.0-0 libjson-glib-1.0-common liblcms2-2
libldm-1.0-0 liblwp-mediatypes-perl liblwp-protocol-https-perl liblzo2-2
libmailtools-perl libnet-http-perl libnet-smtp-ssl-perl libnet-ssleay-perl
libnetpbm10 libpaper-utils libpaper1 libparse-debianchangelog-perl
libsigc++-2.0-0c2a libsocket6-perl libstring-shellquote-perl
libsub-name-perl libsys-virt-perl libtiff5 libtimedate-perl liburi-perl
libwin-hivex-perl libwww-perl libwww-robotrules-perl libxapian22
libxml-parser-perl libxml-xpath-perl netpbm poppler-data python-xapian
reiserfsprogs scrub supermin xfsprogs zerofree zfs-fuse
Suggested packages:
app-install-data python-xdg aptitude-doc-en aptitude-doc tasksel debtags
binutils-doc ghostscript-x hpijs libterm-readline-gnu-perl
libterm-readline-perl-perl libdigest-hmac-perl libgssapi-perl cups-common
libcwidget-dev fonts-droid libdata-dump-perl libintl-xs-perl
liblcms2-utils
libcrypt-ssleay-perl libhtml-template-perl libxml-simple-perl
libauthen-ntlm-perl xapian-tools poppler-utils fonts-japanese-mincho
fonts-ipafont-mincho fonts-japanese-gothic fonts-ipafont-gothic
fonts-arphic-ukai fonts-arphic-uming fonts-unfonts-core xapian-doc xfsdump
attr quota nfs-kernel-server kpartx
The following NEW packages will be installed:
apt-xapian-index aptitude aptitude-common binutils btrfs-tools dosfstools
fontconfig-config ghostscript gsfonts icoutils jfsutils ldmtool
libauthen-sasl-perl libboost-iostreams1.54.0 libclass-accessor-perl
libconfig9 libcups2 libcupsfilters1 libcupsimage2 libcwidget3
libencode-locale-perl libept1.4.12 libfile-listing-perl libfont-afm-perl
libfontconfig1 libgs9 libgs9-common libguestfs-perl libguestfs-tools
libguestfs0 libhivex0 libhtml-form-perl libhtml-format-perl
libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl
libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl
libhttp-message-perl libhttp-negotiate-perl libijs-0.35 libintl-perl
libio-html-perl libio-socket-inet6-perl libio-socket-ssl-perl
libio-string-perl libjbig0 libjbig2dec0 libjson-glib-1.0-0
libjson-glib-1.0-common liblcms2-2 libldm-1.0-0 liblwp-mediatypes-perl
liblwp-protocol-https-perl liblzo2-2 libmailtools-perl libnet-http-perl
libnet-smtp-ssl-perl libnet-ssleay-perl libnetpbm10 libpaper-utils
libpaper1
libparse-debianchangelog-perl libsigc++-2.0-0c2a libsocket6-perl
libstring-shellquote-perl libsub-name-perl libsys-virt-perl libtiff5
libtimedate-perl liburi-perl libwin-hivex-perl libwww-perl
libwww-robotrules-perl libxapian22 libxml-parser-perl libxml-xpath-perl
netpbm poppler-data python-xapian reiserfsprogs scrub supermin xfsprogs
zerofree zfs-fuse
0 upgraded, 87 newly installed, 0 to remove and 0 not upgraded.
Need to get 26.9 MB of archives.
After this operation, 108 MB of additional disk space will be used.
Do you want to continue? [Y/n]
I'm thinking this might be better?
~:% sudo apt-get install --no-recommends libguestfs-tools
Also, does anyone know how long http://virt-tools.org has been down?
Thanks A bunch,
Josh Padilla
DevOps Engineer
Los Angeles, CA
10 years, 1 month
[PATCH] customize: firstboot: fix Linux log output
by Pino Toscano
Pass -a to each tee invocation, otherwise just the last one (so only for
the last script executed) will appear in the log file.
---
customize/firstboot.ml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/customize/firstboot.ml b/customize/firstboot.ml
index 89821f3..0b95708 100644
--- a/customize/firstboot.ml
+++ b/customize/firstboot.ml
@@ -50,8 +50,8 @@ d=%s/scripts
d_done=%s/scripts-done
logfile=~root/virt-sysprep-firstboot.log
-echo \"$0\" \"$@\" 2>&1 | tee $logfile
-echo \"Scripts dir: $d\" 2>&1 | tee $logfile
+echo \"$0\" \"$@\" 2>&1 | tee -a $logfile
+echo \"Scripts dir: $d\" 2>&1 | tee -a $logfile
if test \"$1\" = \"start\"
then
@@ -62,8 +62,8 @@ then
# move the script to the 'scripts-done' directory, so it is not
# executed again at the next boot
mv $f $d_done
- echo '=== Running' $f '===' 2>&1 | tee $logfile
- $d_done/$(basename $f) 2>&1 | tee $logfile
+ echo '=== Running' $f '===' 2>&1 | tee -a $logfile
+ $d_done/$(basename $f) 2>&1 | tee -a $logfile
fi
done
rm -f $d_done/*
--
1.9.3
10 years, 1 month