Skip to content

Commit 3854de4

Browse files
committed
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.
1 parent c446c45 commit 3854de4

2 files changed

Lines changed: 8 additions & 13 deletions

File tree

debian/cloud-awsapi.postinst

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,6 @@
1818

1919
case "$1" in
2020
configure)
21-
mkdir -p /usr/share/cloud/management/webapps7080
22-
if [ ! -h /usr/share/cloud/management/webapps7080/awsapi ]; then
23-
ln -sf /usr/share/cloud/bridge/webapps7080/awsapi /usr/share/cloud/management/webapps7080/awsapi
24-
fi
25-
confs="cloud-bridge.properties ec2-service.properties"
26-
for c in $confs
27-
do
28-
cp -f /usr/share/cloud/bridge/conf/$c /usr/share/cloud/management/conf
29-
done
30-
chown cloud:cloud /usr/share/cloud/bridge/webapps7080/awsapi -R
31-
chmod 755 /usr/share/cloud/bridge/webapps7080/awsapi -R
21+
chown cloud:cloud /usr/share/cloud/bridge/webapps7080/awsapi -R
22+
chmod 755 /usr/share/cloud/bridge/webapps7080/awsapi -R
3223
esac
33-
34-
#DEBHELPER#

debian/rules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ install-arch:
8484
./waf install --destdir=$(CURDIR)/debian/tmp install --nochown --build-number=$(BUILDNUMBER)
8585
ant deploy-rpm-install -Drpm.install.dir=$(CURDIR)/debian/tmp
8686

87+
# Some stuff for AWS API so we don't have to do this in the postinst
88+
mkdir $(CURDIR)/debian/tmp/usr/share/cloud/management/webapps7080
89+
ln -s /usr/share/cloud/bridge/webapps7080/awsapi $(CURDIR)/debian/tmp/usr/share/cloud/management/webapps7080/awsapi
90+
ln -s /usr/share/cloud/bridge/conf/cloud-bridge.properties $(CURDIR)/debian/tmp/etc/cloud/management/cloud-bridge.properties
91+
ln -s /usr/share/cloud/bridge/conf/ec2-service.properties $(CURDIR)/debian/tmp/etc/cloud/management/ec2-service.properties
92+
8793
dh_install -s
8894
# Must not depend on anything. This is to be called by
8995
# binary-arch/binary-indep

0 commit comments

Comments
 (0)