File: rules

package info (click to toggle)
magnum 7.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 6,124 kB
  • sloc: python: 31,970; sh: 5,587; makefile: 59
file content (78 lines) | stat: -rwxr-xr-x 3,788 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
#!/usr/bin/make -f

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

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

override_dh_clean:
	dh_clean
	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_install:
	echo "Do nothing..."

override_dh_auto_clean:
	python3 setup.py clean

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 'magnum\.tests\.unit(?!(.*drivers\.test_heat_driver\.TestHeatPoller\.test_poll_done.*|.*drivers\.test_heat_driver\.TestHeatPoller\.test_poll_destroy.*))'
endif

	dh_install --fail-missing
	mkdir -p $(CURDIR)/debian/magnum-common/usr/share/magnum-common
	PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages python3-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/magnum
	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/lib/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

	PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages python3-oslopolicy-sample-generator \
		--output-file $(CURDIR)/debian/magnum-common/usr/share/magnum-common/policy.json \
		--format json \
		--namespace magnum

	cp etc/magnum/api-paste.ini $(CURDIR)/debian/magnum-common/usr/share/magnum-common

override_dh_python3:
	dh_python3 --shebang=/usr/bin/python3