You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by rv...@apache.org on 2011/10/31 01:30:06 UTC
svn commit: r1195290 [3/6] - in /incubator/bigtop/branches/hadoop-0.22: ./
bigtop-deploy/ bigtop-deploy/puppet/ bigtop-deploy/puppet/manifests/
bigtop-deploy/puppet/modules/ bigtop-deploy/puppet/modules/hadoop-flume/
bigtop-deploy/puppet/modules/hadoop...
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/sqoop/sqoop-metastore.sh
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/sqoop/sqoop-metastore.sh?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/sqoop/sqoop-metastore.sh (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/sqoop/sqoop-metastore.sh Mon Oct 31 00:30:01 2011
@@ -34,6 +34,13 @@
### END INIT INFO
set -e
+# Autodetect JAVA_HOME if not defined
+if [ -e /usr/libexec/bigtop-detect-javahome ]; then
+ . /usr/libexec/bigtop-detect-javahome
+elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then
+ . /usr/lib/bigtop-utils/bigtop-detect-javahome
+fi
+
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
NAME=sqoop-metastore
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/sqoop/sqoop-metastore.sh.suse
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/sqoop/sqoop-metastore.sh.suse?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/sqoop/sqoop-metastore.sh.suse (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/sqoop/sqoop-metastore.sh.suse Mon Oct 31 00:30:01 2011
@@ -35,7 +35,14 @@
# Short-Description: Sqoop allows easy imports and exports of data sets between databases and the Hadoop Distributed File System (HDFS).
### END INIT INFO
-source /lib/lsb/init-functions
+. /lib/lsb/init-functions
+
+# Autodetect JAVA_HOME if not defined
+if [ -e /usr/libexec/bigtop-detect-javahome ]; then
+ . /usr/libexec/bigtop-detect-javahome
+elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then
+ . /usr/lib/bigtop-utils/bigtop-detect-javahome
+fi
STATUS_RUNNING=0
STATUS_DEAD=1
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/whirr/do-component-build
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/whirr/do-component-build?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/whirr/do-component-build (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/whirr/do-component-build Mon Oct 31 00:30:01 2011
@@ -16,5 +16,7 @@
set -ex
-mvn clean source:jar install assembly:assembly -Pjavadoc site "$@"
+mvn clean -Pjavadoc site source:jar package assembly:assembly -DskipTests "$@"
+mkdir build
+tar -C build --strip-components=1 -xzf target/*.tar.gz
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/whirr/install_whirr.sh
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/whirr/install_whirr.sh?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/whirr/install_whirr.sh (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/whirr/install_whirr.sh Mon Oct 31 00:30:01 2011
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
@@ -108,9 +108,21 @@ install -d -m 0755 $BIN_DIR
cat > $BIN_DIR/whirr <<EOF
#!/bin/sh
+# Autodetect JAVA_HOME if not defined
+if [ -e /usr/libexec/bigtop-detect-javahome ]; then
+ . /usr/libexec/bigtop-detect-javahome
+elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then
+ . /usr/lib/bigtop-utils/bigtop-detect-javahome
+fi
+
exec $INSTALLED_LIB_DIR/bin/whirr "\$@"
EOF
chmod 755 $BIN_DIR/whirr
install -d -m 0755 $MAN_DIR
gzip -c whirr.1 > $MAN_DIR/whirr.1.gz
+
+# Move the docs, but leave a symlink in place for compat. reasons
+install -d -m 0755 $DOC_DIR
+mv $LIB_DIR/docs/* $DOC_DIR
+ln -s /${DOC_DIR/#$PREFIX/} $LIB_DIR/docs
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/zookeeper/hadoop-zookeeper.sh
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/zookeeper/hadoop-zookeeper.sh?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/zookeeper/hadoop-zookeeper.sh (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/zookeeper/hadoop-zookeeper.sh Mon Oct 31 00:30:01 2011
@@ -31,12 +31,20 @@
### END INIT INFO
set -e
+# Autodetect JAVA_HOME if not defined
+if [ -e /usr/libexec/bigtop-detect-javahome ]; then
+ . /usr/libexec/bigtop-detect-javahome
+elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then
+ . /usr/lib/bigtop-utils/bigtop-detect-javahome
+fi
+
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON_SCRIPT="/usr/bin/zookeeper-server"
NAME=hadoop-zookeeper-server
DESC="ZooKeeper daemon"
-PID_FILE=/var/run/zookeeper/zookeeper-server.pid
+# FIXME: a workaround for BIGTOP-207
+PID_FILE=/var/lib/zookeeper/zookeeper_server.pid
install -d -m 0755 -o zookeeper -g zookeeper /var/run/zookeeper/
DODTIME=3
@@ -113,7 +121,8 @@ hadoop_stop_pidfile() {
start() {
- su -s /bin/sh zookeeper -c "${DAEMON_SCRIPT} start"
+ # FIXME: nohup is a workaround for BIGTOP-205
+ su -s /bin/sh zookeeper -c "nohup ${DAEMON_SCRIPT} start >/dev/null 2>&1 </dev/null"
}
stop() {
if hadoop_check_pidfile $PID_FILE ; then
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/zookeeper/hadoop-zookeeper.sh.suse
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/zookeeper/hadoop-zookeeper.sh.suse?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/zookeeper/hadoop-zookeeper.sh.suse (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/zookeeper/hadoop-zookeeper.sh.suse Mon Oct 31 00:30:01 2011
@@ -31,7 +31,14 @@
# Short-Description: ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services.
### END INIT INFO
-source /lib/lsb/init-functions
+. /lib/lsb/init-functions
+
+# Autodetect JAVA_HOME if not defined
+if [ -e /usr/libexec/bigtop-detect-javahome ]; then
+ . /usr/libexec/bigtop-detect-javahome
+elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then
+ . /usr/lib/bigtop-utils/bigtop-detect-javahome
+fi
STATUS_RUNNING=0
STATUS_DEAD=1
@@ -44,7 +51,8 @@ RETVAL=0
EXEC_PATH="/usr/bin/zookeeper-server"
NAME=hadoop-zookeeper-server
DESC="$NAME"
-PIDFILE=/var/run/zookeeper/zookeeper-server.pid
+# FIXME: a workaround for BIGTOP-207
+PIDFILE=/var/lib/zookeeper/zookeeper_server.pid
LOCKFILE="/var/lock/subsys/zookeeper"
USER=zookeeper
@@ -54,7 +62,8 @@ install -d -m 0755 -o zookeeper -g zooke
start() {
[ -x $exec ] || exit $ERROR_PROGRAM_NOT_INSTALLED
log_success_msg "Starting $DESC: "
- start_daemon -u $USER $EXEC_PATH start
+ # FIXME: nohup is a workaround for BIGTOP-205
+ start_daemon -u $USER nohup $EXEC_PATH start
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch $LOCKFILE
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/zookeeper/install_zookeeper.sh
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/zookeeper/install_zookeeper.sh?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/zookeeper/install_zookeeper.sh (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/zookeeper/install_zookeeper.sh Mon Oct 31 00:30:01 2011
@@ -118,9 +118,24 @@ cp build/lib/*.jar $PREFIX/$LIB_DIR/lib
# Copy in the configuration files
install -d -m 0755 $PREFIX/$CONF_DIST_DIR
-cp conf/* $PREFIX/$CONF_DIST_DIR/
+cp zoo.cfg conf/* $PREFIX/$CONF_DIST_DIR/
ln -s $CONF_DIR $PREFIX/$LIB_DIR/conf
+# FIXME:
+cat << __EOT__ >> $PREFIX/$CONF_DIST_DIR/log4j.properties
+# Define some default values that can be overridden by system properties
+zookeeper.root.logger=INFO, CONSOLE
+zookeeper.console.threshold=INFO
+zookeeper.log.dir=.
+zookeeper.log.file=zookeeper.log
+zookeeper.log.threshold=DEBUG
+zookeeper.tracelog.dir=.
+zookeeper.tracelog.file=zookeeper_trace.log
+
+log4j.appender.ROLLINGFILE.File=\${zookeeper.log.dir}/\${zookeeper.log.file}
+log4j.rootLogger=\${zookeeper.root.logger}
+__EOT__
+
# Copy in the /usr/bin/zookeeper-server wrapper
install -d -m 0755 $PREFIX/$LIB_DIR/bin
@@ -133,6 +148,14 @@ wrapper=$PREFIX/usr/bin/zookeeper-client
install -d -m 0755 `dirname $wrapper`
cat > $wrapper <<EOF
#!/bin/sh
+
+# Autodetect JAVA_HOME if not defined
+if [ -e /usr/libexec/bigtop-detect-javahome ]; then
+ . /usr/libexec/bigtop-detect-javahome
+elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then
+ . /usr/lib/bigtop-utils/bigtop-detect-javahome
+fi
+
export ZOOKEEPER_HOME=\${ZOOKEEPER_CONF:-/usr/lib/zookeeper}
export ZOOKEEPER_CONF=\${ZOOKEEPER_CONF:-/etc/zookeeper/conf}
export CLASSPATH=\$CLASSPATH:\$ZOOKEEPER_CONF:\$ZOOKEEPER_HOME/*:\$ZOOKEEPER_HOME/lib/*
@@ -144,6 +167,14 @@ chmod 755 $wrapper
wrapper=$PREFIX/usr/bin/zookeeper-server
cat > $wrapper <<EOF
#!/bin/sh
+
+# Autodetect JAVA_HOME if not defined
+if [ -e /usr/libexec/bigtop-detect-javahome ]; then
+ . /usr/libexec/bigtop-detect-javahome
+elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then
+ . /usr/lib/bigtop-utils/bigtop-detect-javahome
+fi
+
export ZOOPIDFILE=\${ZOOPIDFILE:-/var/run/zookeeper/zookeeper-server.pid}
export ZOOKEEPER_HOME=\${ZOOKEEPER_CONF:-/usr/lib/zookeeper}
export ZOOKEEPER_CONF=\${ZOOKEEPER_CONF:-/etc/zookeeper/conf}
Copied: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/zookeeper/zoo.cfg (from r1185814, incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/hbase/do-component-build)
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/zookeeper/zoo.cfg?p2=incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/zookeeper/zoo.cfg&p1=incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/hbase/do-component-build&r1=1185814&r2=1195290&rev=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/hbase/do-component-build (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/zookeeper/zoo.cfg Mon Oct 31 00:30:01 2011
@@ -1,4 +1,3 @@
-#!/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.
@@ -14,6 +13,17 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-set -ex
-
-mvn clean -DskipTests -Dhbase.version=${HBASE_VERSION} -Dhadoop.profile=22 install site assembly:assembly "$@"
+maxClientCnxns=50
+# The number of milliseconds of each tick
+tickTime=2000
+# The number of ticks that the initial
+# synchronization phase can take
+initLimit=10
+# The number of ticks that can pass between
+# sending a request and getting an acknowledgement
+syncLimit=5
+# the directory where the snapshot is stored.
+dataDir=/var/lib/zookeeper
+# the port at which the clients will connect
+clientPort=2181
+server.0=localhost:2888:3888
Added: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/bigtop-utils/compat
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/bigtop-utils/compat?rev=1195290&view=auto
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/bigtop-utils/compat (added)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/bigtop-utils/compat Mon Oct 31 00:30:01 2011
@@ -0,0 +1 @@
+7
Copied: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/bigtop-utils/control (from r1185814, incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/hbase/do-component-build)
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/bigtop-utils/control?p2=incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/bigtop-utils/control&p1=incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/hbase/do-component-build&r1=1185814&r2=1195290&rev=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/hbase/do-component-build (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/bigtop-utils/control Mon Oct 31 00:30:01 2011
@@ -1,4 +1,3 @@
-#!/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.
@@ -13,7 +12,16 @@
# 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.
+Source: bigtop-utils
+Section: misc
+Priority: extra
+Maintainer: Bigtop <bi...@incubator.apache.org>
+Build-Depends: debhelper (>= 7.0.0~)
+Standards-Version: 3.8.0
+Homepage: http://incubator.apache.org/bigtop/
-set -ex
-
-mvn clean -DskipTests -Dhbase.version=${HBASE_VERSION} -Dhadoop.profile=22 install site assembly:assembly "$@"
+Package: bigtop-utils
+Architecture: all
+Depends: ${misc:Depends}
+Description: Collection of useful tools for Bigtop
+ This includes a collection of useful tools and files for Bigtop
Added: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/bigtop-utils/copyright
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/bigtop-utils/copyright?rev=1195290&view=auto
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/bigtop-utils/copyright (added)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/bigtop-utils/copyright Mon Oct 31 00:30:01 2011
@@ -0,0 +1,15 @@
+Format: http://dep.debian.net/deps/dep5
+Source: http://incubator.apache.org/bigtop/
+Upstream-Name: Apache Bigtop - Incubating
+
+Files: *
+Copyright: 2008-2011, The Apache Software Foundation
+License: Apache-2.0
+
+Files debian/*
+Copyright: 2011, The Apache Software Foundation
+License: Apache-2.0
+
+License: Apache-2.0
+ On Debian systems, the complete text of the Apache 2.0 license
+ can be found in "/usr/share/common-licenses/Apache-2.0".
Copied: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/bigtop-utils/rules (from r1185814, incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/zookeeper/rules)
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/bigtop-utils/rules?p2=incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/bigtop-utils/rules&p1=incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/zookeeper/rules&r1=1185814&r2=1195290&rev=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/zookeeper/rules (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/bigtop-utils/rules Mon Oct 31 00:30:01 2011
@@ -23,56 +23,52 @@ export DH_VERBOSE=1
# This has to be exported to make some magic below work.
export DH_OPTIONS
+DISTRO_CODENAME=$(shell lsb_release -sc)
+
patch: patch-stamp
patch-stamp:
touch $@
+build:
+ dh_testdir
+ dh_clean -k
+
+
+build-indep: build-indep-stamp
+build-indep-stamp: patch-stamp
+ touch $@
+
clean:
dh_testdir
dh_testroot
rm -f *-stamp
dh_clean
- rm -Rf debian/tmp debian/hadoop-zookeeper debian/zookeeper
find debian -name .\*swp -exec rm -f {} \;
-build-indep: build-indep-stamp
-build-indep-stamp: patch-stamp
- bash debian/do-component-build -Divy.home=`pwd`/debian/.ivy
- mkdir -p debian/tmp
- tar cf - --exclude=debian/\* . | (cd debian/tmp && tar xf -)
- touch $@
-
install: install-indep
install-indep:
- dh_testdir
- dh_testroot
- cp debian/zookeeper.1 .
- sh -x debian/install_zookeeper.sh \
- --build-dir=. \
- --prefix=debian/hadoop-zookeeper
- dh_install -i
+ dh_installdirs
+ # Copy repo file
+ install -d -p -m 755 debian/bigtop-utils/usr/lib/bigtop-utils/
+ install -p -m 755 debian/bigtop-detect-javahome debian/bigtop-utils/usr/lib/bigtop-utils/
+ dh_install
+
-binary-common:
+binary-common:
dh_testdir
dh_testroot
- dh_installchangelogs
- dh_installdocs
- dh_installman
- dh_link
- dh_strip
dh_compress
dh_fixperms
dh_makeshlibs
- dh_installinit
+ dh_installdocs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
-binary-indep: build-indep install-indep
+binary-indep: build install install-indep
$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
-
-binary-arch:
binary: binary-indep
-.PHONY: build clean binary-indep binary install-indep binary-arc
+
+.PHONY: clean install-indep binary-arc
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/flume/control
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/flume/control?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/flume/control (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/flume/control Mon Oct 31 00:30:01 2011
@@ -16,14 +16,14 @@
Source: flume
Section: misc
Priority: extra
-Maintainer: Alex Newman <ne...@cloudera.com>
+Maintainer: Bigtop <bi...@incubator.apache.org>
Build-Depends: debhelper (>= 6), ant, ant-optional, git-core
Standards-Version: 3.8.0
-Homepage: http://www.cloudera.com
+Homepage: http://incubator.apache.org/projects/flume.html
Package: flume
Architecture: all
-Depends: hadoop-zookeeper (>= 3.3.1), adduser, hadoop
+Depends: hadoop-zookeeper (>= 3.3.1), 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
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/flume/service-init.d.tpl
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/flume/service-init.d.tpl?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/flume/service-init.d.tpl (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/flume/service-init.d.tpl Mon Oct 31 00:30:01 2011
@@ -27,6 +27,12 @@
#
# description: Flume @FLUME_DAEMON@
+# Autodetect JAVA_HOME if not defined
+if [ -e /usr/libexec/bigtop-detect-javahome ]; then
+ . /usr/libexec/bigtop-detect-javahome
+elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then
+ . /usr/lib/bigtop-utils/bigtop-detect-javahome
+fi
export FLUME_HOME=/usr/lib/flume
export FLUME_LOG_DIR=/var/log/flume
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hadoop/control
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hadoop/control?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hadoop/control (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hadoop/control Mon Oct 31 00:30:01 2011
@@ -16,7 +16,7 @@
Source: hadoop
Section: misc
Priority: extra
-Maintainer: Todd Lipcon <to...@cloudera.com>
+Maintainer: Bigtop <bi...@incubator.apache.org>
Build-Depends: debhelper (>= 6), ant, ant-optional, liblzo2-dev, python, libzip-dev,automake, autoconf (>= 2.61), sharutils, g++ (>= 4), git-core, libfuse-dev, libssl-dev
Standards-Version: 3.8.0
Homepage: http://hadoop.apache.org/core/
@@ -24,7 +24,7 @@ Homepage: http://hadoop.apache.org/core/
Package: hadoop
Provides: hadoop
Architecture: all
-Depends: ${shlibs:Depends}, ${misc:Depends}, adduser
+Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, bigtop-utils
Recommends: hadoop-native
Description: A software platform for processing vast amounts of data
Hadoop is a software platform that lets one easily write and
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hadoop/hadoop-sbin.install
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hadoop/hadoop-sbin.install?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hadoop/hadoop-sbin.install (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hadoop/hadoop-sbin.install Mon Oct 31 00:30:01 2011
@@ -1 +1,2 @@
/usr/lib/hadoop/sbin
+/usr/lib/hadoop/libexec/jsvc*
Copied: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hadoop/hadoop-sbin.postinst (from r1185814, incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/pig/do-component-build)
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hadoop/hadoop-sbin.postinst?p2=incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hadoop/hadoop-sbin.postinst&p1=incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/pig/do-component-build&r1=1185814&r2=1195290&rev=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/common/pig/do-component-build (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hadoop/hadoop-sbin.postinst Mon Oct 31 00:30:01 2011
@@ -1,4 +1,5 @@
#!/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.
@@ -14,8 +15,23 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-set -ex
+# postinst script for hadoop
+
+set -e
+
+case "$1" in
+ configure)
+ find /usr/lib/hadoop -name task-controller -exec chown root:mapred {} \;
+ find /usr/lib/hadoop -name task-controller -exec chmod 4750 {} \;
+ ;;
-ant -Djavac.version=1.6 -Djava5.home=${JAVA5_HOME} -Dforrest.home=${FORREST_HOME} -Ddist.dir=debian/tmp -Dversion=${PIG_BASE_VERSION} package "$@"
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+#DEBHELPER#
Added: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hadoop/hadoop.daemon.postinst.tpl
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hadoop/hadoop.daemon.postinst.tpl?rev=1195290&view=auto
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hadoop/hadoop.daemon.postinst.tpl (added)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hadoop/hadoop.daemon.postinst.tpl Mon Oct 31 00:30:01 2011
@@ -0,0 +1,10 @@
+#!/bin/sh
+set -e
+if [ -x "/etc/init.d/hadoop-@HADOOP_DAEMON@" ]; then
+ update-rc.d hadoop-@HADOOP_DAEMON@ defaults >/dev/null
+ if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+ invoke-rc.d hadoop-@HADOOP_DAEMON@ start || :
+ else
+ /etc/init.d/hadoop-@HADOOP_DAEMON@ start || :
+ fi
+fi
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hadoop/hadoop.install
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hadoop/hadoop.install?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hadoop/hadoop.install (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hadoop/hadoop.install Mon Oct 31 00:30:01 2011
@@ -2,4 +2,5 @@
/usr/lib/hadoop
/etc/hadoop/conf.empty
/etc/default/hadoop
+/etc/security/limits.d/hadoop.nofiles.conf
/usr/share/doc/hadoop
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hadoop/rules
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hadoop/rules?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hadoop/rules (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hadoop/rules Mon Oct 31 00:30:01 2011
@@ -39,8 +39,7 @@ endif
build: build-stamp
build-stamp:
dh_testdir
-# patch -p0 < debian/patch
- env HADOOP_VERSION=${hadoop_version} \
+ env HADOOP_VERSION=${hadoop_version} HADOOP_ARCH=${native_dir} \
sh debian/do-component-build -Divy.home=`pwd`/debian/.ivy
touch $@
@@ -83,6 +82,8 @@ namenode secondarynamenode jobtracker ta
sed -e "s|@HADOOP_DAEMON@|$@|" \
-e "s|@HADOOP_MAJOR_VERSION@|$hadoop_version|" \
-e "s|@DAEMON_USER@|$($@_user)|" $< > debian/hadoop-$@.init
+ # FIXME: workaround for BIGTOP-105
+ sed -e "s|@HADOOP_DAEMON@|$@|" < debian/hadoop.daemon.postinst.tpl > debian/hadoop-$@.postinst
install-indep: namenode secondarynamenode jobtracker tasktracker datanode
mkdir -p debian/tmp/etc/default
@@ -97,9 +98,15 @@ install-indep: namenode secondarynamenod
rm -Rf debian/hadoop/usr/bin/hadoop-fuse-dfs
rm -Rf debian/hadoop/usr/lib/hadoop/contrib/fuse-dfs
+ # FIXME: The following is a workaround for BIGTOP-139
+ rm -Rf debian/hadoop/usr/lib/hadoop/libexec/jsvc*
+ rm -Rf debian/hadoop/usr/lib/hadoop/bin/task-controller
+
install-arch:
mkdir -p debian/tmp/etc/default
cp debian/hadoop-fuse.default debian/tmp/etc/default/hadoop-fuse
+ mkdir -p debian/tmp/etc/security/limits.d
+ cp debian/hadoop.nofiles.conf debian/tmp/etc/security/limits.d
dh_install --sourcedir=debian/tmp -s
# Must not depend on anything. This is to be called by
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hadoop/service-init.d.tpl
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hadoop/service-init.d.tpl?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hadoop/service-init.d.tpl (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hadoop/service-init.d.tpl Mon Oct 31 00:30:01 2011
@@ -48,6 +48,13 @@ install -d -m 0775 -o root -g hadoop /va
. /etc/default/hadoop
+# Autodetect JAVA_HOME if not defined
+if [ -e /usr/libexec/bigtop-detect-javahome ]; then
+ . /usr/libexec/bigtop-detect-javahome
+elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then
+ . /usr/lib/bigtop-utils/bigtop-detect-javahome
+fi
+
. $HADOOP_HOME/bin/hadoop-config.sh
# FIXME: this needs to be removed once hadoop-config.sh stop clobbering HADOOP_HOME
@@ -143,13 +150,27 @@ hadoop_stop_pidfile() {
}
start() {
- $HADOOP_HOME/bin/hadoop-daemon.sh start @HADOOP_DAEMON@ $DAEMON_FLAGS
-
+ TARGET_USER_NAME="HADOOP_`echo @HADOOP_DAEMON@ | tr a-z A-Z`_USER"
+ TARGET_USER=$(eval "echo \$$TARGET_USER_NAME")
+
if [ "@HADOOP_DAEMON@" = "datanode" ]; then
- # Some processes are slow to start
- sleep $SLEEP_TIME
+ # The following needs to be removed once HDFS-1943 gets finally put to rest.
+ # The logic of this ugly hack is this: IFF we do NOT have jsvc installed it is
+ # guaranteed that we can NOT be running in a secure mode and thus we need to
+ # workaround HDFS-1943 (start as non-root). As soon as jsvc gets installed
+ # we are assuming a secure installation and starting a data node as root.
+ # This leaves 2 corner cases:
+ # 1. HADOOP_DATANODE_USER being set to root
+ # 2. jsvc is installed but Hadoop is configures to run in an unsecure mode
+ # Both will currently fail
+ if [ -f $HADOOP_HOME/libexec/jsvc.amd64 -o -f $HADOOP_HOME/libexec/jsvc.i386 ] && [ -n "$HADOOP_SECURE_DN_USER" ]; then
+ TARGET_USER=root
+ fi
fi
+ su -s /bin/bash $TARGET_USER -c "$HADOOP_HOME/bin/hadoop-daemon.sh start @HADOOP_DAEMON@ $DAEMON_FLAGS"
+ # Some processes are slow to start
+ sleep $SLEEP_TIME
}
stop() {
$HADOOP_HOME/bin/hadoop-daemon.sh stop @HADOOP_DAEMON@
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hbase/control
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hbase/control?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hbase/control (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hbase/control Mon Oct 31 00:30:01 2011
@@ -15,14 +15,14 @@
Source: hadoop-hbase
Section: misc
Priority: extra
-Maintainer: Alex Newman <ne...@cloudera.com>
+Maintainer: Bigtop <bi...@incubator.apache.org>
Build-Depends: debhelper (>= 6), git-core, adduser
Standards-Version: 3.8.0
-Homepage: http://hadoop.apache.org/hbase/
+Homepage: http://hbase.apache.org/
Package: hadoop-hbase
Architecture: all
-Depends: adduser, hadoop-zookeeper (>= 3.3.1), hadoop
+Depends: adduser, hadoop-zookeeper (>= 3.3.1), hadoop, bigtop-utils
Recommends: ntp
Description: HBase is the Hadoop database
Use it when you need random, realtime read/write access to your Big Data.
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hbase/hadoop-hbase.install
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hbase/hadoop-hbase.install?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hbase/hadoop-hbase.install (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hbase/hadoop-hbase.install Mon Oct 31 00:30:01 2011
@@ -1,3 +1,4 @@
/usr/lib/hbase
/usr/bin/hbase
/etc/hbase
+/etc/security/limits.d/hbase.nofiles.conf
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hbase/rules
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hbase/rules?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hbase/rules (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hbase/rules Mon Oct 31 00:30:01 2011
@@ -49,6 +49,8 @@ install: build
--build-dir=target/hbase-0.92/hbase-0.92 \
--doc-dir=usr/share/doc/hadoop-hbase-doc \
--prefix=debian/tmp
+ mkdir -p debian/tmp/etc/security/limits.d
+ cp debian/hbase.nofiles.conf debian/tmp/etc/security/limits.d
# Symlink in the dependency jars from their packages. Both of these packages
# provide an unversioned symlink foo.jar -> foo-0.1.2.jar.
rm debian/tmp/usr/lib/hbase/lib/zookeeper-*.jar
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hbase/service-init.d.tpl
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hbase/service-init.d.tpl?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hbase/service-init.d.tpl (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hbase/service-init.d.tpl Mon Oct 31 00:30:01 2011
@@ -42,7 +42,7 @@
set -e
-source /etc/default/hadoop
+. /etc/default/hadoop
# Our default HBASE_HOME and HBASE_PID_DIR
export HBASE_HOME=/usr/lib/hbase
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hive/changelog
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hive/changelog?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hive/changelog (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hive/changelog Mon Oct 31 00:30:01 2011
@@ -1,17 +1 @@
-hive (0.3.0-0cloudera0.3.0) cloudera; urgency=low
-
- * New upstream
-
- -- Todd Lipcon <to...@cloudera.com> Thu, 04 Jun 2009 15:42:42 -0700
-
-hive (0.3~svn759018-0cloudera0.3.0) cloudera; urgency=low
-
- * New upstream
-
- -- <to...@cloudera.com> Mon, 06 Apr 2009 04:24:57 +0000
-
-hive (0~svn748058-0cloudera0.3.0) cloudera; urgency=low
-
- * Initial release
-
- -- Todd Lipcon <to...@cloudera.com> Thu, 02 Apr 2009 23:36:13 -0400
+-- NOTE: this gets auto-generated
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hive/control
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hive/control?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hive/control (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/hive/control Mon Oct 31 00:30:01 2011
@@ -16,14 +16,14 @@
Source: hadoop-hive
Section: misc
Priority: extra
-Maintainer: Todd Lipcon <to...@cloudera.com>
+Maintainer: Bigtop <bi...@incubator.apache.org>
Build-Depends: debhelper (>= 6), ant, python-support, git-core
Standards-Version: 3.8.0
Homepage: http://hadoop.apache.org/hive/
Package: hadoop-hive
Architecture: all
-Depends: adduser, hadoop
+Depends: adduser, hadoop, bigtop-utils
Description: A data warehouse infrastructure built on top of Hadoop
Hive is a data warehouse infrastructure built on top of Hadoop that
provides tools to enable easy data summarization, adhoc querying and
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/mahout/control
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/mahout/control?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/mahout/control (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/mahout/control Mon Oct 31 00:30:01 2011
@@ -23,7 +23,7 @@ Homepage: http://mahout.apache.org
Package: mahout
Architecture: all
-Depends: hadoop
+Depends: hadoop, bigtop-utils
Description: A set of Java libraries for scalable machine learning.
Mahout's goal is to build scalable machine learning libraries.
With scalable we mean:
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/oozie/control
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/oozie/control?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/oozie/control (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/oozie/control Mon Oct 31 00:30:01 2011
@@ -15,14 +15,15 @@
Source: oozie
Section: misc
Priority: extra
-Maintainer: Arvind Prabhakar <ar...@cloudera.com>
+Maintainer: Bigtop <bi...@incubator.apache.org>
Build-Depends: debhelper (>= 6)
Depends: zip, unzip
Standards-Version: 3.8.0
-Homepage: http://archive.cloudera.com/cdh/3/oozie
+Homepage: http://incubator.apache.org/oozie/
Package: oozie-client
Architecture: all
+Depends: bigtop-utils
Description: Command line utility that allows
remote access and operation of oozie. Using this utility, the
user can deploy workflows and perform other administrative and
@@ -31,7 +32,7 @@ Description: Command line utility that a
Package: oozie
Architecture: all
-Depends: oozie-client (= ${source:Version})
+Depends: oozie-client (= ${source:Version}), hadoop, zip, unzip
Description: A workflow and coordinator sytem for Hadoop jobs.
Oozie workflows are actions arranged in a control dependency DAG (Direct
Acyclic Graph).
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/oozie/oozie.postinst
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/oozie/oozie.postinst?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/oozie/oozie.postinst (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/oozie/oozie.postinst Mon Oct 31 00:30:01 2011
@@ -38,6 +38,7 @@ case "$1" in
configure)
chown -R oozie:oozie /var/lib/oozie /var/log/oozie
update-rc.d oozie defaults >/dev/null || exit 1
+ /usr/lib/oozie/bin/oozie-setup.sh -hadoop 0.20.200 /usr/lib/hadoop
;;
abort-upgrade|abort-remove|abort-deconfigure)
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/pig/control
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/pig/control?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/pig/control (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/pig/control Mon Oct 31 00:30:01 2011
@@ -1,14 +1,14 @@
Source: hadoop-pig
Section: misc
Priority: extra
-Maintainer: Todd Lipcon <to...@cloudera.com>
-Build-Depends: debhelper (>= 6), ant, ant-optional, git-core
+Maintainer: Bigtop <bi...@incubator.apache.org>
+Build-Depends: debhelper (>= 6), ant, ant-optional
Standards-Version: 3.8.0
-Homepage: http://hadoop.apache.org/pig/
+Homepage: http://pig.apache.org/
Package: hadoop-pig
Architecture: all
-Depends: hadoop
+Depends: hadoop, bigtop-utils
Description: A platform for analyzing large data sets using Hadoop
Pig is a platform for analyzing large data sets that consists of a high-level language
for expressing data analysis programs, coupled with infrastructure for evaluating these
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/pig/rules
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/pig/rules?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/pig/rules (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/pig/rules Mon Oct 31 00:30:01 2011
@@ -50,7 +50,7 @@ install-indep:
cp debian/*.properties .
cp debian/pig.1 .
sh -x debian/install_pig.sh \
- --build-dir=debian/tmp \
+ --build-dir=build/pig-${PIG_BASE_VERSION} \
--prefix=debian/hadoop-pig \
--doc-dir=debian/hadoop-pig/usr/share/doc/hadoop-pig \
--examples-dir=debian/hadoop-pig/usr/share/doc/hadoop-pig/examples
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/sqoop/control
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/sqoop/control?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/sqoop/control (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/sqoop/control Mon Oct 31 00:30:01 2011
@@ -15,14 +15,14 @@
Source: sqoop
Section: misc
Priority: extra
-Maintainer: Alex Newman <ne...@cloudera.com>
+Maintainer: Bigtop <bi...@incubator.apache.org>
Build-Depends: debhelper (>= 6), ant, ant-optional, git-core, sed, asciidoc, xmlto
Standards-Version: 3.8.0
-Homepage: http://www.cloudera.com
+Homepage: http://incubator.apache.org/sqoop/
Package: sqoop
Architecture: all
-Depends: hadoop
+Depends: hadoop, bigtop-utils
Description: Tool for easy imports and exports of data sets between databases and HDFS
Sqoop is a tool that provides the ability to import and export data sets between
the Hadoop Distributed File System (HDFS) and relational databases.
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/whirr/control
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/whirr/control?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/whirr/control (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/whirr/control Mon Oct 31 00:30:01 2011
@@ -15,13 +15,14 @@
Source: whirr
Section: misc
Priority: extra
-Maintainer: Tom White <to...@cloudera.com>
+Maintainer: Bigtop <bi...@incubator.apache.org>
Build-Depends: debhelper (>= 6), git-core
Standards-Version: 3.8.0
-Homepage: http://incubator.apache.org/whirr
+Homepage: http://whirr.apache.org/
Package: whirr
Architecture: all
+Depends: bigtop-utils
Description: Scripts and libraries for running software services on cloud infrastructure
Whirr provides
.
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/whirr/rules
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/whirr/rules?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/whirr/rules (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/whirr/rules Mon Oct 31 00:30:01 2011
@@ -41,15 +41,15 @@ build-indep-stamp: patch-stamp
mkdir -p debian/tmp
# NOTE: FIXME me right away
cp -r debian/whirr.1 .
- tar cf - --exclude=debian/\* . | (cd debian/tmp && tar xf -)
touch $@
install: install-indep
install-indep:
dh_testdir
dh_testroot
- sh -x debian/install_whirr.sh \
- --build-dir=debian/tmp \
+ bash -x debian/install_whirr.sh \
+ --build-dir=build \
+ --doc-dir=debian/whirr/usr/share/doc/whirr \
--prefix=debian/whirr
(dh_lintian) || /bin/true
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/zookeeper/control
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/zookeeper/control?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/zookeeper/control (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/zookeeper/control Mon Oct 31 00:30:01 2011
@@ -15,15 +15,16 @@
Source: hadoop-zookeeper
Section: misc
Priority: extra
-Maintainer: Alex Newman <ne...@cloudera.com>
-Build-Depends: debhelper (>= 6), ant, ant-optional, git-core, autoconf, automake, subversion
+Maintainer: Bigtop <bi...@incubator.apache.org>
+Build-Depends: debhelper (>= 6), ant, ant-optional, autoconf, automake
Standards-Version: 3.8.0
-Homepage: http://hadoop.apache.org/zookeeper/
+Homepage: http://zookeeper.apache.org/
Package: hadoop-zookeeper
Architecture: all
Conflicts: zookeeper
Replaces: zookeeper
+Depends: bigtop-utils
Description: A high-performance coordination service for distributed applications.
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.
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/zookeeper/hadoop-zookeeper-server.init
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/zookeeper/hadoop-zookeeper-server.init?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/zookeeper/hadoop-zookeeper-server.init (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/zookeeper/hadoop-zookeeper-server.init Mon Oct 31 00:30:01 2011
@@ -36,7 +36,8 @@ DAEMON_SCRIPT="/usr/bin/zookeeper-server
NAME=hadoop-zookeeper-server
DESC="ZooKeeper daemon"
-PID_FILE=/var/run/zookeeper/zookeeper-server.pid
+# FIXME: a workaround for BIGTOP-207
+PID_FILE=/var/lib/zookeeper/zookeeper_server.pid
install -d -m 0755 -o zookeeper -g zookeeper /var/run/zookeeper/
@@ -113,7 +114,8 @@ hadoop_stop_pidfile() {
start() {
- su -s /bin/sh zookeeper -c "${DAEMON_SCRIPT} start"
+ # FIXME: nohup is a workaround for BIGTOP-205
+ su -s /bin/sh zookeeper -c "nohup ${DAEMON_SCRIPT} start >/dev/null 2>&1 </dev/null"
}
stop() {
if hadoop_check_pidfile $PID_FILE ; then
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/zookeeper/rules
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/zookeeper/rules?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/zookeeper/rules (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/deb/zookeeper/rules Mon Oct 31 00:30:01 2011
@@ -46,7 +46,7 @@ install: install-indep
install-indep:
dh_testdir
dh_testroot
- cp debian/zookeeper.1 .
+ cp debian/zookeeper.1 debian/zoo.cfg .
sh -x debian/install_zookeeper.sh \
--build-dir=. \
--prefix=debian/hadoop-zookeeper
Added: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/bigtop-utils/RPMS/.gitignore
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/bigtop-utils/RPMS/.gitignore?rev=1195290&view=auto
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/bigtop-utils/RPMS/.gitignore (added)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/bigtop-utils/RPMS/.gitignore Mon Oct 31 00:30:01 2011
@@ -0,0 +1 @@
+repodata
Added: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/bigtop-utils/SPECS/.gitignore
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/bigtop-utils/SPECS/.gitignore?rev=1195290&view=auto
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/bigtop-utils/SPECS/.gitignore (added)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/bigtop-utils/SPECS/.gitignore Mon Oct 31 00:30:01 2011
@@ -0,0 +1 @@
+*.swp
Added: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/bigtop-utils/SPECS/bigtop-utils.spec
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/bigtop-utils/SPECS/bigtop-utils.spec?rev=1195290&view=auto
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/bigtop-utils/SPECS/bigtop-utils.spec (added)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/bigtop-utils/SPECS/bigtop-utils.spec Mon Oct 31 00:30:01 2011
@@ -0,0 +1,59 @@
+# 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.
+
+Name: bigtop-utils
+Version: %{bigtop_utils_version}
+Release: %{bigtop_utils_release}
+Summary: Collection of useful tools for Bigtop
+
+Group: Applications/Engineering
+License: APL2
+URL: http://incubator.apache.org/bigtop/
+Source0: bigtop-detect-javahome
+Source1: LICENSE
+
+BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+
+BuildArch: noarch
+
+%description
+This includes a collection of useful tools and files for Bigtop
+
+
+%prep
+%setup -q -T -c
+install -p -m 644 %{SOURCE0} .
+install -p -m 644 %{SOURCE1} .
+
+%build
+
+
+%install
+install -d -p -m 755 $RPM_BUILD_ROOT%{_libexecdir}/
+install -p -m 755 %{SOURCE0} $RPM_BUILD_ROOT%{_libexecdir}/
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-,root,root,-)
+%doc LICENSE
+
+%{_libexecdir}/bigtop-detect-javahome
+
+%changelog
+
+
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/flume/SOURCES/init.d
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/flume/SOURCES/init.d?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/flume/SOURCES/init.d (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/flume/SOURCES/init.d Mon Oct 31 00:30:01 2011
@@ -28,7 +28,14 @@
# Default-Stop: 0 1 6
# Short-Description: Flume @FLUME_DAEMON@
-source /etc/rc.d/init.d/functions
+. /etc/rc.d/init.d/functions
+
+# Autodetect JAVA_HOME if not defined
+if [ -e /usr/libexec/bigtop-detect-javahome ]; then
+ . /usr/libexec/bigtop-detect-javahome
+elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then
+ . /usr/lib/bigtop-utils/bigtop-detect-javahome
+fi
desc="Flume @FLUME_DAEMON@ daemon"
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/flume/SOURCES/init.d.suse
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/flume/SOURCES/init.d.suse?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/flume/SOURCES/init.d.suse (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/flume/SOURCES/init.d.suse Mon Oct 31 00:30:01 2011
@@ -31,7 +31,14 @@
# Short-Description: Flume @FLUME_DAEMON@
### END INIT INFO
-source /lib/lsb/init-functions
+. /lib/lsb/init-functions
+
+# Autodetect JAVA_HOME if not defined
+if [ -e /usr/libexec/bigtop-detect-javahome ]; then
+ . /usr/libexec/bigtop-detect-javahome
+elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then
+ . /usr/lib/bigtop-utils/bigtop-detect-javahome
+fi
STATUS_RUNNING=0
STATUS_DEAD=1
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/flume/SPECS/flume.spec
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/flume/SPECS/flume.spec?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/flume/SPECS/flume.spec (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/flume/SPECS/flume.spec Mon Oct 31 00:30:01 2011
@@ -14,7 +14,6 @@
# limitations under the License.
%define etc_flume /etc/flume/conf
%define bin_flume %{_bindir}
-%define doc_flume %{_docdir}/flume-%{flume_version}
%define man_flume %{_mandir}
%define lib_flume /usr/lib/flume
%define log_flume /var/log/flume
@@ -37,11 +36,13 @@
/usr/lib/rpm/brp-compress ; \
%{nil}
+%define doc_flume %{_docdir}/flume
%define alternatives_cmd update-alternatives
%global initd_dir %{_sysconfdir}/rc.d
%else
+%define doc_flume %{_docdir}/flume-%{flume_version}
%define alternatives_cmd alternatives
%global initd_dir %{_sysconfdir}/rc.d/init.d
@@ -53,7 +54,7 @@ Name: flume
Version: %{flume_version}
Release: %{flume_release}
Summary: Flume is a reliable, scalable, and manageable distributed log collection application for collecting data such as logs and delivering it to data stores such as Hadoop's HDFS.
-URL: https://github.com/cloudera/flume
+URL: http://incubator.apache.org/projects/flume.html
Group: Development/Libraries
Buildroot: %{_topdir}/INSTALL/%{name}-%{version}
BuildArch: noarch
@@ -63,9 +64,16 @@ Source1: do-component-build
Source2: install_%{name}.sh
Source3: init.d
Source4: init.d.suse
-Requires: sh-utils, textutils, /usr/sbin/useradd, /sbin/chkconfig, /sbin/service, hadoop-zookeeper >= 3.3.1, hadoop >= 0.20.2
+Requires: coreutils, /usr/sbin/useradd, hadoop-zookeeper >= 3.3.1, hadoop >= 0.20.2
+Requires: bigtop-utils
BuildRequires: ant xml-commons xml-commons-apis
+%if 0%{?mgaversion}
+Requires: bsh-utils
+%else
+Requires: sh-utils
+%endif
+
%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.
@@ -73,19 +81,26 @@ Flume is a reliable, scalable, and manag
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}
-Requires: sh-utils, textutils, /usr/sbin/useradd, /sbin/chkconfig, /sbin/service
+Requires: %{name} = %{version}-%{release}, /sbin/service
Requires(post): /sbin/chkconfig
-Requires(preun): /sbin/service, /sbin/chkconfig, %{name}
+Requires(preun): /sbin/chkconfig
%if %{?suse_version:1}0
# Required for init scripts
Requires: insserv
-%else
+%endif
+
+%if 0%{?mgaversion}
# Required for init scripts
-Requires: redhat-lsb
+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.
@@ -94,19 +109,26 @@ Flume is a reliable, scalable, and manag
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
BuildArch: noarch
-Requires: %{name} = %{version}-%{release}
-Requires: sh-utils, textutils, /usr/sbin/useradd, /sbin/chkconfig, /sbin/service
+Requires: %{name} = %{version}-%{release}, /sbin/service
Requires(post): /sbin/chkconfig
-Requires(preun): /sbin/service, /sbin/chkconfig, %{name}
+Requires(preun): /sbin/chkconfig
%if %{?suse_version:1}0
# Required for init scripts
Requires: insserv
-%else
+%endif
+
+%if 0%{?mgaversion}
# Required for init scripts
-Requires: redhat-lsb
+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 node
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.
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/hadoop/SOURCES/hadoop-init.tmpl
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/hadoop/SOURCES/hadoop-init.tmpl?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/hadoop/SOURCES/hadoop-init.tmpl (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/hadoop/SOURCES/hadoop-init.tmpl Mon Oct 31 00:30:01 2011
@@ -20,12 +20,19 @@
# chkconfig: 2345 85 15
# description: Hadoop @HADOOP_DAEMON@
-source /etc/rc.d/init.d/functions
-source /etc/default/hadoop
+. /etc/rc.d/init.d/functions
+. /etc/default/hadoop
-source @HADOOP_COMMON_ROOT@/bin/hadoop-config.sh
+# Autodetect JAVA_HOME if not defined
+if [ -e /usr/libexec/bigtop-detect-javahome ]; then
+ . /usr/libexec/bigtop-detect-javahome
+elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then
+ . /usr/lib/bigtop-utils/bigtop-detect-javahome
+fi
+
+. @HADOOP_COMMON_ROOT@/bin/hadoop-config.sh
# FIXME: this needs to be removed once hadoop-config.sh stop clobbering HADOOP_HOME
-source /etc/default/hadoop
+. /etc/default/hadoop
RETVAL_SUCCESS=0
@@ -43,15 +50,30 @@ SLEEP_TIME=5
start() {
echo -n $"Starting $desc (hadoop-@HADOOP_DAEMON@): "
- daemon @HADOOP_COMMON_ROOT@/bin/hadoop-daemon.sh --config "@HADOOP_CONF_DIR@" start @HADOOP_DAEMON@ $DAEMON_FLAGS
- RETVAL=$?
+
+ TARGET_USER_NAME="HADOOP_`echo @HADOOP_DAEMON@ | tr a-z A-Z`_USER"
+ TARGET_USER=$(eval "echo \$$TARGET_USER_NAME")
if [ "@HADOOP_DAEMON@" = "datanode" ]; then
- # Some processes are slow to start
- sleep $SLEEP_TIME
- checkstatus
- RETVAL=$?
+ # The following needs to be removed once HDFS-1943 gets finally put to rest.
+ # The logic of this ugly hack is this: IFF we do NOT have jsvc installed it is
+ # guaranteed that we can NOT be running in a secure mode and thus we need to
+ # workaround HDFS-1943 (start as non-root). As soon as jsvc gets installed
+ # we are assuming a secure installation and starting a data node as root.
+ # This leaves 2 corner cases:
+ # 1. HADOOP_DATANODE_USER being set to root
+ # 2. jsvc is installed but Hadoop is configures to run in an unsecure mode
+ # Both will currently fail
+ if [ -f $HADOOP_HOME/libexec/jsvc.amd64 -o -f $HADOOP_HOME/libexec/jsvc.i386 ] && [ -n "$HADOOP_SECURE_DN_USER" ]; then
+ TARGET_USER=root
+ fi
fi
+ su -s /bin/bash $TARGET_USER -c "@HADOOP_COMMON_ROOT@/bin/hadoop-daemon.sh --config '@HADOOP_CONF_DIR@' start @HADOOP_DAEMON@ $DAEMON_FLAGS"
+
+ # Some processes are slow to start
+ sleep $SLEEP_TIME
+ checkstatus
+ RETVAL=$?
[ $RETVAL -eq $RETVAL_SUCCESS ] && touch $LOCKFILE
return $RETVAL
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/hadoop/SOURCES/hadoop-init.tmpl.suse
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/hadoop/SOURCES/hadoop-init.tmpl.suse?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/hadoop/SOURCES/hadoop-init.tmpl.suse (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/hadoop/SOURCES/hadoop-init.tmpl.suse Mon Oct 31 00:30:01 2011
@@ -31,13 +31,20 @@
# Short-Description: Hadoop @HADOOP_DAEMON@
### END INIT INFO
-source /lib/lsb/init-functions
-source /etc/default/hadoop
+. /lib/lsb/init-functions
+. /etc/default/hadoop
-source @HADOOP_COMMON_ROOT@/bin/hadoop-config.sh
+# Autodetect JAVA_HOME if not defined
+if [ -e /usr/libexec/bigtop-detect-javahome ]; then
+ . /usr/libexec/bigtop-detect-javahome
+elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then
+ . /usr/lib/bigtop-utils/bigtop-detect-javahome
+fi
+
+. @HADOOP_COMMON_ROOT@/bin/hadoop-config.sh
# FIXME: this needs to be removed once hadoop-config.sh stop clobbering HADOOP_HOME
-source /etc/default/hadoop
+. /etc/default/hadoop
RETVAL_SUCCESS=0
@@ -45,6 +52,7 @@ STATUS_RUNNING=0
STATUS_DEAD=1
STATUS_DEAD_AND_LOCK=2
STATUS_NOT_RUNNING=3
+STATUS_OTHER_ERROR=102
ERROR_PROGRAM_NOT_INSTALLED=5
@@ -58,22 +66,36 @@ HADOOP_PID_DIR=${HADOOP_PID_DIR:-/var/ru
PIDFILE="$HADOOP_PID_DIR/hadoop-$HADOOP_IDENT_STRING-@HADOOP_DAEMON@.pid"
LOCKFILE="/var/lock/subsys/hadoop-@HADOOP_DAEMON@"
desc="Hadoop @HADOOP_DAEMON@ daemon"
-USER="@HADOOP_DAEMON_USER@"
SLEEP_TIME=5
start() {
[ -x $exec ] || exit $ERROR_PROGRAM_NOT_INSTALLED
[ -f $config ] || exit $ERROR_PROGRAM_NOT_CONFIGURED
log_success_msg "Starting $desc (hadoop-@HADOOP_DAEMON@): "
- start_daemon -u $USER $EXEC_PATH --config "$CONFIG_PATH" start @HADOOP_DAEMON@ $DAEMON_FLAGS
- RETVAL=$?
+
+ TARGET_USER_NAME="HADOOP_`echo @HADOOP_DAEMON@ | tr a-z A-Z`_USER"
+ TARGET_USER=$(eval "echo \$$TARGET_USER_NAME")
if [ "@HADOOP_DAEMON@" = "datanode" ]; then
- # Some processes are slow to start
- sleep $SLEEP_TIME
- checkstatusofproc
- RETVAL=$?
+ # The following needs to be removed once HDFS-1943 gets finally put to rest.
+ # The logic of this ugly hack is this: IFF we do NOT have jsvc installed it is
+ # guaranteed that we can NOT be running in a secure mode and thus we need to
+ # workaround HDFS-1943 (start as non-root). As soon as jsvc gets installed
+ # we are assuming a secure installation and starting a data node as root.
+ # This leaves 2 corner cases:
+ # 1. HADOOP_DATANODE_USER being set to root
+ # 2. jsvc is installed but Hadoop is configures to run in an unsecure mode
+ # Both will currently fail
+ if [ -f $HADOOP_HOME/libexec/jsvc.amd64 -o -f $HADOOP_HOME/libexec/jsvc.i386 ] && [ -n "$HADOOP_SECURE_DN_USER" ]; then
+ TARGET_USER=root
+ fi
fi
+ su -s /bin/bash $TARGET_USER -c "$EXEC_PATH --config '$CONFIG_PATH' start @HADOOP_DAEMON@ $DAEMON_FLAGS"
+
+ # Some processes are slow to start
+ sleep $SLEEP_TIME
+ checkstatusofproc
+ RETVAL=$?
[ $RETVAL -eq $RETVAL_SUCCESS ] && touch $LOCKFILE
return $RETVAL
@@ -81,7 +103,7 @@ start() {
stop() {
log_success_msg "Stopping $desc (hadoop-@HADOOP_DAEMON@): "
- start_daemon -u $USER $EXEC_PATH --config "$CONFIG_PATH" stop @HADOOP_DAEMON@
+ start_daemon $EXEC_PATH --config "$CONFIG_PATH" stop @HADOOP_DAEMON@
RETVAL=$?
[ $RETVAL -eq $RETVAL_SUCCESS ] && rm -f $LOCKFILE $PIDFILE
@@ -93,8 +115,10 @@ stop() {
RETVAL=$?
# Stopping a non running process should be a success
- if [ $RETVAL -eq $STATUS_NOT_RUNNING ]; then
+ if [ $RETVAL -ne $STATUS_RUNNING ]; then
RETVAL=0
+ else
+ RETVAL=$STATUS_OTHER_ERROR
fi
fi
}
@@ -106,7 +130,13 @@ restart() {
checkstatusofproc(){
- pidofproc -p $PIDFILE java > /dev/null
+ # Under certain conditions datanode manifests as jsvc.exec
+ if [ "@HADOOP_DAEMON@" = "datanode" -a -x @HADOOP_COMMON_ROOT@/sbin/Linux-amd64-64/jsvc ] ; then
+ PROC_NAME="jsvc"
+ else
+ PROC_NAME="su"
+ fi
+ pidofproc -p $PIDFILE $PROC_NAME > /dev/null
}
checkstatus(){
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/hadoop/SPECS/hadoop.spec
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/hadoop/SPECS/hadoop.spec?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/hadoop/SPECS/hadoop.spec (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/hadoop/SPECS/hadoop.spec Mon Oct 31 00:30:01 2011
@@ -15,6 +15,12 @@
#
# Hadoop RPM spec file
#
+
+# FIXME: we need to disable a more strict checks on native files for now,
+# since Hadoop build system makes it difficult to pass the kind of flags
+# that would make newer RPM debuginfo generation scripts happy.
+%undefine _missing_build_ids_terminate_build
+
%define hadoop_name hadoop
%define etc_hadoop /etc/%{name}
%define config_hadoop %{etc_hadoop}/conf
@@ -24,7 +30,6 @@
%define log_hadoop %{log_hadoop_dirname}/%{name}
%define bin_hadoop %{_bindir}
%define man_hadoop %{_mandir}
-%define doc_hadoop %{_docdir}/%{name}-%{hadoop_version}
%define src_hadoop /usr/src/%{name}
%define hadoop_username mapred
%define hadoop_services namenode secondarynamenode datanode jobtracker tasktracker
@@ -54,6 +59,7 @@
/usr/lib/rpm/brp-python-bytecompile ; \
%{nil}
+%define doc_hadoop %{_docdir}/%{name}-%{hadoop_version}
%define alternatives_cmd alternatives
%global initd_dir %{_sysconfdir}/rc.d/init.d
%endif
@@ -72,11 +78,13 @@
/usr/lib/rpm/brp-compress ; \
%{nil}
+%define doc_hadoop %{_docdir}/%{name}
%define alternatives_cmd update-alternatives
%global initd_dir %{_sysconfdir}/rc.d
%endif
%if 0%{?mgaversion}
+%define doc_hadoop %{_docdir}/%{name}-%{hadoop_version}
%define alternatives_cmd update-alternatives
%global initd_dir %{_sysconfdir}/rc.d/init.d
%endif
@@ -107,14 +115,14 @@ Source5: hadoop-init.tmpl.suse
Source6: hadoop.1
Source7: hadoop-fuse-dfs.1
Source8: hadoop-fuse.default
-# Patch0: patch
+Source9: hadoop.nofiles.conf
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: python >= 2.4, git, fuse-devel,fuse, automake, autoconf
-Requires: textutils, /usr/sbin/useradd, /usr/sbin/usermod, /sbin/chkconfig, /sbin/service
+Requires: coreutils, /usr/sbin/useradd, /usr/sbin/usermod, /sbin/chkconfig, /sbin/service, bigtop-utils
Provides: hadoop
%if %{?suse_version:1}0
-BuildRequires: libfuse2, libopenssl-devel, gcc-c++, ant, ant-nodeps, ant-trax, liblzo-devel
+BuildRequires: libfuse2, libopenssl-devel, gcc-c++, ant, ant-nodeps, ant-trax
# Required for init scripts
Requires: sh-utils, insserv
%endif
@@ -122,14 +130,14 @@ Requires: sh-utils, insserv
# 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
-BuildRequires: fuse-libs, libtool, redhat-rpm-config, lzo-devel
+BuildRequires: fuse-libs, libtool, redhat-rpm-config, lzo-devel, openssl-devel
# Required for init scripts
Requires: sh-utils, redhat-lsb
%endif
%if 0%{?mgaversion}
-BuildRequires: libfuse-devel, libfuse2 , libopenssl-devel, gcc-c++, ant, libtool, automake, autoconf, liblzo-devel, libzlib-devel
-Requires: chkconfig, xinetd-simple-services, libzlib
+BuildRequires: libfuse-devel, libfuse2 , libopenssl-devel, gcc-c++, ant, libtool, automake, autoconf, liblzo-devel, zlib-devel
+Requires: chkconfig, xinetd-simple-services, zlib, initscripts
%endif
@@ -301,7 +309,7 @@ before continuing operation.
# This assumes that you installed Java JDK 5 and set JAVA5_HOME
# This assumes that you installed Forrest and set FORREST_HOME
-env HADOOP_VERSION=%{hadoop_version} bash %{SOURCE1}
+env HADOOP_VERSION=%{hadoop_version} HADOOP_ARCH=%{hadoop_arch} bash %{SOURCE1}
%clean
%__rm -rf $RPM_BUILD_ROOT
@@ -365,6 +373,8 @@ done
%__cp $RPM_SOURCE_DIR/hadoop.default $RPM_BUILD_ROOT/etc/default/hadoop
%__cp $RPM_SOURCE_DIR/hadoop-fuse.default $RPM_BUILD_ROOT/etc/default/hadoop-fuse
+%__install -d -m 0755 $RPM_BUILD_ROOT/etc/security/limits.d
+%__install -m 0644 %{SOURCE9} $RPM_BUILD_ROOT/etc/security/limits.d/hadoop.nofiles.conf
# /var/lib/hadoop/cache
%__install -d -m 1777 $RPM_BUILD_ROOT/var/lib/%{name}/cache
@@ -409,6 +419,7 @@ fi
%defattr(-,root,root)
%config(noreplace) %{etc_hadoop}/conf.empty
%config(noreplace) /etc/default/hadoop
+%config(noreplace) /etc/security/limits.d/hadoop.nofiles.conf
%{lib_hadoop}
%{bin_hadoop}/%{name}
%{man_hadoop}/man1/hadoop.1.*z
@@ -416,6 +427,11 @@ fi
%attr(0775,root,hadoop) %{log_hadoop}
%exclude %{lib_hadoop}/lib/native
+%exclude %{lib_hadoop}/sbin/%{hadoop_arch}
+%exclude %{lib_hadoop}/bin/fuse_dfs
+# FIXME: The following is a workaround for BIGTOP-139
+%exclude %{lib_hadoop}/bin/task-controller
+%exclude %{lib_hadoop}/libexec/jsvc*
%files doc
%defattr(-,root,root)
@@ -432,7 +448,6 @@ fi
%files %1 \
%defattr(-,root,root) \
%{initd_dir}/%{name}-%1 \
-%{lib_hadoop}/bin/hadoop-daemon.sh \
%post %1 \
chkconfig --add %{name}-%1 \
%2 \
@@ -480,8 +495,11 @@ fi
%files fuse
%defattr(-,root,root)
+%config(noreplace) /etc/default/hadoop-fuse
+%attr(0755,root,root) %{lib_hadoop}/bin/fuse_dfs
+%attr(0755,root,root) %{lib_hadoop}/bin/fuse_dfs_wrapper.sh
%attr(0755,root,root) %{bin_hadoop}/hadoop-fuse-dfs
-%attr(0755,root,root) %{man_hadoop}/man1/hadoop-fuse-dfs.1.gz
+%attr(0644,root,root) %{man_hadoop}/man1/hadoop-fuse-dfs.1.*
%config(noreplace) /etc/default/hadoop-fuse
%files pipes
@@ -501,5 +519,9 @@ fi
%defattr(-,root,root)
%dir %{lib_hadoop}/sbin
%dir %{lib_hadoop}/sbin/%{hadoop_arch}
-# %attr(4754,root,mapred) %{lib_hadoop}/sbin/%{hadoop_arch}/task-controller
+# %attr(4750,root,mapred) %{lib_hadoop}/sbin/%{hadoop_arch}/task-controller
%attr(0755,root,root) %{lib_hadoop}/sbin/%{hadoop_arch}/jsvc
+
+# FIXME: The following is a workaround for BIGTOP-139
+# %attr(4750,root,mapred) %{lib_hadoop}/bin/task-controller
+%attr(0755,root,root) %{lib_hadoop}/bin/jsvc*
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/hbase/SOURCES/hadoop-hbase.sh
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/hbase/SOURCES/hadoop-hbase.sh?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/hbase/SOURCES/hadoop-hbase.sh (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/hbase/SOURCES/hadoop-hbase.sh Mon Oct 31 00:30:01 2011
@@ -31,8 +31,15 @@
### END INIT INFO
set -e
-source /etc/default/hadoop
-source /etc/default/hbase
+. /etc/default/hadoop
+. /etc/default/hbase
+
+# Autodetect JAVA_HOME if not defined
+if [ -e /usr/libexec/bigtop-detect-javahome ]; then
+ . /usr/libexec/bigtop-detect-javahome
+elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then
+ . /usr/lib/bigtop-utils/bigtop-detect-javahome
+fi
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON_SCRIPT="/usr/lib/hbase/bin/hbase-daemon.sh"
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/hbase/SOURCES/hadoop-hbase.sh.suse
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/hbase/SOURCES/hadoop-hbase.sh.suse?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/hbase/SOURCES/hadoop-hbase.sh.suse (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/hbase/SOURCES/hadoop-hbase.sh.suse Mon Oct 31 00:30:01 2011
@@ -32,10 +32,16 @@
# Short-Description: HBase @HBASE_DAEMON@
### END INIT INFO
-source /lib/lsb/init-functions
-source /etc/default/hadoop
-source /etc/default/hbase
-
+. /lib/lsb/init-functions
+. /etc/default/hadoop
+. /etc/default/hbase
+
+# Autodetect JAVA_HOME if not defined
+if [ -e /usr/libexec/bigtop-detect-javahome ]; then
+ . /usr/libexec/bigtop-detect-javahome
+elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then
+ . /usr/lib/bigtop-utils/bigtop-detect-javahome
+fi
STATUS_RUNNING=0
STATUS_DEAD=1
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/hbase/SPECS/hbase.spec
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/hbase/SPECS/hbase.spec?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/hbase/SPECS/hbase.spec (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/hbase/SPECS/hbase.spec Mon Oct 31 00:30:01 2011
@@ -20,7 +20,6 @@
%define logs_hbase %{hbase_home}/logs
%define pids_hbase %{hbase_home}/pids
%define webapps_hbase %{hbase_home}/hbase-webapps
-%define doc_hbase %{_docdir}/hbase-%{hbase_version}
%define man_dir %{_mandir}
%define hbase_username hbase
%define hbase_services master regionserver thrift
@@ -42,11 +41,12 @@
/usr/lib/rpm/brp-compress ; \
%{nil}
-
+%define doc_hbase %{_docdir}/hbase
%global initd_dir %{_sysconfdir}/rc.d
%else
+%define doc_hbase %{_docdir}/hbase-%{hbase_version}
%global initd_dir %{_sysconfdir}/rc.d/init.d
%endif
@@ -66,8 +66,17 @@ Source2: install_hbase.sh
Source3: hadoop-hbase.sh
Source4: hadoop-hbase.sh.suse
Source5: hbase.default
+Source6: hbase.nofiles.conf
BuildArch: noarch
-Requires: sh-utils, textutils, /usr/sbin/useradd, /sbin/chkconfig, /sbin/service, hadoop-zookeeper, hadoop >= 0.20.2, hadoop-zookeeper >= 3.3.1
+Requires: coreutils, /usr/sbin/useradd, /sbin/chkconfig, /sbin/service
+Requires: hadoop >= 0.20.2, hadoop-zookeeper >= 3.3.1, bigtop-utils
+
+%if 0%{?mgaversion}
+Requires: bsh-utils
+%else
+Requires: sh-utils
+%endif
+
%description
HBase is an open-source, distributed, column-oriented store modeled after Google' Bigtable: A Distributed Storage System for Structured Data by Chang et al. Just as Bigtable leverages the distributed data storage provided by the Google File System, HBase provides Bigtable-like capabilities on top of Hadoop. HBase includes:
@@ -90,11 +99,19 @@ Requires: %{name} = %{version}-%{release
%if %{?suse_version:1}0
# Required for init scripts
Requires: insserv
-%else
+%endif
+
+%if 0%{?mgaversion}
# Required for init scripts
-Requires: redhat-lsb
+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
HMaster is the "master server" for a HBase. There is only one HMaster for a single HBase deployment.
@@ -108,7 +125,16 @@ Requires: %{name} = %{version}-%{release
%if %{?suse_version:1}0
# Required for init scripts
Requires: insserv
-%else
+%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
@@ -126,7 +152,16 @@ Requires: %{name} = %{version}-%{release
%if %{?suse_version:1}0
# Required for init scripts
Requires: insserv
-%else
+%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
@@ -147,7 +182,7 @@ Documentation for Hbase
%prep
-%setup -n apache-hbase-8146460
+%setup -n apache-hbase-a07486c
%build
env HBASE_VERSION=%{version} bash %{SOURCE1}
@@ -164,6 +199,9 @@ sh %{SOURCE2} \
%__install -d -m 0755 $RPM_BUILD_ROOT/etc/default/
%__install -m 0644 $RPM_SOURCE_DIR/hbase.default $RPM_BUILD_ROOT/etc/default/hbase
+%__install -d -m 0755 $RPM_BUILD_ROOT/etc/security/limits.d
+%__install -m 0644 %{SOURCE6} $RPM_BUILD_ROOT/etc/security/limits.d/hbase.nofiles.conf
+
%__install -d -m 0755 %{buildroot}/%{_localstatedir}/log/hbase
ln -s %{_localstatedir}/log/hbase %{buildroot}/%{logs_hbase}
@@ -208,6 +246,7 @@ getent passwd hbase 2>&1 > /dev/null ||
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/default/hbase
+%config(noreplace) /etc/security/limits.d/hbase.nofiles.conf
%{hbase_home}
%{hbase_home}/hbase-*.jar
%{webapps_hbase}
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/hive/SOURCES/install_hive.sh
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/hive/SOURCES/install_hive.sh?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/hive/SOURCES/install_hive.sh (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/hive/SOURCES/install_hive.sh Mon Oct 31 00:30:01 2011
@@ -120,7 +120,15 @@ do
cat >>$wrapper <<EOF
#!/bin/sh
-export HADOOP_HOME=\${HADOOP_HOME:-/usr/lib/hadoop}
+. /etc/default/hadoop
+
+# Autodetect JAVA_HOME if not defined
+if [ -e /usr/libexec/bigtop-detect-javahome ]; then
+ . /usr/libexec/bigtop-detect-javahome
+elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then
+ . /usr/lib/bigtop-utils/bigtop-detect-javahome
+fi
+
export HIVE_HOME=$INSTALLED_LIB_DIR
exec $INSTALLED_LIB_DIR/bin/$file "\$@"
EOF
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/hive/SPECS/hive.spec
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/hive/SPECS/hive.spec?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/hive/SPECS/hive.spec (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/hive/SPECS/hive.spec Mon Oct 31 00:30:01 2011
@@ -19,7 +19,6 @@
%define var_lib_hive /var/lib/hive
%define bin_hive /usr/bin
%define hive_config_virtual hive_active_configuration
-%define doc_hive %{_docdir}/hive-%{hive_version}
%define man_dir %{_mandir}
%define hive_services server metastore
# After we run "ant package" we'll find the distribution here
@@ -27,6 +26,7 @@
%if %{!?suse_version:1}0
+%define doc_hive %{_docdir}/hive-%{hive_version}
%define alternatives_cmd alternatives
%global initd_dir %{_sysconfdir}/rc.d/init.d
@@ -38,6 +38,7 @@
%define suse_check \# Define an empty suse_check for compatibility with older sles
%endif
+%define doc_hive %{_docdir}/hive
%define alternatives_cmd update-alternatives
%global initd_dir %{_sysconfdir}/rc.d
@@ -69,7 +70,7 @@ Source5: hadoop-hive-server.default
Source6: hadoop-hive-metastore.default
Source7: hive.1
Source8: hive-site.xml
-Requires: hadoop >= 0.20.1
+Requires: hadoop >= 0.20.2, bigtop-utils
Obsoletes: %{name}-webinterface
%description
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/mahout/SPECS/mahout.spec
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/mahout/SPECS/mahout.spec?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/mahout/SPECS/mahout.spec (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/mahout/SPECS/mahout.spec Mon Oct 31 00:30:01 2011
@@ -20,11 +20,12 @@
%define log_mahout /var/log/%{mahout_name}
%define bin_mahout /usr/bin
%define man_dir /usr/share/man
-%define doc_mahout %{_docdir}/mahout-%{mahout_version}
%if %{?suse_version:1}0
+%define doc_mahout %{_docdir}/mahout
%define alternatives_cmd update-alternatives
%else
+%define doc_mahout %{_docdir}/mahout-%{mahout_version}
%define alternatives_cmd alternatives
%endif
@@ -44,7 +45,7 @@ Source0: %{name}-distribution-%{mahout_b
Source1: do-component-build
Source2: install_%{name}.sh
Patch0: patch
-Requires: hadoop >= 0.20.2, /sbin/chkconfig
+Requires: hadoop >= 0.20.2, bigtop-utils
%description
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/oozie/SPECS/oozie.spec
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/oozie/SPECS/oozie.spec?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/oozie/SPECS/oozie.spec (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/oozie/SPECS/oozie.spec Mon Oct 31 00:30:01 2011
@@ -19,8 +19,10 @@
%define data_oozie /var/lib/oozie
%if %{!?suse_version:1}0
+ %define doc_oozie %{_docdir}/oozie-%{oozie_version}
%define initd_dir %{_sysconfdir}/rc.d/init.d
%else
+ %define doc_oozie %{_docdir}/oozie
%define initd_dir %{_sysconfdir}/rc.d
%endif
@@ -28,7 +30,7 @@ Name: oozie
Version: %{oozie_version}
Release: %{oozie_release}
Summary: Oozie is a system that runs workflows of Hadoop jobs.
-URL: http://www.cloudera.com
+URL: http://incubator.apache.org/oozie/
Group: Development/Libraries
Buildroot: %{_topdir}/INSTALL/%{name}-%{version}
License: APL2
@@ -37,9 +39,9 @@ Source1: do-component-build
Source2: create-package-layout
Patch0: patch
Requires(pre): /usr/sbin/groupadd, /usr/sbin/useradd
-Requires(post): /sbin/chkconfig
+Requires(post): /sbin/chkconfig, hadoop
Requires(preun): /sbin/chkconfig, /sbin/service
-Requires: oozie-client = %{version}
+Requires: zip, unzip, oozie-client = %{version}
BuildArch: noarch
%description
@@ -85,10 +87,12 @@ BuildArch: noarch
Version: %{version}
Release: %{release}
Summary: Client for Oozie Workflow Engine
-URL: http://www.cloudera.com
+URL: http://incubator.apache.org/oozie/
Group: Development/Libraries
License: APL2
BuildArch: noarch
+Requires: bigtop-utils
+
%description client
Oozie client is a command line client utility that allows remote
@@ -113,7 +117,7 @@ BuildArch: noarch
%install
%__rm -rf $RPM_BUILD_ROOT
- sh %{SOURCE2} --extra-dir=$RPM_SOURCE_DIR --build-dir=. --server-dir=$RPM_BUILD_ROOT --client-dir=$RPM_BUILD_ROOT --docs-dir=$RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} --initd-dir=$RPM_BUILD_ROOT%{initd_dir}
+ sh %{SOURCE2} --extra-dir=$RPM_SOURCE_DIR --build-dir=. --server-dir=$RPM_BUILD_ROOT --client-dir=$RPM_BUILD_ROOT --docs-dir=$RPM_BUILD_ROOT%{doc_oozie} --initd-dir=$RPM_BUILD_ROOT%{initd_dir}
%__install -d -m 0755 $RPM_BUILD_ROOT/usr/bin
@@ -125,6 +129,7 @@ getent group oozie >/dev/null || /usr/sb
getent passwd oozie >/dev/null || /usr/sbin/useradd --comment "Oozie User" --shell /bin/false -M -r -g oozie --home /var/run/oozie oozie >/dev/null
%post
+%{lib_oozie}/bin/oozie-setup.sh -hadoop 0.20.200 /usr/lib/hadoop
/sbin/chkconfig --add oozie
%preun
@@ -147,6 +152,7 @@ fi
%{lib_oozie}/bin/oozie-stop.sh
%{lib_oozie}/bin/oozie-sys.sh
%{lib_oozie}/bin/oozie-env.sh
+%{lib_oozie}/bin/oozied.sh
%{lib_oozie}/oozie.war
%{lib_oozie}/oozie-sharelib.tar.gz
%{lib_oozie}/oozie-server
@@ -164,7 +170,5 @@ fi
%{lib_oozie}/bin/oozie
%{lib_oozie}/bin/oozie-examples.sh
%{lib_oozie}/lib
-%{_docdir}
-%docdir %{_docdir}
+%doc %{doc_oozie}
%{man_dir}/man1/oozie.1.*
-
Modified: incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/pig/SPECS/pig.spec
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/pig/SPECS/pig.spec?rev=1195290&r1=1195289&r2=1195290&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/pig/SPECS/pig.spec (original)
+++ incubator/bigtop/branches/hadoop-0.22/bigtop-packages/src/rpm/pig/SPECS/pig.spec Mon Oct 31 00:30:01 2011
@@ -19,7 +19,6 @@
%define log_pig /var/log/%{pig_name}
%define bin_pig /usr/bin
%define pig_config_virtual pig_active_configuration
-%define doc_pig %{_docdir}/pig-%{pig_version}
%define man_dir %{_mandir}
# CentOS 5 does not have any dist macro
@@ -38,6 +37,7 @@
/usr/lib/rpm/brp-python-bytecompile ; \
%{nil}
+%define doc_pig %{_docdir}/pig-%{pig_version}
%define alternatives_cmd alternatives
%endif
@@ -50,6 +50,7 @@
%define suse_check \# Define an empty suse_check for compatibility with older sles
%endif
+%define doc_pig %{_docdir}/pig
%define alternatives_cmd update-alternatives
%define __os_install_post \
%{suse_check} ; \
@@ -60,6 +61,7 @@
%if 0%{?mgaversion}
+%define doc_pig %{_docdir}/pig-%{pig_version}
%define alternatives_cmd update-alternatives
%endif
@@ -72,7 +74,6 @@ License: Apache License v2.0
URL: http://hadoop.apache.org/pig/
Group: Development/Libraries
Buildroot: %{_topdir}/INSTALL/%{name}-%{version}
-BuildRequires: /usr/bin/git
BuildArch: noarch
Source0: pig-%{pig_base_version}.tar.gz
Source1: do-component-build
@@ -81,7 +82,7 @@ Source3: log4j.properties
Source4: pig.1
Source5: pig.properties
Patch0: patch
-Requires: hadoop
+Requires: hadoop, bigtop-utils
%description
Pig is a platform for analyzing large data sets that consists of a high-level language
@@ -124,7 +125,7 @@ cp $RPM_SOURCE_DIR/log4j.properties .
cp $RPM_SOURCE_DIR/pig.1 .
cp $RPM_SOURCE_DIR/pig.properties .
sh -x %{SOURCE2} \
- --build-dir=. \
+ --build-dir=build/pig-%{pig_base_version} \
--doc-dir=$RPM_BUILD_ROOT%{doc_pig} \
--prefix=$RPM_BUILD_ROOT