#!/usr/bin/make -f include /usr/share/openstack-pkg-tools/pkgos.make %: dh $@ --buildsystem=python_distutils --with python3,sphinxdoc override_dh_auto_clean: python3 setup.py clean rm -f debian/ironic-common.config debian/ironic-common.postinst debian/ironic-api.postinst debian/ironic-api.config debian/ironic-api.templates rm -rf doc/build *.egg-info .stestr build rm -rf doc/source/contributor/api doc/source/_static rm -f debian/*.init debian/*.service debian/*.upstart rm -rf $(CURDIR)/debian/po $(CURDIR)/debian/ironic-common.templates find . -iname '*.pyc' -delete for i in $$(find . -type d -iname __pycache__) ; do rm -rf $$i ; done override_dh_auto_build: cp -r $(CURDIR)/debian/po.in $(CURDIR)/debian/po cp $(CURDIR)/debian/ironic-common.templates.in $(CURDIR)/debian/ironic-common.templates /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func ironic-common.config /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func ironic-common.postinst /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func ironic-api.config /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func ironic-api.postinst pkgos-merge-templates ironic-api ironic endpoint pkgos-merge-templates ironic-common ironic db rabbit ksat override_dh_auto_test: echo "Do nothing..." override_dh_auto_install: echo "Do nothing..." 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 # Disabled: # - ironic.tests.unit.drivers.modules.test_pxe.PXEAnacondaDeployTestCase.test_reboot_to_instance # Try to access to /etc/dnsmasq.d/hostsdir.d/ironic-52:54:00:cf:2d:31.conf which apparently doesn't exist. # - ironic.tests.unit.objects.test_objects.TestObjectVersions.test_object_version_check # Has a wrong version of the hash # Blacklist TestFormatInspectors.test_iso_9660 (Closes: #1084278). ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) pkgos-dh_auto_test --no-py2 'ironic\.tests\.unit\.(?!(.*drivers\.modules\.test_pxe\.PXEAnacondaDeployTestCase\.test_reboot_to_instance.*|.*common\.test_pxe_utils\.TestPXEUtils\.test_place_common_config.*|.*drivers\.modules\.network\.test_common\.TestNeutronVifPortIDMixin\.test_port_changed_client_id.*|objects\.test_objects\.TestObjectVersions\.test_object_version_check|common\.test_format_inspector\.TestFormatInspectors\.test_iso_9660|common\.test_format_inspector\.TestFormatInspectors\.test_iso_udf))' endif mkdir -p $(CURDIR)/debian/ironic-common/usr/share/ironic-common PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages oslo-config-generator \ --output-file $(CURDIR)/debian/ironic-common/usr/share/ironic-common/ironic.conf \ --wrap-width 140 \ --namespace ironic \ --namespace ironic_lib.disk_utils \ --namespace ironic_lib.disk_partitioner \ --namespace ironic_lib.exception \ --namespace ironic_lib.json_rpc \ --namespace ironic_lib.mdns \ --namespace ironic_lib.metrics \ --namespace ironic_lib.metrics_statsd \ --namespace ironic_lib.qemu_img \ --namespace ironic_lib.utils \ --namespace oslo.db \ --namespace oslo.messaging \ --namespace oslo.middleware.cors \ --namespace oslo.middleware.healthcheck \ --namespace oslo.middleware.http_proxy_to_wsgi \ --namespace oslo.concurrency \ --namespace oslo.policy \ --namespace oslo.log \ --namespace oslo.reports \ --namespace oslo.service.service \ --namespace oslo.service.periodic_task \ --namespace oslo.service.sslutils \ --namespace osprofiler \ --namespace keystonemiddleware.audit \ --namespace keystonemiddleware.auth_token pkgos-readd-keystone-authtoken-missing-options $(CURDIR)/debian/ironic-common/usr/share/ironic-common/ironic.conf keystone_authtoken ironic # We're using python3, the default isn't good, it's using py2. pkgos-fix-config-default $(CURDIR)/debian/ironic-common/usr/share/ironic-common/ironic.conf DEFAULT pybasedir /usr/lib/python3/dist-packages/ironic # Fix the default httpboot path, some of it is in the postinst # pkgos-fix-config-default $(CURDIR)/debian/ironic-common/usr/share/ironic-common/ironic.conf deploy http_root /var/lib/ironic/httpboot # Set some nice defaults # pkgos-fix-config-default $(CURDIR)/debian/ironic-common/usr/share/ironic-common/ironic.conf DEFAULT enabled_boot_interfaces pxe # pkgos-fix-config-default $(CURDIR)/debian/ironic-common/usr/share/ironic-common/ironic.conf DEFAULT enabled_deploy_interfaces iscsi,direct # pkgos-fix-config-default $(CURDIR)/debian/ironic-common/usr/share/ironic-common/ironic.conf DEFAULT default_deploy_interface direct # pkgos-fix-config-default $(CURDIR)/debian/ironic-common/usr/share/ironic-common/ironic.conf DEFAULT enabled_inspect_interfaces inspector # pkgos-fix-config-default $(CURDIR)/debian/ironic-common/usr/share/ironic-common/ironic.conf DEFAULT default_network_interface neutron # pkgos-fix-config-default $(CURDIR)/debian/ironic-common/usr/share/ironic-common/ironic.conf oslo_concurrency lock_path /var/lock/ironic # pkgos-fix-config-default $(CURDIR)/debian/ironic-common/usr/share/ironic-common/ironic.conf pxe tftp_root /srv/tftp # pkgos-fix-config-default $(CURDIR)/debian/ironic-common/usr/share/ironic-common/ironic.conf pxe ipxe_enabled true mkdir -p $(CURDIR)/debian/ironic-common/etc/ironic/policy.d PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages oslopolicy-sample-generator \ --output-file $(CURDIR)/debian/ironic-common/etc/ironic/policy.d/00_default_policy.yaml \ --format yaml \ --namespace ironic.api # Comment out deprecated policies sed -i 's/^"/#"/' $(CURDIR)/debian/ironic-common/etc/ironic/policy.d/00_default_policy.yaml # Fixed using /etc/ironic/policy.d pkgos-fix-config-default $(CURDIR)/debian/ironic-common/usr/share/ironic-common/ironic.conf oslo_policy policy_dirs /etc/ironic/policy.d sed -i 's|#connection=|connection=sqlite:////var/lib/ironic/ironicdb|' $(CURDIR)/debian/ironic-common/usr/share/ironic-common/ironic.conf dh_install dh_missing --fail-missing override_dh_sphinxdoc: ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS))) if ! PYTHONPATH=$(CURDIR) PYTHON=python3 python3 -m sphinx -a -b html doc/source $(CURDIR)/debian/ironic-doc/usr/share/doc/ironic-doc/html ; then \ cat /tmp/sphinx-err* ; \ exit 1 ; \ fi mkdir -p $(CURDIR)/debian/ironic-doc/usr/share/doc/ironic-doc/html/_static touch $(CURDIR)/debian/ironic-doc/usr/share/doc/ironic-doc/html/_static/toggle.js #rm $(CURDIR)/debian/ironic-doc/usr/share/doc/ironic-doc/html/search.html dh_sphinxdoc -O--buildsystem=python_distutils endif override_dh_python3: dh_python3 --shebang=/usr/bin/python3