]> git.proxmox.com Git - ceph.git/blame - ceph/debian/rules
bump version to 18.2.2-pve1
[ceph.git] / ceph / debian / rules
CommitLineData
7c673cae
FG
1#!/usr/bin/make -f
2# -*- makefile -*-
3export DH_VERBOSE=1
4export DESTDIR=$(CURDIR)/debian/tmp
5
1e59de90
TL
6include /usr/share/dpkg/default.mk
7
11fdf7f2
TL
8ifneq (,$(findstring WITH_STATIC_LIBSTDCXX,$(CEPH_EXTRA_CMAKE_ARGS)))
9 # dh_auto_build sets LDFLAGS with `dpkg-buildflags --get LDFLAGS` on ubuntu,
10 # which makes the application aborts when the shared library throws
11 # exception, so strip this linker option,
12 # see http://tracker.ceph.com/issues/25209
13 export DEB_LDFLAGS_MAINT_STRIP = -Wl,-Bsymbolic-functions
14endif
9f95a23c
TL
15ifeq (,$(findstring WITH_SEASTAR,$(CEPH_EXTRA_CMAKE_ARGS)))
16 export CEPH_OSD_BASENAME = ceph-osd
17else
18 export CEPH_OSD_BASENAME = crimson-osd
19endif
1d09f67e
TL
20ifneq ($(filter pkg.ceph.arrow,$(DEB_BUILD_PROFILES)),)
21 extraopts += -DWITH_SYSTEM_ARROW=ON
22endif
7c673cae 23
1e59de90 24extraopts += -DWITH_JAEGER=ON
33c7a0ef 25extraopts += -DWITH_SYSTEM_UTF8PROC=ON
11fdf7f2 26extraopts += -DWITH_OCF=ON -DWITH_LTTNG=ON
9f95a23c
TL
27extraopts += -DWITH_MGR_DASHBOARD_FRONTEND=OFF
28extraopts += -DWITH_PYTHON3=3
7c673cae 29extraopts += -DWITH_CEPHFS_JAVA=ON
11fdf7f2
TL
30extraopts += -DWITH_CEPHFS_SHELL=ON
31extraopts += -DWITH_SYSTEMD=ON -DCEPH_SYSTEMD_ENV_DIR=/etc/default
801d1391 32extraopts += -DWITH_GRAFANA=ON
20effc67
TL
33ifeq ($(DEB_HOST_ARCH), amd64)
34 extraopts += -DWITH_RBD_RWL=ON
35else
36 extraopts += -DWITH_RBD_RWL=OFF
37endif
f67539c2 38extraopts += -DWITH_RBD_SSD_CACHE=ON
7c673cae
FG
39# assumes that ceph is exmpt from multiarch support, so we override the libdir.
40extraopts += -DCMAKE_INSTALL_LIBDIR=/usr/lib
f67539c2 41extraopts += -DCMAKE_INSTALL_LIBEXECDIR=/usr/libexec
7c673cae
FG
42extraopts += -DCMAKE_INSTALL_SYSCONFDIR=/etc
43ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
44 NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
45 extraopts += -DBOOST_J=$(NUMJOBS)
46endif
20effc67
TL
47ifneq (,$(filter with_system_libs,$(DEB_BUILD_OPTIONS)))
48 extraopts += -DWITH_SYSTEM_BOOST=ON
49 extraopts += -DWITH_SYSTEM_PMDK=ON
50endif
7c673cae 51
1e59de90
TL
52# for python3-${pkg} packages
53py3_bindings := rados cephfs rbd rgw ceph-argparse ceph-common
54# for packages with its own py3dist-overrides files, those file should be named
55# like ${pkg}.requires
56py3_overrides_packages := $(basename $(notdir $(wildcard debian/*.requires)))
57# for python3 applications, the package name is used as it is
58py3_packages := cephfs-shell cephfs-top cephadm
59
7c673cae 60%:
aee94f69 61 dh $@ --buildsystem=cmake --with javahelper,python3 --parallel
7c673cae
FG
62
63override_dh_auto_configure:
64 env | sort
65 dh_auto_configure --buildsystem=cmake -- $(extraopts) $(CEPH_EXTRA_CMAKE_ARGS)
66
7c673cae
FG
67override_dh_auto_clean:
68 dh_auto_clean --buildsystem=cmake
aee94f69 69 rm -f debian/radosgw.init debian/ceph.logrotate debian/ceph-base.docs
7c673cae
FG
70
71override_dh_auto_install:
72 dh_auto_install --buildsystem=cmake --destdir=$(DESTDIR)
73 install -D -m 644 udev/50-rbd.rules $(DESTDIR)/lib/udev/rules.d/50-rbd.rules
7c673cae 74 install -D -m 644 src/etc-rbdmap $(DESTDIR)/etc/ceph/rbdmap
b32b8144 75 install -D -m 644 etc/sysctl/90-ceph-osd.conf $(DESTDIR)/etc/sysctl.d/30-ceph-osd.conf
a4b75251 76 install -D -m 440 sudoers.d/ceph-smartctl $(DESTDIR)/etc/sudoers.d/ceph-smartctl
f67539c2 77 install -D -m 755 src/tools/rbd_nbd/rbd-nbd_quiesce $(DESTDIR)/usr/libexec/rbd-nbd/rbd-nbd_quiesce
9f95a23c 78
20effc67 79 install -m 644 -D monitoring/ceph-mixin/prometheus_alerts.yml $(DESTDIR)/etc/prometheus/ceph/ceph_default_alerts.yml
801d1391 80
7c673cae
FG
81# doc/changelog is a directory, which confuses dh_installchangelogs
82override_dh_installchangelogs:
83 dh_installchangelogs --exclude doc/changelog
84
7c673cae 85override_dh_installlogrotate:
31f18b77
FG
86 cp src/logrotate.conf debian/ceph-common.logrotate
87 dh_installlogrotate -pceph-common
7c673cae
FG
88
89override_dh_installinit:
aee94f69 90 cp src/init-radosgw debian/radosgw.init
7c673cae 91 # install the systemd stuff manually since we have funny service names
7c673cae
FG
92 install -d -m0755 debian/ceph-common/etc/default
93 install -m0644 etc/default/ceph debian/ceph-common/etc/default/
94 install -d -m0755 debian/ceph-common/usr/lib/tmpfiles.d
95 install -m 0644 -D systemd/ceph.tmpfiles.d debian/ceph-common/usr/lib/tmpfiles.d/ceph.conf
96
7c673cae
FG
97 dh_installinit -p ceph-base --name ceph --no-start
98 dh_installinit -p radosgw --no-start
99
aee94f69
TL
100override_dh_installsystemd:
101 # Only enable and start systemd targets
102 dh_installsystemd --no-stop-on-upgrade --no-restart-after-upgrade -Xceph-mon.service -Xceph-osd.service -X ceph-mds.service
224ce89b 103
7c673cae
FG
104override_dh_strip:
105 dh_strip -pceph-mds --dbg-package=ceph-mds-dbg
106 dh_strip -pceph-fuse --dbg-package=ceph-fuse-dbg
107 dh_strip -pceph-mgr --dbg-package=ceph-mgr-dbg
108 dh_strip -pceph-mon --dbg-package=ceph-mon-dbg
109 dh_strip -pceph-osd --dbg-package=ceph-osd-dbg
b32b8144 110 dh_strip -pceph-base --dbg-package=ceph-base-dbg
f67539c2 111 dh_strip -pcephfs-mirror --dbg-package=cephfs-mirror-dbg
7c673cae
FG
112 dh_strip -prbd-fuse --dbg-package=rbd-fuse-dbg
113 dh_strip -prbd-mirror --dbg-package=rbd-mirror-dbg
9f95a23c 114 dh_strip -pceph-immutable-object-cache --dbg-package=ceph-immutable-object-cache-dbg
7c673cae
FG
115 dh_strip -prbd-nbd --dbg-package=rbd-nbd-dbg
116 dh_strip -pceph-common --dbg-package=ceph-common-dbg
117 dh_strip -plibrados2 --dbg-package=librados2-dbg
f67539c2 118 dh_strip -plibsqlite3-mod-ceph --dbg-package=libsqlite3-mod-ceph-dbg
7c673cae
FG
119 dh_strip -plibradosstriper1 --dbg-package=libradosstriper1-dbg
120 dh_strip -plibrbd1 --dbg-package=librbd1-dbg
121 dh_strip -plibcephfs2 --dbg-package=libcephfs2-dbg
122 dh_strip -plibrgw2 --dbg-package=librgw2-dbg
123 dh_strip -pradosgw --dbg-package=radosgw-dbg
124 dh_strip -pceph-test --dbg-package=ceph-test-dbg
b32b8144 125 dh_strip -ppython3-rados --dbg-package=python3-rados-dbg
b32b8144 126 dh_strip -ppython3-rbd --dbg-package=python3-rbd-dbg
b32b8144 127 dh_strip -ppython3-rgw --dbg-package=python3-rgw-dbg
b32b8144 128 dh_strip -ppython3-cephfs --dbg-package=python3-cephfs-dbg
7c673cae
FG
129
130override_dh_shlibdeps:
20effc67 131 dh_shlibdeps -a --exclude=erasure-code --exclude=rados-classes --exclude=compressor --exclude=ceph_crypto
7c673cae 132
7c673cae 133override_dh_python3:
1e59de90
TL
134 @for binding in $(py3_bindings); do \
135 dh_python3 -p python3-$$binding; \
136 done
137 @for pkg in $(py3_overrides_packages); do \
138 dh_python3 -p $$pkg --requires=debian/$$pkg.requires; \
139 done
140 @for pkg in $(py3_packages); do \
141 dh_python3 -p $$pkg; \
7c673cae 142 done
aee94f69
TL
143 dh_python3 -p ceph-base --shebang=/usr/bin/python3
144 dh_python3 -p ceph-common --shebang=/usr/bin/python3
145 dh_python3 -p ceph-fuse --shebang=/usr/bin/python3
146 dh_python3 -p ceph-volume --shebang=/usr/bin/python3
7c673cae
FG
147
148# do not run tests
149override_dh_auto_test:
150
aee94f69 151.PHONY: override_dh_autoreconf override_dh_auto_configure override_dh_auto_clean override_dh_auto_install override_dh_installlogrotate override_dh_installinit override_dh_strip override_dh_auto_test