Author: jamespage
Date: Mon Jan 30 14:42:12 2012
New Revision: 1237686
URL: http://svn.apache.org/viewvc?rev=1237686&view=rev
Log:
BIGTOP-373. Support override of JAVA_HOME through /etc/default/bigtop-utils
Added:
incubator/bigtop/trunk/bigtop-packages/src/common/bigtop-utils/bigtop-utils.default
Modified:
incubator/bigtop/trunk/bigtop-packages/src/common/bigtop-utils/bigtop-detect-javahome
incubator/bigtop/trunk/bigtop-packages/src/deb/bigtop-utils/rules
incubator/bigtop/trunk/bigtop-packages/src/rpm/bigtop-utils/SPECS/bigtop-utils.spec
Modified:
incubator/bigtop/trunk/bigtop-packages/src/common/bigtop-utils/bigtop-detect-javahome
URL:
http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/common/bigtop-utils/bigtop-detect-javahome?rev=1237686&r1=1237685&r2=1237686&view=diff
==============================================================================
---
incubator/bigtop/trunk/bigtop-packages/src/common/bigtop-utils/bigtop-detect-javahome
(original)
+++
incubator/bigtop/trunk/bigtop-packages/src/common/bigtop-utils/bigtop-detect-javahome
Mon Jan 30 14:42:12 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/trunk/bigtop-packages/src/common/bigtop-utils/bigtop-utils.default
URL:
http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/common/bigtop-utils/bigtop-utils.default?rev=1237686&view=auto
==============================================================================
---
incubator/bigtop/trunk/bigtop-packages/src/common/bigtop-utils/bigtop-utils.default
(added)
+++
incubator/bigtop/trunk/bigtop-packages/src/common/bigtop-utils/bigtop-utils.default
Mon Jan 30 14:42:12 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/trunk/bigtop-packages/src/deb/bigtop-utils/rules
URL:
http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/deb/bigtop-utils/rules?rev=1237686&r1=1237685&r2=1237686&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/deb/bigtop-utils/rules (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/deb/bigtop-utils/rules Mon Jan
30 14:42:12 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/trunk/bigtop-packages/src/rpm/bigtop-utils/SPECS/bigtop-utils.spec
URL:
http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/rpm/bigtop-utils/SPECS/bigtop-utils.spec?rev=1237686&r1=1237685&r2=1237686&view=diff
==============================================================================
---
incubator/bigtop/trunk/bigtop-packages/src/rpm/bigtop-utils/SPECS/bigtop-utils.spec
(original)
+++
incubator/bigtop/trunk/bigtop-packages/src/rpm/bigtop-utils/SPECS/bigtop-utils.spec
Mon Jan 30 14:42:12 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