File openstack-nova.spec of Package openstack-nova
#
# spec file for package openstack-nova
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2011 B1 Systems GmbH, Vohburg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define component nova
%define groupname %{component}
%define username %{component}
%define version_unconverted 18.3.1.dev92
Name: openstack-%{component}
Version: 18.3.1~dev92
Release: 0
Summary: OpenStack Compute (Nova)
License: Apache-2.0
Group: System/Management
URL: https://launchpad.net/nova
Source: http://tarballs.openstack.org/nova/nova-stable-rocky.tar.gz
Source1: %{name}.logrotate
Source2: openstack-nova-manage.sh
Source3: org.openstack.nova.compute.pkla
Source4: %name.conf
Source5: nova-sudoers
Source6: openstack-nova-polkit.rules
Source7: openstack-nova.modules
Source8: openstack-nova.modprobe
# systemd service files
Source20: openstack-nova-api-metadata.service
Source21: openstack-nova-api-os-compute.service
Source22: openstack-nova-api.service
Source23: openstack-nova-cells.service
Source25: openstack-nova-compute.service
Source26: openstack-nova-conductor.service
Source27: openstack-nova-consoleauth.service
Source28: openstack-nova-console.service
Source29: openstack-nova-network.service
Source30: openstack-nova-novncproxy.service
Source32: openstack-nova-scheduler.service
Source33: openstack-nova-serialproxy.service
Source34: openstack-nova-spicehtml5proxy.service
Source35: openstack-nova-vncproxy.service
# WSGI sample configs for Apache2
Source36: nova-placement-api.conf.sample
Source50: README.config
Source99: rpmlintrc
# https://bugs.launchpad.net/nova/+bug/1202199
# https://review.openstack.org/#/c/37477/
Patch7: 0001-Always-set-model-netfront-for-xen-over-libvirt.patch
Patch8: 0001-Handle-alternative-UEFI-boot-loader-locations-on-SLE.patch
Patch9: 0001-Add-method-to-generate-device-names-universally.patch
Patch10: 0002-Raise-403-instead-of-500-error-from-attach-volume-AP.patch
Patch11: 0003-Add-configuration-of-maximum-disk-devices-to-attach.patch
BuildRequires: crudini
BuildRequires: fdupes
BuildRequires: openstack-suse-macros
BuildRequires: openstack-suse-sudo
BuildRequires: python-Paste
BuildRequires: python-PasteDeploy
BuildRequires: python-Routes
BuildRequires: python-barbicanclient
BuildRequires: python-base
BuildRequires: python-castellan
BuildRequires: python-cinderclient
BuildRequires: python-cryptography >= 1.0
BuildRequires: python-cursive
BuildRequires: python-glanceclient
BuildRequires: python-keystoneauth1
BuildRequires: python-keystoneclient
BuildRequires: python-keystonemiddleware
BuildRequires: python-microversion_parse
BuildRequires: python-neutronclient
BuildRequires: python-os-brick
BuildRequires: python-os-service-types
BuildRequires: python-os-win
BuildRequires: python-oslo.cache
BuildRequires: python-oslo.concurrency
BuildRequires: python-oslo.config >= 1.2.0
BuildRequires: python-oslo.db
BuildRequires: python-oslo.i18n
BuildRequires: python-oslo.log
BuildRequires: python-oslo.messaging
BuildRequires: python-oslo.policy >= 0.5.0
BuildRequires: python-oslo.reports
BuildRequires: python-oslo.versionedobjects
BuildRequires: python-oslo.vmware
BuildRequires: python-oslosphinx
BuildRequires: python-paramiko
BuildRequires: python-pbr >= 0.6
BuildRequires: python-pycrypto
BuildRequires: python-rfc3986
BuildRequires: python-sphinxcontrib-actdiag
BuildRequires: python-sphinxcontrib-apidoc
BuildRequires: python-websockify
# Documentation requirements:
BuildRequires: python-Babel >= 1.3
BuildRequires: python-Sphinx >= 1.1.2
BuildRequires: python-WebOb
BuildRequires: python-eventlet
BuildRequires: python-openstackdocstheme
BuildRequires: python-sphinx-feature-classification
BuildRequires: python-sphinxcontrib-seqdiag
# to make orphaned-file-tests happy
BuildRequires: polkit-default-privs
BuildRequires: systemd-rpm-macros
Requires: /usr/bin/truncate
Requires: logrotate
Requires: openstack-suse-sudo
Requires: polkit-default-privs
Requires: python >= 2.7
Requires: python-nova = %{version}
Requires: python-oslo.config >= 6.1.0
%{?systemd_requires}
Requires(post): sysconfig
Requires(pre): pwdutils
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
Requires(pre): %insserv_prereq %fillup_prereq
%description
OpenStack Nova provides a cloud computing fabric controller,
supporting a wide variety of virtualization technologies,
including KVM, Xen, LXC, VMware, and more. In addition to
its native API, it includes compatibility with the commonly
encountered Amazon EC2 and S3 APIs.
%package -n python-nova
Summary: OpenStack Compute (Nova) - Python module
Group: Development/Languages/Python
Conflicts: pyxml < 0.8.5
Requires: python >= 2.7
Requires: python-Babel >= 2.3.4
Requires: python-Jinja2 >= 2.10
Requires: python-Paste >= 2.0.2
Requires: python-PasteDeploy >= 1.5.0
Requires: python-PrettyTable >= 0.7.1
Requires: python-Routes >= 2.3.1
Requires: python-SQLAlchemy >= 1.0.10
Requires: python-WebOb >= 1.8.2
Requires: python-barbicanclient >= 4.5.2
Requires: python-castellan >= 0.16.0
Requires: python-cinderclient >= 3.3.0
Requires: python-cryptography >= 2.1
Requires: python-cursive >= 0.2.1
Requires: python-decorator >= 3.4.0
Requires: python-enum34 >= 1.0.4
Requires: python-eventlet >= 0.18.2
Requires: python-glanceclient >= 2.8.0
Requires: python-greenlet >= 0.4.10
Requires: python-iso8601 >= 0.1.11
Requires: python-jsonschema >= 2.6.0
Requires: python-keystoneauth1 >= 3.9.0
Requires: python-keystonemiddleware >= 4.17.0
Requires: python-lxml >= 3.4.1
Requires: python-microversion_parse >= 0.1.2
Requires: python-netaddr >= 0.7.18
Requires: python-netifaces >= 0.10.4
Requires: python-neutronclient >= 6.7.0
Requires: python-os-brick >= 2.5.0
Requires: python-os-service-types >= 1.2.0
Requires: python-os-traits >= 0.4.0
Requires: python-os-vif >= 1.7.0
Requires: python-os-win >= 3.0.0
Requires: python-os-xenapi >= 0.3.3
Requires: python-oslo.cache >= 1.26.0
Requires: python-oslo.concurrency >= 3.26.0
Requires: python-oslo.context >= 2.19.2
Requires: python-oslo.db >= 4.27.0
Requires: python-oslo.i18n >= 3.15.3
Requires: python-oslo.log >= 3.36.0
Requires: python-oslo.messaging >= 6.3.0
Requires: python-oslo.middleware >= 3.31.0
Requires: python-oslo.policy >= 1.35.0
Requires: python-oslo.privsep >= 1.23.0
Requires: python-oslo.reports >= 1.18.0
Requires: python-oslo.rootwrap >= 5.8.0
Requires: python-oslo.serialization >= 2.18.0
Requires: python-oslo.service >= 1.24.0
Requires: python-oslo.utils >= 3.33.0
Requires: python-oslo.versionedobjects >= 1.31.2
Requires: python-oslo.vmware >= 2.17.0
Requires: python-paramiko >= 2.0.0
Requires: python-pbr >= 2.0.0
Requires: python-psutil >= 3.2.2
Requires: python-rfc3986 >= 0.3.1
Requires: python-six >= 1.10.0
Requires: python-sqlalchemy-migrate >= 0.11.0
Requires: python-stevedore >= 1.20.0
Requires: python-tooz >= 1.58.0
Requires: python-websockify >= 0.8.0
%description -n python-nova
This package contains the core Python module of OpenStack Nova.
%package api
Summary: OpenStack Compute (Nova) - API
# prereq for creating the right openstack-nova user/group
Group: System/Management
PreReq: %{name} = %{version}
Requires: openstack-neutron-server
Requires: openstack-nova-conductor = %{version}
%description api
This package contains the OpenStack Nova API.
%package placement-api
Summary: OpenStack Compute (Nova) - Placement API
# prereq for creating the right openstack-nova user/group
Group: System/Management
PreReq: %{name} = %{version}
Requires: apache2
Requires: apache2-mod_wsgi
%description placement-api
This package contains the OpenStack Nova Placement API.
%package conductor
Summary: OpenStack Compute (Nova) - Conductor
# prereq for creating the right openstack-nova user/group
Group: System/Management
PreReq: %{name} = %{version}
%description conductor
This package contains the conductor of OpenStack Nova
%package cells
Summary: OpenStack Compute (Nova) - Cells
# prereq for creating the right openstack-nova user/group
Group: System/Management
PreReq: %{name} = %{version}
%description cells
This package contains the Cells support of OpenStack Nova
%package console
Summary: Openstack Compute (Nova) - Console Access
# prereq for creating the right openstack-nova user/group
Group: System/Management
PreReq: %{name} = %{version}
%description console
This package contains the console access service for OpenStack Nova.
%package consoleauth
Summary: Openstack Compute (Nova) - Console Authentification Service
# prereq for creating the right openstack-nova user/group
Group: System/Management
PreReq: %{name} = %{version}
%description consoleauth
This package contains the console authentification service for OpenStack Nova.
%package compute
Summary: OpenStack Compute (Nova) - Compute
# prereq for creating the right openstack-nova user/group
Group: System/Management
PreReq: %{name} = %{version}
Requires: bridge-utils
Requires: dosfstools
Requires: genisoimage
Requires: libvirt-python >= 1.2.5
Requires: openssh
Requires: rsync
Requires: tunctl
# ironicclient for the virt/ironic driver
Requires: python-ironicclient >= 2.3.0
%description compute
This package contains the compute part of OpenStack.
%package network
Summary: OpenStack Compute (Nova) - Network
# prereq for creating the right openstack-nova user/group
Group: System/Management
PreReq: %{name} = %{version}
Requires: dnsmasq
Requires: dnsmasq-utils
Requires: iptables
%description network
This package contains the network services for OpenStack.
%package novncproxy
Summary: OpenStack Compute (Nova) - Websocket Proxy
# prereq for creating the right openstack-nova user/group
Group: System/Management
PreReq: %{name} = %{version}
Requires: novnc
%description novncproxy
This package contains the novnc-proxy service for OpenStack.
%package serialproxy
Summary: OpenStack Compute (Nova) - Serial Proxy
# prereq for creating the right openstack-nova user/group
Group: System/Management
PreReq: %{name} = %{version}
Requires: novnc
%description serialproxy
This package contains the serialproxy service for OpenStack.
%package scheduler
Summary: OpenStack Compute (Nova) - Scheduler
# prereq for creating the right openstack-nova user/group
Group: System/Management
PreReq: %{name} = %{version}
%description scheduler
This package contains the scheduler for OpenStack.
%package vncproxy
Summary: OpenStack Compute (Nova) - VNC Proxy
# prereq for creating the right openstack-nova user/group
Group: System/Management
PreReq: %{name} = %{version}
%description vncproxy
This package contains the vnc-proxy service for OpenStack.
%package test
Summary: OpenStack Compute (Nova) - Testsuite
# prereq for creating the right openstack-nova user/group
Group: System/Management
PreReq: %{name} = %{version}
Requires: curl
Requires: libvirt-python >= 1.2.5
Requires: python-cinderclient >= 3.3.0
Requires: python-fixtures >= 3.0.0
Requires: python-ironicclient >= 2.3.0
Requires: python-mock >= 2.0.0
Requires: python-mox3 >= 0.20.0
Requires: python-oslotest >= 3.2.0
Requires: python-psycopg2 >= 2.6.2
Requires: python-python-subunit >= 0.0.18
Requires: python-requests-mock >= 1.2.0
Requires: python-testrepository >= 0.0.18
Requires: python-testresources >= 2.0.0
Requires: python-testtools >= 2.2.0
%description test
The OpenStack Nova testsuite. It is used to verify the functionality of
OpenStack Nova and its components.
%prep
%setup -q -n %{component}-%{version_unconverted}
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%openstack_cleanup_prep
%build
python setup.py build
# doc
PYTHONPATH=. PBR_VERSION=%{version_unconverted} sphinx-build -b man doc/source doc/build/man
# sample config
PYTHONPATH=. oslo-config-generator --config-file=etc/nova/nova-config-generator.conf
%install
python setup.py install --root %{buildroot} --prefix %{_prefix}
### directories
install -d -m 755 %{buildroot}%{_localstatedir}/lib/nova
install -d -m 755 %{buildroot}%{_localstatedir}/lib/nova/images
install -d -m 755 %{buildroot}%{_localstatedir}/lib/nova/instances
install -d -m 755 %{buildroot}%{_localstatedir}/lib/nova/keys
install -d -m 755 %{buildroot}%{_localstatedir}/lib/nova/networks
install -d -m 755 %{buildroot}%{_localstatedir}/lib/nova/tmp
install -d -m 750 %{buildroot}%{_localstatedir}/log/nova
install -d -m 700 %{buildroot}%{_rundir}/nova
install -d -m 700 %{buildroot}%{_localstatedir}/cache/nova
install -D -m 644 %{SOURCE4} %{buildroot}/%_tmpfilesdir/%name.conf
install -d -m 755 %{buildroot}/srv/www/%{component}-placement-api
install -d %{buildroot}%{_sysconfdir}/apache2/vhosts.d
# apache vhost sample configs
install -p -D -m 644 %{SOURCE36} %{buildroot}%{_sysconfdir}/apache2/vhosts.d/
# WSGI
install -p -D -m 644 %{buildroot}/%{_bindir}/nova-placement-api %{buildroot}/srv/www/%{component}-placement-api/app.wsgi
### configuration files
install -d -m 755 %{buildroot}%{_sysconfdir}/%{component}/
mv %{buildroot}/usr/etc/nova/* %{buildroot}%{_sysconfdir}/%{component}/
PYTHONPATH=. oslopolicy-sample-generator --config-file=etc/nova/nova-policy-generator.conf
install -d -m 755 %{buildroot}%{_sysconfdir}/%{component}/%{component}.conf.d
install -p -D -m 640 %{SOURCE50} %{buildroot}%{_sysconfdir}/%{component}/README.config
install -p -D -m 640 etc/nova/nova.conf.sample %{buildroot}%{_sysconfdir}/nova/nova.conf
install -p -D -m 640 etc/nova/api-paste.ini %{buildroot}%{_sysconfdir}/nova/
install -p -D -m 640 etc/nova/policy.yaml.sample %{buildroot}%{_sysconfdir}/nova/policy.yaml
install -p -D -m 644 etc/nova/rootwrap.conf %{buildroot}%{_sysconfdir}/nova/
install -p -D -m 644 etc/nova/release.sample %{buildroot}%{_sysconfdir}/nova/release
sed -i -e "s,vendor = .*,vendor = %{distribution}," \
-e "s,product = .*,product = OpenStack Nova," \
-e "s,package = .*,package = %{version}," %{buildroot}%{_sysconfdir}/nova/release
cp -a etc/nova/rootwrap.d/ %{buildroot}%{_sysconfdir}/nova/
# bash-completion/logrotate/etc.
install -p -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/bash_completion.d/openstack-nova-manage.sh
install -p -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
### Install systemd unit services
mkdir -p %{buildroot}%{_sbindir} %{buildroot}%{_unitdir}
install -p -D -m 444 %{SOURCE20} %{buildroot}%{_unitdir}/%{name}-api-metadata.service
install -p -D -m 444 %{SOURCE21} %{buildroot}%{_unitdir}/%{name}-api-os-compute.service
install -p -D -m 444 %{SOURCE22} %{buildroot}%{_unitdir}/%{name}-api.service
install -p -D -m 444 %{SOURCE23} %{buildroot}%{_unitdir}/%{name}-cells.service
install -p -D -m 444 %{SOURCE25} %{buildroot}%{_unitdir}/%{name}-compute.service
install -p -D -m 444 %{SOURCE26} %{buildroot}%{_unitdir}/%{name}-conductor.service
install -p -D -m 444 %{SOURCE27} %{buildroot}%{_unitdir}/%{name}-consoleauth.service
install -p -D -m 444 %{SOURCE28} %{buildroot}%{_unitdir}/%{name}-console.service
install -p -D -m 444 %{SOURCE29} %{buildroot}%{_unitdir}/%{name}-network.service
install -p -D -m 444 %{SOURCE30} %{buildroot}%{_unitdir}/%{name}-novncproxy.service
install -p -D -m 444 %{SOURCE32} %{buildroot}%{_unitdir}/%{name}-scheduler.service
install -p -D -m 444 %{SOURCE33} %{buildroot}%{_unitdir}/%{name}-serialproxy.service
install -p -D -m 444 %{SOURCE34} %{buildroot}%{_unitdir}/%{name}-spicehtml5proxy.service
install -p -D -m 444 %{SOURCE35} %{buildroot}%{_unitdir}/%{name}-vncproxy.service
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-api-metadata
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-api-os-compute
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-api
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-cells
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-compute
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-conductor
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-consoleauth
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-console
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-network
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-novncproxy
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-scheduler
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-serialproxy
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-spicehtml5proxy
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-vncproxy
### sudoers configuration for nova-rootwrap:
install -D -m 440 %{SOURCE5} %{buildroot}%{_sysconfdir}/sudoers.d/openstack-nova
### documentation
install -d %{buildroot}%{_mandir}/man1
install -m 644 doc/build/man/*.1 %{buildroot}%{_mandir}/man1
### test subpackage
%openstack_test_package_install
# needed by api_samples test
mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}-test/doc
%fdupes %{buildroot}%{_localstatedir}/lib/%{name}-test
### misc
%fdupes %{buildroot}%{python_sitelib}/%{component}
%if 0%{?suse_version} > 1110 && 0%{?suse_version} < 1230
mkdir -p %{buildroot}%{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d/
cp -a %{SOURCE3} %{buildroot}%{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d/
%endif
%if 0%{?suse_version} >= 1230
install -D -m 644 %{SOURCE6} %{buildroot}%{_datadir}/polkit-1/rules.d/10-openstack-nova-compute.rules
install -D -m 644 %{SOURCE7} %{buildroot}%{_libexecdir}/modules-load.d/openstack-nova-compute.conf
%endif
install -D -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/modprobe.d/openstack-nova-compute
### set default configuration
%define nova_conf %{buildroot}%{_sysconfdir}/%{component}/%{component}.conf.d/010-%{component}.conf
crudini --set %{nova_conf} DEFAULT log_dir /var/log/nova
crudini --set %{nova_conf} DEFAULT bindir %{_bindir}
crudini --set %{nova_conf} DEFAULT state_path /var/lib/nova
crudini --set %{nova_conf} oslo_concurrency lock_path %{_rundir}/nova
%pre
# need a fixed uid/gid for being able to use shared storage over NFS
%openstack_pre_user_group_create -u 96 -g 96 -s /bin/bash %{username} %{groupname}
%post
%tmpfiles_create %{_tmpfilesdir}/%{name}.conf
%pre api
%service_add_pre openstack-nova-api.service
%post api
%service_add_post openstack-nova-api.service
%preun api
%service_del_preun openstack-nova-api.service
%postun api
%restart_on_update openstack-nova-api.service
%service_del_postun openstack-nova-api.service
%pre conductor
%service_add_pre openstack-nova-conductor.service
%post conductor
%service_add_post openstack-nova-conductor.service
%preun conductor
%service_del_preun openstack-nova-conductor.service
%postun conductor
%restart_on_update openstack-nova-conductor.service
%service_del_postun openstack-nova-conductor.service
%pre console
%service_add_pre openstack-nova-console.service
%post console
%service_add_post openstack-nova-console.service
%preun console
%service_del_preun openstack-nova-console.service
%postun console
%restart_on_update openstack-nova-console.service
%restart_on_update openstack-nova-spicehtml5proxy
%service_del_postun openstack-nova-console.service
%pre consoleauth
%service_add_pre openstack-nova-consoleauth.service
%post consoleauth
%service_add_post openstack-nova-consoleauth.service
%preun consoleauth
%service_del_preun openstack-nova-consoleauth.service
%postun consoleauth
%restart_on_update openstack-nova-consoleauth.service
%service_del_postun openstack-nova-consoleauth.service
%pre cells
%service_add_pre openstack-nova-cells.service
%post cells
%service_add_post openstack-nova-cells.service
%preun cells
%service_del_preun openstack-nova-cells.service
%postun cells
%restart_on_update openstack-nova-cells.service
%service_del_postun openstack-nova-cells.service
%pre compute
%service_add_pre openstack-nova-compute.service
%post compute
%service_add_post openstack-nova-compute.service
polkit-auth --grant org.libvirt.unix.manage --user %{username} 2>/dev/null || true
%preun compute
%service_del_preun openstack-nova-compute.service
%postun compute
%restart_on_update openstack-nova-compute.service
%service_del_postun openstack-nova-compute.service
%pre network
%service_add_pre openstack-nova-network.service
%post network
%service_add_post openstack-nova-network.service
%preun network
%service_del_preun openstack-nova-network.service
%postun network
%restart_on_update openstack-nova-network.service
%service_del_postun openstack-nova-network.service
%pre vncproxy
%service_add_pre openstack-nova-vncproxy.service
%post vncproxy
%service_add_post openstack-nova-vncproxy.service
%preun vncproxy
%service_del_preun openstack-nova-vncproxy.service
%postun vncproxy
%restart_on_update openstack-nova-vncproxy.service
%service_del_postun openstack-nova-vncproxy.service
%pre novncproxy
%service_add_pre openstack-nova-novncproxy.service
%post novncproxy
%service_add_post openstack-nova-novncproxy.service
%preun novncproxy
%service_del_preun openstack-nova-novncproxy.service
%postun novncproxy
%restart_on_update openstack-nova-novncproxy.service
%service_del_postun openstack-nova-novncproxy.service
%pre serialproxy
%service_add_pre openstack-nova-serialproxy.service
%post serialproxy
%service_add_post openstack-nova-serialproxy.service
%preun serialproxy
%service_del_preun openstack-nova-serialproxy.service
%postun serialproxy
%restart_on_update openstack-nova-serialproxy.service
%service_del_postun openstack-nova-serialproxy.service
%pre scheduler
%service_add_pre openstack-nova-scheduler.service
%post scheduler
%service_add_post openstack-nova-scheduler.service
%preun scheduler
%service_del_preun openstack-nova-scheduler.service
%postun scheduler
%restart_on_update openstack-nova-scheduler.service
%service_del_postun openstack-nova-scheduler.service
%files
%defattr(-,root,root,-)
%license LICENSE
%doc README.rst
%{_sysconfdir}/bash_completion.d/openstack-nova-manage.sh
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%config %{_sysconfdir}/sudoers.d/openstack-nova
%dir %{_sysconfdir}/nova
%dir %{_sysconfdir}/%{component}/%{component}.conf.d/
%dir %attr(0750, %{username}, %{groupname}) %{_localstatedir}/cache/nova
%{_sysconfdir}/%{component}/README.config
%config(noreplace) %attr(0640, root, %{groupname}) %{_sysconfdir}/nova/api-paste.ini
%config(noreplace) %attr(0640, root, %{groupname}) %{_sysconfdir}/nova/nova.conf
%config(noreplace) %attr(0640, root, %{groupname}) %{_sysconfdir}/%{component}/%{component}.conf.d/010-%{component}.conf
%config %attr(0640, root, %{groupname}) %{_sysconfdir}/nova/policy.yaml
%config %{_sysconfdir}/nova/rootwrap.conf
%config %attr(0640, root, %{groupname}) %{_sysconfdir}/nova/release
%dir %{_sysconfdir}/nova/rootwrap.d
%dir %attr(0755, %{username}, %{groupname}) %{_localstatedir}/lib/nova
%dir %attr(0750, %{username}, %{groupname}) %{_localstatedir}/log/nova
%_tmpfilesdir/%name.conf
%{_bindir}/nova-manage
%{_bindir}/nova-rootwrap
%{_bindir}/nova-rootwrap-daemon
%{_bindir}/nova-policy
%{_bindir}/nova-status
%{_mandir}/man1/nova-manage.1%{?ext_man}
%{_mandir}/man1/nova-cells.1%{?ext_man}
%{_mandir}/man1/nova-rootwrap.1%{?ext_man}
%dir %attr(0755, root, root) %{_localstatedir}/lib/nova/images
%dir %attr(0755, %{username}, root) %{_localstatedir}/lib/nova/instances
%dir %attr(0755, root, root) %{_localstatedir}/lib/nova/keys
%dir %attr(0755, root, root) %{_localstatedir}/lib/nova/networks
%dir %attr(0755, root, root) %{_localstatedir}/lib/nova/tmp
%files -n python-nova
%defattr(-,root,root,-)
%license LICENSE
%{python_sitelib}/%{component}/
%{python_sitelib}/%{component}-*.egg-info
# Part of test subpackage
%exclude %{python_sitelib}/%{component}/tests/
%files api
%defattr(-,root,root,-)
%license LICENSE
%config %{_sysconfdir}/nova/rootwrap.d/api-metadata.filters
%{_unitdir}/%{name}-api.service
%{_sbindir}/rc%{name}-api
%{_unitdir}/%{name}-api-metadata.service
%{_sbindir}/rc%{name}-api-metadata
%{_unitdir}/%{name}-api-os-compute.service
%{_sbindir}/rc%{name}-api-os-compute
%{_bindir}/nova-api
%{_bindir}/nova-api-wsgi
%{_bindir}/nova-metadata-wsgi
%{_bindir}/nova-api-metadata
%{_bindir}/nova-api-os-compute
%{_mandir}/man1/nova-api.1%{?ext_man}
%{_mandir}/man1/nova-api-metadata.1%{?ext_man}
%{_mandir}/man1/nova-api-os-compute.1%{?ext_man}
%files placement-api
%defattr(-,root,root,-)
%license LICENSE
%{_bindir}/nova-placement-api
%{_sysconfdir}/apache2/
%{_sysconfdir}/apache2/vhosts.d/
%{_sysconfdir}/apache2/vhosts.d/nova-placement-api.conf.sample
/srv/www/
/srv/www/%{component}-placement-api/
/srv/www/%{component}-placement-api/app.wsgi
%files conductor
%defattr(-,root,root,-)
%license LICENSE
%{_unitdir}/%{name}-conductor.service
%{_bindir}/nova-conductor
%{_mandir}/man1/nova-conductor.1%{?ext_man}
%{_sbindir}/rc%{name}-conductor
%files cells
%defattr(-,root,root,-)
%license LICENSE
%{_bindir}/nova-cells
%{_unitdir}/%{name}-cells.service
%{_sbindir}/rc%{name}-cells
%files compute
%defattr(-,root,root,-)
%license LICENSE
%config %{_sysconfdir}/nova/rootwrap.d/compute.filters
%{_unitdir}/%{name}-compute.service
%{_sbindir}/rc%{name}-compute
%{_bindir}/nova-compute
%{_mandir}/man1/nova-compute.1%{?ext_man}
%if 0%{?suse_version} > 1110 && 0%{?suse_version} < 1230
%{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d/org.openstack.nova.compute.pkla
%endif
%if 0%{?suse_version} >= 1230
%{_datadir}/polkit-1/rules.d/10-openstack-nova-compute.rules
%{_libexecdir}/modules-load.d/openstack-nova-compute.conf
%endif
%{_sysconfdir}/modprobe.d/openstack-nova-compute
%files console
%defattr(-,root,root,-)
%{_bindir}/nova-console
%{_unitdir}/%{name}-console.service
%{_sbindir}/rc%{name}-console
%{_unitdir}/%{name}-spicehtml5proxy.service
%{_sbindir}/rc%{name}-spicehtml5proxy
%{_mandir}/man1/nova-console.1%{?ext_man}
%{_bindir}/nova-spicehtml5proxy
%{_mandir}/man1/nova-spicehtml5proxy.1%{?ext_man}
%files consoleauth
%defattr(-,root,root,-)
%{_bindir}/nova-consoleauth
%{_unitdir}/%{name}-consoleauth.service
%{_sbindir}/rc%{name}-consoleauth
%{_mandir}/man1/nova-consoleauth.1%{?ext_man}
%files network
%defattr(-,root,root,-)
%license LICENSE
%config %{_sysconfdir}/nova/rootwrap.d/network.filters
%{_unitdir}/%{name}-network.service
%{_sbindir}/rc%{name}-network
%{_bindir}/nova-dhcpbridge
%{_bindir}/nova-network
%{_mandir}/man1/nova-dhcpbridge.1%{?ext_man}
%{_mandir}/man1/nova-network.1%{?ext_man}
%files novncproxy
%defattr(-,root,root,-)
%license LICENSE
%{_unitdir}/%{name}-novncproxy.service
%{_sbindir}/rc%{name}-novncproxy
%{_bindir}/nova-novncproxy
%{_mandir}/man1/nova-novncproxy.1%{?ext_man}
%files serialproxy
%defattr(-,root,root,-)
%license LICENSE
%{_unitdir}/%{name}-serialproxy.service
%{_sbindir}/rc%{name}-serialproxy
%{_bindir}/nova-serialproxy
%{_mandir}/man1/nova-serialproxy.1%{?ext_man}
%files scheduler
%defattr(-,root,root,-)
%license LICENSE
%{_unitdir}/%{name}-scheduler.service
%{_sbindir}/rc%{name}-scheduler
%{_bindir}/nova-scheduler
%{_mandir}/man1/nova-scheduler.1%{?ext_man}
%files vncproxy
%defattr(-,root,root,-)
%license LICENSE
%{_unitdir}/%{name}-vncproxy.service
%{_sbindir}/rc%{name}-vncproxy
%{_bindir}/nova-xvpvncproxy
%{_mandir}/man1/nova-xvpvncproxy.1%{?ext_man}
%files test
%defattr(-,root,root)
%{python_sitelib}/%{component}/tests/
%{_localstatedir}/lib/%{name}-test/
%changelog