[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13006278#comment-13006278
 ] 

Eric Yang commented on ZOOKEEPER-999:
-------------------------------------

Package builder design

For supporting multiple type of packages, this project layout the packaging 
source code structure like this:

{noformat}
src/packages/rpm
            /deb
            /conf-pseudo
{noformat}

rpm - meta data for creating rpm packages.  SysV init style startup script is 
also included for start up process in Redhat like environment.

deb - meta data for creating debian packages.  BSD init style startup script is 
also included for start up process in Ubuntu like environment.

conf-pseudo - Configuration template for demo pseudo cluster setup.  By default 
both rpm, or deb binary package does not startup the system.  The purpose of 
conf-pseudo is to create a (rpm/deb) package as demonstration of how to setup a 
single node cluster and turn on services by configuration.

Software home directory is designed to locate in:

${prefix}/share/${project}

src/packages/update-${project}-env.sh runs in the post installation phase which 
creates symlinks and making software structure to map to the proposed layout in 
HADOOP-6255

/etc/default/${project}-evn.sh is symlinked to the project environment script.  
Hence, project environment variables are shared across projects.

Project build file can override the package path in the build phase:

Sample build.properties

{noformat}
package.prefix=/usr
package.conf.dir=/etc/project
package.log.dir=/var/log/project
package.pid.dir=/var/log/project
{noformat}

For RPM package, it is possible to override location at installation phase by 
specifying:

{noformat}
rpm -i [project]-[version]-[rev].[arch].rpm \
  --relocate /usr=/usr/local/zookeeper \
  --relocate /etc/zookeeper=/usr/local/etc/zookeeper \
  --relocate /var/log/zookeeper=/opt/logs/zookeeper \
  --relocate /var/run/zookeeper=/opt/run/zookeeper
{noformat}

The same build structure can be apply to both ant or maven build scripts.  It 
also expandable to include mac native package installer using this design 
pattern.

> Create an package integration project
> -------------------------------------
>
>                 Key: ZOOKEEPER-999
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-999
>             Project: ZooKeeper
>          Issue Type: New Feature
>          Components: build
>         Environment: Java 6, RHEL/Ubuntu
>            Reporter: Eric Yang
>            Assignee: Eric Yang
>             Fix For: 3.4.0
>
>         Attachments: ZOOKEEPER-999.patch
>
>
> This goal of this ticket is to generate a set of RPM/debian package which 
> integrate well with RPM sets created by HADOOP-6255.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to