-
Notifications
You must be signed in to change notification settings - Fork 198
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
handling recommends 🗣 #718
Comments
One thing that makes this trickier for us is our anti-hysteresis - there's We could pretty easily have a single global flag to ignore weak dependencies, but I'm not sure how easy it'd be to implement "per package" weak state. It seems like we'd need to do something like do a depsolve with all weak off, then for every package that isn't weak, readd it to the goal with recommends on. |
dracut recommends: https://bugzilla.redhat.com/show_bug.cgi?id=1452348 |
Can you expand on this? If an application has a weak dep on a shared lib, then surely it can't unconditionally link against it, right? Or are you talking about something else? |
I meant compat with existing treefiles. Updated the summary above. |
I am thinking now that it should be pretty easily to explicitly do e.g.:
Somehow we'd try to verify that everything that depends on it was solely via weak deps. Alternatively, we could just do |
It would be useful to be able to globally turn this on or off depending on the use case. For IoT we explicitly don't want weak dependencies enabled because it brings in a lot of extra things and we want ot be able to control that, for example it pulls in linux-atm-libs which we won't ever have a requirement for. We need to be able to explicitly control what we have due to size, updates etc in particular from a security PoV (if it's not shipped it can't be compromised) and from a change delta PoV (there's a lot of IoT usecases where there will be constrained bandwidth available so every bit counts (also in cases where we could potentially have millions of devices) which for a lot of the current OSTree use cases which are in datacentres where there's usually multiple Gb available. |
I looked at this again briefly, but it looks like libdnf needs API here to support this. Today at least our libdnf does:
Yet we need to pass What I had in a local branch, rebased:
|
Is there a bug reported with libdnf for the API request? |
@cgwalters can you provide the reference to the libdnf bug/RFE? |
This is for: coreos#718 But I'm not going to close that issue as this only does the server side, and I think we should support it client side too. Since I wrote that issue, we ended up skipping the `dnf_transaction_depsolve()` API, and hence we don't need to block on a libdnf change. So this was quite simple.
PR in #1513 |
This is for: #718 But I'm not going to close that issue as this only does the server side, and I think we should support it client side too. Since I wrote that issue, we ended up skipping the `dnf_transaction_depsolve()` API, and hence we don't need to block on a libdnf change. So this was quite simple. Closes: #1513 Approved by: jlebon
This is for: #718 But I'm not going to close that issue as this only does the server side, and I think we should support it client side too. Since I wrote that issue, we ended up skipping the `dnf_transaction_depsolve()` API, and hence we don't need to block on a libdnf change. So this was quite simple. Closes: #1513 Approved by: jlebon
This is for: #718 But I'm not going to close that issue as this only does the server side, and I think we should support it client side too. Since I wrote that issue, we ended up skipping the `dnf_transaction_depsolve()` API, and hence we don't need to block on a libdnf change. So this was quite simple. Closes: #1513 Approved by: jlebon
This is for: #718 But I'm not going to close that issue as this only does the server side, and I think we should support it client side too. Since I wrote that issue, we ended up skipping the `dnf_transaction_depsolve()` API, and hence we don't need to block on a libdnf change. So this was quite simple. Closes: #1513 Approved by: jlebon
I need to remove a recommended package, I have
But
I don't know how to remove
|
@heyakyra You can try using |
Thanks for the tip, but it says it is not found:
Edit: This gets things working temporarily, but doesn't persist through reboots:
|
Ahh right, it's an overlay. Hmm, if NetworkManager-l2tp did something more like I'm afraid I don't have a good answer for you. This is what this issue is tracking. :) I'm not familiar with those packages, though I'd be surprised if there weren't a way to tell the software to use a specific backend. |
It seems to me the only part missing for recommends handling is the client side. As a note, related BZ was closed: https://bugzilla.redhat.com/show_bug.cgi?id=1582939
|
This also appears to be blocking rebase to F35 because of recommends on |
I am trying to do a build with the |
This allows Legendary to be installed properly by working around a few rpm-ostree bugs. coreos/rpm-ostree#718 coreos/rpm-ostree#4653
Looking over this issue again, it seems to be split into two different problems: (1) rpm-ostree installs recommended dependencies. I see the Treefile operation of (2) Recommended dependencies cannot be managed on a per-package basis. This is still lingering and why this GitHub Issue is still open. |
Actually, the suggested (but never created) |
I'm currently using rpm-ostree native container builds, how do I disable the installation of recommended packages in this scenario, without any treefiles? Current use case in particular: doing a multi-stage build in the Containerfile with a separate stage for building the nvidia kernel module, to avoid all the dev dependencies in the final image; |
Ideally, the base image you're deriving from has dnf (if it doesn't yet, it should soon). Then you can use the regular dnf config option for this (by writing to |
I'm under the impression that the above hints and new features unfortunately do not address a basic scenario: layering a minimal set of extra packages from the commandline using "rpm-ostree install pkg1 pkg2 pkg3" on top of a running CoreOS instance. |
This is a broken/incomplete feature apparently. Fedora dependency sets and worse still recommendations are bloated. Having no control over this via rpm-ostree install is a major problem. |
@jlebon are you suggesting it should be possible in an ostree container to install dnf, install packages via dnf and then I have observed what is going on with the experimental Fedora builds over in the gitlab area (https://gitlab.com/fedora/bootc/base-images-experimental/-/blob/main/Containerfile?ref_type=heads) so hopefully you are not talking about that method. That method looks disastrous right now, if you ask me. A step back for sure. I assume we are not seeing finished features there though. For clarity's sake I have sought to build my own base images and not "derive from" the upstream images under development as they do not meet my needs. So all this should be working nicely for those of us who are opting to use these tools as building blocks from ground 0. |
When doing a layered build, you can use FROM quay.io/fedora/fedora-bootc:40
RUN dnf install --setopt=install_weak_deps=false -y NetworkManager-l2tp && dnf clean all
# notice it doesn't pull in libreswan
When doing a base build by tweaking e.g https://gitlab.com/fedora/bootc/base-images, you can set |
Right, I found this works, but obviously only if you have dnf (or dnf5 in my case) in the image. Problem is if I'm creating an image where I want rpm-ostree present for future ad-hoc package layering (maybe I want this door open) I now have an additional need for dnf/dnf5 if I want to make lean downstream derivative builds. This is really suboptimal and also very confusing. It seems like rpm-ostree really should have a way to disable pulling in weak deps and obey the same options dnf does, or, dnf5 should grow a feature to handle a transactional package layering with ostree. These tools perform similar activities and should behave the same. Having to have both side by side is not a solution to this problem. Unless there is something I'm missing the "solution" is basically a work around to accommodate limitations of both rpm-ostree and dnf. What are the prospects for a more sane fix here? Is this on the horizon at all? These limitations should be documented more formally if they are to persist indefinitely. Given the seeming plans to divorce more from rpm-ostree I presume there are not really any changes planned to actually resolve this problem.
I already figured this out by reading the treefile docs. It works but only at compose time. Not really a solution to the issue described. |
We already have a knob for this in the treefile, and we already generate a treefile in the client-side case to hand to the core. So this is just wiring up a knob in the config file to it. Closes: coreos#718
A way to remove all previously installed recommends? |
|
Since you are here @travier, are recommends installed on base fedora images like Silverblue or they only contains requiered packages? |
Fedora Atomic Desktops have recommended packages included by default. |
Thanks for the info! Do you think it will be the other way around someday or it's made on purpose? |
@RichardFevrier @travier AFAIU, according to #4974 (comment), there's no need to reset overlayed packages. Once the knob is set, recommended packages will be removed with a new deployment.
|
Ah, indeed, no need for the reset step.
Let's move that discussion to an Atomic Desktops SIG issue. |
I meant without layering anything. Atomic desktops could only include strict minimum package to work and not recommends. |
Moved here. |
Is Red Hat pulling all their projects from github into gitlab.com moving forward? |
This is a pretty random place to ask that question 😄 Red Hat is a large company with many sub-groups. You may observe that RHEL clearly chose to put things in https://gitlab.com/redhat/centos-stream for example. You may also observe https://github.com/openshift and how many things are there and how e.g. Prow is hardwired to Github... |
Are there any changes here that were intended to actually work for container builds? The Ultimately, it seems likely that all of this is outdated by this? For anyone doing container builds - they should be using dnf5 at this point and just avoiding rpm-ostree entirely when installing packages if users want actual control over what goes in and not (entirely uncontrollable) defaults that (this comment is in relation for doing all of this for a workstation container builds on top of various Fedora atomic offerings against 41) |
libdnf defaults to installing
Recommends
(aka weak deps). There isDNF_IGNORE_WEAK_DEPS
which wraps the libsolv handling.Hence, today we default to installing weak dependencies. I think for compat with existing treefiles we'll need to continue to do so by default. Though an evaluation of what would drop out of e.g. Atomic Host if we dropped Recommends would be interesting.
However, for layered packages, I think we should support omitting them. The reason I'm filing this is right now in Fedora gdb has a Recommends on dnf.
The text was updated successfully, but these errors were encountered: