The following commit has been merged in the master branch: commit cdfd5f69dd159440392c27e80fdc4ba93f2881c1 Author: James Page <james.p...@canonical.com> Date: Thu Oct 27 10:26:48 2011 +0100
Added support for upstart under Ubuntu (LP: #862762): * Added support for upstart under Ubuntu (LP: #862762): - d/rules,d/zookeeperd.upstart.in: Detect Ubuntu and swap in provided upstart configuration if required. - d/ubuntu|debian_control_vars,d/control,d/rules: Provide different Depends for zookeeperd package when building under Ubuntu/Debian. diff --git a/debian/changelog b/debian/changelog index 4418708..23527d6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +zookeeper (3.3.3+dfsg2-3) UNRELEASED; urgency=low + + * Added support for upstart under Ubuntu (LP: #862762): + - d/rules,d/zookeeperd.upstart.in: Detect Ubuntu and swap in provided + upstart configuration if required. + - d/ubuntu|debian_control_vars,d/control,d/rules: Provide different Depends + for zookeeperd package when building under Ubuntu/Debian. + + -- James Page <james.p...@ubuntu.com> Thu, 27 Oct 2011 10:23:37 +0100 + zookeeper (3.3.3+dfsg2-2) unstable; urgency=low * Updated patch for ZOOKEEPER-1117 with fixes accepted into diff --git a/debian/control b/debian/control index 0953313..2f617ac 100644 --- a/debian/control +++ b/debian/control @@ -65,7 +65,7 @@ Description: High-performance coordination service for distributed applications Package: zookeeperd Architecture: all -Depends: lsb-base (>= 3.2-14), zookeeper (= ${binary:Version}), ${misc:Depends} +Depends: ${zookeeperd-deps}, zookeeper (= ${binary:Version}), ${misc:Depends} Description: Init control scripts for zookeeper ZooKeeper is a centralized, reliable, service for maintaining configuration information, naming, providing distributed synchronization, and group diff --git a/debian/debian_control_vars b/debian/debian_control_vars new file mode 100644 index 0000000..c83f47f --- /dev/null +++ b/debian/debian_control_vars @@ -0,0 +1 @@ +zookeeperd-deps= lsb-base (>= 3.2-14) diff --git a/debian/rules b/debian/rules index 6487ff9..87c6690 100755 --- a/debian/rules +++ b/debian/rules @@ -104,6 +104,9 @@ override_jh_installjavadoc: true override_dh_installinit: + if dpkg-vendor --derives-from ubuntu ; then \ + cp zookeeperd.upstart.in zookeeperd.upstart ; \ + fi dh_installinit -d # jh_depends fails for me: @@ -116,3 +119,9 @@ override_jh_depends: # some utf8 error? Don't need them anyway by now #override_jh_classpath override_jh_manifest override_jh_exec: # true +override_dh_gencontrol: + if dpkg-vendor --derives-from ubuntu ; then \ + dh_gencontrol -- -T$(CURDIR)/debian/ubuntu_control_vars ; \ + else \ + dh_gencontrol -- -T$(CURDIR)/debian/debian_control_vars ; \ + fi diff --git a/debian/ubuntu_control_vars b/debian/ubuntu_control_vars new file mode 100644 index 0000000..e551528 --- /dev/null +++ b/debian/ubuntu_control_vars @@ -0,0 +1 @@ +zookeeperd-deps= daemon diff --git a/debian/zookeeperd.upstart.in b/debian/zookeeperd.upstart.in new file mode 100644 index 0000000..3354657 --- /dev/null +++ b/debian/zookeeperd.upstart.in @@ -0,0 +1,27 @@ +description "zookeeper centralized coordination service" + +start on runlevel [2345] +stop on runlevel [!2345] + +respawn + +limit nofile 8192 8192 + +pre-start script + [ -r "/usr/share/java/zookeeper.jar" ] || exit 0 + [ -r "/etc/zookeeper/conf/environment" ] || exit 0 + . /etc/zookeeper/conf/environment + [ -d $ZOO_LOG_DIR ] || mkdir -p $ZOO_LOG_DIR + chown $USER:$GROUP $ZOO_LOG_DIR +end script + +script + . /etc/zookeeper/conf/environment + [ -r /etc/default/zookeeper ] && . /etc/default/zookeeper + if [ -z "$JMXDISABLE" ]; then + JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=$JMXLOCALONLY" + fi + exec daemon --name=zookeeper --inherit --user=$USER \ + -- $JAVA -cp $CLASSPATH $JAVA_OPTS -Dzookeeper.log.dir=${ZOO_LOG_DIR} \ + -Dzookeeper.root.logger=${ZOO_LOG4J_PROP} $ZOOMAIN $ZOOCFG +end script -- Apache ZooKeeper _______________________________________________ pkg-java-commits mailing list pkg-java-comm...@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits