-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
In Azure Linux, installing packages does not automatically upgrade package dependencies #5940
Comments
I found a couple other interesting
OK, that's the same list of packages. Maybe they're all security updates. I checked with Trivy, and noticed that all were reported as vulnerable except There's another option,
And
@omajid, do you have any advice here? We'd like to transparently upgrade the dependencies of packages we explicitly install (and obviously the packages themselves as well). But we want to avoid upgrading all packages. With other package managers it's trivial - e.g. |
Hey, @lbussell! My experience with yum/dnf/tdnf in this area has shown that Like you noticed, this feature depends on the distro providing good metadata for packages. RHEL, for example, produces this metadata and keeps older versions of packages around. And so this mostly works there. And as another example, this doesn't do anything sensible on Fedora. I have run across examples in Fedora where package version 1.0.0 is installed, 1.0.1 is a security update, and 1.0.2 is a bugfix, and then yum/dnf/tdnf see the installed version (1.0.0) and the latest version (1.0.2, bugfix) and decide there's nothing to update because 1.0.2 isn't a security fix. I don't know of a clean solution to your general problem off the top of my head, but I will try and dig around. It might involve resolving dependencies using |
Describe the Bug
This situation is very similar to #4776.
TDNF ("tiny" version of DNF), the package manager in CBL Mariner 2.0 and Azure Linux 3.0, has some incompatibilities with the way we aim to update packages in our Dockerfiles.
Assume that we have package
$a
which is already installed in the base image, and package$b
which depends on package$a
.tdnf install -y $a
upgrades package$a
to the latest version, even when it's already installed (this is good)$b
is not installed, and we runtdnf install -y $b
, package$a
is not upgraded to the latest version.$b
is already installed, and there is no update for package$b
, and we runtdnf install -y $b
, then package$a
is still not upgraded to the latest version.$b
has an update.Steps to Reproduce
This situation is happening between
git
andexpat
today.git
does not have an update available, butexpat
does. I'm using thisaspnet
image to simulate what happens in oursdk
Dockerfile.First, check for package upgrades (current version of
expat
is2.6.2-2.cm2
):Scenario 1:
Scenario 2:
Scenario 3:
To simulate what happens when git is already installed I'm using the exact same command as scenario 2, but with the SDK image instead since it has git installed.
What does this mean
This means that when an indirect dependency of .NET or any of the tools in a .NET image has a vulnerability, simply re-building the image won't resolve that vulnerability. In this case,
git
is the tool andexpat
is its dependency.The text was updated successfully, but these errors were encountered: