#!/usr/bin/make -f include /usr/share/openstack-pkg-tools/pkgos.make NOVA_CONF=$(CURDIR)/debian/nova-common/usr/share/nova-common/nova.conf %: dh $@ --buildsystem=python_distutils --with python3,sphinxdoc,systemd override_dh_auto_clean: python3 setup.py clean rm -rf doc/build/ doc/source/api doc/.autogenerated rm -rf tests.sqlite clean.sqlite run_tests.log rm -rf CA rm -rf nova.egg-info rm -f po/nova.pot rm -rf .autogenerated rm -f debian/nova-common.config debian/nova-common.postinst \ debian/nova-api.config debian/nova-api.postinst debian/nova-placement-api.config debian/nova-placement-api.postinst debian/nova-common.postrm rm -f debian/*.init debian/*.service debian/*.upstart rm -rf build etc/nova/nova.conf.sample rm -rf .testrepository subunit.log instances keys rm -rf debian/bla rm -f debian/nova-api.templates debian/nova-common.templates find . -type d -name __pycache__ -exec rm -r {} \+ override_dh_auto_build: /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func nova-common.config /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func nova-common.postinst /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func nova-api.config /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func nova-api.postinst /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func nova-placement-api.config /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func nova-placement-api.postinst /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_postrm nova-common.postrm pkgos-merge-templates nova-api nova endpoint pkgos-merge-templates nova-common nova db rabbit ksat pkgos-merge-templates nova-placement-api nova-placement-api endpoint db override_dh_sphinxdoc: ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS))) PYTHONPATH=. python3 -m sphinx -b html doc/source $(CURDIR)/debian/nova-doc/usr/share/doc/nova-doc/html dh_sphinxdoc -O--buildsystem=python_distutils endif override_dh_installman: ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS))) PYTHONPATH=. python3 -m sphinx -b man doc/source doc/build/man dh_installman -O--buildsystem=python_distutils endif override_dh_auto_install: echo "Please do nothing" override_dh_install: for i in $(PYTHON3S) ; do \ python3 setup.py install -f --install-layout=deb --root=$(CURDIR)/debian/tmp ; \ done ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) pkgos-dh_auto_test --no-py2 'nova\.tests\.unit\.(?!(.*virt.libvirt\.test_driver\.LibvirtConnTestCase\.test_spawn_with_config_drive.*|.*test_wsgi\.TestWSGIServerWithSSL.*|.*virt\.xenapi.*|.*test_hacking\.HackingTestCase.*|.*CreateInstanceTypeTest\.test_name_with_non_printable_characters.*|.*PatternPropertiesTestCase\.test_validate_patternProperties_fails.*))' endif rm -rf $(CURDIR)/debian/tmp/usr/etc mkdir -p $(CURDIR)/debian/nova-common/etc/nova PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages python3-oslopolicy-sample-generator \ --output-file=$(CURDIR)/debian/nova-common/etc/nova/policy.json \ --format json \ --namespace nova mkdir -p $(CURDIR)/debian/nova-common/usr/share/nova-common PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages python3-oslo-config-generator \ --output-file=$(CURDIR)/debian/nova-common/usr/share/nova-common/nova.conf \ --wrap-width 140 \ --namespace nova.conf \ --namespace oslo.log \ --namespace oslo.messaging \ --namespace oslo.policy \ --namespace oslo.service.periodic_task \ --namespace oslo.service.service \ --namespace oslo.db \ --namespace oslo.db.concurrency \ --namespace oslo.middleware \ --namespace oslo.concurrency \ --namespace keystonemiddleware.auth_token \ --namespace osprofiler pkgos-readd-keystone-authtoken-missing-options $(NOVA_CONF) keystone_authtoken nova PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages python3-oslopolicy-sample-generator \ --output-file=$(CURDIR)/debian/nova-common/usr/share/nova-common/policy.json \ --format json \ --namespace nova PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages python3-oslopolicy-sample-generator \ --output-file=$(CURDIR)/debian/nova-common/usr/share/nova-common/placement-policy.json \ --namespace placement \ --format json # Otherwise, this is set to the build dir pkgos-fix-config-default $(NOVA_CONF) DEFAULT pybasedir /usr/lib/python3/dist-packages pkgos-fix-config-default $(NOVA_CONF) DEFAULT bindir /usr/bin # General needed fixes pkgos-fix-config-default $(NOVA_CONF) oslo_concurrency lock_path /var/lock/nova pkgos-fix-config-default $(NOVA_CONF) DEFAULT state_path /var/lib/nova # Let's use Neutron by default, and not stupid nova-network pkgos-fix-config-default $(NOVA_CONF) DEFAULT security_group_api neutron pkgos-fix-config-default $(NOVA_CONF) DEFAULT network_api_class nova.network.neutronv2.api.API pkgos-fix-config-default $(NOVA_CONF) DEFAULT use_neutron True pkgos-fix-config-default $(NOVA_CONF) DEFAULT linuxnet_interface_driver nova.network.linux_net.LinuxOVSInterfaceDriver pkgos-fix-config-default $(NOVA_CONF) DEFAULT firewall_driver nova.virt.firewall.NoopFirewallDriver pkgos-fix-config-default $(NOVA_CONF) neutron default_floating_pool ext-net # Fixup a few defaults for the [neutron] auth pkgos-fix-config-default $(NOVA_CONF) neutron auth_type password pkgos-fix-config-default $(NOVA_CONF) neutron username admin pkgos-fix-config-default $(NOVA_CONF) neutron user_domain_name default pkgos-fix-config-default $(NOVA_CONF) neutron project_name admin pkgos-fix-config-default $(NOVA_CONF) neutron project_domain_name default pkgos-fix-config-default $(NOVA_CONF) neutron service_name neutron pkgos-fix-config-default $(NOVA_CONF) neutron auth_url http://127.0.0.1:5000 pkgos-fix-config-default $(NOVA_CONF) neutron service_metadata_proxy true # Convenient default for the SQLite default db pkgos-fix-config-default $(NOVA_CONF) database connection sqlite:////var/lib/nova/novadb # Let's use SPICE byd default pkgos-fix-config-default $(NOVA_CONF) VNC enabled false pkgos-fix-config-default $(NOVA_CONF) VNC vncserver_listen 0.0.0.0 pkgos-fix-config-default $(NOVA_CONF) spice vncserver_listen 0.0.0.0 pkgos-fix-config-default $(NOVA_CONF) spice server_listen 0.0.0.0 pkgos-fix-config-default $(NOVA_CONF) spice server_proxyclient_address \$$my_ip pkgos-fix-config-default $(NOVA_CONF) spice enabled true # Set glance on localhost by default, to allow PoC to work pkgos-fix-config-default $(NOVA_CONF) glance api_servers http://localhost:9292 # Works by default pkgos-fix-config-default $(NOVA_CONF) keystone_authtoken auth_protocol http # Cinder os_region_name set to regionOne as default value pkgos-fix-config-default $(NOVA_CONF) cinder os_region_name regionOne # Fixup a few default for the [placement] auth pkgos-fix-config-default $(NOVA_CONF) placement region_name regionOne pkgos-fix-config-default $(NOVA_CONF) placement project_domain_name default pkgos-fix-config-default $(NOVA_CONF) placement project_name service pkgos-fix-config-default $(NOVA_CONF) placement auth_type password pkgos-fix-config-default $(NOVA_CONF) placement user_domain_name default pkgos-fix-config-default $(NOVA_CONF) placement auth_url http://localhost:5000/v3 pkgos-fix-config-default $(NOVA_CONF) placement username = placement rm debian/tmp/usr/bin/nova-api-os-compute rm debian/tmp/usr/bin/nova-api-metadata dh_install dh_missing --fail-missing -Xbin/nova-all -Xbin/nova-network install -D -m 0440 $(CURDIR)/debian/nova-common.sudoers $(CURDIR)/debian/nova-common/etc/sudoers.d/nova-common install -D -m 0644 $(CURDIR)/etc/nova/logging_sample.conf $(CURDIR)/debian/nova-common/usr/share/nova-common/logging.conf set -e ; for hypervisor in qemu kvm uml lxc ironic; do \ install -D -m 0600 $(CURDIR)/debian/nova-compute-$${hypervisor}.conf $(CURDIR)/debian/nova-compute-$${hypervisor}/etc/nova/nova-compute.conf; \ done find $(CURDIR)/debian -name .gitignore -delete cp $(CURDIR)/nova/db/sqlalchemy/migrate_repo/migrate.cfg $(CURDIR)/debian/python3-nova/usr/lib/python3/dist-packages/nova/db/sqlalchemy/migrate_repo override_dh_fixperms: dh_fixperms -Xnova_sudoers dh_fixperms -Xnova_tgt override_dh_auto_test: echo "Do nothing..." # We use override_dh_installmenu because it's done in the sequence with dh, # and we already override dh_installinit in pkgos.make. # Obviously, we will never use a Desktop menu in such a package, so that's # not a problem. override_dh_installmenu: #dh_installinit -pnova-console --name=nova-consoleauth dh_installinit --name=nova-novncproxy dh_installinit --name=nova-spicehtml5proxy dh_installinit --name=nova-xenvncproxy dh_installinit --name=nova-serialproxy install -D -m 0644 $(CURDIR)/debian/nova-consoleproxy.mydefault $(CURDIR)/debian/nova-consoleproxy/usr/share/nova-consoleproxy/default override_dh_python3: dh_python3 --shebang=/usr/bin/python3