-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] - microdnf does not respect --releasever flag in minimal container image #854
Comments
@wesner-price I'm running an older container (tag
From microdnf vars:
microdnf version:
|
@elsaco Yes, I am aware the packages are up to date if one can simply upgrade the AL2023 version. Since the new versions point to updated repositories. Not all aws images being released have been upgraded to the new version. For example, the Node 20 lambda image I am using. Therefore, to update packages to a new version that exists in a new releases repository I need to specify the release version on dnf, but the option --releasever is not working for microdnf. One would expect that using --releasever on micro dnf would result in pulling a package from that release version passed in via the argument. This can be seen by pulling 2023.6.20241111.0-minimal as you have but using repoquery for an older release. You would think that --releasever would set the variable in the repo config file. But instead i need to manually replace with the desired version.
Ultimately |
@wesner-price I'm not convinced is the fault of If you delete
Note that |
I can verify that |
Ran into this issue trying to upgrade dependencies with published vulnerabilities.
This is not an issue if I was using the latest release of AL2023 minimal container image, as it points to the updated package repo.
However, I am using the
public.ecr.aws/lambda/nodejs:20
image, and it has not been updated to the latest version of AL2023, it is still version 2023.6.20241031.Regardless I believe the bug is present in all versions of the minimal container image.
An example vulnerability is https://alas.aws.amazon.com/AL2023/ALAS-2024-759.html
The correction is to run
dnf update expat --releasever 2023.6.20241111
But on minimal container images which use microdnf this is not working.
Resulting in a nothing to do status, see output attached below.
I have found a workaround to update the packages, and that is to manually set the release version in the repo file.
sed -i 's/$releasever/2023.6.20241121/g' /etc/yum.repos.d/amazonlinux.repo
I suspect that something is wrong with how microdnf is setting the release version in
/etc/yum.repos.d/amazonlinux.repo
.To Reproduce
Steps to reproduce the behavior:
public.ecr.aws/amazonlinux/amazonlinux:2023.6.20241031.0-minimal
dnf install expat -y
dnf upgrade expat -y --releasever=2023.6.20241121 --refresh
sed -i 's/$releasever/2023.6.20241121/g' /etc/yum.repos.d/amazonlinux.repo
dnf upgrade expat -y --refresh
Expected behavior
I would expect that on step 4 that dnf would upgrade expat to 2.6.3
Screenshots
If applicable, add screenshots to help explain your problem.
The text was updated successfully, but these errors were encountered: