X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=build.sh;h=63755032d8eceac6746e09671f92473d0fe35bc9;hb=ce74bb0bd3771bd27fe487ff5da21fb7f8a6c1ca;hp=60011c5a276fe19996bcb1e736d49b8f6f5bb819;hpb=92df45b1cd8d1f53c726b850757e654b3c7e544e;p=myplc.git diff --git a/build.sh b/build.sh index 60011c5..6375503 100755 --- a/build.sh +++ b/build.sh @@ -20,10 +20,11 @@ echo "* myplc-native: Installing configuration scripts" pldistro=$1; shift RPM_BUILD_ROOT=$1 ; shift +PYTHON_SITEARCH=`python -c 'from distutils.sysconfig import get_python_lib; print get_python_lib(1)'` rm -rf ${RPM_BUILD_ROOT} mkdir -p ${RPM_BUILD_ROOT} -echo "* myplc-native: installing plc_config.py in /usr/share/myplc" -install -D -m 755 plc_config.py ${RPM_BUILD_ROOT}/usr/share/myplc/plc_config.py +echo "* myplc-native: installing plc_config.py in " ${PYTHON_SITEARCH} +install -D -m 755 plc_config.py ${RPM_BUILD_ROOT}/${PYTHON_SITEARCH}/plc_config.py install -D -m 644 bashrc ${RPM_BUILD_ROOT}/usr/share/myplc/bashrc echo "* myplc-native: installing scripts in /usr/bin" install -D -m 755 plc-config ${RPM_BUILD_ROOT}/usr/bin/plc-config @@ -37,24 +38,35 @@ install -D -m 755 clean-empty-dirs.py ${RPM_BUILD_ROOT}/usr/bin/clean-empty-dirs install -D -m 755 mtail.py ${RPM_BUILD_ROOT}/usr/bin/mtail.py install -D -m 755 plc-check-ssl-peering.py ${RPM_BUILD_ROOT}/usr/bin/plc-check-ssl-peering.py install -D -m 755 plc-orphan-accounts.py ${RPM_BUILD_ROOT}/usr/bin/plc-orphan-accounts.py + # Extra scripts (mostly for mail and dns) not installed by myplc by default. Used in production echo "* myplc-native: installing scripts in /etc/support-scripts" mkdir -p ${RPM_BUILD_ROOT}/etc/support-scripts cp support-scripts/* ${RPM_BUILD_ROOT}/etc/support-scripts +chmod 444 ${RPM_BUILD_ROOT}/etc/support-scripts/* + # copy initscripts to etc/plc_sliceinitscripts mkdir -p ${RPM_BUILD_ROOT}/etc/plc_sliceinitscripts cp plc_sliceinitscripts/* ${RPM_BUILD_ROOT}/etc/plc_sliceinitscripts +chmod 444 ${RPM_BUILD_ROOT}/etc/plc_sliceinitscripts/* # Install initscripts echo "* myplc-native: Installing initscripts" -find plc.d | cpio -p -d -u ${RPM_BUILD_ROOT}/etc/ install -D -m 755 plc.init ${RPM_BUILD_ROOT}/etc/init.d/plc +find plc.d | cpio -p -d -u ${RPM_BUILD_ROOT}/etc/ +chmod 755 ${RPM_BUILD_ROOT}/etc/plc.d/* # Install configuration file echo "* myplc: Installing configuration file" install -D -m 444 default_config.xml ${RPM_BUILD_ROOT}/etc/planetlab/default_config.xml install -D -m 444 plc_config.dtd ${RPM_BUILD_ROOT}/etc/planetlab/plc_config.dtd +# Install db-config.d files +echo "* myplc: Installing db-config.d files" +mkdir -p ${RPM_BUILD_ROOT}/etc/planetlab/db-config.d +cp db-config.d/* ${RPM_BUILD_ROOT}/etc/planetlab/db-config.d +chmod 444 ${RPM_BUILD_ROOT}/etc/planetlab/db-config.d/* + # yumgroups.xml and yum repo : let noderepo handle that exit 0