|
| 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 |
| 12 | +gcc, cppunit and python-setuptools are required to build |
| 13 | +C and python bindings. |
| 14 | + |
| 15 | +On RHEL machine: |
| 16 | + |
| 17 | +`yum install cppunit` |
| 18 | +`yum install python-setuptools` |
| 19 | + |
| 20 | +On Ubuntu: |
| 21 | + |
| 22 | +`apt-get --install cppunit` |
| 23 | +`apt-get --install python-setuptools` |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | +## Package build command (using ant) |
| 28 | + |
| 29 | +Command to build tarball package: `ant tar` |
| 30 | + |
| 31 | +`zookeeper-<version>.tar.gz` tarball file structure layout |
| 32 | + |
| 33 | + /bin - User executable |
| 34 | + /sbin - System executable |
| 35 | + /libexec - Configuration boot trap script |
| 36 | + /lib - Library dependencies |
| 37 | + /docs - Documents |
| 38 | + /share/zookeeper - Project files |
| 39 | + |
| 40 | +Command to build tarball package with native components: `ant package-native tar` |
| 41 | + |
| 42 | +`zookeeper-<version>-lib.tar.gz` tarball file structure layout |
| 43 | + |
| 44 | + /bin - User executable |
| 45 | + /lib - Native libraries |
| 46 | + /include/zookeeper - Native library headers |
| 47 | + |
| 48 | + |
| 49 | +## Package build command (using maven) |
| 50 | + |
| 51 | +Command to clean everything and build the tarball package without executing the tests: |
| 52 | +`mvn clean -Pfull-build && mvn install -Pfull-build -DskipTests` |
| 53 | + |
| 54 | + |
| 55 | +Optional parameters you might consider when using maven: |
| 56 | + `-DskipTests` - this parameter will skip both java and C++ unit test execution during the build |
| 57 | + `-Pfull-build` - activates the full-build profile, causing the C client to be built |
| 58 | + `-Pc-test-coverage=true` - activates the test coverage calculation during the execution of C client tests |
| 59 | + |
| 60 | + |
| 61 | +Please note: if you don't provide the `-Pfull-build` parameter, then the C client will not be built, the C client tests |
| 62 | +will not be executed and the previous C client builds will no be cleaned up (e.g. with 'mvn clean'). |
| 63 | + |
| 64 | +`zookeeper-assembly/target/apache-zookeeper-<version>-bin.tar.gz` tarball file structure layout |
| 65 | + |
| 66 | + /bin - User executables |
| 67 | + /conf - Configuration files |
| 68 | + /lib - ZooKeeper JAR files and all the required java library dependencies |
| 69 | + /docs - Documents |
| 70 | + /usr - Native artifacts (only present if `-Pfull-build` used) |
| 71 | + /usr/bin - User executable |
| 72 | + /usr/lib - Native libraries |
| 73 | + /usr/include/zookeeper - Native library headers |
| 74 | + |
| 75 | + |
| 76 | +Beside the binary tarball, you can find the whole original source project packaged into: |
| 77 | +`zookeeper-assembly/target/apache-zookeeper-<version>.tar.gz` |
0 commit comments