Skip to content

Commit 6f2ab75

Browse files
author
Mate Szalay-Beko
committed
Merge remote-tracking branch 'apache/master' into ZOOKEEPER-3188
2 parents 2eedf26 + 99be7de commit 6f2ab75

167 files changed

Lines changed: 1916 additions & 1383 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,6 @@ tags
6868
.cproject
6969
.project
7070
obj
71-
zookeeper-client/zookeeper-client-c/core.*
72-
zookeeper-client/zookeeper-client-c/TEST-*.txt
73-
zookeeper-client/zookeeper-client-c/*.la
74-
zookeeper-client/zookeeper-client-c/*.lo
75-
zookeeper-client/zookeeper-client-c/*.o
76-
zookeeper-client/zookeeper-client-c/generated/
77-
zookeeper-server/src/main/resources/lib/ant-eclipse-*
78-
zookeeper-server/src/main/resources/lib/ivy-*
7971
zookeeper-client/zookeeper-client-c/Makefile.in
8072
zookeeper-client/zookeeper-client-c/aclocal.m4
8173
zookeeper-client/zookeeper-client-c/autom4te.cache/
@@ -88,7 +80,12 @@ zookeeper-client/zookeeper-client-c/depcomp
8880
zookeeper-client/zookeeper-client-c/install-sh
8981
zookeeper-client/zookeeper-client-c/ltmain.sh
9082
zookeeper-client/zookeeper-client-c/missing
91-
zookeeper-server/src/test/resources/
83+
zookeeper-client/zookeeper-client-c/TEST-*.txt
84+
zookeeper-client/zookeeper-client-c/generated/
85+
zookeeper-server/src/main/resources/lib/ant-eclipse-*
86+
zookeeper-server/src/main/resources/lib/ivy-*
87+
zookeeper-server/src/main/java/org/apache/zookeeper/version/Info.java
88+
zookeeper-server/src/main/java/org/apache/zookeeper/version/VersionInfoMain.java
9289

9390
# Python
9491
*.py[cod]

README_packaging.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# README file for Packaging Notes
2+
3+
The ZooKeeper project publishes releases as tarballs. For ZooKeeper packages
4+
specific to your OS (such as rpm and deb), consider using Apache Bigtop:
5+
6+
http://bigtop.apache.org/
7+
8+
9+
## Requirements
10+
11+
- ant (recommended version 1.9.4 or later for concurrent JUnit test execution) or maven to build the java code
12+
- gcc, cppunit and python-setuptools are required to build C and python bindings.
13+
14+
On RHEL machine:
15+
16+
```
17+
yum install cppunit
18+
yum install python-setuptools
19+
```
20+
21+
On Ubuntu:
22+
23+
```
24+
apt-get install cppunit
25+
apt-get install python-setuptools
26+
```
27+
28+
29+
## Package build command (using maven)
30+
31+
Commands to clean everything and build the tarball package without executing the tests: `mvn clean install -DskipTests`
32+
33+
34+
`zookeeper-assembly/target/apache-zookeeper-<version>-bin.tar.gz` tarball file structure layout:
35+
36+
- `/bin` - User executables
37+
- `/conf` - Configuration files
38+
- `/lib` - ZooKeeper JAR files and all the required java library dependencies
39+
- `/docs` - Documents
40+
41+
Beside the binary tarball, you can find the whole original source project packaged into:
42+
`zookeeper-assembly/target/apache-zookeeper-<version>.tar.gz`
43+
44+
45+
### Building the C client (using maven)
46+
47+
To also build the C client, you need to activate the `full-build` profile:
48+
49+
```
50+
mvn clean -Pfull-build
51+
mvn install -Pfull-build -DskipTests
52+
```
53+
54+
Optional parameters you might consider when using maven:
55+
- `-Pfull-build` - activates the full-build profile, causing the C client to be built
56+
- `-DskipTests` - this parameter will skip both java and C++ unit test execution during the build
57+
- `-Pc-test-coverage` - activates the test coverage calculation during the execution of C client tests
58+
59+
Please note: if you don't provide the `-Pfull-build` parameter, then the C client will not be built, the C client tests
60+
will not be executed and the previous C client builds will no be cleaned up (e.g. with simply using `mvn clean`).
61+
62+
The compiled C client can be found here:
63+
- `zookeeper-client/zookeeper-client-c/target/c/bin` - User executable
64+
- `zookeeper-client/zookeeper-client-c/target/c/lib` - Native libraries
65+
- `zookeeper-client/zookeeper-client-c/target/c/include/zookeeper` - Native library headers
66+
67+
The same folders gets archived to the `zookeeper-assembly/target/apache-zookeeper-<version>-lib.tar.gz` file, assuming you activated the `full-build` maven profile.
68+
69+
## Package build command (using ant)
70+
71+
**Command to build tarball package:** `ant tar`
72+
73+
`zookeeper-<version>.tar.gz` tarball file structure layout:
74+
75+
- `/bin` - User executable
76+
- `/sbin` - System executable
77+
- `/libexec` - Configuration boot trap script
78+
- `/lib` - Library dependencies
79+
- `/docs` - Documents
80+
- `/share/zookeeper` - Project files
81+
82+
83+
**Command to build tarball package with native components:** `ant package-native tar`
84+
85+
`zookeeper-<version>-lib.tar.gz` tarball file structure layout:
86+
87+
- `/bin` - User executable
88+
- `/lib` - Native libraries
89+
- `/include/zookeeper` - Native library headers
90+

README_packaging.txt

Lines changed: 0 additions & 45 deletions
This file was deleted.

build.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
875875
<copy todir="${dist.dir}">
876876
<fileset file="CHANGES.txt"/>
877877
<fileset file="README.md"/>
878-
<fileset file="README_packaging.txt"/>
878+
<fileset file="README_packaging.md"/>
879879
<fileset file="build.xml"/>
880880
<fileset file="ivy.xml"/>
881881
<fileset file="ivysettings.xml"/>
@@ -1004,7 +1004,7 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
10041004
<copy todir="${dist.dir}">
10051005
<fileset file="CHANGES.txt"/>
10061006
<fileset file="README.md"/>
1007-
<fileset file="README_packaging.txt"/>
1007+
<fileset file="README_packaging.md"/>
10081008
<fileset file="build.xml"/>
10091009
<fileset file="ivy.xml"/>
10101010
<fileset file="ivysettings.xml"/>
@@ -1760,7 +1760,7 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
17601760
<exclude name="**/wrappers*.opt"/>
17611761
<exclude name="CHANGES.txt"/>
17621762
<exclude name="**/README.md"/>
1763-
<exclude name="README_packaging.txt"/>
1763+
<exclude name="README_packaging.md"/>
17641764
<exclude name="**/TODO"/>
17651765
<exclude name="**/VERSION"/>
17661766
<exclude name="**/ChangeLog"/>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@
789789
<exclude>conf/configuration.xsl</exclude>
790790
<exclude>.travis.yml</exclude>
791791
<exclude>excludeFindBugsFilter.xml</exclude>
792-
<exclude>README_packaging.txt</exclude>
792+
<exclude>README_packaging.md</exclude>
793793
<exclude>src/main/resources/markdown/skin/*</exclude>
794794
<exclude>src/main/resources/markdown/html/*</exclude>
795795
<exclude>src/main/resources/markdown/images/*</exclude>

zookeeper-assembly/pom.xml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,20 @@
3333
<name>Apache ZooKeeper - Assembly</name>
3434
<description>ZooKeeper Assembly</description>
3535

36+
<profiles>
37+
<profile>
38+
<id>full-build</id>
39+
<properties>
40+
<skip.lib.artifact>false</skip.lib.artifact>
41+
</properties>
42+
</profile>
43+
</profiles>
44+
45+
3646
<properties>
3747
<rw.file.permission>0644</rw.file.permission>
3848
<rwx.file.permission>0755</rwx.file.permission>
49+
<skip.lib.artifact>true</skip.lib.artifact>
3950
</properties>
4051

4152
<dependencies>
@@ -143,6 +154,22 @@
143154
<tarLongFileMode>posix</tarLongFileMode>
144155
</configuration>
145156
</execution>
157+
<execution>
158+
<id>lib-assembly</id>
159+
<phase>package</phase>
160+
<goals>
161+
<goal>single</goal>
162+
</goals>
163+
<configuration>
164+
<descriptors>
165+
<descriptor>${project.basedir}/src/main/assembly/lib-package.xml</descriptor>
166+
</descriptors>
167+
<finalName>apache-zookeeper-${project.version}-lib</finalName>
168+
<appendAssemblyId>false</appendAssemblyId>
169+
<tarLongFileMode>posix</tarLongFileMode>
170+
<skipAssembly>${skip.lib.artifact}</skipAssembly>
171+
</configuration>
172+
</execution>
146173
</executions>
147174
</plugin>
148175

zookeeper-assembly/src/main/assembly/components.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<include>NOTICE.txt</include>
3030
<include>LICENSE.txt</include>
3131
<include>README.md</include>
32-
<include>README_packaging.txt</include>
32+
<include>README_packaging.md</include>
3333
</includes>
3434
<fileMode>${rw.file.permission}</fileMode>
3535
</fileSet>
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
4+
<!--
5+
/**
6+
* Licensed to the Apache Software Foundation (ASF) under one
7+
* or more contributor license agreements. See the NOTICE file
8+
* distributed with this work for additional information
9+
* regarding copyright ownership. The ASF licenses this file
10+
* to you under the Apache License, Version 2.0 (the
11+
* "License"); you may not use this file except in compliance
12+
* with the License. You may obtain a copy of the License at
13+
*
14+
* http://www.apache.org/licenses/LICENSE-2.0
15+
*
16+
* Unless required by applicable law or agreed to in writing, software
17+
* distributed under the License is distributed on an "AS IS" BASIS,
18+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19+
* See the License for the specific language governing permissions and
20+
* limitations under the License.
21+
*/
22+
-->
23+
<id>lib-package</id>
24+
<formats>
25+
<format>tar.gz</format>
26+
</formats>
27+
<includeBaseDirectory>true</includeBaseDirectory>
28+
29+
<fileSets>
30+
<fileSet>
31+
<!-- ZooKeeper C client lib and include files -->
32+
<directory>${project.basedir}/../zookeeper-client/zookeeper-client-c/target/c</directory>
33+
<outputDirectory>usr</outputDirectory>
34+
<includes>
35+
<include>include/**/*</include>
36+
<include>lib/*</include>
37+
</includes>
38+
<fileMode>${rw.file.permission}</fileMode>
39+
<directoryMode>${rwx.file.permission}</directoryMode>
40+
</fileSet>
41+
<fileSet>
42+
<!-- ZooKeeper C client binaries-->
43+
<directory>${project.basedir}/../zookeeper-client/zookeeper-client-c/target/c</directory>
44+
<outputDirectory>usr</outputDirectory>
45+
<includes>
46+
<include>bin/*</include>
47+
</includes>
48+
<fileMode>${rwx.file.permission}</fileMode>
49+
<directoryMode>${rwx.file.permission}</directoryMode>
50+
</fileSet>
51+
<fileSet>
52+
<!-- ZooKeeper license -->
53+
<directory>${project.basedir}/..</directory>
54+
<includes>
55+
<include>LICENSE.txt</include>
56+
</includes>
57+
<fileMode>${rw.file.permission}</fileMode>
58+
<directoryMode>${rwx.file.permission}</directoryMode>
59+
</fileSet>
60+
61+
</fileSets>
62+
63+
</assembly>

0 commit comments

Comments
 (0)