Age | Commit message (Collapse) | Author | Files | Lines |
|
Suspend exclusive database lock when scriptlets get called, allowing
read access in scriptlets. Only needed for DB_PRIVATE (aka global)
locking.
|
|
- In the package/transaction related things the strpool is more of
an internal implementation detail than an end-goal in itself, move
string pool related interfaces of rpmts, rpmfi and rpmds to
internal-only APIs for now. The kind interfaces we'll want to eventually
export a) dont exist yet and b) are likely to be something very different.
- The string pool itself remains exported however, its a handy data
structure for all sorts of things and both librpm and librpmbuild
heavily use it already.
|
|
- Add a pool pointer to to ts members struct and a getter function
- Grab the global pool for rpmte dependency- and file info creation,
if its NULL then the sets will use private pools of their own.
- Add the (currently) required magic voodoo rain-dance to freeze and
unfreeze the pool as necessary wrt new element additions: for
current rpmal and fingerprinting to work, the string pointers
must be immovable.
- This is infrastructure only: nothing creates the global pool yet,
so everything is still using private pools.
|
|
- The sepolicy plugin needs them so the symbols can't be hidden, but
these are not something external API-users should be messing with.
- Ultimately we'll want to push the actual labeling from FSM to
the plugin, insulating rpm from all SELinux specifics, this is
just a band-aid temporary "solution" to keep this out of the API.
|
|
- With all this unused junk gone from the bitfield, we suddenly
have plenty of bits to play with...
- Preserving the symbols, just defined to 0, to avoid unnecessarily
breaking compilation of stuff that refers to the old
unused/unimplemented flags
|
|
|
|
- Only thing ever using RPMTRANS_FLAG_ADDINDEPS and _NOSUGGEST was
rpm itself, and we haven't had an in-rpm implementation for this
since the broken "rpmdb as repo format" was ripped out in 4.6.0.
We dont need these special flags to support the operation anyway,
IF somebody sets the solve callback, it will be used and the one
implementing the callback gets to deal with whether those bits
should be added to transaction or not.
|
|
- This was beginnings of something ten years ago, and that something
was long since abandoned. These never did anything useful
that --justdb/--noscripts wouldn't do.
|
|
- The actual indexes are rpmDbiTags, and the tag passed to
rpmtsInitIterator() and rpmdbInitIterator() always refers to a
database index, not arbitrary header tag. The tag passed to
rpmdbSetIteratorRE() however /does/ refer to a header tag. This rather
important distinction can actually be expressed in the API.
- As the indexes are generated from header tags of the same value,
most of these need to use the TagVal types instead of actual enums
to avoid mismatches - the value is what counts, not it being an enum.
- Several places still have variables misleadingly named "rpmtag" when
they refer to dbi tags, but leaving them for now to avoid excessive
changes at once.
|
|
- Transaction elements can only be of one type (hence the enum),
but the transaction set iteration permits selecting more than
one. Add a new typedef dummy for this purpose only.
|
|
- Enums are fine for defining the bitfield flags, but the bitfield
itself is not an enumeration. Add a separate typedef on "rpmFlags"
type (presenting a bitfield of flags) for all of these. Compilers
hardly care, but the typedefs give a nice visual clue for
us humans using these flags far away from ho^H^H definitions.
|
|
- These are internal helpers only, all refcount users need to use
fooFree() or similar for correct operation. Add fwd declarations
where necessary to avoid moving code around unnecessarily.
- We could add these back later as aliases to fooFree() but for now,
just get them out of the way.
|
|
- Avoids callers having to separately test for number of problems
and freeing when no problems exist
|
|
|
|
This replaces the old matchpathcon interfaces with the new selabel
interfaces for relabeling files, storing an selabel handle in the
transaction set.
With this change, also comes an added distinction between --nocontexts
being specified and a failure to read the load file contexts.
Previously, there was no distinction, and both cases used the
RPMTRANS_FLAG_NOCONTEXTS flag.
However, with the new policy plugin, it is necessary to make such a
distinction. This is because matchpathcon_init (now selabel interfaces)
can fail at the beginning of the transaction, but succeed later after
new policy is installed. Because of this, we may need to enable/disable
RPMTRANS_FLAG_NOCONTEXTS multiple times. However, because this flag
could also mean --nocontexts, we cannot do that. By storing the selabel
handle in the rpmts, we can easily keep track if the handle has been
successfully created, rather than overloading RPMTRANS_FLAG_NOCONTEXTS
with two meanings.
|
|
This moves most of the plugin logic to a new rpmplugins file with a
struct and functions for managing plugins, allowing for plugins to carry
state. This also adds init and cleanup hooks for plugins to initialize
and cleanup their state, and a new 'open te' hook allowing plugins to
read and save information from transaction elements.
This also generalizes the plugin architecture a bit so it isn't so
specific to collections.
|
|
- it never was anything more than a cached value of is_selinux_enabled()
and caching this fairly expensive result is no longer needed as
scriptlet execution wrt selinux contexts is now conditionalized on
RPMTRANS_FLAG_NOCONTEXTS instead
|
|
This patch adds a simple plugin system that makes simple problems easy to
solve, and difficult problems, such as SELinux, possible.
When the transaction gets to the point where a collection action should occur,
it expands a macro of the form %__collection_<collection name> to get the path
to a plugin and any additional options. The plugin is dlopen'ed, and the
appropriate function is called in the plugin, with the additional arguments
passed in.
This also adds a --nocollections option to disable performing Collection
actions.
|
|
|
|
- This mechanism has never been used by anything at all, which suggests
its not a particularly useful feature
- Removing unused rpmpsTrim() from rpmps
- Marking okProbs parameter of rpmtsRun() function as unused to avoid
unnecessary breakage
|
|
- get the debug messages out of API, this is what should've been in commit
dbdbe8010cd944f026a5a4e5d071eb31d29d81c4 - just wtf have I been thinking?
- also tolerate NULL passed to rpmtsLink() and rpmtsUnlink()
|
|
- unused in rpm since 4.6.0, and even before that this wasn't really useful
outside rpm internals
|
|
- make rpmtsi_s really opaque, move rpmtsi typedef to rpmtypes.h
along with all the other commonly used types
|
|
|
|
- The DSI stuff runs from deep inside rpmtsRun() with no chance for
API users to do anything with it. Bury into transaction.c and
make static to let us change the way it works without API constraints...
|
|
- trying to remove non-installed header counts as an error
|
|
- trivially implemented in python by iterating over transaction element
keys, we dont need no stinking extra librpm APIs for this
|
|
- not strictly needed as it gets its default from a macro but .. shrug
|
|
- it was only "used" for the ldconfig optimization and actually been
completely broken since the ordering rewrite
|
|
- add %verify(nofiledigest) as %verify(nomd5) file attribute alias
- reference digests as digests not checksums
- make old md5 related symbols obsolete and use newer reference
- update man page accordingly
|
|
|
|
- not needed anymore, use -1 to mean "unused" and document dboffset
to rpmtsAddEraseElement() as unused
|
|
including fpsCompare and the fpsdebug opt
|
|
- nobody has used the solvedb for anything in years
- the mechanism + rpmcache are horribly broken on multilib
- solvedb is way too heavyweight to be really usable as a general mechanism
- solver callback hook left in place as that could in theory be usable still
- we need something better to replace this all, getting rid of it now
so we're not stuck with the API forever
|
|
- long since deprecated and nothing uses it, might as well go
|
|
- add extra parameter to rpmtsGetKeyring() to automatically load up default
keyring if not already set
- rpmtsSetKeyring() with NULL keyring just frees up current keyring
- adjust callers wrt the change
- allows more transparent action for various "legacy" code-paths
|
|
|
|
- semantics of exactly when and how this is permitted needs more thought...
|
|
- pass the pgp container around as argument as needed
- eliminate the related API from rpmts
|
|
- pass signature tag data around as argument to rpmVerifySignature() as
needed
- eliminate the related API from rpmts
|
|
|
|
|
|
- ought to be safe as data is only ever automatically converted to larger
type on notify calls
|
|
- only regular paths starting with / permitted
- change prototype to permit return codes
|
|
|
|
The two main classes of rollback/repackage need are
1) Gimme back the previous version, this broke XYZ on my system.
This is better handled by downgrading to the previous version of original
package instead of repackaged garbage. We should maintain real package
(version) history somewhere.
2) Upgrade messed up my configuration.
Instead of repackaging everything we could be far more intelligent
wrt config files, stick them into real version control or at least have
hooks to do so.
RPMCALLBACK_REPACKAGE_* and RPMTRANS_FLAG_REPACKAGE definitions left around
to avoid needlessly breaking everybodys callbacks (for now)
|
|
- doing this reliably from rpm is simply not possible as there's no way
to undo script actions, might as well not pretend we can
- for a feature that's not generally usable it complicates mainline code
way too much
|
|
- cast away a few cases where the enum usage causes ridiculous amount
of compiler warnings from unhandled switch-cases
|
|
|
|
- RPM_MASK_TYPE is not a datatype, move it out of the enum
- add missing cases python header handling to shut up gcc
|