[Pkg-libvirt-commits] [SCM] Libguestfs Debian packaging branch, master, updated. debian/1.14.2-2

Hilko Bengen bengen at debian.org
Wed Nov 16 15:55:22 UTC 2011


The following commit has been merged in the master branch:
commit dbbf2f1d97f64004b6a1a7f84711505601b9df6d
Author: Hilko Bengen <bengen at debian.org>
Date:   Sat Nov 12 20:15:20 2011 +0100

    Added Java bindings

diff --git a/debian/control b/debian/control
index dd7fb80..0fccef6 100644
--- a/debian/control
+++ b/debian/control
@@ -16,6 +16,7 @@ Build-Depends: debhelper (>= 7.0.50~), autotools-dev, aptitude,
   erlang-dev,
   dh-ocaml, ocaml, ocaml-findlib, libpcre-ocaml-dev,
   python (>= 2.6.7-2), python-all-dev (>= 2.6.6-3~), python3-all-dev,
+  default-jdk,
   libtest-pod-coverage-perl, libextutils-command-perl, libintl-perl, libtest-pod-perl,
   libstring-shellquote-perl,
   libsys-virt-perl, libwin-hivex-perl,
@@ -437,3 +438,29 @@ Description: guest disk image management system - Erlang bindings
  guest; and to upload and download files and directories.
  .
  This package contains Erlang bindings to libguestfs.
+
+Package: libguestfs-java
+Section: java
+Architecture: i386 amd64
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: guest disk image management system - Java bindings
+ The libguestfs library allows accessing and modifying guest disk
+ images. It offers the following features, among many others:
+  * making batch configuration changes to guests;
+  * viewing and editing files inside guests;
+  * getting disk used/free statistics;
+  * migrating between virtualization systems;
+  * performing partial backups;
+  * performing partial guest clones;
+  * cloning guests and changing registry/UUID/hostname info.
+ .
+ It uses the Linux kernel and qemu code, and can access any type of guest
+ file system that Linux and qemu can, including but not limited to: ext2/3/4,
+ btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, qcow2,
+ vmdk.
+ .
+ The library provides ways to enumerate guest storage (such as partitions, LVs,
+ what file system is in each LV, etc.); to run commands in the context of the
+ guest; and to upload and download files and directories.
+ .
+ This package contains Java bindings to libguestfs.
diff --git a/debian/libguestfs-java.dirs b/debian/libguestfs-java.dirs
new file mode 100644
index 0000000..cfdc66b
--- /dev/null
+++ b/debian/libguestfs-java.dirs
@@ -0,0 +1 @@
+usr/share/doc/libguestfs-java/api/
diff --git a/debian/libguestfs-java.install b/debian/libguestfs-java.install
new file mode 100644
index 0000000..98f71ea
--- /dev/null
+++ b/debian/libguestfs-java.install
@@ -0,0 +1,3 @@
+usr/share/javadoc/libguestfs-java-*/* usr/share/doc/libguestfs-java/api/
+usr/share/java
+usr/lib/*jni*
diff --git a/debian/patches/0004-Do-not-run-appliance-related-checks-if-not-building-.patch b/debian/patches/0004-Do-not-run-appliance-related-checks-if-not-building-.patch
index b6318e2..5af29e2 100644
--- a/debian/patches/0004-Do-not-run-appliance-related-checks-if-not-building-.patch
+++ b/debian/patches/0004-Do-not-run-appliance-related-checks-if-not-building-.patch
@@ -108,11 +108,28 @@ index 90c4ce3..1b554f4 100644
  
  CLEANFILES = \
  	test.iso test.sqsh \
+diff --git a/java/Makefile.am b/java/Makefile.am
+index 7686047..31b793f 100644
+--- a/java/Makefile.am
++++ b/java/Makefile.am
+@@ -102,7 +102,11 @@ install-data-hook:
+ 
+ # Tests (not comprehensive).
+ 
+-TESTS = run-bindtests run-java-tests
++TESTS = run-bindtests
++if ENABLE_APPLIANCE
++TESTS += run-java-tests
++endif ENABLE_APPLIANCE
++
+ TESTS_ENVIRONMENT = \
+ 	JAVA=$(JAVA) \
+ 	CLASSPATH=.:t:libguestfs-$(VERSION).jar \
 diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am
-index 28c13c5..83b8f09 100644
+index 5287035..eed15b1 100644
 --- a/ocaml/Makefile.am
 +++ b/ocaml/Makefile.am
-@@ -75,11 +75,15 @@ TESTS_ENVIRONMENT = \
+@@ -78,11 +78,15 @@ TESTS_ENVIRONMENT = \
  
  TESTS = run-bindtests \
  	t/guestfs_005_load \
diff --git a/debian/patches/0012-Java-build-fixes.patch b/debian/patches/0012-Java-build-fixes.patch
new file mode 100644
index 0000000..dee5387
--- /dev/null
+++ b/debian/patches/0012-Java-build-fixes.patch
@@ -0,0 +1,38 @@
+From: Hilko Bengen <bengen at debian.org>
+Date: Sat, 12 Nov 2011 21:11:26 +0100
+Subject: Java build fixes
+
+- enable out-of-tree build
+- disable building of static version of libguestfs_jni
+---
+ java/Makefile.am |    7 ++++---
+ 1 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/java/Makefile.am b/java/Makefile.am
+index 31b793f..ef78773 100644
+--- a/java/Makefile.am
++++ b/java/Makefile.am
+@@ -73,7 +73,7 @@ libguestfs_jni_la_SOURCES = \
+ 	com_redhat_et_libguestfs_GuestFS.c
+ 
+ libguestfs_jni_la_LIBADD = $(top_builddir)/src/libguestfs.la
+-libguestfs_jni_la_LDFLAGS = -version-info $(JNI_VERSION_INFO)
++libguestfs_jni_la_LDFLAGS = -version-info $(JNI_VERSION_INFO) -shared
+ libguestfs_jni_la_CFLAGS = \
+   $(WARN_CFLAGS) $(WERROR_CFLAGS) \
+   -I$(top_srcdir)/src -I$(top_builddir)/src \
+@@ -116,10 +116,11 @@ TESTS_ENVIRONMENT = \
+ noinst_DATA = Bindtests.class $(java_tests:.java=.class)
+ 
+ t/%.class: t/%.java
+-	$(JAVAC) $(JAVAC_FLAGS) -classpath libguestfs-$(VERSION).jar $<
++	mkdir -p t
++	$(JAVAC) $(JAVAC_FLAGS) -classpath libguestfs-$(VERSION).jar -d $(builddir)/t $<
+ 
+ Bindtests.class: Bindtests.java
+-	$(JAVAC) $(JAVAC_FLAGS) -classpath libguestfs-$(VERSION).jar $<
++	$(JAVAC) $(JAVAC_FLAGS) -classpath libguestfs-$(VERSION).jar -d $(builddir) $<
+ 
+ endif
+ 
+-- 
diff --git a/debian/patches/0012-autoreconf.patch b/debian/patches/0013-autoreconf.patch
similarity index 93%
rename from debian/patches/0012-autoreconf.patch
rename to debian/patches/0013-autoreconf.patch
index 1d10b77..37d3683 100644
--- a/debian/patches/0012-autoreconf.patch
+++ b/debian/patches/0013-autoreconf.patch
@@ -14,16 +14,17 @@ Subject: autoreconf
  erlang/Makefile.in   |    2 +-
  fuse/Makefile.in     |    2 +-
  images/Makefile.in   |    2 +-
+ java/Makefile.in     |   10 +++--
  ocaml/Makefile.in    |   19 +++++-----
  perl/Makefile.in     |    8 +++-
  python/Makefile.in   |    3 +-
  resize/Makefile.in   |    7 ++--
  sparsify/Makefile.in |    8 ++--
  tools/Makefile.in    |    6 ++--
- 17 files changed, 117 insertions(+), 101 deletions(-)
+ 18 files changed, 123 insertions(+), 105 deletions(-)
 
 diff --git a/Makefile.in b/Makefile.in
-index 8729a23..e7fc02a 100644
+index b554b95..5080d5a 100644
 --- a/Makefile.in
 +++ b/Makefile.in
 @@ -71,7 +71,6 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
@@ -115,7 +116,7 @@ index 8729a23..e7fc02a 100644
  EXTRA_DIST = \
  	$(generator_built) \
  	BUGS HACKING RELEASE-NOTES ROADMAP TODO \
-@@ -1472,8 +1472,6 @@ podwrapper.sh: $(top_builddir)/config.status $(srcdir)/podwrapper.sh.in
+@@ -1488,8 +1488,6 @@ podwrapper.sh: $(top_builddir)/config.status $(srcdir)/podwrapper.sh.in
  	cd $(top_builddir) && $(SHELL) ./config.status $@
  run: $(top_builddir)/config.status $(srcdir)/run.in
  	cd $(top_builddir) && $(SHELL) ./config.status $@
@@ -205,7 +206,7 @@ index 28fcec7..fb84fce 100644
  
  .SUFFIXES:
 diff --git a/configure b/configure
-index aed418b..a97a6a8 100755
+index 44f310a..a224259 100755
 --- a/configure
 +++ b/configure
 @@ -46473,7 +46473,10 @@ else
@@ -591,6 +592,50 @@ index f2e3f4e..4a51f55 100644
  CLEANFILES = \
  	test.iso test.sqsh \
  	100kallzeroes 100kallnewlines 100kallspaces 100krandom 10klines \
+diff --git a/java/Makefile.in b/java/Makefile.in
+index b900c4b..f732d5e 100644
+--- a/java/Makefile.in
++++ b/java/Makefile.in
+@@ -92,6 +92,7 @@ build_triplet = @build@
+ host_triplet = @host@
+ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ 	$(srcdir)/Makefile.inc $(top_srcdir)/subdir-rules.mk
++ at ENABLE_APPLIANCE_TRUE@@HAVE_JAVA_TRUE at am__append_1 = run-java-tests
+ subdir = java
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
+@@ -1335,7 +1336,7 @@ CLEANFILES = doc-stamp $(builddir)/com/redhat/et/libguestfs/*.class com_redhat_e
+ @HAVE_JAVA_TRUE@	com_redhat_et_libguestfs_GuestFS.c
+ 
+ @HAVE_JAVA_TRUE at libguestfs_jni_la_LIBADD = $(top_builddir)/src/libguestfs.la
+- at HAVE_JAVA_TRUE@libguestfs_jni_la_LDFLAGS = -version-info $(JNI_VERSION_INFO)
++ at HAVE_JAVA_TRUE@libguestfs_jni_la_LDFLAGS = -version-info $(JNI_VERSION_INFO) -shared
+ @HAVE_JAVA_TRUE at libguestfs_jni_la_CFLAGS = \
+ @HAVE_JAVA_TRUE@  $(WARN_CFLAGS) $(WERROR_CFLAGS) \
+ @HAVE_JAVA_TRUE@  -I$(top_srcdir)/src -I$(top_builddir)/src \
+@@ -1347,7 +1348,7 @@ CLEANFILES = doc-stamp $(builddir)/com/redhat/et/libguestfs/*.class com_redhat_e
+ @HAVE_JAVA_TRUE at noinst_SCRIPTS = doc-stamp
+ 
+ # Tests (not comprehensive).
+- at HAVE_JAVA_TRUE@TESTS = run-bindtests run-java-tests
++ at HAVE_JAVA_TRUE@TESTS = run-bindtests $(am__append_1)
+ @HAVE_JAVA_TRUE at TESTS_ENVIRONMENT = \
+ @HAVE_JAVA_TRUE@	JAVA=$(JAVA) \
+ @HAVE_JAVA_TRUE@	CLASSPATH=.:t:libguestfs-$(VERSION).jar \
+@@ -1840,10 +1841,11 @@ builddir ?= $(top_builddir)/java
+ @HAVE_JAVA_TRUE@	cp -a api/* $(DESTDIR)$(datadir)/javadoc/$(PACKAGE_NAME)-java-$(PACKAGE_VERSION)
+ 
+ @HAVE_JAVA_TRUE at t/%.class: t/%.java
+- at HAVE_JAVA_TRUE@	$(JAVAC) $(JAVAC_FLAGS) -classpath libguestfs-$(VERSION).jar $<
++ at HAVE_JAVA_TRUE@	mkdir -p t
++ at HAVE_JAVA_TRUE@	$(JAVAC) $(JAVAC_FLAGS) -classpath libguestfs-$(VERSION).jar -d $(builddir)/t $<
+ 
+ @HAVE_JAVA_TRUE at Bindtests.class: Bindtests.java
+- at HAVE_JAVA_TRUE@	$(JAVAC) $(JAVAC_FLAGS) -classpath libguestfs-$(VERSION).jar $<
++ at HAVE_JAVA_TRUE@	$(JAVAC) $(JAVAC_FLAGS) -classpath libguestfs-$(VERSION).jar -d $(builddir) $<
+ 
+ # Tell version 3.79 and up of GNU make to not build goals in this
+ # directory in parallel.
 diff --git a/ocaml/Makefile.in b/ocaml/Makefile.in
 index 060d7a2..52f4ab9 100644
 --- a/ocaml/Makefile.in
diff --git a/debian/patches/series b/debian/patches/series
index 9196bfe..06709f4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,4 +9,5 @@
 0009-out-of-tree-build-erlang.patch
 0010-Fix-en-dis-able-install-daemon.patch
 0011-Fix-include.patch
-0012-autoreconf.patch
+0012-Java-build-fixes.patch
+0013-autoreconf.patch
diff --git a/debian/rules b/debian/rules
index b6a7cd6..397f97a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,7 +8,6 @@ PYTHON_DEFAULT := $(shell pyversions --default)
 COMMON_CONFIG_FLAGS = \
 	--disable-appliance  \
 	--with-readline	     \
-	--with-java-home=no  \
 	--disable-ruby       \
 	--disable-haskell    \
 	--disable-php
@@ -24,14 +23,15 @@ override_dh_auto_configure:
 		dh_auto_configure --builddir=$(CURDIR)/debian/build-$$p \
 		    -- \
 		    $(COMMON_CONFIG_FLAGS) \
-		    --enable-install-daemon ; \
+		    --enable-install-daemon \
+		    --with-java-home=/usr/lib/jvm/default-java ; \
 	    else \
 	        dh_auto_configure --builddir=$(CURDIR)/debian/build-$$p \
 	            -- \
 		    $(COMMON_CONFIG_FLAGS) \
 	            --disable-daemon --disable-fuse \
 	            --disable-ocaml --disable-perl \
-		    --disable-erlang \
+		    --disable-erlang --with-java-home=no \
 	            PYTHON=$$p ; \
 	    fi ; \
 	done

-- 
Libguestfs Debian packaging



More information about the Pkg-libvirt-commits mailing list