summaryrefslogtreecommitdiff
path: root/README_packaging.md
diff options
context:
space:
mode:
authorMate Szalay-Beko <mszalay@cloudera.com>2019-10-10 14:42:46 +0200
committerAndor Molnar <andor@apache.org>2019-10-10 14:42:46 +0200
commitc9eeeda3bb83ee492a29ccbdc9f9541ee676e578 (patch)
tree9f3fee54679028dd406cb838dd5e5ab858855357 /README_packaging.md
parent11c07921c15e2fb7692375327b53f26a583b77ca (diff)
downloadzookeeper-c9eeeda3bb83ee492a29ccbdc9f9541ee676e578.tar.gz
ZOOKEEPER-3436: Enhance Mavenized Make C client
Based on eolivelli 's [previous pull request](https://github.com/apache/zookeeper/pull/993) we enhanced now the maven C client build: - we can compile now the C-client without tests (using the -DskipTests option) - we can optionally enable the test coverage calculation for the C-client (-Pc-test-coverage) - we also package the C-client into the binary tarball (when -Pfull-build is used) - I also updated the README_packaging.md file to make user's life easier (happier? :) ) I tested the build on ubuntu 16.04. Author: Mate Szalay-Beko <mszalay@cloudera.com> Author: Enrico Olivelli <eolivelli@apache.org> Reviewers: nkalmar@apache.org, eolivelli@apache.org, andor@apache.org Closes #1078 from symat/ZOOKEEPER-3436 and squashes the following commits: 18250df41 [Mate Szalay-Beko] ZOOKEEPER-3436 remove the C binaries from the binary tarball; update the readme files 57b7cd61d [Mate Szalay-Beko] ZOOKEEPER-3436 fixing file permissions of usr/bin/* in binary tarball a2ac025a0 [Mate Szalay-Beko] ZOOKEEPER-3436 enhance / format README_packaging.md 30eea5e27 [Mate Szalay-Beko] ZOOKEEPER-3436 exclude README_packaging.md from license check 936550e48 [Mate Szalay-Beko] ZOOKEEPER-3436 fixing README_packaging.md f01029524 [Mate Szalay-Beko] ZOOKEEPER-3436 Enhance Mavenized Make C client 44f6ba5d2 [Enrico Olivelli] Better .gitignore 204603751 [Enrico Olivelli] Enhance Mavenized Make C client
Diffstat (limited to 'README_packaging.md')
-rw-r--r--README_packaging.md89
1 files changed, 89 insertions, 0 deletions
diff --git a/README_packaging.md b/README_packaging.md
new file mode 100644
index 000000000..fe731a7ff
--- /dev/null
+++ b/README_packaging.md
@@ -0,0 +1,89 @@
+# README file for Packaging Notes
+
+The ZooKeeper project publishes releases as tarballs. For ZooKeeper packages
+specific to your OS (such as rpm and deb), consider using Apache Bigtop:
+
+http://bigtop.apache.org/
+
+
+## Requirements
+
+- ant (recommended version 1.9.4 or later for concurrent JUnit test execution) or maven to build the java code
+- gcc, cppunit and python-setuptools are required to build C and python bindings.
+
+On RHEL machine:
+
+```
+yum install cppunit
+yum install python-setuptools
+```
+
+On Ubuntu:
+
+```
+apt-get install cppunit
+apt-get install python-setuptools
+```
+
+
+## Package build command (using maven)
+
+Commands to clean everything and build the tarball package without executing the tests: `mvn clean install -DskipTests`
+
+
+`zookeeper-assembly/target/apache-zookeeper-<version>-bin.tar.gz` tarball file structure layout:
+
+- `/bin` - User executables
+- `/conf` - Configuration files
+- `/lib` - ZooKeeper JAR files and all the required java library dependencies
+- `/docs` - Documents
+
+Beside the binary tarball, you can find the whole original source project packaged into:
+`zookeeper-assembly/target/apache-zookeeper-<version>.tar.gz`
+
+
+### Building the C client (using maven)
+
+To also build the C client, you need to activate the `full-build` profile:
+
+```
+mvn clean -Pfull-build
+mvn install -Pfull-build -DskipTests
+```
+
+Optional parameters you might consider when using maven:
+- `-Pfull-build` - activates the full-build profile, causing the C client to be built
+- `-DskipTests` - this parameter will skip both java and C++ unit test execution during the build
+- `-Pc-test-coverage` - activates the test coverage calculation during the execution of C client tests
+
+Please note: if you don't provide the `-Pfull-build` parameter, then the C client will not be built, the C client tests
+will not be executed and the previous C client builds will no be cleaned up (e.g. with simply using `mvn clean`).
+
+The compiled C client can be found here:
+- `zookeeper-client/zookeeper-client-c/target/c/bin` - User executable
+- `zookeeper-client/zookeeper-client-c/target/c/lib` - Native libraries
+- `zookeeper-client/zookeeper-client-c/target/c/include/zookeeper` - Native library headers
+
+
+## Package build command (using ant)
+
+**Command to build tarball package:** `ant tar`
+
+`zookeeper-<version>.tar.gz` tarball file structure layout:
+
+- `/bin` - User executable
+- `/sbin` - System executable
+- `/libexec` - Configuration boot trap script
+- `/lib` - Library dependencies
+- `/docs` - Documents
+- `/share/zookeeper` - Project files
+
+
+**Command to build tarball package with native components:** `ant package-native tar`
+
+`zookeeper-<version>-lib.tar.gz` tarball file structure layout:
+
+- `/bin` - User executable
+- `/lib` - Native libraries
+- `/include/zookeeper` - Native library headers
+