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

guyuqi 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 0284fcc5 BIGTOP-3950: fix ranger etc conf dir (#1120)
0284fcc5 is described below

commit 0284fcc57b990bfa122be3bb99a00a240f863aae
Author: jialiang <[email protected]>
AuthorDate: Mon Jun 26 18:05:12 2023 +0800

    BIGTOP-3950: fix ranger etc conf dir (#1120)
---
 .../src/common/ranger/install_ranger.sh            | 14 ++++-----
 bigtop-packages/src/rpm/ranger/SPECS/ranger.spec   | 34 +++++++++++-----------
 2 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/bigtop-packages/src/common/ranger/install_ranger.sh 
b/bigtop-packages/src/common/ranger/install_ranger.sh
index 23530fd3..d79c3ecf 100644
--- a/bigtop-packages/src/common/ranger/install_ranger.sh
+++ b/bigtop-packages/src/common/ranger/install_ranger.sh
@@ -109,16 +109,16 @@ cp -r ${BUILD_DIR}/ranger-*-${COMPONENT}/* 
${PREFIX}/${COMP_DIR}/
 
 # Config
 if [[ "${COMPONENT}" =~ ^(admin|usersync|tagsync|kms)$ ]]; then
-  install -d -m 0755 ${PREFIX}/${NP_ETC_RANGER}-${COMPONENT}
-  install -d -m 0755 ${PREFIX}/${ETC_RANGER}-${COMPONENT}/conf.dist
+  install -d -m 0755 ${PREFIX}/${NP_ETC_RANGER}/${COMPONENT}
+  install -d -m 0755 ${PREFIX}/${ETC_RANGER}/${COMPONENT}/conf.dist
 
   if [[ "${COMPONENT}" = "admin" || "${COMPONENT}" = "kms" ]]; then
-    cp -a ${PREFIX}/${COMP_DIR}/ews/webapp/WEB-INF/classes/conf.dist/* 
${PREFIX}/${ETC_RANGER}-${COMPONENT}/conf.dist
-    ln -s ${NP_ETC_RANGER}-${COMPONENT}/conf ${PREFIX}/${COMP_DIR}/conf
-    ln -s ${NP_ETC_RANGER}-${COMPONENT}/conf 
${PREFIX}/$COMP_DIR/ews/webapp/WEB-INF/classes/conf
+    cp -a ${PREFIX}/${COMP_DIR}/ews/webapp/WEB-INF/classes/conf.dist/* 
${PREFIX}/${ETC_RANGER}/${COMPONENT}/conf.dist
+    ln -s ${NP_ETC_RANGER}/${COMPONENT}/conf ${PREFIX}/${COMP_DIR}/conf
+    ln -s ${NP_ETC_RANGER}/${COMPONENT}/conf 
${PREFIX}/$COMP_DIR/ews/webapp/WEB-INF/classes/conf
   else
-    cp -a ${PREFIX}/${COMP_DIR}/conf.dist/* 
${PREFIX}/${ETC_RANGER}-${COMPONENT}/conf.dist
-    ln -s ${NP_ETC_RANGER}-${COMPONENT}/conf ${PREFIX}/${COMP_DIR}/conf
+    cp -a ${PREFIX}/${COMP_DIR}/conf.dist/* 
${PREFIX}/${ETC_RANGER}/${COMPONENT}/conf.dist
+    ln -s ${NP_ETC_RANGER}/${COMPONENT}/conf ${PREFIX}/${COMP_DIR}/conf
   fi
 else
   RANGER_COMPONENT=${COMPONENT}
diff --git a/bigtop-packages/src/rpm/ranger/SPECS/ranger.spec 
b/bigtop-packages/src/rpm/ranger/SPECS/ranger.spec
index 988d3af2..794d9867 100644
--- a/bigtop-packages/src/rpm/ranger/SPECS/ranger.spec
+++ b/bigtop-packages/src/rpm/ranger/SPECS/ranger.spec
@@ -440,11 +440,11 @@ getent group ranger >/dev/null || groupadd -r ranger
 getent passwd ranger >/dev/null || useradd -c "Ranger" -s /bin/bash -g ranger 
-m -d %{var_lib_ranger} ranger 2> /dev/null || :
 
 %post admin
-%{alternatives_cmd} --install %{np_etc_ranger}-admin/conf ranger-admin-conf 
%{etc_ranger}-admin/conf.dist 30
+%{alternatives_cmd} --install %{np_etc_ranger}/admin/conf ranger-admin-conf 
%{etc_ranger}/admin/conf.dist 30
 
 %preun admin
 if [ "$1" = 0 ]; then
-        %{alternatives_cmd} --remove ranger-admin-conf 
%{etc_ranger}-admin/conf.dist || :
+        %{alternatives_cmd} --remove ranger-admin-conf 
%{etc_ranger}/admin/conf.dist || :
 fi
 
 %pre usersync
@@ -452,14 +452,14 @@ getent group ranger >/dev/null || groupadd -r ranger
 getent passwd ranger >/dev/null || useradd -c "Ranger" -s /bin/bash -g ranger 
-m -d %{var_lib_ranger}} ranger 2> /dev/null || :
 
 %post usersync
-%{alternatives_cmd} --install %{np_etc_ranger}-usersync/conf 
ranger-usersync-conf %{etc_ranger}-usersync/conf.dist 30
+%{alternatives_cmd} --install %{np_etc_ranger}/usersync/conf 
ranger-usersync-conf %{etc_ranger}/usersync/conf.dist 30
 if [ -f %{usr_lib_ranger}-usersync/native/credValidator.uexe ]; then
     chmod u+s %{usr_lib_ranger}-usersync/native/credValidator.uexe
 fi
 
 %preun usersync
 if [ "$1" = 0 ]; then
-        %{alternatives_cmd} --remove ranger-usersync-conf 
%{etc_ranger}-usersync/conf.dist || :
+        %{alternatives_cmd} --remove ranger-usersync-conf 
%{etc_ranger}/usersync/conf.dist || :
 fi
 
 %pre kms
@@ -467,11 +467,11 @@ getent group ranger >/dev/null || groupadd -r ranger
 getent passwd ranger >/dev/null || useradd -c "Ranger" -s /bin/bash -g ranger 
-m -d %{var_lib_ranger} ranger 2> /dev/null || :
 
 %post kms
-%{alternatives_cmd} --install %{np_etc_ranger}-kms/conf ranger-kms-conf 
%{etc_ranger}-kms/conf.dist 30
+%{alternatives_cmd} --install %{np_etc_ranger}/kms/conf ranger-kms-conf 
%{etc_ranger}/kms/conf.dist 30
 
 %preun kms
 if [ "$1" = 0 ]; then
-        %{alternatives_cmd} --remove ranger-kms-conf 
%{etc_ranger}-kms/conf.dist || :
+        %{alternatives_cmd} --remove ranger-kms-conf 
%{etc_ranger}/kms/conf.dist || :
 fi
 
 %pre tagsync
@@ -479,12 +479,12 @@ getent group ranger >/dev/null || groupadd -r ranger
 getent passwd ranger >/dev/null || useradd -c "Ranger" -s /bin/bash -g ranger 
-m -d %{var_lib_ranger} ranger 2> /dev/null || :
 
 %post tagsync
-%{alternatives_cmd} --install %{np_etc_ranger}-tagsync/conf 
ranger-tagsync-conf %{etc_ranger}-tagsync/conf.dist 30
+%{alternatives_cmd} --install %{np_etc_ranger}/tagsync/conf 
ranger-tagsync-conf %{etc_ranger}/tagsync/conf.dist 30
 
 %preun tagsync
 if [ "$1" = 0 ]; then
-        %{alternatives_cmd} --remove ranger-tagsync-conf 
%{etc_ranger}-tagsync/conf.dist || :
-
+        %{alternatives_cmd} --remove ranger-tagsync-conf 
%{etc_ranger}/tagsync/conf.dist || :
+fi
 
 %preun
 
@@ -497,28 +497,28 @@ if [ "$1" = 0 ]; then
 %defattr(-,root,root,755)
 %attr(0775,ranger,ranger) %{var_lib_ranger}
 %attr(0775,ranger,ranger) %{np_var_run_ranger}
-%config(noreplace) %{etc_ranger}-admin/conf.dist
-%attr(0755,ranger,ranger) %{np_etc_ranger}-admin
+%config(noreplace) %{etc_ranger}/admin/conf.dist
+%attr(0755,ranger,ranger) %{np_etc_ranger}/admin
 %{usr_lib_ranger}-admin
 
 %files usersync
 %defattr(-,root,root,755)
 %{usr_lib_ranger}-usersync
 %attr(750,root,ranger) %{usr_lib_ranger}-usersync/native/credValidator.uexe
-%config(noreplace) %{etc_ranger}-usersync/conf.dist
-%attr(0755,ranger,ranger) %{np_etc_ranger}-usersync
+%config(noreplace) %{etc_ranger}/usersync/conf.dist
+%attr(0755,ranger,ranger) %{np_etc_ranger}/usersync
 
 %files kms
 %defattr(-,root,root,755)
 %{usr_lib_ranger}-kms
-%config(noreplace) %{etc_ranger}-kms/conf.dist
-%attr(0755,ranger,ranger) %{np_etc_ranger}-kms
+%config(noreplace) %{etc_ranger}/kms/conf.dist
+%attr(0755,ranger,ranger) %{np_etc_ranger}/kms
 
 %files tagsync
 %defattr(-,root,root,755)
 %{usr_lib_ranger}-tagsync
-%config(noreplace) %{etc_ranger}-tagsync/conf.dist
-%attr(0755,ranger,ranger) %{np_etc_ranger}-tagsync
+%config(noreplace) %{etc_ranger}/tagsync/conf.dist
+%attr(0755,ranger,ranger) %{np_etc_ranger}/tagsync
 
 %files hdfs-plugin
 %defattr(-,root,root,755)

Reply via email to