#!/usr/bin/make -f include /usr/share/openstack-pkg-tools/pkgos.make %: dh $@ --buildsystem=python_distutils --with python3,sphinxdoc override_dh_auto_install: echo "Do nothing..." override_dh_auto_clean: python3 setup.py clean rm -rf build .stestr *.egg-info debian/*.templates debian/po find . -iname '*.pyc' -delete for i in $$(find . -type d -iname __pycache__) ; do rm -rf $$i ; done rm -f debian/magnum-common.config debian/magnum-common.postinst debian/magnum-api.config debian/magnum-api.postinst rm -rf debian/*.upstart debian/*.service debian/*.init override_dh_auto_test: echo "Do nothing..." override_dh_auto_build: /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func magnum-common.postinst /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func magnum-common.config /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func magnum-api.postinst /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func magnum-api.config pkgos-merge-templates magnum-api magnum endpoint pkgos-merge-templates magnum-common magnum db rabbit ksat override_dh_install: for i in $(PYTHON3S) ; do \ python$$i setup.py install --install-layout=deb --root=$(CURDIR)/debian/tmp ; \ done rm -rf $(CURDIR)/debian/tmp/usr/etc ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) # See https://storyboard.openstack.org/#!/story/2003565 # to follow-up on failed tests in Sid (works in Stretch) pkgos-dh_auto_test --no-py2 --concurrency 2 'magnum\.tests\.unit\.(?!(drivers\.test_heat_driver\.TestHeatPoller\.test_poll_done|drivers\.test_heat_driver\.TestHeatPoller\.test_poll_destroy|api\.controllers\.v1\.test_baymodel\.TestPatch|api\.controllers\.v1\.test_baymodel\.TestPost|api\.controllers\.v1\.test_cluster_template\.TestPost|api\.controllers\.v1\.test_cluster_template\.TestListClusterTemplate|api\.controllers\.v1\.test_cluster_template\.TestPatch\.test_update_cluster_template_with_cluster_not_allow_update|api\.controllers\.v1\.test_federation\.TestListFederation\.test_collection_links|api\.controllers\.v1\.test_federation\.TestPost\.test_create_federation_with_valid_name))' endif # mkdir -p $(CURDIR)/debian/python3-magnum/usr/bin # cp $(CURDIR)/debian/tmp/usr/lib/python3/dist-packages/magnum/api/app.wsgi $(CURDIR)/debian/python3-magnum/usr/bin/magnum-api-wsgi # chmod +x $(CURDIR)/debian/python3-magnum/usr/bin/magnum-api-wsgi dh_install --fail-missing mkdir -p $(CURDIR)/debian/magnum-common/usr/share/magnum-common PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages oslo-config-generator \ --output-file $(CURDIR)/debian/magnum-common/usr/share/magnum-common/magnum.conf \ --namespace magnum.conf \ --namespace oslo.concurrency \ --namespace oslo.db \ --namespace oslo.log \ --namespace oslo.messaging \ --namespace oslo.middleware.cors \ --namespace oslo.policy \ --namespace oslo.service.periodic_task \ --namespace oslo.service.service \ --namespace keystonemiddleware.auth_token pkgos-readd-keystone-authtoken-missing-options $(CURDIR)/debian/magnum-common/usr/share/magnum-common/magnum.conf keystone_authtoken magnum pkgos-fix-config-default $(CURDIR)/debian/magnum-common/usr/share/magnum-common/magnum.conf oslo_concurrency lock_path /var/lock/magnum pkgos-fix-config-default $(CURDIR)/debian/magnum-common/usr/share/magnum-common/magnum.conf keystone_authtoken auth_protocol http pkgos-fix-config-default $(CURDIR)/debian/magnum-common/usr/share/magnum-common/magnum.conf DEFAULT pybasedir /usr/lib/python3/dist-packages pkgos-fix-config-default $(CURDIR)/debian/magnum-common/usr/share/magnum-common/magnum.conf DEFAULT bindir /usr/bin pkgos-fix-config-default $(CURDIR)/debian/magnum-common/usr/share/magnum-common/magnum.conf DEFAULT state_path /var/lock/magnum pkgos-fix-config-default $(CURDIR)/debian/magnum-common/usr/share/magnum-common/magnum.conf api host 0.0.0.0 pkgos-fix-config-default $(CURDIR)/debian/magnum-common/usr/share/magnum-common/magnum.conf certificates cert_manager_type barbican pkgos-fix-config-default $(CURDIR)/debian/magnum-common/usr/share/magnum-common/magnum.conf oslo_messaging_notifications driver messaging pkgos-fix-config-default $(CURDIR)/debian/magnum-common/usr/share/magnum-common/magnum.conf keystone_authtoken auth_version v3 pkgos-fix-config-default $(CURDIR)/debian/magnum-common/usr/share/magnum-common/magnum.conf trust cluster_user_trust true # Magnum using also keystone_auth, set some defaults # which are configured by debconf later pkgos-fix-config-default $(CURDIR)/debian/magnum-common/usr/share/magnum-common/magnum.conf keystone_auth auth_protocol http pkgos-fix-config-default $(CURDIR)/debian/magnum-common/usr/share/magnum-common/magnum.conf keystone_auth auth_version v3 pkgos-fix-config-default $(CURDIR)/debian/magnum-common/usr/share/magnum-common/magnum.conf keystone_auth auth_url http://localhost:5000 pkgos-fix-config-default $(CURDIR)/debian/magnum-common/usr/share/magnum-common/magnum.conf keystone_auth www_authenticate_uri http://localhost:5000 pkgos-fix-config-default $(CURDIR)/debian/magnum-common/usr/share/magnum-common/magnum.conf keystone_auth project_name service pkgos-fix-config-default $(CURDIR)/debian/magnum-common/usr/share/magnum-common/magnum.conf keystone_auth project_domain_name default pkgos-fix-config-default $(CURDIR)/debian/magnum-common/usr/share/magnum-common/magnum.conf keystone_auth username magnum pkgos-fix-config-default $(CURDIR)/debian/magnum-common/usr/share/magnum-common/magnum.conf keystone_auth user_domain_name default pkgos-fix-config-default $(CURDIR)/debian/magnum-common/usr/share/magnum-common/magnum.conf keystone_auth region_name regionOne pkgos-fix-config-default $(CURDIR)/debian/magnum-common/usr/share/magnum-common/magnum.conf keystone_auth auth_type password mkdir -p $(CURDIR)/debian/magnum-common/etc/magnum/policy.d PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages oslopolicy-sample-generator \ --output-file $(CURDIR)/debian/magnum-common/etc/magnum/policy.d/00_default_policy.yaml \ --format yaml \ --namespace magnum # Comment out deprecated policies, otherwise, Nova doesn't work sed -i 's/^"/#"/' $(CURDIR)/debian/magnum-common/etc/magnum/policy.d/00_default_policy.yaml cp etc/magnum/api-paste.ini $(CURDIR)/debian/magnum-common/usr/share/magnum-common cp etc/magnum/keystone_auth_default_policy.sample $(CURDIR)/debian/magnum-common/usr/share/magnum-common/keystone_auth_default_policy.json override_dh_python3: dh_python3 --shebang=/usr/bin/python3