#!/usr/bin/make -f # auth_token middleware now requires access to HOME, otherwise # test suite cause FTBFS. See (LP: #1031022) export HOME="$(CURDIR)/debian/tests/" # This is to avoid git clone of keystoneclient when running unit tests. # See https://review.openstack.org/122768/ export KSCTEST_PATH=/usr/lib/python3/dist-packages/keystoneclient include /usr/share/openstack-pkg-tools/pkgos.make %: dh $@ --buildsystem=python_distutils --with python3,sphinxdoc,systemd override_dh_clean: rm -rf $(CURDIR)/build $(CURDIR)/keystone.egg-info $(CURDIR)/.cache rm -rf $(CURDIR)/keystone/test/keystone.sql.log $(CURDIR)/keystone/test/keystone.ldap.log rm -rf $(CURDIR)/doc/build # NOTE(adam_g) The following stuff is built in /doc/source. Safe for now, but # should be fixed upstream or updated here post-essex rm -rf $(CURDIR)/doc/source/keystone*.rst rm -rf $(CURDIR)/doc/source/modules.rst rm -rf $(CURDIR)/doc/source/sourcecode $(CURDIR)/doc/source/api rm -f $(CURDIR)/doc/source/_static/keystone.conf.sample rm -f $(CURDIR)/doc/source/_static/keystone.policy.yaml.sample rm -rf $(CURDIR)/admin.log $(CURDIR)/keystone-legacy-auth.log rm -f $(CURDIR)/debian/keystone.config $(CURDIR)/debian/keystone.postinst find $(CURDIR)/keystone/tests -name '*.db' -delete rm -rf $(CURDIR)/vendor rm -rf $(CURDIR)/.stestr rm -f $(CURDIR)/debian/tests/testing.db rm -f $(CURDIR)/debian/keystone.keystone*.init $(CURDIR)/debian/keystone.keystone*.service $(CURDIR)/debian/keystone.keystone*.upstart find $(CURDIR) -name '*.pyc' -delete rm -f AUTHORS ChangeLog dh_clean override_dh_auto_build: /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func keystone.config /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func keystone.postinst override_dh_auto_clean: python3 setup.py clean override_dh_auto_test: echo "Do nothing..." override_dh_auto_install: echo "Doing nothing..." override_dh_install: for i in $(PYTHON3S) ; do \ PYTHON=python$$i python$$i setup.py install --install-layout=deb --root $(CURDIR)/debian/tmp ; \ done ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) @echo "===> Running tests" mkdir -p $(CURDIR)/keystone/tests/tmp pkgos-dh_auto_test --no-py2 'keystone\.tests\.unit.(?!(.*test_v3_federation\.SAMLGenerationTests\.test_sign_assertion_exc.*|.*test_sql_upgrade.FullMigration.*|.*test_hacking_checks\.TestCheckForMutableDefaultArgs\.test.*|.*common\.test_notifications\.NotificationsTestCase.*))' endif rm -rf $(CURDIR)/debian/tmp/usr/etc dh_install dh_missing --fail-missing rm -rf debian/python3-keystone/usr/lib/python*/*/doc rm -rf debian/python3-keystone/usr/lib/python*/*/tools rm -rf debian/python3-keystone/usr/lib/python*/*/examples install -D -m 0600 $(CURDIR)/debian/logging.conf $(CURDIR)/debian/keystone/etc/keystone/logging.conf mkdir -p $(CURDIR)/debian/keystone/usr/share/keystone PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages oslo-config-generator \ --output-file $(CURDIR)/debian/keystone/usr/share/keystone/keystone.conf \ --wrap-width 140 \ --namespace keystone \ --namespace oslo.cache \ --namespace oslo.log \ --namespace oslo.messaging \ --namespace oslo.policy \ --namespace oslo.db \ --namespace oslo.middleware \ --namespace osprofiler pkgos-fix-config-default $(CURDIR)/debian/keystone/usr/share/keystone/keystone.conf catalog template_file /etc/keystone/default_catalog.templates pkgos-fix-config-default $(CURDIR)/debian/keystone/usr/share/keystone/keystone.conf DEFAULT log_dir /var/log/keystone pkgos-fix-config-default $(CURDIR)/debian/keystone/usr/share/keystone/keystone.conf DEFAULT log_file keystone.log mkdir -p $(CURDIR)/debian/keystone/etc/keystone/policy.d PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages oslopolicy-sample-generator \ --output-file $(CURDIR)/debian/keystone/etc/keystone/policy.d/00_default_policy.yaml \ --format yaml \ --namespace keystone # Use the policy.d folder pkgos-fix-config-default $(CURDIR)/debian/keystone/usr/share/keystone/keystone.conf oslo_policy policy_dirs /etc/keystone/policy.d install -D -m 0644 debian/keystone.apparmor $(CURDIR)/debian/keystone/etc/apparmor.d/usr.bin.keystone-all dh_apparmor --profile-name=usr.bin.keystone-all override_dh_sphinxdoc: ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS))) PYTHONPATH=. PYTHON=python3 python3 -m sphinx -b html doc/source $(CURDIR)/debian/keystone-doc/usr/share/doc/keystone-doc/html dh_sphinxdoc endif override_dh_installman: ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS))) PYTHONPATH=. PYTHON=python3 python3 -m sphinx -b man doc/source doc/build/man dh_installman endif override_dh_python3: dh_python3 --shebang=/usr/bin/python3 #override_dh_installmenu: # dh_installinit --name=keystone-admin # dh_installinit --name=keystone-public