#!/usr/bin/make -f include /usr/share/openstack-pkg-tools/pkgos.make # This is a key for testing. export OS_SIMPLE_CRYPTO_PLUGIN__KEK=Fh7icUmGHeaI0FmoArBt6OUxiAwDPmYFzCJJv5M8CIY= %: dh $@ --buildsystem=pybuild --with python3,sphinxdoc override_dh_auto_clean: rm -f debian/*.init debian/*.service debian/*.upstart rm -rf build rm -rf barbican.sqlite debian/po debian/barbican-api.templates debian/barbican-common.templates rm -f debian/barbican-api.postinst debian/barbican-api.config debian/barbican-common.postinst debian/barbican-common.config debian/barbican-common.postrm find $(CURDIR) -type f -iname '*.pyc' -delete || true find $(CURDIR) -type d -iname __pycache__ -exec rm -rf {} \; || true rm -rf *.egg-info rm -f doc/source/_static/barbican.conf.sample doc/source/_static/barbican.policy.yaml.sample override_dh_auto_build: /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func barbican-api.postinst /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func barbican-api.config /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func barbican-common.postinst /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func barbican-common.config /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_postrm barbican-common.postrm pkgos-merge-templates barbican-api barbican endpoint pkgos-merge-templates barbican-common barbican 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 --root=debian/tmp --install-layout=deb ; \ done # test_should_raise_with_unsigned_pkcs10_data see #1011703 ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) # This needs further setup. Let's disable it for now: # barbican.tests.queue.test_keystone_listener.WhenUsingNotificationTask.* PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages oslo-config-generator --config-file etc/oslo-config-generator/barbican.conf --output-file etc/barbican/barbican.conf # pkgos-dh_auto_test --no-py2 'barbican\.tests\.(?!tasks\.test_keystone_consumer\.WhenUsingKeystoneEventConsumer\.test_.*)' pkgos-dh_auto_test --no-py2 --serial 'barbican\.tests\..*' endif # Generate the barbican.conf config using installed python-barbican files. mkdir -p $(CURDIR)/debian/barbican-common/usr/share/barbican-common PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages oslo-config-generator \ --output-file $(CURDIR)/debian/barbican-common/usr/share/barbican-common/barbican.conf \ --wrap-width 140 \ --namespace barbican.common.config \ --namespace barbican.plugin.crypto \ --namespace barbican.plugin.crypto.p11 \ --namespace barbican.plugin.crypto.simple \ --namespace barbican.plugin.dogtag \ --namespace barbican.plugin.secret_store \ --namespace barbican.plugin.secret_store.kmip \ --namespace barbican.plugin.secret_store.vault \ --namespace keystonemiddleware.audit \ --namespace keystonemiddleware.auth_token \ --namespace oslo.db \ --namespace oslo.log \ --namespace oslo.messaging \ --namespace oslo.middleware.cors \ --namespace oslo.middleware.healthcheck \ --namespace oslo.middleware.http_proxy_to_wsgi \ --namespace oslo.policy \ --namespace oslo.service.service \ --namespace oslo.versionedobjects pkgos-readd-keystone-authtoken-missing-options $(CURDIR)/debian/barbican-common/usr/share/barbican-common/barbican.conf keystone_authtoken barbican # Same with policy.conf mkdir -p $(CURDIR)/debian/barbican-common/etc/barbican/policy.d PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages oslopolicy-sample-generator \ --output-file $(CURDIR)/debian/barbican-common/etc/barbican/policy.d/00_default_policy.yaml \ --format yaml \ --namespace barbican # Comment out deprecated policies, otherwise, the policy doesn't work sed -i 's/^"/#"/' $(CURDIR)/debian/barbican-common/etc/barbican/policy.d/00_default_policy.yaml # Use the policy.d folder pkgos-fix-config-default $(CURDIR)/debian/barbican-common/usr/share/barbican-common/barbican.conf oslo_policy policy_dirs /etc/barbican/policy.d # Restore sanity... pkgos-fix-config-default $(CURDIR)/debian/barbican-common/usr/share/barbican-common/barbican.conf keystone_notifications enable True dh_install rm -rf $(CURDIR)/debian/tmp/usr/etc dh_missing --fail-missing # Installing the other config files. for i in api_audit_map.conf barbican-api-paste.ini barbican-functional.conf ; do \ install -D -m 0664 etc/barbican/$$i $(CURDIR)/debian/barbican-common/usr/share/barbican-common/$$i ; \ done override_dh_sphinxdoc: ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS))) PYTHONPATH=. PYTHON=python3 python3 -m sphinx -b html doc/source $(CURDIR)/debian/barbican-doc/usr/share/doc/barbican-doc/html dh_sphinxdoc endif override_dh_python3: dh_python3 --shebang=/usr/bin/python3