Add support for linux-386 and linux-armv6 architectures (related to #674)

Adds build support for 32-bit x86 (i386/i686) and ARMv6 (older Raspberry Pi models) architectures across all agents and install scripts.

Changes:
- Add linux-386 and linux-armv6 to build-release.sh builds array
- Update Dockerfile to build docker-agent, host-agent, and sensor-proxy for new architectures
- Update all install scripts to detect and handle i386/i686 and armv6l architectures
- Add architecture normalization in router download endpoints
- Update update manager architecture mapping
- Update validate-release.sh to expect 24 binaries (was 18)

This enables Pulse agents to run on older/legacy hardware including 32-bit x86 systems and Raspberry Pi Zero/Zero W devices.
This commit is contained in:
rcourtman 2025-11-09 08:35:24 +00:00
parent 1b221cca71
commit 4834dea05b
9 changed files with 67 additions and 4 deletions

View file

@ -70,14 +70,24 @@ RUN --mount=type=cache,id=pulse-go-mod,target=/go/pkg/mod \
CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=7 go build \
-ldflags="-s -w -X github.com/rcourtman/pulse-go-rewrite/internal/dockeragent.Version=${VERSION}" \
-trimpath \
-o pulse-docker-agent-linux-armv7 ./cmd/pulse-docker-agent; \
-o pulse-docker-agent-linux-armv7 ./cmd/pulse-docker-agent && \
CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=6 go build \
-ldflags="-s -w -X github.com/rcourtman/pulse-go-rewrite/internal/dockeragent.Version=${VERSION}" \
-trimpath \
-o pulse-docker-agent-linux-armv6 ./cmd/pulse-docker-agent && \
CGO_ENABLED=0 GOOS=linux GOARCH=386 go build \
-ldflags="-s -w -X github.com/rcourtman/pulse-go-rewrite/internal/dockeragent.Version=${VERSION}" \
-trimpath \
-o pulse-docker-agent-linux-386 ./cmd/pulse-docker-agent; \
else \
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \
-ldflags="-s -w -X github.com/rcourtman/pulse-go-rewrite/internal/dockeragent.Version=${VERSION}" \
-trimpath \
-o pulse-docker-agent-linux-amd64 ./cmd/pulse-docker-agent && \
cp pulse-docker-agent-linux-amd64 pulse-docker-agent-linux-arm64 && \
cp pulse-docker-agent-linux-amd64 pulse-docker-agent-linux-armv7; \
cp pulse-docker-agent-linux-amd64 pulse-docker-agent-linux-armv7 && \
cp pulse-docker-agent-linux-amd64 pulse-docker-agent-linux-armv6 && \
cp pulse-docker-agent-linux-amd64 pulse-docker-agent-linux-386; \
fi && \
cp pulse-docker-agent-linux-amd64 pulse-docker-agent
@ -97,6 +107,14 @@ RUN --mount=type=cache,id=pulse-go-mod,target=/go/pkg/mod \
-ldflags="-s -w -X github.com/rcourtman/pulse-go-rewrite/internal/hostagent.Version=${VERSION}" \
-trimpath \
-o pulse-host-agent-linux-armv7 ./cmd/pulse-host-agent && \
CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=6 go build \
-ldflags="-s -w -X github.com/rcourtman/pulse-go-rewrite/internal/hostagent.Version=${VERSION}" \
-trimpath \
-o pulse-host-agent-linux-armv6 ./cmd/pulse-host-agent && \
CGO_ENABLED=0 GOOS=linux GOARCH=386 go build \
-ldflags="-s -w -X github.com/rcourtman/pulse-go-rewrite/internal/hostagent.Version=${VERSION}" \
-trimpath \
-o pulse-host-agent-linux-386 ./cmd/pulse-host-agent && \
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build \
-ldflags="-s -w -X github.com/rcourtman/pulse-go-rewrite/internal/hostagent.Version=${VERSION}" \
-trimpath \
@ -132,6 +150,14 @@ RUN --mount=type=cache,id=pulse-go-mod,target=/go/pkg/mod \
-ldflags="-s -w -X main.Version=${VERSION} -X main.BuildTime=${BUILD_TIME} -X main.GitCommit=${GIT_COMMIT}" \
-trimpath \
-o pulse-sensor-proxy-linux-armv7 ./cmd/pulse-sensor-proxy && \
CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=6 go build \
-ldflags="-s -w -X main.Version=${VERSION} -X main.BuildTime=${BUILD_TIME} -X main.GitCommit=${GIT_COMMIT}" \
-trimpath \
-o pulse-sensor-proxy-linux-armv6 ./cmd/pulse-sensor-proxy && \
CGO_ENABLED=0 GOOS=linux GOARCH=386 go build \
-ldflags="-s -w -X main.Version=${VERSION} -X main.BuildTime=${BUILD_TIME} -X main.GitCommit=${GIT_COMMIT}" \
-trimpath \
-o pulse-sensor-proxy-linux-386 ./cmd/pulse-sensor-proxy && \
cp pulse-sensor-proxy-linux-amd64 pulse-sensor-proxy
# Runtime image for the Docker agent (offered via --target agent_runtime)