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

Sharing root cache with users #1051

Merged
merged 4 commits into from
Dec 7, 2023
Merged

Conversation

jan-kolarik
Copy link
Member

@jan-kolarik jan-kolarik commented Nov 28, 2023

When preparing repositories within repo_sack, check for empty or invalid repository metadata. If either condition is met, attempt to clone the root metadata cache, if available.

Solver cache files use the mkstemp method and are only readable by the owner. Read attributes have been added to these files.

The packages cache is ignored. It is expected that superuser privileges will be required for any command manipulating packages on the system (see #849 or #337).

Additional notes:

  • Copy-on-write functionality is automatically utilized by the filesystem when a copy operation is performed on a filesystem that supports it, such as Btrfs (the default in Fedora).
  • For repodata, the default cache location is /var/cache, where read permissions are granted to non-owners. However, if a custom directory is specified without read permissions, they are not currently applied to the files. This can be addressed similarly to how it has been implemented for solv files in this PR (see also #789).

CI tests: rpm-software-management/ci-dnf-stack#1414.
Closes #1000.

@jan-kolarik
Copy link
Member Author

jan-kolarik commented Nov 28, 2023

CI tests to be delivered before merging. ✔️

libdnf5/base/base.cpp Outdated Show resolved Hide resolved
include/libdnf5/repo/repo.hpp Show resolved Hide resolved
libdnf5/repo/repo.cpp Show resolved Hide resolved
@kontura
Copy link
Contributor

kontura commented Dec 6, 2023

Also it seems a rebase is needed.

@jan-kolarik jan-kolarik force-pushed the jkolarik/sharing-root-cache-with-users branch from 1175664 to 07b034e Compare December 6, 2023 13:38
Copy link
Contributor

@kontura kontura left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.
Thank you!

@kontura kontura added this pull request to the merge queue Dec 7, 2023
Merged via the queue into main with commit d314c5b Dec 7, 2023
10 of 14 checks passed
@kontura kontura deleted the jkolarik/sharing-root-cache-with-users branch December 7, 2023 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Sharing root cache with users
2 participants