Browse Source

ZOOKEEPER-1604 remove rpm/deb/... packaging (cnauroth via phunt)

git-svn-id: https://svn.apache.org/repos/asf/zookeeper/trunk@1733489 13f79535-47bb-0310-9956-ffa450edef68
Patrick D. Hunt 9 years ago
parent
commit
2ab0821db4

+ 16 - 37
README_packaging.txt

@@ -20,47 +20,26 @@ apt-get --install python-setuptools
 Package build command
 Package build command
 ---------------------
 ---------------------
 
 
-Command to build Debian package: ant deb
-Command to build RPM Package: ant rpm
+The ZooKeeper project publishes releases as tarballs.  For ZooKeeper packages
+specific to your OS (such as rpm and deb), consider using Apache Bigtop:
 
 
-rpm and deb packages are generated and placed in:
+http://bigtop.apache.org/
 
 
-build/zookeeper*.[rpm|deb]
-build/contrib/**.[rpm|deb]
+Command to build tarball package: ant tar
 
 
-Default package file structure layout
+zookeeper-<version>.tar.gz tarball file structure layout
 
 
-  /usr/bin                           - User executable
-  /usr/sbin                          - System executable
-  /usr/libexec                       - Configuration boot trap script
-  /usr/lib                           - Native libraries
-  /usr/share/doc/zookeeper           - Documents
-  /usr/share/zookeeper               - Project files
-  /usr/share/zookeeper/template/conf - Configuration template files
-  /etc/zookeeper                     - Configuration files
-  /etc/init.d/zookeeper              - OS startup script
+  /bin                               - User executable
+  /sbin                              - System executable
+  /libexec                           - Configuration boot trap script
+  /lib                               - Library dependencies
+  /docs                              - Documents
+  /share/zookeeper                   - Project files
 
 
-Source file structure layout
----------------------
-
-src/packages/update-zookeeper-env.sh 
-  - setup environment variables and symlink $PREFIX/etc/zookeeper to 
-    /etc/zookeeper.
-  - This script is designed to run in post installation, and pre-remove 
-    phase of ZooKeeper package.
-  - Run update-zookeeper-env.sh -h to get a list of supported parameters.
-
-src/packages/template
-  - Standard configuration template
-
-src/packages/deb 
-  Meta data for creating Debian package
-
-src/packages/deb/init.d
-  Daemon start/stop script for Debian flavor of Linux
+Command to build tarball package with native components: ant package-native tar
 
 
-src/packages/rpm 
-  Meta data for creating RPM package
+zookeeper-<version>-lib.tar.gz tarball file structure layout
 
 
-src/packages/rpm/init.d
-  Daemon start/stop script for Redhat flavor of Linux
+  /bin                               - User executable
+  /lib                               - Native libraries
+  /include/zookeeper                 - Native library headers

+ 0 - 174
build.xml

@@ -171,17 +171,6 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
     <property name="cppunit.lib" value="/usr/lib"/>
     <property name="cppunit.lib" value="/usr/lib"/>
     <property name="cppunit.m4" value="/usr/share/aclocal"/>
     <property name="cppunit.m4" value="/usr/share/aclocal"/>
 
 
-    <!-- packaging property set -->
-    <property name="package.release" value="1"/>
-    <property name="package.prefix" value="/usr"/>
-    <property name="package.conf.dir" value="/etc/zookeeper"/>
-    <property name="package.log.dir" value="/var/log/zookeeper"/>
-    <property name="package.pid.dir" value="/var/run/zookeeper"/>
-    <property name="package.var.dir" value="/var/lib/zookeeper"/>
-    <property name="package.share.dir" value="/share/zookeeper"/>
-    <property name="package.buildroot" value="/tmp/zookeeper_package_build_${user.name}"/>
-    <property name="package.build.dir" value="/tmp/zookeeper_package_build_${user.name}/BUILD"/>
-
     <!-- artifact publishing property set -->
     <!-- artifact publishing property set -->
     <property name="staging_repo_id" value="apache.staging.https"/>
     <property name="staging_repo_id" value="apache.staging.https"/>
     <property name="wagon-http.version" value="2.4"/>
     <property name="wagon-http.version" value="2.4"/>
@@ -250,11 +239,6 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
         </fileset>
         </fileset>
         <path refid="java.classpath"/>
         <path refid="java.classpath"/>
     </path>
     </path>
-    <path id="package.classpath">
-      <fileset dir="${ivy.package.lib}">
-        <include name="**/jdeb*.jar" />
-      </fileset>
-    </path>
 
 
     <!-- ====================================================== -->
     <!-- ====================================================== -->
     <!-- Generate and compile the Java files                    -->
     <!-- Generate and compile the Java files                    -->
@@ -836,12 +820,10 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
       <copy todir="${dist.dir}/share/zookeeper" includeEmptyDirs="false">
       <copy todir="${dist.dir}/share/zookeeper" includeEmptyDirs="false">
         <fileset dir="${lib.dir}">
         <fileset dir="${lib.dir}">
           <exclude name="**/ivy*.jar" />
           <exclude name="**/ivy*.jar" />
-          <exclude name="**/deb*.jar" />
         </fileset>
         </fileset>
         <fileset dir="${ivy.lib}"/>
         <fileset dir="${ivy.lib}"/>
       </copy>
       </copy>
 
 
-      <copy file="${basedir}/src/packages/update-zookeeper-env.sh" tofile="${dist.dir}/sbin/update-zookeeper-env.sh"/>
       <subant target="package">
       <subant target="package">
         <!--Pass down the version in case its needed again and the target
         <!--Pass down the version in case its needed again and the target
             distribution directory so contribs know where to install to.-->
             distribution directory so contribs know where to install to.-->
@@ -925,16 +907,6 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
       <copy todir="${dist.dir}/src" includeEmptyDirs="true">
       <copy todir="${dist.dir}/src" includeEmptyDirs="true">
         <fileset dir="src" excludes="**/*.template **/docs/build/**/* **/ivy*.jar"/>
         <fileset dir="src" excludes="**/*.template **/docs/build/**/* **/ivy*.jar"/>
       </copy>
       </copy>
-
-      <copy todir="${dist.dir}/${package.share.dir}/templates/conf">
-        <fileset dir="src/packages/templates/conf"/>
-      </copy>
-
-      <copy file="${basedir}/conf/zoo_sample.cfg" tofile="${dist.dir}/${package.share.dir}/templates/conf/zoo.cfg" />
-      <replace file="${dist.dir}/${package.share.dir}/templates/conf/zoo.cfg">
-        <replacetoken>/tmp/zookeeper</replacetoken>
-        <replacevalue>${VAR_DIR}/data</replacevalue>
-      </replace>
   	  
   	  
       <chmod perm="ugo+x" type="file" parallel="false">
       <chmod perm="ugo+x" type="file" parallel="false">
         <fileset dir="${dist.dir}/bin"/>
         <fileset dir="${dist.dir}/bin"/>
@@ -1030,151 +1002,6 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
       </subant>
       </subant>
     </target>
     </target>
 
 
-    <target name="rpm" depends="package-native, tar" description="Make rpm package">
-      <!--The RPM spec file format disallows hyphen in the version.  Replace with
-          underscore to support version tags like -alpha or -SNAPSHOT.-->
-      <loadresource property="rpm.version">
-        <propertyresource name="version" />
-        <filterchain>
-          <tokenfilter>
-            <replacestring from="-" to="_" />
-          </tokenfilter>
-        </filterchain>
-      </loadresource>
-      <subant target="rpm">
-        <!--Pass down the version in case its needed again and the target
-            distribution directory so contribs know where to install to.-->
-        <property name="version" value="${version}"/>
-        <property name="rpm.version" value="${rpm.version}"/>
-        <property name="dist.dir" value="${dist.dir}"/>
-        <fileset file="${contrib.dir}/build.xml"/>
-        <fileset file="${recipes.dir}/build.xml"/>
-      </subant>  	
-      <path id="c.lib">
-        <fileset dir="${build.dir}">
-          <include name="${final.name}-lib.tar.gz"/>
-        </fileset>
-      </path>
-      <property name="c.lib" refid="c.lib"/>
-      <mkdir dir="${package.buildroot}/BUILD" />
-      <mkdir dir="${package.buildroot}/RPMS" />
-      <mkdir dir="${package.buildroot}/SRPMS" />
-      <mkdir dir="${package.buildroot}/SOURCES" />
-      <mkdir dir="${package.buildroot}/SPECS" />
-      <copy todir="${package.buildroot}/SOURCES">
-        <fileset dir="${build.dir}">
-          <include name="${final.name}.tar.gz" />
-        </fileset>
-        <fileset file="${c.lib}" />
-      </copy>
-      <copy file="${src.dir}/packages/rpm/spec/zookeeper.spec" todir="${package.buildroot}/SPECS">
-        <filterchain>
-          <replacetokens>
-            <token key="final.name" value="${final.name}" />
-            <token key="version" value="${rpm.version}" />
-            <token key="package.release" value="${package.release}" />
-            <token key="package.build.dir" value="${package.build.dir}" />
-            <token key="package.prefix" value="${package.prefix}" />
-            <token key="package.conf.dir" value="${package.conf.dir}" />
-            <token key="package.log.dir" value="${package.log.dir}" />
-            <token key="package.pid.dir" value="${package.pid.dir}" />
-            <token key="package.var.dir" value="${package.var.dir}" />
-            <token key="c.lib" value="${c.lib}" />
-          </replacetokens>
-        </filterchain>
-      </copy>
-      <rpm specFile="zookeeper.spec" command="-ba --buildroot=${package.buildroot}/BUILD" topDir="${package.buildroot}" cleanBuildDir="true" failOnError="true"
-/>
-      <copy todir="${build.dir}/" flatten="true">
-        <fileset dir="${package.buildroot}/RPMS">
-          <include name="**/${name}*.rpm" />
-        </fileset>
-        <fileset dir="${package.buildroot}/SRPMS">
-          <include name="**/${name}*.rpm" />
-        </fileset>
-      </copy>
-      <delete dir="${package.buildroot}" quiet="true" verbose="false"/>
-    </target>
-
-    <target name="deb" depends="ivy-retrieve-package, package-native, tar" description="Make deb package">
-      <subant target="deb">
-        <!--Pass down the version in case its needed again and the target
-            distribution directory so contribs know where to install to.-->
-        <property name="version" value="${version}"/>
-        <property name="dist.dir" value="${dist.dir}"/>
-        <fileset file="${contrib.dir}/build.xml"/>
-        <fileset file="${recipes.dir}/build.xml"/>
-      </subant>
-      <taskdef name="deb" classname="org.vafer.jdeb.ant.DebAntTask">
-        <classpath refid="java.classpath"/>
-        <classpath refid="package.classpath"/>
-      </taskdef>
-
-      <mkdir dir="${package.build.dir}/zookeeper.control" />
-      <copy todir="${package.buildroot}/${package.prefix}">
-        <fileset dir="${build.dir}/${final.name}">
-          <include name="bin/**" />
-          <include name="conf/**" />
-          <include name="sbin/**" />
-          <include name="share/**" />
-        </fileset>
-      </copy>
-      <copy todir="${package.build.dir}/zookeeper.control">
-        <fileset dir="${src.dir}/packages/deb/zookeeper.control">
-          <exclude name="control" />
-        </fileset>
-      </copy>
-      <copy file="${src.dir}/packages/deb/zookeeper.control/control" todir="${package.build.dir}/zookeeper.control">
-        <filterchain>
-          <replacetokens>
-            <token key="final.name" value="${final.name}" />
-            <token key="version" value="${version}" />
-            <token key="package.release" value="${package.release}" />
-            <token key="package.build.dir" value="${package.build.dir}" />
-            <token key="package.prefix" value="${package.prefix}" />
-            <token key="package.conf.dir" value="${package.conf.dir}" />
-            <token key="package.log.dir" value="${package.log.dir}" />
-            <token key="package.pid.dir" value="${package.pid.dir}" />
-            <token key="package.var.dir" value="${package.var.dir}" />
-          </replacetokens>
-        </filterchain>
-      </copy>
-      <deb destfile="${package.buildroot}/${name}_${version}-${package.release}_${os.arch}.deb" control="${package.build.dir}/zookeeper.control">
-        <tarfileset dir="${build.dir}/${final.name}/share/zookeeper" filemode="644" prefix="${package.prefix}/share/zookeeper">
-          <include name="**" />
-        </tarfileset>
-        <tarfileset dir="${build.dir}/${final.name}/bin" filemode="755" prefix="${package.prefix}/bin">
-          <include name="zkCli.sh" />
-        </tarfileset>
-        <tarfileset dir="${build.dir}/${final.name}/sbin" filemode="755" prefix="${package.prefix}/sbin">
-          <include name="**.sh" />
-        </tarfileset>
-        <tarfileset dir="${build.dir}/${final.name}/libexec" filemode="755" prefix="${package.prefix}/libexec">
-          <include name="zkEnv.sh" />
-        </tarfileset>
-        <tarfileset dir="${build.dir}/c/build/${package.prefix}/include" prefix="${package.prefix}/include">
-          <include name="**" />
-        </tarfileset> 
-        <tarfileset dir="${build.dir}/c/build/${package.prefix}/lib" filemode="755" prefix="${package.prefix}/lib">
-          <include name="**" />
-        </tarfileset> 
-        <tarfileset dir="${build.dir}/${final.name}/conf" filemode="644" prefix="${package.conf.dir}">
-          <include name="**" />
-        </tarfileset>
-        <tarfileset dir="${build.dir}/${final.name}/src/packages/deb/init.d" filemode="755" prefix="/etc/init.d">
-          <include name="**" />
-        </tarfileset>
-      </deb>
-
-      <copy todir="${build.dir}/" flatten="true">
-        <fileset dir="${package.buildroot}">
-          <include name="**/${name}*.deb" />
-        </fileset>
-      </copy>
-      <delete dir="${package.buildroot}" quiet="true" verbose="false"/>
-
-    </target>
-
     <!-- ====================================================== -->
     <!-- ====================================================== -->
     <!-- mvn-deploy. Publishing jars to nexus -->
     <!-- mvn-deploy. Publishing jars to nexus -->
     <!-- ====================================================== -->
     <!-- ====================================================== -->
@@ -1262,7 +1089,6 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
       <delete>
       <delete>
         <fileset dir="${basedir}" includes="*.jar,*.tar.gz"/>
         <fileset dir="${basedir}" includes="*.jar,*.tar.gz"/>
       </delete>
       </delete>
-      <delete dir="${package.buildroot}" />
     </target>
     </target>
 
 
     <target name="clean-contrib">
     <target name="clean-contrib">

+ 0 - 3
ivy.xml

@@ -31,7 +31,6 @@
     <conf name="test"/>
     <conf name="test"/>
     <conf name="mvn-ant-task" visibility="private"/>
     <conf name="mvn-ant-task" visibility="private"/>
     <conf name="optional"/> <!-- optional in generated pom -->
     <conf name="optional"/> <!-- optional in generated pom -->
-    <conf name="package" extends="master"/>
     <conf name="jdiff" visibility="private"/>
     <conf name="jdiff" visibility="private"/>
     <conf name="releaseaudit" visibility="private" description="Artifacts required for releaseaudit target"/>
     <conf name="releaseaudit" visibility="private" description="Artifacts required for releaseaudit target"/>
   </configurations>
   </configurations>
@@ -55,8 +54,6 @@
       <artifact name="netty" type="jar" conf="default"/>
       <artifact name="netty" type="jar" conf="default"/>
     </dependency>
     </dependency>
 
 
-    <dependency org="org.vafer" name="jdeb" rev="0.8" conf="package->master"/>
-
     <dependency org="junit" name="junit" rev="4.12" conf="test->default"/>
     <dependency org="junit" name="junit" rev="4.12" conf="test->default"/>
 	<dependency org="org.mockito" name="mockito-all" rev="1.8.2"
 	<dependency org="org.mockito" name="mockito-all" rev="1.8.2"
                conf="test->default"/>
                conf="test->default"/>

+ 0 - 15
src/contrib/build-contrib.xml

@@ -160,21 +160,6 @@
     <echo message="contrib: ${name}"/>
     <echo message="contrib: ${name}"/>
   </target>
   </target>
 
 
-  <!-- ====================================================== -->
-  <!-- rpm a contrib's files                                  -->
-  <!-- ====================================================== -->
-  <target name="rpm" depends="jar" unless="skip.contrib"> 
-    <echo message="contrib: ${name}"/>
-
-  </target>
-
-  <!-- ====================================================== -->
-  <!-- deb a contrib's files                                  -->
-  <!-- ====================================================== -->
-  <target name="deb" depends="jar" unless="skip.contrib"> 
-    <echo message="contrib: ${name}"/>
-
-  </target>
   <!-- ================================================================== -->
   <!-- ================================================================== -->
   <!-- Clean.  Delete the build files, and their directories              -->
   <!-- Clean.  Delete the build files, and their directories              -->
   <!-- ================================================================== -->
   <!-- ================================================================== -->

+ 0 - 18
src/contrib/build.xml

@@ -67,22 +67,4 @@
       <fileset refid="contribfileset" />
       <fileset refid="contribfileset" />
     </subant>
     </subant>
   </target>
   </target>
-
-  <!-- ====================================================== -->
-  <!-- rpm all the contribs.                                  -->
-  <!-- ====================================================== -->
-  <target name="rpm">
-    <subant target="rpm">
-      <fileset refid="contribfileset" />
-    </subant>
-  </target>
-
-  <!-- ====================================================== -->
-  <!-- deb all the contribs.                                  -->
-  <!-- ====================================================== -->
-  <target name="deb">
-    <subant target="deb">
-      <fileset refid="contribfileset" />
-    </subant>
-  </target>
 </project>
 </project>

+ 0 - 87
src/contrib/zkpython/build.xml

@@ -25,10 +25,6 @@
   <property name="test.log.dir" value="${build.test}/logs" />
   <property name="test.log.dir" value="${build.test}/logs" />
   <property name="test.output" value="no" />
   <property name="test.output" value="no" />
   <property name="test.timeout" value="900000" />
   <property name="test.timeout" value="900000" />
-  <property name="package.buildroot" value="/tmp/zkpython_build_${user.name}"/>
-  <property name="package.build.dir" value="/tmp/zkpython_build_${user.name}/BUILD"/>
-  <property name="package.release" value="1"/>
-  <property name="package.prefix" value="/usr"/>
 
 
   <target name="test"
   <target name="test"
           depends="compile,test-init,test-category,test-start,python-test,test-stop" />
           depends="compile,test-init,test-category,test-start,python-test,test-stop" />
@@ -111,88 +107,5 @@
       </exec>
       </exec>
     </target>
     </target>
 
 
-    <target name="rpm" depends="tar-bin" unless="skip.contrib">
-      <mkdir dir="${package.buildroot}/BUILD" />
-      <mkdir dir="${package.buildroot}/RPMS" />
-      <mkdir dir="${package.buildroot}/SRPMS" />
-      <mkdir dir="${package.buildroot}/SOURCES" />
-      <mkdir dir="${package.buildroot}/SPECS" />
-      <copy todir="${package.buildroot}/SOURCES">
-        <fileset dir="${build.dir}/dist">
-          <include name="*.tar.gz" />
-        </fileset>
-      </copy>
-      <path id="python.lib">
-        <fileset dir="${package.buildroot}/SOURCES">
-          <include name="*.tar.gz" />
-        </fileset>
-      </path>
-      <property name="python.lib" refid="python.lib" />
-      <copy file="${src.dir}/../packages/rpm/spec/${name}.spec" todir="${package.buildroot}/SPECS">
-        <filterchain>
-          <replacetokens>
-            <token key="final.name" value="${name}" />
-            <token key="version" value="${rpm.version}" />
-            <token key="package.release" value="${package.release}" />
-            <token key="package.build.dir" value="${package.build.dir}" />
-            <token key="package.prefix" value="${package.prefix}" />
-            <token key="python.lib" value="${python.lib}" />
-          </replacetokens>
-        </filterchain>
-      </copy>
-
-      <rpm specFile="${name}.spec" command="-ba --buildroot=${package.buildroot}/BUILD" topDir="${package.buildroot}" cleanBuildDir="true" failOnError="true" />
-      <copy todir="${build.dir}/" flatten="true">
-        <fileset dir="${package.buildroot}/RPMS">
-          <include name="**/*.rpm" />
-        </fileset>
-      </copy>
-      <delete dir="${package.buildroot}" quiet="true" verbose="false" />
-    </target>
-
-    <target name="deb" depends="tar-bin" unless="skip.contrib">
-      <mkdir dir="${package.buildroot}" />
-      <mkdir dir="${package.buildroot}/BUILD" />
-      <mkdir dir="${package.buildroot}/SPECS" />
-      <copy todir="${package.buildroot}/SOURCES">
-        <fileset dir="${build.dir}/dist">
-          <include name="*.tar.gz" />
-        </fileset>
-      </copy>
-      <path id="python.lib">
-        <fileset dir="${package.buildroot}/SOURCES">
-          <include name="*.tar.gz" />
-        </fileset>
-      </path>
-      <property name="python.lib" refid="python.lib" />
-      <copy todir="${package.build.dir}/zkpython.control">
-        <fileset dir="${src.dir}/../packages/deb/zkpython.control">
-          <exclude name="control" />
-        </fileset>
-      </copy>
-      <copy file="${src.dir}/../packages/deb/zkpython.control/control" todir="${package.build.dir}/zkpython.control">
-        <filterchain>
-          <replacetokens>
-            <token key="final.name" value="${name}" />
-            <token key="version" value="${version}" />
-            <token key="package.release" value="${package.release}" />
-            <token key="package.build.dir" value="${package.build.dir}" />
-            <token key="package.prefix" value="${package.prefix}" />
-          </replacetokens>
-        </filterchain>
-      </copy>
-      <taskdef name="deb" classname="org.vafer.jdeb.ant.DebAntTask">
-        <classpath refid="classpath"/>
-      </taskdef>
-      <deb destfile="${package.buildroot}/${name}_${version}-${package.release}_${os.arch}.deb" control="${package.build.dir}/zkpython.control">
-        <data src="${python.lib}" />
-      </deb>
-      <copy todir="${build.dir}/" flatten="true">
-        <fileset dir="${package.buildroot}">
-          <include name="**/${name}_*.deb" />
-        </fileset>
-      </copy>
-      <delete dir="${package.buildroot}" quiet="true" verbose="false"/>
-    </target>
 </project>
 </project>
 
 

+ 0 - 8
src/contrib/zkpython/ivy.xml

@@ -32,12 +32,4 @@
     <conf name="releaseaudit" visibility="private" description="Artifacts required for releaseaudit target"/>
     <conf name="releaseaudit" visibility="private" description="Artifacts required for releaseaudit target"/>
   </configurations>
   </configurations>
 
 
-  <dependencies>
-
-    <dependency org="org.vafer" name="jdeb" rev="0.8">
-      <artifact name="jdeb" type="jar" conf="default"/>
-    </dependency>
-
-  </dependencies>
-
 </ivy-module>
 </ivy-module>

+ 0 - 23
src/contrib/zkpython/src/packages/deb/zkpython.control/control

@@ -1,23 +0,0 @@
-# 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.
-Package: zkpython
-Version: @version@
-Section: misc
-Priority: optional
-Architecture: all
-Depends: python
-Maintainer: Apache Software Foundation <dev@zookeeper.apache.org>
-Description: ZooKeeper python binding library
-Distribution: development

+ 0 - 81
src/contrib/zkpython/src/packages/rpm/spec/zkpython.spec

@@ -1,81 +0,0 @@
-#   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.
-
-#
-# RPM Spec file for ZooKeeper version @version@
-#
-
-%define name         zkpython
-%define version      @version@
-%define release      @package.release@
-
-# Installation Locations
-%define _prefix      @package.prefix@
-
-# Build time settings
-%define _build_dir    @package.build.dir@
-%define _final_name   @final.name@
-%define _python_lib   @python.lib@
-%define debug_package %{nil}
-
-# Disable brp-java-repack-jars for aspect J
-%define __os_install_post    \
-    /usr/lib/rpm/redhat/brp-compress \
-    %{!?__debug_package:/usr/lib/rpm/redhat/brp-strip %{__strip}} \
-    /usr/lib/rpm/redhat/brp-strip-static-archive %{__strip} \
-    /usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump} \
-    /usr/lib/rpm/brp-python-bytecompile %{nil}
-
-# RPM searches perl files for dependancies and this breaks for non packaged perl lib
-# like thrift so disable this
-%define _use_internal_dependency_generator 0
-
-Summary: ZooKeeper python binding library
-Group: Development/Libraries
-License: Apache License, Version 2.0
-URL: http://zookeeper.apache.org/
-Vendor: Apache Software Foundation
-Name: %{name}
-Version: %{version}
-Release: %{release} 
-Source0: %{_python_lib}
-Prefix: %{_prefix}
-Requires: zookeeper-lib == %{version}
-AutoReqProv: no
-Provides: zkpython
-
-%description
-ZooKeeper python binding library
-
-%prep
-tar fxz %{_python_lib} -C %{_build_dir}
-
-%build
-
-#########################
-#### INSTALL SECTION ####
-#########################
-%install
-
-%pre
-
-%post
-
-%preun
-
-%files 
-%defattr(-,root,root)
-%{_prefix}
-

+ 0 - 140
src/packages/deb/init.d/zookeeper

@@ -1,140 +0,0 @@
-#! /usr/bin/env bash
-
-# 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.
-
-### BEGIN INIT INFO
-# Provides:		zookeeper
-# Required-Start:	$remote_fs $syslog
-# Required-Stop:	$remote_fs $syslog
-# Default-Start:	2 3 4 5
-# Default-Stop:		
-# Short-Description:	Apache ZooKeeper server
-### END INIT INFO
-
-set -e
-
-# /etc/init.d/zookeeper: start and stop the Apache ZooKeeper daemon
-
-umask 022
-
-. /usr/libexec/zkEnv.sh
-
-. /lib/lsb/init-functions
-
-ZOOPIDDIR=/var/lib/zookeeper/data
-ZOOPIDFILE=${ZOOPIDDIR}/zookeeper_server.pid
-
-check_privsep_dir() {
-    # Create the PrivSep empty dir if necessary
-    if [ ! -d ${ZOOPIDDIR} ]; then
-	mkdir -p ${ZOOPIDDIR}
-        chown zookeeper:hadoop ${ZOOPIDDIR}
-	chmod 0775 ${ZOOPIDDIR} 
-    fi
-}
-
-# Are we running from init?
-run_by_init() {
-    ([ "$previous" ] && [ "$runlevel" ]) || [ "$runlevel" = S ]
-}
-
-check_for_no_start() {
-    # forget it if we're trying to start, and /etc/zookeeper/zookeeper_not_to_be_run exists
-    if [ -e /etc/zookeeper/zookeeper_not_to_be_run ]; then 
-	if [ "$1" = log_end_msg ]; then
-	    log_end_msg 0
-	fi
-	if ! run_by_init; then
-	    log_action_msg "Apache ZooKeeper server not in use (/etc/zookeeper/zookeeper_not_to_be_run)"
-	fi
-	exit 0
-    fi
-}
-
-export PATH="${PATH:+$PATH:}/usr/sbin:/usr/bin"
-
-case "$1" in
-  start)
-	check_for_no_start
-	check_privsep_dir
-	log_daemon_msg "Starting Apache ZooKeeper server" "zookeeper"
-	if start-stop-daemon --start --quiet --oknodo --pidfile ${ZOOPIDFILE} -c zookeeper -x ${ZOOKEEPER_PREFIX}/sbin/zkServer.sh start; then
-	    log_end_msg 0
-	else
-	    log_end_msg 1
-	fi
-	;;
-  stop)
-	log_daemon_msg "Stopping Apache ZooKeeper server" "zookeeper"
-	if start-stop-daemon --stop --quiet --oknodo --pidfile ${ZOOPIDFILE}; then
-	    log_end_msg 0
-	else
-	    log_end_msg 1
-	fi
-	;;
-
-  restart)
-	check_privsep_dir
-	log_daemon_msg "Restarting Apache ZooKeeper server" "zookeeper"
-	start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile ${ZOOPIDFILE}
-	check_for_no_start log_end_msg
-	if start-stop-daemon --start --quiet --oknodo --pidfile ${ZOOPIDFILE} -c zookeeper -x ${ZOOKEEPER_PREFIX}/sbin/zkServer.sh start; then
-	    log_end_msg 0
-	else
-	    log_end_msg 1
-	fi
-	;;
-
-  try-restart)
-	check_privsep_dir
-	log_daemon_msg "Restarting Apache ZooKeeper server" "zookeeper"
-	set +e
-	start-stop-daemon --stop --quiet --retry 30 --pidfile ${ZOOPIDFILE}
-	RET="$?"
-	set -e
-	case $RET in
-	    0)
-		# old daemon stopped
-		check_for_no_start log_end_msg
-		if start-stop-daemon --start --quiet --oknodo --pidfile ${ZOOPIDFILE} -c zookeeper -x ${ZOOKEEPER_PREFIX}/sbin/zkServer.sh start; then
-		    log_end_msg 0
-		else
-		    log_end_msg 1
-		fi
-		;;
-	    1)
-		# daemon not running
-		log_progress_msg "(not running)"
-		log_end_msg 0
-		;;
-	    *)
-		# failed to stop
-		log_progress_msg "(failed to stop)"
-		log_end_msg 1
-		;;
-	esac
-	;;
-
-  status)
-	status_of_proc -p ${ZOOPIDFILE} ${JAVA_HOME}/bin/java zookeeper && exit 0 || exit $?
-	;;
-
-  *)
-	log_action_msg "Usage: /etc/init.d/zookeeper {start|stop|restart|try-restart|status}"
-	exit 1
-esac
-
-exit 0

+ 0 - 15
src/packages/deb/zookeeper.control/conffile

@@ -1,15 +0,0 @@
-# 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.
-/etc/zookeeper

+ 0 - 23
src/packages/deb/zookeeper.control/control

@@ -1,23 +0,0 @@
-# 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.
-Package: zookeeper
-Version: @version@
-Section: misc
-Priority: optional
-Architecture: all
-Depends: sun-java6-jre
-Maintainer: Apache Software Foundation <dev@zookeeper.apache.org>
-Description: ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services.
-Distribution: development

+ 0 - 23
src/packages/deb/zookeeper.control/postinst

@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-bash /usr/sbin/update-zookeeper-env.sh \
-  --prefix=/usr \
-  --conf-dir=/etc/zookeeper \
-  --log-dir=/var/log/zookeeper \
-  --pid-dir=/var/run/zookeeper \
-  --var-dir=/var/lib/zookeeper

+ 0 - 19
src/packages/deb/zookeeper.control/postrm

@@ -1,19 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-/usr/sbin/userdel zookeeper 2> /dev/null >/dev/null
-exit 0

+ 0 - 20
src/packages/deb/zookeeper.control/preinst

@@ -1,20 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-getent group hadoop 2>/dev/null >/dev/null || /usr/sbin/groupadd -r hadoop
-
-/usr/sbin/useradd --comment "ZooKeeper" --shell /bin/bash -M -r --groups hadoop --home /usr/share/zookeeper zookeeper 2> /dev/null || :

+ 0 - 24
src/packages/deb/zookeeper.control/prerm

@@ -1,24 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-/etc/init.d/zookeeper stop 2>/dev/null >/dev/null
-bash /usr/sbin/update-zookeeper-env.sh \
-  --prefix=/usr \
-  --conf-dir=/etc/zookeeper \
-  --log-dir=/var/log/zookeeper \
-  --pid-dir=/var/run/zookeeper \
-  --uninstal

+ 0 - 84
src/packages/rpm/init.d/zookeeper

@@ -1,84 +0,0 @@
-#!/usr/bin/env bash
-
-# 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.
-
-# 
-# ZooKeeper
-# 
-# chkconfig: 2345 89 9 
-# description: zookeeper
-
-source /etc/rc.d/init.d/functions
-source /usr/libexec/zkEnv.sh
-
-RETVAL=0
-PIDFILE="${ZOOPIDFILE}"
-desc="ZooKeeper daemon"
-
-start() {
-  echo -n $"Starting $desc (zookeeper): "
-  daemon --user zookeeper zkServer.sh start
-  RETVAL=$?
-  echo
-  [ $RETVAL -eq 0 ] && touch /var/lock/subsys/zookeeper
-  return $RETVAL
-}
-
-stop() {
-  echo -n $"Stopping $desc (zookeeper): "
-  daemon --user zookeeper zkServer.sh stop
-  RETVAL=$?
-  sleep 5
-  echo
-  [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/zookeeper $PIDFILE
-}
-
-restart() {
-  stop
-  start
-}
-
-checkstatus(){
-  status -p $PIDFILE ${JAVA_HOME}/bin/java
-  RETVAL=$?
-}
-
-condrestart(){
-  [ -e /var/lock/subsys/zookeeper ] && restart || :
-}
-
-case "$1" in
-  start)
-    start
-    ;;
-  stop)
-    stop
-    ;;
-  status)
-    checkstatus
-    ;;
-  restart)
-    restart
-    ;;
-  condrestart)
-    condrestart
-    ;;
-  *)
-    echo $"Usage: $0 {start|stop|status|restart|condrestart}"
-    exit 1
-esac
-
-exit $RETVAL

+ 0 - 166
src/packages/rpm/spec/zookeeper.spec

@@ -1,166 +0,0 @@
-#   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.
-
-#
-# RPM Spec file for ZooKeeper version @version@
-#
-
-%define name         zookeeper
-%define version      @version@
-%define release      @package.release@
-
-# Installation Locations
-%define _prefix      @package.prefix@
-%define _bin_dir     %{_prefix}/bin
-%define _conf_dir    @package.conf.dir@
-%define _include_dir %{_prefix}/include
-%define _lib_dir     %{_prefix}/lib
-%define _lib64_dir   %{_prefix}/lib64
-%define _libexec_dir %{_prefix}/libexec
-%define _log_dir     @package.log.dir@
-%define _man_dir     %{_prefix}/man
-%define _pid_dir     @package.pid.dir@
-%define _sbin_dir    %{_prefix}/sbin
-%define _share_dir   %{_prefix}/share/zookeeper
-%define _src_dir     %{_prefix}/src
-%define _var_dir     @package.var.dir@
-
-# Build time settings
-%define _build_dir    @package.build.dir@
-%define _final_name   @final.name@
-%define _c_lib        @c.lib@
-%define debug_package %{nil}
-
-# Disable brp-java-repack-jars for aspect J
-%define __os_install_post    \
-    /usr/lib/rpm/redhat/brp-compress \
-    %{!?__debug_package:/usr/lib/rpm/redhat/brp-strip %{__strip}} \
-    /usr/lib/rpm/redhat/brp-strip-static-archive %{__strip} \
-    /usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump} \
-    /usr/lib/rpm/brp-python-bytecompile %{nil}
-
-# RPM searches perl files for dependancies and this breaks for non packaged perl lib
-# like thrift so disable this
-%define _use_internal_dependency_generator 0
-
-Summary: ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services.
-License: Apache License, Version 2.0
-URL: http://zookeeper.apache.org/
-Vendor: Apache Software Foundation
-Group: Development/Libraries
-Name: %{name}
-Version: %{version}
-Release: %{release} 
-Source0: %{_final_name}.tar.gz
-Source1: %{_final_name}-lib.tar.gz
-Prefix: %{_prefix}
-Prefix: %{_conf_dir}
-Prefix: %{_log_dir}
-Prefix: %{_pid_dir}
-Prefix: %{_var_dir}
-Requires: sh-utils, textutils, /usr/sbin/useradd, /usr/sbin/usermod, /sbin/chkconfig, /sbin/service, jdk >= 1.6
-AutoReqProv: no
-Provides: zookeeper
-
-%description
-ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services. All of these kinds of services are used in some form or another by distributed applications. Each time they are implemented there is a lot of work that goes into fixing the bugs and race conditions that are inevitable. Because of the difficulty of implementing these kinds of services, applications initially usually skimp on them ,which make them brittle in the presence of change and difficult to manage. Even when done correctly, different implementations of these services lead to management complexity when the applications are deployed.
-
-%package lib
-Summary: ZooKeeper C binding library
-Group: System/Libraries
-#Requires: %{name} == %{version}
-Provides: zookeeper-lib
-
-%description lib
-ZooKeeper C client library for communicating with ZooKeeper Server.
-
-%prep
-%setup -D -b 1 -n %{_final_name}
-%setup -D -a 0 -n %{_final_name}
-
-%build
-mkdir -p ${RPM_BUILD_DIR}%{_prefix}
-mkdir -p ${RPM_BUILD_DIR}%{_bin_dir}
-mkdir -p ${RPM_BUILD_DIR}%{_include_dir}
-mkdir -p ${RPM_BUILD_DIR}%{_lib_dir}
-%ifarch amd64 x86_64
-mkdir -p ${RPM_BUILD_DIR}%{_lib64_dir}
-%endif
-mkdir -p ${RPM_BUILD_DIR}%{_libexec_dir}
-mkdir -p ${RPM_BUILD_DIR}%{_log_dir}
-mkdir -p ${RPM_BUILD_DIR}%{_conf_dir}
-mkdir -p ${RPM_BUILD_DIR}%{_man_dir}
-mkdir -p ${RPM_BUILD_DIR}%{_pid_dir}
-mkdir -p ${RPM_BUILD_DIR}%{_sbin_dir}
-mkdir -p ${RPM_BUILD_DIR}%{_share_dir}
-mkdir -p ${RPM_BUILD_DIR}%{_var_dir}
-mkdir -p ${RPM_BUILD_DIR}/etc/init.d
-
-cp ${RPM_BUILD_DIR}/%{_final_name}/src/packages/rpm/init.d/zookeeper ${RPM_BUILD_DIR}/etc/init.d/zookeeper
-cp ${RPM_BUILD_DIR}/%{_final_name}/src/packages/update-zookeeper-env.sh ${RPM_BUILD_DIR}/%{_final_name}/sbin/update-zookeeper-env.sh
-chmod 0755 ${RPM_BUILD_DIR}/%{_final_name}/sbin/*
-chmod 0755 ${RPM_BUILD_DIR}/etc/init.d/zookeeper
-
-#########################
-#### INSTALL SECTION ####
-#########################
-%install
-pushd ${RPM_BUILD_DIR}
-mv ${RPM_BUILD_DIR}/%{_final_name}/bin/* ${RPM_BUILD_DIR}%{_bin_dir}
-mv ${RPM_BUILD_DIR}/%{_final_name}/libexec/* ${RPM_BUILD_DIR}%{_libexec_dir}
-mv ${RPM_BUILD_DIR}/%{_final_name}/share/zookeeper/* ${RPM_BUILD_DIR}%{_share_dir}
-mv ${RPM_BUILD_DIR}/%{_final_name}/conf/* ${RPM_BUILD_DIR}%{_conf_dir}
-mv ${RPM_BUILD_DIR}/%{_final_name}/sbin/* ${RPM_BUILD_DIR}%{_sbin_dir}
-cp -f ${RPM_BUILD_DIR}%{_conf_dir}/zoo_sample.cfg ${RPM_BUILD_DIR}%{_conf_dir}/zoo.cfg
-popd ${RPM_BUILD_DIR}
-rm -rf ${RPM_BUILD_DIR}/%{_final_name}
-
-%pre
-getent group hadoop 2>/dev/null >/dev/null || /usr/sbin/groupadd -r hadoop
-
-/usr/sbin/useradd --comment "ZooKeeper" --shell /bin/bash -M -r --groups hadoop --home %{_share_dir} zookeeper 2> /dev/null || :
-
-%post
-bash ${RPM_INSTALL_PREFIX0}/sbin/update-zookeeper-env.sh \
-       --prefix=${RPM_INSTALL_PREFIX0} \
-       --conf-dir=${RPM_INSTALL_PREFIX1} \
-       --log-dir=${RPM_INSTALL_PREFIX2} \
-       --pid-dir=${RPM_INSTALL_PREFIX3} \
-       --var-dir=${RPM_INSTALL_PREFIX4}
-
-%preun
-bash ${RPM_INSTALL_PREFIX0}/sbin/update-zookeeper-env.sh \
-       --prefix=${RPM_INSTALL_PREFIX0} \
-       --conf-dir=${RPM_INSTALL_PREFIX1} \
-       --log-dir=${RPM_INSTALL_PREFIX2} \
-       --pid-dir=${RPM_INSTALL_PREFIX3} \
-       --var-dir=${RPM_INSTALL_PREFIX4} \
-       --uninstall
-
-%files 
-%defattr(-,root,root)
-%attr(0755,root,hadoop) %{_log_dir}
-%attr(0775,root,hadoop) %{_pid_dir}
-%attr(0775,root,hadoop) /etc/init.d/zookeeper
-%config(noreplace) %{_conf_dir}/*
-%{_prefix}
-
-%post lib
-/sbin/ldconfig
-
-%files lib
-%defattr(-,root,root)
-%{_prefix}/lib/*
-%{_prefix}/bin

+ 0 - 16
src/packages/templates/conf/zookeeper-env.sh

@@ -1,16 +0,0 @@
-# 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.
-export JAVA_HOME=${JAVA_HOME}
-export ZOO_LOG_DIR=${LOG_DIR}

+ 0 - 163
src/packages/update-zookeeper-env.sh

@@ -1,163 +0,0 @@
-#!/usr/bin/env bash
-
-# 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.
-
-# This script configures zookeeper-env.sh and zoo.cfg.
-
-usage() {
-  echo "
-usage: $0 <parameters>
-  Required parameters:
-     --prefix=PREFIX               path to install into
-
-  Optional parameters:
-     --arch=i386                   OS Architecture
-     --conf-dir=/etc/zookeeper     Configuration directory
-     --log-dir=/var/log/zookeeper  Log directory
-     --pid-dir=/var/run            PID file location
-  "
-  exit 1
-}
-
-template_generator() {
-  REGEX='(\$\{[a-zA-Z_][a-zA-Z_0-9]*\})'
-  cat $1 |
-  while read line ; do
-    while [[ "$line" =~ $REGEX ]] ; do
-      LHS=${BASH_REMATCH[1]}
-      RHS="$(eval echo "\"$LHS\"")"
-      line=${line//$LHS/$RHS}
-    done
-    echo $line >> $2
-  done
-}
-
-OPTS=$(getopt \
-  -n $0 \
-  -o '' \
-  -l 'arch:' \
-  -l 'prefix:' \
-  -l 'conf-dir:' \
-  -l 'log-dir:' \
-  -l 'pid-dir:' \
-  -l 'var-dir:' \
-  -l 'uninstall' \
-  -- "$@")
-
-if [ $? != 0 ] ; then
-    usage
-fi
-
-eval set -- "${OPTS}"
-while true ; do
-  case "$1" in
-    --arch)
-      ARCH=$2 ; shift 2
-      ;;
-    --prefix)
-      PREFIX=$2 ; shift 2
-      ;;
-    --log-dir)
-      LOG_DIR=$2 ; shift 2
-      ;;
-    --lib-dir)
-      LIB_DIR=$2 ; shift 2
-      ;;
-    --conf-dir)
-      CONF_DIR=$2 ; shift 2
-      ;;
-    --pid-dir)
-      PID_DIR=$2 ; shift 2
-      ;;
-    --uninstall)
-      UNINSTALL=1; shift
-      ;;
-    --var-dir)
-      VAR_DIR=$2 ; shift 2
-      ;;
-    --)
-      shift ; break
-      ;;
-    *)
-      echo "Unknown option: $1"
-      usage
-      exit 1
-      ;;
-  esac
-done
-
-for var in PREFIX; do
-  if [ -z "$(eval "echo \$$var")" ]; then
-    echo Missing param: $var
-    usage
-  fi
-done
-
-ARCH=${ARCH:-i386}
-CONF_DIR=${CONF_DIR:-$PREFIX/etc/zookeeper}
-LIB_DIR=${LIB_DIR:-$PREFIX/lib}
-LOG_DIR=${LOG_DIR:-$PREFIX/var/log}
-PID_DIR=${PID_DIR:-$PREFIX/var/run}
-VAR_DIR=${VAR_DIR:-$PREFIX/var/lib}
-UNINSTALL=${UNINSTALL:-0}
-
-if [ "${ARCH}" != "i386" ]; then
-  LIB_DIR=${LIB_DIR}64
-fi
-
-if [ "${UNINSTALL}" -eq "1" ]; then
-  # Remove symlinks
-  if [ -e ${PREFIX}/etc/zookeeper ]; then
-    rm -f ${PREFIX}/etc/zookeeper
-  fi
-else
-  # Create symlinks
-  if [ ${CONF_DIR} != ${PREFIX}/etc/zookeeper ]; then
-    mkdir -p ${PREFIX}/etc
-    ln -sf ${CONF_DIR} ${PREFIX}/etc/zookeeper
-  fi
-
-  mkdir -p ${LOG_DIR}
-  chown zookeeper:hadoop ${LOG_DIR}
-  chmod 755 ${LOG_DIR}
-
-  if [ ! -d ${PID_DIR} ]; then
-    mkdir -p ${PID_DIR}
-    chown zookeeper:hadoop ${PID_DIR}
-    chmod 755 ${PID_DIR}
-  fi
-
-  if [ ! -d ${VAR_DIR} ]; then
-    mkdir -p ${VAR_DIR}/data
-    chown -R zookeeper:hadoop ${VAR_DIR}
-    chmod -R 755 ${VAR_DIR}
-  fi
-
-  TFILE="/tmp/$(basename $0).$$.tmp"
-  if [ -z "${JAVA_HOME}" ]; then
-    if [ -e /etc/debian_version ]; then
-      JAVA_HOME=/usr/lib/jvm/java-6-sun/jre
-    else
-      JAVA_HOME=/usr/java/default
-    fi
-  fi
-  template_generator ${PREFIX}/share/zookeeper/templates/conf/zookeeper-env.sh $TFILE
-  cp ${TFILE} ${CONF_DIR}/zookeeper-env.sh
-  rm -f ${TFILE}
-  template_generator ${PREFIX}/share/zookeeper/templates/conf/zoo.cfg $TFILE
-  cp ${TFILE} ${CONF_DIR}/zoo.cfg
-  rm -f ${TFILE}
-fi

+ 0 - 16
src/recipes/build-recipes.xml

@@ -139,22 +139,6 @@
     <delete dir="${build.dir}"/>
     <delete dir="${build.dir}"/>
   </target>
   </target>
 
 
-  <!-- ====================================================== -->
-  <!-- rpm a contrib's files                                  -->
-  <!-- ====================================================== -->
-  <target name="rpm" depends="jar" unless="skip.contrib">
-    <echo message="recipes: ${name}"/>
-
-  </target>
-
-  <!-- ====================================================== -->
-  <!-- deb a contrib's files                                  -->
-  <!-- ====================================================== -->
-  <target name="deb" depends="jar" unless="skip.contrib">
-    <echo message="recipes: ${name}"/>
-
-  </target>
-
   <!-- ================================================================== -->
   <!-- ================================================================== -->
   <!-- Utility features                                                   -->
   <!-- Utility features                                                   -->
   <!-- ================================================================== -->
   <!-- ================================================================== -->

+ 0 - 18
src/recipes/build.xml

@@ -58,22 +58,4 @@
       <fileset dir="." includes="*/build.xml"/>
       <fileset dir="." includes="*/build.xml"/>
     </subant>
     </subant>
   </target>
   </target>
-
-  <!-- ====================================================== -->
-  <!-- rpm all the contribs.                                  -->
-  <!-- ====================================================== -->
-  <target name="rpm">
-    <subant target="rpm">
-      <fileset dir="." includes="*/build.xml"/>
-    </subant>
-  </target>
-
-  <!-- ====================================================== -->
-  <!-- deb all the contribs.                                  -->
-  <!-- ====================================================== -->
-  <target name="deb">
-    <subant target="deb">
-      <fileset dir="." includes="*/build.xml"/>
-    </subant>
-  </target>
 </project>
 </project>