[heat/f19] Fix requires and add group openstack-heat transition

Jeff Peeler jpeeler at fedoraproject.org
Wed May 29 04:29:57 UTC 2013


commit 39e75440ea54dbf6a10e5a50cc5e3186759ecf75
Author: Jeff Peeler <jpeeler at redhat.com>
Date:   Tue May 28 23:16:41 2013 -0400

    Fix requires and add group openstack-heat transition
    
    changed require from python-paste to python-paste-deploy (rhbz#963207)
    
    changed UID/GID back again to heat instead of openstack-heat
    added group/user rename for old installs
    changed systemd scripts to match heat user
    
    Resolves: rhbz#963207

 heat-api-cfn.service        |    2 +-
 heat-api-cloudwatch.service |    2 +-
 heat-api.service            |    2 +-
 heat-engine.service         |    2 +-
 heat-metadata.service       |    2 +-
 heat.spec                   |   49 +++++++++++++++++++++++++++---------------
 6 files changed, 36 insertions(+), 23 deletions(-)
---
diff --git a/heat-api-cfn.service b/heat-api-cfn.service
index e00f8f2..f46cd28 100644
--- a/heat-api-cfn.service
+++ b/heat-api-cfn.service
@@ -6,7 +6,7 @@ Requires=syslog.target network.target heat-engine.service
 [Service]
 ExecStart=/usr/bin/heat-api-cfn
 Restart=on-failure
-User=openstack-heat
+User=heat
 
 [Install]
 WantedBy=multi-user.target
diff --git a/heat-api-cloudwatch.service b/heat-api-cloudwatch.service
index bfc0877..840f1a6 100644
--- a/heat-api-cloudwatch.service
+++ b/heat-api-cloudwatch.service
@@ -6,7 +6,7 @@ Requires=syslog.target network.target heat-engine.service
 [Service]
 ExecStart=/usr/bin/heat-api-cloudwatch
 Restart=on-failure
-User=openstack-heat
+User=heat
 
 [Install]
 WantedBy=multi-user.target
diff --git a/heat-api.service b/heat-api.service
index a08a3e2..8fb5fdb 100644
--- a/heat-api.service
+++ b/heat-api.service
@@ -6,7 +6,7 @@ Requires=syslog.target network.target heat-engine.service
 [Service]
 ExecStart=/usr/bin/heat-api
 Restart=on-failure
-User=openstack-heat
+User=heat
 
 [Install]
 WantedBy=multi-user.target
diff --git a/heat-engine.service b/heat-engine.service
index a5e2359..de0d986 100644
--- a/heat-engine.service
+++ b/heat-engine.service
@@ -6,7 +6,7 @@ Requires=syslog.target network.target qpidd.service mysqld.service openstack-key
 [Service]
 ExecStart=/usr/bin/heat-engine
 Restart=on-failure
-User=openstack-heat
+User=heat
 
 [Install]
 WantedBy=multi-user.target
diff --git a/heat-metadata.service b/heat-metadata.service
index bc4efb3..8c7cbb1 100644
--- a/heat-metadata.service
+++ b/heat-metadata.service
@@ -6,7 +6,7 @@ Requires=syslog.target network.target heat-engine.service
 [Service]
 ExecStart=/usr/bin/heat-metadata
 Restart=on-failure
-User=openstack-heat
+User=heat
 
 [Install]
 WantedBy=multi-user.target
diff --git a/heat.spec b/heat.spec
index dbf5956..6dedd8b 100644
--- a/heat.spec
+++ b/heat.spec
@@ -1,7 +1,7 @@
 Name: heat
 Summary: This software provides AWS CloudFormation functionality for OpenStack Essex
 Version: 7
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: ASL 2.0
 Group: System Environment/Base
 URL: http://heat-api.org
@@ -31,7 +31,7 @@ Requires: python-lxml
 Requires: python-memcached
 Requires: python-migrate
 Requires: python-novaclient
-Requires: python-paste
+Requires: python-paste-deploy
 Requires: python-qpid
 Requires: python-routes
 Requires: pysendfile
@@ -92,28 +92,35 @@ Heat provides AWS CloudFormation and CloudWatch functionality for OpenStack.
 %{_mandir}/man1/*.gz
 %{_bindir}/*
 %{python_sitelib}/heat*
-%dir %attr(0755,openstack-heat,root) %{_localstatedir}/log/heat
-%dir %attr(0755,openstack-heat,root) %{_localstatedir}/lib/heat
+%dir %attr(0755,heat,root) %{_localstatedir}/log/heat
+%dir %attr(0755,heat,root) %{_localstatedir}/lib/heat
 %{_unitdir}/heat*.service
 %dir %{_sysconfdir}/heat
 %config(noreplace) %{_sysconfdir}/logrotate.d/heat
 %config(noreplace) %{_sysconfdir}/bash_completion.d/heat
-%config(noreplace) %attr(-,root,openstack-heat) %{_sysconfdir}/heat/heat-api.conf
-%config(noreplace) %attr(-,root,openstack-heat) %{_sysconfdir}/heat/heat-api-paste.ini
-%config(noreplace) %attr(-,root,openstack-heat) %{_sysconfdir}/heat/heat-api-cfn.conf
-%config(noreplace) %attr(-,root,openstack-heat) %{_sysconfdir}/heat/heat-api-cfn-paste.ini
-%config(noreplace) %attr(-,root,openstack-heat) %{_sysconfdir}/heat/heat-api-cloudwatch.conf
-%config(noreplace) %attr(-,root,openstack-heat) %{_sysconfdir}/heat/heat-api-cloudwatch-paste.ini
-%config(noreplace) %attr(-,root,openstack-heat) %{_sysconfdir}/heat/heat-engine.conf
-%config(noreplace) %attr(-,root,openstack-heat) %{_sysconfdir}/heat/heat-metadata.conf
-%config(noreplace) %attr(-,root,openstack-heat) %{_sysconfdir}/heat/heat-metadata-paste.ini
-%config(noreplace) %attr(-,root,openstack-heat) %{_sysconfdir}/heat/boto.cfg
+%config(noreplace) %attr(-,root,heat) %{_sysconfdir}/heat/heat-api.conf
+%config(noreplace) %attr(-,root,heat) %{_sysconfdir}/heat/heat-api-paste.ini
+%config(noreplace) %attr(-,root,heat) %{_sysconfdir}/heat/heat-api-cfn.conf
+%config(noreplace) %attr(-,root,heat) %{_sysconfdir}/heat/heat-api-cfn-paste.ini
+%config(noreplace) %attr(-,root,heat) %{_sysconfdir}/heat/heat-api-cloudwatch.conf
+%config(noreplace) %attr(-,root,heat) %{_sysconfdir}/heat/heat-api-cloudwatch-paste.ini
+%config(noreplace) %attr(-,root,heat) %{_sysconfdir}/heat/heat-engine.conf
+%config(noreplace) %attr(-,root,heat) %{_sysconfdir}/heat/heat-metadata.conf
+%config(noreplace) %attr(-,root,heat) %{_sysconfdir}/heat/heat-metadata-paste.ini
+%config(noreplace) %attr(-,root,heat) %{_sysconfdir}/heat/boto.cfg
 
 %pre
-getent group openstack-heat >/dev/null || groupadd -r openstack-heat --gid 187
-getent passwd openstack-heat  >/dev/null || \
-useradd -u 187 -r -g openstack-heat -d %{_localstatedir}/lib/heat -s /sbin/nologin \
-    -c "OpenStack Heat Daemon" openstack-heat
+# handle rename from old installs
+getent passwd 187 | cut -f1 -d: | grep -qx "openstack-heat"
+if [ $? -eq 0 ]; then
+    usermod -l heat openstack-heat
+    groupmod -n heat openstack-heat
+fi
+
+getent group heat >/dev/null || groupadd -r heat --gid 187
+getent passwd heat >/dev/null || \
+useradd -u 187 -r -g heat -d %{_localstatedir}/lib/heat -s /sbin/nologin \
+    -c "OpenStack Heat Daemon" heat
 exit 0
 
 %post
@@ -138,6 +145,12 @@ exit 0
 %systemd_postun_with_restart heat-api-cloudwatch.service
 
 %changelog
+* Wed May 29 2013 Jeff Peeler <jpeeler at redhat.com> 7-3
+- changed require from python-paste to python-paste-deploy (rhbz#963207)
+- changed UID/GID back again to heat instead of openstack-heat (rhbz#920348)
+  added group/user rename for old installs
+- changed systemd scripts to match heat user
+
 * Thu Feb 14 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 7-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
 


More information about the scm-commits mailing list