@cryptotaxi247 / netdata-1 / commits / 1532fc8e3

Don’t install netdata-updater code on Windows. (#18251)

Also, restructure so everything for the updater is handled in one place.

Austin S. Hemmelgarn committed Aug 6, 2024 at 06:58 UTC 1532fc8e3813704444cd9b6204d581cb963443c7
1 file changed +44 -34
CMakeLists.txt
+44 -34
@@ -2440,12 +2440,6 @@ install(PROGRAMS
2440 COMPONENT netdata
2441 DESTINATION usr/libexec/netdata)
2442
2443 -configure_file(system/cron/netdata-updater-daily.in system/cron/netdata-updater-daily @ONLY)
2444 -install(FILES
2445 - ${CMAKE_BINARY_DIR}/system/cron/netdata-updater-daily
2446 - COMPONENT netdata
2447 - DESTINATION usr/lib/netdata/system/cron)
2448 -
2443 configure_file(system/launchd/netdata.plist.in system/launchd/netdata.plist @ONLY)
2444 install(FILES
2445 ${CMAKE_BINARY_DIR}/system/launchd/netdata.plist
@@ -2521,30 +2515,12 @@ install(FILES
2515 COMPONENT netdata
2516 DESTINATION usr/lib/netdata/system/systemd)
2517
2524 -configure_file(system/systemd/netdata-updater.service.in system/systemd/netdata-updater.service @ONLY)
2525 -install(FILES
2526 - ${CMAKE_BINARY_DIR}/system/systemd/netdata-updater.service
2527 - COMPONENT netdata
2528 - DESTINATION usr/lib/netdata/system/systemd)
2529 -
2530 -install(FILES
2531 - system/systemd/netdata-updater.timer
2532 - COMPONENT netdata
2533 - DESTINATION usr/lib/netdata/system/systemd)
2518
2519 if(BUILD_FOR_PACKAGING)
2520 install(FILES
2521 ${CMAKE_BINARY_DIR}/system/systemd/netdata.service
2522 COMPONENT netdata
2523 DESTINATION lib/systemd/system)
2540 - install(FILES
2541 - ${CMAKE_BINARY_DIR}/system/systemd/netdata-updater.service
2542 - COMPONENT netdata
2543 - DESTINATION lib/systemd/system)
2544 - install(FILES
2545 - system/systemd/netdata-updater.timer
2546 - COMPONENT netdata
2547 - DESTINATION lib/systemd/system)
2524 install(DIRECTORY
2525 COMPONENT netdata
2526 DESTINATION usr/lib/systemd/journald@netdata.conf.d)
@@ -2581,12 +2557,6 @@ else()
2557 set(NETDATA_CONF_DEST "usr/lib/netdata/conf.d")
2558 endif()
2559
2584 -install(FILES
2585 - system/netdata.conf
2586 - system/netdata-updater.conf
2587 - COMPONENT netdata
2588 - DESTINATION ${NETDATA_CONF_DEST})
2589 -
2560 #
2561 # misc files
2562 #
@@ -2602,10 +2572,50 @@ if(BUILD_FOR_PACKAGING)
2572 DESTINATION etc/init.d)
2573 endif()
2574
2605 -install(PROGRAMS
2606 - packaging/installer/netdata-updater.sh
2607 - COMPONENT netdata
2608 - DESTINATION usr/libexec/netdata)
2575 +if(NOT OS_WINDOWS)
2576 + install(PROGRAMS
2577 + packaging/installer/netdata-updater.sh
2578 + COMPONENT netdata
2579 + DESTINATION usr/libexec/netdata)
2580 +
2581 + install(FILES
2582 + system/netdata.conf
2583 + system/netdata-updater.conf
2584 + COMPONENT netdata
2585 + DESTINATION ${NETDATA_CONF_DEST})
2586 +
2587 + configure_file(system/cron/netdata-updater-daily.in
2588 + system/cron/netdata-updater-daily
2589 + @ONLY)
2590 + install(FILES
2591 + ${CMAKE_BINARY_DIR}/system/cron/netdata-updater-daily
2592 + COMPONENT netdata
2593 + DESTINATION usr/lib/netdata/system/cron)
2594 +
2595 + configure_file(system/systemd/netdata-updater.service.in
2596 + system/systemd/netdata-updater.service
2597 + @ONLY)
2598 + install(FILES
2599 + ${CMAKE_BINARY_DIR}/system/systemd/netdata-updater.service
2600 + COMPONENT netdata
2601 + DESTINATION usr/lib/netdata/system/systemd)
2602 +
2603 + install(FILES
2604 + system/systemd/netdata-updater.timer
2605 + COMPONENT netdata
2606 + DESTINATION usr/lib/netdata/system/systemd)
2607 +
2608 + if(BUILD_FOR_PACKAGING)
2609 + install(FILES
2610 + ${CMAKE_BINARY_DIR}/system/systemd/netdata-updater.service
2611 + COMPONENT netdata
2612 + DESTINATION lib/systemd/system)
2613 + install(FILES
2614 + system/systemd/netdata-updater.timer
2615 + COMPONENT netdata
2616 + DESTINATION lib/systemd/system)
2617 + endif()
2618 +endif()
2619
2620 #
2621 # TODO: check the following files for correct substitutions