ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sneet...@apache.org
Subject git commit: ARGUS-73: Modified dependencies to use correct group-id
Date Fri, 26 Sep 2014 05:05:43 GMT
Repository: incubator-argus
Updated Branches:
  refs/heads/master 802fadf73 -> 2261a84c3


ARGUS-73: Modified dependencies to use correct group-id


Project: http://git-wip-us.apache.org/repos/asf/incubator-argus/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-argus/commit/2261a84c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-argus/tree/2261a84c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-argus/diff/2261a84c

Branch: refs/heads/master
Commit: 2261a84c3f6653c2ee022374bd478e7f968df533
Parents: 802fadf
Author: sneethiraj <sneethir@apache.org>
Authored: Thu Sep 25 22:05:27 2014 -0700
Committer: sneethiraj <sneethir@apache.org>
Committed: Thu Sep 25 22:05:27 2014 -0700

----------------------------------------------------------------------
 agents-common/scripts/enable-agent.sh  | 36 ++++++++++++++++++---------
 hdfs-agent/conf/xasecure-hadoop-env.sh | 38 +++++++++++++++--------------
 src/main/assembly/admin-web.xml        |  6 ++---
 src/main/assembly/hbase-agent.xml      |  2 +-
 src/main/assembly/hdfs-agent.xml       |  2 +-
 src/main/assembly/hive-agent.xml       |  2 +-
 src/main/assembly/knox-agent.xml       |  2 +-
 src/main/assembly/storm-agent.xml      |  6 ++---
 src/main/assembly/usersync.xml         |  6 ++---
 9 files changed, 58 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/2261a84c/agents-common/scripts/enable-agent.sh
----------------------------------------------------------------------
diff --git a/agents-common/scripts/enable-agent.sh b/agents-common/scripts/enable-agent.sh
index d5a0754..237d61d 100755
--- a/agents-common/scripts/enable-agent.sh
+++ b/agents-common/scripts/enable-agent.sh
@@ -176,35 +176,45 @@ then
 	
 	if [ "${action}" = "enable" ]
 	then
+
 		cp ${SET_ENV_SCRIPT_TEMPLATE} ${SET_ENV_SCRIPT}
-		if [ -f ${HCOMPONENT_CONF_DIR}/${HCOMPONENT_NAME}-env.sh ]
+
+		DEST_SCRIPT_FILE=${HCOMPONENT_INSTALL_DIR}/libexec/${HCOMPONENT_NAME}-config.sh
+
+		DEST_SCRIPT_ARCHIVE_FILE=${HCOMPONENT_INSTALL_DIR}/libexec/.${HCOMPONENT_NAME}-config.sh.${dt}
+
+		if [ -f "${DEST_SCRIPT_FILE}" ]
 		then
 
-			grep 'xasecure-.*-env.sh' ${HCOMPONENT_CONF_DIR}/${HCOMPONENT_NAME}-env.sh > /dev/null
2>&1
+			log "Saving current ${DEST_SCRIPT_FILE} to ${DEST_SCRIPT_ARCHIVE_FILE} ..."
+
+			cp ${DEST_SCRIPT_FILE} ${DEST_SCRIPT_ARCHIVE_FILE}
+
+			grep 'xasecure-.*-env.sh' ${DEST_SCRIPT_FILE} > /dev/null 2>&1
 			if [ $? -eq 0 ]
 			then
 				ts=`date '+%Y%m%d%H%M%S'`
-				grep -v 'xasecure-.*-env.sh' ${HCOMPONENT_CONF_DIR}/${HCOMPONENT_NAME}-env.sh > ${HCOMPONENT_CONF_DIR}/${HCOMPONENT_NAME}-env.sh.${ts}

+				grep -v 'xasecure-.*-env.sh' ${DEST_SCRIPT_FILE} > ${DEST_SCRIPT_FILE}.${ts} 
 				if [ $? -eq 0 ]
 				then
 					log "Removing old reference to xasecure setenv source ..."
-					cat ${HCOMPONENT_CONF_DIR}/${HCOMPONENT_NAME}-env.sh.${ts} > ${HCOMPONENT_CONF_DIR}/${HCOMPONENT_NAME}-env.sh
-					rm -f ${HCOMPONENT_CONF_DIR}/${HCOMPONENT_NAME}-env.sh.${ts}
+					cat ${DEST_SCRIPT_FILE}.${ts} > ${DEST_SCRIPT_FILE}
+					rm -f ${DEST_SCRIPT_FILE}.${ts}
 				fi
 			fi
 
-			grep "[ \t]*.[ \t]*${SET_ENV_SCRIPT}" ${HCOMPONENT_CONF_DIR}/${HCOMPONENT_NAME}-env.sh
 > /dev/null
+			grep "[ \t]*.[ \t]*${SET_ENV_SCRIPT}" ${DEST_SCRIPT_FILE} > /dev/null
 			if [ $? -ne 0 ]
 			then
-				log "Appending sourcing script, ${SET_ENV_SCRIPT_NAME} in the file: ${HCOMPONENT_CONF_DIR}/${HCOMPONENT_NAME}-env.sh
"
-				cat >> ${HCOMPONENT_CONF_DIR}/${HCOMPONENT_NAME}-env.sh <<!
+				log "Appending sourcing script, ${SET_ENV_SCRIPT_NAME} in the file: ${DEST_SCRIPT_FILE}
"
+				cat >> ${DEST_SCRIPT_FILE} <<!
 if [ -f ${SET_ENV_SCRIPT} ]
 then
 	.  ${SET_ENV_SCRIPT}
 fi
 !
 			else
-				log "INFO: ${SET_ENV_SCRIPT_NAME} is being sourced from file: ${HCOMPONENT_CONF_DIR}/${HCOMPONENT_NAME}-env.sh
"
+				log "INFO: ${DEST_SCRIPT_FILE} is being sourced from file: ${HCOMPONENT_CONF_DIR}/${HCOMPONENT_NAME}-env.sh
"
 			fi
 		fi
 	fi
@@ -216,11 +226,10 @@ fi
 
 if [ -d "${PROJ_INSTALL_DIR}/install/conf.templates/${action}" ]
 then
-
-
 	INSTALL_CP="${PROJ_INSTALL_LIB_DIR}/*" 
 	if [ "${action}" = "enable" ]
 	then
+		echo "<argus>\n<enabled>`date`</enabled>\n</argus>" > ${HCOMPONENT_CONF_DIR}/argus-security.xml
 		for cf in ${PROJ_INSTALL_DIR}/install/conf.templates/${action}/*.xml
 		do
 			cfb=`basename ${cf}`
@@ -232,6 +241,11 @@ then
 			cp ${cf} ${HCOMPONENT_CONF_DIR}/
 			chown ${CFG_OWNER_INF} ${HCOMPONENT_CONF_DIR}/${cfb}
 		done
+    else
+		if [ -f ${HCOMPONENT_CONF_DIR}/argus-security.xml ]
+		then
+			mv ${HCOMPONENT_CONF_DIR}/argus-security.xml ${HCOMPONENT_CONF_DIR}/.argus-security.xml.`date
'+%Y%m%d%H%M%S'`
+		fi
 	fi
 
 	for f in ${PROJ_INSTALL_DIR}/install/conf.templates/${action}/*.cfg

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/2261a84c/hdfs-agent/conf/xasecure-hadoop-env.sh
----------------------------------------------------------------------
diff --git a/hdfs-agent/conf/xasecure-hadoop-env.sh b/hdfs-agent/conf/xasecure-hadoop-env.sh
index f88de75..50fada8 100644
--- a/hdfs-agent/conf/xasecure-hadoop-env.sh
+++ b/hdfs-agent/conf/xasecure-hadoop-env.sh
@@ -1,24 +1,26 @@
 #!/bin/bash
 
-echo "$0" | grep -q beeswax_server.sh > /dev/null 2>&1
-if [ $? -ne 0 ]
+if [ -f ${HADOOP_HOME}/conf/argus-security.xml ]
 then
-	XASECURE_AGENT_PATH="`ls -1 ${HADOOP_HOME}/lib/hdfs-agent-*.jar | head -1`"
-	if [ -f "${XASECURE_AGENT_PATH}" ]
+	echo "$0" | grep -q beeswax_server.sh > /dev/null 2>&1
+	if [ $? -ne 0 ]
 	then
-	    if [ "${XASECURE_INIT}" != "0" ]
-	    then
-	        XASECURE_INIT="0"
-	        XASECURE_AGENT_OPTS=" -javaagent:${XASECURE_AGENT_PATH}=authagent "
-	        echo ${HADOOP_NAMENODE_OPTS} | grep -q -- "${XASECURE_AGENT_OPTS}" > /dev/null
2>&1
-	        if [ $? -ne 0 ]
-	        then
-	                export HADOOP_NAMENODE_OPTS=" ${XASECURE_AGENT_OPTS} ${HADOOP_NAMENODE_OPTS}
"
-	                export HADOOP_SECONDARYNAMENODE_OPTS=" ${XASECURE_AGENT_OPTS} ${HADOOP_SECONDARYNAMENODE_OPTS}"
-	        fi
-	    fi
-	else
-	    echo "ERROR: XASecure Agent is not located at [${XASECURE_AGENT_PATH}]. Exiting ..."
-	    #exit 0
+		XASECURE_AGENT_PATH="`ls -1 ${HADOOP_HOME}/lib/hdfs-agent-*.jar | head -1`"
+		if [ -f "${XASECURE_AGENT_PATH}" ]
+		then
+	    	if [ "${XASECURE_INIT}" != "0" ]
+	    	then
+	        	XASECURE_INIT="0"
+	        	XASECURE_AGENT_OPTS=" -javaagent:${XASECURE_AGENT_PATH}=authagent "
+	        	echo ${HADOOP_NAMENODE_OPTS} | grep -q -- "${XASECURE_AGENT_OPTS}" > /dev/null
2>&1
+	        	if [ $? -ne 0 ]
+	        	then
+	                	export HADOOP_NAMENODE_OPTS=" ${XASECURE_AGENT_OPTS} ${HADOOP_NAMENODE_OPTS}
"
+	                	export HADOOP_SECONDARYNAMENODE_OPTS=" ${XASECURE_AGENT_OPTS} ${HADOOP_SECONDARYNAMENODE_OPTS}"
+	        	fi
+	    	fi
+		else
+	    	echo "ERROR: XASecure Agent is not located at [${XASECURE_AGENT_PATH}]. Exiting ..."
+		fi
 	fi
 fi

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/2261a84c/src/main/assembly/admin-web.xml
----------------------------------------------------------------------
diff --git a/src/main/assembly/admin-web.xml b/src/main/assembly/admin-web.xml
index d9ceae5..611c4e5 100644
--- a/src/main/assembly/admin-web.xml
+++ b/src/main/assembly/admin-web.xml
@@ -16,7 +16,7 @@
         <outputDirectory>/war</outputDirectory>
      </binaries>
      <includes>
-		<include>com.hortonworks.hadoop.security:security-admin-web</include>
+		<include>org.apache.argus:security-admin-web</include>
      </includes>
     </moduleSet>
 
@@ -38,7 +38,7 @@
         </dependencySets>
      </binaries>
      <includes>
-	    <include>com.hortonworks.hadoop.security:embededwebserver</include>
+	    <include>org.apache.argus:embededwebserver</include>
      </includes>
     </moduleSet>
 
@@ -71,7 +71,7 @@
         </dependencySets>
      </binaries>
      <includes>
-	    <include>com.hortonworks.hadoop.security:credentialbuilder</include>
+	    <include>org.apache.argus:credentialbuilder</include>
      </includes>
     </moduleSet>
 

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/2261a84c/src/main/assembly/hbase-agent.xml
----------------------------------------------------------------------
diff --git a/src/main/assembly/hbase-agent.xml b/src/main/assembly/hbase-agent.xml
index 8ecde2d..916ef07 100644
--- a/src/main/assembly/hbase-agent.xml
+++ b/src/main/assembly/hbase-agent.xml
@@ -60,7 +60,7 @@
      </binaries>
      <includes>
 		<include>security_agents.agents-installer:agents-installer</include>
-		<include>com.hortonworks.hadoop.security:credentialbuilder</include>
+		<include>org.apache.argus:credentialbuilder</include>
      </includes>
     </moduleSet>
   </moduleSets> 	

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/2261a84c/src/main/assembly/hdfs-agent.xml
----------------------------------------------------------------------
diff --git a/src/main/assembly/hdfs-agent.xml b/src/main/assembly/hdfs-agent.xml
index a17e83b..e2aceaf 100644
--- a/src/main/assembly/hdfs-agent.xml
+++ b/src/main/assembly/hdfs-agent.xml
@@ -61,7 +61,7 @@
      </binaries>
      <includes>
 		<include>security_agents.agents-installer:agents-installer</include>
-        <include>com.hortonworks.hadoop.security:credentialbuilder</include>
+        <include>org.apache.argus:credentialbuilder</include>
      </includes>
     </moduleSet>
   </moduleSets> 	

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/2261a84c/src/main/assembly/hive-agent.xml
----------------------------------------------------------------------
diff --git a/src/main/assembly/hive-agent.xml b/src/main/assembly/hive-agent.xml
index 07c27c8..21b1934 100644
--- a/src/main/assembly/hive-agent.xml
+++ b/src/main/assembly/hive-agent.xml
@@ -61,7 +61,7 @@
      </binaries>
      <includes>
 	    <include>security_agents.agents-installer:agents-installer</include>
-        <include>com.hortonworks.hadoop.security:credentialbuilder</include>
+        <include>org.apache.argus:credentialbuilder</include>
      </includes>
     </moduleSet>
   </moduleSets> 	

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/2261a84c/src/main/assembly/knox-agent.xml
----------------------------------------------------------------------
diff --git a/src/main/assembly/knox-agent.xml b/src/main/assembly/knox-agent.xml
index e48e34e..6cc18fb 100644
--- a/src/main/assembly/knox-agent.xml
+++ b/src/main/assembly/knox-agent.xml
@@ -65,7 +65,7 @@
      </binaries>
      <includes>
 		<include>security_agents.agents-installer:agents-installer</include>
-    	<include>com.hortonworks.hadoop.security:credentialbuilder</include>
+    	<include>org.apache.argus:credentialbuilder</include>
      </includes>
     </moduleSet>
   </moduleSets> 	

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/2261a84c/src/main/assembly/storm-agent.xml
----------------------------------------------------------------------
diff --git a/src/main/assembly/storm-agent.xml b/src/main/assembly/storm-agent.xml
index 62fa3ba..ff61a04 100644
--- a/src/main/assembly/storm-agent.xml
+++ b/src/main/assembly/storm-agent.xml
@@ -46,7 +46,7 @@
                         <include>org.apache.hadoop:hadoop-common:jar:${hadoop-common.version}</include>
                         <include>org.apache.hadoop:hadoop-auth:jar:${hadoop-common.version}</include>
 						<include>security_agents.agents-cred:agents-cred</include>
-						<include>com.hortonworks.hadoop.security:credentialbuilder</include>
+						<include>org.apache.argus:credentialbuilder</include>
                     </includes>
             </dependencySet>
         </dependencySets>
@@ -67,8 +67,8 @@
         <unpack>false</unpack>
      </binaries>
      <includes>
-	<include>security_agents.agents-installer:agents-installer</include>
-	<include>com.hortonworks.hadoop.security:credentialbuilder</include>
+		<include>security_agents.agents-installer:agents-installer</include>
+		<include>org.apache.argus:credentialbuilder</include>
      </includes>
     </moduleSet>
    </moduleSets>

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/2261a84c/src/main/assembly/usersync.xml
----------------------------------------------------------------------
diff --git a/src/main/assembly/usersync.xml b/src/main/assembly/usersync.xml
index fbe5e5e..0c5b2d4 100644
--- a/src/main/assembly/usersync.xml
+++ b/src/main/assembly/usersync.xml
@@ -29,7 +29,7 @@
 					<include>org.apache.hadoop:hadoop-auth</include>
 					<include>org.slf4j:slf4j-api</include>
 					<include>org.apache.hadoop:hadoop-common</include>
-					<include>com.hortonworks.hadoop.security:credentialbuilder</include>
+					<include>org.apache.argus:credentialbuilder</include>
 				</includes>
 				<unpack>false</unpack>
   			</dependencySet>
@@ -37,8 +37,8 @@
         <outputDirectory>/dist</outputDirectory>
      </binaries>
      <includes>
-	<include>com.hortonworks.hadoop.security:unixauthservice</include>
-	<include>com.hortonworks.hadoop.security:unixusersync</include>
+	<include>org.apache.argus:unixauthservice</include>
+	<include>org.apache.argus:unixusersync</include>
      </includes>
     </moduleSet>
     <moduleSet>


Mime
View raw message