Skip to content

Commit

Permalink
rpm, debian: use cmake to install the cephadm binary
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Fritch <[email protected]>
  • Loading branch information
mgfritch authored and phlogistonjohn committed Sep 13, 2022
1 parent 23b58bb commit f756b3c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 0 additions & 1 deletion ceph.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -1475,7 +1475,6 @@ install -m 0644 -D COPYING %{buildroot}%{_docdir}/ceph/COPYING
install -m 0644 -D etc/sysctl/90-ceph-osd.conf %{buildroot}%{_sysctldir}/90-ceph-osd.conf
install -m 0755 -D src/tools/rbd_nbd/rbd-nbd_quiesce %{buildroot}%{_libexecdir}/rbd-nbd/rbd-nbd_quiesce

install -m 0755 src/cephadm/cephadm %{buildroot}%{_sbindir}/cephadm
mkdir -p %{buildroot}%{_sharedstatedir}/cephadm
chmod 0700 %{buildroot}%{_sharedstatedir}/cephadm
mkdir -p %{buildroot}%{_sharedstatedir}/cephadm/.ssh
Expand Down
2 changes: 0 additions & 2 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ override_dh_auto_install:
install -D -m 440 sudoers.d/ceph-smartctl $(DESTDIR)/etc/sudoers.d/ceph-smartctl
install -D -m 755 src/tools/rbd_nbd/rbd-nbd_quiesce $(DESTDIR)/usr/libexec/rbd-nbd/rbd-nbd_quiesce

install -m 755 src/cephadm/cephadm $(DESTDIR)/usr/sbin/cephadm

install -m 644 -D monitoring/ceph-mixin/prometheus_alerts.yml $(DESTDIR)/etc/prometheus/ceph/ceph_default_alerts.yml

# doc/changelog is a directory, which confuses dh_installchangelogs
Expand Down
6 changes: 5 additions & 1 deletion src/cephadm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ if(WITH_TESTS)
add_tox_test(cephadm TOX_ENVS py3 mypy flake8)
endif()

set(bin_target_file ${CMAKE_BINARY_DIR}/bin/cephadm)
set(bin_target_file ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/cephadm)

add_custom_command(
OUTPUT "${bin_target_file}"
Expand All @@ -14,3 +14,7 @@ add_custom_command(

add_custom_target(cephadm ALL
DEPENDS "${bin_target_file}")

install(PROGRAMS
${bin_target_file}
DESTINATION ${CMAKE_INSTALL_SBINDIR})

0 comments on commit f756b3c

Please sign in to comment.