Skip to content

Commit

Permalink
feat: drop support for 32bit arch (#11871)
Browse files Browse the repository at this point in the history
* feat: drop support for 32bit arch

* fix: remove additional i686 target

Co-authored-by: Andrew Wilkins <[email protected]>

---------

Co-authored-by: Andrew Wilkins <[email protected]>
  • Loading branch information
kruskall and axw authored Oct 19, 2023
1 parent 00fb30e commit d2c362d
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 26 deletions.
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ CURRENT_DIR=$(shell dirname $(shell readlink -f $(firstword $(MAKEFILE_LIST))))

APM_SERVER_BINARIES:= \
build/apm-server-linux-amd64 \
build/apm-server-linux-386 \
build/apm-server-linux-arm64 \
build/apm-server-windows-386.exe \
build/apm-server-windows-amd64.exe \
build/apm-server-darwin-amd64 \
build/apm-server-darwin-arm64
Expand All @@ -64,7 +62,6 @@ $(APM_SERVER_BINARIES):
build/apm-server-linux-%: GOOS=linux
build/apm-server-darwin-%: GOOS=darwin
build/apm-server-windows-%: GOOS=windows
build/apm-server-%-386 build/apm-server-%-386.exe: GOARCH=386
build/apm-server-%-amd64 build/apm-server-%-amd64.exe: GOARCH=amd64
build/apm-server-%-amd64 build/apm-server-%-amd64.exe: GOFLAGS+=-buildmode=pie
build/apm-server-%-arm64 build/apm-server-%-arm64.exe: GOARCH=arm64
Expand All @@ -75,7 +72,6 @@ GOVERSIONINFO_FLAGS := \
-product-version "$(APM_SERVER_VERSION)" \
-comment "commit=$(GITCOMMIT)"

build/apm-server-windows-386.exe: x-pack/apm-server/versioninfo_windows_386.syso
build/apm-server-windows-amd64.exe: x-pack/apm-server/versioninfo_windows_amd64.syso
x-pack/apm-server/versioninfo_windows_amd64.syso: GOVERSIONINFO_FLAGS+=-64
x-pack/apm-server/versioninfo_%.syso: $(GOVERSIONINFO) $(GITREFFILE) packaging/versioninfo.json
Expand Down
6 changes: 0 additions & 6 deletions internal/beatcmd/beat.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,12 +260,6 @@ func (b *Beat) Run(ctx context.Context) error {
defer logp.Info("%s stopped.", b.Info.Beat)

logger := logp.NewLogger("")
if runtime.GOARCH == "386" {
logger.Warn("" +
"deprecation notice: support for 32-bit system target " +
"architecture will be removed in an upcoming version",
)
}

if runtime.GOOS == "darwin" {
if host, err := sysinfo.Host(); err != nil {
Expand Down
17 changes: 3 additions & 14 deletions packaging.mk
Original file line number Diff line number Diff line change
Expand Up @@ -106,25 +106,21 @@ WINDOWS_PACKAGE_FILES := \
# so we need to create arch-specific nfpm configuration files.
build/nfpm-amd64.yml: PACKAGE_GOARCH=amd64
build/nfpm-arm64.yml: PACKAGE_GOARCH=arm64
build/nfpm-386.yml: PACKAGE_GOARCH=386
build/nfpm-%.yml: packaging/nfpm.yml
sed 's/$${GOARCH}/$(PACKAGE_GOARCH)/' $< | sed 's/$${APM_SERVER_VERSION}/${APM_SERVER_VERSION}/' > $@

DEB_ARCH := i386 amd64 arm64
DEB_ARCH := amd64 arm64
DEBS := $(patsubst %, $(DISTDIR)/apm-server-$(APM_SERVER_VERSION)-%.deb, $(DEB_ARCH))
DEBS += $(patsubst %, $(DISTDIR)/apm-server-$(APM_SERVER_VERSION)-SNAPSHOT-%.deb, $(DEB_ARCH))
DEBS_386 := $(filter %-i386.deb, $(DEBS))
DEBS_AMD64 := $(filter %-amd64.deb, $(DEBS))
DEBS_ARM64 := $(filter %-arm64.deb, $(DEBS))

RPM_ARCH := i686 x86_64 aarch64
RPM_ARCH := x86_64 aarch64
RPMS := $(patsubst %, $(DISTDIR)/apm-server-$(APM_SERVER_VERSION)-%.rpm, $(RPM_ARCH))
RPMS += $(patsubst %, $(DISTDIR)/apm-server-$(APM_SERVER_VERSION)-SNAPSHOT-%.rpm, $(RPM_ARCH))
RPMS_386 := $(filter %-i686.rpm, $(RPMS))
RPMS_AMD64 := $(filter %-x86_64.rpm, $(RPMS))
RPMS_ARM64 := $(filter %-aarch64.rpm, $(RPMS))

$(DEBS_386) $(RPMS_386): $(NFPM) $(COMMON_PACKAGE_FILES) build/apm-server-linux-386 build/nfpm-386.yml
$(DEBS_ARM64) $(RPMS_ARM64): $(NFPM) $(COMMON_PACKAGE_FILES) build/apm-server-linux-arm64 build/nfpm-arm64.yml
$(DEBS_AMD64) $(RPMS_AMD64): $(NFPM) $(COMMON_PACKAGE_FILES) build/apm-server-linux-amd64 build/nfpm-amd64.yml

Expand All @@ -136,19 +132,16 @@ $(DEBS_AMD64) $(RPMS_AMD64): $(NFPM) $(COMMON_PACKAGE_FILES) build/apm-server-li
#
# ARCHIVES_DIR holds intermediate directories created for building tgz and zip.
ARCHIVES_DIR := build/archives
ARCHIVE_PLATFORMS := darwin-x86_64 linux-x86_64 linux-x86 linux-arm64 windows-x86_64
ARCHIVE_PLATFORMS := darwin-x86_64 linux-x86_64 linux-arm64 windows-x86_64
ARCHIVE_PREFIX := $(ARCHIVES_DIR)/apm-server-$(APM_SERVER_VERSION)
ARCHIVES := $(addprefix $(ARCHIVE_PREFIX)-, $(ARCHIVE_PLATFORMS))
ARCHIVES += $(addprefix $(ARCHIVE_PREFIX)-SNAPSHOT-, $(ARCHIVE_PLATFORMS))

$(ARCHIVE_PREFIX)-darwin-x86_64 $(ARCHIVE_PREFIX)-SNAPSHOT-darwin-x86_64: build/apm-server-darwin-amd64 $(COMMON_PACKAGE_FILES)
$(ARCHIVE_PREFIX)-linux-x86_64 $(ARCHIVE_PREFIX)-SNAPSHOT-linux-x86_64: build/apm-server-linux-amd64 $(COMMON_PACKAGE_FILES)
$(ARCHIVE_PREFIX)-linux-x86 $(ARCHIVE_PREFIX)-SNAPSHOT-linux-x86: build/apm-server-linux-386 $(COMMON_PACKAGE_FILES)
$(ARCHIVE_PREFIX)-linux-arm64 $(ARCHIVE_PREFIX)-SNAPSHOT-linux-arm64: build/apm-server-linux-arm64 $(COMMON_PACKAGE_FILES)
$(ARCHIVE_PREFIX)-windows-x86_64 $(ARCHIVE_PREFIX)-SNAPSHOT-windows-x86_64: \
build/apm-server-windows-amd64.exe $(COMMON_PACKAGE_FILES) $(WINDOWS_PACKAGE_FILES)
$(ARCHIVE_PREFIX)-windows-x86 $(ARCHIVE_PREFIX)-SNAPSHOT-windows-x86: \
build/apm-server-windows-386.exe $(COMMON_PACKAGE_FILES) $(WINDOWS_PACKAGE_FILES)

$(ARCHIVE_PREFIX)-%:
@rm -fr $@ && mkdir -p $@
Expand Down Expand Up @@ -182,15 +175,11 @@ $(DISTDIR)/%-docker-build-context.tar.gz: $(ARCHIVES_DIR)/%-docker-build-context
PACKAGE_SUFFIXES := \
darwin-x86_64.tar.gz \
linux-x86_64.tar.gz \
linux-x86.tar.gz \
linux-arm64.tar.gz \
windows-x86_64.zip \
windows-x86.zip \
amd64.deb \
i386.deb \
arm64.deb \
x86_64.rpm \
i686.rpm \
aarch64.rpm

build/dependencies-$(APM_SERVER_VERSION)-SNAPSHOT.csv: build/dependencies-$(APM_SERVER_VERSION).csv
Expand Down
2 changes: 0 additions & 2 deletions x-pack/apm-server/aggregation.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// or more contributor license agreements. Licensed under the Elastic License 2.0;
// you may not use this file except in compliance with the Elastic License 2.0.

//go:build !386

package main

import (
Expand Down

0 comments on commit d2c362d

Please sign in to comment.