-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: dnf module #361
Comments
It functions similarly to The only advantage I see is that we can enable copr repos with simpler command Basically, when we would replace |
I would rather create a new module called |
I'm in for making a new Current structure from Minor recipe format correctionsReposCurrently, in
Replacing packagesCurrently, we use It seems that there is no alternative for replacing packages in
Everything elseEverything else looks relatively native. |
|
|
Moving to |
According to
I also personally didn't notice any difference in this behavior when I tested it a bit.
That's basically what But if there is no alternative, then sure, that can be also used & adjusted to match the replace behavior from recipe, without user noticing any difference.
Interesting, thanks for noting. |
I noticed in this Bazzite's PR: That they are using |
I think we could do this simple change:
|
I think a flaw in this method is support for repo files which are directly provided in So I think that my suggestion of using |
@gmpinder We will probably need to add |
Sounds good, that'll be an easy addition. |
Oh right, I forgot that. If we assume copr repo names don't include the Adding another key would work too I guess, but then we'd have to debate the whole config structure related to that again lol. |
We should hold a bit releasing ublue-os/bluefin#1954 (comment) Draft PR can be made though, to get us more ready. |
I'm still of the opinion that we should have a separate top-level |
I am also with @gmpinder in this one. It's both kind of confusing and having some typing-strict way to check if the repo is a COPR would be much better. Like, I think the best way would be to do something like this # (...)
repos:
- name: "myuser/chongus"
copr: true # or something dunno
- "other-regular-repo.repo"
- anotherone.repo
# (...) |
I thought about adding manipulation flag options to repos, like we have for I think that having distinct For
I think that distinct |
I'd be down with this. Especially if there are flows where you'd want to enable/disable repos. |
I added separate I'll add some manipulation options to |
So for the type: dnf
copr:
enable: # could also be 'add' since `dnf copr enable` is used for both adding and enabling
- some/repo
disable: # use `dnf copr disable $REPO`
- disabled/repo
remove: # use `dnf copr remove $REPO`
- removed/repo That way it matches what is available under the command.
|
As for the type: dnf
repos:
add: # uses `dnf config-manager addrepo`
- https://pkg.earthly.dev/earthly.repo
- https://cli.github.com/packages/rpm/gh-cli.repo
disable: # uses `dnf config-manager setopt "$REPO.enabled=false"`
- earthly-stable
remove: # uses `rm -f "$(dnf repo info --json $REPO | jq -cr '.[0].repo_file_path')"`
- google-cloud-cli
enable: # uses `dnf config-manager setopt "$REPO.enabled=true"`
- fedora-steam
install:
packages:
- earthly
- gh
- google-cloud-cli
- steam For the |
Another question would be, do we want to have removing/disabling of repos be done at the beginning of the script like with adding, or should we do it at the end so that you could:
I personally think it would be cleaner for the kind of flows I've seen to remove/disable after installation of packages so that you could keep all of that logic contained in a single module call. |
It seems repo management is one major pain point to discuss before the implementation of the module can be finished. Here are the features I would definitely like to support:
Here are the features that I am still unsure about:
Here are two solutions I can come up with right now: A: Magictype: dnf
clean-up-repos: true # whether to remove added repos after module call is done
repos: # these repos are added & enabled
- https://example.org/fedora-example.repo # starts with 'http(s)://', treated as URL
- custom/myrepo.repo # ends with '.repo', treated as local file
- username/myrepo # does not match previous, contains one '/', treated as COPR repo B: Straightforward (with nesting)type: dnf
repos:
clean-up: true
copr:
- username/myrepo
file:
- https://example.org/fedora-example.repo # starts with 'http(s)://', treated as URL
- custom/myrepo.repo # does not match previous, treated as local file B.1: All operationstype: dnf
repos:
copr:
- username/myrepo
- name: username/myrepo2
operation: remove B.2: All operationstype: dnf
repos:
copr:
add:
- user/myrepo
disable:
- user/myrepo2 |
Another idea type: dnf
packages:
- repo: fedora
install:
- micro
- repo: terra
install:
- prismlauncher
- repo: myuser/myrepo # COPR (same magic as described above or something ig)
install:
- custompackage1
- custompackage2
replace:
- kernel All repos are cleaned out by default after packages are installed. This feels like an intuitive separation to me, but also an opinionated restriction. |
A
dnf
module will eventually replace therpm-ostree
module. We should start investigating usage ofdnf5
on atomic Fedora systems to determine a reasonable timeline for development of such a module.https://fedoramagazine.org/whats-new-for-fedora-atomic-desktops-in-fedora-41/#first-step-towards-bootable-containers-dnf5-and-bootc
The text was updated successfully, but these errors were encountered: