Skip to content

Fix arm64 packages. The binaries were arm (32) not arm64

What does this MR do?

Fix error with the arm64 packages. The arm64 binaries are been generated just fine, but the Makefile that put then into the deb and rpm packages, put the 32 bits instead.

This MR fix the Makefile so it put the correct binaries inside the packages.

Why was this MR needed?

Because the aarch64 and arm64 packages are broken. You can install them, but if you try to run the binaries, they can't, they are built for the wrong architecture.

What's the best way to test this MR?

To download the latest packages for aarch64 or amd64, open them and check with the command file which arch are compiled for the binaries that it installs:

$ mkdir tmp
$ cd tmp/
$ wget https://gitlab-runner-downloads.s3.amazonaws.com/v13.4.0/rpm/gitlab-runner_arm64.rpm
...
$ rpm2cpio gitlab-runner_arm64.rpm | cpio -idmv
./usr/bin/gitlab-ci-multi-runner
./usr/bin/gitlab-runner
./usr/lib/gitlab-runner/gitlab-runner
./usr/lib/gitlab-runner/helper-images/prebuilt-arm.tar.xz
./usr/lib/gitlab-runner/helper-images/prebuilt-arm64.tar.xz
./usr/lib/gitlab-runner/helper-images/prebuilt-s390x.tar.xz
./usr/lib/gitlab-runner/helper-images/prebuilt-x86_64.tar.xz
./usr/share/gitlab-runner/clear-docker-cache
./usr/share/gitlab-runner/post-install
./usr/share/gitlab-runner/pre-remove
154243 blocks
$ file ./usr/bin/gitlab-runner
./usr/bin/gitlab-runner: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, Go BuildID=yIpZs2csWdyHIKF-5ZGy/dyH79A9AfEyCzGUHRUIv/YWeb-oMcNJ2cfOyJoS8e/oZBXapa1obpPJVaNp3J3, stripped

As you can see that is an ELF 32-bit LSB executable not 64-bit.

Also it can be tested by installing the package in the right architecture and check the installed binary.

Merge request reports