bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject git commit: BIGTOP-236 The user installed by hbase gets an incorrect home directory
Date Sun, 10 Aug 2014 05:42:27 GMT
Repository: bigtop
Updated Branches:
  refs/heads/master 7ca693cd2 -> 851f5bd67


BIGTOP-236 The user installed by hbase gets an incorrect home directory

Signed-off-by: Mark Grover <mark@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/851f5bd6
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/851f5bd6
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/851f5bd6

Branch: refs/heads/master
Commit: 851f5bd67f3ddbdaa07ef5c34312dfa36a343a4b
Parents: 7ca693c
Author: zhouyi <james_zhouyi2008@126.com>
Authored: Sun Jul 27 20:43:16 2014 +0800
Committer: Mark Grover <mark@apache.org>
Committed: Sat Aug 9 22:42:22 2014 -0700

----------------------------------------------------------------------
 bigtop-packages/src/common/hbase/hbase.svc     | 2 +-
 bigtop-packages/src/deb/hbase/hbase.dirs       | 1 +
 bigtop-packages/src/deb/hbase/hbase.postinst   | 2 +-
 bigtop-packages/src/rpm/hbase/SPECS/hbase.spec | 5 ++++-
 4 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/851f5bd6/bigtop-packages/src/common/hbase/hbase.svc
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/hbase/hbase.svc b/bigtop-packages/src/common/hbase/hbase.svc
index c112488..7c92dc9 100644
--- a/bigtop-packages/src/common/hbase/hbase.svc
+++ b/bigtop-packages/src/common/hbase/hbase.svc
@@ -17,7 +17,7 @@ DAEMON="hbase-@HBASE_DAEMON@"
 DESC="HBase @HBASE_DAEMON@ daemon"
 EXEC_PATH="/usr/lib/hbase/bin/hbase-daemon.sh"
 SVC_USER="hbase"
-WORKING_DIR="/var/run/hbase"
+WORKING_DIR="/var/lib/hbase"
 DAEMON_FLAGS=""
 CONF_DIR="/etc/hbase/conf"
 PIDFILE="/var/run/hbase/hbase-${DAEMON}.pid"

http://git-wip-us.apache.org/repos/asf/bigtop/blob/851f5bd6/bigtop-packages/src/deb/hbase/hbase.dirs
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/hbase/hbase.dirs b/bigtop-packages/src/deb/hbase/hbase.dirs
index 37311ec..f32fdf4 100644
--- a/bigtop-packages/src/deb/hbase/hbase.dirs
+++ b/bigtop-packages/src/deb/hbase/hbase.dirs
@@ -2,3 +2,4 @@
 /var/log/hbase
 /var/run/hbase
 /etc/default
+/var/lib/hbase

http://git-wip-us.apache.org/repos/asf/bigtop/blob/851f5bd6/bigtop-packages/src/deb/hbase/hbase.postinst
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/hbase/hbase.postinst b/bigtop-packages/src/deb/hbase/hbase.postinst
index 3efd52e..407281e 100644
--- a/bigtop-packages/src/deb/hbase/hbase.postinst
+++ b/bigtop-packages/src/deb/hbase/hbase.postinst
@@ -22,7 +22,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
+		chown hbase:hbase -R /var/run/hbase /var/log/hbase /var/lib/hbase
 	;;
 
 	abort-upgrade|abort-remove|abort-deconfigure)

http://git-wip-us.apache.org/repos/asf/bigtop/blob/851f5bd6/bigtop-packages/src/rpm/hbase/SPECS/hbase.spec
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/rpm/hbase/SPECS/hbase.spec b/bigtop-packages/src/rpm/hbase/SPECS/hbase.spec
index 30100cb..1935972 100644
--- a/bigtop-packages/src/rpm/hbase/SPECS/hbase.spec
+++ b/bigtop-packages/src/rpm/hbase/SPECS/hbase.spec
@@ -287,6 +287,8 @@ ln -s %{_localstatedir}/log/%{name} %{buildroot}/%{logs_hbase}
 %__install -d  -m 0755  %{buildroot}/%{_localstatedir}/run/%{name}
 ln -s %{_localstatedir}/run/%{name} %{buildroot}/%{pids_hbase}
 
+%__install -d  -m 0755  %{buildroot}/%{_localstatedir}/lib/%{name}
+
 for service in %{hbase_services}
 do
     init_file=$RPM_BUILD_ROOT/%{initd_dir}/%{name}-${service}
@@ -314,7 +316,7 @@ ln -f -s %{zookeeper_home}/zookeeper.jar $RPM_BUILD_ROOT/%{lib_hbase}
 
 %pre
 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 || :
+getent passwd hbase 2>&1 > /dev/null || /usr/sbin/useradd -c "HBase" -s /sbin/nologin
-g hbase -r -d /var/lib/hbase hbase 2> /dev/null || :
 
 %post
 %{alternatives_cmd} --install %{etc_hbase_conf} %{name}-conf %{etc_hbase_conf_dist} 30
@@ -334,6 +336,7 @@ fi
 %{pids_hbase}
 %dir %{_localstatedir}/log/hbase
 %dir %{_localstatedir}/run/hbase
+%dir %{_localstatedir}/lib/hbase
 
 %defattr(-,root,root)
 %config(noreplace) %{_sysconfdir}/default/hbase


Mime
View raw message