File: rules

package info (click to toggle)
heat 1%3A15.0.0-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 15,820 kB
  • sloc: python: 177,217; sh: 1,576; makefile: 209
file content (100 lines) | stat: -rwxr-xr-x 5,103 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#!/usr/bin/make -f

include /usr/share/openstack-pkg-tools/pkgos.make

%:
	dh $@ --buildsystem=python_distutils --with python3,sphinxdoc,systemd

override_dh_clean:
	dh_clean
	rm -rf heat.egg-info .testrepository
	rm -rf doc/build
	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

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
	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)))
	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).*'
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.config \
		--namespace heat.common.context \
		--namespace heat.common.crypt \
		--namespace heat.engine.clients.os.keystone.heat_keystoneclient \
		--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.messaging \
		--namespace oslo.middleware \
		--namespace oslo.db \
		--namespace oslo.log \
		--namespace oslo.policy \
		--namespace oslo.service.service \
		--namespace oslo.service.periodic_task \
		--namespace oslo.service.sslutil \
		--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

	# 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