Skip to content
Commits on Source (9)
......@@ -25,6 +25,11 @@ indent_style = space
indent_size = 2
trim_trailing_whitespace=true
[*.{cs,ps1}]
indent_style = space
indent_size = 4
trim_trailing_whitespace=true
#[*.scala]
#indent_style = space
#indent_size = 2
......
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
C: ["lang/c/*"]
C++: ["lang/c++/*"]
C#: ["lang/csharp/*"]
Java: ["lang/java/*"]
Js: ["lang/js/*"]
Perl: ["lang/perl/*"]
Php: ["lang/php/*"]
Python: ["lang/py/*"]
Python3: ["lang/py3/*"]
Ruby: ["lang/ruby/*"]
build: ["Dockerfile","*.sh", "pom.xml", ".github/*"]
website: ["doc/*"]
......@@ -13,3 +13,7 @@ target
/build
test-output
/dist
/lang/java/compiler/nbactions.xml
/lang/java/compiler/nb-configuration.xml
/lang/java/compiler/nbproject/
**/.vscode/**/*
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
sudo: required
services:
- docker
language: generic
env:
- JAVA=8
- JAVA=11
before_install:
- sudo apt-get -q update
- sudo apt-get -q install --no-install-recommends -y curl git gnupg-agent locales pinentry-curses pkg-config rsync software-properties-common
- sudo apt-get -q clean
- sudo rm -rf /var/lib/apt/lists/*
- curl -L https://www-us.apache.org/dist/yetus/0.8.0/yetus-0.8.0-bin.tar.gz | tar xvz -C /tmp/
script:
- sed 's/java:8-jdk/java:'${JAVA}'-jdk/' share/docker/Dockerfile
- /tmp/yetus-0.8.0/bin/test-patch --plugins=buildtest --user-plugins=share/precommit/ --run-tests --empty-patch --docker --dockerfile=share/docker/Dockerfile --dirty-workspace --verbose=true
Apache Avro Build Instructions
# Apache Avro Build Instructions
REQUIREMENTS
## Requirements
The following packages must be installed before Avro can be built:
- Java: JDK 1.6, Maven 2 or better, protobuf-compile
- Java: JDK 1.8, Maven 2 or better, protobuf-compile
- PHP: php5, phpunit, php5-gmp
- Python: 2.5 or greater, python-setuptools for dist target
- Python 2: 2.7 or greater, python-setuptools for dist target
- Python 3: 3.5 or greater
- C: gcc, cmake, asciidoc, source-highlight
- C++: cmake 2.8.4 or greater, g++, flex, bison, libboost-dev
- C++: cmake 3.7.2 or greater, g++, flex, bison, libboost-dev
- C#: mono-devel mono-gmcs nunit
- JavaScript: nodejs, npm
- Ruby: ruby 1.86 or greater, ruby-dev, gem, rake, echoe, yajl-ruby
- Perl: perl 5.8.1 or greater, gmake, Module::Install,
- JavaScript: Node 6.x+, nodejs, npm
- Ruby: Ruby 2.3.3 or greater, ruby-dev, gem, rake, echoe, yajl-ruby
- Perl: Perl 5.24.1 or greater, gmake, Module::Install,
Module::Install::ReadmeFromPod, Module::Install::Repository,
Math::BigInt, JSON::XS, Try::Tiny, Regexp::Common, Encode,
IO::String, Object::Tiny, Compress::ZLib, Test::More,
Test::Exception, Test::Pod
- Apache Ant 1.7
- Apache Forrest 0.8 (for documentation)
- Apache Forrest 0.9 (for documentation)
- md5sum, sha1sum, used by top-level dist target
To simplify this, you can run a Docker container with all the above
dependencies installed by installing docker.io and typing:
dependencies installed by installing Docker and run:
```bash
./build.sh docker
docker@539f6535c9db:~/avro$ cd lang/java/
docker@539f6535c9db:~/avro/lang/java$ ./build.sh test
[INFO] Scanning for projects...
```
When this completes you will be in a shell running in the
container. Building the image the first time may take a while (20
......@@ -36,11 +42,22 @@ The working directory in the container is mounted from your host. This
allows you to access the files in your Avro development tree from the
Docker container.
BUILDING
## Building
Once the requirements are installed (or from the Docker container),
build.sh can be used as follows:
'./build.sh test' runs tests for all languages
'./build.sh dist' creates all release distribution files in dist/
'./build.sh clean' removes all generated artifacts
```
./build.sh test # runs tests for all languages
./build.sh dist # creates all release distribution files in dist/
./build.sh clean # removes all generated artifacts
```
## Testing
Testing is done with the same Docker container as mentioned in the building
step. The difference is that it will do clean run of the full test suite:
```bash
./build.sh docker-test
```
This diff is collapsed.
......@@ -9,6 +9,7 @@ This distribution contains the following files:
- avro-doc-x.y.z.tar.gz contains Avro's pre-built documentation.
- the c/, cpp/, java/, php/, py/, and ruby/ subdirectories contain
pre-built, language-specific binaries, bundles, etc. as
conveniences.
- the c/, cpp/, csharp/, java/, js/, perl/, php/, py/, py3/ and ruby/
subdirectories contain pre-built, language-specific binaries,
bundles, etc. as conveniences.
Apache Avro
Copyright 2010-2015 The Apache Software Foundation
Copyright 2010-2019 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
......
[![Build Status](https://travis-ci.org/apache/avro.svg?branch=master)](https://travis-ci.org/apache/avro)
# Apache Avro™
Apache Avro™ is a data serialization system.
Learn more about Avro, please visit our website at:
......
......@@ -20,9 +20,10 @@ set -e # exit on error
cd `dirname "$0"` # connect to root
VERSION=`cat share/VERSION.txt`
DOCKER_XTRA_ARGS=""
function usage {
echo "Usage: $0 {test|dist|sign|clean|docker|rat|githooks}"
echo "Usage: $0 {test|dist|sign|clean|docker [--args \"docker-args\"]|rat|githooks|docker-test}"
exit 1
}
......@@ -33,15 +34,22 @@ fi
set -x # echo commands
for target in "$@"
while (( "$#" ))
do
target="$1"
shift
case "$target" in
test)
# run lang-specific tests
(cd lang/java; ./build.sh test)
# create interop test data
mkdir -p build/interop/data
(cd lang/java/avro; mvn -B -P interop-data-generate generate-resources)
# install java artifacts required by other builds and interop tests
mvn install -DskipTests
mvn -B install -DskipTests
(cd lang/py; ./build.sh test)
(cd lang/py3; ./build.sh test)
(cd lang/c; ./build.sh test)
......@@ -52,9 +60,6 @@ do
(cd lang/php; ./build.sh test)
(cd lang/perl; ./build.sh test)
# create interop test data
mkdir -p build/interop/data
(cd lang/java/avro; mvn -P interop-data-generate generate-resources)
(cd lang/py; ant interop-data-generate)
(cd lang/c; ./build.sh interop-data-generate)
#(cd lang/c++; make interop-data-generate)
......@@ -62,7 +67,7 @@ do
(cd lang/php; ./build.sh interop-data-generate)
# run interop data tests
(cd lang/java; mvn test -P interop-data-test)
(cd lang/java; mvn -B test -P interop-data-test)
(cd lang/py; ant interop-data-test)
(cd lang/c; ./build.sh interop-data-test)
#(cd lang/c++; make interop-data-test)
......@@ -70,16 +75,13 @@ do
(cd lang/php; ./build.sh test-interop)
# java needs to package the jars for the interop rpc tests
(cd lang/java; mvn package -DskipTests)
(cd lang/java; mvn -B package -DskipTests)
# run interop rpc test
/bin/bash share/test/interop/bin/test_rpc_interop.sh
./share/test/interop/bin/test_rpc_interop.sh
;;
dist)
# ensure version matches
# FIXME: enforcer is broken:MENFORCER-42
# mvn enforcer:enforce -Davro.version=$VERSION
# build source tarball
mkdir -p build
......@@ -100,7 +102,7 @@ do
fi
# runs RAT on artifacts
mvn -N -P rat antrun:run
mvn -N -P rat antrun:run verify
mkdir -p dist
(cd build; tar czf ../dist/${SRC_DIR}.tar.gz ${SRC_DIR})
......@@ -151,10 +153,10 @@ do
for f in $(find dist -type f \
\! -name '*.md5' \! -name '*.sha1' \
\! -name '*.sha512' \! -name '*.sha256' \
\! -name '*.asc' \! -name '*.txt' );
do
(cd `dirname $f`; md5sum `basename $f`) > $f.md5
(cd `dirname $f`; sha1sum `basename $f`) > $f.sha1
(cd `dirname $f`; shasum -a 512 `basename $f`) > $f.sha512
gpg --passphrase $password --armor --output $f.asc --detach-sig $f
done
......@@ -165,7 +167,41 @@ do
rm -rf build dist
(cd doc; ant clean)
(mvn clean)
(mvn -B clean)
rm -rf lang/java/*/userlogs/
rm -rf lang/java/*/dependency-reduced-pom.xml
(cd lang/py; ant clean)
rm -rf lang/py/userlogs/
(cd lang/py3; python3 setup.py clean)
rm -rf lang/py3/dist
rm -rf lang/py3/avro_python3.egg-info
rm -f lang/py3/avro/*.avsc
rm -f lang/py3/avro/VERSION.txt
rm -rf lang/py3/avro/__pycache__/
rm -f lang/py3/avro/tests/interop.avsc
rm -rf lang/py3/avro/tests/__pycache__/
(cd lang/c; ./build.sh clean)
(cd lang/c++; ./build.sh clean)
(cd lang/csharp; ./build.sh clean)
(cd lang/js; ./build.sh clean)
(cd lang/ruby; ./build.sh clean)
(cd lang/php; ./build.sh clean)
(cd lang/perl; ./build.sh clean)
;;
veryclean)
rm -rf build dist
(cd doc; ant clean)
(mvn -B clean)
rm -rf lang/java/*/userlogs/
rm -rf lang/java/*/dependency-reduced-pom.xml
......@@ -194,10 +230,23 @@ do
(cd lang/php; ./build.sh clean)
(cd lang/perl; ./build.sh clean)
rm -rf lang/c++/build
rm -rf lang/c++/test?.df
rm -rf lang/js/node_modules
rm -rf lang/perl/inc/
rm -rf lang/ruby/.gem/
rm -rf lang/ruby/Gemfile.lock
rm -rf lang/py/lib/ivy-2.2.0.jar
rm -rf lang/csharp/src/apache/ipc.test/bin/
rm -rf lang/csharp/src/apache/ipc.test/obj
;;
docker)
docker build -t avro-build share/docker
if [[ $1 =~ ^--args ]]; then
DOCKER_XTRA_ARGS=$2
shift 2
fi
docker build -t avro-build -f share/docker/Dockerfile .
if [ "$(uname -s)" == "Linux" ]; then
USER_NAME=${SUDO_USER:=$USER}
USER_ID=$(id -u $USER_NAME)
......@@ -210,20 +259,27 @@ do
docker build -t avro-build-${USER_NAME} - <<UserSpecificDocker
FROM avro-build
RUN groupadd -g ${GROUP_ID} ${USER_NAME} || true
RUN useradd -g ${GROUP_ID} -u ${USER_ID} -k /root -m ${USER_NAME}
RUN useradd -g ${GROUP_ID} -u ${USER_ID} -k /root -m ${USER_NAME} || true
ENV HOME /home/${USER_NAME}
UserSpecificDocker
# By mapping the .m2 directory you can do an mvn install from
# within the container and use the result on your normal
# system. And this also is a significant speedup in subsequent
# builds because the dependencies are downloaded only once.
docker run --rm=true -t -i \
-v ${PWD}:/home/${USER_NAME}/avro \
#
# On OSX, it's highly suggested to set an env variable of:
# export DOCKER_MOUNT_FLAG=":delegated"
# Using :delegated will drop the "mvn install" time from over 30 minutes
# down to under 10. However, editing files from OSX may take a few
# extra second before the changes are available within the docker container.
docker run --rm -t -i \
-v ${PWD}:/home/${USER_NAME}/avro${DOCKER_MOUNT_FLAG} \
-w /home/${USER_NAME}/avro \
-v ${HOME}/.m2:/home/${USER_NAME}/.m2 \
-v ${HOME}/.m2:/home/${USER_NAME}/.m2${DOCKER_MOUNT_FLAG} \
-v ${HOME}/.gnupg:/home/${USER_NAME}/.gnupg \
-u ${USER_NAME} \
avro-build-${USER_NAME}
${DOCKER_XTRA_ARGS} \
avro-build-${USER_NAME} bash
;;
rat)
......@@ -236,6 +292,11 @@ UserSpecificDocker
find .git/hooks/ -type f | fgrep -v sample | xargs chmod 755
;;
docker-test)
docker build -t avro-test -f share/docker/Dockerfile .
docker run --rm -v ${PWD}:/avro/ avro-test
;;
*)
usage
;;
......
python-avro (1.9.0+dfsg-1) unstable; urgency=medium
* Team upload.
* New upstream version
* debhelper-compat 12
* Standards-Version: 4.4.0
* Use secure URI in Homepage field.
* Set upstream metadata fields: Name.
-- Andreas Tille <tille@debian.org> Thu, 01 Aug 2019 22:29:50 +0200
python-avro (1.8.2+dfsg-2) unstable; urgency=medium
* Team upload.
......
......@@ -4,7 +4,7 @@ Uploaders: Afif Elghraoui <afif@debian.org>
Section: python
Testsuite: autopkgtest-pkg-python
Priority: optional
Build-Depends: debhelper (>= 11~),
Build-Depends: debhelper-compat (= 12),
default-jdk,
ant,
dh-python,
......@@ -13,10 +13,10 @@ Build-Depends: debhelper (>= 11~),
python-simplejson,
python3-all,
python3-setuptools
Standards-Version: 4.2.1
Standards-Version: 4.4.0
Vcs-Browser: https://salsa.debian.org/med-team/python-avro
Vcs-Git: https://salsa.debian.org/med-team/python-avro.git
Homepage: http://avro.apache.org
Homepage: https://avro.apache.org
Package: python-avro
Architecture: all
......
......@@ -22,9 +22,11 @@
<!-- Load user's default properties. -->
<property file="${user.home}/build.properties" />
<loadresource property="version">
<file file="${basedir}/../share/VERSION.txt"/>
</loadresource>
<loadfile srcFile="${basedir}/../share/VERSION.txt" property="version">
<filterchain>
<striplinebreaks/>
</filterchain>
</loadfile>
<property name="build.dir" value="../build/avro-doc-${version}"/>
......
......@@ -61,8 +61,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
......
/**
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
......
/**
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
......
......@@ -33,8 +33,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
......