0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-14 01:29:11 +00:00

fix installing netdata-updater svc/timer for native packages ()

Co-authored-by: Austin S. Hemmelgarn <austin@netdata.cloud>
This commit is contained in:
Ilya Mashchenko 2024-06-29 22:23:27 +03:00 committed by GitHub
parent 454142900b
commit 0157e9b600
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 32 additions and 15 deletions

View file

@ -2582,21 +2582,6 @@ install(FILES
COMPONENT netdata
DESTINATION usr/lib/netdata/system/systemd)
if(BUILD_FOR_PACKAGING)
install(FILES
${CMAKE_BINARY_DIR}/system/systemd/netdata.service
COMPONENT netdata
DESTINATION lib/systemd/system)
install(DIRECTORY
COMPONENT netdata
DESTINATION usr/lib/systemd/journald@netdata.conf.d)
install(FILES
system/systemd/journald@netdata.conf
COMPONENT netdata
DESTINATION usr/lib/systemd/journald@netdata.conf.d
RENAME netdata.conf)
endif()
configure_file(system/systemd/netdata.service.v235.in system/systemd/netdata.service.v235 @ONLY)
install(FILES
${CMAKE_BINARY_DIR}/system/systemd/netdata.service.v235
@ -2614,6 +2599,29 @@ install(FILES
COMPONENT netdata
DESTINATION usr/lib/netdata/system/systemd)
if(BUILD_FOR_PACKAGING)
install(FILES
${CMAKE_BINARY_DIR}/system/systemd/netdata.service
COMPONENT netdata
DESTINATION lib/systemd/system)
install(FILES
${CMAKE_BINARY_DIR}/system/systemd/netdata-updater.service
COMPONENT netdata
DESTINATION lib/systemd/system)
install(FILES
system/systemd/netdata-updater.timer
COMPONENT netdata
DESTINATION lib/systemd/system)
install(DIRECTORY
COMPONENT netdata
DESTINATION usr/lib/systemd/journald@netdata.conf.d)
install(FILES
system/systemd/journald@netdata.conf
COMPONENT netdata
DESTINATION usr/lib/systemd/journald@netdata.conf.d
RENAME netdata.conf)
endif()
install(FILES
system/systemd/50-netdata.preset
COMPONENT netdata

View file

@ -54,6 +54,8 @@ AutoReqProv: yes
%define _libexecdir /usr/libexec
%define _libdir /usr/lib
%{!?_systemd_util_dir:%global _systemd_util_dir /usr/lib/systemd}
# Fedora doesnt define this, but other distros do
%{!?_presetdir:%global _presetdir %{_libdir}/systemd/system-preset}
@ -447,8 +449,12 @@ install -m 644 -p "%{__cmake_builddir}/system/systemd/%{name}.service" "${RPM_BU
%else
install -m 644 -p "%{__cmake_builddir}/system/systemd/%{name}.service.v235" "${RPM_BUILD_ROOT}%{_unitdir}/%{name}.service"
%endif
install -m 644 -p "system/systemd/netdata-updater.timer" "${RPM_BUILD_ROOT}%{_unitdir}/%{name}-updater.timer"
install -m 644 -p "%{__cmake_builddir}/system/systemd/%{name}-updater.service" "${RPM_BUILD_ROOT}%{_unitdir}/%{name}-updater.service"
install -m 755 -d "${RPM_BUILD_ROOT}%{_presetdir}"
install -m 644 -p "system/systemd/50-%{name}.preset" "${RPM_BUILD_ROOT}%{_presetdir}/50-%{name}.preset"
install -m 755 -d "${RPM_BUILD_ROOT}%{_systemd_util_dir}/journald@%{name}.conf.d"
install -m 644 -p "system/systemd/journald@%{name}.conf" "${RPM_BUILD_ROOT}%{_systemd_util_dir}/journald@%{name}.conf.d/%{name}.conf"
%pre
@ -510,7 +516,10 @@ rm -rf "${RPM_BUILD_ROOT}"
%{_sbindir}/%{name}-claim.sh
%{_unitdir}/%{name}.service
%{_unitdir}/%{name}-updater.timer
%{_unitdir}/%{name}-updater.service
%{_presetdir}/50-%{name}.preset
%{_systemd_util_dir}/journald@%{name}.conf.d/%{name}.conf
%dir %{_libexecdir}/%{name}
%dir %{_libexecdir}/%{name}/plugins.d