2008-01-28 23:33:37 +00:00
|
|
|
#!/usr/bin/make -f
|
2009-05-11 18:01:50 +00:00
|
|
|
# -*- makefile -*-
|
2008-07-24 17:14:08 +00:00
|
|
|
export DH_VERBOSE=1
|
2010-11-30 17:13:54 +00:00
|
|
|
export DESTDIR=$(CURDIR)/debian/tmp
|
|
|
|
|
2011-03-20 07:23:22 +00:00
|
|
|
export DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
|
2018-08-05 19:50:59 +00:00
|
|
|
ifneq (,$(findstring WITH_STATIC_LIBSTDCXX,$(CEPH_EXTRA_CMAKE_ARGS)))
|
|
|
|
# dh_auto_build sets LDFLAGS with `dpkg-buildflags --get LDFLAGS` on ubuntu,
|
|
|
|
# which makes the application aborts when the shared library throws
|
|
|
|
# exception, so strip this linker option,
|
|
|
|
# see http://tracker.ceph.com/issues/25209
|
|
|
|
export DEB_LDFLAGS_MAINT_STRIP = -Wl,-Bsymbolic-functions
|
|
|
|
endif
|
2019-06-13 08:28:29 +00:00
|
|
|
ifeq (,$(findstring WITH_SEASTAR,$(CEPH_EXTRA_CMAKE_ARGS)))
|
|
|
|
export CEPH_OSD_BASENAME = ceph-osd
|
|
|
|
else
|
|
|
|
export CEPH_OSD_BASENAME = crimson-osd
|
|
|
|
endif
|
2021-07-05 12:10:05 +00:00
|
|
|
ifeq ($(filter pkg.ceph.jaeger,$(DEB_BUILD_PROFILES)),)
|
|
|
|
extraopts += -DWITH_JAEGER=OFF
|
|
|
|
else
|
|
|
|
extraopts += -DWITH_JAEGER=ON
|
|
|
|
endif
|
2011-03-20 07:23:22 +00:00
|
|
|
|
2018-08-08 16:50:00 +00:00
|
|
|
extraopts += -DWITH_OCF=ON -DWITH_LTTNG=ON
|
2019-10-18 13:42:11 +00:00
|
|
|
extraopts += -DWITH_MGR_DASHBOARD_FRONTEND=OFF
|
2019-12-18 09:08:21 +00:00
|
|
|
extraopts += -DWITH_PYTHON3=3
|
2018-02-27 08:42:48 +00:00
|
|
|
extraopts += -DWITH_CEPHFS_JAVA=ON
|
2018-08-08 16:50:00 +00:00
|
|
|
extraopts += -DWITH_CEPHFS_SHELL=ON
|
2018-02-27 08:42:48 +00:00
|
|
|
extraopts += -DWITH_SYSTEMD=ON -DCEPH_SYSTEMD_ENV_DIR=/etc/default
|
2020-03-20 16:36:10 +00:00
|
|
|
extraopts += -DWITH_GRAFANA=ON
|
2021-06-24 00:00:03 +00:00
|
|
|
ifeq ($(DEB_HOST_ARCH), amd64)
|
|
|
|
extraopts += -DWITH_RBD_RWL=ON
|
|
|
|
else
|
|
|
|
extraopts += -DWITH_RBD_RWL=OFF
|
|
|
|
endif
|
2021-01-22 16:07:40 +00:00
|
|
|
extraopts += -DWITH_RBD_SSD_CACHE=ON
|
2016-05-20 18:18:46 +00:00
|
|
|
# assumes that ceph is exmpt from multiarch support, so we override the libdir.
|
|
|
|
extraopts += -DCMAKE_INSTALL_LIBDIR=/usr/lib
|
2020-06-08 16:59:47 +00:00
|
|
|
extraopts += -DCMAKE_INSTALL_LIBEXECDIR=/usr/libexec
|
2016-06-24 20:35:30 +00:00
|
|
|
extraopts += -DCMAKE_INSTALL_SYSCONFDIR=/etc
|
2017-03-23 23:36:53 +00:00
|
|
|
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
|
|
|
|
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
|
|
|
|
extraopts += -DBOOST_J=$(NUMJOBS)
|
|
|
|
endif
|
2021-03-21 15:04:49 +00:00
|
|
|
ifneq (,$(filter with_system_libs,$(DEB_BUILD_OPTIONS)))
|
|
|
|
extraopts += -DWITH_SYSTEM_BOOST=ON
|
|
|
|
extraopts += -DWITH_SYSTEM_PMDK=ON
|
|
|
|
endif
|
2014-07-29 22:38:18 +00:00
|
|
|
|
2016-05-20 15:45:20 +00:00
|
|
|
%:
|
2019-10-14 13:54:11 +00:00
|
|
|
dh $@ --buildsystem=cmake --with javahelper,python3,systemd --parallel
|
2009-05-11 18:01:50 +00:00
|
|
|
|
2016-05-20 15:45:20 +00:00
|
|
|
override_dh_auto_configure:
|
2016-12-02 19:05:20 +00:00
|
|
|
env | sort
|
2016-05-20 18:18:46 +00:00
|
|
|
dh_auto_configure --buildsystem=cmake -- $(extraopts) $(CEPH_EXTRA_CMAKE_ARGS)
|
2012-02-27 04:45:52 +00:00
|
|
|
|
2016-05-20 15:45:20 +00:00
|
|
|
override_dh_auto_build:
|
2016-05-20 18:18:46 +00:00
|
|
|
dh_auto_build --buildsystem=cmake
|
2011-09-26 18:04:25 +00:00
|
|
|
cp src/init-radosgw debian/radosgw.init
|
2009-05-11 18:01:50 +00:00
|
|
|
|
2016-05-20 15:45:20 +00:00
|
|
|
override_dh_auto_clean:
|
2016-05-20 18:18:46 +00:00
|
|
|
dh_auto_clean --buildsystem=cmake
|
|
|
|
rm -f debian/radosgw.init debian/ceph.logrotate
|
2010-11-30 17:13:54 +00:00
|
|
|
|
2016-05-20 15:45:20 +00:00
|
|
|
override_dh_auto_install:
|
2016-05-20 18:18:46 +00:00
|
|
|
dh_auto_install --buildsystem=cmake --destdir=$(DESTDIR)
|
2011-03-11 17:43:14 +00:00
|
|
|
install -D -m 644 udev/50-rbd.rules $(DESTDIR)/lib/udev/rules.d/50-rbd.rules
|
2015-10-30 17:33:36 +00:00
|
|
|
install -D -m 644 src/etc-rbdmap $(DESTDIR)/etc/ceph/rbdmap
|
2017-11-14 14:55:39 +00:00
|
|
|
install -D -m 644 etc/sysctl/90-ceph-osd.conf $(DESTDIR)/etc/sysctl.d/30-ceph-osd.conf
|
2021-08-25 02:12:08 +00:00
|
|
|
install -D -m 440 sudoers.d/ceph-smartctl $(DESTDIR)/etc/sudoers.d/ceph-smartctl
|
2020-07-14 15:16:59 +00:00
|
|
|
install -D -m 755 src/tools/rbd_nbd/rbd-nbd_quiesce $(DESTDIR)/usr/libexec/rbd-nbd/rbd-nbd_quiesce
|
2008-01-28 23:33:37 +00:00
|
|
|
|
2019-12-11 19:48:02 +00:00
|
|
|
install -m 755 src/cephadm/cephadm $(DESTDIR)/usr/sbin/cephadm
|
2019-10-03 21:24:39 +00:00
|
|
|
|
2020-03-20 16:36:10 +00:00
|
|
|
install -m 644 -D monitoring/prometheus/alerts/ceph_default_alerts.yml $(DESTDIR)/etc/prometheus/ceph/ceph_default_alerts.yml
|
|
|
|
|
2016-05-20 15:45:20 +00:00
|
|
|
# doc/changelog is a directory, which confuses dh_installchangelogs
|
|
|
|
override_dh_installchangelogs:
|
|
|
|
dh_installchangelogs --exclude doc/changelog
|
|
|
|
|
|
|
|
override_dh_installdocs:
|
2016-04-22 13:07:58 +00:00
|
|
|
|
2016-05-20 15:45:20 +00:00
|
|
|
override_dh_installlogrotate:
|
2017-06-06 10:20:06 +00:00
|
|
|
cp src/logrotate.conf debian/ceph-common.logrotate
|
|
|
|
dh_installlogrotate -pceph-common
|
2016-05-20 15:45:20 +00:00
|
|
|
|
|
|
|
override_dh_installinit:
|
2015-09-05 13:14:15 +00:00
|
|
|
# install the systemd stuff manually since we have funny service names
|
2016-04-28 20:48:52 +00:00
|
|
|
install -d -m0755 debian/ceph-common/etc/default
|
|
|
|
install -m0644 etc/default/ceph debian/ceph-common/etc/default/
|
2015-09-06 18:18:16 +00:00
|
|
|
install -d -m0755 debian/ceph-common/usr/lib/tmpfiles.d
|
|
|
|
install -m 0644 -D systemd/ceph.tmpfiles.d debian/ceph-common/usr/lib/tmpfiles.d/ceph.conf
|
2015-09-05 13:14:15 +00:00
|
|
|
|
2016-04-22 13:07:58 +00:00
|
|
|
dh_installinit -p ceph-base --name ceph --no-start
|
|
|
|
dh_installinit -p radosgw --no-start
|
2016-03-18 19:09:21 +00:00
|
|
|
|
2017-07-07 16:18:27 +00:00
|
|
|
# NOTE: execute systemd helpers so they pickup dh_install'ed units and targets
|
|
|
|
dh_systemd_enable
|
2016-05-20 15:45:20 +00:00
|
|
|
dh_systemd_start --no-restart-on-upgrade
|
2009-10-28 20:16:34 +00:00
|
|
|
|
2017-07-07 16:18:27 +00:00
|
|
|
override_dh_systemd_enable:
|
|
|
|
# systemd enable done as part of dh_installinit
|
|
|
|
|
|
|
|
override_dh_systemd_start:
|
|
|
|
# systemd start done as part of dh_installinit
|
|
|
|
|
2016-05-20 15:45:20 +00:00
|
|
|
override_dh_strip:
|
2012-07-03 16:20:35 +00:00
|
|
|
dh_strip -pceph-mds --dbg-package=ceph-mds-dbg
|
2016-10-19 00:20:34 +00:00
|
|
|
dh_strip -pceph-fuse --dbg-package=ceph-fuse-dbg
|
2016-09-26 21:42:56 +00:00
|
|
|
dh_strip -pceph-mgr --dbg-package=ceph-mgr-dbg
|
2016-02-11 17:59:15 +00:00
|
|
|
dh_strip -pceph-mon --dbg-package=ceph-mon-dbg
|
|
|
|
dh_strip -pceph-osd --dbg-package=ceph-osd-dbg
|
2018-01-09 14:37:15 +00:00
|
|
|
dh_strip -pceph-base --dbg-package=ceph-base-dbg
|
2020-08-04 11:57:43 +00:00
|
|
|
dh_strip -pcephfs-mirror --dbg-package=cephfs-mirror-dbg
|
2013-02-01 04:35:26 +00:00
|
|
|
dh_strip -prbd-fuse --dbg-package=rbd-fuse-dbg
|
2016-02-04 07:44:10 +00:00
|
|
|
dh_strip -prbd-mirror --dbg-package=rbd-mirror-dbg
|
2018-12-29 08:50:44 +00:00
|
|
|
dh_strip -pceph-immutable-object-cache --dbg-package=ceph-immutable-object-cache-dbg
|
2015-11-13 09:31:00 +00:00
|
|
|
dh_strip -prbd-nbd --dbg-package=rbd-nbd-dbg
|
2011-09-27 17:02:47 +00:00
|
|
|
dh_strip -pceph-common --dbg-package=ceph-common-dbg
|
2019-02-03 16:28:37 +00:00
|
|
|
dh_strip -plibrados2 --dbg-package=librados2-dbg
|
2021-01-30 19:45:42 +00:00
|
|
|
dh_strip -plibsqlite3-mod-ceph --dbg-package=libsqlite3-mod-ceph-dbg
|
2014-05-26 14:31:08 +00:00
|
|
|
dh_strip -plibradosstriper1 --dbg-package=libradosstriper1-dbg
|
2011-02-02 01:09:08 +00:00
|
|
|
dh_strip -plibrbd1 --dbg-package=librbd1-dbg
|
2016-10-24 14:03:01 +00:00
|
|
|
dh_strip -plibcephfs2 --dbg-package=libcephfs2-dbg
|
2016-02-03 22:44:02 +00:00
|
|
|
dh_strip -plibrgw2 --dbg-package=librgw2-dbg
|
2010-11-30 17:13:54 +00:00
|
|
|
dh_strip -pradosgw --dbg-package=radosgw-dbg
|
2012-11-07 00:23:18 +00:00
|
|
|
dh_strip -pceph-test --dbg-package=ceph-test-dbg
|
2018-01-09 15:40:06 +00:00
|
|
|
dh_strip -ppython3-rados --dbg-package=python3-rados-dbg
|
|
|
|
dh_strip -ppython3-rbd --dbg-package=python3-rbd-dbg
|
|
|
|
dh_strip -ppython3-rgw --dbg-package=python3-rgw-dbg
|
|
|
|
dh_strip -ppython3-cephfs --dbg-package=python3-cephfs-dbg
|
2009-10-28 20:16:34 +00:00
|
|
|
|
2016-05-20 15:45:20 +00:00
|
|
|
override_dh_shlibdeps:
|
2021-03-21 14:59:03 +00:00
|
|
|
dh_shlibdeps -a --exclude=erasure-code --exclude=rados-classes --exclude=compressor --exclude=ceph_crypto
|
2010-11-30 17:13:54 +00:00
|
|
|
|
2016-08-19 02:31:40 +00:00
|
|
|
override_dh_python3:
|
2016-12-01 16:31:36 +00:00
|
|
|
for binding in rados cephfs rbd rgw; do \
|
|
|
|
dh_python3 -p python3-$$binding; \
|
2016-08-19 02:31:40 +00:00
|
|
|
done
|
|
|
|
dh_python3 -p python3-ceph-argparse
|
2019-07-10 12:07:44 +00:00
|
|
|
dh_python3 -p python3-ceph-common
|
2018-08-08 16:50:00 +00:00
|
|
|
dh_python3 -p cephfs-shell
|
2020-11-16 14:07:03 +00:00
|
|
|
dh_python3 -p cephfs-top
|
2019-10-14 13:54:11 +00:00
|
|
|
dh_python3 -p cephadm
|
2016-08-19 02:31:40 +00:00
|
|
|
|
2016-05-20 15:45:20 +00:00
|
|
|
# do not run tests
|
|
|
|
override_dh_auto_test:
|
|
|
|
|
|
|
|
.PHONY: override_dh_autoreconf override_dh_auto_configure override_dh_auto_build override_dh_auto_clean override_dh_auto_install override_dh_installdocs override_dh_installlogrotate override_dh_installinit override_dh_systemd_start override_dh_strip override_dh_auto_test
|