From 4126e86dfb455cceba9eaa44144210e51bf53cc2 Mon Sep 17 00:00:00 2001 From: Keith Holman Date: Wed, 11 Jun 2014 09:53:34 -0400 Subject: cloud-init: install to correct target directory The setup.py script that is included with the cloud-init code is setup to install files into the "/usr/lib" directory. On 64-bit machines the target directory should be "/usr/lib64". This generates a warning when using bitbake. This fix performs a search and replace on the setup.py file to set the correct output directory. This fix also adds a symbolic link to each script from the /etc/cloud directory to make the scripts available from a more obvious location. Signed-off-by: Keith Holman --- meta-openstack/recipes-extended/cloud-init/cloud-init_0.7.4.bb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meta-openstack/recipes-extended/cloud-init/cloud-init_0.7.4.bb b/meta-openstack/recipes-extended/cloud-init/cloud-init_0.7.4.bb index 57f689d..9e460a7 100644 --- a/meta-openstack/recipes-extended/cloud-init/cloud-init_0.7.4.bb +++ b/meta-openstack/recipes-extended/cloud-init/cloud-init_0.7.4.bb @@ -22,10 +22,17 @@ DISTUTILS_INSTALL_ARGS_append = " ${@base_contains('DISTRO_FEATURES', 'systemd', MANAGE_HOSTS ?= "False" HOSTNAME ?= "" +do_install_prepend() { + sed -e 's:/usr/lib/${BPN}:${libdir}/${BPN}:' -i ${S}/setup.py +} + do_install_append() { sed -e "s:%MANAGE_HOSTS%:${MANAGE_HOSTS}:g" -i ${WORKDIR}/cloud.cfg sed -e "s:%HOSTNAME%:${HOSTNAME}:g" -i ${WORKDIR}/cloud.cfg install -m 0755 ${WORKDIR}/cloud.cfg ${D}${sysconfdir}/cloud/cloud.cfg + + ln -s ${libdir}/${BPN}/uncloud-init ${D}${sysconfdir}/cloud/uncloud-init + ln -s ${libdir}/${BPN}/write-ssh-key-fingerprints ${D}${sysconfdir}/cloud/write-ssh-key-fingerprints } inherit setuptools update-rc.d -- cgit v1.2.3-54-g00ecf