bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bm...@apache.org
Subject svn commit: r1227888 - in /incubator/bigtop/trunk: ./ bigtop-packages/src/common/flume/ bigtop-packages/src/deb/flume/ bigtop-packages/src/rpm/flume/SOURCES/ bigtop-packages/src/rpm/flume/SPECS/
Date Thu, 05 Jan 2012 23:17:07 GMT
Author: bmahe
Date: Thu Jan  5 23:17:06 2012
New Revision: 1227888

URL: http://svn.apache.org/viewvc?rev=1227888&view=rev
Log:
BIGTOP-323. Add Apache Flume 1.0.0 incubating

Added:
    incubator/bigtop/trunk/bigtop-packages/src/common/flume/flume-node.init
      - copied, changed from r1226888, incubator/bigtop/trunk/bigtop-packages/src/rpm/flume/SOURCES/init.d.suse
    incubator/bigtop/trunk/bigtop-packages/src/deb/flume/flume-node.postinst
      - copied, changed from r1226888, incubator/bigtop/trunk/bigtop-packages/src/common/flume/do-component-build
Removed:
    incubator/bigtop/trunk/bigtop-packages/src/deb/flume/flume.manpages
    incubator/bigtop/trunk/bigtop-packages/src/deb/flume/service-init.d.tpl
    incubator/bigtop/trunk/bigtop-packages/src/rpm/flume/SOURCES/init.d
    incubator/bigtop/trunk/bigtop-packages/src/rpm/flume/SOURCES/init.d.suse
Modified:
    incubator/bigtop/trunk/bigtop-packages/src/common/flume/do-component-build
    incubator/bigtop/trunk/bigtop-packages/src/common/flume/install_flume.sh
    incubator/bigtop/trunk/bigtop-packages/src/deb/flume/control
    incubator/bigtop/trunk/bigtop-packages/src/deb/flume/flume.docs
    incubator/bigtop/trunk/bigtop-packages/src/deb/flume/rules
    incubator/bigtop/trunk/bigtop-packages/src/rpm/flume/SPECS/flume.spec
    incubator/bigtop/trunk/bigtop.mk

Modified: incubator/bigtop/trunk/bigtop-packages/src/common/flume/do-component-build
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/common/flume/do-component-build?rev=1227888&r1=1227887&r2=1227888&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/common/flume/do-component-build (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/common/flume/do-component-build Thu Jan  5
23:17:06 2012
@@ -16,4 +16,4 @@
 
 set -ex
 
-ant -Dversion=${FLUME_VERSION} tar "$@" 
+mvn clean install -DskipTests "$@" 

Copied: incubator/bigtop/trunk/bigtop-packages/src/common/flume/flume-node.init (from r1226888,
incubator/bigtop/trunk/bigtop-packages/src/rpm/flume/SOURCES/init.d.suse)
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/common/flume/flume-node.init?p2=incubator/bigtop/trunk/bigtop-packages/src/common/flume/flume-node.init&p1=incubator/bigtop/trunk/bigtop-packages/src/rpm/flume/SOURCES/init.d.suse&r1=1226888&r2=1227888&rev=1227888&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/rpm/flume/SOURCES/init.d.suse (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/common/flume/flume-node.init Thu Jan  5 23:17:06
2012
@@ -15,20 +15,20 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-# Starts a Flume @FLUME_DAEMON@
+# Starts a Flume node
 #
 # chkconfig: 345 90 10
-# description: Flume @FLUME_DAEMON@
+# description: Flume node
 #
 ### BEGIN INIT INFO
-# Provides:          flume-@FLUME_DAEMON@
+# Provides:          flume-node
 # Required-Start:    $remote_fs
 # Should-Start:
 # Required-Stop:     $remote_fs
 # Should-Stop:
 # Default-Start:     3 4 5
 # Default-Stop:      0 1 2 6
-# Short-Description: Flume @FLUME_DAEMON@
+# Short-Description: Flume node
 ### END INIT INFO
 
 . /lib/lsb/init-functions
@@ -48,34 +48,55 @@ STATUS_NOT_RUNNING=3
 ERROR_PROGRAM_NOT_INSTALLED=5
 
 FLUME_LOG_DIR=/var/log/flume
-FLUME_HOME=/usr/lib/flume
-EXEC_PATH=${FLUME_HOME}/bin/flume-daemon.sh
-DOTIME=3
+FLUME_CONF_DIR=/etc/flume/conf
 FLUME_RUN=/var/run/flume
-FLUME_PID=/var/run/flume/flume-flume-@FLUME_DAEMON@.pid
-LOCKFILE="/var/lock/subsys/flume-@FLUME_DAEMON@"
-desc="Flume @FLUME_DAEMON@ daemon"
+FLUME_HOME=/usr/lib/flume
+
+LOCKFILE="/var/lock/subsys/flume-node"
+desc="Flume node daemon"
+
+FLUME_CONF_FILE=${FLUME_CONF_FILE:-${FLUME_CONF_DIR}/flume.conf}
+EXEC_PATH=/usr/bin/flume-ng
+FLUME_PID_FILE=${FLUME_RUN}/flume-node.pid
+
 install -d -m 0755 -o flume -g flume ${FLUME_RUN} 
 USER=flume
 
+HOSTNAME=`hostname`
+FLUME_NODE_NAME=${FLUME_NODE_NAME:-$HOSTNAME}
 
 start() {
   [ -x $exec ] || exit $ERROR_PROGRAM_NOT_INSTALLED
-  log_success_msg "Starting $desc (flume-@FLUME_DAEMON@): "
-  start_daemon -u $USER $EXEC_PATH start @FLUME_DAEMON@
+  log_success_msg "Starting $desc (flume-node): "
+  export FLUME_PID_FILE
+  /bin/su -s /bin/bash -c "${EXEC_PATH} node --conf $FLUME_CONF_DIR --conf-file $FLUME_CONF_FILE
--name $FLUME_NODE_NAME &>>${FLUME_LOG_DIR}/flume-node.log &" $USER
   RETVAL=$?
-  echo
   [ $RETVAL -eq 0 ] && touch $LOCKFILE
   return $RETVAL
 }
 
 stop() {
-  log_success_msg "Stopping $desc (flume-@FLUME_DAEMON@): "
-  start_daemon -u $USER $EXEC_PATH stop @FLUME_DAEMON@
-  RETVAL=$?
-  sleep 5
-  echo
-  [ $RETVAL -eq 0 ] && rm -f $LOCKFILE $FLUME_PID
+  if [ ! -e $FLUME_PID_FILE ]; then
+    log_failure_msg "Flume node is not running"
+    exit $STATUS_NOT_RUNNING
+  fi
+
+  log_success_msg "Stopping $desc (flume-node): "
+
+  # FLUME-919 will put an end to such extreme violence
+  FLUME_PID=`cat $FLUME_PID_FILE`
+  if [ -n $FLUME_PID ]; then
+    FLUME_PID_GROUP=$(ps -o pgrp -p ${FLUME_PID} h)
+
+    if [ -n $FLUME_PID_GROUP ]; then
+      kill -TERM -${FLUME_PID_GROUP} &>/dev/null
+      sleep 5
+      kill -KILL -${FLUME_PID_GROUP} &>/dev/null
+
+      rm -f $LOCKFILE $FLUME_PID_FILE
+    fi
+  fi
+  return 0
 }
 
 restart() {
@@ -84,31 +105,31 @@ restart() {
 }
 
 checkstatus(){
-  pidofproc -p $FLUME_PID java > /dev/null
+  pidofproc -p $FLUME_PID_FILE java > /dev/null
   status=$?
 
   case "$status" in
     $STATUS_RUNNING)
-      log_success_msg "@FLUME_DAEMON@ is running"
+      log_success_msg "Flume node is running"
       ;;
     $STATUS_DEAD)
-      log_failure_msg "@FLUME_DAEMON@ is dead and pid file exists"
+      log_failure_msg "Flume node is dead and pid file exists"
       ;;
     $STATUS_DEAD_AND_LOCK)
-      log_failure_msg "@FLUME_DAEMON@ is dead and lock file exists"
+      log_failure_msg "Flume node is dead and lock file exists"
       ;;
     $STATUS_NOT_RUNNING)
-      log_failure_msg "@FLUME_DAEMON@ is not running"
+      log_failure_msg "Flume node is not running"
       ;;
     *)
-      log_failure_msg "@FLUME_DAEMON@ status is unknown"
+      log_failure_msg "Flume node status is unknown"
       ;;
   esac
   return $status
 }
 
 condrestart(){
-  [ -e /var/lock/subsys/hadoop-@FLUME_DAEMON@ ] && restart || :
+  [ -e /var/lock/subsys/flume-node ] && restart || :
 }
 
 case "$1" in

Modified: incubator/bigtop/trunk/bigtop-packages/src/common/flume/install_flume.sh
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/common/flume/install_flume.sh?rev=1227888&r1=1227887&r2=1227888&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/common/flume/install_flume.sh (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/common/flume/install_flume.sh Thu Jan  5 23:17:06
2012
@@ -25,7 +25,7 @@ usage: $0 <options>
 
   Optional options:
      --doc-dir=DIR               path to install docs into [/usr/share/doc/flume]
-     --lib-dir=DIR               path to install flume home [/usr/lib/flume]
+     --flume-dir=DIR               path to install flume home [/usr/lib/flume]
      --installed-lib-dir=DIR     path where lib-dir will end up on target system
      --bin-dir=DIR               path to install bins [/usr/bin]
      --examples-dir=DIR          path to install examples [doc-dir/examples]
@@ -39,7 +39,7 @@ OPTS=$(getopt \
   -o '' \
   -l 'prefix:' \
   -l 'doc-dir:' \
-  -l 'lib-dir:' \
+  -l 'flume-dir:' \
   -l 'installed-lib-dir:' \
   -l 'bin-dir:' \
   -l 'examples-dir:' \
@@ -62,8 +62,8 @@ while true ; do
         --doc-dir)
         DOC_DIR=$2 ; shift 2
         ;;
-        --lib-dir)
-        LIB_DIR=$2 ; shift 2
+        --flume-dir)
+        FLUME_DIR=$2 ; shift 2
         ;;
         --installed-lib-dir)
         INSTALLED_LIB_DIR=$2 ; shift 2
@@ -94,32 +94,27 @@ done
 
 MAN_DIR=${MAN_DIR:-/usr/share/man/man1}
 DOC_DIR=${DOC_DIR:-/usr/share/doc/flume}
-LIB_DIR=${LIB_DIR:-/usr/lib/flume}
+FLUME_DIR=${FLUME_DIR:-/usr/lib/flume}
 BIN_DIR=${BIN_DIR:-/usr/lib/flume/bin}
 CONF_DIR=/etc/flume/
 CONF_DIST_DIR=/etc/flume/conf.dist/
 ETC_DIR=${ETC_DIR:-/etc/flume}
 
+install -d -m 0755 ${PREFIX}/${FLUME_DIR}
 
-install -d -m 0755 ${PREFIX}/${LIB_DIR}
+(cd ${PREFIX}/${FLUME_DIR} &&
+  tar --strip-components=1 -xvzf ${BUILD_DIR}/flume-ng-dist/target/flume-ng-dist-*-dist.tar.gz)
 
-install -d -m 0755 ${PREFIX}/${LIB_DIR}/lib
-for i in `find lib/*.jar build/lib/*.jar -type f |grep -v zookeeper`
-	do echo "Copying $i"
-	cp $i ${PREFIX}/${LIB_DIR}/lib #don't copy directories by default
+# Take out things we've installed elsewhere
+for x in flume-ng-* conf pom.xml CHANGELOG DEVNOTES DISCLAIMER LICENSE NOTICE README RELEASE-NOTES;
do
+  rm -rf ${PREFIX}/$FLUME_DIR/$x 
 done
 
-cp flume*.jar ${PREFIX}/${LIB_DIR}/lib
 
-cp -a webapps ${PREFIX}/${LIB_DIR}
-
-install -d -m 0755 $PREFIX/$BIN_DIR
-cp bin/flume bin/flume-daemon.sh bin/flume-env.sh.template $PREFIX/${BIN_DIR}
-
-wrapper=$PREFIX/usr/bin/flume
+wrapper=$PREFIX/usr/bin/flume-ng
 mkdir -p `dirname $wrapper`
 cat > $wrapper <<EOF
-#!/bin/sh
+#!/bin/bash
 
 # Autodetect JAVA_HOME if not defined
 if [ -e /usr/libexec/bigtop-detect-javahome ]; then
@@ -128,22 +123,24 @@ elif [ -e /usr/lib/bigtop-utils/bigtop-d
   . /usr/lib/bigtop-utils/bigtop-detect-javahome
 fi
 
-exec /usr/lib/flume/bin/flume "\$@"
+if [ -n "\$FLUME_PID_FILE" ]; then
+  echo \$$ > \$FLUME_PID_FILE
+fi
+
+# See FLUME-920
+bash exec /usr/lib/flume/bin/flume-ng "\$@"
 EOF
 chmod 755 $wrapper
 
 
 install -d -m 0755 $PREFIX/$ETC_DIR/conf.empty
 (cd ${BUILD_DIR}/conf && tar cf - .) | (cd $PREFIX/$ETC_DIR/conf.empty &&
tar xf -)
+touch $PREFIX/$ETC_DIR/conf.empty/flume.conf
 
-unlink $PREFIX/$LIB_DIR/conf || /bin/true
-ln -s /etc/flume/conf $PREFIX/$LIB_DIR/conf
+unlink $PREFIX/$FLUME_DIR/conf || /bin/true
+ln -s /etc/flume/conf $PREFIX/$FLUME_DIR/conf
 
 # Docs
 install -d -m 0755 $PREFIX/${DOC_DIR}
-cp -r docs/* $PREFIX/${DOC_DIR}
-
-
-# man pages
-install -d -m 0755 $PREFIX/$MAN_DIR
+cp -r CHANGELOG DEVNOTES DISCLAIMER LICENSE NOTICE README RELEASE-NOTES $PREFIX/${DOC_DIR}
 

Modified: incubator/bigtop/trunk/bigtop-packages/src/deb/flume/control
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/deb/flume/control?rev=1227888&r1=1227887&r2=1227888&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/deb/flume/control (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/deb/flume/control Thu Jan  5 23:17:06 2012
@@ -17,13 +17,13 @@ Source: flume
 Section: misc
 Priority: extra
 Maintainer: Bigtop <bigtop-dev@incubator.apache.org>
-Build-Depends: debhelper (>= 6), ant, ant-optional, git-core
+Build-Depends: debhelper (>= 6), ant, ant-optional
 Standards-Version: 3.8.0
 Homepage: http://incubator.apache.org/projects/flume.html
 
 Package: flume
 Architecture: all
-Depends: zookeeper (>= 3.3.1), adduser, hadoop, bigtop-utils
+Depends: adduser, hadoop, bigtop-utils
 Description: reliable, scalable, and manageable distributed data collection application
  Flume is a reliable, scalable, and manageable distributed data collection
  application for collecting data such as logs and delivering it to data stores
@@ -34,13 +34,6 @@ Description: reliable, scalable, and man
  managed and allows for intelligent dynamic management.  It uses a simple
  extensible data model that allows for online analytic applications.
 
-Package: flume-master
-Architecture: all
-Depends: flume (= ${source:Version})
-Description: central administration point for the flume data collection system
- The Flume master daemon is the central administration and data path control
- point for flume nodes.
-
 Package: flume-node
 Architecture: all
 Depends: flume (= ${source:Version})

Copied: incubator/bigtop/trunk/bigtop-packages/src/deb/flume/flume-node.postinst (from r1226888,
incubator/bigtop/trunk/bigtop-packages/src/common/flume/do-component-build)
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/deb/flume/flume-node.postinst?p2=incubator/bigtop/trunk/bigtop-packages/src/deb/flume/flume-node.postinst&p1=incubator/bigtop/trunk/bigtop-packages/src/common/flume/do-component-build&r1=1226888&r2=1227888&rev=1227888&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/common/flume/do-component-build (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/deb/flume/flume-node.postinst Thu Jan  5 23:17:06
2012
@@ -14,6 +14,13 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-set -ex
+set -e
+if [ -x "/etc/init.d/flume-node" ]; then
+  update-rc.d flume-node defaults >/dev/null
+  if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+    invoke-rc.d flume-node start || :
+  else
+    /etc/init.d/flume-node start || :
+  fi
+fi
 
-ant -Dversion=${FLUME_VERSION} tar "$@" 

Modified: incubator/bigtop/trunk/bigtop-packages/src/deb/flume/flume.docs
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/deb/flume/flume.docs?rev=1227888&r1=1227887&r2=1227888&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/deb/flume/flume.docs (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/deb/flume/flume.docs Thu Jan  5 23:17:06 2012
@@ -1,5 +1,7 @@
+CHANGELOG
 DEVNOTES
+DISCLAIMER
+LICENSE
 NOTICE
-RELEASENOTES
 README
-LICENSE
+RELEASE-NOTES

Modified: incubator/bigtop/trunk/bigtop-packages/src/deb/flume/rules
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/deb/flume/rules?rev=1227888&r1=1227887&r2=1227888&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/deb/flume/rules (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/deb/flume/rules Thu Jan  5 23:17:06 2012
@@ -39,23 +39,22 @@ clean:	
 
 build-indep: build-indep-stamp
 build-indep-stamp: patch-stamp
-	# Temporarily disabled - we'll just use the build from the tarball.
+	# No easy way to disable the default RAT run which fails the build because of some fails
in the debian/ directory
+	rm -rf bigtop-empty
+	mkdir -p bigtop-empty
+	# I could not find a way to add debian/ to RAT exclude list through cmd line
+	# or to unbind rat:check goal
+	# So I am redirecting its attention with a decoy
 	env FLUME_VERSION=$(build_version) \
-		sh debian/do-component-build -Divy.home=`pwd`/debian/.ivy
-	mkdir -p debian/tmp
-	tar cf - --exclude=debian/\* . | (cd debian/tmp && tar xf -)
+		sh debian/do-component-build -Drat.basedir=${PWD}/bigtop-empty -Dmaven.repo.local=${HOME}/.m2/repository
 	touch $@
 
-master node: debian/service-init.d.tpl
-	sed -e 's#@FLUME_DAEMON@#$@#g' $< > debian/flume-$@.init
-
 install: install-indep
-install-indep:	master node
+install-indep:
 	dh_testdir
 	dh_testroot
-#	ant package
 	sh -x debian/install_flume.sh \
-	  --build-dir=. \
+	  --build-dir=${PWD} \
 	  --prefix=debian/flume 
 	# Remove hadoop dependency and instead symlink in the hadoop jar
 	rm debian/flume/usr/lib/flume/lib/hadoop-core-*

Modified: incubator/bigtop/trunk/bigtop-packages/src/rpm/flume/SPECS/flume.spec
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/rpm/flume/SPECS/flume.spec?rev=1227888&r1=1227887&r2=1227888&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/rpm/flume/SPECS/flume.spec (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/rpm/flume/SPECS/flume.spec Thu Jan  5 23:17:06
2012
@@ -17,7 +17,6 @@
 %define man_flume %{_mandir}
 %define lib_flume /usr/lib/flume
 %define log_flume /var/log/flume
-%define flume_services master node
 
 %if  %{?suse_version:1}0
 
@@ -62,9 +61,8 @@ License: APL2
 Source0: flume-%{flume_base_version}.tar.gz
 Source1: do-component-build
 Source2: install_%{name}.sh
-Source3: init.d
-Source4: init.d.suse
-Requires: coreutils, /usr/sbin/useradd, zookeeper >= 3.3.1, hadoop >= 0.20.2
+Source3: %{name}-node.init
+Requires: coreutils, /usr/sbin/useradd, hadoop
 Requires: bigtop-utils
 BuildRequires: ant xml-commons xml-commons-apis
 
@@ -77,34 +75,6 @@ Requires: sh-utils
 %description 
 Flume is a reliable, scalable, and manageable distributed data collection application for
collecting data such as logs and delivering it to data stores such as Hadoop's HDFS.  It can
efficiently collect, aggregate, and move large amounts of log data.  It has a simple, but
flexible, architecture based on streaming data flows.  It is robust and fault tolerant with
tunable reliability mechanisms and many failover and recovery mechanisms.  The system is centrally
managed and allows for intelligent dynamic management. It uses a simple extensible data model
that allows for online analytic applications.
 
-%package master
-Summary: The flume master daemon is the central administration and data path control point
for flume nodes.
-Group: Development/Libraries
-BuildArch: noarch
-Requires: %{name} = %{version}-%{release}, /sbin/service
-Requires(post): /sbin/chkconfig
-Requires(preun): /sbin/chkconfig
-
-%if  %{?suse_version:1}0
-# Required for init scripts
-Requires: insserv
-%endif
-
-%if  0%{?mgaversion}
-# Required for init scripts
-Requires: initscripts
-%endif
-
-# CentOS 5 does not have any dist macro
-# So I will suppose anything that is not Mageia or a SUSE will be a RHEL/CentOS/Fedora
-%if %{!?suse_version:1}0 && %{!?mgaversion:1}0
-# Required for init scripts
-Requires: redhat-lsb
-%endif
-
-%description master
-Flume is a reliable, scalable, and manageable distributed data collection application for
collecting data such as logs and delivering it to data stores such as Hadoop's HDFS.  It can
efficiently collect, aggregate, and move large amounts of log data.  It has a simple, but
flexible, architecture based on streaming data flows.  It is robust and fault tolerant with
tunable reliability mechanisms and many failover and recovery mechanisms.  The system is centrally
managed and allows for intelligent dynamic management. It uses a simple extensible data model
that allows for online analytic applications.
-
 %package node
 Summary: The flume node daemon is a core element of flume's data path and is responsible
for generating, processing, and delivering data.
 Group: Development/Libraries
@@ -142,25 +112,17 @@ env FLUME_VERSION=%{version} sh %{SOURCE
 %install
 %__rm -rf $RPM_BUILD_ROOT
 sh %{SOURCE2} \
-          --build-dir=. \
+          --build-dir=$PWD \
           --prefix=$RPM_BUILD_ROOT \
 	  --doc-dir=%{doc_flume}
 %__install -d -m 0755 $RPM_BUILD_ROOT/%{initd_dir}/
 
 
-%if  %{?suse_version:1}0
-orig_init_file=$RPM_SOURCE_DIR/init.d.suse
-%else
-orig_init_file=$RPM_SOURCE_DIR/init.d
-%endif
+# Install init script
+init_file=$RPM_BUILD_ROOT/%{initd_dir}/%{name}-node
+%__cp %{SOURCE3} $init_file
+chmod 755 $init_file
 
-for service in %{flume_services}
-do
-        init_file=$RPM_BUILD_ROOT/%{initd_dir}/%{name}-${service}
-        %__cp $orig_init_file $init_file
-        %__sed -i -e "s|@FLUME_DAEMON@|${service}|" $init_file
-        chmod 755 $init_file
-done
 
 %__install -d -m 0755 $RPM_BUILD_ROOT/usr/bin
 
@@ -183,6 +145,20 @@ if [ "$1" = 0 ]; then
         %{alternatives_cmd} --remove %{name}-conf %{etc_flume}.empty || :
 fi
 
+%post node
+chkconfig --add %{name}-node
+
+%preun node
+if [ $1 = 0 ] ; then
+        service %{name}-node stop > /dev/null 2>&1
+        chkconfig --del %{name}-node
+fi
+%postun node
+if [ $1 -ge 1 ]; then
+        service %{name}-node condrestart >/dev/null 2>&1
+fi
+
+
 %files 
 %defattr(-,flume,flume)
 %config(noreplace) %{etc_flume}.empty
@@ -191,22 +167,7 @@ fi
 %attr(0755,root,root) %{bin_flume}
 %attr(0755,root,root) %{lib_flume}
 
-%define service_macro() \
-%files %1 \
-%attr(0755,root,root)/%{initd_dir}/%{name}-%1 \
-%dir %{lib_flume}/bin \
-%dir %{lib_flume} \
-%post %1 \
-chkconfig --add %{name}-%1 \
-\
-%preun %1 \
-if [ $1 = 0 ] ; then \
-        service %{name}-%1 stop > /dev/null 2>&1 \
-        chkconfig --del %{name}-%1 \
-fi \
-%postun %1 \
-if [ $1 -ge 1 ]; then \
-        service %{name}-%1 condrestart >/dev/null 2>&1 \
-fi
-%service_macro node
-%service_macro master
+%files node
+%attr(0755,root,root)/%{initd_dir}/%{name}-node
+%dir %{lib_flume}/bin
+%dir %{lib_flume}

Modified: incubator/bigtop/trunk/bigtop.mk
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop.mk?rev=1227888&r1=1227887&r2=1227888&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop.mk (original)
+++ incubator/bigtop/trunk/bigtop.mk Thu Jan  5 23:17:06 2012
@@ -127,12 +127,12 @@ $(eval $(call PACKAGE,mahout,MAHOUT))
 FLUME_NAME=flume
 FLUME_RELNOTES_NAME=Flume
 FLUME_PKG_NAME=flume
-FLUME_BASE_VERSION=0.9.3
-FLUME_PKG_VERSION=0.9.3
+FLUME_BASE_VERSION=1.0.0-incubating
+FLUME_PKG_VERSION=1.0.0
 FLUME_RELEASE_VERSION=1
-FLUME_TARBALL_DST=flume-$(FLUME_BASE_VERSION).tar.gz
-FLUME_TARBALL_SRC=$(FLUME_TARBALL_DST)
-FLUME_SITE=http://github.com/downloads/cloudera/flume/
+FLUME_TARBALL_DST=$(FLUME_NAME)-$(FLUME_BASE_VERSION).tar.gz
+FLUME_TARBALL_SRC=$(FLUME_NAME)-$(FLUME_BASE_VERSION).tar.gz
+FLUME_SITE=$(APACHE_MIRROR)/incubator/$(FLUME_NAME)/$(FLUME_NAME)-$(FLUME_BASE_VERSION)/
 $(eval $(call PACKAGE,flume,FLUME))
 
 # Bigtop-utils



Mime
View raw message