You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by iw...@apache.org on 2021/07/10 13:06:04 UTC

[bigtop] branch master updated: BIGTOP-3568: Fix Ambari-2.7.5 RPM installation issues (#796)

This is an automated email from the ASF dual-hosted git repository.

iwasakims pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bigtop.git


The following commit(s) were added to refs/heads/master by this push:
     new 8c353ad  BIGTOP-3568: Fix Ambari-2.7.5 RPM installation issues (#796)
8c353ad is described below

commit 8c353ad84cc38202161de36c38a79904240ab447
Author: Yuqi Gu <yu...@arm.com>
AuthorDate: Sat Jul 10 21:05:56 2021 +0800

    BIGTOP-3568: Fix Ambari-2.7.5 RPM installation issues (#796)
    
    Signed-off-by: Yuqi Gu <yu...@arm.com>
---
 bigtop-packages/src/rpm/ambari/SPECS/ambari.spec | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/bigtop-packages/src/rpm/ambari/SPECS/ambari.spec b/bigtop-packages/src/rpm/ambari/SPECS/ambari.spec
index 57e0925..c840fa4 100644
--- a/bigtop-packages/src/rpm/ambari/SPECS/ambari.spec
+++ b/bigtop-packages/src/rpm/ambari/SPECS/ambari.spec
@@ -226,10 +226,11 @@ exit 0
 # See the License for the specific language governing permissions and
 # limitations under the License
 
-
-RESOURCE_MANAGEMENT_DIR="/usr/lib/python2.6/site-packages/resource_management"
+PYPATH=`find /usr/lib -maxdepth 1 -name 'python*' | sort`
+PYLIB_DIR=`echo ${PYPATH} | awk '{print $1}'`
+RESOURCE_MANAGEMENT_DIR= "${PYLIB_DIR}/site-packages/resource_management"
 RESOURCE_MANAGEMENT_DIR_SERVER="/usr/lib/ambari-server/lib/resource_management"
-JINJA_DIR="/usr/lib/python2.6/site-packages/ambari_jinja2"
+JINJA_DIR="${PYLIB_DIR}/site-packages/ambari_jinja2"
 JINJA_SERVER_DIR="/usr/lib/ambari-server/lib/ambari_jinja2"
 AMBARI_SERVER_EXECUTABLE_LINK="/usr/sbin/ambari-server"
 AMBARI_SERVER_EXECUTABLE="/etc/init.d/ambari-server"
@@ -247,12 +248,12 @@ if [ -d "$RESOURCE_MANAGEMENT_DIR" ]; then  # resource_management dir exists
 fi
 # setting resource_management shared resource
 if [ ! -d "$RESOURCE_MANAGEMENT_DIR" ]; then
-  ln -s "$RESOURCE_MANAGEMENT_DIR_SERVER" "$RESOURCE_MANAGEMENT_DIR"
+  ln -s ${RESOURCE_MANAGEMENT_DIR_SERVER} ${RESOURCE_MANAGEMENT_DIR}
 fi
 
 # setting jinja2 shared resource
 if [ ! -d "$JINJA_DIR" ]; then
-  ln -s "$JINJA_SERVER_DIR" "$JINJA_DIR"
+  ln -s ${JINJA_SERVER_DIR} ${JINJA_DIR}
 fi
 
 exit 0
@@ -417,10 +418,11 @@ exit 0
 # See the License for the specific language governing permissions and
 # limitations under the License
 
-
-RESOURCE_MANAGEMENT_DIR="/usr/lib/python2.6/site-packages/resource_management"
+PYPATH=`find /usr/lib -maxdepth 1 -name 'python*' | sort`
+PYLIB_DIR=`echo $PYPATH | awk '{print $1}'`
+RESOURCE_MANAGEMENT_DIR="$PYLIB_DIR/site-packages/resource_management"
 RESOURCE_MANAGEMENT_DIR_AGENT="/usr/lib/ambari-agent/lib/resource_management"
-JINJA_DIR="/usr/lib/python2.6/site-packages/ambari_jinja2"
+JINJA_DIR="$PYLIB_DIR/site-packages/ambari_jinja2"
 JINJA_AGENT_DIR="/usr/lib/ambari-agent/lib/ambari_jinja2"
 
 # remove RESOURCE_MANAGEMENT_DIR if it's a directory