BIGTOP-1096. Alternatives within the alternatives-managed sub-directory could be...
authorSean Mackrory <mackrorysd@gmail.com>
Thu, 17 Oct 2013 22:27:36 +0000 (15:27 -0700)
committerSean Mackrory <mackrorysd@gmail.com>
Thu, 17 Oct 2013 22:27:36 +0000 (15:27 -0700)
23 files changed:
bigtop-packages/src/common/hadoop/hadoop-httpfs.svc
bigtop-packages/src/common/hadoop/install_hadoop.sh
bigtop-packages/src/common/oozie/install_oozie.sh
bigtop-packages/src/common/oozie/oozie.init
bigtop-packages/src/common/solr/install_solr.sh
bigtop-packages/src/common/solr/solr-server.init.debian
bigtop-packages/src/common/sqoop/install_sqoop.sh
bigtop-packages/src/common/sqoop/sqoop-server.sh
bigtop-packages/src/deb/hadoop/hadoop-httpfs.postinst
bigtop-packages/src/deb/hadoop/hadoop-httpfs.prerm
bigtop-packages/src/deb/oozie/oozie.postinst
bigtop-packages/src/deb/oozie/rules
bigtop-packages/src/deb/solr/solr.install
bigtop-packages/src/deb/solr/solr.postinst
bigtop-packages/src/deb/solr/solr.prerm
bigtop-packages/src/deb/sqoop/sqoop.install
bigtop-packages/src/deb/sqoop/sqoop.postinst
bigtop-packages/src/deb/sqoop/sqoop.prerm
bigtop-packages/src/rpm/hadoop/SPECS/hadoop.spec
bigtop-packages/src/rpm/oozie/SPECS/oozie.spec
bigtop-packages/src/rpm/solr/SOURCES/solr-server.init
bigtop-packages/src/rpm/solr/SPECS/solr.spec
bigtop-packages/src/rpm/sqoop/SPECS/sqoop.spec

index 73507af..13125f3 100644 (file)
@@ -29,7 +29,7 @@ generate_functions() {
 
 cat <<'__EOT__'
 tomcat_deployment() {
-  DEPLOYMENT_SOURCE=/etc/hadoop-httpfs/conf/tomcat-deployment
+  DEPLOYMENT_SOURCE=`readlink -e /etc/hadoop-httpfs/tomcat-deployment`
   DEPLOYMENT_TARGET=/var/lib/hadoop-httpfs/tomcat-deployment
 
   rm -rf ${DEPLOYMENT_TARGET}
index 9d51dda..38ccd6b 100755 (executable)
@@ -314,9 +314,9 @@ cp ${BUILD_DIR}/sbin/httpfs.sh ${HTTPFS_DIR}/sbin/
 cp -r ${BUILD_DIR}/share/hadoop/httpfs/tomcat/webapps ${HTTPFS_DIR}/webapps
 install -d -m 0755 ${PREFIX}/var/lib/hadoop-httpfs
 install -d -m 0755 $HTTPFS_ETC_DIR/conf.empty
-install -d -m 0755 $HTTPFS_ETC_DIR/conf.empty/tomcat-deployment
-cp -r ${BUILD_DIR}/share/hadoop/httpfs/tomcat/conf $HTTPFS_ETC_DIR/conf.empty/tomcat-deployment/
-chmod 644 $HTTPFS_ETC_DIR/conf.empty/tomcat-deployment/conf/*
+install -d -m 0755 $HTTPFS_ETC_DIR/tomcat-deployment.dist
+cp -r ${BUILD_DIR}/share/hadoop/httpfs/tomcat/conf $HTTPFS_ETC_DIR/tomcat-deployment.dist/
+chmod 644 $HTTPFS_ETC_DIR/tomcat-deployment.dist/conf/*
 mv $HADOOP_ETC_DIR/conf.empty/httpfs* $HTTPFS_ETC_DIR/conf.empty
 sed -i -e '/<\/configuration>/i\
   <!-- HUE proxy user setting -->\
index 1f769a0..c203163 100755 (executable)
@@ -148,6 +148,7 @@ chmod 755 ${BIN_DIR}/oozie
 ## Install server image
 SERVER_LIB_DIR=${SERVER_PREFIX}/usr/lib/oozie
 CONF_DIR=${CONF_DIR:-"${SERVER_PREFIX}/etc/oozie/conf.dist"}
+ETC_DIR=${SERVER_PREFIX}/etc/oozie
 DATA_DIR=${SERVER_PREFIX}/var/lib/oozie
 
 install -d -m 0755 ${SERVER_LIB_DIR}
@@ -181,20 +182,20 @@ mkdir ${WEBAPP_DIR}
 mv -f ${WEBAPP_DIR}/WEB-INF/lib ${SERVER_LIB_DIR}/libserver
 touch ${SERVER_LIB_DIR}/webapps/oozie.war
 
-HTTP_DIRECTORY=${CONF_DIR}/tomcat-deployment.http
+HTTP_DIRECTORY=${ETC_DIR}/tomcat-deployment.http
 install -d -m 0755 ${HTTP_DIRECTORY}
 cp -R ${BUILD_DIR}/oozie-server/conf ${HTTP_DIRECTORY}/conf
 cp ${EXTRA_DIR}/context.xml ${HTTP_DIRECTORY}/conf/
 cp ${EXTRA_DIR}/catalina.properties ${HTTP_DIRECTORY}/conf/
 mv ${SERVER_LIB_DIR}/webapps/oozie/WEB-INF ${HTTP_DIRECTORY}/WEB-INF
 
-HTTPS_DIRECTORY=${CONF_DIR}/tomcat-deployment.https
+HTTPS_DIRECTORY=${ETC_DIR}/tomcat-deployment.https
 cp -r ${HTTP_DIRECTORY} ${HTTPS_DIRECTORY}
 cp ${HTTPS_DIRECTORY}/conf/ssl/ssl-server.xml ${HTTPS_DIRECTORY}/conf/server.xml
 cp ${BUILD_DIR}/oozie-server/conf/ssl/ssl-web.xml ${HTTPS_DIRECTORY}/WEB-INF/web.xml
 
-ln -s /usr/lib/oozie/webapps ${CONF_DIR}/tomcat-deployment.http/
-ln -s /usr/lib/oozie/webapps ${CONF_DIR}/tomcat-deployment.https/
+ln -s /usr/lib/oozie/webapps ${ETC_DIR}/tomcat-deployment.http/
+ln -s /usr/lib/oozie/webapps ${ETC_DIR}/tomcat-deployment.https/
 ln -s /var/lib/oozie/tomcat-deployment/WEB-INF ${SERVER_LIB_DIR}/webapps/oozie/
 
 # Create all the jars needed for tools execution
index 56111d1..d5a8dc9 100644 (file)
@@ -49,7 +49,7 @@ is_oozie_alive() {
 }
 
 tomcat_deployment() {
-  DEPLOYMENT_SOURCE=/etc/oozie/conf/tomcat-deployment
+  DEPLOYMENT_SOURCE=`readlink -e /etc/oozie/tomcat-deployment`
   DEPLOYMENT_TARGET=/var/lib/oozie/tomcat-deployment
 
   rm -rf ${DEPLOYMENT_TARGET}
index 57618d2..4c57944 100644 (file)
@@ -128,10 +128,10 @@ cat > $PREFIX/$LIB_DIR/server/webapps/ROOT/index.html <<__EOT__
 <html><head><meta http-equiv="refresh" content="0;url=./solr"></head><body><a href="/solr">Solr Console</a></body></html>
 __EOT__
 
-install -d -m 0755 $PREFIX/${CONF_DIR}.dist/tomcat-deployment/conf
-cp $DISTRO_DIR/web.xml $PREFIX/${CONF_DIR}.dist/tomcat-deployment/conf
-cp $DISTRO_DIR/server.xml $PREFIX/${CONF_DIR}.dist/tomcat-deployment/conf
-cp $DISTRO_DIR/logging.properties $PREFIX/${CONF_DIR}.dist/tomcat-deployment/conf
+install -d -m 0755 $PREFIX/etc/solr/tomcat-deployment.dist/conf
+cp $DISTRO_DIR/web.xml $PREFIX/etc/solr/tomcat-deployment.dist/conf
+cp $DISTRO_DIR/server.xml $PREFIX/etc/solr/tomcat-deployment.dist/conf
+cp $DISTRO_DIR/logging.properties $PREFIX/etc/solr/tomcat-deployment.dist/conf
 
 cp -ra ${BUILD_DIR}/dist/*.*ar $PREFIX/$LIB_DIR
 cp -ra ${BUILD_DIR}/dist/solrj-lib $PREFIX/$LIB_DIR/lib
index c8195f6..f24dd39 100644 (file)
@@ -65,7 +65,7 @@ done
 SOLR_SHUTDOWN_TIMEOUT=${SOLR_SHUTDOWN_TIMEOUT:-60}
 
 tomcat_deployment() {
-  DEPLOYMENT_SOURCE=/etc/solr/conf/tomcat-deployment
+  DEPLOYMENT_SOURCE=`readlink -e /etc/solr/tomcat-deployment`
   DEPLOYMENT_TARGET=/var/lib/solr/tomcat-deployment
 
   rm -rf ${DEPLOYMENT_TARGET}
index ba79156..19468fb 100755 (executable)
@@ -120,6 +120,7 @@ MAN_DIR=${MAN_DIR:-/usr/share/man/man1}
 CONF_DIR=${CONF_DIR:-${ETC_DIR}/conf.dist}
 INITD_DIR=${INITD_DIR:-/etc/init.d}
 DIST_DIR=${DIST_DIR:-dist/target/sqoop-*}
+TOMCAT_DEPLOYMENT_DIR=${ETC_DIR}/tomcat-deployment
 
 install -d -m 0755 ${PREFIX}/${LIB_DIR}
 install -d -m 0755 ${PREFIX}/${LIB_DIR}/client-lib
@@ -146,15 +147,14 @@ cp -r ${DIST_DIR}/server/webapps $SQOOP_WEBAPPS
 unzip -d $SQOOP_WEBAPPS/sqoop $SQOOP_WEBAPPS/sqoop.war
 
 # Create MR2 configuration
-DEPLOYMENT_DIR=/etc/sqoop/conf.dist/tomcat-deployment
-install -d -m 0755 ${PREFIX}/${DEPLOYMENT_DIR}/conf
+install -d -m 0755 ${PREFIX}/${TOMCAT_DEPLOYMENT_DIR}.dist/conf
 for conf in web.xml tomcat-users.xml server.xml logging.properties context.xml catalina.policy
 do
-    install -m 0644 ${DIST_DIR}/server/conf/$conf ${PREFIX}/${DEPLOYMENT_DIR}/conf/
+    install -m 0644 ${DIST_DIR}/server/conf/$conf ${PREFIX}/${TOMCAT_DEPLOYMENT_DIR}.dist/conf/
 done
-sed -i -e "s|<Host |<Host workDir=\"/var/tmp/sqoop\" |" ${PREFIX}/${DEPLOYMENT_DIR}/conf/server.xml
-sed -i -e "s|\${catalina\.base}/logs|/var/log/sqoop|"   ${PREFIX}/${DEPLOYMENT_DIR}/conf/logging.properties
-cp -f ${EXTRA_DIR}/catalina.properties ${PREFIX}/${DEPLOYMENT_DIR}/conf/catalina.properties
+sed -i -e "s|<Host |<Host workDir=\"/var/tmp/sqoop\" |" ${PREFIX}/${TOMCAT_DEPLOYMENT_DIR}.dist/conf/server.xml
+sed -i -e "s|\${catalina\.base}/logs|/var/log/sqoop|"   ${PREFIX}/${TOMCAT_DEPLOYMENT_DIR}.dist/conf/logging.properties
+cp -f ${EXTRA_DIR}/catalina.properties ${PREFIX}/${TOMCAT_DEPLOYMENT_DIR}.dist/conf/catalina.properties
 
 # Create wrapper scripts for the client and server
 client_wrapper=$PREFIX/usr/bin/sqoop
index 59f6a5d..d7bf00b 100644 (file)
@@ -16,7 +16,7 @@
 # limitations under the License.
 
 tomcat_deployment() {
-  DEPLOYMENT_SOURCE=/etc/sqoop/conf/tomcat-deployment
+  DEPLOYMENT_SOURCE=`readlink -e /etc/sqoop/tomcat-deployment`
   DEPLOYMENT_TARGET=/var/lib/sqoop/tomcat-deployment
 
   rm -rf ${DEPLOYMENT_TARGET}
index c986d42..ed9a9cd 100644 (file)
@@ -23,6 +23,7 @@ case "$1" in
     configure)
         chown httpfs:httpfs /var/run/hadoop-httpfs /var/log/hadoop-httpfs
         update-alternatives --install /etc/hadoop-httpfs/conf hadoop-httpfs-conf /etc/hadoop-httpfs/conf.empty 10
+        update-alternatives --install /etc/hadoop-httpfs/tomcat-deployment hadoop-httpfs-tomcat-deployment /etc/hadoop-httpfs/tomcat-deployment.dist 10
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)
index 5714708..2f4cf10 100644 (file)
@@ -36,6 +36,7 @@ set -e
 case "$1" in
     remove|upgrade|deconfigure)
       update-alternatives --remove hadoop-httpfs-conf /etc/hadoop-httpfs/conf.empty || :
+      update-alternatives --remove hadoop-httpfs-tomcat-deployment /etc/hadoop-httpfs/tomcat-deployment.dist || :
     ;;
 
     failed-upgrade)
index 6c482e3..5bd0dd1 100644 (file)
@@ -41,7 +41,7 @@ case "$1" in
 
         update-alternatives --install /etc/oozie/conf oozie-conf /etc/oozie/conf.dist 30
 
-        conf_tomcat=/etc/oozie/conf/tomcat-deployment
+        conf_tomcat=/etc/oozie/tomcat-deployment
         update-alternatives --install ${conf_tomcat} oozie-tomcat-conf ${conf_tomcat}.http 30
         update-alternatives --install ${conf_tomcat} oozie-tomcat-conf ${conf_tomcat}.https 20
     ;;
index cb6d268..531aeb2 100755 (executable)
@@ -40,6 +40,3 @@ override_dh_auto_install:
        ln -s -f /var/lib/oozie/ext-2.2 debian/oozie/usr/lib/oozie/webapps/oozie/ext-2.2
        rm -rf                        debian/oozie/usr/lib/oozie/webapps/oozie/docs
        ln -s -f /usr/share/doc/oozie debian/oozie/usr/lib/oozie/webapps/oozie/docs
-       ln -s /usr/lib/oozie/webapps debian/oozie/etc/oozie/conf.dist/tomcat-deployment.http
-       ln -s /usr/lib/oozie/webapps debian/oozie/etc/oozie/conf.dist/tomcat-deployment.https
-       ln -s /var/lib/oozie/tomcat-deployment/WEB-INF debian/oozie/usr/lib/oozie/webapps/oozie/WEB-INF
index 721c3f6..4b42f3a 100644 (file)
@@ -1,4 +1,4 @@
-/etc/solr/conf.dist
+/etc/solr
 /etc/default
 /usr/lib/solr
 /var
index 11895d5..7b768d8 100644 (file)
@@ -19,7 +19,8 @@ set -e
 case "$1" in
     configure)
         # Install config alternatives
-        update-alternatives  --install /etc/solr/conf solr-conf /etc/solr/conf.dist 30
+        update-alternatives --install /etc/solr/conf solr-conf /etc/solr/conf.dist 30
+        update-alternatives --install /etc/solr/tomcat-deployment solr-tomcat-deployment /etc/solr/tomcat-deployment.dist 30
        chown solr:solr /var/log/solr /var/lib/solr /var/run/solr
     ;;
 
index a729ff0..2c9053b 100644 (file)
@@ -19,6 +19,7 @@ set -e
 case "$1" in
     remove|upgrade|deconfigure)
       update-alternatives --remove solr-conf /etc/solr/conf.dist || :
+      update-alternatives --remove solr-tomcat-deployment /etc/solr/tomcat-deployment.dist || :
     ;;
 
     failed-upgrade)
index 1bd82b3..a235d84 100644 (file)
@@ -1,5 +1,6 @@
 /usr/bin/sqoop-server
 /etc/sqoop/conf.dist
+/etc/sqoop/tomcat-deployment.dist
 /etc/default/sqoop-server
 /usr/lib/sqoop/bin/setenv.sh
 /usr/lib/sqoop/webapps
index 91aa7d7..2af541d 100644 (file)
@@ -16,5 +16,6 @@
 
 set -e
 
-update-alternatives  --install /etc/sqoop/conf sqoop-conf /etc/sqoop/conf.dist 30
+update-alternatives --install /etc/sqoop/conf sqoop-conf /etc/sqoop/conf.dist 30
+update-alternatives --install /etc/sqoop/tomcat-deployment sqoop-tomcat-deployment /etc/sqoop/tomcat-deployment.dist 30
 
index 896c0c5..d4a25b9 100644 (file)
@@ -24,6 +24,7 @@ set -e
 case "$1" in
     remove|upgrade|deconfigure)
       update-alternatives --remove sqoop-conf /etc/sqoop/conf.dist || :
+      update-alternatives --remove sqoop-tomcat-deployment /etc/sqoop/tomcat-deployment.dist || :
     ;;
 
     failed-upgrade)
index 8a8348c..62a2ea2 100644 (file)
@@ -28,6 +28,7 @@
 %define config_hadoop %{etc_hadoop}/conf
 %define config_yarn %{etc_yarn}/conf
 %define config_httpfs %{etc_httpfs}/conf
+%define tomcat_deployment_httpfs %{etc_httpfs}/tomcat-deployment
 %define lib_hadoop_dirname /usr/lib
 %define lib_hadoop %{lib_hadoop_dirname}/%{name}
 %define lib_httpfs %{lib_hadoop_dirname}/%{name}-httpfs
@@ -543,6 +544,7 @@ getent passwd mapred >/dev/null || /usr/sbin/useradd --comment "Hadoop MapReduce
 
 %post httpfs
 %{alternatives_cmd} --install %{config_httpfs} %{name}-httpfs-conf %{etc_httpfs}/conf.empty 10
+%{alternatives_cmd} --install %{tomcat_deployment_httpfs} %{name}-tomcat-deployment %{etc_httpfs}/tomcat-deployment.dist 10
 chkconfig --add %{name}-httpfs
 
 %preun
@@ -555,6 +557,7 @@ if [ $1 = 0 ]; then
   service %{name}-httpfs stop > /dev/null 2>&1
   chkconfig --del %{name}-httpfs
   %{alternatives_cmd} --remove %{name}-httpfs-conf %{etc_httpfs}/conf.empty || :
+  %{alternatives_cmd} --remove %{name}-tomcat-deployment %{etc_httpfs}/tomcat-deployment.dist || :
 fi
 
 %postun httpfs
@@ -642,6 +645,7 @@ fi
 %files httpfs
 %defattr(-,root,root)
 %config(noreplace) %{etc_httpfs}/conf.empty
+%config(noreplace) %{etc_httpfs}/tomcat-deployment.dist
 %config(noreplace) /etc/default/%{name}-httpfs
 %{lib_hadoop}/libexec/httpfs-config.sh
 %{initd_dir}/%{name}-httpfs
index 2fcfe3b..28bbedb 100644 (file)
@@ -17,8 +17,7 @@
 %define man_dir /usr/share/man
 %define conf_oozie %{_sysconfdir}/%{name}/conf
 %define conf_oozie_dist %{conf_oozie}.dist
-%define conf_tomcat %{conf_oozie}/tomcat-deployment
-%define conf_tomcat_dist %{conf_oozie_dist}/tomcat-deployment
+%define tomcat_deployment_oozie %{_sysconfdir}/%{name}/tomcat-deployment
 %define data_oozie /var/lib/oozie
 
 %if  %{!?suse_version:1}0
@@ -150,8 +149,8 @@ Requires: bigtop-utils >= 0.7
 %__install -d  -m 0755  %{buildroot}/%{_localstatedir}/log/oozie
 %__install -d  -m 0755  %{buildroot}/%{_localstatedir}/run/oozie
 
-%__ln_s -f %{lib_oozie}/webapps $RPM_BUILD_ROOT/%{conf_tomcat_dist}.http/webapps
-%__ln_s -f %{lib_oozie}/webapps $RPM_BUILD_ROOT/%{conf_tomcat_dist}.https/webapps
+%__ln_s -f %{lib_oozie}/webapps $RPM_BUILD_ROOT/%{tomcat_deployment_oozie}.http/webapps
+%__ln_s -f %{lib_oozie}/webapps $RPM_BUILD_ROOT/%{tomcat_deployment_oozie}.https/webapps
 %__ln_s -f %{data_oozie}/tomcat-deployment/WEB-INF $RPM_BUILD_ROOT/%{lib_oozie}/webapps/oozie/WEB-INF
 
 %pre
@@ -160,8 +159,8 @@ getent passwd oozie >/dev/null || /usr/sbin/useradd --comment "Oozie User" --she
 
 %post 
 %{alternatives_cmd} --install %{conf_oozie} %{name}-conf %{conf_oozie_dist} 30
-%{alternatives_cmd} --install %{conf_tomcat} %{name}-tomcat-conf %{conf_tomcat}.http 30
-%{alternatives_cmd} --install %{conf_tomcat} %{name}-tomcat-conf %{conf_tomcat}.https 20
+%{alternatives_cmd} --install %{tomcat_deployment_oozie} %{name}-tomcat-conf %{tomcat_deployment_oozie}.http 30
+%{alternatives_cmd} --install %{tomcat_deployment_oozie} %{name}-tomcat-conf %{tomcat_deployment_oozie}.https 20
 
 /sbin/chkconfig --add oozie 
 
@@ -170,8 +169,8 @@ if [ "$1" = 0 ]; then
   rm -r /etc/oozie/conf/tomcat-deployment
   /sbin/service oozie stop > /dev/null
   /sbin/chkconfig --del oozie
-  %{alternatives_cmd} --remove %{name}-tomcat-conf %{conf_tomcat}.http || :
-  %{alternatives_cmd} --remove %{name}-tomcat-conf %{conf_tomcat}.https || :
+  %{alternatives_cmd} --remove %{name}-tomcat-conf %{tomcat_deployment_oozie}.http || :
+  %{alternatives_cmd} --remove %{name}-tomcat-conf %{tomcat_deployment_oozie}.https || :
   %{alternatives_cmd} --remove %{name}-conf %{conf_oozie_dist} || :
 fi
 
@@ -183,6 +182,7 @@ fi
 %files 
 %defattr(-,root,root)
 %config(noreplace) %{conf_oozie_dist}
+%config(noreplace) %{tomcat_deployment_oozie}.*
 %{lib_oozie}/bin/oozie-sys.sh
 %{lib_oozie}/bin/oozie-env.sh
 %{lib_oozie}/bin/oozied.sh
index 374cc03..ff4654b 100644 (file)
@@ -65,7 +65,7 @@ done
 SOLR_SHUTDOWN_TIMEOUT=${SOLR_SHUTDOWN_TIMEOUT:-60}
 
 tomcat_deployment() {
-  DEPLOYMENT_SOURCE=/etc/solr/conf/tomcat-deployment
+  DEPLOYMENT_SOURCE=`readlink -e /etc/solr/tomcat-deployment`
   DEPLOYMENT_TARGET=/var/lib/solr/tomcat-deployment
 
   rm -rf ${DEPLOYMENT_TARGET}
index 328d2c3..d7b0e68 100644 (file)
@@ -17,6 +17,7 @@
 %define lib_solr /usr/lib/%{solr_name}
 %define etc_solr /etc/%{solr_name}
 %define config_solr %{etc_solr}/conf
+%define tomcat_deployment_solr %{etc_solr}/tomcat-deployment
 %define log_solr /var/log/%{solr_name}
 %define bin_solr /usr/bin
 %define man_dir /usr/share/man
@@ -131,10 +132,12 @@ getent passwd solr > /dev/null || useradd -c "Solr" -s /sbin/nologin -g solr -r
 
 %post
 %{alternatives_cmd} --install %{config_solr} %{solr_name}-conf %{config_solr}.dist 30
+%{alternatives_cmd} --install %{tomcat_deployment_solr} %{solr_name}-tomcat-deployment %{tomcat_deployment_solr}.dist 30
 
 %preun
 if [ "$1" = 0 ]; then
         %{alternatives_cmd} --remove %{solr_name}-conf %{config_solr}.dist || :
+        %{alternatives_cmd} --remove %{solr_name}-tomcat-deployment %{tomcat_deployment_solr}.dist || :
 fi
 
 %post server
@@ -157,6 +160,7 @@ fi
 %files 
 %defattr(-,root,root,755)
 %config(noreplace) %{config_solr}.dist
+%config(noreplace) %{tomcat_deployment_solr}.dist
 %config(noreplace) /etc/default/solr 
 %{lib_solr}
 %{bin_solr}/solrctl
index c6f8305..a2d02bb 100644 (file)
@@ -16,6 +16,8 @@
 %define lib_sqoop /usr/lib/sqoop
 %define conf_sqoop %{_sysconfdir}/sqoop/conf
 %define conf_sqoop_dist %{conf_sqoop}.dist
+%define tomcat_deployment_sqoop %{_sysconfdir}/sqoop/tomcat-deployment
+%define tomcat_deployment_sqoop_dist %{tomcat_deployment_sqoop}.dist
 %define run_sqoop /var/run/sqoop
 
 %if  %{?suse_version:1}0
@@ -145,6 +147,7 @@ getent passwd sqoop >/dev/null || useradd -c "Sqoop User" -s /sbin/nologin -g sq
 
 %post
 %{alternatives_cmd} --install %{conf_sqoop} sqoop-conf %{conf_sqoop_dist} 30
+%{alternatives_cmd} --install %{tomcat_deployment_sqoop} sqoop-tomcat-deployment %{tomcat_deployment_sqoop_dist} 30
 
 %post server
 chkconfig --add sqoop-server
@@ -152,6 +155,7 @@ chkconfig --add sqoop-server
 %preun
 if [ "$1" = "0" ] ; then
   %{alternatives_cmd} --remove sqoop-conf %{conf_sqoop_dist} || :
+  %{alternatives_cmd} --remove sqoop-tomcat-deployment %{tomcat_deployment_sqoop_dist} || :
 fi
 
 %preun server
@@ -169,6 +173,7 @@ fi
 %defattr(0755,root,root)
 /usr/bin/sqoop-server
 %config(noreplace) /etc/sqoop/conf.dist
+%config(noreplace) /etc/sqoop/tomcat-deployment.dist
 %config(noreplace) /etc/default/sqoop-server
 %{lib_sqoop}/webapps
 %{lib_sqoop}/bin/setenv.sh