[Pkg-libvirt-commits] [SCM] Libguestfs Debian packaging branch, master, updated. debian/1%1.16.18-1-109-g3c336e1

Hilko Bengen bengen at debian.org
Mon Apr 1 18:12:13 UTC 2013


The following commit has been merged in the master branch:
commit 1ebb023a1500ba49078df11d6a4dcebde7c3fdaf
Author: Hilko Bengen <bengen at debian.org>
Date:   Tue Feb 19 23:29:39 2013 +0100

    Updated patch queue
    
    - Dropped some patches picked up by upstream
    - Fixed some out-of-tree build failures
    - Added upstream patch to cope with automake < 1.12

diff --git a/debian/patches/0004-out-of-tree-build-daemon.patch b/debian/patches/0004-out-of-tree-build-daemon.patch
index b139f71..1af0314 100644
--- a/debian/patches/0004-out-of-tree-build-daemon.patch
+++ b/debian/patches/0004-out-of-tree-build-daemon.patch
@@ -1,25 +1,60 @@
 From: Hilko Bengen <bengen at debian.org>
-Date: Mon, 15 Aug 2011 00:48:11 +0200
+Date: Sat, 16 Feb 2013 12:36:34 +0100
 Subject: out-of-tree build: daemon
 
+- Add include path
+
+    CC     guestfsd-9p.o
+  In file included from ../../../daemon/9p.c:32:0:
+  ../../../daemon/daemon.h:33:34: fatal error: guestfs-internal-all.h: No such file or directory
+
+- Fix paths for shared source files so that they are found when building out-of-tree.
 ---
- daemon/Makefile.am |    4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
+ daemon/Makefile.am |   13 ++++++-------
+ 1 file changed, 6 insertions(+), 7 deletions(-)
 
 diff --git a/daemon/Makefile.am b/daemon/Makefile.am
-index 69699cb..06aaa29 100644
+index 024aa6a..6da6082 100644
 --- a/daemon/Makefile.am
 +++ b/daemon/Makefile.am
-@@ -42,10 +42,10 @@ noinst_LIBRARIES = libprotocol.a
- libprotocol_a_SOURCES = guestfs_protocol.c guestfs_protocol.h
- libprotocol_a_CFLAGS = -Wall -Wno-unused -fno-strict-aliasing
+@@ -19,8 +19,6 @@ include $(top_srcdir)/subdir-rules.mk
  
--guestfs_protocol.c: $(libsrcdir)/guestfs_protocol.c
-+guestfs_protocol.c: $(srcdir)/guestfs_protocol.c
- 	rm -f $@
- 	ln $< $@
--guestfs_protocol.h: $(libsrcdir)/guestfs_protocol.h
-+guestfs_protocol.h: $(srcdir)/guestfs_protocol.h
+ CLEANFILES = stamp-guestfsd.pod
+ 
+-libsrcdir = $(top_builddir)/src
+-
+ generator_built = \
+ 	actions.h \
+ 	stubs.c \
+@@ -42,7 +40,7 @@ EXTRA_DIST = \
+ 	$(BUILT_SOURCES) \
+ 	guestfsd.pod
+ 
+-$(shared_with_library): %: $(libsrcdir)/%
++$(shared_with_library): %: $(top_srcdir)/src/%
  	rm -f $@
  	ln $< $@
- $(libsrcdir)/guestfs_protocol.c: force
+ 
+@@ -53,10 +51,10 @@ noinst_LIBRARIES = libprotocol.a
+ libprotocol_a_SOURCES = guestfs_protocol.c guestfs_protocol.h
+ libprotocol_a_CFLAGS = -Wall -Wno-unused -fno-strict-aliasing
+ 
+-$(libsrcdir)/guestfs_protocol.c: force
+-	$(MAKE) -C $(libsrcdir) guestfs_protocol.c
+-$(libsrcdir)/guestfs_protocol.h: force
+-	$(MAKE) -C $(libsrcdir) guestfs_protocol.h
++$(top_builddir)/src/guestfs_protocol.c: force
++	$(MAKE) -C $(top_builddir)/src guestfs_protocol.c
++$(top_builddir)/src/guestfs_protocol.h: force
++	$(MAKE) -C $(top_builddir)/src guestfs_protocol.h
+ 
+ # Build the errnostring perfect hash code.  The generated code has lots
+ # of warnings so we must compile it in a separate mini-library.
+@@ -196,6 +194,7 @@ guestfsd_LDADD = \
+ guestfsd_CPPFLAGS = \
+ 	-I$(top_srcdir)/gnulib/lib \
+ 	-I$(top_builddir)/gnulib/lib \
++	-I$(top_srcdir)/src \
+ 	-I$(top_builddir)/src
+ guestfsd_CFLAGS = \
+ 	$(WARN_CFLAGS) $(WERROR_CFLAGS) \
diff --git a/debian/patches/0005-ruby-install-to-vendor_ruby.patch b/debian/patches/0005-ruby-install-to-vendor_ruby.patch
index 737d313..b617d8d 100644
--- a/debian/patches/0005-ruby-install-to-vendor_ruby.patch
+++ b/debian/patches/0005-ruby-install-to-vendor_ruby.patch
@@ -7,10 +7,10 @@ Subject: ruby: install to vendor_ruby.
  1 file changed, 6 insertions(+), 6 deletions(-)
 
 diff --git a/ruby/Makefile.am b/ruby/Makefile.am
-index 9073ad7..6534c83 100644
+index 5b755e5..3fbc9c9 100644
 --- a/ruby/Makefile.am
 +++ b/ruby/Makefile.am
-@@ -57,13 +57,13 @@ all: $(generator_built)
+@@ -51,14 +51,14 @@ all: $(generator_built)
  	$(RAKE) build
  	$(RAKE) rdoc
  
@@ -29,4 +29,5 @@ index 9073ad7..6534c83 100644
 +	$(INSTALL) -p -m 0644 $(srcdir)/lib/guestfs.rb $(DESTDIR)$(RUBY_VENDORLIB)
 +	$(INSTALL) -p -m 0755 $(builddir)/ext/guestfs/_guestfs.so $(DESTDIR)$(RUBY_VENDORARCH)
  
- endif
+ TESTS = run-bindtests run-ruby-tests
+ 
diff --git a/debian/patches/0006-Fix-guestfs-supermin-appliance-path.patch b/debian/patches/0006-Fix-guestfs-supermin-appliance-path.patch
index e320222..d22df49 100644
--- a/debian/patches/0006-Fix-guestfs-supermin-appliance-path.patch
+++ b/debian/patches/0006-Fix-guestfs-supermin-appliance-path.patch
@@ -24,15 +24,15 @@ index 19f01dc..169ea15 100644
  fs_DATA =
  superminfs_DATA = \
 diff --git a/src/Makefile.am b/src/Makefile.am
-index 1057245..3183ce4 100644
+index 2c3af05..a5cb8b1 100644
 --- a/src/Makefile.am
 +++ b/src/Makefile.am
-@@ -193,7 +193,7 @@ noinst_LTLIBRARIES = liberrnostring.la libprotocol.la
+@@ -196,7 +196,7 @@ noinst_LTLIBRARIES = liberrnostring.la libprotocol.la
  libguestfs_la_LIBADD += liberrnostring.la libprotocol.la
  
- libguestfs_la_CFLAGS = \
+ libguestfs_la_CPPFLAGS = \
 -	-DGUESTFS_DEFAULT_PATH='"$(libdir)/guestfs"' \
 +	-DGUESTFS_DEFAULT_PATH='"$(prefix)/lib/guestfs"' \
  	-DGUESTFS_WARN_DEPRECATED=1 \
- 	-DGUESTFS_PRIVATE_FUNCTIONS=1 \
+ 	-DGUESTFS_PRIVATE=1 \
  	-DLIBOSINFO_DB_PATH='"$(datadir)/libosinfo/db"' \
diff --git a/debian/patches/0008-erlang-Install-to-correct-directory.patch b/debian/patches/0007-erlang-Install-to-correct-directory.patch
similarity index 94%
rename from debian/patches/0008-erlang-Install-to-correct-directory.patch
rename to debian/patches/0007-erlang-Install-to-correct-directory.patch
index ddca60e..380ca1f 100644
--- a/debian/patches/0008-erlang-Install-to-correct-directory.patch
+++ b/debian/patches/0007-erlang-Install-to-correct-directory.patch
@@ -7,7 +7,7 @@ Subject: erlang: Install to correct directory
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/erlang/Makefile.am b/erlang/Makefile.am
-index 8c1e887..1f3782a 100644
+index b036b36..22fe6e5 100644
 --- a/erlang/Makefile.am
 +++ b/erlang/Makefile.am
 @@ -30,7 +30,7 @@ EXTRA_DIST = \
diff --git a/debian/patches/0007-erlang-fix-bindtests-for-out-of-tree-build.patch b/debian/patches/0007-erlang-fix-bindtests-for-out-of-tree-build.patch
deleted file mode 100644
index 6c73742..0000000
--- a/debian/patches/0007-erlang-fix-bindtests-for-out-of-tree-build.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-From: Hilko Bengen <bengen at debian.org>
-Date: Fri, 21 Dec 2012 00:23:30 +0100
-Subject: erlang: fix bindtests for out-of-tree build
-
----
- erlang/run-bindtests |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/erlang/run-bindtests b/erlang/run-bindtests
-index 1a6aea5..17db79e 100755
---- a/erlang/run-bindtests
-+++ b/erlang/run-bindtests
-@@ -19,5 +19,5 @@
- set -e
- 
- # The output is sent to bindtests.tmp.
--./bindtests.erl
-+$srcdir/bindtests.erl
- diff -u $srcdir/../bindtests bindtests.tmp
diff --git a/debian/patches/0008-out-of-tree-build-Fix-test-tool.patch b/debian/patches/0008-out-of-tree-build-Fix-test-tool.patch
new file mode 100644
index 0000000..71b7acb
--- /dev/null
+++ b/debian/patches/0008-out-of-tree-build-Fix-test-tool.patch
@@ -0,0 +1,39 @@
+From: Hilko Bengen <bengen at debian.org>
+Date: Sat, 16 Feb 2013 12:46:30 +0100
+Subject: out-of-tree build: Fix test-tool
+
+(Not entirely sure whether using Gnulib to replace standard functions
+is a good idea at all.)
+
+link with libgnu:
+  CCLD   libguestfs-test-tool
+libguestfs_test_tool-test-tool.o: In function `main':
+/home/bengen/src/deb/pkg-libvirt/libguestfs/debian/build-default/test-tool/../../../test-tool/test-tool.c:103: undefined reference to `rpl_getopt_long'
+/home/bengen/src/deb/pkg-libvirt/libguestfs/debian/build-default/test-tool/../../../test-tool/test-tool.c:113: undefined reference to `rpl_optarg'
+/home/bengen/src/deb/pkg-libvirt/libguestfs/debian/build-default/test-tool/../../../test-tool/test-tool.c:125: undefined reference to `rpl_optarg'
+/home/bengen/src/deb/pkg-libvirt/libguestfs/debian/build-default/test-tool/../../../test-tool/test-tool.c:126: undefined reference to `rpl_optarg'
+/home/bengen/src/deb/pkg-libvirt/libguestfs/debian/build-default/test-tool/../../../test-tool/test-tool.c:109: undefined reference to `rpl_optarg'
+libguestfs_test_tool-test-tool.o: In function `set_qemu':
+/home/bengen/src/deb/pkg-libvirt/libguestfs/debian/build-default/test-tool/../../../test-tool/test-tool.c:382: undefined reference to `rpl_perror'
+/home/bengen/src/deb/pkg-libvirt/libguestfs/debian/build-default/test-tool/../../../test-tool/test-tool.c:366: undefined reference to `rpl_perror'
+libguestfs_test_tool-test-tool.o: In function `make_files':
+/home/bengen/src/deb/pkg-libvirt/libguestfs/debian/build-default/test-tool/../../../test-tool/test-tool.c:416: undefined reference to `rpl_perror'
+/home/bengen/src/deb/pkg-libvirt/libguestfs/debian/build-default/test-tool/../../../test-tool/test-tool.c:428: undefined reference to `rpl_perror'
+---
+ test-tool/Makefile.am |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/test-tool/Makefile.am b/test-tool/Makefile.am
+index 200f2cb..bb2e03c 100644
+--- a/test-tool/Makefile.am
++++ b/test-tool/Makefile.am
+@@ -37,7 +37,8 @@ libguestfs_test_tool_CFLAGS = \
+ 	$(GPROF_CFLAGS) $(GCOV_CFLAGS)
+ 
+ libguestfs_test_tool_LDADD = \
+-	$(top_builddir)/src/libguestfs.la
++	$(top_builddir)/src/libguestfs.la \
++	$(top_builddir)/gnulib/lib/libgnu.la
+ 
+ libguestfs-test-tool.1 $(top_builddir)/html/libguestfs-test-tool.1.html: stamp-libguestfs-test-tool.pod
+ 
diff --git a/debian/patches/0009-inspector-Fix-tests-for-out-of-tree-builds.patch b/debian/patches/0009-inspector-Fix-tests-for-out-of-tree-builds.patch
deleted file mode 100644
index 625c986..0000000
--- a/debian/patches/0009-inspector-Fix-tests-for-out-of-tree-builds.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-From: Hilko Bengen <bengen at debian.org>
-Date: Sat, 5 Jan 2013 00:26:47 +0100
-Subject: inspector Fix tests for out-of-tree builds
-
----
- inspector/test-xmllint.sh.in |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/inspector/test-xmllint.sh.in b/inspector/test-xmllint.sh.in
-index c156bd2..602823f 100755
---- a/inspector/test-xmllint.sh.in
-+++ b/inspector/test-xmllint.sh.in
-@@ -25,5 +25,5 @@ if [ -z "$EXAMPLE_XML" ]; then
- fi
- 
- for f in $EXAMPLE_XML; do
--    @XMLLINT@ --noout --relaxng $srcdir/virt-inspector.rng $f
-+    @XMLLINT@ --noout --relaxng $srcdir/virt-inspector.rng $srcdir/$f
- done
diff --git a/debian/patches/0009-out-of-tree-build-Fix-Ruby-bindings.patch b/debian/patches/0009-out-of-tree-build-Fix-Ruby-bindings.patch
new file mode 100644
index 0000000..169062c
--- /dev/null
+++ b/debian/patches/0009-out-of-tree-build-Fix-Ruby-bindings.patch
@@ -0,0 +1,92 @@
+From: Hilko Bengen <bengen at debian.org>
+Date: Tue, 19 Feb 2013 00:17:07 +0100
+Subject: out-of-tree build: Fix Ruby bindings
+
+Remove non-template extconf.rb, use source directory
+---
+ ruby/Makefile.am               |    1 -
+ ruby/Rakefile.in               |    2 +-
+ ruby/ext/guestfs/extconf.rb    |   37 -------------------------------------
+ ruby/ext/guestfs/extconf.rb.in |    3 ++-
+ 4 files changed, 3 insertions(+), 40 deletions(-)
+ delete mode 100644 ruby/ext/guestfs/extconf.rb
+
+diff --git a/ruby/Makefile.am b/ruby/Makefile.am
+index 3fbc9c9..7fa7971 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 b/ruby/ext/guestfs/extconf.rb
+deleted file mode 100644
+index 12c9f4f..0000000
+--- a/ruby/ext/guestfs/extconf.rb
++++ /dev/null
+@@ -1,37 +0,0 @@
+-# libguestfs Ruby bindings -*- ruby -*-
+-# ruby/ext/guestfs/extconf.rb.  Generated from extconf.rb.in by configure.
+-# Copyright (C) 2009-2013 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.
+-
+-require 'mkmf'
+-
+-extension_name = '_guestfs'
+-
+-dir_config(extension_name)
+-
+-unless have_header("guestfs.h")
+-  raise "<guestfs.h> not found"
+-end
+-unless have_library("guestfs", "guestfs_create", "guestfs.h")
+-  raise "libguestfs not found"
+-end
+-
+-$CFLAGS =
+-  "#{$CFLAGS} -g -O2 -DGUESTFS_PRIVATE=1 " <<
+-  " -W -Wabi -Waddress -Wall -Warray-bounds -Wattributes -Wbad-function-cast -Wbuiltin-macro-redefined -Wcast-align -Wchar-subscripts -Wclobbered -Wcomment -Wcomments -Wcoverage-mismatch -Wcpp -Wdeprecated -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wdouble-promotion -Wempty-body -Wendif-labels -Wenum-compare -Wextra -Wformat-contains-nul -Wformat-extra-args -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wformat-zero-length -Wformat=2 -Wfree-nonheap-object -Wignored-qualifiers -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-to-pointer-cast -Winvalid-memory-model -Winvalid-pch -Wjump-misses-init -Wmain -Wmaybe-uninitialized -Wmissing-braces -Wmissing-declarations -Wmissing-field-initializers -Wmissing-include-dirs -Wmissing-noreturn -Wmissing-parameter-type -Wmissing-prototypes -Wmudflap -Wmultichar -Wnarrowing -Wnested-externs -Wnonnull -Wnormalized=nfc -Wold-style-declaration -Wold-style-definition -Woverflow -Woverlength-strings -Woverride-init -Wpacked-bitfield-compat -Wparentheses -Wpointer-arith -Wpointer-sign -Wpointer-to-int-cast -Wpragmas -Wreturn-type -Wsequence-point -Wstack-protector -Wstrict-aliasing -Wstrict-overflow -Wstrict-prototypes -Wsuggest-attribute=noreturn -Wswitch -Wswitch-default -Wsync-nand -Wtrampolines -Wtrigraphs -Wtype-limits -Wuninitialized -Wunknown-pragmas -Wunreachable-code -Wunused -Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-function -Wunused-label -Wunused-local-typedefs -Wunused-macros -Wunused-parameter -Wunused-result -Wunused-value -Wunused-variable -Wvariadic-macros -Wvector-operation-performance -Wvolatile-register-var -Wwrite-strings -Wno-unused-parameter -Wno-missing-field-initializers -fdiagnostics-show-option  -Werror"
+-
+-create_header
+-create_makefile(extension_name)
+diff --git a/ruby/ext/guestfs/extconf.rb.in b/ruby/ext/guestfs/extconf.rb.in
+index e358551..2bb4c9d 100644
+--- a/ruby/ext/guestfs/extconf.rb.in
++++ b/ruby/ext/guestfs/extconf.rb.in
+@@ -34,4 +34,5 @@ $CFLAGS =
+   "@WARN_CFLAGS@ @WERROR_CFLAGS@"
+ 
+ create_header
+-create_makefile(extension_name)
++create_makefile(extension_name, "@abs_srcdir@")
++
diff --git a/debian/patches/0010-Fix-packagelist.patch b/debian/patches/0010-Fix-packagelist.patch
deleted file mode 100644
index 2144371..0000000
--- a/debian/patches/0010-Fix-packagelist.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From: Hilko Bengen <bengen at debian.org>
-Date: Sat, 5 Jan 2013 12:58:30 +0100
-Subject: Fix packagelist
-
-- ntfsprogs has been merged with ntfs-3g -- and it has been an empty
-  transitional package for some time now.
-- libyajl is needed for ldm
-- libcap2 is needed for guestfs
----
- appliance/packagelist.in |    3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/appliance/packagelist.in b/appliance/packagelist.in
-index 3ad343b..6fd9438 100644
---- a/appliance/packagelist.in
-+++ b/appliance/packagelist.in
-@@ -62,14 +62,15 @@
-   hfsplus
-   iproute
-   libaugeas0
-+  libcap2
-   libhivex0
-   libyajl2
-   linux-image
-   nilfs-tools
-   ntfs-3g
--  ntfsprogs
-   openssh-client
-   reiserfsprogs
-+  sysvinit /* for /sbin/reboot */
-   ufsutils
-   vim-tiny
-   xz-utils
diff --git a/debian/patches/0010-ruby-Don-t-compile-with-Werror.patch b/debian/patches/0010-ruby-Don-t-compile-with-Werror.patch
new file mode 100644
index 0000000..5c02890
--- /dev/null
+++ b/debian/patches/0010-ruby-Don-t-compile-with-Werror.patch
@@ -0,0 +1,35 @@
+From: Hilko Bengen <bengen at debian.org>
+Date: Sun, 17 Feb 2013 22:52:59 +0100
+Subject: ruby: Don't compile with -Werror.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Otherwise, _guestfs.c can't be compiled due to many strict-prototype
+warnings turned into errors:
+
+compiling /home/bengen/src/deb/pkg-libvirt/libguestfs/debian/build-default/../..
+/ruby/ext/guestfs/_guestfs.c
+In file included from /usr/include/ruby-1.9.1/ruby.h:32:0,
+                 from /home/bengen/src/deb/pkg-libvirt/libguestfs/debian/build-d
+efault/../../ruby/ext/guestfs/_guestfs.c:29:
+/usr/include/ruby-1.9.1/ruby/ruby.h:1093:1: error: function declaration isn’t a
+prototype [-Werror=strict-prototypes]
+[...]
+---
+ ruby/ext/guestfs/extconf.rb.in |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ruby/ext/guestfs/extconf.rb.in b/ruby/ext/guestfs/extconf.rb.in
+index 2bb4c9d..d03ae64 100644
+--- a/ruby/ext/guestfs/extconf.rb.in
++++ b/ruby/ext/guestfs/extconf.rb.in
+@@ -31,7 +31,7 @@ end
+ 
+ $CFLAGS =
+   "#{$CFLAGS} @CFLAGS@ -DGUESTFS_PRIVATE=1 " <<
+-  "@WARN_CFLAGS@ @WERROR_CFLAGS@"
++  "@WARN_CFLAGS@"
+ 
+ create_header
+ create_makefile(extension_name, "@abs_srcdir@")
diff --git a/debian/patches/0011-ruby-Move-checks-for-symbols-from-configure.ac-to-ex.patch b/debian/patches/0011-ruby-Move-checks-for-symbols-from-configure.ac-to-ex.patch
new file mode 100644
index 0000000..5d0933b
--- /dev/null
+++ b/debian/patches/0011-ruby-Move-checks-for-symbols-from-configure.ac-to-ex.patch
@@ -0,0 +1,92 @@
+From: Hilko Bengen <bengen at debian.org>
+Date: Sun, 17 Feb 2013 23:05:12 +0100
+Subject: ruby: Move checks for symbols from configure.ac to extconf.rb; add
+ extra check for rb_alloc_func_t
+
+---
+ configure.ac                   |    8 --------
+ generator/ruby.ml              |    5 +++--
+ ruby/ext/guestfs/_guestfs.c    |    5 +++--
+ ruby/ext/guestfs/extconf.rb.in |    4 ++++
+ 4 files changed, 10 insertions(+), 12 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index ee20911..d60127b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1143,14 +1143,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 db16e2a..ba02fd1 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>
+@@ -688,6 +686,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/_guestfs.c b/ruby/ext/guestfs/_guestfs.c
+index c0d6ced..d4282f5 100644
+--- a/ruby/ext/guestfs/_guestfs.c
++++ b/ruby/ext/guestfs/_guestfs.c
+@@ -20,8 +20,6 @@
+  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+  */
+ 
+-#include <config.h>
+-
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <stdint.h>
+@@ -23467,6 +23465,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 d03ae64..07a2d4f 100644
+--- a/ruby/ext/guestfs/extconf.rb.in
++++ b/ruby/ext/guestfs/extconf.rb.in
+@@ -33,6 +33,10 @@ $CFLAGS =
+   "#{$CFLAGS} @CFLAGS@ -DGUESTFS_PRIVATE=1 " <<
+   "@WARN_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@")
+ 
diff --git a/debian/patches/0012-build-Only-add-serial-tests-for-automake-1.12.patch b/debian/patches/0012-build-Only-add-serial-tests-for-automake-1.12.patch
new file mode 100644
index 0000000..60a50b1
--- /dev/null
+++ b/debian/patches/0012-build-Only-add-serial-tests-for-automake-1.12.patch
@@ -0,0 +1,41 @@
+From: "Richard W.M. Jones" <rjones at redhat.com>
+Date: Tue, 19 Feb 2013 15:38:27 +0000
+Subject: build: Only add 'serial-tests' for automake >= 1.12.
+
+Earlier versions of automake complain if they get a configuration
+parameter which they don't understand.  The error is:
+
+configure.ac:27: error: option 'serial-tests' not recognized
+
+Use some m4 hackery to work around this.
+---
+ configure.ac |   16 +++++++++++++++-
+ 1 file changed, 15 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index d60127b..c6420e6 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -24,7 +24,21 @@ m4_define([libguestfs_release], [2])
+ 
+ AC_INIT([libguestfs],libguestfs_major.libguestfs_minor.libguestfs_release)
+ AC_CONFIG_AUX_DIR([build-aux])
+-AM_INIT_AUTOMAKE([foreign serial-tests])
++
++dnl Initialize automake.  automake < 1.12 didn't have serial-tests and
++dnl gives an error if it sees this, but for automake >= 1.13
++dnl serial-tests is required so we have to include it.  Solution is to
++dnl test for the version of automake (by running an external command)
++dnl and provide it if necessary.  Note we have to do this entirely using
++dnl m4 macros since automake queries this macro by running
++dnl 'autoconf --trace ...'.
++m4_define([serial_tests], [
++    m4_esyscmd([automake --version |
++                head -1 |
++                awk '{split ($NF,a,"."); if (a[1] == 1 && a[2] >= 12) { print "serial-tests" }}'
++    ])
++])
++AM_INIT_AUTOMAKE(foreign serial_tests) dnl NB: Do not [quote] this parameter.
+ 
+ m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])])
+ AM_SILENT_RULES([yes]) # make --enable-silent-rules the default.
diff --git a/debian/patches/series b/debian/patches/series
index c7d6ca7..ce48e72 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,7 +4,9 @@
 0004-out-of-tree-build-daemon.patch
 0005-ruby-install-to-vendor_ruby.patch
 0006-Fix-guestfs-supermin-appliance-path.patch
-0007-erlang-fix-bindtests-for-out-of-tree-build.patch
-0008-erlang-Install-to-correct-directory.patch
-0009-inspector-Fix-tests-for-out-of-tree-builds.patch
-0010-Fix-packagelist.patch
+0007-erlang-Install-to-correct-directory.patch
+0008-out-of-tree-build-Fix-test-tool.patch
+0009-out-of-tree-build-Fix-Ruby-bindings.patch
+0010-ruby-Don-t-compile-with-Werror.patch
+0011-ruby-Move-checks-for-symbols-from-configure.ac-to-ex.patch
+0012-build-Only-add-serial-tests-for-automake-1.12.patch

-- 
Libguestfs Debian packaging



More information about the Pkg-libvirt-commits mailing list