Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions dev-tools/mage/crossbuild.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,7 @@ func CrossBuildImage(platform string) (string, error) {
case platform == "linux/s390x":
tagSuffix = "s390x-debian10"
case strings.HasPrefix(platform, "linux"):
// Use an older version of libc to gain greater OS compatibility.
// Debian 8 uses glibc 2.19.
tagSuffix = "main-debian8"
tagSuffix = "main-debian10"
}

goVersion, err := GoVersion()
Expand Down
2 changes: 1 addition & 1 deletion dev-tools/mage/pkgdeps.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func installDependencies(arch string, pkgs ...string) error {
return err
}

params := append([]string{"install", "-y", "--force-yes",
params := append([]string{"install", "-y",
"--no-install-recommends",

// Journalbeat is built with old versions of Debian that don't update
Expand Down
22 changes: 2 additions & 20 deletions filebeat/scripts/mage/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
package mage

import (
"strings"

"github.com/magefile/mage/mg"
"go.uber.org/multierr"

Expand All @@ -42,7 +40,7 @@ var (
)

// GolangCrossBuild builds the Beat binary inside the golang-builder and then
// checks the binaries GLIBC requirements for RHEL compatability.
// checks the binaries GLIBC requirements for RHEL compatibility.
// Do not use directly, use crossBuild instead.
func GolangCrossBuild() error {
return multierr.Combine(
Expand All @@ -65,21 +63,5 @@ func golangCrossBuild() error {

// CrossBuild cross-builds the beat for all target platforms.
func CrossBuild() error {
return devtools.CrossBuild(devtools.ImageSelector(func(platform string) (string, error) {
image, err := devtools.CrossBuildImage(platform)
if err != nil {
return "", err
}
// Normally linux/amd64 and linux/386 binaries are build using debian7
// because it has an older glibc version that makes the binaries work on
// RHEL 6, but debian7 does not have the systemd libraries needed for
// the journald input.
//
// So use the debian8 image, but test the binary to ensure that the
// linked glibc version requirement is still compatible with RHEL6.
if platform == "linux/amd64" || platform == "linux/386" {
image = strings.ReplaceAll(image, "main-debian7", "main-debian8")
}
return image, nil
}))
return devtools.CrossBuild(devtools.ImageSelector(devtools.CrossBuildImage))
}