X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=build.sh;h=63755032d8eceac6746e09671f92473d0fe35bc9;hb=97c796abf9ccb2bbab82431e39bdd95b87d2ced8;hp=8ac4f25c3b3ff1029a864171bbd5192bbedebcf4;hpb=db15523e3b53b3a1a19a6d0f26c7dae8d9ae410e;p=myplc.git diff --git a/build.sh b/build.sh index 8ac4f25..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 @@ -35,25 +36,37 @@ install -D -m 755 plc-kml.py ${RPM_BUILD_ROOT}/usr/bin/plc-kml.py install -D -m 755 refresh-peer.py ${RPM_BUILD_ROOT}/usr/bin/refresh-peer.py install -D -m 755 clean-empty-dirs.py ${RPM_BUILD_ROOT}/usr/bin/clean-empty-dirs.py install -D -m 755 mtail.py ${RPM_BUILD_ROOT}/usr/bin/mtail.py -install -D -m 755 check-ssl-peering.py ${RPM_BUILD_ROOT}/usr/bin/check-ssl-peering.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" +install -D -m 755 plc.init ${RPM_BUILD_ROOT}/etc/init.d/plc find plc.d | cpio -p -d -u ${RPM_BUILD_ROOT}/etc/ -install -D -m 755 guest.init ${RPM_BUILD_ROOT}/etc/init.d/plc +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