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

plugins: extend API to allow file install #3466

Closed

Conversation

teknoraver
Copy link
Contributor

Extend the plugin API with two new methods:

  • plugin_fsm_file_install_func
  • plugin_fsm_file_archive_reader_func

The first one allows a plugin to take care of the file install, the second instead allows a plugin to handle the archive read.

This is used in the "reflink" plugin which uses CoW to extract archives

@teknoraver teknoraver requested a review from a team as a code owner November 22, 2024 15:30
@teknoraver teknoraver requested review from pmatilai and removed request for a team November 22, 2024 15:30
Extend the plugin API with two new methods:
- plugin_fsm_file_install_func
- plugin_fsm_file_archive_reader_func

The first one allows a plugin to take care of the file install,
the second instead allows a plugin to handle the archive read.
@pmatilai
Copy link
Member

I've said this before, and I'm not going to repeat it all here: while I'm open to having these type of hooks added, RPMRC_PLUGIN_CONTENTS is not going to fly, this needs a different kind of API. See the discussion in and around #2416. The other conclusion was that to go forward, this will likely need a user that is not rpmextents, simply as a sanity reference. We're not interested in adding a hook that is only useful for one extremely specific use-case.

With the plugin API public now, we have an extra complication to deal with: the way things are, any change to that struct requires a soname bump. We will NOT bump the soname for 6.0 to lower the bar to entry, so the earliest opportunity for that is in 6.1.

@pmatilai pmatilai closed this Nov 27, 2024
@teknoraver
Copy link
Contributor Author

@pmatilai I went through the comments.
Let's say I kill rpm2extents, and replace with another tool which reads the package from stdin, creates a directory like /var/cache/rpm/objects, and extracts every file with its hash as name.
Then, save the metadata somewhere in a sort of db, and the install will be just reflink (or copy) from the objects directory to the final path.

That will be acceptable as a solution?

@teknoraver teknoraver deleted the plugin_content branch December 11, 2024 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants