incubator-bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject svn commit: r1242880 - in /incubator/bigtop/trunk: bigtop-packages/src/common/hbase/ bigtop-packages/src/common/oozie/ bigtop-packages/src/common/sqoop/ bigtop-packages/src/deb/hbase/ bigtop-packages/src/deb/oozie/ bigtop-packages/src/deb/sqoop/ bigtop...
Date Fri, 10 Feb 2012 18:45:16 GMT
Author: rvs
Date: Fri Feb 10 18:45:15 2012
New Revision: 1242880

URL: http://svn.apache.org/viewvc?rev=1242880&view=rev
Log:
BIGTOP-397. hbase, sqoop and oozie don't use alternatives for managing configuration

Added:
    incubator/bigtop/trunk/bigtop-packages/src/common/oozie/install_oozie.sh
      - copied, changed from r1242182, incubator/bigtop/trunk/bigtop-packages/src/common/oozie/create-package-layout
    incubator/bigtop/trunk/bigtop-packages/src/deb/hbase/hbase.prerm
      - copied, changed from r1242182, incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/oozie.postinst
    incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/oozie-client.postinst
      - copied, changed from r1242182, incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/oozie.postinst
    incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/oozie-client.prerm
      - copied, changed from r1242182, incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/oozie.postinst
    incubator/bigtop/trunk/bigtop-packages/src/deb/sqoop/sqoop.postinst
      - copied, changed from r1242182, incubator/bigtop/trunk/bigtop-packages/src/deb/hbase/hbase.postinst
    incubator/bigtop/trunk/bigtop-packages/src/deb/sqoop/sqoop.prerm
      - copied, changed from r1242182, incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/oozie.postinst
Removed:
    incubator/bigtop/trunk/bigtop-packages/src/common/oozie/create-package-layout
Modified:
    incubator/bigtop/trunk/bigtop-packages/src/common/hbase/install_hbase.sh
    incubator/bigtop/trunk/bigtop-packages/src/common/sqoop/install_sqoop.sh
    incubator/bigtop/trunk/bigtop-packages/src/deb/hbase/hbase.postinst
    incubator/bigtop/trunk/bigtop-packages/src/deb/hbase/rules
    incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/oozie.postinst
    incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/rules
    incubator/bigtop/trunk/bigtop-packages/src/deb/sqoop/rules
    incubator/bigtop/trunk/bigtop-packages/src/rpm/hbase/SPECS/hbase.spec
    incubator/bigtop/trunk/bigtop-packages/src/rpm/oozie/SPECS/oozie.spec
    incubator/bigtop/trunk/bigtop-packages/src/rpm/sqoop/SPECS/sqoop.spec
    incubator/bigtop/trunk/bigtop-tests/test-artifacts/package/src/main/resources/package_data_apt.xml
    incubator/bigtop/trunk/bigtop-tests/test-artifacts/package/src/main/resources/package_data_urpmi.xml
    incubator/bigtop/trunk/bigtop-tests/test-artifacts/package/src/main/resources/package_data_yum.xml
    incubator/bigtop/trunk/bigtop-tests/test-artifacts/package/src/main/resources/package_data_zypper.xml

Modified: incubator/bigtop/trunk/bigtop-packages/src/common/hbase/install_hbase.sh
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/common/hbase/install_hbase.sh?rev=1242880&r1=1242879&r2=1242880&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/common/hbase/install_hbase.sh (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/common/hbase/install_hbase.sh Fri Feb 10 18:45:15
2012
@@ -44,6 +44,7 @@ OPTS=$(getopt \
   -l 'installed-lib-dir:' \
   -l 'bin-dir:' \
   -l 'examples-dir:' \
+  -l 'conf-dir:' \
   -l 'build-dir:' -- "$@")
 
 if [ $? != 0 ] ; then
@@ -74,6 +75,9 @@ while true ; do
         --examples-dir)
         EXAMPLES_DIR=$2 ; shift 2
         ;;
+        --conf-dir)
+        CONF_DIR=$2 ; shift 2
+        ;;
         --)
         shift ; break
         ;;
@@ -97,6 +101,7 @@ DOC_DIR=${DOC_DIR:-/usr/share/doc/hbase}
 LIB_DIR=${LIB_DIR:-/usr/lib/hbase}
 BIN_DIR=${BIN_DIR:-/usr/lib/hbase/bin}
 ETC_DIR=${ETC_DIR:-/etc/hbase}
+CONF_DIR=${CONF_DIR:-${ETC_DIR}/conf.dist}
 
 install -d -m 0755 $PREFIX/$LIB_DIR
 install -d -m 0755 $PREFIX/$LIB_DIR/lib
@@ -111,7 +116,7 @@ cp -a docs/* $PREFIX/$DOC_DIR
 cp *.txt $PREFIX/$DOC_DIR/
 cp -a hbase-webapps $PREFIX/$LIB_DIR
 
-cp -a conf $PREFIX/$ETC_DIR/conf
+cp -a conf $PREFIX/$CONF_DIR
 cp -a bin/* $PREFIX/$BIN_DIR
 
 ln -s $ETC_DIR/conf $PREFIX/$LIB_DIR/conf

Copied: incubator/bigtop/trunk/bigtop-packages/src/common/oozie/install_oozie.sh (from r1242182,
incubator/bigtop/trunk/bigtop-packages/src/common/oozie/create-package-layout)
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/common/oozie/install_oozie.sh?p2=incubator/bigtop/trunk/bigtop-packages/src/common/oozie/install_oozie.sh&p1=incubator/bigtop/trunk/bigtop-packages/src/common/oozie/create-package-layout&r1=1242182&r2=1242880&rev=1242880&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/common/oozie/create-package-layout (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/common/oozie/install_oozie.sh Fri Feb 10 18:45:15
2012
@@ -47,6 +47,7 @@ OPTS=$(getopt \
   -l 'client-dir:' \
   -l 'docs-dir:' \
   -l 'initd-dir:' \
+  -l 'conf-dir:' \
   -- "$@")
 
 if [ $? != 0 ] ; then
@@ -74,6 +75,9 @@ while true ; do
         --initd-dir)
         INITDDIR=$2 ; shift 2
         ;;
+        --conf-dir)
+        CONFDIR=$2 ; shift 2
+        ;;
         --)
         shift; break
         ;;
@@ -187,7 +191,7 @@ failIfNotOK
 
 ## Install server image
 OOZIE_SERVER_DIR=${SERVERDIR}/usr/lib/oozie
-OOZIE_CONF=${SERVERDIR}/etc/oozie
+OOZIE_CONF=${CONFDIR:-"${SERVERDIR}/etc/oozie/conf.dist"}
 OOZIE_INITD=${INITDDIR}
 OOZIE_DATA=${SERVERDIR}/var/lib/oozie
 

Modified: incubator/bigtop/trunk/bigtop-packages/src/common/sqoop/install_sqoop.sh
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/common/sqoop/install_sqoop.sh?rev=1242880&r1=1242879&r2=1242880&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/common/sqoop/install_sqoop.sh (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/common/sqoop/install_sqoop.sh Fri Feb 10 18:45:15
2012
@@ -29,6 +29,7 @@ usage: $0 <options>
      --lib-dir=DIR               path to install sqoop home [/usr/lib/sqoop]
      --installed-lib-dir=DIR     path where lib-dir will end up on target system
      --bin-dir=DIR               path to install bins [/usr/bin]
+     --conf-dir=DIR              path to configuration files provided by the package [/etc/sqoop/conf.dist]
      --examples-dir=DIR          path to install examples [doc-dir/examples]
      ... [ see source for more similar options ]
   "
@@ -41,6 +42,7 @@ OPTS=$(getopt \
   -l 'prefix:' \
   -l 'doc-dir:' \
   -l 'lib-dir:' \
+  -l 'conf-dir:' \
   -l 'installed-lib-dir:' \
   -l 'bin-dir:' \
   -l 'examples-dir:' \
@@ -66,6 +68,9 @@ while true ; do
         --lib-dir)
         LIB_DIR=$2 ; shift 2
         ;;
+        --conf-dir)
+        CONF_DIR=$2 ; shift 2
+        ;;
         --installed-lib-dir)
         INSTALLED_LIB_DIR=$2 ; shift 2
         ;;
@@ -96,12 +101,9 @@ done
 DOC_DIR=${DOC_DIR:-/usr/share/doc/sqoop}
 LIB_DIR=${LIB_DIR:-/usr/lib/sqoop}
 BIN_DIR=${BIN_DIR:-/usr/lib/sqoop/bin}
-CONF_DIR=/etc/sqoop/
-CONF_DIST_DIR=/etc/sqoop/conf/
 ETC_DIR=${ETC_DIR:-/etc/sqoop}
 MAN_DIR=${MAN_DIR:-/usr/share/man/man1}
-
-
+CONF_DIR=${CONF_DIR:-${ETC_DIR}/conf.dist}
 
 install -d -m 0755 ${PREFIX}/${LIB_DIR}
 
@@ -150,8 +152,8 @@ EOF
    chmod 0755 $wrapper
 done
 
-install -d -m 0755 $PREFIX/$ETC_DIR/conf
-(cd ${BUILD_DIR}/conf && tar cf - .) | (cd $PREFIX/$ETC_DIR/conf && tar xf
-)
+install -d -m 0755 $PREFIX/$CONF_DIR
+(cd ${BUILD_DIR}/conf && tar cf - .) | (cd $PREFIX/$CONF_DIR && tar xf -)
 
 unlink $PREFIX/$LIB_DIR/conf || /bin/true
-ln -s /etc/sqoop/conf $PREFIX/$LIB_DIR/conf
+ln -s $ETC_DIR/conf $PREFIX/$LIB_DIR/conf

Modified: incubator/bigtop/trunk/bigtop-packages/src/deb/hbase/hbase.postinst
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/deb/hbase/hbase.postinst?rev=1242880&r1=1242879&r2=1242880&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/deb/hbase/hbase.postinst (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/deb/hbase/hbase.postinst Fri Feb 10 18:45:15
2012
@@ -21,6 +21,7 @@ set -e
 
 case "$1" in
 	configure)
+                update-alternatives --install /etc/hbase/conf hbase-conf /etc/hbase/conf.dist
30
 		chown hbase:hbase -R /var/run/hbase /var/log/hbase
 	;;
 

Copied: incubator/bigtop/trunk/bigtop-packages/src/deb/hbase/hbase.prerm (from r1242182, incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/oozie.postinst)
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/deb/hbase/hbase.prerm?p2=incubator/bigtop/trunk/bigtop-packages/src/deb/hbase/hbase.prerm&p1=incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/oozie.postinst&r1=1242182&r2=1242880&rev=1242880&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/oozie.postinst (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/deb/hbase/hbase.prerm Fri Feb 10 18:45:15 2012
@@ -15,40 +15,43 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# postinst script for oozie 
+# prerm script for hbase 
 #
 # see: dh_installdeb(1)
 
 set -e
 
 # summary of how this script can be called:
-#        * <postinst> `configure' <most-recently-configured-version>
-#        * <old-postinst> `abort-upgrade' <new version>
-#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-#          <new-version>
-#        * <postinst> `abort-remove'
-#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-#          <failed-install-package> <version> `removing'
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
 #          <conflicting-package> <version>
 # for details, see http://www.debian.org/doc/debian-policy/ or
 # the debian-policy package
 
 
 case "$1" in
-    configure)
-        chown -R oozie:oozie /var/lib/oozie /var/log/oozie
-        update-rc.d oozie defaults >/dev/null || exit 1
-        /usr/lib/oozie/bin/oozie-setup.sh -hadoop 0.20.200 /usr/lib/hadoop
+    remove|upgrade|deconfigure)
+      update-alternatives --remove hbase-conf /etc/hbase/conf.dist || :
     ;;
 
-    abort-upgrade|abort-remove|abort-deconfigure)
+    failed-upgrade)
     ;;
 
     *)
-        echo "postinst called with unknown argument \`$1'" >&2
+        echo "prerm called with unknown argument \`$1'" >&2
         exit 1
     ;;
 esac
 
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
 exit 0
 
+

Modified: incubator/bigtop/trunk/bigtop-packages/src/deb/hbase/rules
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/deb/hbase/rules?rev=1242880&r1=1242879&r2=1242880&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/deb/hbase/rules (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/deb/hbase/rules Fri Feb 10 18:45:15 2012
@@ -52,6 +52,7 @@ install: build
 	cp debian/hbase.default debian/${hbase_pkg_name}/etc/default/${hbase_pkg_name}
 	sh -x debian/install_hbase.sh \
 		--build-dir=. \
+		--conf-dir=/etc/hbase/conf.dist \
 		--doc-dir=usr/share/doc/${hbase_pkg_name}-doc \
 		--prefix=debian/tmp
 	mkdir -p debian/tmp/etc/security/limits.d

Copied: incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/oozie-client.postinst (from r1242182,
incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/oozie.postinst)
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/oozie-client.postinst?p2=incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/oozie-client.postinst&p1=incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/oozie.postinst&r1=1242182&r2=1242880&rev=1242880&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/oozie.postinst (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/oozie-client.postinst Fri Feb 10
18:45:15 2012
@@ -36,9 +36,7 @@ set -e
 
 case "$1" in
     configure)
-        chown -R oozie:oozie /var/lib/oozie /var/log/oozie
-        update-rc.d oozie defaults >/dev/null || exit 1
-        /usr/lib/oozie/bin/oozie-setup.sh -hadoop 0.20.200 /usr/lib/hadoop
+        update-alternatives  --install /etc/oozie/conf oozie-conf /etc/oozie/conf.dist 30

     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)

Copied: incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/oozie-client.prerm (from r1242182,
incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/oozie.postinst)
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/oozie-client.prerm?p2=incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/oozie-client.prerm&p1=incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/oozie.postinst&r1=1242182&r2=1242880&rev=1242880&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/oozie.postinst (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/oozie-client.prerm Fri Feb 10 18:45:15
2012
@@ -15,40 +15,43 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# postinst script for oozie 
+# prerm script for oozie 
 #
 # see: dh_installdeb(1)
 
 set -e
 
 # summary of how this script can be called:
-#        * <postinst> `configure' <most-recently-configured-version>
-#        * <old-postinst> `abort-upgrade' <new version>
-#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-#          <new-version>
-#        * <postinst> `abort-remove'
-#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-#          <failed-install-package> <version> `removing'
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
 #          <conflicting-package> <version>
 # for details, see http://www.debian.org/doc/debian-policy/ or
 # the debian-policy package
 
 
 case "$1" in
-    configure)
-        chown -R oozie:oozie /var/lib/oozie /var/log/oozie
-        update-rc.d oozie defaults >/dev/null || exit 1
-        /usr/lib/oozie/bin/oozie-setup.sh -hadoop 0.20.200 /usr/lib/hadoop
+    remove|upgrade|deconfigure)
+      update-alternatives --remove oozie-conf /etc/oozie/conf.dist || :
     ;;
 
-    abort-upgrade|abort-remove|abort-deconfigure)
+    failed-upgrade)
     ;;
 
     *)
-        echo "postinst called with unknown argument \`$1'" >&2
+        echo "prerm called with unknown argument \`$1'" >&2
         exit 1
     ;;
 esac
 
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
 exit 0
 
+

Modified: incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/oozie.postinst
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/oozie.postinst?rev=1242880&r1=1242879&r2=1242880&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/oozie.postinst (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/oozie.postinst Fri Feb 10 18:45:15
2012
@@ -36,6 +36,7 @@ set -e
 
 case "$1" in
     configure)
+        update-alternatives  --install /etc/oozie/conf oozie-conf /etc/oozie/conf.dist 30

         chown -R oozie:oozie /var/lib/oozie /var/log/oozie
         update-rc.d oozie defaults >/dev/null || exit 1
         /usr/lib/oozie/bin/oozie-setup.sh -hadoop 0.20.200 /usr/lib/hadoop

Modified: incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/rules
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/rules?rev=1242880&r1=1242879&r2=1242880&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/rules (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/rules Fri Feb 10 18:45:15 2012
@@ -59,7 +59,7 @@ install: install-indep
 install-indep:
 	dh_testdir
 	dh_testroot
-	sh -x debian/create-package-layout --extra-dir=debian/ --build-dir=. --server-dir=./debian/oozie
--client-dir=./debian/oozie-client --docs-dir=./debian/oozie-client/usr/share/doc/oozie --initd-dir=./debian/oozie/etc/init.d
+	sh -x debian/install_oozie.sh --extra-dir=debian/ --build-dir=. --server-dir=./debian/oozie
--client-dir=./debian/oozie-client --docs-dir=./debian/oozie-client/usr/share/doc/oozie --initd-dir=./debian/oozie/etc/init.d
--conf-dir=./debian/oozie/etc/oozie/conf.dist
 	dh_install -i
 
 binary-common:

Modified: incubator/bigtop/trunk/bigtop-packages/src/deb/sqoop/rules
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/deb/sqoop/rules?rev=1242880&r1=1242879&r2=1242880&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/deb/sqoop/rules (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/deb/sqoop/rules Fri Feb 10 18:45:15 2012
@@ -46,6 +46,7 @@ install-indep:	
 	dh_testroot
 	sh -x debian/install_sqoop.sh \
 	  --build-dir=. \
+	  --conf-dir=/etc/sqoop/conf.dist \
 	  --prefix=debian/sqoop
 	dh_install -i
 

Copied: incubator/bigtop/trunk/bigtop-packages/src/deb/sqoop/sqoop.postinst (from r1242182,
incubator/bigtop/trunk/bigtop-packages/src/deb/hbase/hbase.postinst)
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/deb/sqoop/sqoop.postinst?p2=incubator/bigtop/trunk/bigtop-packages/src/deb/sqoop/sqoop.postinst&p1=incubator/bigtop/trunk/bigtop-packages/src/deb/hbase/hbase.postinst&r1=1242182&r2=1242880&rev=1242880&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/deb/hbase/hbase.postinst (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/deb/sqoop/sqoop.postinst Fri Feb 10 18:45:15
2012
@@ -15,22 +15,24 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# postinst script for hbase
+# postinst script for sqoop 
 
 set -e
 
 case "$1" in
-	configure)
-		chown hbase:hbase -R /var/run/hbase /var/log/hbase
-	;;
-
-	abort-upgrade|abort-remove|abort-deconfigure)
-	;;
-
-	*)
-		echo "postinst called with unknown argument \`$1'" >&2
-		exit 1
-	;;
+    configure)
+        # Install config alternatives
+        update-alternatives  --install /etc/sqoop/conf sqoop-conf /etc/sqoop/conf.dist 30
+
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
 esac
 
 #DEBHELPER#

Copied: incubator/bigtop/trunk/bigtop-packages/src/deb/sqoop/sqoop.prerm (from r1242182, incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/oozie.postinst)
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/deb/sqoop/sqoop.prerm?p2=incubator/bigtop/trunk/bigtop-packages/src/deb/sqoop/sqoop.prerm&p1=incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/oozie.postinst&r1=1242182&r2=1242880&rev=1242880&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/deb/oozie/oozie.postinst (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/deb/sqoop/sqoop.prerm Fri Feb 10 18:45:15 2012
@@ -15,40 +15,43 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# postinst script for oozie 
+# prerm script for sqoop 
 #
 # see: dh_installdeb(1)
 
 set -e
 
 # summary of how this script can be called:
-#        * <postinst> `configure' <most-recently-configured-version>
-#        * <old-postinst> `abort-upgrade' <new version>
-#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-#          <new-version>
-#        * <postinst> `abort-remove'
-#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-#          <failed-install-package> <version> `removing'
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
 #          <conflicting-package> <version>
 # for details, see http://www.debian.org/doc/debian-policy/ or
 # the debian-policy package
 
 
 case "$1" in
-    configure)
-        chown -R oozie:oozie /var/lib/oozie /var/log/oozie
-        update-rc.d oozie defaults >/dev/null || exit 1
-        /usr/lib/oozie/bin/oozie-setup.sh -hadoop 0.20.200 /usr/lib/hadoop
+    remove|upgrade|deconfigure)
+      update-alternatives --remove sqoop-conf /etc/sqoop/conf.dist || :
     ;;
 
-    abort-upgrade|abort-remove|abort-deconfigure)
+    failed-upgrade)
     ;;
 
     *)
-        echo "postinst called with unknown argument \`$1'" >&2
+        echo "prerm called with unknown argument \`$1'" >&2
         exit 1
     ;;
 esac
 
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
 exit 0
 
+

Modified: incubator/bigtop/trunk/bigtop-packages/src/rpm/hbase/SPECS/hbase.spec
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/rpm/hbase/SPECS/hbase.spec?rev=1242880&r1=1242879&r2=1242880&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/rpm/hbase/SPECS/hbase.spec (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/rpm/hbase/SPECS/hbase.spec Fri Feb 10 18:45:15
2012
@@ -12,7 +12,8 @@
 # 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.
-%define etc_hbase /etc/%{name}
+%define etc_hbase_conf %{_sysconfdir}/%{name}/conf
+%define etc_hbase_conf_dist %{etc_hbase_conf}.dist
 %define hbase_home /usr/lib/%{name}
 %define bin_hbase %{hbase_home}/bin
 %define lib_hbase %{hbase_home}/lib
@@ -46,11 +47,13 @@
 
 %define doc_hbase %{_docdir}/%{name}
 %global initd_dir %{_sysconfdir}/rc.d
+%define alternatives_cmd update-alternatives
 
 %else
 
 %define doc_hbase %{_docdir}/%{name}-%{hbase_version}
 %global initd_dir %{_sysconfdir}/rc.d/init.d
+%define alternatives_cmd alternatives
 
 %endif
 
@@ -197,7 +200,8 @@ env HBASE_VERSION=%{version} bash %{SOUR
 %__rm -rf $RPM_BUILD_ROOT
 sh %{SOURCE2} \
 	--build-dir=. \
-   --doc-dir=%{doc_hbase} \
+        --doc-dir=%{doc_hbase} \
+        --conf-dir=%{etc_hbase_conf_dist} \
 	--prefix=$RPM_BUILD_ROOT
 
 %__install -d -m 0755 $RPM_BUILD_ROOT/%{initd_dir}/
@@ -239,6 +243,15 @@ ln -f -s %{hbase_jar_deps} $RPM_BUILD_RO
 getent group hbase 2>/dev/null >/dev/null || /usr/sbin/groupadd -r hbase
 getent passwd hbase 2>&1 > /dev/null || /usr/sbin/useradd -c "HBase" -s /sbin/nologin
-g hbase -r -d /var/run/hbase hbase 2> /dev/null || :
 
+%post
+%{alternatives_cmd} --install %{etc_hbase_conf} %{name}-conf %{etc_hbase_conf_dist} 30
+
+%preun
+if [ "$1" = 0 ]; then
+        %{alternatives_cmd} --remove %{name}-conf %{etc_hbase_conf_dist} || :
+fi
+
+
 #######################
 #### FILES SECTION ####
 #######################
@@ -256,7 +269,7 @@ getent passwd hbase 2>&1 > /dev/null || 
 %{hbase_home}/hbase-*.jar
 %{webapps_hbase}
 /usr/bin/hbase
-%config(noreplace) %{etc_hbase}/conf
+%config(noreplace) %{etc_hbase_conf_dist}
 
 %files doc
 %defattr(-,root,root)

Modified: incubator/bigtop/trunk/bigtop-packages/src/rpm/oozie/SPECS/oozie.spec
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/rpm/oozie/SPECS/oozie.spec?rev=1242880&r1=1242879&r2=1242880&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/rpm/oozie/SPECS/oozie.spec (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/rpm/oozie/SPECS/oozie.spec Fri Feb 10 18:45:15
2012
@@ -15,15 +15,18 @@
 %define usr_bin /usr/bin
 %define lib_oozie /usr/lib/oozie
 %define man_dir /usr/share/man
-%define conf_oozie /etc/oozie
+%define conf_oozie %{_sysconfdir}/%{name}/conf
+%define conf_oozie_dist %{conf_oozie}.dist
 %define data_oozie /var/lib/oozie
 
 %if  %{!?suse_version:1}0
   %define doc_oozie %{_docdir}/oozie-%{oozie_version}
   %define initd_dir %{_sysconfdir}/rc.d/init.d
+  %define alternatives_cmd alternatives
 %else
   %define doc_oozie %{_docdir}/oozie
   %define initd_dir %{_sysconfdir}/rc.d
+  %define alternatives_cmd update-alternatives
 %endif
 
 Name: oozie
@@ -36,7 +39,7 @@ Buildroot: %{_topdir}/INSTALL/%{name}-%{
 License: APL2
 Source0: %{name}-%{oozie_base_version}.tar.gz
 Source1: do-component-build
-Source2: create-package-layout
+Source2: install_oozie.sh 
 Requires(pre): /usr/sbin/groupadd, /usr/sbin/useradd
 Requires(post): /sbin/chkconfig, hadoop
 Requires(preun): /sbin/chkconfig, /sbin/service
@@ -115,7 +118,7 @@ Requires: bigtop-utils
 
 %install
 %__rm -rf $RPM_BUILD_ROOT
-    sh %{SOURCE2} --extra-dir=$RPM_SOURCE_DIR --build-dir=. --server-dir=$RPM_BUILD_ROOT
--client-dir=$RPM_BUILD_ROOT --docs-dir=$RPM_BUILD_ROOT%{doc_oozie} --initd-dir=$RPM_BUILD_ROOT%{initd_dir}
+    sh %{SOURCE2} --extra-dir=$RPM_SOURCE_DIR --build-dir=. --server-dir=$RPM_BUILD_ROOT
--client-dir=$RPM_BUILD_ROOT --docs-dir=$RPM_BUILD_ROOT%{doc_oozie} --initd-dir=$RPM_BUILD_ROOT%{initd_dir}
--conf-dir=$RPM_BUILD_ROOT%{conf_oozie_dist}
 
 %__install -d -m 0755 $RPM_BUILD_ROOT/usr/bin
 
@@ -141,6 +144,14 @@ if [ $1 -ge 1 ]; then
   /sbin/service oozie condrestart > /dev/null
 fi
 
+%post client
+%{alternatives_cmd} --install %{conf_oozie} %{name}-conf %{conf_oozie_dist} 30
+
+%preun client
+if [ "$1" = 0 ]; then
+  %{alternatives_cmd} --remove %{name}-conf %{conf_oozie_dist} || :
+fi
+
 %files 
 %defattr(-,root,root)
 %{lib_oozie}/bin/addtowar.sh
@@ -154,7 +165,6 @@ fi
 %{lib_oozie}/oozie.war
 %{lib_oozie}/oozie-sharelib.tar.gz
 %{lib_oozie}/oozie-server
-%config(noreplace) %{conf_oozie}
 %{initd_dir}/oozie
 %defattr(-, oozie, oozie)
 %dir %{_localstatedir}/log/oozie
@@ -163,6 +173,7 @@ fi
 
 %files client
 %defattr(-,root,root)
+%config(noreplace) %{conf_oozie_dist}
 %{usr_bin}/oozie
 %dir %{lib_oozie}/bin
 %{lib_oozie}/bin/oozie

Modified: incubator/bigtop/trunk/bigtop-packages/src/rpm/sqoop/SPECS/sqoop.spec
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/rpm/sqoop/SPECS/sqoop.spec?rev=1242880&r1=1242879&r2=1242880&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/rpm/sqoop/SPECS/sqoop.spec (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/rpm/sqoop/SPECS/sqoop.spec Fri Feb 10 18:45:15
2012
@@ -13,17 +13,21 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 %define lib_sqoop /usr/lib/sqoop
+%define conf_sqoop %{_sysconfdir}/%{name}/conf
+%define conf_sqoop_dist %{conf_sqoop}.dist
 
 
 %if  %{?suse_version:1}0
 
 %define doc_sqoop %{_docdir}/sqoop
 %global initd_dir %{_sysconfdir}/rc.d
+%define alternatives_cmd update-alternatives
 
 %else
 
 %define doc_sqoop %{_docdir}/sqoop-%{sqoop_version}
 %global initd_dir %{_sysconfdir}/rc.d/init.d
+%define alternatives_cmd alternatives
 
 %endif
 
@@ -88,6 +92,7 @@ bash %{SOURCE1} -Dversion=%{version}
 %__rm -rf $RPM_BUILD_ROOT
 sh %{SOURCE2} \
           --build-dir=. \
+          --conf-dir=%{conf_sqoop_dist} \
           --doc-dir=%{doc_sqoop} \
           --prefix=$RPM_BUILD_ROOT
 
@@ -114,6 +119,14 @@ getent group sqoop >/dev/null || groupad
 getent passwd sqoop > /dev/null || useradd -c "Sqoop" -s /sbin/nologin \
 	-g sqoop -r -d /var/lib/sqoop sqoop 2> /dev/null || :
 
+%post
+%{alternatives_cmd} --install %{conf_sqoop} %{name}-conf %{conf_sqoop_dist} 30
+
+%preun
+if [ "$1" = 0 ]; then
+  %{alternatives_cmd} --remove %{name}-conf %{conf_sqoop_dist} || :
+fi
+
 %post metastore
 chkconfig --add sqoop-metastore
 
@@ -137,7 +150,7 @@ fi
 %files 
 %defattr(0755,root,root)
 %{lib_sqoop}
-%config(noreplace) %{_sysconfdir}/sqoop/conf
+%config(noreplace) %{conf_sqoop_dist}
 %{_bindir}/sqoop
 %{_bindir}/sqoop-codegen
 %{_bindir}/sqoop-create-hive-table

Modified: incubator/bigtop/trunk/bigtop-tests/test-artifacts/package/src/main/resources/package_data_apt.xml
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-tests/test-artifacts/package/src/main/resources/package_data_apt.xml?rev=1242880&r1=1242879&r2=1242880&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-tests/test-artifacts/package/src/main/resources/package_data_apt.xml
(original)
+++ incubator/bigtop/trunk/bigtop-tests/test-artifacts/package/src/main/resources/package_data_apt.xml
Fri Feb 10 18:45:15 2012
@@ -1336,6 +1336,14 @@
     <file name="/usr/share/man/man1/sqoop-metastore.1.gz" owners="1" perm="-rw-r--r--"
user="root" group="root"/>
     <file name="/usr/share/man/man1/sqoop-version.1.gz" owners="1" perm="-rw-r--r--" user="root"
group="root"/>
   </content>
+  <alternatives>
+    <sqoop-conf>
+      <status>auto</status>
+      <link>/etc/sqoop/conf</link>
+      <value>/etc/sqoop/conf.dist</value>
+      <alt>/etc/sqoop/conf.dist</alt>
+    </sqoop-conf>
+  </alternatives>
 </sqoop>
 <sqoop-metastore>
   <metadata>
@@ -2354,6 +2362,14 @@
     <file name="/usr/lib/oozie/lib/alfredo-0.1.4.jar" owners="1" perm="-rw-r--r--" user="root"
group="root"/>
     <file name="/usr/lib/oozie/lib/commons-lang-2.4.jar" owners="1" perm="-rw-r--r--"
user="root" group="root"/>
   </content>
+  <alternatives>
+    <oozie-conf>
+      <status>auto</status>
+      <link>/etc/oozie/conf</link>
+      <value>/etc/oozie/conf.dist</value>
+      <alt>/etc/oozie/conf.dist</alt>
+    </oozie-conf>
+  </alternatives>
 </oozie-client>
 <zookeeper>
   <metadata>
@@ -7243,6 +7259,14 @@
     <file name="/usr/lib/hbase/lib/hadoop-core.jar" owners="1" perm="lrwxrwxrwx" user="root"
group="root" target="../../hadoop/hadoop-core.jar"/>
     <file name="/usr/lib/hbase/conf" owners="1" perm="lrwxrwxrwx" user="root" group="root"
target="/etc/hbase/conf"/>
   </content>
+  <alternatives>
+    <hbase-conf>
+      <status>auto</status>
+      <value>/etc/hbase/conf.dist</value>
+      <link>/etc/hbase/conf</link>
+      <alt>/etc/hbase/conf.dist</alt>
+    </hbase-conf>
+  </alternatives>
   <groups>
     <hbase>
       <user>hbase</user>

Modified: incubator/bigtop/trunk/bigtop-tests/test-artifacts/package/src/main/resources/package_data_urpmi.xml
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-tests/test-artifacts/package/src/main/resources/package_data_urpmi.xml?rev=1242880&r1=1242879&r2=1242880&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-tests/test-artifacts/package/src/main/resources/package_data_urpmi.xml
(original)
+++ incubator/bigtop/trunk/bigtop-tests/test-artifacts/package/src/main/resources/package_data_urpmi.xml
Fri Feb 10 18:45:15 2012
@@ -1308,6 +1308,14 @@ also on potential use cases. Come to the
     <doc  name="/usr/share/man/man1/sqoop-version.1.gz" owners="1" perm="-rw-r--r--" user="root"
group="root"/>
     <doc  name="/usr/share/man/man1/sqoop.1.gz" owners="1" perm="-rw-r--r--" user="root"
group="root"/>
   </content>
+  <alternatives>
+    <sqoop-conf>
+      <status>auto</status>
+      <link>/etc/sqoop/conf</link>
+      <value>/etc/sqoop/conf.dist</value>
+      <alt>/etc/sqoop/conf.dist</alt>
+    </sqoop-conf>
+  </alternatives>
 </sqoop>
 <sqoop-metastore>
   <metadata>
@@ -2311,6 +2319,14 @@ also on potential use cases. Come to the
     <doc  name="/usr/share/doc/oozie/release-log.txt" owners="1" perm="-rw-r--r--" user="root"
group="root"/>
     <doc  name="/usr/share/man/man1/oozie.1.gz" owners="1" perm="-rw-r--r--" user="root"
group="root"/>
   </content>
+  <alternatives>
+    <oozie-conf>
+      <status>auto</status>
+      <link>/etc/oozie/conf</link>
+      <value>/etc/oozie/conf.dist</value>
+      <alt>/etc/oozie/conf.dist</alt>
+    </oozie-conf>
+  </alternatives>
 </oozie-client>
 <zookeeper>
   <metadata>
@@ -7286,6 +7302,14 @@ difficult to manage. Even when done corr
     <file name="/usr/lib/hbase/lib/zookeeper.jar" owners="1" perm="lrwxrwxrwx" user="hbase"
group="hbase" target="/usr/lib/zookeeper/zookeeper.jar"/>
     <doc  name="/usr/share/man/man1/hbase.1.gz" owners="1" perm="-rw-r--r--" user="root"
group="root"/>
   </content>
+  <alternatives>
+    <hbase-conf>
+      <status>auto</status>
+      <value>/etc/hbase/conf.dist</value>
+      <link>/etc/hbase/conf</link>
+      <alt>/etc/hbase/conf.dist</alt>
+    </hbase-conf>
+  </alternatives>
   <groups>
     <hbase>
       <user>hbase</user>

Modified: incubator/bigtop/trunk/bigtop-tests/test-artifacts/package/src/main/resources/package_data_yum.xml
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-tests/test-artifacts/package/src/main/resources/package_data_yum.xml?rev=1242880&r1=1242879&r2=1242880&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-tests/test-artifacts/package/src/main/resources/package_data_yum.xml
(original)
+++ incubator/bigtop/trunk/bigtop-tests/test-artifacts/package/src/main/resources/package_data_yum.xml
Fri Feb 10 18:45:15 2012
@@ -1570,6 +1570,14 @@ also on potential use cases. Come to the
       <doc name="/usr/share/man/man1/sqoop-version.1.gz" perm="-rw-r--r--" group="root"
owners="-1" user="root"/>
       <doc name="/usr/share/man/man1/sqoop.1.gz" perm="-rw-r--r--" group="root" owners="-1"
user="root"/>
     </content>
+    <alternatives>
+     <sqoop-conf>
+       <status>auto</status>
+       <link>/etc/sqoop/conf</link>
+       <value>/etc/sqoop/conf.dist</value>
+       <alt>/etc/sqoop/conf.dist</alt>
+     </sqoop-conf>
+    </alternatives>
   </sqoop>
   <sqoop-metastore>
     <metadata>
@@ -4124,6 +4132,14 @@ also on potential use cases. Come to the
       <doc name="/usr/share/doc/oozie-%{package_version}/target/site/index.html" perm="-rw-r--r--"
group="root" owners="-1" user="root"/>
       <doc name="/usr/share/man/man1/oozie.1.gz" perm="-rw-r--r--" group="root" owners="-1"
user="root"/>
     </content>
+    <alternatives>
+      <oozie-conf>
+        <status>auto</status>
+        <link>/etc/oozie/conf</link>
+        <value>/etc/oozie/conf.dist</value>
+        <alt>/etc/oozie/conf.dist</alt>
+      </oozie-conf>
+    </alternatives>
   </oozie-client>
   <zookeeper>
     <metadata>
@@ -9062,6 +9078,14 @@ difficult to manage. Even when done corr
       <file name="/var/log/hbase" perm="drwxr-xr-x" group="hbase" owners="-1" user="hbase"/>
       <file name="/var/run/hbase" perm="drwxr-xr-x" group="hbase" owners="-1" user="hbase"/>
     </content>
+    <alternatives>
+      <hbase-conf>
+        <status>auto</status>
+        <value>/etc/hbase/conf.dist</value>
+        <link>/etc/hbase/conf</link>
+        <alt>/etc/hbase/conf.dist</alt>
+      </hbase-conf>
+    </alternatives>
     <groups>
       <hbase>
         <user>hbase</user>

Modified: incubator/bigtop/trunk/bigtop-tests/test-artifacts/package/src/main/resources/package_data_zypper.xml
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-tests/test-artifacts/package/src/main/resources/package_data_zypper.xml?rev=1242880&r1=1242879&r2=1242880&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-tests/test-artifacts/package/src/main/resources/package_data_zypper.xml
(original)
+++ incubator/bigtop/trunk/bigtop-tests/test-artifacts/package/src/main/resources/package_data_zypper.xml
Fri Feb 10 18:45:15 2012
@@ -1308,6 +1308,14 @@ also on potential use cases. Come to the
     <doc  name="/usr/share/man/man1/sqoop-version.1.gz" owners="1" perm="-rw-r--r--" user="root"
group="root"/>
     <doc  name="/usr/share/man/man1/sqoop.1.gz" owners="1" perm="-rw-r--r--" user="root"
group="root"/>
   </content>
+  <alternatives>
+    <sqoop-conf>
+      <status>auto</status>
+      <link>/etc/sqoop/conf</link>
+      <value>/etc/sqoop/conf.dist</value>
+      <alt>/etc/sqoop/conf.dist</alt>
+    </sqoop-conf>
+  </alternatives>
 </sqoop>
 <sqoop-metastore>
   <metadata>
@@ -2311,6 +2319,14 @@ also on potential use cases. Come to the
     <doc  name="/usr/share/doc/packages/oozie/release-log.txt" owners="1" perm="-rw-r--r--"
user="root" group="root"/>
     <doc  name="/usr/share/man/man1/oozie.1.gz" owners="1" perm="-rw-r--r--" user="root"
group="root"/>
   </content>
+  <alternatives>
+    <oozie-conf>
+      <status>auto</status>
+      <link>/etc/oozie/conf</link>
+      <value>/etc/oozie/conf.dist</value>
+      <alt>/etc/oozie/conf.dist</alt>
+    </oozie-conf>
+  </alternatives>
 </oozie-client>
 <zookeeper>
   <metadata>
@@ -7206,6 +7222,14 @@ difficult to manage. Even when done corr
     <file name="/usr/lib/hbase/lib/zookeeper.jar" owners="1" perm="lrwxrwxrwx" user="hbase"
group="hbase" target="/usr/lib/zookeeper/zookeeper.jar"/>
     <doc  name="/usr/share/man/man1/hbase.1.gz" owners="1" perm="-rw-r--r--" user="root"
group="root"/>
   </content>
+  <alternatives>
+    <hbase-conf>
+      <status>auto</status>
+      <value>/etc/hbase/conf.dist</value>
+      <link>/etc/hbase/conf</link>
+      <alt>/etc/hbase/conf.dist</alt>
+    </hbase-conf>
+  </alternatives>
   <groups>
     <hbase>
       <user>hbase</user>



Mime
View raw message