]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
debian: install system units using cmake
authorKefu Chai <kchai@redhat.com>
Tue, 27 Feb 2018 07:27:18 +0000 (15:27 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 27 Feb 2018 16:23:22 +0000 (00:23 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
debian/ceph-common.install
debian/ceph-fuse.install
debian/ceph-mds.install
debian/ceph-mgr.install
debian/ceph-mon.install
debian/ceph-osd.install
debian/radosgw.install
debian/rbd-mirror.install
debian/rules
systemd/CMakeLists.txt

index afba9d90240947af30b22f009d5c62b8264aa0a7..dfc713d905e454d7f9361c9bde9caa03d9986ea5 100755 (executable)
@@ -4,6 +4,8 @@ etc/bash_completion.d/ceph
 etc/bash_completion.d/rados
 etc/bash_completion.d/radosgw-admin
 etc/bash_completion.d/rbd
+lib/systemd/system/ceph.target
+lib/systemd/system/rbdmap.service
 usr/bin/ceph
 usr/bin/ceph-authtool
 usr/bin/ceph-conf
index d6ad4dcb2a6d893ee6cfeed70c16fd7d30c5dd73..e132b7957c124dd904a9d472197f6dfea15d96b3 100644 (file)
@@ -1,3 +1,4 @@
+lib/systemd/system/ceph-fuse*
 usr/bin/ceph-fuse
 usr/sbin/mount.fuse.ceph sbin
 usr/share/man/man8/ceph-fuse.8
index 8a5d74e13c9c1110b551037d1fa1980c0daa1987..a26d5596c59a0c117bba2ad4697ede487c8507d0 100644 (file)
@@ -1,2 +1,3 @@
+lib/systemd/system/ceph-mds*
 usr/bin/ceph-mds
 usr/share/man/man8/ceph-mds.8
index 0ec0f7063db929a76bdcd53c984304d8e0244fd3..34af599462acb88844559198cc6206769f56962a 100644 (file)
@@ -1,2 +1,3 @@
+lib/systemd/system/ceph-mgr*
 usr/bin/ceph-mgr
 usr/lib/ceph/mgr
index edf928520011a9e49b5a222e22048bf57b152abf..a9785bddbb16a28a76a5b157d163020fb87c1eb1 100644 (file)
@@ -1,3 +1,4 @@
+lib/systemd/system/ceph-mon*
 usr/bin/ceph-mon
 usr/bin/ceph-monstore-tool
 usr/bin/ceph-rest-api
index 6e03f1b8df94da851a85355cd275677a3c210343..5e319f743b10d29f0983ed558e5484956a0f1a2e 100644 (file)
@@ -1,5 +1,8 @@
 lib/udev/rules.d/60-ceph-by-parttypeuuid.rules
 lib/udev/rules.d/95-ceph-osd.rules
+lib/systemd/system/ceph-disk@.service
+lib/systemd/system/ceph-osd*
+lib/systemd/system/ceph-volume@.service
 usr/bin/ceph-bluestore-tool
 usr/bin/ceph-clsinfo
 usr/bin/ceph-objectstore-tool
index d583799299c04aba09ea8bbbbfffa1d949fc9871..329ea0e480fab230115ec48d29352178b1a63f16 100644 (file)
@@ -1,3 +1,4 @@
+lib/systemd/system/ceph-radosgw*
 usr/bin/radosgw
 usr/bin/radosgw-es
 usr/bin/radosgw-object-expirer
index 80f8210361c5018fcb4d255054b37edaa24aaf66..cc617a553047ecb1f13ef96dbca4e955a4a6aeaf 100644 (file)
@@ -1,2 +1,3 @@
+lib/systemd/system/ceph-rbd-mirror*
 usr/bin/rbd-mirror
 usr/share/man/man8/rbd-mirror.8
index c80882774473564674163dc4dd0a39a27e509142..50495ffb6da8d5b7d5f9a5b38974324942ff37d7 100755 (executable)
@@ -6,11 +6,12 @@ export DESTDIR=$(CURDIR)/debian/tmp
 export DEB_HOST_ARCH      ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
 
 extraopts += -DUSE_CRYPTOPP=OFF -DWITH_OCF=ON -DWITH_LTTNG=ON -DWITH_PYTHON3=ON -DWITH_EMBEDDED=OFF
-extraopts += -DWITH_CEPHFS_JAVA=ON -DWITH_SYSTEMD=OFF
+extraopts += -DWITH_CEPHFS_JAVA=ON -DWITH_SYSTEMD=ON
 # assumes that ceph is exmpt from multiarch support, so we override the libdir.
 extraopts += -DCMAKE_INSTALL_LIBDIR=/usr/lib
 extraopts += -DCMAKE_INSTALL_LIBEXECDIR=/usr/lib
 extraopts += -DCMAKE_INSTALL_SYSCONFDIR=/etc
+extraopts += -DCMAKE_INSTALL_SYSTEMD_SERVICEDIR=/lib/systemd/system
 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
   NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
   extraopts += -DBOOST_J=$(NUMJOBS)
@@ -77,52 +78,21 @@ override_dh_installinit:
        install -d -m0755 debian/rbd-mirror/etc/init
        install -m0644 src/upstart/ceph-rbd-mirror*.conf debian/rbd-mirror/etc/init
        # install the systemd stuff manually since we have funny service names
-       install -d -m0755 debian/ceph-common/lib/systemd/system
-       install -m0644 systemd/ceph.target debian/ceph-common/lib/systemd/system
        install -d -m0755 debian/ceph-common/etc/default
        install -m0644 etc/default/ceph debian/ceph-common/etc/default/
        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
 
-       install -d -m0755 debian/ceph-base/lib/systemd/system
-       install -d -m0755 debian/ceph-mon/lib/systemd/system
-       install -d -m0755 debian/ceph-osd/lib/systemd/system
-       install -m0644 systemd/ceph-mon@.service debian/ceph-mon/lib/systemd/system
-       install -m0644 systemd/ceph-osd@.service debian/ceph-osd/lib/systemd/system
-       install -m0644 systemd/ceph-disk@.service debian/ceph-osd/lib/systemd/system
-       install -m0644 systemd/ceph-volume@.service debian/ceph-osd/lib/systemd/system
-       install -m0644 systemd/rbdmap.service debian/ceph-common/lib/systemd/system
        sed -i s./etc/sysconfig/./etc/default/.g debian/ceph-mon/lib/systemd/system/ceph-mon@.service
        sed -i s./etc/sysconfig/./etc/default/.g debian/ceph-osd/lib/systemd/system/ceph-osd@.service
        sed -i s./etc/sysconfig/./etc/default/.g debian/ceph-osd/lib/systemd/system/ceph-disk@.service
        sed -i s./etc/sysconfig/./etc/default/.g debian/ceph-osd/lib/systemd/system/ceph-volume@.service
-       install -m0644 systemd/ceph-mon.target debian/ceph-mon/lib/systemd/system
-       install -m0644 systemd/ceph-osd.target debian/ceph-osd/lib/systemd/system
 
-       install -d -m0755 debian/ceph-mds/lib/systemd/system
-       install -m0644 systemd/ceph-mds@.service debian/ceph-mds/lib/systemd/system
        sed -i s./etc/sysconfig/./etc/default/.g debian/ceph-mds/lib/systemd/system/ceph-mds@.service
-       install -m0644 systemd/ceph-mds.target debian/ceph-mds/lib/systemd/system
-
-       install -d -m0755 debian/ceph-fuse/lib/systemd/system
-       install -m0644 systemd/ceph-fuse@.service debian/ceph-fuse/lib/systemd/system
        sed -i s./etc/sysconfig/./etc/default/.g debian/ceph-fuse/lib/systemd/system/ceph-fuse@.service
-       install -m0644 systemd/ceph-fuse.target debian/ceph-fuse/lib/systemd/system
-
-       install -d -m0755 debian/ceph-mgr/lib/systemd/system
-       install -m0644 systemd/ceph-mgr@.service debian/ceph-mgr/lib/systemd/system
        sed -i s./etc/sysconfig/./etc/default/.g debian/ceph-mgr/lib/systemd/system/ceph-mgr@.service
-       install -m0644 systemd/ceph-mgr.target debian/ceph-mgr/lib/systemd/system
-
-       install -d -m0755 debian/radosgw/lib/systemd/system
-       install -m0644 systemd/ceph-radosgw@.service debian/radosgw/lib/systemd/system
        sed -i s./etc/sysconfig/./etc/default/.g debian/radosgw/lib/systemd/system/ceph-radosgw@.service
-       install -m0644 systemd/ceph-radosgw.target debian/radosgw/lib/systemd/system
-
-       install -d -m0755 debian/rbd-mirror/lib/systemd/system
-       install -m0644 systemd/ceph-rbd-mirror@.service debian/rbd-mirror/lib/systemd/system
        sed -i s./etc/sysconfig/./etc/default/.g debian/rbd-mirror/lib/systemd/system/ceph-rbd-mirror@.service
-       install -m0644 systemd/ceph-rbd-mirror.target debian/rbd-mirror/lib/systemd/system
 
        dh_installinit -p ceph-base --name ceph --no-start
        dh_installinit -p radosgw --no-start
index 3b03b6e613217f2af1d3377366b36ea7ce705a9a..cd88f328926b992b282a684741ce71680ff7c459 100644 (file)
@@ -1,3 +1,5 @@
+set(CMAKE_INSTALL_SYSTEMD_SERVICEDIR "${CMAKE_INSTALL_LIBEXECDIR}/systemd/system"
+  CACHE PATH "Location for systemd service files")
 install(FILES
   ceph.target
   ceph-fuse.target
@@ -17,4 +19,4 @@ install(FILES
   ceph-disk@.service
   ceph-volume@.service
   rbdmap.service
-  DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/systemd/system)
+  DESTINATION ${CMAKE_INSTALL_SYSTEMD_SERVICEDIR})