[openstack-nova/f19] Add the nova-novncproxy subpackage

Nikola Dipanov ndipanov at fedoraproject.org
Fri Jun 21 14:58:43 UTC 2013


commit de25f3412feaeb6126924694a52fc11ae6243f82
Author: Nikola Dipanov <ndipanov at redhat.com>
Date:   Fri Jun 21 17:02:21 2013 +0200

    Add the nova-novncproxy subpackage

 openstack-nova-novncproxy.service |   12 ++++++++
 openstack-nova.spec               |   52 ++++++++++++++++++++++++++++++++++---
 2 files changed, 60 insertions(+), 4 deletions(-)
---
diff --git a/openstack-nova-novncproxy.service b/openstack-nova-novncproxy.service
new file mode 100644
index 0000000..3aa562f
--- /dev/null
+++ b/openstack-nova-novncproxy.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=OpenStack Nova NoVNC Proxy Server
+After=syslog.target network.target
+
+[Service]
+Type=simple
+User=nova
+EnvironmentFile=-/etc/sysconfig/openstack-nova-novncproxy
+ExecStart=/usr/bin/nova-novncproxy --web /usr/share/novnc/ $OPTIONS
+
+[Install]
+WantedBy=multi-user.target
diff --git a/openstack-nova.spec b/openstack-nova.spec
index 1de2199..a39154e 100644
--- a/openstack-nova.spec
+++ b/openstack-nova.spec
@@ -2,7 +2,7 @@
 
 Name:             openstack-nova
 Version:          2013.1.2
-Release:          1%{?dist}
+Release:          2%{?dist}
 Summary:          OpenStack Compute (nova)
 
 Group:            Applications/System
@@ -26,6 +26,7 @@ Source25:         openstack-nova-metadata-api.service
 Source26:         openstack-nova-conductor.service
 Source27:         openstack-nova-cells.service
 Source28:         openstack-nova-spicehtml5proxy.service
+Source29:         openstack-nova-novncproxy.service
 
 Source21:         nova-polkit.pkla
 Source23:         nova-polkit.rules
@@ -53,6 +54,7 @@ Requires:         openstack-nova-objectstore = %{version}-%{release}
 Requires:         openstack-nova-conductor = %{version}-%{release}
 Requires:         openstack-nova-console = %{version}-%{release}
 Requires:         openstack-nova-cells = %{version}-%{release}
+Requires:         openstack-nova-novncproxy = %{version}-%{release}
 
 
 %description
@@ -280,6 +282,28 @@ standard hardware configurations and seven major hypervisors.
 This package contains the Nova Cells service providing additional 
 scaling and (geographic) distribution for compute services.
 
+%package novncproxy
+Summary:          OpenStack Nova noVNC proxy service
+Group:            Applications/System
+
+Requires:         openstack-nova-common = %{version}-%{release}
+Requires:         novnc
+Requires: 	  python-websockify
+
+
+%description novncproxy
+OpenStack Compute (codename Nova) is open source software designed to
+provision and manage large networks of virtual machines, creating a
+redundant and scalable cloud computing platform. It gives you the
+software, control panels, and APIs required to orchestrate a cloud,
+including running instances, managing networks, and controlling access
+through users and projects. OpenStack Compute strives to be both
+hardware and hypervisor agnostic, currently supporting a variety of
+standard hardware configurations and seven major hypervisors.
+
+This package contains the Nova noVNC Proxy service that can proxy 
+VNC traffic over browser websockets connections.
+
 %package -n       python-nova
 Summary:          Nova Python libraries
 Group:            Applications/System
@@ -450,6 +474,7 @@ install -p -D -m 755 %{SOURCE25} %{buildroot}%{_unitdir}/openstack-nova-metadata
 install -p -D -m 755 %{SOURCE26} %{buildroot}%{_unitdir}/openstack-nova-conductor.service
 install -p -D -m 755 %{SOURCE27} %{buildroot}%{_unitdir}/openstack-nova-cells.service
 install -p -D -m 755 %{SOURCE28} %{buildroot}%{_unitdir}/openstack-nova-spicehtml5proxy.service
+install -p -D -m 755 %{SOURCE29} %{buildroot}%{_unitdir}/openstack-nova-novncproxy.service
 
 # Install sudoers
 install -p -D -m 440 %{SOURCE24} %{buildroot}%{_sysconfdir}/sudoers.d/nova
@@ -482,9 +507,6 @@ rm -fr %{buildroot}%{python_sitelib}/run_tests.*
 rm -f %{buildroot}%{_bindir}/nova-combined
 rm -f %{buildroot}/usr/share/doc/nova/README*
 
-# We currently use the equivalent file from the novnc package
-rm -f %{buildroot}%{_bindir}/nova-novncproxy
-
 %pre common
 getent group nova >/dev/null || groupadd -r nova --gid 162
 if ! getent passwd nova >/dev/null; then
@@ -606,6 +628,13 @@ if [ $1 -eq 0 ] ; then
         /bin/systemctl stop openstack-nova-${svc}.service > /dev/null 2>&1 || :
     done
 fi
+%preun novncproxy
+if [ $1 -eq 0 ] ; then
+    for svc in novncproxy; do
+        /bin/systemctl --no-reload disable openstack-nova-${svc}.service > /dev/null 2>&1 || :
+        /bin/systemctl stop openstack-nova-${svc}.service > /dev/null 2>&1 || :
+    done
+fi
 
 %postun compute
 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
@@ -679,6 +708,14 @@ if [ $1 -ge 1 ] ; then
         /bin/systemctl try-restart openstack-nova-${svc}.service >/dev/null 2>&1 || :
     done
 fi
+%postun novncproxy
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+if [ $1 -ge 1 ] ; then
+    # Package upgrade, not uninstall
+    for svc in novncproxy; do
+        /bin/systemctl try-restart openstack-nova-${svc}.service >/dev/null 2>&1 || :
+    done
+fi
 
 %files
 %doc LICENSE
@@ -779,6 +816,10 @@ fi
 %{_bindir}/nova-cells
 %{_unitdir}/openstack-nova-cells.service
 
+%files novncproxy
+%{_bindir}/nova-novncproxy
+%{_unitdir}/openstack-nova-novncproxy.service
+
 %files -n python-nova
 %defattr(-,root,root,-)
 %doc LICENSE
@@ -791,6 +832,9 @@ fi
 %endif
 
 %changelog
+* Fri Jun 21 2013 Nikola Đipanov<ndipanov at redhat.com> - 2013.1.2-2
+- Add the novncproxy subpackage (moved from the novnc package)
+
 * Fri Jun 07 2013 Nikola Đipanov<ndipanov at redhat.com> - 2013.1.2-1
 - Update to stable/grizzly 2013.1.2 release
 


More information about the scm-commits mailing list