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
|
#!/usr/bin/make -f
include /usr/share/openstack-pkg-tools/pkgos.make
export SWIFT_TEST_CONFIG_FILE=$(CURDIR)/debian/swift-test.conf
%:
dh $@ --buildsystem=pybuild --with python3,sphinxdoc
# Control if proxy + account + container server should be using UWSGI or not
export DEB_USE_UWSGI=no
override_dh_auto_test:
echo "Do nothing..."
override_dh_auto_clean:
rm -rf build .stestr *.egg-info .pybuild
find . -iname '*.pyc' -delete
for i in $$(find . -type d -iname __pycache__) ; do rm -rf $$i ; done
override_dh_auto_build:
dh_auto_build
/usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func python3-swift.postinst
set -e ; set -x ; \
for i in debian/swift-account.swift-account-auditor.init.in \
debian/swift-account.swift-account-reaper.init.in \
debian/swift-account.swift-account-replicator.init.in \
debian/swift-container.swift-container-auditor.init.in \
debian/swift-container.swift-container-reconciler.init.in \
debian/swift-container.swift-container-replicator.init.in \
debian/swift-container.swift-container-sharder.init.in \
debian/swift-container.swift-container-sync.init.in \
debian/swift-container.swift-container-updater.init.in \
debian/swift-object-expirer.swift-object-expirer.init.in \
debian/swift-object.swift-object-auditor.init.in \
debian/swift-object.swift-object.init.in \
debian/swift-object.swift-object-reconstructor.init.in \
debian/swift-object.swift-object-replicator.init.in \
debian/swift-object.swift-object-updater.init.in \
; do \
debian/gen-init $$i ; \
done
set -e ; set -x ; \
for i in debian/swift-proxy.swift-proxy.init \
debian/swift-account.swift-account.init \
debian/swift-container.swift-container.init \
; do \
if [ $$DEB_USE_UWSGI = "yes" ] ; then \
cp $$i.in $$i ; \
cat /usr/share/openstack-pkg-tools/init-script-template >>$$i ; \
pkgos-gen-systemd-unit $$i.in ; \
else \
CONFIG=`echo $$i | cut -d/ -f2 | cut -d. -f1 | sed -e s/swift-//`-server debian/gen-init $$i.in ; \
fi ; \
done
override_dh_auto_install:
pkgos-dh_auto_install --no-py2 --in-tmp
rm debian/tmp/usr/bin/swift-init
# https://review.opendev.org/c/openstack/swift/+/904601
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
pkgos-dh_auto_test --no-py2 --test-path test/unit 'test\.unit\.(?!common\.test_utils\.TestUtils\.test_get_logger_sysloghandler_plumbing|common\.middleware\.test_cname_lookup\.TestCNAMELookup.*|common\.test_db\.TestDatabaseBroker\.test_get.*|container\.test_sync\.TestContainerSync\.test_init.*|common\.test_utils\.TestPunchHoleReally\.test_punch_a_hole.*|common\.test_utils\.Test_LibcWrapper\.test_argument_plumbing.*|common\.test_utils\.TestUtils\.test_load_pkg_resource_importlib.*|common\.test_db_replicator\.TestHandoffsOnly.*|common\.ring\.test_builder\.TestGetRequiredOverload\.test_perfect_four_zone_four_replica_bad_placement|common\.test_wsgi\.TestWSGI.*|obj\.test_expirer\.TestObjectExpirer\.test_delete_actual_object|common\.test_memcached\.TestMemcached\.test_get_conns_hostname6|common\.test_memcached\.TestMemcached\.test_get_conns_v6|common\.test_memcached\.TestMemcached\.test_get_conns_v6_default|obj\.test_reconstructor\.TestWorkerReconstructor\.test_run_forever_recon_aggregation|proxy\.controllers\.test_obj\.TestECObjController\.test_GET_with_duplicate_but_sufficient_frag_indexes|proxy\.test_mem_server\.TestProxyServer\.test_statsd_prefix|proxy\.controllers\.test_obj\.TestECObjController\.test_GET_read_timeout|proxy\.controllers\.test_base\.TestGetOrHeadHandler\.test_disconnected_logging|obj\.test_expirer\.TestObjectExpirer\.test_failed_delete_continues_on|obj\.test_replicator\.TestObjectReplicator\.test_update|obj\.test_ssync_receiver\.TestReceiver\.test_UPDATES_timeout|obj\.test_ssync_receiver\.TestReceiver\.test_UPDATES_no_problems_no_hard_disconnect|common\.test_memcached\.TestMemcached\.test_operations_timing_stats_with_incr_timeout|obj\.test_expirer\.TestExpirerHelpers\.test_embed_expirer_bytes_from_diskfile_metadata|common\.middleware\.test_proxy_logging\.TestProxyLogging\.test_init_statsd_options_access_log_prefix|common\.middleware\.test_proxy_logging\.TestProxyLogging\.test_init_statsd_options_log_prefix|common\.test_wsgi\.TestServersPerPortStrategy\.test_stale_pid_loading|common\.test_wsgi\.TestWorkersStrategy\.test_stale_pid_loading|common\.utils\.test_logs\.TestUtilsLogs\.test_LoggerFileObject_recursion|container\.test_server\.TestNonLegacyDefaultStoragePolicy\.test_PUT_account_update|common\.middleware\.s3api\.test_s3request\.TestRequest\.test_sig_v4_strm_unsgnd_pyld_trl_checksum_hdr_unsupported|common\.middleware\.s3api\.test_s3request\.TestModuleFunctions\.test_get_checksum_hasher)'
endif
override_dh_installinit:
set -e ; set -x ; \
for FILE in $(sort $(patsubst debian/%,%,$(wildcard debian/*.init))) ; do \
PKG=`echo $$FILE | cut -d. -f1` ; \
NAME=`echo $$FILE | cut -d. -f2` ; \
dh_installinit --error-handler=true -p$$PKG --name=$$NAME ;\
done
override_dh_installsystemd:
set -e ; set -x ; \
for FILE in $(sort $(patsubst debian/%,%,$(wildcard debian/*.service))) ; do \
PKG=`echo $$FILE | cut -d. -f1` ; \
NAME=`echo $$FILE | cut -d. -f2` ; \
dh_installsystemd -p$$PKG --name=$$NAME ;\
done
gen-init-configurations:
echo "Do nothing"
# build with sphinx documentation
override_dh_sphinxdoc:
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
LC_ALL=C.UTF-8 PYTHONPATH=. python3 -m sphinx doc/source $(CURDIR)/debian/swift-doc/usr/share/doc/swift-doc/base
LC_ALL=C.UTF-8 PYTHONPATH=. python3 -m sphinx api-ref/source $(CURDIR)/debian/swift-doc/usr/share/doc/swift-doc/api-ref
dh_sphinxdoc
endif
override_dh_installdocs:
dh_installdocs
dh_installdocs -A AUTHORS
override_dh_missing:
dh_missing --fail-missing
override_dh_python3:
dh_python3 --shebang=/usr/bin/python3
|