debian: Package symlinks and config files for AWS API

We should not do any of these things on postinst files, this will lead to garbage
staying behind when removing the package, confusing sysadmins

By creating the symlinks on the rules file they will get added into the DEB package
and cleaned up should the package be removed.
This commit is contained in:
Wido den Hollander 2012-10-10 17:50:27 +02:00
parent c446c459b9
commit 3854de46ce
2 changed files with 8 additions and 13 deletions

View File

@ -18,17 +18,6 @@
case "$1" in
configure)
mkdir -p /usr/share/cloud/management/webapps7080
if [ ! -h /usr/share/cloud/management/webapps7080/awsapi ]; then
ln -sf /usr/share/cloud/bridge/webapps7080/awsapi /usr/share/cloud/management/webapps7080/awsapi
fi
confs="cloud-bridge.properties ec2-service.properties"
for c in $confs
do
cp -f /usr/share/cloud/bridge/conf/$c /usr/share/cloud/management/conf
done
chown cloud:cloud /usr/share/cloud/bridge/webapps7080/awsapi -R
chmod 755 /usr/share/cloud/bridge/webapps7080/awsapi -R
chown cloud:cloud /usr/share/cloud/bridge/webapps7080/awsapi -R
chmod 755 /usr/share/cloud/bridge/webapps7080/awsapi -R
esac
#DEBHELPER#

6
debian/rules vendored
View File

@ -84,6 +84,12 @@ install-arch:
./waf install --destdir=$(CURDIR)/debian/tmp install --nochown --build-number=$(BUILDNUMBER)
ant deploy-rpm-install -Drpm.install.dir=$(CURDIR)/debian/tmp
# Some stuff for AWS API so we don't have to do this in the postinst
mkdir $(CURDIR)/debian/tmp/usr/share/cloud/management/webapps7080
ln -s /usr/share/cloud/bridge/webapps7080/awsapi $(CURDIR)/debian/tmp/usr/share/cloud/management/webapps7080/awsapi
ln -s /usr/share/cloud/bridge/conf/cloud-bridge.properties $(CURDIR)/debian/tmp/etc/cloud/management/cloud-bridge.properties
ln -s /usr/share/cloud/bridge/conf/ec2-service.properties $(CURDIR)/debian/tmp/etc/cloud/management/ec2-service.properties
dh_install -s
# Must not depend on anything. This is to be called by
# binary-arch/binary-indep