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

RFE: allow listing protected packages under /usr #1107

Closed
keszybz opened this issue Dec 17, 2023 · 4 comments · Fixed by #1110
Closed

RFE: allow listing protected packages under /usr #1107

keszybz opened this issue Dec 17, 2023 · 4 comments · Fixed by #1110
Assignees
Labels
Priority: MEDIUM Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take

Comments

@keszybz
Copy link

keszybz commented Dec 17, 2023

Support for config under /usr was added in a bunch of places (#813, #820, #882), but config_main.cpp has:

protected_packages{resolve_globs("dnf5 glob:/etc/dnf/protected.d/*.conf")};
@j-mracek
Copy link
Contributor

The protected_packages is a configuration option, therefore you can use standard configuration overrides. The problem is that this option is not append. What about to change the option to an append and then use standard configuration overrides in usr to extend the list of protected packages?

[main]
protected_packages = <my_new_protected_package>

@keszybz
Copy link
Author

keszybz commented Dec 18, 2023

The protected_packages is a configuration option, therefore you can use standard configuration overrides. The problem is that this option is not append. What about to change the option to an append and then use standard configuration overrides in usr to extend the list of protected packages?

[main]
protected_packages = <my_new_protected_package>

Yeah, this would work. We'd need to update various packages to install a file with two lines instead of just one, but that's a very simple change to make. But we'd get the file move and easier overrides essentially for free.

@j-mracek
Copy link
Contributor

I discovered an interesting thing. Protected packages setting is taken always from root system. Somehow I consider it as a not correct behavior, but I understand that it would be difficult to modify the behavior or change the workflow.

j-mracek added a commit to j-mracek/dnf5 that referenced this issue Dec 18, 2023
It will allow to use configuration overrides from /usr for protected
packages.

Resolves: rpm-software-management#1107
@github-project-automation github-project-automation bot moved this to Backlog in DNF team Dec 19, 2023
@jan-kolarik jan-kolarik moved this from Backlog to In Progress in DNF team Dec 19, 2023
@jan-kolarik jan-kolarik added Priority: MEDIUM Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take labels Dec 19, 2023
j-mracek added a commit to j-mracek/dnf5 that referenced this issue Jan 8, 2024
It will allow to use configuration overrides from /usr for protected
packages.

Resolves: rpm-software-management#1107
@j-mracek
Copy link
Contributor

j-mracek commented Jan 8, 2024

I have a good news. The patch (#1110) is ready for testing.

@j-mracek j-mracek self-assigned this Jan 8, 2024
github-merge-queue bot pushed a commit that referenced this issue Jan 18, 2024
It will allow to use configuration overrides from /usr for protected
packages.

Resolves: #1107
@github-project-automation github-project-automation bot moved this from In Progress to Done in DNF team Jan 18, 2024
yuwata pushed a commit to yuwata/systemd-fedora that referenced this issue Oct 14, 2024
uapi-group/specifications#76

Actually, add a new file under /usr, but keep the old file in /etc
because it's still needed for dnf. The new file in the new location
is useful because it means that we get the correct behaviour even when
/etc is emptied (on systems with new dnf version).

dnf5 reads the new location:
rpm-software-management/dnf5#1107
rpm-software-management/dnf5#1110
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: MEDIUM Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants