HBASE-5477 Cannot build RPM for hbase-0.92.0
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1294316 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4ef6cb8bc9
commit
91dfa48fd4
|
@ -86,28 +86,26 @@ if [ -d ${RPM_BUILD_DIR}%{_pid_dir} ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p ${RPM_BUILD_DIR}%{_conf_dir}
|
mkdir -p ${RPM_BUILD_DIR}%{_conf_dir}
|
||||||
mkdir -p ${RPM_BUILD_DIR}%{_bin_dir}
|
|
||||||
mkdir -p ${RPM_BUILD_DIR}%{_include_dir}
|
|
||||||
mkdir -p ${RPM_BUILD_DIR}%{_lib_dir}
|
|
||||||
mkdir -p ${RPM_BUILD_DIR}%{_libexec_dir}
|
|
||||||
mkdir -p ${RPM_BUILD_DIR}%{_log_dir}
|
mkdir -p ${RPM_BUILD_DIR}%{_log_dir}
|
||||||
mkdir -p ${RPM_BUILD_DIR}%{_conf_dir}
|
mkdir -p ${RPM_BUILD_DIR}%{_conf_dir}
|
||||||
mkdir -p ${RPM_BUILD_DIR}%{_man_dir}
|
|
||||||
mkdir -p ${RPM_BUILD_DIR}%{_pid_dir}
|
mkdir -p ${RPM_BUILD_DIR}%{_pid_dir}
|
||||||
mkdir -p ${RPM_BUILD_DIR}%{_sbin_dir}
|
|
||||||
mkdir -p ${RPM_BUILD_DIR}%{_share_dir}
|
mkdir -p ${RPM_BUILD_DIR}%{_share_dir}
|
||||||
mkdir -p ${RPM_BUILD_DIR}%{_src_dir}
|
mkdir -p ${RPM_BUILD_DIR}%{_share_dir}/sbin
|
||||||
|
mkdir -p ${RPM_BUILD_DIR}/etc/rc.d/init.d
|
||||||
|
|
||||||
cp ${RPM_BUILD_DIR}/%{_final_name}/src/packages/update-hbase-env.sh ${RPM_BUILD_DIR}/%{_final_name}/sbin/update-hbase-env.sh
|
cp ${RPM_BUILD_DIR}/%{_final_name}/src/packages/update-hbase-env.sh ${RPM_BUILD_DIR}%{_share_dir}/sbin/update-hbase-env.sh
|
||||||
cp ${RPM_BUILD_DIR}/%{_final_name}/src/packages/rpm/init.d/hbase-master ${RPM_BUILD_DIR}/%{_final_name}/sbin/hbase-master
|
cp ${RPM_BUILD_DIR}/%{_final_name}/src/packages/rpm/init.d/hbase-master ${RPM_BUILD_DIR}%{_share_dir}/sbin/hbase-master
|
||||||
cp ${RPM_BUILD_DIR}/%{_final_name}/src/packages/rpm/init.d/hbase-regionserver ${RPM_BUILD_DIR}/%{_final_name}/sbin/hbase-regionserver
|
cp ${RPM_BUILD_DIR}/%{_final_name}/src/packages/rpm/init.d/hbase-regionserver ${RPM_BUILD_DIR}%{_share_dir}/sbin/hbase-regionserver
|
||||||
chmod 0755 ${RPM_BUILD_DIR}/%{_final_name}/sbin/*
|
chmod 0755 ${RPM_BUILD_DIR}%{_share_dir}/sbin/*
|
||||||
rm -f ${RPM_BUILD_DIR}/%{_final_name}/lib/hadoop-core*
|
rm -f ${RPM_BUILD_DIR}/%{_final_name}/*.txt
|
||||||
rm -f ${RPM_BUILD_DIR}/%{_final_name}/lib/zookeeper*
|
rm -f ${RPM_BUILD_DIR}/%{_final_name}/pom.xml
|
||||||
mv -f ${RPM_BUILD_DIR}/%{_final_name}/conf/* ${RPM_BUILD_DIR}%{_conf_dir}
|
mv -f ${RPM_BUILD_DIR}/%{_final_name}/conf/* ${RPM_BUILD_DIR}%{_conf_dir}
|
||||||
|
rmdir ${RPM_BUILD_DIR}/%{_final_name}/conf
|
||||||
|
rm -rf ${RPM_BUILD_DIR}/%{_final_name}/src
|
||||||
mv -f ${RPM_BUILD_DIR}/%{_final_name}/* ${RPM_BUILD_DIR}%{_share_dir}
|
mv -f ${RPM_BUILD_DIR}/%{_final_name}/* ${RPM_BUILD_DIR}%{_share_dir}
|
||||||
|
|
||||||
rm -rf ${RPM_BUILD_DIR}/%{_final_name}
|
%install
|
||||||
|
cp -Rp ${RPM_BUILD_DIR} ${RPM_BUILD_ROOT}
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
${RPM_INSTALL_PREFIX0}/share/hbase/sbin/update-hbase-env.sh \
|
${RPM_INSTALL_PREFIX0}/share/hbase/sbin/update-hbase-env.sh \
|
||||||
|
|
|
@ -108,8 +108,8 @@ if [ "${ARCH}" != "i386" ]; then
|
||||||
LIB_DIR=${LIB_DIR}64
|
LIB_DIR=${LIB_DIR}64
|
||||||
fi
|
fi
|
||||||
|
|
||||||
. /etc/default/hadoop-env.sh
|
[ -f /etc/default/hadoop-env.sh ] && . /etc/default/hadoop-env.sh
|
||||||
. /etc/default/zookeeper-env.sh
|
[ -f /etc/default/zookeeper-env.sh ] && . /etc/default/zookeeper-env.sh
|
||||||
|
|
||||||
if [ "${UNINSTALL}" -eq "1" ]; then
|
if [ "${UNINSTALL}" -eq "1" ]; then
|
||||||
# Remove symlinks
|
# Remove symlinks
|
||||||
|
@ -149,11 +149,11 @@ else
|
||||||
ln -sf ${CONF_DIR}/hbase-env.sh /etc/default/hbase-env.sh
|
ln -sf ${CONF_DIR}/hbase-env.sh /etc/default/hbase-env.sh
|
||||||
ln -sf ${CONF_DIR}/hbase-env.sh /etc/profile.d/hbase-env.sh
|
ln -sf ${CONF_DIR}/hbase-env.sh /etc/profile.d/hbase-env.sh
|
||||||
|
|
||||||
if [ -d ${HADOOP_HOME} ]; then
|
if [ -n "${HADOOP_HOME}" -a -d "${HADOOP_HOME}" ]; then
|
||||||
HADOOP_JARS=`ls ${HADOOP_HOME}/*.jar | tr '\n' ':'`
|
HADOOP_JARS=`ls ${HADOOP_HOME}/*.jar | tr '\n' ':'`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d ${ZOOKEEPER_HOME}/share/zookeeper ]; then
|
if [ -n "${ZOOKEEPER_HOME}" -a -d "${ZOOKEEPER_HOME}/share/zookeeper" ]; then
|
||||||
ZOOKEEPER_JARS=`ls ${ZOOKEEPER_HOME}/share/zookeeper/*.jar | tr '\n' ':'`
|
ZOOKEEPER_JARS=`ls ${ZOOKEEPER_HOME}/share/zookeeper/*.jar | tr '\n' ':'`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue