#!/usr/bin/make -f include /usr/share/openstack-pkg-tools/pkgos.make %: dh $@ --buildsystem=python_distutils --with python3,sphinxdoc override_dh_clean: dh_clean rm -rf build rm -f doc/source/api/heat.* doc/source/api/modules.rst rm -rf heat.egg-info .testrepository rm -rf doc/build *.egg-info find . -iname '*.pyc' -delete rm -f run_tests.err.log rm -f \ debian/heat-common.postinst \ debian/heat-common.config rm -f debian/*.init debian/*.service debian/*.upstart debian/*.templates rm -f debian/heat-common.postinst debian/heat-common.config debian/heat-api.config debian/heat-api.postinst debian/heat-api-cfn.config debian/heat-api-cfn.postinst debian/heat-common.postrm rm -f doc/source/_static/heat.conf.sample doc/source/_static/heat.policy.yaml.sample rm -rf debian/po find . -iname '*.pyc' -delete for i in $$(find . -type d -iname __pycache__) ; do rm -rf $$i ; done override_dh_auto_build: /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func heat-common.postinst /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func heat-common.config /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func heat-api.config /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func heat-api.postinst /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func heat-api-cfn.config /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func heat-api-cfn.postinst /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_postrm heat-common.postrm cp -auxf debian/po.in debian/po pkgos-merge-templates heat-api heat endpoint pkgos-merge-templates heat-api-cfn heat-api-cfn endpoint pkgos-merge-templates heat-common heat db rabbit ksat override_dh_auto_clean: python3 setup.py clean override_dh_auto_install: echo "Do nothing..." override_dh_auto_test: echo "Do nothing..." override_dh_install: for i in $(PYTHON3S) ; do \ python$$i setup.py install --install-layout=deb --root $(CURDIR)/debian/tmp ; \ done ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) # echo "disabled tests" # * Blacklist failing tests (Closes: #1074656). See upstream bug tracker report: # https://storyboard.openstack.org/#!/story/2011174 # - heat.tests.engine.service.test_software_config.SoftwareConfigServiceTest.test_push_metadata_software_deployments_retry # - heat.tests.openstack.nova.test_server.ServerInternalPortTest.test_prepare_ports_for_replace_detach_failed # - heat.tests.openstack.nova.test_server.ServerInternalPortTest.test_restore_ports_after_rollback_attach_failed # - heat.tests.engine.service.test_software_config.SoftwareConfigServiceTestWithConstraint.test_push_metadata_software_deployments_retry # * Blacklist failing test (Closes: #1081443) # - heat.tests.test_hot.HOTemplateTest.test_make_url_file pkgos-dh_auto_test --no-py2 'heat\.tests\.(?!db\.test_migrations\.TestHeatMigrationsSQLite\.test_walk_versions|db\.test_migrations\.ModelsMigrationsSyncSQLite\.test_models_sync|engine\.service\.test_stack_delete\.StackDeleteTest\.test_stack_delete|engine\.service\.test_stack_delete\.StackDeleteTest\.test_stack_delete_acquired_lock|engine\.service\.test_stack_delete\.StackDeleteTest\.test_stack_delete_acquired_lock_stop_timers|engine\.service\.test_stack_snapshot\.SnapshotServiceTest\.test_restore_snapshot|db\.test_sqlalchemy_api\.DBAPIResourceUpdateTest\.test_locked_resource_update_by_other_engine|db\.test_sqlalchemy_api\.DBAPIResourceUpdateTest\.test_locked_resource_update_by_same_engine|db\.test_sqlalchemy_api\.DBAPIResourceUpdateTest\.test_release_resource_lock|db\.test_sqlalchemy_api\.DBAPIResourceUpdateTest\.test_steal_resource_lock|db\.test_sqlalchemy_api\.DBAPIResourceUpdateTest\.test_unlocked_resource_update|.*openstack\.aodh\.test_alarm\.AodhAlarmTest\.test_mem_alarm_high_not_integer_parameters.*|.*test_properties\.PropertyTest\.test_int_bad.*|openstack\.nova\.test_server\.ServerInternalPortTest\.test_server_update_image_rebuild_failed|openstack\.nova\.test_server\.ServerInternalPortTest\.test_server_update_image_rebuild_status_active|openstack\.nova\.test_server\.ServerInternalPortTest\.test_server_update_image_rebuild_status_active_keep_ephemeral|openstack\.nova\.test_server\.ServerInternalPortTest\.test_server_update_image_rebuild_status_rebuild|openstack\.nova\.test_server\.ServerInternalPortTest\.test_server_update_image_rebuild_status_rebuild_keep_ephemeral|openstack\.nova\.test_server\.ServerInternalPortTest\.test_server_update_image_rebuild_with_new_password|openstack\.nova\.test_server\.ServersTest\.test_server_update_image_rebuild_failed|openstack\.nova\.test_server\.ServersTest\.test_server_update_image_rebuild_status_active|openstack\.nova\.test_server\.ServersTest\.test_server_update_image_rebuild_status_active_keep_ephemeral|openstack\.nova\.test_server\.ServersTest\.test_server_update_image_rebuild_status_rebuild|openstack\.nova\.test_server\.ServersTest\.test_server_update_image_rebuild_status_rebuild_keep_ephemeral|openstack\.nova\.test_server\.ServersTest\.test_server_update_image_rebuild_with_new_password|engine\.service\.test_software_config\.SoftwareConfigServiceTest\.test_push_metadata_software_deployments_temp_url|engine\.service\.test_software_config\.SoftwareConfigServiceTestWithConstraint\.test_push_metadata_software_deployments_temp_url|test_resource\.ResourceAvailabilityTest\.test_service_deployed_required_extension_true_list|test_resource\.ResourceAvailabilityTest\.test_service_deployed_required_extension_true_list_fail|test_resource\.ResourceAvailabilityTest\.test_service_deployed_required_extension_true_string|engine\.service\.test_software_config\.SoftwareConfigServiceTest\.test_push_metadata_software_deployments_retry|engine\.service\.test_software_config\.SoftwareConfigServiceTestWithConstraint\.test_push_metadata_software_deployments_retry|openstack\.nova\.test_server\.ServerInternalPortTest\.test_prepare_ports_for_replace_detach_failed|openstack\.nova\.test_server\.ServerInternalPortTest\.test_restore_ports_after_rollback_attach_failed|test_hot\.HOTemplateTest\.test_make_url_file)' endif rm -rf $(CURDIR)/debian/tmp/usr/etc mkdir -p $(CURDIR)/debian/heat-common/usr/share/heat-common PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages oslo-config-generator \ --namespace heat.common.cache \ --namespace heat.common.config \ --namespace heat.common.context \ --namespace heat.common.crypt \ --namespace heat.engine.clients.os.keystone.heat_keystoneclient \ --namespace heat.engine.hot.functions \ --namespace heat.common.wsgi \ --namespace heat.engine.clients \ --namespace heat.engine.notification \ --namespace heat.engine.resources \ --namespace heat.api.aws.ec2token \ --namespace keystonemiddleware.auth_token \ --namespace oslo.cache \ --namespace oslo.messaging \ --namespace oslo.middleware \ --namespace oslo.log \ --namespace oslo.policy \ --namespace oslo.reports \ --namespace oslo.service.service \ --namespace oslo.service.periodic_task \ --namespace oslo.service.sslutil \ --namespace oslo.versionedobjects \ --wrap-width 140 \ --output-file $(CURDIR)/debian/heat-common/usr/share/heat-common/heat.conf pkgos-readd-keystone-authtoken-missing-options $(CURDIR)/debian/heat-common/usr/share/heat-common/heat.conf keystone_authtoken heat mkdir -p $(CURDIR)/debian/heat-common/etc/heat/policy.d PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages oslopolicy-sample-generator \ --output $(CURDIR)/debian/heat-common/etc/heat/policy.d/00_default_policy.yaml \ --format yaml \ --namespace heat # Comment out deprecated policies sed -i 's/^"/#"/' $(CURDIR)/debian/heat-common/etc/heat/policy.d/00_default_policy.yaml # Use the policy.d folder pkgos-fix-config-default $(CURDIR)/debian/heat-common/usr/share/heat-common/heat.conf oslo_policy policy_dirs /etc/heat/policy.d sed -i 's|^[# \t]*connection[\t #]*=.*|connection=sqlite:////var/lib/heat/heatdb|' $(CURDIR)/debian/heat-common/usr/share/heat-common/heat.conf # Fixup a few default for the [trustee] config pkgos-fix-config-default $(CURDIR)/debian/heat-common/usr/share/heat-common/heat.conf trustee auth_type password pkgos-fix-config-default $(CURDIR)/debian/heat-common/usr/share/heat-common/heat.conf trustee user_domain_name default dh_install dh_missing -Xbin/cinder-keystone-setup --fail-missing override_dh_sphinxdoc: ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS))) PYTHONPATH=. PYTHON=python3 python3 -m sphinx -b html doc/source $(CURDIR)/debian/heat-doc/usr/share/doc/heat-doc/html dh_sphinxdoc endif override_dh_python3: dh_python3 --shebang=/usr/bin/python3 # sed -i 's|usr/bin/env python|usr/bin/env python3|' $(CURDIR)/debian/python3-heat/usr/lib/python3/dist-packages/heat_integrationtests/install-requirements