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 2012/01/31 02:45:21 UTC

svn commit: r1238128 - in /incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src: common/bigtop-utils/bigtop-detect-javahome common/bigtop-utils/bigtop-utils.default deb/bigtop-utils/rules rpm/bigtop-utils/SPECS/bigtop-utils.spec

Author: rvs
Date: Tue Jan 31 01:45:21 2012
New Revision: 1238128

URL: http://svn.apache.org/viewvc?rev=1238128&view=rev
Log:
BIGTOP-373. Support override of JAVA_HOME through /etc/default/bigtop-utils

Added:
    incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/bigtop-utils/bigtop-utils.default
Modified:
    incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/bigtop-utils/bigtop-detect-javahome
    incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-utils/rules
    incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-utils/SPECS/bigtop-utils.spec

Modified: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/bigtop-utils/bigtop-detect-javahome
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/bigtop-utils/bigtop-detect-javahome?rev=1238128&r1=1238127&r2=1238128&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/bigtop-utils/bigtop-detect-javahome (original)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/bigtop-utils/bigtop-detect-javahome Tue Jan 31 01:45:21 2012
@@ -15,10 +15,9 @@
 # limitations under the License.
 
 
-# Uncomment and set the following variable in order for the 
-# guesswork step to be skipped
-#
-# JAVA_HOME=/usr/java/latest
+# Override JAVA_HOME in the file below if you want to disable
+# automatic JAVA_HOME detection
+[ -r /etc/default/bigtop-utils ] && . /etc/default/bigtop-utils
 
 # attempt to find java
 if [ -z "$JAVA_HOME" ]; then

Added: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/bigtop-utils/bigtop-utils.default
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/bigtop-utils/bigtop-utils.default?rev=1238128&view=auto
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/bigtop-utils/bigtop-utils.default (added)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/bigtop-utils/bigtop-utils.default Tue Jan 31 01:45:21 2012
@@ -0,0 +1,17 @@
+# 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.
+
+# Override JAVA_HOME detection for all bigtop packages
+# export JAVA_HOME

Modified: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-utils/rules
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-utils/rules?rev=1238128&r1=1238127&r2=1238128&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-utils/rules (original)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-utils/rules Tue Jan 31 01:45:21 2012
@@ -51,6 +51,8 @@ install-indep:	
 	# 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/
+	install -d -p -m 755 debian/bigtop-utils/etc/default
+	install -p -m 644 debian/bigtop-utils.default debian/bigtop-utils/etc/default/bigtop-utils
 	dh_install
 
 

Modified: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-utils/SPECS/bigtop-utils.spec
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-utils/SPECS/bigtop-utils.spec?rev=1238128&r1=1238127&r2=1238128&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-utils/SPECS/bigtop-utils.spec (original)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-utils/SPECS/bigtop-utils.spec Tue Jan 31 01:45:21 2012
@@ -23,6 +23,7 @@ License:	APL2
 URL:		http://incubator.apache.org/bigtop/
 Source0:	bigtop-detect-javahome
 Source1:	LICENSE
+Source2:    bigtop-utils.default
 
 BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 
@@ -36,13 +37,16 @@ This includes a collection of useful too
 %setup -q -T -c
 install -p -m 644 %{SOURCE0} .
 install -p -m 644 %{SOURCE1} .
+install -p -m 644 %{SOURCE2} .
 
 %build
 
 
 %install
 install -d -p -m 755 $RPM_BUILD_ROOT%{_libexecdir}/
+install -d -p -m 755 $RPM_BUILD_ROOT/etc/default
 install -p -m 755 %{SOURCE0} $RPM_BUILD_ROOT%{_libexecdir}/
+install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT/etc/default/bigtop-utils
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -51,6 +55,7 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(-,root,root,-)
 %doc LICENSE
+%config(noreplace) /etc/default/bigtop-utils
 
 %{_libexecdir}/bigtop-detect-javahome