Don’t clean repo during static builds.
We’re using a separate build directory in all cases, so there is no
longer any need to try to clean the repository before a static build.
This enables running static builds in linked git worktrees.
* 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.
* Add repo config for Amazon Linux 2023.
dnf and yum resolve $releasever to a verbose release version (e.g. 2023.4.20240401).
However, there is no need to create repositories for every version Amazon comes up with.
Resolves https://github.com/netdata/netdata/issues/17324
* Have a more specific conditional file install (amzn2)
* Bump repo spec release for Amazon Linux changes.
For some arcane reason, many distros that have chose a merged `/usr`
layout (https://www.freedesktop.org/wiki/Software/systemd/TheCaseForTheUsrMerge/)
insist on still putting both `/bin` and `/usr/bin` (and `/sbin` and
`/usr/sbin`) in their default `$PATH`, despite the fact that this
provides no real benefit (it’s questionable even for ‘backwards
compatibility’, anything that truly _needs_ this on a system with a
merged `/usr` layout is fundamentally broken).
To correctly handle the fact that it’s not only possible but actually
extremely likely that Netdata will show up in more than one place in
`$PATH` even if it’s a single install, we need to canonicalize the paths
before comparing them when checking for multiple installs.
Unfortunately, despite path canonicalization being an extremely common
need, there is no POSIX utility for doing it with arbitrary paths,
so we have to resort to some trickery to achieve this portably. The
exact implementation used by this change is somewhat naive and only
works if the directory the target path indicates actually exists, but we
can count on this being the case in this particular usage because we
know that we found a file within that directory.
- Only flag multiple installs if subsequent searches produce a different
install path.
- Only set the detected install path if a search actually finds an
install path.
- Bail early if the initial search finds nothing.
* 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.
* Add detection of multiple concurrent installs.
And refuse to operate on such setups in most cases.
* Fix exit cases for existing install detection loop.
* Skip building Go components for Docker CI if they have not changed.
* Properly handle Go code in general checks PR.
* Skip Go code in build checks if it hasn’t changed.
* Fix linting issues.
* Fix propagation of installer flags.
* Fix propagation of environment variables through static build process.
* Fix handling of extra install options in static builds.
* Skip starting the agent in updater checks.
* Fix actionlint warning.
* 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.