Skip to content

Commit

Permalink
Switch crossbuilding to Debian 11 (#5847) (#5848)
Browse files Browse the repository at this point in the history
We're dropping support for Debian 10,
so no need to crossbuild using the outdated image anymore.

This also updates the statically linked glibc from 2.19 to 2.31.

(cherry picked from commit 932a09a)

Co-authored-by: Denis <[email protected]>
  • Loading branch information
mergify[bot] and rdner authored Oct 24, 2024
1 parent a6e1b55 commit cdb9beb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
4 changes: 4 additions & 0 deletions changelog/fragments/1729750939-crossbuild-debian11.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
kind: breaking-change
summary: crossbuild-debian11
description: We're dropping support for Debian 10, so no need to crossbuild using the outdated image anymore. This also updates the statically linked glibc from 2.19 to 2.31.
component: elastic-agent
14 changes: 6 additions & 8 deletions dev-tools/mage/crossbuild.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,25 +225,23 @@ func CrossBuildImage(platform string) (string, error) {

switch {
case platform == "darwin/amd64":
tagSuffix = "darwin-debian10"
tagSuffix = "darwin-debian11"
case platform == "darwin/arm64" || platform == "darwin/universal":
tagSuffix = "darwin-arm64-debian10"
tagSuffix = "darwin-arm64-debian11"
case platform == "linux/arm64":
tagSuffix = "arm"
case platform == "linux/armv5" || platform == "linux/armv6":
tagSuffix = "armel"
case platform == "linux/armv7":
tagSuffix = "armhf"
case strings.HasPrefix(platform, "linux/mips"):
tagSuffix = "mips-debian10"
tagSuffix = "mips-debian11"
case strings.HasPrefix(platform, "linux/ppc"):
tagSuffix = "ppc-debian10"
tagSuffix = "ppc-debian11"
case platform == "linux/s390x":
tagSuffix = "s390x-debian10"
tagSuffix = "s390x-debian11"
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-debian11"
}

goVersion, err := GoVersion()
Expand Down

0 comments on commit cdb9beb

Please sign in to comment.