micronaut-projects / micronaut-gradle-plugin

A Gradle Plugin for Micronaut
Apache License 2.0
65 stars 43 forks source link

Update package names to support Amazon Linux 2023 #929

Closed wyattconsulting closed 5 months ago

wyattconsulting commented 5 months ago

Unfortunately, libc6-dev and zlib1g-dev are not available in the Amazon Linux 2023 repository. Instead install the zlib-devel and glibc-devel packages, which are equivalent to zlib1g-dev and libc6-dev, respectively. This should be backwards compatible with Amazon Linux 2 and will also allow for using the amazonlinux:latest tag.

CLAassistant commented 5 months ago

CLA assistant check
All committers have signed the CLA.

wyattconsulting commented 5 months ago

Sorry, not a regular contributor and so not sure how to indicate this is a proposed resolution for https://github.com/micronaut-projects/micronaut-gradle-plugin/issues/874.

wyattconsulting commented 5 months ago

Thank you @sdelamo for the testing. I started to setup a proper environment and realized it has been a very long time since I have done that. I updated the other references in the project and double-checked amazonlinux:2023 is the correct tag.

melix commented 5 months ago

Looks like tests are failing with:

Caused by: com.github.dockerjava.api.exception.DockerClientException: Could not build image: The command '/bin/sh -c yum install -y gcc gcc-c++ glibc-devel curl bash zlib zlib-devel zlib-static zip tar gzip'

wyattconsulting commented 5 months ago

Looks like some sort of collision between curl and the curl-minimal on the image. This works:

docker run --rm --entrypoint /bin/sh amazonlinux:2.0.20240109.0 -c "yum install -y gcc gcc-c++ glibc-devel curl bash zlib zlib-devel zlib-static zip tar gzip"

and this doesn't:

docker run --rm --entrypoint /bin/sh amazonlinux:2023 -c "yum install -y gcc gcc-c++ glibc-devel curl bash zlib zlib-devel zlib-static zip tar gzip"

Will submit an update, but if amazonlinux:2 breaks without curl then looks like a breaking change might be required.

wyattconsulting commented 5 months ago

curl-minimal seems to be the lowest common denominator

This works

docker run --rm --entrypoint /bin/sh amazonlinux:2.0.20240109.0 -c "yum install -y gcc gcc-c++ glibc-devel curl-minimal bash zlib zlib-devel zlib-static zip tar gzip"

and this works:

docker run --rm --entrypoint /bin/sh amazonlinux:2023 -c "yum install -y gcc gcc-c++ glibc-devel curl-minimal bash zlib zlib-devel zlib-static zip tar gzip"

wyattconsulting commented 5 months ago

Thank you, @melix