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 101 102 103 104 105 106 107 108 109 110 111 112 113
|
#!/usr/bin/make -f
include /usr/share/openstack-pkg-tools/pkgos.make
%:
dh $@ --buildsystem=pybuild --with python3,sphinxdoc
override_dh_auto_test:
echo "Do nothing..."
override_dh_auto_clean:
python3 setup.py clean
rm -f debian/designate-common.postinst debian/designate-common.config debian/designate-api.config debian/designate-api.postinst debian/designate-common.postrm
rm -rf doc/build build *.egg-info
rm -f debian/*.init debian/*.upstart debian/*.service
find . -name '*.pyc' -exec rm {} \;
rm -f ChangeLog
rm -f AUTHORS
rm -rf .testrepository
rm -f doc/source/_static/designate.conf.sample
rm -rf debian/*.templates debian/po
rm -f doc/source/_static/designate.policy.yaml.sample
find . -iname '*.pyc' -delete
for i in $$(find . -type d -iname __pycache__) ; do rm -rf $$i ; done
override_dh_auto_build:
/usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func designate-common.postinst
/usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func designate-common.config
/usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func designate-api.config
/usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func designate-api.postinst
/usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_postrm designate-common.postrm
pkgos-merge-templates designate-api designate endpoint
pkgos-merge-templates designate-common designate db rabbit ksat
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
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
# Blacklist:
# These 2 unit tests are failing, though I personally don't care about infoblox
# support: anyone interested supporting such non-free service is welcome to investigate.
# backend.test_infoblox.BasicInfobloxBackendTestCase.test_create_zone_handle_error
# backend.test_infoblox.BasicInfobloxBackendTestCase.test_delete_zone_handle_error
# test_coordination.TestPartitioner.test_three_even_partitions
pkgos-dh_auto_test --no-py2 'designate\.tests\.unit\.(?!.*test_pool_manager\.test_service\.PoolManagerInitTest\.test_init_no_pool_targets.*|.*agent.*|.*designate\.tests\.unit\.mdns\.test_handler\.MdnsHandleTest\.test_notify.*|.*test_service\.TestDesignateRpcService.*|.*test_service\.TestDesignateServiceInit.*|.*test_service\.TestServiceInit.*|.*test_service\.TestRpcService.*|backend\.test_infoblox\.BasicInfobloxBackendTestCase\.test_create_zone_handle_error|backend\.test_infoblox\.BasicInfobloxBackendTestCase\.test_delete_zone_handle_error|test_coordination\.TestPartitioner\.test_three_even_partitions)'
endif
rm -rf $(CURDIR)/debian/tmp/usr/etc
mkdir -p $(CURDIR)/debian/designate-common/usr/share/designate-common
PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages oslo-config-generator \
--output-file $(CURDIR)/debian/designate-common/usr/share/designate-common/designate.conf \
--wrap-width 140 \
--namespace designate.conf \
--namespace oslo.log \
--namespace oslo.messaging \
--namespace oslo.policy \
--namespace oslo.reports \
--namespace oslo.service.periodic_task \
--namespace oslo.service.service \
--namespace oslo.service.sslutils \
--namespace oslo.service.wsgi \
--namespace oslo.db \
--namespace oslo.middleware \
--namespace oslo.concurrency \
--namespace oslo.versionedobjects \
--namespace keystonemiddleware.auth_token
pkgos-readd-keystone-authtoken-missing-options $(CURDIR)/debian/designate-common/usr/share/designate-common/designate.conf keystone_authtoken designate
mkdir -p $(CURDIR)/debian/designate-common/etc/designate/policy.d
PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages oslopolicy-sample-generator \
--output-file $(CURDIR)/debian/designate-common/etc/designate/policy.d/00_default_policy.yaml \
--format yaml \
--namespace designate
# Comment out deprecated policies
sed -i 's/^"/#"/' $(CURDIR)/debian/designate-common/etc/designate/policy.d/00_default_policy.yaml
# Use the policy.d folder
pkgos-fix-config-default $(CURDIR)/debian/designate-common/usr/share/designate-common/designate.conf oslo_policy policy_dirs /etc/designate/policy.d
pkgos-fix-config-default $(CURDIR)/debian/designate-common/usr/share/designate-common/designate.conf DEFAULT pybasedir /usr/lib/python3/dist-packages
pkgos-fix-config-default $(CURDIR)/debian/designate-common/usr/share/designate-common/designate.conf oslo_concurrency lock_path /run/lock/designate
dh_install
dh_missing --fail-missing
# Install other config files
mkdir -p $(CURDIR)/debian/designate-common/etc/designate
cp etc/designate/rootwrap.conf $(CURDIR)/debian/designate-common/etc/designate/rootwrap.conf
cp -r etc/designate/rootwrap.d $(CURDIR)/debian/designate-common/etc/designate
cp etc/designate/pools.yaml.sample $(CURDIR)/debian/designate-common/usr/share/designate-common/pools.yaml
mkdir -p $(CURDIR)/debian/designate-common/usr/share/designate-common/examples
cp etc/designate/pools.yaml.* $(CURDIR)/debian/designate-common/usr/share/designate-common/examples
override_dh_sphinxdoc:
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
if ! PYTHONPATH=. PYTHON=python3 python3 -m sphinx -b html doc/source $(CURDIR)/debian/designate-doc/usr/share/doc/designate-doc/html ; then \
cat /tmp/sphinx-err-* ; \
exit 1 ; \
fi
dh_sphinxdoc
endif
override_dh_python3:
dh_python3 --shebang=/usr/bin/python3
|