Skip to content

Commit

Permalink
filebeat/scripts/mage - Remove installation of journald deps from cro…
Browse files Browse the repository at this point in the history
…ssBuild (#34939) (#34953)

The golang-crossbuild images contain the journald development dependencies so
the build steps do not need make changes to the environment before building.

Fixes #34938

(cherry picked from commit 192be24)

Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co>
  • Loading branch information
mergify[bot] and andrewkroh authored Mar 28, 2023
1 parent 7c36204 commit fcc91c7
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions filebeat/scripts/mage/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,11 @@ package mage
import (
"strings"

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

devtools "github.com/elastic/beats/v7/dev-tools/mage"
)

// declare journald dependencies for cross build target
var (
journaldPlatforms = []devtools.PlatformDescription{
devtools.Linux386, devtools.LinuxAMD64,
devtools.LinuxARM64, devtools.LinuxARM5, devtools.LinuxARM6, devtools.LinuxARM7,
devtools.LinuxMIPS, devtools.LinuxMIPSLE, devtools.LinuxMIPS64LE,
devtools.LinuxPPC64LE,
devtools.LinuxS390x,
}

journaldDeps = devtools.NewPackageInstaller().
AddEach(journaldPlatforms, "libsystemd-dev").
Add(devtools.Linux386, "libsystemd0", "libgcrypt20")
)

// GolangCrossBuild builds the Beat binary inside the golang-builder and then
// checks the binaries GLIBC requirements for RHEL compatability.
// Do not use directly, use crossBuild instead.
Expand All @@ -57,7 +41,6 @@ func GolangCrossBuild() error {
func golangCrossBuild() error {
conf := devtools.DefaultGolangCrossBuildArgs()
if devtools.Platform.GOOS == "linux" {
mg.Deps(journaldDeps.Installer(devtools.Platform.Name))
conf.ExtraFlags = append(conf.ExtraFlags, "-tags=withjournald")
}
return devtools.GolangCrossBuild(conf)
Expand Down

0 comments on commit fcc91c7

Please sign in to comment.