Skip to content

Commit 10a90e8

Browse files
committed
extensions directory to be owned by cloud:cloud. Also added debian rules.
1 parent 67377c4 commit 10a90e8

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

debian/cloudstack-management.postinst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ if [ "$1" = configure ]; then
5959
chown -R cloud:cloud /usr/share/cloudstack-management/templates
6060
find /usr/share/cloudstack-management/templates -type d -exec chmod 0770 {} \;
6161

62+
chmod -R 0755 /etc/cloudstack/extensions
63+
chown -R cloud:cloud /etc/cloudstack/extensions
64+
6265
ln -sf ${CONFDIR}/log4j-cloud.xml ${CONFDIR}/log4j2.xml
6366

6467
# Add jdbc MySQL driver settings to db.properties if not present

debian/rules

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,11 @@ override_dh_auto_install:
180180
mkdir -p $(DESTDIR)/usr/share/$(PACKAGE)-integration-tests
181181
cp -r test/integration/* $(DESTDIR)/usr/share/$(PACKAGE)-integration-tests/
182182

183+
# Sample Extensions
184+
mkdir -p $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/extensions
185+
cp -r extensions/* $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/extensions/
186+
ln -s /$(SYSCONFDIR)/$(PACKAGE)/extensions $(DESTDIR)/usr/share/$(PACKAGE)-management/extensions
187+
183188
override_dh_systemd_enable:
184189
dh_systemd_enable -pcloudstack-management -pcloudstack-agent -pcloudstack-usage
185190

packaging/el8/cloud.spec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,8 @@ pip3 install --upgrade /usr/share/cloudstack-marvin/Marvin-*.tar.gz
634634
%{_defaultdocdir}/%{name}-management-%{version}/LICENSE
635635
%{_defaultdocdir}/%{name}-management-%{version}/NOTICE
636636
%{_datadir}/%{name}-management/setup/wheel/*.whl
637-
%attr(0755,root,root) %{_sysconfdir}/%{name}/extensions/*
637+
%dir %attr(0755,cloud,cloud) %{_sysconfdir}/%{name}/extensions
638+
%attr(0755,cloud,cloud) %{_sysconfdir}/%{name}/extensions/*
638639

639640
%files agent
640641
%attr(0755,root,root) %{_bindir}/%{name}-setup-agent

0 commit comments

Comments
 (0)