Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Switch to Debian base for static builds and provide systemd-journal support in them.#19647

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
Ferroin wants to merge14 commits intonetdata:master
base:master
Choose a base branch
Loading
fromFerroin:debian-static-builder

Conversation

Ferroin
Copy link
Member

@FerroinFerroin commentedFeb 14, 2025
edited
Loading

Summary
  • Restructures the handling of cache paths for build caching in static builds. This is an improvement that should have happened long ago, and is being done as part of this work because it makes it easier to ensure that the new builds use a new cache path.
  • Adds improved debugging support to the static build process. By settingDEBUG_BUILD_INFRA to a non-empty value when running the build, a failure in the build process will drop to a shell in the container being used for building instead of just dying.
  • Switches to the actual Debian based static build images. This also requires changing the Docker platform for our ARMv6 builds, since Debian supports ARMv5 instead of ARMv6 as a base for softfp ARM systems.
  • Vendors libmnl and libelf for static builds, as Debian does not currently provide a working static library for either of them.
  • Fixes issues with building the static copy of bash we bundle:
    • Forces usage of the copy of readline from the build environment instead of bash’s internal implementation, as the internal one does not build correctly.
    • Disables network port redirection support, as it does not build correctly and we don’t actually use it in any of our scripts (nor are we ever likely to want to).
  • Fixes issues with building the static copy of curl we bundle:
    • Disables libpsl support since it would not build correctly. Not expected to cause any issues as we do not appear to use any features of curl that rely on the Public Suffix List.
    • Disables brotli support since it would not build correctly. Minimal impact expected (we do use brotlioptionally in a number of cases, but it’s not mandatory).
    • Disables building documentation, since it should have been disabled already and it happens to not build at all in the new static build environment.
  • Consolidates compiler flag handling for Netdata itself by factoring out common flags for all build types (this way it’s easier to keep things properly in-sync).
Test Plan

This requires extensive manual testing far beyond what I’ve already done.

Things that need specific attention andMUST be tested before merging:

  • Overall functionality of the ARMv6 builds on actual hardware (the underlying architecture used for this specific build is being changed as part of this PR, and while I don’t expect it to actually break anything, we should at least confirm that it appears to be working).
  • Handling of non-ASCII hostnames in locales that use an encoding other than UTF-8, needs tested on both glibcAND musl systems (we rely on iconv for this, which in turn usually relies on being able todlopen() things that may be incompatible between glibc versions and may not exist on musl systems).
  • Handling of mapping between user/group names and IDs, needs tested on both glibcAND musl systems (NSS within glibc relies heavily ondlopen()).
  • Handling of hostname lookups, needs testing on both glibcAND musl systems (NSS again).
  • Confirmation that the systemd-journal plugin works across a wide variety of systemd systems (this also relies ondlopen(), but it does so in a way that appears to work fine across distros).

I have not personally tested the first item since I don’t have hardware for it, and I can’t readily test the second item, but I have confirmed that the last three all appear to work on my glibc+systemd Gentoo development system.

Additionally, regular runtime testing is required for a wide variety of platforms.

Manual builds for testing work exactly the same as they do for existing static builds (ensure you have a working Docker or rootless Podman setup, then runpackaging/makeself/build-static.sh <arch> where<arch> is the CPu architecture to build for).

@github-actionsgithub-actionsbot added area/packagingPackaging and operating systems support area/buildBuild system (autotools and cmake). labelsFeb 14, 2025
@FerroinFerroinforce-pushed thedebian-static-builder branch 2 times, most recently froma47318b tob52583bCompareFebruary 21, 2025 11:46
@thiagoftsm
Copy link
Contributor

Hello@Ferroin ,

I am testing your PR in different scenarios, as you requested, and I observed the following:

  • I have no issues compiling and running it locally.
  • When I build the static binary and install it on a host with the locale set to UTF-8 and the name não, it runs normally.
  • However, when I set the locale to ISO and keep the name não, Netdata fails to start with the following log:
systemctl status netdata● netdata.service - infrastructure monitoring and troubleshooting, transformed   Loaded: loaded (/lib/systemd/system/netdata.service; enabled; vendor preset: enabled)   Active: activating (auto-restart) (Result: signal) since Thu 2025-03-06 02:28:06 UTC; 16s ago  Process: 1621 ExecStartPre=/bin/mkdir -p /opt/netdata/var/cache/netdata (code=exited, status=0/SUCCESS)  Process: 1622 ExecStartPre=/bin/chown -R netdata /opt/netdata/var/cache/netdata (code=exited, status=0/SUCCESS)  Process: 1623 ExecStart=/opt/netdata/usr/sbin/netdata -P /run/netdata/netdata.pid -D (code=killed, signal=ABRT) Main PID: 1623 (code=killed, signal=ABRT)

I ran this last test on Debian 10.

Current versions of elfutils libelf are broken for static linkingbecause they do not correctly include required symbols from elfutilsinternal shared code library (libeu). Fixing this requires patching thesources and building ourselves.
@FerroinFerroinforce-pushed thedebian-static-builder branch fromb52583b to89779c6CompareMarch 6, 2025 12:26
@Ferroin
Copy link
MemberAuthor

Rebased to pick up the latest changes in the master branch.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@vkalintirisvkalintirisAwaiting requested review from vkalintirisvkalintiris will be requested when the pull request is marked ready for reviewvkalintiris is a code owner

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
area/buildBuild system (autotools and cmake).area/packagingPackaging and operating systems support
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@Ferroin@thiagoftsm

[8]ページ先頭

©2009-2025 Movatter.jp