Fixes from the patch queue of the Debian package
Here are three patches that fix issues with out-of-tree building and one that uses Ruby's own autoconf stuff for determining how Ruby bindings should be built. Cheers, -Hilko
Apparently, the file will only be autogenerated in $(builddir) if it is not already present in $(srcdir). --- ruby/Makefile.am | 1 - ruby/Rakefile.in | 2 +- ruby/ext/guestfs/extconf.rb.in | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ruby/Makefile.am b/ruby/Makefile.am index 5b755e5..2ecb6a8 100644 --- a/ruby/Makefile.am +++ b/ruby/Makefile.am @@ -29,7 +29,6 @@ EXTRA_DIST = \ Rakefile.in \ README.rdoc \ doc/site/index.html \ - ext/guestfs/extconf.rb \ lib/guestfs.rb \ run-bindtests \ run-ruby-tests \ diff --git a/ruby/Rakefile.in b/ruby/Rakefile.in index f832abd..a74e191 100644 --- a/ruby/Rakefile.in +++ b/ruby/Rakefile.in @@ -39,7 +39,7 @@ end PKG_NAME='@PACKAGE_NAME@' PKG_VERSION='@PACKAGE_VERSION@' -EXT_CONF='@abs_srcdir@/ext/guestfs/extconf.rb' +EXT_CONF='@abs_builddir@/ext/guestfs/extconf.rb' MAKEFILE='@builddir@/ext/guestfs/Makefile' GUESTFS_MODULE='@builddir@/ext/guestfs/_guestfs.so' GUESTFS_SRC='@srcdir@/ext/guestfs/_guestfs.c' diff --git a/ruby/ext/guestfs/extconf.rb.in b/ruby/ext/guestfs/extconf.rb.in index e358551..b8bd74a 100644 --- a/ruby/ext/guestfs/extconf.rb.in +++ b/ruby/ext/guestfs/extconf.rb.in @@ -34,4 +34,4 @@ $CFLAGS = "@WARN_CFLAGS@ @WERROR_CFLAGS@" create_header -create_makefile(extension_name) +create_makefile(extension_name, "@abs_srcdir@") -- 1.7.10.4
Ruby ships its own config.h which may or may not define the same relevant constants as our autoconf-generated config.h. Instead of trying to specify the exact path to the wanted header file we may just as well simply use Ruby's autoconf-inspired checks and macros. --- configure.ac | 8 -------- generator/ruby.ml | 5 +++-- ruby/ext/guestfs/extconf.rb.in | 4 ++++ 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/configure.ac b/configure.ac index 6ecaf0c..6ed3609 100644 --- a/configure.ac +++ b/configure.ac @@ -1168,14 +1168,6 @@ AS_IF([test "x$enable_ruby" != "xno"],[ AC_MSG_RESULT([-l$libruby]) AC_CHECK_LIB([$libruby],[ruby_init], [have_libruby=1],[have_libruby=]) - - dnl Symbols that we substitute when missing. - AS_IF([test -n "$have_libruby"],[ - old_LIBS="$LIBS" - LIBS="$LIBS -l$libruby" - AC_CHECK_FUNCS([rb_hash_lookup]) - LIBS="$old_LIBS" - ]) ],[ AC_MSG_RESULT([not found]) ]) diff --git a/generator/ruby.ml b/generator/ruby.ml index 27f689b..573f172 100644 --- a/generator/ruby.ml +++ b/generator/ruby.ml @@ -35,8 +35,6 @@ let rec generate_ruby_c () = generate_header CStyle LGPLv2plus; pr "\ -#include <config.h> - #include <stdio.h> #include <stdlib.h> #include <stdint.h> @@ -700,6 +698,9 @@ Init__guestfs (void) e_Error = rb_define_class_under (m_guestfs, \"Error\", rb_eStandardError); #ifdef HAVE_RB_DEFINE_ALLOC_FUNC +#ifndef HAVE_TYPE_RB_ALLOC_FUNC_T +#define rb_alloc_func_t void* +#endif rb_define_alloc_func (c_guestfs, (rb_alloc_func_t) ruby_guestfs_create); #endif diff --git a/ruby/ext/guestfs/extconf.rb.in b/ruby/ext/guestfs/extconf.rb.in index b8bd74a..e049efb 100644 --- a/ruby/ext/guestfs/extconf.rb.in +++ b/ruby/ext/guestfs/extconf.rb.in @@ -33,5 +33,9 @@ $CFLAGS = "#{$CFLAGS} @CFLAGS@ -DGUESTFS_PRIVATE=1 " << "@WARN_CFLAGS@ @WERROR_CFLAGS@" +have_func("rb_hash_lookup") +have_func("rb_define_alloc_func") +have_type("rb_alloc_func_t") + create_header create_makefile(extension_name, "@abs_srcdir@") -- 1.7.10.4
--- perl/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/perl/Makefile.am b/perl/Makefile.am index b0f9b5c..750cc22 100644 --- a/perl/Makefile.am +++ b/perl/Makefile.am @@ -64,6 +64,8 @@ all: Makefile-pl src_deps $(MAKE) -f Makefile-pl Makefile-pl: Makefile.PL + # This hack is only used for out-of-tree builds + -[ $(srcdir) != $(builddir) ] && cp -rsu $(abs_srcdir)/. $(builddir)/. perl Makefile.PL INSTALLDIRS=$(INSTALLDIRS) PREFIX=$(prefix) # No! Otherwise it is deleted before the clean-local rule runs. -- 1.7.10.4
--- po-docs/Makefile.am | 6 +++--- po-docs/ja/Makefile.am | 16 ++++++++-------- po-docs/uk/Makefile.am | 16 ++++++++-------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/po-docs/Makefile.am b/po-docs/Makefile.am index b532683..1b1da88 100644 --- a/po-docs/Makefile.am +++ b/po-docs/Makefile.am @@ -51,15 +51,15 @@ libguestfs-docs.pot: po4a.conf --msgid-bugs-address libguestfs@redhat.com \ --copyright-holder "Red Hat Inc." \ po4a.conf - for f in `find $(linguas) -name '*.pod' -o -name '*.pl'`; do \ + for f in `cd $(srcdir); find $(linguas) -name '*.pod' -o -name '*.pl'`; do \ echo '=encoding utf8' > $$f.new; \ - awk 'FNR >= 14 { print }' < $$f >> $$f.new; \ + awk 'FNR >= 14 { print }' < $(srcdir)/$$f >> $$f.new; \ mv $$f.new $$f; \ done po4a.conf: podfiles rm -f $@-t - echo "[po_directory] ." >> $@-t + echo "[po_directory] $(srcdir)" >> $@-t echo >> $@-t for f in `cat podfiles`; do \ b=`basename -- $$f`; \ diff --git a/po-docs/ja/Makefile.am b/po-docs/ja/Makefile.am index 748ae5e..86991e9 100644 --- a/po-docs/ja/Makefile.am +++ b/po-docs/ja/Makefile.am @@ -66,7 +66,7 @@ MANPAGES = \ virt-tar-out.1 \ virt-win-reg.1 -podfiles := $(shell for f in `cat ../podfiles`; do basename $$f; done) +podfiles := $(shell for f in `cat $(top_srcdir)/po-docs/podfiles`; do basename $$f; done) # Ship the POD files and the translated manpages in the tarball. This # just simplifies building from the tarball, at a small cost in extra @@ -83,9 +83,9 @@ guestfs.3: guestfs.pod guestfs-actions.pod guestfs-availability.pod guestfs-stru --man $@ \ --section 3 \ --license LGPLv2+ \ - --insert $(srcdir)/guestfs-actions.pod:__ACTIONS__ \ - --insert $(srcdir)/guestfs-availability.pod:__AVAILABILITY__ \ - --insert $(srcdir)/guestfs-structs.pod:__STRUCTS__ \ + --insert $(builddir)/guestfs-actions.pod:__ACTIONS__ \ + --insert $(builddir)/guestfs-availability.pod:__AVAILABILITY__ \ + --insert $(builddir)/guestfs-structs.pod:__STRUCTS__ \ $< guestfish.1: guestfish.pod guestfish-actions.pod guestfish-commands.pod @@ -93,8 +93,8 @@ guestfish.1: guestfish.pod guestfish-actions.pod guestfish-commands.pod --no-strict-checks \ --man $@ \ --license GPLv2+ \ - --insert $(srcdir)/guestfish-actions.pod:__ACTIONS__ \ - --insert $(srcdir)/guestfish-commands.pod:__FISH_COMMANDS__ \ + --insert $(builddir)/guestfish-actions.pod:__ACTIONS__ \ + --insert $(builddir)/guestfish-commands.pod:__FISH_COMMANDS__ \ $< virt-sysprep.1: virt-sysprep.pod sysprep-extra-options.pod sysprep-operations.pod @@ -102,8 +102,8 @@ virt-sysprep.1: virt-sysprep.pod sysprep-extra-options.pod sysprep-operations.po --no-strict-checks \ --man $@ \ --license GPLv2+ \ - --insert sysprep-extra-options.pod:__EXTRA_OPTIONS__ \ - --insert sysprep-operations.pod:__OPERATIONS__ \ + --insert $(builddir)/sysprep-extra-options.pod:__EXTRA_OPTIONS__ \ + --insert $(builddir)/sysprep-operations.pod:__OPERATIONS__ \ $< %.1: %.pod diff --git a/po-docs/uk/Makefile.am b/po-docs/uk/Makefile.am index 748ae5e..86991e9 100644 --- a/po-docs/uk/Makefile.am +++ b/po-docs/uk/Makefile.am @@ -66,7 +66,7 @@ MANPAGES = \ virt-tar-out.1 \ virt-win-reg.1 -podfiles := $(shell for f in `cat ../podfiles`; do basename $$f; done) +podfiles := $(shell for f in `cat $(top_srcdir)/po-docs/podfiles`; do basename $$f; done) # Ship the POD files and the translated manpages in the tarball. This # just simplifies building from the tarball, at a small cost in extra @@ -83,9 +83,9 @@ guestfs.3: guestfs.pod guestfs-actions.pod guestfs-availability.pod guestfs-stru --man $@ \ --section 3 \ --license LGPLv2+ \ - --insert $(srcdir)/guestfs-actions.pod:__ACTIONS__ \ - --insert $(srcdir)/guestfs-availability.pod:__AVAILABILITY__ \ - --insert $(srcdir)/guestfs-structs.pod:__STRUCTS__ \ + --insert $(builddir)/guestfs-actions.pod:__ACTIONS__ \ + --insert $(builddir)/guestfs-availability.pod:__AVAILABILITY__ \ + --insert $(builddir)/guestfs-structs.pod:__STRUCTS__ \ $< guestfish.1: guestfish.pod guestfish-actions.pod guestfish-commands.pod @@ -93,8 +93,8 @@ guestfish.1: guestfish.pod guestfish-actions.pod guestfish-commands.pod --no-strict-checks \ --man $@ \ --license GPLv2+ \ - --insert $(srcdir)/guestfish-actions.pod:__ACTIONS__ \ - --insert $(srcdir)/guestfish-commands.pod:__FISH_COMMANDS__ \ + --insert $(builddir)/guestfish-actions.pod:__ACTIONS__ \ + --insert $(builddir)/guestfish-commands.pod:__FISH_COMMANDS__ \ $< virt-sysprep.1: virt-sysprep.pod sysprep-extra-options.pod sysprep-operations.pod @@ -102,8 +102,8 @@ virt-sysprep.1: virt-sysprep.pod sysprep-extra-options.pod sysprep-operations.po --no-strict-checks \ --man $@ \ --license GPLv2+ \ - --insert sysprep-extra-options.pod:__EXTRA_OPTIONS__ \ - --insert sysprep-operations.pod:__OPERATIONS__ \ + --insert $(builddir)/sysprep-extra-options.pod:__EXTRA_OPTIONS__ \ + --insert $(builddir)/sysprep-operations.pod:__OPERATIONS__ \ $< %.1: %.pod -- 1.7.10.4
I only found out about libguestfs-make-fixed-appliance after dh_install --fail-missing complained about localized manpages. So here are two more patches for small issues found while packaging libguestfs for Debian. Cheers, -Hilko
--- Makefile.am | 2 -- appliance/Makefile.am | 14 +++++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Makefile.am b/Makefile.am index 90e5431..c331b68 100644 --- a/Makefile.am +++ b/Makefile.am @@ -30,9 +30,7 @@ SUBDIRS += tests/data generator src examples po if ENABLE_DAEMON SUBDIRS += daemon endif -if ENABLE_APPLIANCE SUBDIRS += appliance -endif # Tests - order is important. if ENABLE_APPLIANCE diff --git a/appliance/Makefile.am b/appliance/Makefile.am index 19f01dc..187865e 100644 --- a/appliance/Makefile.am +++ b/appliance/Makefile.am @@ -35,12 +35,20 @@ superminfsdir = $(libdir)/guestfs/supermin.d fs_DATA = superminfs_DATA = \ - supermin.d/base.img \ - supermin.d/daemon.img \ supermin.d/init.img \ - supermin.d/hostfiles \ supermin.d/udev-rules.img +if ENABLE_DAEMON +superminfs_DATA += \ + supermin.d/daemon.img +endif + +if ENABLE_APPLIANCE +superminfs_DATA += \ + supermin.d/base.img \ + supermin.d/hostfiles +endif + # This used to be a configure-generated file (as is update.sh still). # However config.status always touches the destination file, which # means the appliance got rebuilt too often. -- 1.7.10.4
--- appliance/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appliance/Makefile.am b/appliance/Makefile.am index 187865e..9c85c69 100644 --- a/appliance/Makefile.am +++ b/appliance/Makefile.am @@ -108,7 +108,7 @@ supermin.d/udev-rules.img: 99-guestfs-serial.rules rm -f $@ $@-t rm -rf tmp-u mkdir -p tmp-u/etc/udev/rules.d - for f in $^; do ln $$f tmp-u/etc/udev/rules.d/$$f; done + for f in $^; do ln $$f tmp-u/etc/udev/rules.d/$$(basename $$f); done ( cd tmp-u && find | cpio --quiet -o -H newc ) > $@-t rm -rf tmp-u mv $@-t $@ -- 1.7.10.4
On Thu, Mar 07, 2013 at 10:15:21PM +0100, Hilko Bengen wrote:
I only found out about libguestfs-make-fixed-appliance after dh_install --fail-missing complained about localized manpages. So here are two more patches for small issues found while packaging libguestfs for Debian.
These two look fine as well. I will also push these (soon). Thanks, 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://people.redhat.com/~rjones/virt-top
On Thu, Mar 07, 2013 at 07:59:24PM +0100, Hilko Bengen wrote:
Here are three patches that fix issues with out-of-tree building and one that uses Ruby's own autoconf stuff for determining how Ruby bindings should be built.
Thanks for posting these, and if Debian are maintaining any out-of-tree patches that you think should go upstream, please post them any time you like! 3/4 looks like a hack, so I didn't apply that. 2/4 gives me this failure: _guestfs.c: In function 'rb_hash_lookup': _guestfs.c:76:30: error: 'struct RHash' has no member named 'tbl' _guestfs.c:76:19: error: passing argument 3 of 'st_lookup' discards 'volatile' qualifier from pointer target type [-Werror] In file included from /usr/include/ruby/intern.h:34:0, from /usr/include/ruby/ruby.h:1382, from /usr/include/ruby.h:32, from _guestfs.c:31: /usr/include/ruby/st.h:114:5: note: expected 'st_data_t *' but argument is of type 'volatile VALUE *' cc1: all warnings being treated as errors make[3]: *** [_guestfs.o] Error 1 However I have applied and will shortly push the other two. Thanks again, Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v
* Richard W.M. Jones:
On Thu, Mar 07, 2013 at 07:59:24PM +0100, Hilko Bengen wrote:
Here are three patches that fix issues with out-of-tree building and one that uses Ruby's own autoconf stuff for determining how Ruby bindings should be built.
Thanks for posting these, and if Debian are maintaining any out-of-tree patches that you think should go upstream, please post them any time you like!
Not sure. Some things still need to be installed to /usr/lib instead of /usr/lib/<triple>, even with Debian's multiarch approach. In Debian, Ruby packages are installed to the vendor_ruby path.
3/4 looks like a hack, so I didn't apply that.
Of course it's a hack.
2/4 gives me this failure:
_guestfs.c: In function 'rb_hash_lookup': _guestfs.c:76:30: error: 'struct RHash' has no member named 'tbl' _guestfs.c:76:19: error: passing argument 3 of 'st_lookup' discards volatile' qualifier from pointer target type [-Werror] In file included from /usr/include/ruby/intern.h:34:0, from /usr/include/ruby/ruby.h:1382, from /usr/include/ruby.h:32, from _guestfs.c:31: /usr/include/ruby/st.h:114:5: note: expected 'st_data_t *' but argument is of type 'volatile VALUE *' cc1: all warnings being treated as errors make[3]: *** [_guestfs.o] Error 1
Fantastic. What version of Ruby is this? 1.9.3? Cheers, -Hilko
On Thu, Mar 07, 2013 at 10:42:50PM +0100, Hilko Bengen wrote:
* Richard W.M. Jones:
On Thu, Mar 07, 2013 at 07:59:24PM +0100, Hilko Bengen wrote:
Here are three patches that fix issues with out-of-tree building and one that uses Ruby's own autoconf stuff for determining how Ruby bindings should be built.
Thanks for posting these, and if Debian are maintaining any out-of-tree patches that you think should go upstream, please post them any time you like!
Not sure. Some things still need to be installed to /usr/lib instead of /usr/lib/<triple>, even with Debian's multiarch approach. In Debian, Ruby packages are installed to the vendor_ruby path.
Is there anything I can do upstream to help with this?
2/4 gives me this failure:
_guestfs.c: In function 'rb_hash_lookup': _guestfs.c:76:30: error: 'struct RHash' has no member named 'tbl' _guestfs.c:76:19: error: passing argument 3 of 'st_lookup' discards volatile' qualifier from pointer target type [-Werror] In file included from /usr/include/ruby/intern.h:34:0, from /usr/include/ruby/ruby.h:1382, from /usr/include/ruby.h:32, from _guestfs.c:31: /usr/include/ruby/st.h:114:5: note: expected 'st_data_t *' but argument is of type 'volatile VALUE *' cc1: all warnings being treated as errors make[3]: *** [_guestfs.o] Error 1
Fantastic. What version of Ruby is this? 1.9.3?
Indeed, it's 1.9.3: ruby-1.9.3.392-29.fc18.x86_64 Debian is on 1.9.1 IIRC? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
* Richard W.M. Jones:
Not sure. Some things still need to be installed to /usr/lib instead of /usr/lib/<triple>, even with Debian's multiarch approach. In Debian, Ruby packages are installed to the vendor_ruby path. Is there anything I can do upstream to help with this?
I'll post the patches for discussion; see for yourself.
Fantastic. What version of Ruby is this? 1.9.3?
Indeed, it's 1.9.3:
ruby-1.9.3.392-29.fc18.x86_64
Debian is on 1.9.1 IIRC?
Uh, that's interesting. Actually, it's 1.9.3. The package name is ruby1.9.1; the package's version number is 1.9.3.194-8. In any case, the piece of code that causes the compiler error should only be compiled if HAVE_RB_HASH_LOOKUP is not defined. The comment directly above tells me that this is "[f]or RHEL 5 (Ruby 1.8.5)". Cheers, -Hilko
On Fri, Mar 08, 2013 at 11:20:05AM +0100, Hilko Bengen wrote:
In any case, the piece of code that causes the compiler error should only be compiled if HAVE_RB_HASH_LOOKUP is not defined. The comment directly above tells me that this is "[f]or RHEL 5 (Ruby 1.8.5)".
I'll dig into this a bit more. It may be that I didn't "make clean" enough. 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://people.redhat.com/~rjones/virt-df/
The problem is: top_srcdir=$(pwd)/..; top_builddir=$(pwd)/..; export ARCHFLAGS="-arch $(uname -m)"; mkdir -p ./ext/guestfs; cd ./ext/guestfs; ruby /home/rjones/d/libguestfs/ruby/ext/guestfs/extconf.rb --with-_guestfs-include=$top_srcdir/src:$top_builddir --with-_guestfs-lib=$top_builddir/src/.libs checking for guestfs.h... yes checking for guestfs_create() in -lguestfs... yes checking for rb_hash_lookup()... no <---- note checking for rb_define_alloc_func()... no <---- note checking for rb_alloc_func_t... yes creating extconf.h creating Makefile This appears to be caused by the relative placement of the have_func() calls and setting CFLAGS. I moved the CFLAGS setting afterwards and it magically fixed itself and now works: https://github.com/libguestfs/libguestfs/commit/0ee24ccf8adb080260a5bb426059... Note I also added back the #include <config.h>. Although that header no longer contains HAVE_* definitions related to Ruby, it does contain a few things like _GNU_SOURCE which we might need, and in any case including it doesn't seem to break anything. Thanks, Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
Right now I am building 1.20.4-1 right now for Debian/unstable. I am happy that my patch queue for the package is down to the six patches: 1/6: Make sure that /run exists. I'm not really sure where this needs to be fixed. Gut feeling says: supermin helper. 2/6: TBH, I don't remember what systemd-related symptom was fixed by this patch. 3/6: This one has been rejected, more than once, I believe. This is the only patch that's needed for out-of-tree builds that I'm currently aware of. Unfortunately, I haven't found a better way yet to build and test the Perl bindings out-of-tree. 4/6: Ruby sitelibdir, sitearchdir point to /usr/local/lib/site_ruby/* on Debian. I suppose this should not be picked up upstream because the site-local directory is exactly the place one should be installing to when not using a packaging system. At the same time, I wonder if there's a better way to specify/override this. 5/6: With multiarch enabled, ${libdir}/guestfs translates to /usr/lib/x86_64-linux-gnu/guestfs on amd64 systems. This patch makes sure that the guestfs appliance stays in /usr/liba 6/6: same multiarch fix for Erlang bindings
From: Hilko Bengen <bengen@debian.org> --- appliance/init | 3 +++ 1 file changed, 3 insertions(+) diff --git a/appliance/init b/appliance/init index dee4efc..6d80996 100755 --- a/appliance/init +++ b/appliance/init @@ -18,6 +18,9 @@ mount -t proc /proc /proc if [ ! -d /sys ]; then rm -f /sys; fi mkdir -p /sys mount -t sysfs /sys /sys +# taken from initramfs-tools/init --Hilko Bengen +mkdir -p /run +mount -t tmpfs -o "nosuid,size=20%,mode=0755" tmpfs /run mkdir -p /run/lock # devtmpfs is required since udev 176 -- 1.7.10.4
On Wed, Mar 13, 2013 at 09:13:04PM +0100, Hilko Bengen wrote:
From: Hilko Bengen <bengen@debian.org>
--- appliance/init | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/appliance/init b/appliance/init index dee4efc..6d80996 100755 --- a/appliance/init +++ b/appliance/init @@ -18,6 +18,9 @@ mount -t proc /proc /proc if [ ! -d /sys ]; then rm -f /sys; fi mkdir -p /sys mount -t sysfs /sys /sys +# taken from initramfs-tools/init --Hilko Bengen +mkdir -p /run +mount -t tmpfs -o "nosuid,size=20%,mode=0755" tmpfs /run mkdir -p /run/lock
# devtmpfs is required since udev 176 -- 1.7.10.4
Thanks -- pushed. 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#)
From: Hilko Bengen <bengen@debian.org> --- appliance/make.sh.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/appliance/make.sh.in b/appliance/make.sh.in index 50c60f1..e198b05 100755 --- a/appliance/make.sh.in +++ b/appliance/make.sh.in @@ -65,4 +65,7 @@ if grep -q /usr/share/augeas/lenses supermin.d/hostfiles-t; then echo "/usr/share/augeas/lenses/*.aug" >> supermin.d/hostfiles-t fi +# Make sure that /init can be run on systemd-enabled Debian systems +echo '/lib/lsb/*' >> supermin.d/hostfiles-t + mv supermin.d/hostfiles-t supermin.d/hostfiles -- 1.7.10.4
From: Hilko Bengen <bengen@debian.org> --- perl/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/perl/Makefile.am b/perl/Makefile.am index b0f9b5c..55466ec 100644 --- a/perl/Makefile.am +++ b/perl/Makefile.am @@ -64,6 +64,7 @@ all: Makefile-pl src_deps $(MAKE) -f Makefile-pl Makefile-pl: Makefile.PL + -[ $(srcdir) != $(builddir) ] && cp -rsu $(abs_srcdir)/. $(builddir)/. perl Makefile.PL INSTALLDIRS=$(INSTALLDIRS) PREFIX=$(prefix) # No! Otherwise it is deleted before the clean-local rule runs. -- 1.7.10.4
From: Hilko Bengen <bengen@debian.org> --- ruby/Makefile.am | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ruby/Makefile.am b/ruby/Makefile.am index 2ecb6a8..7fa7971 100644 --- a/ruby/Makefile.am +++ b/ruby/Makefile.am @@ -50,14 +50,14 @@ all: $(generator_built) $(RAKE) build $(RAKE) rdoc -RUBY_SITELIB := $(shell $(RUBY) -rrbconfig -e "puts RbConfig::CONFIG['sitelibdir']") -RUBY_SITEARCH := $(shell $(RUBY) -rrbconfig -e "puts RbConfig::CONFIG['sitearchdir']") +RUBY_VENDORLIB := $(shell $(RUBY) -rrbconfig -e "puts RbConfig::CONFIG['vendorlibdir']") +RUBY_VENDORARCH := $(shell $(RUBY) -rrbconfig -e "puts RbConfig::CONFIG['vendorarchdir']") install: - $(MKDIR_P) $(DESTDIR)$(RUBY_SITELIB) - $(MKDIR_P) $(DESTDIR)$(RUBY_SITEARCH) - $(INSTALL) -p -m 0644 $(srcdir)/lib/guestfs.rb $(DESTDIR)$(RUBY_SITELIB) - $(INSTALL) -p -m 0755 $(builddir)/ext/guestfs/_guestfs.so $(DESTDIR)$(RUBY_SITEARCH) + $(MKDIR_P) $(DESTDIR)$(RUBY_VENDORLIB) + $(MKDIR_P) $(DESTDIR)$(RUBY_VENDORARCH) + $(INSTALL) -p -m 0644 $(srcdir)/lib/guestfs.rb $(DESTDIR)$(RUBY_VENDORLIB) + $(INSTALL) -p -m 0755 $(builddir)/ext/guestfs/_guestfs.so $(DESTDIR)$(RUBY_VENDORARCH) TESTS = run-bindtests run-ruby-tests -- 1.7.10.4
I pushed this patch which should make both your and my non-upstream Ruby patches obsolete: https://github.com/libguestfs/libguestfs/commit/87c9ec881cb695724e01d9f6fc9d... All you need to do is modify the make install command to add: make INSTALLDIRS=vendor install (which you should be doing anyway, because Perl bindings have always required it.) 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://people.redhat.com/~rjones/virt-top
From: Hilko Bengen <bengen@debian.org> The supermin appliance files are not installed to the multiarch lib directory. --- appliance/Makefile.am | 4 ++-- src/Makefile.am | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/appliance/Makefile.am b/appliance/Makefile.am index 9c85c69..7a30b0e 100644 --- a/appliance/Makefile.am +++ b/appliance/Makefile.am @@ -30,8 +30,8 @@ EXTRA_DIST = \ make.sh.in \ packagelist.in -fsdir = $(libdir)/guestfs -superminfsdir = $(libdir)/guestfs/supermin.d +fsdir = $(prefix)/lib/guestfs +superminfsdir = $(prefix)/lib/guestfs/supermin.d fs_DATA = superminfs_DATA = \ diff --git a/src/Makefile.am b/src/Makefile.am index 401b076..43ad424 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -116,7 +116,7 @@ libguestfs_la_SOURCES = \ libguestfs.syms libguestfs_la_CPPFLAGS = \ - -DGUESTFS_DEFAULT_PATH='"$(libdir)/guestfs"' \ + -DGUESTFS_DEFAULT_PATH='"$(prefix)/lib/guestfs"' \ -DGUESTFS_WARN_DEPRECATED=1 \ -DGUESTFS_PRIVATE=1 \ -DLIBOSINFO_DB_PATH='"$(datadir)/libosinfo/db"' \ -- 1.7.10.4
From: Hilko Bengen <bengen@debian.org> --- erlang/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erlang/Makefile.am b/erlang/Makefile.am index c7a52a9..a2c978f 100644 --- a/erlang/Makefile.am +++ b/erlang/Makefile.am @@ -30,7 +30,7 @@ EXTRA_DIST = \ if HAVE_ERLANG -erlang_bindir = $(libdir)/erlang/lib/$(PACKAGE_NAME)-$(PACKAGE_VERSION)/ebin +erlang_bindir = $(prefix)/lib/erlang/lib/$(PACKAGE_NAME)-$(PACKAGE_VERSION)/ebin erlang_bin_DATA = guestfs.beam -- 1.7.10.4
On Wed, Mar 13, 2013 at 09:13:09PM +0100, Hilko Bengen wrote:
From: Hilko Bengen <bengen@debian.org>
--- erlang/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/erlang/Makefile.am b/erlang/Makefile.am index c7a52a9..a2c978f 100644 --- a/erlang/Makefile.am +++ b/erlang/Makefile.am @@ -30,7 +30,7 @@ EXTRA_DIST = \
if HAVE_ERLANG
-erlang_bindir = $(libdir)/erlang/lib/$(PACKAGE_NAME)-$(PACKAGE_VERSION)/ebin +erlang_bindir = $(prefix)/lib/erlang/lib/$(PACKAGE_NAME)-$(PACKAGE_VERSION)/ebin
erlang_bin_DATA = guestfs.beam
After some discussion on #erlang, I got around to the fix below:
From e29a130d8f3dbf8eab23ae78aabc2d95e7f56470 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" <rjones@redhat.com> Date: Thu, 14 Mar 2013 12:47:40 +0000 Subject: [PATCH] erlang: Use $(ERLANG_LIB_DIR) to get Erlang libdir.
Instead of previous custom hack which didn't work properly on Debian. Thanks: Hilko Bengen. --- erlang/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erlang/Makefile.am b/erlang/Makefile.am index c7a52a9..f648a86 100644 --- a/erlang/Makefile.am +++ b/erlang/Makefile.am @@ -30,7 +30,7 @@ EXTRA_DIST = \ if HAVE_ERLANG -erlang_bindir = $(libdir)/erlang/lib/$(PACKAGE_NAME)-$(PACKAGE_VERSION)/ebin +erlang_bindir = $(ERLANG_LIB_DIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)/ebin erlang_bin_DATA = guestfs.beam -- 1.8.1.4 I'm just testing it on Debian, and if it works will push it upstream. 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://people.redhat.com/~rjones/virt-top
On Thu, Mar 14, 2013 at 12:50:36PM +0000, Richard W.M. Jones wrote:
-erlang_bindir = $(libdir)/erlang/lib/$(PACKAGE_NAME)-$(PACKAGE_VERSION)/ebin +erlang_bindir = $(ERLANG_LIB_DIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)/ebin
I should probably explain that ERLANG_LIB_DIR is defined because we already have `AC_ERLANG_SUBST_LIB_DIR' in configure.ac.
I'm just testing it on Debian, and if it works will push it upstream.
Works OK on Wheezy for me, so I pushed it. 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#)
On Wed, Mar 13, 2013 at 09:13:03PM +0100, Hilko Bengen wrote:
4/6: Ruby sitelibdir, sitearchdir point to /usr/local/lib/site_ruby/* on Debian. I suppose this should not be picked up upstream because the site-local directory is exactly the place one should be installing to when not using a packaging system. At the same time, I wonder if there's a better way to specify/override this.
We carry a similar sort of non-upstream patch in Fedora. You're right that the proper way to fix this would be something like './configure --with-ruby-libdir=vendor'
5/6: With multiarch enabled, ${libdir}/guestfs translates to /usr/lib/x86_64-linux-gnu/guestfs on amd64 systems. This patch makes sure that the guestfs appliance stays in /usr/liba
The appliance is actually arch-specific, so it could be that /usr/lib/x86_64-linux-gnu/guestfs is the right place for it to go. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
participants (2)
-
Hilko Bengen -
Richard W.M. Jones