[Rpm-maint] [rpm-software-management/rpm] RPM with Copy on Write (PR #2378)
Richard Phibel
notifications at github.com
Wed Feb 1 10:18:58 UTC 2023
# Description
This is a refactoring of PR [#1470](https://github.com/rpm-software-management/rpm/pull/1470).
The RPM CoW plugin is refactored to register as owner of payloads transcoded by `rpm2extents` as suggested in comment [#2057](https://github.com/rpm-software-management/rpm/discussions/2057#discussioncomment-2897701).
# How it works
I defined 2 new fields of type `rpmPlugin` (with associated getters and setters) in `rpmte` structure:
- [`customArchiveReader`](https://github.com/rphibel/rpm/blob/8de078508954e005ba0c974389979070cfe9431d/lib/rpmte.c#L85)
- [`customFileInstaller`](https://github.com/rphibel/rpm/blob/8de078508954e005ba0c974389979070cfe9431d/lib/rpmte.c#L86)
When a plugin wants to register as an archive reader for a package, it sets the field `customArchiveReader` in the [`psm_pre` ](https://github.com/rphibel/rpm/blob/8de078508954e005ba0c974389979070cfe9431d/plugins/reflink.c#L165)stage.
Similarly, if it wants to register as a file installer it sets the `customFileInstaller` field.
Then in [`fsm.c`](https://github.com/rphibel/rpm/blob/8de078508954e005ba0c974389979070cfe9431d/lib/fsm.c#L849), if these fields are set, archive reading, file installation is deferred to the plugin.
You can view, comment on, or merge this pull request online at:
https://github.com/rpm-software-management/rpm/pull/2378
-- Commit Summary --
* RPM with Copy on Write
* RPM with Copy on Write
* RPM CoW: use registration model for plugin
-- File Changes --
M CMakeLists.txt (5)
M build/pack.c (2)
M include/rpm/rpmcli.h (10)
M include/rpm/rpmlib.h (9)
M include/rpm/rpmpgp.h (9)
M include/rpm/rpmte.h (30)
M include/rpm/rpmtypes.h (3)
M lib/CMakeLists.txt (1)
M lib/fsm.c (138)
M lib/package.c (36)
M lib/rpmchecksig.c (116)
A lib/rpmextents.c (110)
A lib/rpmextents_internal.h (58)
M lib/rpmlead.c (43)
M lib/rpmlead.h (37)
M lib/rpmplugin.h (9)
M lib/rpmplugins.c (50)
M lib/rpmplugins.h (18)
M lib/rpmte.c (31)
M lib/transaction.c (29)
M macros.in (1)
M plugins/CMakeLists.txt (1)
A plugins/reflink.c (402)
A rpm2extents.c (701)
M rpmio/rpmpgp.c (10)
M rpmio/rpmpgp_internal.c (18)
M rpmio/rpmpgpval.h (18)
M scripts/CMakeLists.txt (1)
A scripts/rpm2extents_dump (94)
M sign/rpmgensig.c (2)
M tests/CMakeLists.txt (1)
M tests/atlocal.in (22)
A tests/rpm2extents.at (151)
M tests/rpmtests.at (1)
-- Patch Links --
https://github.com/rpm-software-management/rpm/pull/2378.patch
https://github.com/rpm-software-management/rpm/pull/2378.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2378
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/2378 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20230201/f7602d4e/attachment-0001.html>
More information about the Rpm-maint
mailing list