[8.14](backport #38952) Osquerybeat: Strip osqueryd binary for linux #39149
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed commit message
Strip osqueryd binary for linux that is unstripped in the official osquery tar.gz distro.
Size reduction
ARM: 273,418,504 -> 78,956,480 bytes
x86: 270,282,072 -> 86,097,240 bytes
Changed dev-tools code for linux crossbuilds.
Noticed that the image docker.elastic.co/beats-dev/golang-crossbuild:1.21.9-arm currently exists for both ARM and x86 archs and is being used randomly, which causes a problem for
strip
tool when arch of binaries are mismatched with the arch of the tool. This affects only linux builds.Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
Ensure that everything builds as before. The size of
osqueryd
is 3x smaller than before on linux OS, currently is under 90M.Related issues
Screenshots
Before:
After:
This is an automatic backport of pull request #38952 done by [Mergify](https://mergify.com).