A few out-of-tree build fixes
Here are a few patches that were needed to build the 1.18.0-1 packages for Debian. Cheers, -Hilko
--- gobject/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gobject/Makefile.am b/gobject/Makefile.am index be6d58e..f75bcf6 100644 --- a/gobject/Makefile.am +++ b/gobject/Makefile.am @@ -58,7 +58,7 @@ libguestfs_gobject_1_0_la_LIBADD = -lguestfs # in the subdirectory. install-data-hook: rm $(DESTDIR)$(includedir)/guestfs-gobject/guestfs-gobject.h - install -m 0644 include/guestfs-gobject.h $(DESTDIR)$(includedir) + install -m 0644 $(srcdir)/include/guestfs-gobject.h $(DESTDIR)$(includedir) -include $(INTROSPECTION_MAKEFILE) INTROSPECTION_GIRS = @@ -75,7 +75,7 @@ Guestfs-1.0.gir: $(libname) Guestfs_1_0_gir_INCLUDES = GObject-2.0 Gio-2.0 Guestfs_1_0_gir_CFLAGS = $(INCLUDES) -I$(srcdir)/include Guestfs_1_0_gir_LIBS = $(libname) -Guestfs_1_0_gir_FILES = $(introspection_sources) +Guestfs_1_0_gir_FILES = $(patsubst %,$(srcdir)/%,$(introspection_sources)) INTROSPECTION_GIRS += Guestfs-1.0.gir girdir = $(datadir)/gir-1.0 -- 1.7.10
On Thu, May 24, 2012 at 01:21:03AM +0200, Hilko Bengen wrote:
--- gobject/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gobject/Makefile.am b/gobject/Makefile.am index be6d58e..f75bcf6 100644 --- a/gobject/Makefile.am +++ b/gobject/Makefile.am @@ -58,7 +58,7 @@ libguestfs_gobject_1_0_la_LIBADD = -lguestfs # in the subdirectory. install-data-hook: rm $(DESTDIR)$(includedir)/guestfs-gobject/guestfs-gobject.h - install -m 0644 include/guestfs-gobject.h $(DESTDIR)$(includedir) + install -m 0644 $(srcdir)/include/guestfs-gobject.h $(DESTDIR)$(includedir)
-include $(INTROSPECTION_MAKEFILE) INTROSPECTION_GIRS = @@ -75,7 +75,7 @@ Guestfs-1.0.gir: $(libname) Guestfs_1_0_gir_INCLUDES = GObject-2.0 Gio-2.0 Guestfs_1_0_gir_CFLAGS = $(INCLUDES) -I$(srcdir)/include Guestfs_1_0_gir_LIBS = $(libname) -Guestfs_1_0_gir_FILES = $(introspection_sources) +Guestfs_1_0_gir_FILES = $(patsubst %,$(srcdir)/%,$(introspection_sources)) INTROSPECTION_GIRS += Guestfs-1.0.gir
girdir = $(datadir)/gir-1.0 -- 1.7.10
ACK. 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
--- gobject/Makefile.am | 5 ++++- gobject/run-live-tests | 26 ++++++++++++++++++++++++++ gobject/run-tests | 1 - 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100755 gobject/run-live-tests diff --git a/gobject/Makefile.am b/gobject/Makefile.am index f75bcf6..5211fe4 100644 --- a/gobject/Makefile.am +++ b/gobject/Makefile.am @@ -85,10 +85,13 @@ typelibdir = $(libdir)/girepository-1.0 typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) TESTS = run-tests +if ENABLE_APPLIANCE +TESTS += run-live-tests +endif ENABLE_APPLIANCE TESTS_ENVIRONMENT = GJS=$(GJS) $(TESTS): $(typelib_DATA) CLEANFILES += $(gir_DATA) $(typelib_DATA) -endif +endif HAVE_INTROSPECTION diff --git a/gobject/run-live-tests b/gobject/run-live-tests new file mode 100755 index 0000000..11e8f7b --- /dev/null +++ b/gobject/run-live-tests @@ -0,0 +1,26 @@ +#!/bin/sh - +# libguestfs GObject bindings +# Copyright (C) 2012 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 + +if [ -z "$GJS" ]; then + echo "GObject bind tests skipped: gjs is missing" + exit 0 +fi + +../run $GJS $srcdir/tests-misc.js 2>/dev/null diff --git a/gobject/run-tests b/gobject/run-tests index d2ce0a6..55c489c 100755 --- a/gobject/run-tests +++ b/gobject/run-tests @@ -26,4 +26,3 @@ fi ../run $GJS $srcdir/bindtests.js > bindtests.tmp diff -u ${srcdir}/../bindtests bindtests.tmp ../run $GJS $srcdir/bindtests-manual.js 2>/dev/null -../run $GJS $srcdir/tests-misc.js 2>/dev/null -- 1.7.10
On Thu, May 24, 2012 at 01:21:04AM +0200, Hilko Bengen wrote:
--- gobject/Makefile.am | 5 ++++- gobject/run-live-tests | 26 ++++++++++++++++++++++++++ gobject/run-tests | 1 - 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100755 gobject/run-live-tests
diff --git a/gobject/Makefile.am b/gobject/Makefile.am index f75bcf6..5211fe4 100644 --- a/gobject/Makefile.am +++ b/gobject/Makefile.am @@ -85,10 +85,13 @@ typelibdir = $(libdir)/girepository-1.0 typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
TESTS = run-tests +if ENABLE_APPLIANCE +TESTS += run-live-tests +endif ENABLE_APPLIANCE TESTS_ENVIRONMENT = GJS=$(GJS)
$(TESTS): $(typelib_DATA)
CLEANFILES += $(gir_DATA) $(typelib_DATA)
-endif +endif HAVE_INTROSPECTION
Can you also add 'run-live-tests' to EXTRA_DIST.
diff --git a/gobject/run-live-tests b/gobject/run-live-tests new file mode 100755 index 0000000..11e8f7b --- /dev/null +++ b/gobject/run-live-tests @@ -0,0 +1,26 @@ +#!/bin/sh - +# libguestfs GObject bindings +# Copyright (C) 2012 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 + +if [ -z "$GJS" ]; then + echo "GObject bind tests skipped: gjs is missing" + exit 0 +fi + +../run $GJS $srcdir/tests-misc.js 2>/dev/null diff --git a/gobject/run-tests b/gobject/run-tests index d2ce0a6..55c489c 100755 --- a/gobject/run-tests +++ b/gobject/run-tests @@ -26,4 +26,3 @@ fi ../run $GJS $srcdir/bindtests.js > bindtests.tmp diff -u ${srcdir}/../bindtests bindtests.tmp ../run $GJS $srcdir/bindtests-manual.js 2>/dev/null -../run $GJS $srcdir/tests-misc.js 2>/dev/null -- 1.7.10
With the change mentioned above, ACK. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones New in Fedora 11: Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 70 libraries supprt'd http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw
--- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 75c5ae0..d1ba577 100644 --- a/configure.ac +++ b/configure.ac @@ -815,7 +815,7 @@ AS_IF([test "x$OCAMLC" != "xno"],[ dnl Write gettext modules for each OCaml tool. If OCaml gettext dnl is not available then we write dummy functions. for program in resize sparsify sysprep; do - output=$program/${program}_gettext.ml + output=$builddir/$program/${program}_gettext.ml AC_MSG_NOTICE([creating $output]) rm -f $output -- 1.7.10
That patch is nonsense. $builddir is not defined, the "No such file or directory" messages I saw came from something else. -Hilko
--- po/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/po/Makefile.am b/po/Makefile.am index 90b23c1..c620d57 100644 --- a/po/Makefile.am +++ b/po/Makefile.am @@ -96,7 +96,7 @@ install-data-hook: for lang in $(linguas); do \ d=$(DESTDIR)$(langinstdir)/$$lang/LC_MESSAGES; \ mkdir -p $$d; \ - install -m 0755 $$lang.gmo $$d/$(DOMAIN).mo; \ + install -m 0755 $(srcdir)/$$lang.gmo $$d/$(DOMAIN).mo; \ done .PRECIOUS: $(DOMAIN).pot $(POFILES) -- 1.7.10
On Thu, May 24, 2012 at 01:21:06AM +0200, Hilko Bengen wrote:
--- po/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/po/Makefile.am b/po/Makefile.am index 90b23c1..c620d57 100644 --- a/po/Makefile.am +++ b/po/Makefile.am @@ -96,7 +96,7 @@ install-data-hook: for lang in $(linguas); do \ d=$(DESTDIR)$(langinstdir)/$$lang/LC_MESSAGES; \ mkdir -p $$d; \ - install -m 0755 $$lang.gmo $$d/$(DOMAIN).mo; \ + install -m 0755 $(srcdir)/$$lang.gmo $$d/$(DOMAIN).mo; \ done
.PRECIOUS: $(DOMAIN).pot $(POFILES) --
Since these (*.gmo) files are built, shouldn't they in fact be in builddir? Perhaps the problem is with these rules: POFILES := $(patsubst %,$(srcdir)/%.po,$(linguas)) ... cp $(srcdir)/*.po *.gmo $(distdir)/ The *.po files are generated during the build, but are really source files because (a) they go in the tarball and (b) they are modified by translators and the changes that the translators make are '.PRECIOUS'. 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/
* Richard W.M. Jones:
Since these (*.gmo) files are built, shouldn't they in fact be in builddir?
But they are shipped with the tarballs. So, shouldn't they be built in $(builddir)?
The *.po files are generated during the build, but are really source files because (a) they go in the tarball and (b) they are modified by translators and the changes that the translators make are '.PRECIOUS'.
Do you mean that the commands to rebuild the .po files always operate in $(srcdir)? -Hilko
On Wed, Jun 06, 2012 at 12:28:02PM +0200, Hilko Bengen wrote:
* Richard W.M. Jones:
Since these (*.gmo) files are built, shouldn't they in fact be in builddir?
But they are shipped with the tarballs. So, shouldn't they be built in $(builddir)?
I think you mean "shouldn't they be built in $(srcdir)?". Yes, that could be correct, unless we rely on people having 'msgfmt' installed.
The *.po files are generated during the build, but are really source files because (a) they go in the tarball and (b) they are modified by translators and the changes that the translators make are '.PRECIOUS'.
Do you mean that the commands to rebuild the .po files always operate in $(srcdir)?
Hopefully :-) The *.po files are an odd case. In reality they are managed by Transifex, so they can always be downloaded from there (using "tx pull" or preferably the "./tx-pull.sh" wrapper in the toplevel directory). However since pulling them is slow, people aren't expected to have the tx tools installed, and (most importantly) because Transifex prevents anonymous pulls, we bundle them in git and the tarball as if they were source files. 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
* Richard W.M. Jones:
I think you mean "shouldn't they be built in $(srcdir)?". Yes, that could be correct, unless we rely on people having 'msgfmt' installed.
Yes, I meant $(srcdir).
The *.po files are generated during the build, but are really source files because (a) they go in the tarball and (b) they are modified by translators and the changes that the translators make are '.PRECIOUS'.
Do you mean that the commands to rebuild the .po files always operate in $(srcdir)?
Hopefully :-)
So, is the patch I attached to the previous message okay? Cheers, -Hilko
On Thu, May 24, 2012 at 01:21:06AM +0200, Hilko Bengen wrote:
--- po/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/po/Makefile.am b/po/Makefile.am index 90b23c1..c620d57 100644 --- a/po/Makefile.am +++ b/po/Makefile.am @@ -96,7 +96,7 @@ install-data-hook: for lang in $(linguas); do \ d=$(DESTDIR)$(langinstdir)/$$lang/LC_MESSAGES; \ mkdir -p $$d; \ - install -m 0755 $$lang.gmo $$d/$(DOMAIN).mo; \ + install -m 0755 $(srcdir)/$$lang.gmo $$d/$(DOMAIN).mo; \ done
.PRECIOUS: $(DOMAIN).pot $(POFILES) -- 1.7.10
ACK, per the rest of the comments in this thread. Please push it, let's see what if anything breaks. 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
participants (2)
-
Hilko Bengen -
Richard W.M. Jones