[zookeeper] 05/07: Build with ivy-debian-helper
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Fri Feb 26 14:24:12 GMT 2016
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to branch master
in repository zookeeper.
commit d7cd0dc8f393ed3b193c3173a0f30a8c1e1adf59
Author: Emmanuel Bourg <ebourg at apache.org>
Date: Fri Feb 26 14:18:54 2016 +0100
Build with ivy-debian-helper
---
debian/ant.properties | 9 --
debian/build-override.xml | 28 -----
debian/build.xml | 35 ------
debian/changelog | 1 +
debian/control | 1 +
debian/patches/debian/patch-build-system.patch | 134 +--------------------
.../remove-non-reproducible-manifest-entries.patch | 10 +-
debian/patches/debian/reproducible-javadoc.patch | 4 +-
debian/rules | 23 ++--
9 files changed, 27 insertions(+), 218 deletions(-)
diff --git a/debian/ant.properties b/debian/ant.properties
deleted file mode 100644
index bf4f5aa..0000000
--- a/debian/ant.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-# Ensure that source and target are 1.5
-# For backwards compat on Java 7
-ant.build.javac.source=1.5
-ant.build.javac.target=1.5
-target.jdk=1.5
-lastRevision=-1
-ivy.jar.exists=true
-ivy.initialized=true
-dest.dir=../../build/zookeeper
diff --git a/debian/build-override.xml b/debian/build-override.xml
deleted file mode 100644
index 9ee07a3..0000000
--- a/debian/build-override.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0"?>
-
-<project basedir="..">
-
- <path id="project.classpath">
- <fileset dir="build/classes" />
- <fileset dir="lib" includes="*.jar"/>
- </path>
-
- <target name="init">
- <mkdir dir="${build.classes}" />
- <tstamp>
- <format property="build.time" pattern="MM/dd/yyyy HH:mm zz" timezone="GMT"/>
- <format property="year" pattern="yyyy" timezone="GMT"/>
- </tstamp>
- <condition property="extra.src.dir" value="${jmx.src.dir}">
- <and>
- <equals arg1="${target.jdk}" arg2="1.6"/>
- <available file="${jmx.src.dir}" type="dir"/>
- </and>
- </condition>
- </target>
-
- <!-- Don't download anything! -->
- <target name="get-jdiff" description="download jdiff and its dependencies" />
-
- <import file="../build.xml" />
-</project>
diff --git a/debian/build.xml b/debian/build.xml
deleted file mode 100644
index 629fcb1..0000000
--- a/debian/build.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<project name="zookeepercontrib" default="compile" basedir="../src/contrib">
-
- <!-- this file is an override of src/contrib/build.xml to exclude contrib/rest
- see https://issues.apache.org/jira/browse/ZOOKEEPER-640
- -->
- <fileset id="debiancontribfileset"
- dir="."
- includes="*/build.xml"
- excludes="rest/build.xml"
- />
-
- <target name="compile">
- <subant target="jar">
- <fileset refid="debiancontribfileset" />
- </subant>
- </target>
-
- <target name="package">
- <subant target="package">
- <fileset refid="debiancontribfileset" />
- </subant>
- </target>
-
- <target name="test">
- <subant target="test">
- <fileset refid="debiancontribfileset" />
- </subant>
- </target>
-
- <target name="clean">
- <subant target="clean">
- <fileset refid="debiancontribfileset" />
- </subant>
- </target>
-</project>
diff --git a/debian/changelog b/debian/changelog
index e74eade..ec4e457 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ zookeeper (3.4.8-2) UNRELEASED; urgency=medium
* New upstream release
- Refreshed the patches
- Updated debian/pom.xml
+ * Build with ivy-debian-helper
* Standards-Version updated to 3.9.7 (no changes)
* Use secure Vcs-* URLs
diff --git a/debian/control b/debian/control
index 2b8e011..7488951 100644
--- a/debian/control
+++ b/debian/control
@@ -12,6 +12,7 @@ Build-Depends:
default-jdk (>= 2:1.6),
default-jdk-doc,
help2man,
+ ivy-debian-helper,
javacc,
javahelper (>= 0.28),
junit4,
diff --git a/debian/patches/debian/patch-build-system.patch b/debian/patches/debian/patch-build-system.patch
index 461fab7..2082afa 100644
--- a/debian/patches/debian/patch-build-system.patch
+++ b/debian/patches/debian/patch-build-system.patch
@@ -1,86 +1,10 @@
-Description: Patches to upstream build system to disable use of ivy,
- use jar files from /usr/share/java and enable the relevant bits of the
+Description: Patches to upstream build system to enable the relevant bits of the
test suite for execution during build.
Author: James Page <james.page at ubuntu.com>, Thomas Koch <thomas at koch.ro>
Forwarded: not-needed
-
--- a/build.xml
+++ b/build.xml
-@@ -31,7 +31,7 @@
- <property environment="env"/>
-
- <property name="version" value="3.4.8" />
-- <property name="final.name" value="${name}-${version}"/>
-+ <property name="final.name" value="${name}"/>
- <property name="revision.dir" value="${basedir}/.revision" />
- <property name="revision.properties" value="revision.properties" />
- <property file="${basedir}/src/java/${revision.properties}" />
-@@ -216,27 +216,21 @@
- <path id="java.classpath">
- <pathelement location="${build.classes}"/>
- <!-- allow the user to override (e.g. if there are local versions) -->
-- <fileset dir="${additional.lib.dir}">
-- <include name="${additional.lib.dir.includes}" />
-- <exclude name="${additional.lib.dir.excludes}" />
-+ <fileset dir="/usr/share/java">
-+ <include name="log4j-1.2.jar" />
-+ <include name="jline.jar" />
-+ <include name="xercesImpl.jar" />
-+ <include name="slf4j-api.jar" />
-+ <include name="slf4j-log4j12.jar" />
-+ <include name="netty-3.9.0.Final.jar" />
- </fileset>
-- <fileset dir="${lib.dir}">
-- <include name="${lib.dir.includes}" />
-- <exclude name="${lib.dir.excludes}" />
-- </fileset>
-- <fileset dir="${ant.home}/lib">
-- <include name="ant.jar" />
-- </fileset>
-- <fileset dir="${ivy.lib}">
-- <include name="**/*.jar" />
-- </fileset>
-- <pathelement path="${clover.jar}" />
- </path>
-
- <path id="test.java.classpath">
- <pathelement location="${test.java.classes}" />
-- <fileset dir="${ivy.test.lib}">
-- <include name="**/*.jar" />
-+ <fileset dir="/usr/share/java">
-+ <include name="junit4.jar" />
-+ <include name="mockito-core.jar" />
- </fileset>
- <path refid="java.classpath"/>
- </path>
-@@ -278,7 +272,7 @@
- targetfile="${src_generated.dir}/.generated"/>
- </target>
-
-- <target name="compile_jute" depends="jute,compile_jute_uptodate" unless="juteBuild.notRequired">
-+ <target name="compile_jute" depends="jute,compile_jute_uptodate" unless="">
- <mkdir dir="${src_generated.dir}" />
- <mkdir dir="${csrc_generated.dir}" />
- <java classname="org.apache.jute.compiler.generated.Rcc" fork="true" dir="${src_generated.dir}">
-@@ -391,7 +385,7 @@
- pattern="${ivy.lib}/[artifact]-[revision].[ext]"/>
- <ivy:cachepath pathid="mvn-ant-task-classpath" conf="mvn-ant-task"/>
- </target>
-- <target name="compile" depends="ivy-retrieve,clover,build-generated">
-+ <target name="compile" depends="build-generated">
- <javac srcdir="${java.src.dir}" destdir="${build.classes}" includeantruntime="false"
- target="${javac.target}" source="${javac.source}" debug="on">
- <classpath refid="java.classpath"/>
-@@ -400,7 +394,7 @@
- </javac>
- </target>
-
-- <target name="compile-test" depends="ivy-retrieve-test,compile">
-+ <target name="compile-test" depends="compile">
- <mkdir dir="${test.java.classes}"/>
- <javac srcdir="${test.src.dir}" destdir="${test.java.classes}" includeantruntime="false"
- target="${javac.target}" source="${javac.source}" debug="on">
-@@ -1237,26 +1231,10 @@
+@@ -1237,26 +1237,10 @@
<target name="test-init" depends="jar,compile-test">
<delete dir="${test.log.dir}" />
<delete dir="${test.tmp.dir}" />
@@ -107,7 +31,7 @@ Forwarded: not-needed
</target>
<condition property="quicktest">
-@@ -1309,6 +1287,9 @@
+@@ -1309,6 +1293,9 @@
<batchtest todir="${test.log.dir}" if="fulltest">
<fileset dir="${test.src.dir}">
<include name="**/*${test.category}Test.java"/>
@@ -119,41 +43,7 @@ Forwarded: not-needed
<batchtest todir="${test.log.dir}" if="testcase">
--- a/src/contrib/build-contrib.xml
+++ b/src/contrib/build-contrib.xml
-@@ -70,25 +70,16 @@
-
- <path id="classpath">
- <pathelement location="${build.classes}"/>
-- <!-- allow the user to override (e.g. if there are local versions) -->
-- <fileset dir="${additional.lib.dir}">
-- <include name="${additional.lib.dir.includes}" />
-- <exclude name="${additional.lib.dir.excludes}" />
-+ <fileset dir="/usr/share/java">
-+ <include name="log4j-1.2.jar" />
-+ <include name="jline.jar" />
-+ <include name="xercesImpl.jar" />
-+ <include name="netty.jar-3.9.0.Final" />
-+ <include name="slf4j-api.jar" />
-+ <include name="slf4j-log4j12.jar" />
- </fileset>
-- <fileset refid="lib.jars"/>
-+ <!-- allow the user to override (e.g. if there are local versions) -->
- <pathelement location="${zk.root}/build/classes"/>
-- <fileset dir="${ivy.lib}">
-- <include name="**/*.jar" />
-- </fileset>
-- <fileset dir="${ivy.test.lib}">
-- <include name="**/*.jar" />
-- </fileset>
-- <fileset dir="${zk.root}/src/java/lib">
-- <include name="**/*.jar" />
-- </fileset>
-- <fileset dir="${ant.home}/lib">
-- <include name="ant.jar" />
-- </fileset>
- </path>
-
- <!-- ====================================================== -->
-@@ -133,7 +124,7 @@
+@@ -133,7 +133,7 @@
<target name="jar" depends="compile" unless="skip.contrib">
<echo message="contrib: ${name}"/>
<jar
@@ -162,22 +52,6 @@ Forwarded: not-needed
basedir="${build.classes}"
/>
</target>
-@@ -233,15 +224,9 @@
- </target>
-
- <target name="ivy-retrieve" depends="init,ivy-init">
-- <ivy:retrieve settingsRef="${ant.project.name}" type="jar" conf="default"
-- pattern="${ivy.lib}/[artifact]-[revision].[ext]"/>
-- <ivy:retrieve settingsRef="${ant.project.name}" type="bundle" conf="default"
-- pattern="${ivy.lib}/[artifact]-[revision].[ext]"/>
- </target>
-
- <target name="ivy-retrieve-test" depends="init,ivy-init">
-- <ivy:retrieve settingsRef="${ant.project.name}" type="jar" conf="test"
-- pattern="${ivy.test.lib}/[artifact]-[revision].[ext]"/>
- </target>
-
-
--- a/src/contrib/zooinspector/build.xml
+++ b/src/contrib/zooinspector/build.xml
@@ -20,7 +20,7 @@
diff --git a/debian/patches/debian/remove-non-reproducible-manifest-entries.patch b/debian/patches/debian/remove-non-reproducible-manifest-entries.patch
index 3a92754..4de0e0e 100644
--- a/debian/patches/debian/remove-non-reproducible-manifest-entries.patch
+++ b/debian/patches/debian/remove-non-reproducible-manifest-entries.patch
@@ -3,7 +3,7 @@ Author: Emmanuel Bourg <ebourg at apache.org>
Forwarded: no
--- a/build.xml
+++ b/build.xml
-@@ -540,9 +540,6 @@
+@@ -546,9 +546,6 @@
<fileset dir="${src_generated.dir}" excludes="**/.generated"/>
<manifest>
<attribute name="Main-Class" value="org.apache.zookeeper.server.quorum.QuorumPeer" />
@@ -13,7 +13,7 @@ Forwarded: no
<attribute name="Implementation-Title" value="org.apache.zookeeper"/>
<attribute name="Implementation-Version" value="${revision}"/>
<attribute name="Implementation-Vendor" value="The Apache Software Foundation"/>
-@@ -581,9 +578,6 @@
+@@ -587,9 +584,6 @@
<fileset dir="${build.classes}" excludes="**/.generated"/>
<manifest>
<attribute name="Main-Class" value="org.apache.zookeeper.server.quorum.QuorumPeer" />
@@ -23,7 +23,7 @@ Forwarded: no
<attribute name="Implementation-Title" value="org.apache.zookeeper"/>
<attribute name="Implementation-Version" value="${revision}"/>
<attribute name="Implementation-Vendor" value="The Apache Software Foundation"/>
-@@ -613,9 +607,6 @@
+@@ -619,9 +613,6 @@
<fileset dir="${java.src.dir}"/>
<fileset dir="${src_generated.dir}" excludes="**/.generated"/>
<manifest>
@@ -33,7 +33,7 @@ Forwarded: no
<attribute name="Implementation-Title" value="org.apache.zookeeper"/>
<attribute name="Implementation-Version" value="${revision}"/>
<attribute name="Implementation-Vendor" value="The Apache Software Foundation"/>
-@@ -631,9 +622,6 @@
+@@ -637,9 +628,6 @@
<fileset file="LICENSE.txt" />
<fileset dir="${build.javadoc}"/>
<manifest>
@@ -43,7 +43,7 @@ Forwarded: no
<attribute name="Implementation-Title" value="org.apache.zookeeper"/>
<attribute name="Implementation-Version" value="${revision}"/>
<attribute name="Implementation-Vendor" value="The Apache Software Foundation"/>
-@@ -649,9 +637,6 @@
+@@ -655,9 +643,6 @@
<fileset file="LICENSE.txt" />
<fileset dir="${test.java.classes}"/>
<manifest>
diff --git a/debian/patches/debian/reproducible-javadoc.patch b/debian/patches/debian/reproducible-javadoc.patch
index f5d1002..f84f8a9 100644
--- a/debian/patches/debian/reproducible-javadoc.patch
+++ b/debian/patches/debian/reproducible-javadoc.patch
@@ -3,7 +3,7 @@ Author: Emmanuel Bourg <ebourg at apache.org>
Forwarded: no
--- a/build.xml
+++ b/build.xml
-@@ -464,6 +464,8 @@
+@@ -470,6 +470,8 @@
windowtitle="${Name} ${version} API"
doctitle="${Name} ${version} API"
bottom="Copyright © ${year} The Apache Software Foundation"
@@ -12,7 +12,7 @@ Forwarded: no
>
<packageset dir="${java.src.dir}">
<include name="org/apache/**"/>
-@@ -488,6 +490,8 @@
+@@ -494,6 +496,8 @@
windowtitle="${Name} ${version} API"
doctitle="${Name} ${version} API"
bottom="Copyright © ${year} The Apache Software Foundation"
diff --git a/debian/rules b/debian/rules
index 8ed0841..d69ce5e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,16 +7,23 @@ DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^+]+)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
DEB_CHANGELOG_DATETIME = $(shell dpkg-parsechangelog --show-field Date)
+ANT_ARGS = -Dversion=$(DEB_UPSTREAM_VERSION) \
+ -DlastRevision=-1 \
+ -Divy.url=file:/usr/share/maven-repo/org/apache/ivy/ivy/ \
+ -Divy.version=debian \
+ -Divysettings.xml=/usr/share/ivy-debian-helper/ivysettings.xml \
+ -Dant.build.javac.source=1.5 \
+ -Dant.build.javac.target=1.5
+
%:
- dh $@ --with javahelper --with python2
+ dh $@ --buildsystem=ivy --with javahelper --with python2
override_dh_auto_build:
# TODO exclude the fatjar contrib from upstream tarball and include the rest contrib
mkdir -p build/test/classes
javacc -OUTPUT_DIRECTORY=src/java/main/org/apache/jute/compiler/generated src/java/main/org/apache/jute/compiler/generated/rcc.jj
- # the upstream build file includes .java files in the jars. Let's create the jars ourselves.
- # see: https://issues.apache.org/jira/browse/ZOOKEEPER-537
- ant -Dversion=$(DEB_UPSTREAM_VERSION) -DlastRevision=-1 '-Dbuild.time=$(DEB_CHANGELOG_DATETIME)' javadoc javadoc-dev jar
+
+ dh_auto_build -- $(ANT_ARGS) '-Dbuild.time=$(DEB_CHANGELOG_DATETIME)' -Dfinal.name=zookeeper javadoc javadoc-dev jar
# Compile C library
cd src/c && autoreconf -i
@@ -24,10 +31,7 @@ override_dh_auto_build:
$(MAKE) -C src/c
# Compile contribs - zooinspector
- cd src/contrib && \
- ant -Dversion=$(DEB_UPSTREAM_VERSION) \
- -propertyfile ../../debian/ant.properties \
- -Dcontribfilesetincludes="zooinspector/build.xml"
+ dh_auto_build -- -f src/contrib/build.xml $(ANT_ARGS) -Dcontribfilesetincludes="zooinspector/build.xml"
# Build Python Bindings
cd src/contrib/zkpython && \
@@ -103,11 +107,12 @@ override_dh_clean:
# the original build.xml deletes too much
override_dh_auto_clean:
- dh_testdir
+ dh_auto_clean
rm -rf .revision
rm -rf build
rm -rf src/c/generated
rm -rf src/java/generated
+ rm -rf src/java/lib/*.jar
rm -rf src/java/main/org/apache/jute/compiler/generated/*.java
rm -f zookeeper*.jar
[ ! -f src/c/Makefile ] || $(MAKE) -C src/c distclean
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/zookeeper.git
More information about the pkg-java-commits
mailing list