actions / runner-images

GitHub Actions runner images
MIT License
9.17k stars 2.84k forks source link

Build of Ubuntu 22.04 fails with latest packer version #9742

Closed matthiasbrix closed 3 weeks ago

matthiasbrix commented 3 weeks ago

Description

Hi,

The installer script for packer fetches the latest version of packer (1.10.3) which has recently introduced the file LICENSE.txt in the downloaded archive file. This is now causing the build of the ubuntu 22 image (20240422) to fail as the unzip operation in the script install-packer.sh is being prompted with whether replacing the file LICENSE.txt is desired. I suggest adding perhaps an overwrite flag to the unzip operation

==> azure-arm.build_image: Provisioning with shell script: runner-images-ubuntu22-20240422.1/images/ubuntu/templates/../scripts/build/install-packer.sh
==> azure-arm.build_image: Downloading package from https://releases.hashicorp.com/packer/1.10.3/packer_1.10.3_linux_amd64.zip to /tmp/packer_1.10.3_linux_amd64.zip...
==> azure-arm.build_image: Package downloaded in 0 seconds
==> azure-arm.build_image: replace /usr/local/bin/LICENSE.txt? [y]es, [n]o, [A]ll, [N]one, [r]ename:  NULL
==> azure-arm.build_image: (EOF or read error, treating as "[N]one" ...)
==> azure-arm.build_image: Provisioning step had errors: Running the cleanup provisioner, if present...
==> azure-arm.build_image: 
==> azure-arm.build_image: Deleting Virtual Machine deployment and its attatched resources...

Platforms affected

Runner images affected

Image version and build link

ubuntu/22-20240422 No public available.

Is it regression?

Yes

Expected behavior

No prompt but a successful unzip.

Actual behavior

Build fails

Repro steps

Just try to build ubuntu 22 image (20240422)

SebastianClaesson commented 3 weeks ago

This also affects Ubuntu 20.04 build as both installs Packer. Seems the Unzip command requires either (-o) over-write or refresh (-f) to overwrite the existing license file under /usr/local/bin/LICENSE.txt

Alexey-Ayupov commented 3 weeks ago

Hello @matthiasbrix. We aware of the problem and are working on it.

mikhailkoliada commented 3 weeks ago

Fixed, please sync your main!

matthiasbrix commented 3 weeks ago

@mikhailkoliada - just need a new release with the fix :). Thanks.

mikhailkoliada commented 3 weeks ago

@matthiasbrix we do not support building from releases, so if it fails no fixes will be provided, the one should always use main to build their own images.