Skip to content
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

DNF config-manager Plugin #405

Closed
3 tasks done
Tracked by #389
j-mracek opened this issue Mar 28, 2023 · 15 comments · Fixed by #907, #875 or #877
Closed
3 tasks done
Tracked by #389

DNF config-manager Plugin #405

j-mracek opened this issue Mar 28, 2023 · 15 comments · Fixed by #907, #875 or #877
Assignees
Labels
epic Priority: HIGH RFE Request For Enhancement (as opposed to a bug) Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take
Milestone

Comments

@j-mracek
Copy link
Contributor

j-mracek commented Mar 28, 2023

Documentation if dnf4 command - https://dnf-plugins-core.readthedocs.io/en/latest/config_manager.html

I am proposing to not keep DNF4 compatibility, because the syntax was not the best one and we also have new requirements due to support of drop-in directories for configuration.

Additional inspiration for handling of drop-in configuration:
rpm-software-management/libdnf#1387
rpm-software-management/dnf#1414

@ptoscano
Copy link

* [ ]  Investigate options how to implement configuration overrides for repositories

* Implement mechanism to synchronize dnf and subscription-manager

I started a separate discussion about this, i.e. #422.

@inknos
Copy link
Collaborator

inknos commented Jun 20, 2023

Issues reported by the lack of config-manager plugin here https://bodhi.fedoraproject.org/updates/FEDORA-2023-69dfac15db#comment-3063374

@msrb
Copy link

msrb commented Jul 2, 2023

Fedora CI relies on the config-manager plugin as well:

Unknown argument "config-manager" for command "dnf5". Add "--help" for more information about the arguments.

@juhp
Copy link

juhp commented Jul 3, 2023

Currently I use dnf-3 config-manager as a workaround in the meantime.

@j-mracek j-mracek moved this from Backlog to Todo in DNF team Jul 17, 2023
@msrb
Copy link

msrb commented Jul 27, 2023

Thanks!

Is dnf-3 config-manager something we can expect to exist in Fedora 40+ (and later CentOS Stream, etc)? Or is it just a temporary workaround that might go away in the not so distant future?

@Andrei-Stepanov
Copy link

@j-mracek hello, could you please help us,

Configuration of repositories could be handled by a different command that for main repositories (under repo command)

I checked this command. It cannot modify the repo: enable/disable. This command can only show info.

Automation is very important. Could you please give any ideas on how we can enable disable repos in an automated way (from bash script)?

Thank you in advance.

@AdamWill
Copy link
Contributor

@Andrei-Stepanov it's not very pretty, but this is how I'm doing it in openQA:

sed -i -e "s,enabled=1,enabled=0,g" /etc/yum.repos.d/fedora-updates-testing.repo

replace with the appropriate repo file, of course.

@j-mracek
Copy link
Contributor Author

Thank you @AdamWill for a workaround.

@praiskup
Copy link
Member

Seems like closed by mistake; shouldn't #907 close this one?

@j-mracek
Copy link
Contributor Author

Thank you for notes

@j-mracek j-mracek reopened this Oct 10, 2023
@github-project-automation github-project-automation bot moved this from Done to Todo in DNF team Oct 10, 2023
@j-mracek j-mracek added the RFE Request For Enhancement (as opposed to a bug) label Oct 16, 2023
@jrohel jrohel moved this from Todo to In Progress in DNF team Oct 17, 2023
@mcurlej mcurlej added the epic label Nov 3, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in DNF team Nov 13, 2023
@bschaatsbergen
Copy link

Hey @jan-kolarik,

It looks like some Fedora docs are still referencing the old --add-repo method for dnf config-manager. Since DNF5 broke backward compatibility and introduced addrepo, this pull request updates the Fedora documentation: https://pagure.io/fedora-docs/quick-docs/pull-request/783.

Is this something you're able to look at? Thanks!

@jan-kolarik
Copy link
Member

Hey @jan-kolarik,

It looks like some Fedora docs are still referencing the old --add-repo method for dnf config-manager. Since DNF5 broke backward compatibility and introduced addrepo, this pull request updates the Fedora documentation: https://pagure.io/fedora-docs/quick-docs/pull-request/783.

Is this something you're able to look at? Thanks!

Hi @bschaatsbergen,

Thanks for creating the PR! Unfortunately, I don’t have permissions in the fedora-docs repository, but I’ve added an approving comment there.

Your request is similar to an existing ticket (#1840), and we're exploring options for adding backwards-compatibility support for config-manager, though this may be challenging with the new dnf5 implementation of the argument parser which is designed to be stricter and less ambiguous.

@bschaatsbergen
Copy link

Hey @jan-kolarik,

Thanks for the update and for adding the approving comment! I’ll keep an eye on further progress.

@Saarsk
Copy link

Saarsk commented Dec 4, 2024

I am proposing to not keep DNF4 compatibility, because the syntax was not the best one and we also have new requirements due to support of drop-in directories for configuration.

I guess that's fine, but I don't think this should prevent fixing the following problems:

  • Non-descriptive and unhelpful output when inputting commands/instructions written pre-DNF5
  • Command not being performed despite being available via dnf-3,
    dnf4 or even dnf (DNF5). See below.

A specific example:

A user follows instructions for installing Brave Browser which references --add-repo. This kind of stuff is inevitable to happen to users. The output with DNF5 is Unknown argument "--add-repo" for command "config-manager". Add "--help" for more information about the arguments..

Proposed solution of problem 1:

A better output would be to actually explain why it doesn't work. 🙂 It's reasonable for the user to expect it to work, especially when the dnf command is the same (which it also should be).

Proposed solution of problem 2:

Since it functionally does allegedly work can there be an alias put in place so that the many instructions that continues to exist can also continue to work and not become broken? Of course, along with a message like Note: This is an outdated command option and implemention. It should be updated to comply with DNF5 specifications. Consider notifying the developer if this was part of the official instructions or documentation.. The information also informs users that the provided instructions are outdated and should be updated (which may prompt them to relay this information to who(m)ever it may regard.


This thread on fedoraprojects.org claims that DNF5 lack the functionality so dnf-3 has to be used with a modified command.

This thread suggests that it does indeed work on DNF5 (with a modified command). The use of dnf4 is also mentioned as a solution, which makes this all the more confusing, with the multiple solutions and conflicting information.

If using dnf-3 or dnf4 (I have no idea which is better or worse) can cause issues when DNF5 is deployed, at least there should be a helpful output instead of "there was a problem". 🙂 And if it does work in DNF5, an alias or command translation would be very helpful and beneficial.


Additional context to why this is arguably important:
From time to time I'm sending commands or links to instructions to friends and family that are in a different country (even over the phone). Issues like this would most certainly be a considerable source of frustration and could unfortunately reflect poorly on the distribution or Linux (from a user's perspective, such problems can (and will) be associated with the OS). I became aware of the issue now trying to install the browser on a new system and it was not clear what was the issue and trying to figure out the best solution, free from caveats, wasn't easy. I'm still not sure which of the many suggested solutions is the best one. Especially since the mixing of DNF5 and older implementations (dnf-3, dnf4 etc.) have been adviced against for various reasons like ownership and potential inability to properly manage updates, apps and dependencies.

@bschaatsbergen
Copy link

bschaatsbergen commented Dec 9, 2024

I’ve updated the Fedora quick docs to include both DNF4 and DNF5. See https://docs.fedoraproject.org/en-US/quick-docs/adding-or-removing-software-repositories-in-fedora/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic Priority: HIGH RFE Request For Enhancement (as opposed to a bug) Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take
Projects
Archived in project