[avro-java] 01/02: Initial packaging

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Sat Jan 31 22:57:33 UTC 2015


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master
in repository avro-java.

commit ae07c7da6ffd77fba34c3b0dcc2bacd4d9747b24
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Sat Jan 31 23:54:23 2015 +0100

    Initial packaging
---
 debian/README.source                               |  9 +++
 debian/changelog                                   |  5 ++
 debian/compat                                      |  1 +
 debian/control                                     | 78 ++++++++++++++++++++++
 debian/copyright                                   | 46 +++++++++++++
 debian/libavro-java.poms                           | 39 +++++++++++
 debian/libavro-maven-plugin-java.lintian-overrides |  2 +
 debian/maven.cleanIgnoreRules                      |  1 +
 debian/maven.ignoreRules                           | 10 +++
 debian/maven.properties                            |  6 ++
 debian/maven.publishedRules                        |  3 +
 debian/maven.rules                                 | 25 +++++++
 debian/orig-tar.sh                                 | 33 +++++++++
 .../patches/01-maven-bundle-plugin-version.patch   | 14 ++++
 debian/patches/02-explicit-xz-dependency.patch     | 20 ++++++
 debian/patches/03-explicit-bundle-type.patch       | 24 +++++++
 debian/patches/series                              |  3 +
 debian/rules                                       | 13 ++++
 debian/source/format                               |  1 +
 debian/watch                                       |  3 +
 20 files changed, 336 insertions(+)

diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 0000000..90ee603
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,9 @@
+Information about avro
+----------------------
+
+This package was debianized using the mh_make command
+from the maven-debian-helper package.
+
+The build system uses Maven but prevents it from downloading
+anything from the Internet, making the build compliant with
+the Debian policy.
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..b2ddd37
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+avro-java (1.7.7-1) unstable; urgency=medium
+
+  * Initial release (Closes: #776654)
+
+ -- Emmanuel Bourg <ebourg at apache.org>  Sat, 31 Jan 2015 23:41:31 +0100
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..72beadc
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,78 @@
+Source: avro-java
+Section: java
+Priority: optional
+Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
+Uploaders: Emmanuel Bourg <ebourg at apache.org>
+Build-Depends: cdbs,
+               debhelper (>= 9),
+               default-jdk,
+               junit4,
+               libcommons-compress-java,
+               libcommons-lang-java,
+               libjackson-json-java,
+               libjavacc-maven-plugin-java,
+               libmaven-bundle-plugin-java,
+               libmaven-file-management-java,
+               libmaven-plugin-testing-java,
+               libmaven-plugin-tools-java (>= 3.2),
+               libmaven2-core-java,
+               libparanamer-java (>= 2.3),
+               libparanamer-maven-plugin-java,
+               libslf4j-java,
+               libsnappy-java,
+               libxz-java,
+               maven-debian-helper (>= 1.5),
+               thrift-compiler,
+               velocity
+Standards-Version: 3.9.6
+Vcs-Git: git://anonscm.debian.org/pkg-java/avro-java.git
+Vcs-Browser: https://anonscm.debian.org/cgit/pkg-java/avro-java.git
+Homepage: http://avro.apache.org
+
+Package: libavro-java
+Architecture: all
+Depends: ${misc:Depends}, libjackson-json-java, libparanamer-java, libsnappy-java, libcommons-compress-java, libxz-java, libslf4j-java
+Description: Apache Avro data serialization system
+ Apache Avro is a data serialization system providing:
+  * Rich data structures.
+  * A compact, fast, binary data format.
+  * A container file, to store persistent data.
+  * Remote procedure call (RPC).
+  * Simple integration with dynamic languages. Code generation is not required
+    to read or write data files nor to use or implement RPC protocols. Code
+    generation as an optional optimization, only worth implementing
+    for statically typed languages.
+ .
+ This package contains the Java API of Apache Avro
+
+Package: libavro-compiler-java
+Architecture: all
+Depends: ${misc:Depends}, libavro-java, libcommons-lang-java, velocity
+Description: Apache Avro compiler for Java
+ Apache Avro is a data serialization system providing:
+  * Rich data structures.
+  * A compact, fast, binary data format.
+  * A container file, to store persistent data.
+  * Remote procedure call (RPC).
+  * Simple integration with dynamic languages. Code generation is not required
+    to read or write data files nor to use or implement RPC protocols. Code
+    generation as an optional optimization, only worth implementing
+    for statically typed languages.
+ .
+ This package contains the compilers for Avro IDL and Avro specific Java API.
+
+Package: libavro-maven-plugin-java
+Architecture: all
+Depends: ${misc:Depends}, libavro-compiler-java, libmaven-file-management-java
+Description: Apache Avro Maven plugin
+ Apache Avro is a data serialization system providing:
+  * Rich data structures.
+  * A compact, fast, binary data format.
+  * A container file, to store persistent data.
+  * Remote procedure call (RPC).
+  * Simple integration with dynamic languages. Code generation is not required
+    to read or write data files nor to use or implement RPC protocols. Code
+    generation as an optional optimization, only worth implementing
+    for statically typed languages.
+ .
+ This package contains the Maven plugin for Avro IDL and specific API compilers
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..ea74d0c
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,46 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: Apache Avro Toplevel
+Source: http://avro.apache.org
+
+Files: *
+Copyright: 2009-2015, The Apache Software Foundation
+License: Apache-2.0
+
+Files: debian/*
+Copyright: 2015, Emmanuel Bourg <ebourg at apache.org>
+License: Apache-2.0
+
+Files: lang/java/ipc/src/main/java/org/apache/avro/ipc/trace/static/g.bar.js
+       lang/java/ipc/src/main/java/org/apache/avro/ipc/stats/static/g.bar.js
+Copyright: 2009, Dmitry Baranovskiy
+License: MIT
+
+Files: lang/java/ipc/src/main/java/org/apache/avro/ipc/trace/static/tipsy.js
+       lang/java/ipc/src/main/java/org/apache/avro/ipc/stats/static/tipsy.js
+       lang/java/ipc/src/main/java/org/apache/avro/ipc/trace/static/jquery.tipsy.js
+       lang/java/ipc/src/main/java/org/apache/avro/ipc/stats/static/jquery.tipsy.js
+Copyright: 2008 Jason Frame <jason at onehackoranother.com>
+License: MIT
+
+License: Apache-2.0
+ On Debian systems, the full text of the Apache-2.0 license
+ can be found in the file '/usr/share/common-licenses/Apache-2.0'
+
+License: MIT
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
diff --git a/debian/libavro-java.poms b/debian/libavro-java.poms
new file mode 100644
index 0000000..b19f67d
--- /dev/null
+++ b/debian/libavro-java.poms
@@ -0,0 +1,39 @@
+# List of POM files for the package
+# Format of this file is:
+# <path to pom file> [option]*
+# where option can be:
+#   --ignore: ignore this POM and its artifact if any
+#   --ignore-pom: don't install the POM. To use on POM files that are created
+#     temporarily for certain artifacts such as Javadoc jars. [mh_install, mh_installpoms]
+#   --no-parent: remove the <parent> tag from the POM
+#   --package=<package>: an alternative package to use when installing this POM
+#      and its artifact
+#   --has-package-version: to indicate that the original version of the POM is the same as the upstream part
+#      of the version for the package.
+#   --keep-elements=<elem1,elem2>: a list of XML elements to keep in the POM
+#      during a clean operation with mh_cleanpom or mh_installpom
+#   --artifact=<path>: path to the build artifact associated with this POM,
+#      it will be installed when using the command mh_install. [mh_install]
+#   --java-lib: install the jar into /usr/share/java to comply with Debian
+#      packaging guidelines
+#   --usj-name=<name>: name to use when installing the library in /usr/share/java
+#   --usj-version=<version>: version to use when installing the library in /usr/share/java
+#   --no-usj-versionless: don't install the versionless link in /usr/share/java
+#   --dest-jar=<path>: the destination for the real jar.
+#     It will be installed with mh_install. [mh_install]
+#   --classifier=<classifier>: Optional, the classifier for the jar. Empty by default.
+#   --site-xml=<location>: Optional, the location for site.xml if it needs to be installed.
+#     Empty by default. [mh_install]
+#
+pom.xml --no-parent --has-package-version
+lang/java/pom.xml --has-package-version
+lang/java/avro/pom.xml --has-package-version
+lang/java/compiler/pom.xml --has-package-version --package=libavro-compiler-java
+lang/java/maven-plugin/pom.xml --has-package-version --no-usj-versionless --package=libavro-maven-plugin-java
+lang/java/ipc/pom.xml --ignore
+lang/java/trevni/pom.xml --ignore
+lang/java/tools/pom.xml --ignore
+lang/java/mapred/pom.xml --ignore
+lang/java/protobuf/pom.xml --ignore
+lang/java/thrift/pom.xml --ignore
+lang/java/archetypes/pom.xml --ignore
diff --git a/debian/libavro-maven-plugin-java.lintian-overrides b/debian/libavro-maven-plugin-java.lintian-overrides
new file mode 100644
index 0000000..45b385b
--- /dev/null
+++ b/debian/libavro-maven-plugin-java.lintian-overrides
@@ -0,0 +1,2 @@
+# Maven plugins don't need to install a jar in /usr/share/java
+libavro-maven-plugin-java: javalib-but-no-public-jars
diff --git a/debian/maven.cleanIgnoreRules b/debian/maven.cleanIgnoreRules
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/debian/maven.cleanIgnoreRules
@@ -0,0 +1 @@
+
diff --git a/debian/maven.ignoreRules b/debian/maven.ignoreRules
new file mode 100644
index 0000000..3b05cec
--- /dev/null
+++ b/debian/maven.ignoreRules
@@ -0,0 +1,10 @@
+
+org.apache.avro avro-archetypes-parent pom * * *
+org.apache.avro avro-ipc bundle * * *
+org.apache.avro avro-mapred bundle * * *
+org.apache.avro avro-protobuf bundle * * *
+org.apache.avro avro-thrift bundle * * *
+org.apache.avro avro-tools jar * * *
+org.apache.avro trevni-java pom * * *
+org.apache.maven.plugins maven-checkstyle-plugin * * * *
+org.apache.maven.plugins maven-enforcer-plugin * * * *
diff --git a/debian/maven.properties b/debian/maven.properties
new file mode 100644
index 0000000..eca2d80
--- /dev/null
+++ b/debian/maven.properties
@@ -0,0 +1,6 @@
+# Include here properties to pass to Maven during the build.
+# For example:
+# maven.test.skip=true
+
+maven.test.skip=false
+maven.test.failure.ignore=true
diff --git a/debian/maven.publishedRules b/debian/maven.publishedRules
new file mode 100644
index 0000000..692404c
--- /dev/null
+++ b/debian/maven.publishedRules
@@ -0,0 +1,3 @@
+
+org.apache.avro avro-compiler s/jar/bundle/ s/.*/debian/ * *
+org.apache.avro avro s/jar/bundle/ s/.*/debian/ * *
diff --git a/debian/maven.rules b/debian/maven.rules
new file mode 100644
index 0000000..63b20c8
--- /dev/null
+++ b/debian/maven.rules
@@ -0,0 +1,25 @@
+
+com.thoughtworks.paranamer paranamer s/jar/bundle/ s/.*/debian/ * *
+commons-httpclient commons-httpclient jar s/3\..*/3.x/ * *
+junit junit jar s/4\..*/4.x/ * *
+net.sf.jopt-simple jopt-simple jar s/.*/debian/ * *
+org.apache apache pom s/.*/debian/ * *
+org.apache.avro avro-compiler s/jar/bundle/ s/.*/debian/ * *
+org.apache.avro avro-parent pom s/.*/debian/ * *
+org.apache.avro avro-toplevel pom s/.*/debian/ * *
+org.apache.avro avro s/jar/bundle/ s/.*/debian/ * *
+org.apache.avro avro test-jar * * *
+org.apache.maven maven-plugin-api jar s/.*/debian/ * *
+org.apache.maven.shared file-management jar s/.*/debian/ * *
+org.apache.velocity velocity jar s/.*/debian/ * *
+org.xerial.snappy snappy-java bundle s/.*/debian/ * *
+s/easymock/org.easymock/ easymock * s/.*/debian/ * *
+io.netty netty * * * *
+io.netty netty * s/.*/debian/ * *
+junit s/junit-dep/junit/ * s/.*/4.x/ * *
+s/ant/org.apache.ant/ * * s/.*/debian/ * *
+org.mortbay.jetty * * s/6\..*/6.x/ * *
+s/org.apache.maven.shared/org.apache.maven.plugin-testing/ maven-plugin-testing-harness * s/.*/debian/ * *
+s/org.apache.maven.shared/org.apache.maven.plugin-testing/ maven-plugin-testing-tools * s/.*/debian/ * *
+s/org.apache.maven.shared/org.apache.maven.plugin-testing/ maven-plugin-testing * s/.*/debian/ * *
+s/org.apache.maven.shared/org.apache.maven.plugin-testing/ maven-test-tools * s/.*/debian/ * *
diff --git a/debian/orig-tar.sh b/debian/orig-tar.sh
new file mode 100755
index 0000000..0bcf808
--- /dev/null
+++ b/debian/orig-tar.sh
@@ -0,0 +1,33 @@
+#!/bin/sh -e
+#
+# Removes unwanted content from the upstream sources.
+# Called by uscan with '--upstream-version' <version> <file>
+#
+
+VERSION=$2
+TAR=../avro-java_$VERSION.orig.tar.xz
+DIR=avro-$VERSION
+TAG=$(echo "release-$VERSION" | sed -re's/~(alpha|beta|rc)/-\1-/')
+
+svn export http://svn.apache.org/repos/asf/avro/tags/${TAG} $DIR
+XZ_OPT=--best tar -c -v -J -f $TAR \
+    --exclude '*.jar' \
+    --exclude '*.class' \
+    --exclude 'lang/c/*' \
+    --exclude 'lang/c++/*' \
+    --exclude 'lang/csharp/*' \
+    --exclude 'lang/js/*' \
+    --exclude 'lang/perl/*' \
+    --exclude 'lang/php/*' \
+    --exclude 'lang/py*' \
+    --exclude 'lang/ruby/*' \
+    --exclude '*/jquery-*.min.js' \
+    --exclude '*/protovis-*.js' \
+    $DIR
+rm -rf $DIR ../$TAG
+
+# move to directory 'tarballs'
+if [ -r .svn/deb-layout ]; then
+  . .svn/deb-layout
+  mv $TAR $origDir && echo "moved $TAR to $origDir"
+fi
diff --git a/debian/patches/01-maven-bundle-plugin-version.patch b/debian/patches/01-maven-bundle-plugin-version.patch
new file mode 100644
index 0000000..656c215
--- /dev/null
+++ b/debian/patches/01-maven-bundle-plugin-version.patch
@@ -0,0 +1,14 @@
+Description: Do no specify the version of the maven-bundle-plugin to always pick the version available in Debian
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: not-needed
+--- a/lang/java/pom.xml
++++ b/lang/java/pom.xml
+@@ -289,7 +289,7 @@
+       <plugin>
+         <groupId>org.apache.felix</groupId>
+         <artifactId>maven-bundle-plugin</artifactId>
+-        <version>${bundle-plugin-version}</version>
++<!--        <version>${bundle-plugin-version}</version>-->
+         <extensions>true</extensions>
+         <inherited>true</inherited>
+         <configuration>
diff --git a/debian/patches/02-explicit-xz-dependency.patch b/debian/patches/02-explicit-xz-dependency.patch
new file mode 100644
index 0000000..51a5c2f
--- /dev/null
+++ b/debian/patches/02-explicit-xz-dependency.patch
@@ -0,0 +1,20 @@
+Description: Avro uses commons-compress 1.4.1 but Debian has a more recent
+ version where the dependency on xz is optional, thus the dependency must
+ be added explicitly. This patch can be removed once Avro upgrades
+ to commons-compress 1.8.1 or higher.
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: not-needed
+--- a/lang/java/avro/pom.xml
++++ b/lang/java/avro/pom.xml
+@@ -158,6 +158,11 @@
+       <groupId>org.apache.commons</groupId>
+       <artifactId>commons-compress</artifactId>
+     </dependency>
++    <dependency>
++      <groupId>org.tukaani</groupId>
++      <artifactId>xz</artifactId>
++      <version>debian</version>
++    </dependency>
+   </dependencies>
+ 
+ </project>
diff --git a/debian/patches/03-explicit-bundle-type.patch b/debian/patches/03-explicit-bundle-type.patch
new file mode 100644
index 0000000..571684d
--- /dev/null
+++ b/debian/patches/03-explicit-bundle-type.patch
@@ -0,0 +1,24 @@
+Description: Specify the packaging type of the internal dependencies since Maven
+ fails to resolve the bundle dependencies for an unknown reason.
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: not-needed
+--- a/lang/java/compiler/pom.xml
++++ b/lang/java/compiler/pom.xml
+@@ -94,6 +94,7 @@
+       <groupId>${project.groupId}</groupId>
+       <artifactId>avro</artifactId>
+       <version>${project.version}</version>
++      <type>bundle</type>
+     </dependency>
+     <dependency>
+       <groupId>${project.groupId}</groupId>
+--- a/lang/java/maven-plugin/pom.xml
++++ b/lang/java/maven-plugin/pom.xml
+@@ -80,6 +80,7 @@
+       <groupId>${project.groupId}</groupId>
+       <artifactId>avro-compiler</artifactId>
+       <version>${project.version}</version>
++      <type>bundle</type>
+     </dependency>
+     <!-- test-->
+     <dependency>
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..8f83712
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+01-maven-bundle-plugin-version.patch
+02-explicit-xz-dependency.patch
+03-explicit-bundle-type.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..a5e36c6
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,13 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/maven.mk
+
+JAVA_HOME := /usr/lib/jvm/default-java
+
+configure/libavro-java::
+	# Regenerate the Java classes from the Thrift file
+	thrift -gen java:beans -out lang/java/thrift/src/test/java/ lang/java/thrift/src/test/thrift/test.thrift
+
+get-orig-source:
+	uscan --download-current-version --force-download --no-symlink
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..c52790a
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,3 @@
+version=3
+opts="uversionmangle=s/-(alpha|beta|rc)(-)?/~$1$2/" \
+  http://svn.apache.org/repos/asf/avro/tags/ release-(\d.*)/ debian debian/orig-tar.sh

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/avro-java.git



More information about the pkg-java-commits mailing list