summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
AgeCommit message (Collapse)Author
33 hoursDo not specify linker in compilation flags. (#17677)vkalintiris
3 daysRevert "Support to WolfSSL (Step 1)" (#17697)Stelios Fragkakis
Revert "Support to WolfSSL (Step 1) (#17516)" This reverts commit 8d9c464de3f79f2e92fe6c46894ad2e09dd8f4d5.
3 daysdyncfg files on disk do not contain colons (#17694)Costa Tsaousis
* dyncfg files on disk do not contain colons * renamed files
3 daysProperly detect attribute format types (#17685)vkalintiris
4 daysFix compilation without h2o, cloud enabled (#17673)Stelios Fragkakis
Fix compilation without h2o, cloud
4 daysSupport to WolfSSL (Step 1) (#17516)thiagoftsm
4 daysCorrectly handle required compilation flags for dependencies. (#17664)Austin S. Hemmelgarn
`target_compile_definitions` can only be used for actual command line _macro definitions_. But the `*_CFLAGS_OTHER` may contain flags that are _not_ macro definitions, and when that happens, any use of `target_compile_definitions` with the relevant `*_CFLAGS_OTHER` variable will break the build. Instead, we should be using `target_compile_options` for these variables.
4 daysWindows Support Phase 1 (#17497)Costa Tsaousis
* abstraction layer for O/S * updates * updates * updates * temp fix for protobuf * emulated waitid() * fix * fix * compatibility layer * fix for idtype * fix for missing includes * fix for missing includes * added missing includes * added missing includes * added missing includes * added missing includes * added missing includes * added missing includes * UUID renamed to ND_UUID to avoid conflict with windows.h * include libnetdata.h always - no conflicts * simplify abstraction headers * fix missing functions * fix missing functions * fix missing functions * fix missing functions * rename MSYS to WINDOWS * moved byteorder.h * structure for an internal windows plugin * 1st windows plugin * working plugin * fix printf * Special case windows for protobuf * remove cygwin, compile both as windows * log windows libraries used * fix cmake * fix protobuf * compilation * updated compilation script * added system.ram * windows uptime * perflib * working perflibdump * minify dump * updates to windows plugins, enable ML * minor compatibility fixes for cygwin and msys * perflib-dump to its own file * perflib now indexes names * improvements to the library; disks module WIP * API for selectively traversing the metrics * first working perflib chart: disk.space * working chart on logical and physical disks * added windows protocols * fix datatypes for loops * tinysleep for native smallest sleep support * remove libuuid dependency on windows * fix uuid functions for macos compilation * fix uuid comparison function * do not overwrite uuid library functions, define them as aliases to our own * fixed uuid_unparse functions * fixed typo * added perflib processor charts * updates for compiling without posix emulation * gather common contexts together * fix includes on linux * perflib-memory * windows mem.available * Update variable names for protobuf * network traffic * add network adapters that have traffic as virtual interfaces * add -pipe to windows compilation * reset or overflow flag is now per dimension * dpc is now counted separately * verified all perflib fields are processed and no text fields are present in the data * more common contexts * fix crash * do not add system.net multiple times * install deps update and shortcut * all threads are now joinable behind the scenes * fix threads cleanup * prepare for abstracting threads API * netdata threads full abstraction from pthreads * more threads abstraction and cleanup * more compatibility changes * fix compiler warnings * add base-devel to packages * removed duplicate base-devel * check for strndup * check headers in quotes * fix linux compilation * fix attribute gnu_printf on macos * fix for threads on macos * mingw64 compatibility * enable compilation on windows clion * added instructions * enable cloud * compatibility fixes * compatibility fixes * compatibility fixes * clion works on windows * support both MSYSTEM=MSYS and MSYSTEM=MINGW64 for configure * cleanup and docs * rename uuid_t to nd_uuid_t to avoid conflict with windows uuid_t * leftovers uuid_t * do not include uuid.h on macos * threads signaled cancellations * do not install v0 dashboard on windows * script to install openssh server on windows * update openssh installation script * update openssh installation script * update openssh installation script * update openssh installation script * update openssh installation script * update openssh installation script * update openssh installation script * update openssh installation script * update openssh installation script * use cleanup variable instead of pthreads push and pop * replace all calls to netdata_thread_cleanup_push() and netdata_thread_cleanup_pop() with __attribute__((cleanup(...))) * remove left-over freez * make sure there are no locks acquired at thread exit * add missing parameter * stream receivers and senders are now voluntarily cancelled * plugins.d now voluntarily exits its threads * uuid_t may not be aligned to word boundaries - fix the uuid_t functions to work on unaligned objects too. * collectors evloop is now using the new threading cancellation; ml is now not using pthread_cancel; more fixes * eliminate threads cancellability from the code base * fix exit timings and logs; fix uv_threads tags * use SSL_has_pending() only when it is available * do not use SSL_has_pending() * dyncfg files on windows escape collon and pipe characters * fix compilation on older systems * fix compilation on older systems * Create windows installer. The installer will install everything under C:\netdata by default. It will: - Install msys2 at C:\netdata - Install netdata dependencies with pacman - Install the agent itself under C:\netdata\opt You can start the agent by running an MSYS shell with C:\netdata\msys2_shell.cmd and then start the agent normally with: /opt/netdata/usr/sbin/netdata -D There are a more couple things to work on: - Verify publisher. - Install all deps not just libuv & protobuf. - Figure out how we want to auto-start the agent as a service. - Check how to uninstall things. * fixed typo * code cleanup * Create uninstaller --------- Co-authored-by: vkalintiris <vasilis@netdata.cloud>
5 dayspython.d remove litespeed (#17663)Ilya Mashchenko
7 dayspython.d remove hpssa (#17638)Ilya Mashchenko
10 daysAdd Sentry support to new CPack packages. (#17627)Austin S. Hemmelgarn
11 dayspython.d remove bind_rndc (#17628)Ilya Mashchenko
2024-05-06remove python.d/smartd_log (#17600)Ilya Mashchenko
2024-05-06Fix handling of vendored eBPF code in CMake. (#17556)Austin S. Hemmelgarn
* Fix logic error in CMake code for kernel version detection. * Force legacy libbpf for CentOS 7 and AL 2 package builds. * Check target kernel version instead of host kernel version. This should help when building in containers. * Fix up handling for older versions of CMake. * Use CMake C compiler for libbpf builds. * Fix selection of legacy eBPF code in static builds. * Explicitly pull in kernel headers on CentOS. * Fix typo in FORCE_LEGACY_LIBBPF option. * Only enable eBPF by default on x86. * Fix detection of static builds. * Fix libc detection logic. * Fix handling of static builds. * Fix musl libc detection. * Fix check messages for libc detection.
2024-05-01Fix handling of netdata.conf on install in build system. (#17572)Austin S. Hemmelgarn
* Fix handling of netdata.conf on install in build system. * Fix RPM build handling. * Update netdata.spec.in --------- Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
2024-05-01Detect and use ld.mold instead of the system linker. (#17534)Austin S. Hemmelgarn
Not a mandatory dependency, but it significantly speeds up the final linking step for builds.
2024-05-01Clean up handling of compiler flags in CMake. (#17532)Austin S. Hemmelgarn
* Move all handling of compilation flags inot compiler flags module. Also, make including the module do all the required compiler flag changes. * Switch compiler flag handling to (mostly) use properties. This makes it easier to override individual flags on a per-target basis and also results in slightly simpler CMake code. * Fix typos in compiler flag handling. * Fix missing quotes.
2024-04-30Use CPack to generate Debian packages (#17475)vkalintiris
* CPack * Add script to build all artifacts. * Add infrastructure to run package builds via CPack in CI. * Fix typos in distro config. * Fix permissions on package-build script. * Control files for netdata package * pre/post inst files for debugfs. * Fix directory name handling for package build. * pre/post inst scripts for cups * pre/post inst scripts for xenstat * pre/post inst scripts for slabinfo * pre/post inst scripts for apps * pre/post inst scripts for network-viewer * pre/post inst script for nfacct * pre/post inst scripts for freeipmi * pre/post inst scripts for logs-management * pre/post inst perf * pre/post inst scripts for systemd-journal * pre/post init scripts for go.d * pre/post inst scripts for ebpf * pre/post init files for charts.d & python.d * Skip eBPF in packaging. * Fix most of the package names * Add copyright * etc/default/netdata * Bump * Enable all packages except for ebpf. * Add log2journal to netdata component. * Produce pretty-much the same RFS. - No README.md docs - /var/run/netdat missing on CPack's side - No ebpf - No changelogs * Enable ebpf plugin * Fix runtime path * Build debug symbol packages * Update package directory * Fix eBPF and Xenstat conditionals. * Fixes for package build process. * Package version for cpack * Add ebpf-code-legacy package * Update extraction logic * Fix control info for netdata package * Fix control file for chartsd plugin package * Fix typos in package build script. * Update dependencies * Add python3 * Fix verbose option to cpack * Add whitespace in package description field. * SKip adding files that might break rpm packages * Final fixups to package handling. * Fix architecture matching for package build options. * Fix dependency handling. * Remove top-level scripts --------- Co-authored-by: Austin S. Hemmelgarn <austin@netdata.cloud>
2024-04-26Revert changes to ENABLE_CLOUD option. (#17528)Austin S. Hemmelgarn
2024-04-25Update CMake to request new behavior for all policies through v3.28.0. (#17496)Austin S. Hemmelgarn
Our CMake code definitely works fine with all versions from our minimum suppored version of 3.13 up to and including 3.28, and any of the policies that are likely to affect us should use the new behavior anyway because the old behavior leads to the possiblity of incorrect builds, so explicitly request that CMake all CMake policies provided by the used version up to those provided by v3.28.0 are set to the new behavior.
2024-04-25Move handling of legacy eBPF programs into CMake. (#17512)Austin S. Hemmelgarn
* Move handling of legacy eBPF programs into CMake. * Fix typos. * Fix more typos * Fix up packaging code.
2024-04-24Clean up CMake build options. (#17442)Austin S. Hemmelgarn
- Ensure that they have a properly descriptive help string that can be understood without detailed knowledge of Netdata. - Ensure that options that are not intended to be used by regular users are flagged as advanced (and thus do not show up in the various CMake UIs by default). - Ensure that options that are logically dependent on others are handled as such by CMake. - Properly sort main options, and label the groups with comments describing them.
2024-04-24Move libbpf and eBPF CO-RE bundling into CMake. (#17484)Austin S. Hemmelgarn
* Move libbpf and eBPF CO-RE bundling into CMake. * Silence CMP0135 warnings. * Fix handling of legacy eBPF code. * Only enable eBPF by default on Linux. * Correctly auto-detect the need for legacy libbpf. * Fix include paths for libbpf linking. * Add coreutils dependency on Alpine. * Fix ebpf code handling. * Fix lib path handling for libbpf.a. * Correctly fix libbpf lib directory handling. * Use correct comparison type.
2024-04-23remove python.d/fail2ban (#17502)Ilya Mashchenko
* remove python.d/fail2ban * disable in python.d.conf
2024-04-22remove python.d/sensors (#17473)Ilya Mashchenko
2024-04-21remove python.d/hddtemp (#17463)Ilya Mashchenko
2024-04-19timex is not supported on windows. (#17443)vkalintiris
2024-04-17Address cmake compilation (#17314)thiagoftsm
2024-04-17remove python.d/adaptec_raid (#17429)Ilya Mashchenko
2024-04-17Explicitly require systemd for systemd journal plugin. (#17313)Austin S. Hemmelgarn
Without this change, it doesn’t fail until the build itself if the plugin is enabled but systemd could not be found.
2024-04-17Add a build option to disable all optional features by default. (#17309)Austin S. Hemmelgarn
This is intended as a way for developers to quickly turn off everything except the part of the agent that they are actually working on, allowing for much simpler CMake command lines when debugging isolated changes to the build system.
2024-04-16remove python.d/megacli (#17417)Ilya Mashchenko
see you space python megacli
2024-04-10Move vendoring of Sentry to it’s own module and switch to using Git ↵Austin S. Hemmelgarn
instead of the releases page. (#17358) * Move vendoring of Sentry to it’s own module. Also, switch to pulling from the git repo instead of the release URL, as it’s more reliable, less prone to potential tampering, and also more consistent with all of our other vendoring. * Actually remove the Sentry vendoring code that was in the main file.
2024-04-10Move bundling of JSON-C to CMake. (#17207)Austin S. Hemmelgarn
* Move bundling of JSON-C to CMake. * Fix JSON-C build option passing. * Force CMake policy 77 to new behavior for JSON-C build. This is required to ensure that options we set are propagated correctly into the sub-project. * Fix include path selection and handling for bundled JSON-C. * Fix include ordering again. * Fixup JSON header compat link handling.
2024-04-09Check for Snappy only when required. (#17319)Austin S. Hemmelgarn
Snappy is only used by the Prometheus Remote Write exporter, so we should only be checking for it if that is enabled. We also should be checking with pkg-config _first_ instead of doing so after searching for the library directly.
2024-04-05Drop generic bitmap implementation. (#17322)vkalintiris
We only use it in one place to limit the logs generated by dbengine per page type. If we ever need a generic implementation we can wrap std::bitset and provide a C API.
2024-04-04Add basic support for dinit in our system service handling code. (#16836)Austin S. Hemmelgarn
* Add basic dinit detection to install-service script. * Add dinit service file for Netdata. * Add service install support for dinit.
2024-03-28Correctly handle libyaml linking for log2journal. (#17276)Austin S. Hemmelgarn
It somehow got missed when moving the libyaml bundling into the CMake code.
2024-03-26Assorted macOS build fixes. (#17216)Austin S. Hemmelgarn
* Use zlib provided by the system itself on macOS. Searching for it with find_package() should always work on macOS since it will find the system copy, which is always going to be there. * Use native libuuid on macOS. Much like zlib, macOS provides a libuuid implementation that (should) work for us, so just use that instead of fighting with brew to find one. * Don’t prepend system include paths. * Skip Linux-specific checks on macOS. This isn’t technically broken, but not making these checks makes debugging of the build system easier. * Minor CMake restructure.
2024-03-26Try finding OpenSSL using pkg-config first on macOS. (#17250)Austin S. Hemmelgarn
This is required to work correctly in Homebrew, as building within Homebrew does not allow using Homebrew commands, but does generally provide a properly working pkg-config setup.
2024-03-25DBENGINE: support ZSTD compression (#17244)Costa Tsaousis
* extract dbengine compression to separate files * added ZSTD support in dbengine * automatically select best compression * handle decompression errors * eliminate fatals from compression algorithms; fallback to uncompressed pages if compression fails or generates bigger data * have the unit test generate many data files
2024-03-23Code cleanup (#17237)Costa Tsaousis
* renames in dbengine * remove leftovers from memory mode save and map * fix docs about 3 tiers by default * split linked-lists, bitmaps and storage-points from libnetdata.h
2024-03-23updated dbengine unittest (#17232)Costa Tsaousis
* when a page cannot be acquired, repeat the call until it can or does not exist * updated dbengine unittest * Update dbengine-unittest.c
2024-03-21Add -Wno-builtin-macro-redefined to compiler flags. (#17209)Austin S. Hemmelgarn
This silences warnings about macros that are provided by the preprocessor/compiler itself being redefined. This is needed to silence warnings about _FORTIFY_SOURCE being redefined, which are being generated as we prefer a more aggressive value for it than what most distros provide by default. Without this change, the build is really noisy on many systems, and also fails when run with `-Werror`. It is also required long-term to allow for reproducible builds without throwing errors, as they need to redefine a number of macros provided by the preprocessor at build time.
2024-03-20Move bundling of libyaml to CMake. (#17190)Austin S. Hemmelgarn
2024-03-20Prefer Protobuf’s own CMake config over CMake's FindProtobuf. (#17128)Austin S. Hemmelgarn
* Prefer Protobuf’s own CMake config over CMake's FindProtobuf. The FindProtobuf CMake module shipped by upstream CMake is broken for Protobuf version 22.0 and newer because it does not correctly pull in the new Abseil dependencies. Protobuf itself sometimes ships a CMake Package Configuration module that _does_ work correctly, so use that in preference to the Find module shipped with CMake. Upstream bug reference: https://gitlab.kitware.com/cmake/cmake/-/issues/24321 * Properly handle protoc executable. * Restructure to explicitly handle fallback case ourselves. This allows proper handling of compatibility code in a way that actually works for us without us needing to ship a special module to handle the compatibility case. * Switch to bundling protobuf via CMake instead of an external script. * Fix handling of Protobuf inclusion. - Add correct include directories for protoc. - Skip installing protobuf when installing the agent. * Drop spurious quotation marks. * Properly fix generator expression for protoc include paths. * Properly default to bundling protobuf in installer code. * Disable ASAN in unit tests. It doesn’t work with the modified protobuf handling and per discussion with the team is non-critical. * Change comment based on review. * Revert "Disable ASAN in unit tests." This reverts commit 6cb98b1b59c55d639d68694424b98e790ba2f5a7. * Disable IPMI and NFACCT plugins for unit tests. We don’t actually have any unit tests for them, and they cause issues building reliably in the unit testing environment. * Disable ASAN for Abseil and Protobuf when vendoring them. * Switch to commit hashes for protobuf/abseil. * Restructure to better encapsulate protobuf handling as it’s own module. * Fix up bundled protobuf version handling. Google has complicated rules for C++ build environment support, so we really need to be checking compiler versions and not _just_ C++ standard version. * Fix warnings about invalid defines.
2024-03-18split apps.plugin into multiple files and support MacOS (#17180)Costa Tsaousis
* split apps.plugin into multiple files * move everything about pids to apps_proc_pids.c * code cleanup and reorg for supporting MacOS * fixed SIGFPE * more cleanup * completed split; added untested macos support * enable apps everywhere * macos fixes * disable macos for the moment * extern pagesize * fix missing function * added comments * restored function * working macos apps - not verified yet * enable apps.plugin in MacOS * added ppid * parse cmdline * fix scaling of cpu usage * fixed cmdline parsing * codacy fixes * support uptime for FreeBSD and MacOS * uptime in sec * enable uptime charts on macos and freebsd * disable vmsize on macos
2024-03-05go.d.plugin dyncfgv2 (#17064)Ilya Mashchenko
2024-02-26Integrate Go plugin with build system. (#17005)Austin S. Hemmelgarn
* Integrate Go plugin with build system. * Fix Debian packaging rules. * Add FreeBSD support to Go toolchain handling. * Add Go ldflags handling. * Fix version detection when GCCGO is used. * Fix Go ldflags handling. * Correctly fix Go toolchain version detection. * Properly mark Go as a required dependency in CMake. * Disable VCS stamping as it does not work correctly on some platforms. * Autodetect minimum required Go version from go.mod files. This allows us to avoid needing to update the CMakeLists.txt file when the required version changes in a Go component’s go.mod file. * Prefix GoTools module name with Netdata to ensure we get our local module. * Update integrations code to use new Go plugin location. * Remove old go packaging files. * keep old logic for initial cleanup that is working * Re-sync Go plugin sources. * Fix search order for finding Go toolchain. * update module name * fix /usr/local/go overwrite condition --------- Co-authored-by: Fotis Voutsas <fotis@netdata.cloud> Co-authored-by: ilyam8 <ilya@netdata.cloud>
2024-02-26Assorted build-related changes. (#16906)vkalintiris
* Rename endian.h to byte_order.h The underlying issue is that non-relative header search paths would pick up our own endian.h. This should be fixed in a follow-up PR. * Do not include top-level source dir * Move h2o dep from libnetdata to netdata binary. * Update #endif comment.