Commit Graph

255 Commits

Author SHA1 Message Date
Panu Matilainen 071f5e91eb Consolidate the relocation goo into a source of its own
- This stuff doesn't belong in rpmfi, rpmte, psm or anywhere else either.
  Invent a new dark hole to shove it into...
- No functional changes as such, just shuffling things around.
2013-11-15 12:33:38 +02:00
Panu Matilainen 91cefc3c3f Separate the external plugin API to its own header
- rpmplugins.[ch] implements the rpm internal plugin management
  infrastructure, which is no business of anybody else. Mark the
  symbols internal while at it.
- rpmplugin.h describes the API for the actual plugins, this is
  to be made public once the API is considered stable enough (which
  it certainly is not yet ;)
- Adjust our plugins to include the right header
2013-04-03 11:42:04 +03:00
Panu Matilainen b5e3e1efee Eliminate built-in selinux support. RIP.
- We hereby unceremoniously declare that from now on, SELinux and
  other similar mechanisms are to live in plugins, rpm doesn't need
  to know about every possible security etc mechanism there might be.
  Its a big commit but as its really just removals...
- We need to disable sepolicy collection plugin for now as it relies on
  built-in support for selinux, this not only makes no sense but
  wont work now that there is no built-in support. The sepolicy
  plugin needs to be merged into the selinux base plugin now.
- Another "breakage" is that --rebuilddb no longer relabels the database,
  this needs plugins to called in a place where they currently cannot
  be called. This needs to be resolved before next actual release.
2013-03-21 13:56:33 +02:00
Panu Matilainen 4376985132 Lift dbiIndexSet manipulation out of rpmdb.c to its own unit
- At least initially we're likely to use dbiIndexSet as an unifying
  API between possible alternative backends, so this needs to
  be available outside rpmdb.c.
2013-03-19 08:43:11 +02:00
Panu Matilainen 7c8faacf0d Remove bundled mergesort() copy, use one from the system if available
- The mergesort() implementation we've carried all this time (even if
  not compiled in when glibc is used) is one with the nasty BSD
  advertisement clause, ugh. Better remove it late than never,
  but let systems having mergesort() in their system libraries
  (such as OSX) use it instead of qsort().
2013-03-19 08:25:14 +02:00
Panu Matilainen 2077b3dc54 Update library current + age (ie libs are now 3.1.0)
- We haven't removed or changed any interfaces in a way that would
  require full soname bump, only a handful of new interfaces have
  been added.
- There aren't actually any new interfaces in librpmbuild or librpmsign
  but for sanity and consistency's sake they're all updated...
2012-11-05 10:22:50 +02:00
Panu Matilainen f4758b1920 Export the indexed rpmds accessors internally
- Add an internal header for rpmds too to allow adding interfaces we
  dont necessarily want to export in the public API, make the indexed
  accessors available internally.
2012-10-05 10:07:52 +03:00
Panu Matilainen dd05fdd35f Dont bother building internal versions of db utilities we dont need
- rpmdb_dump, load, recover, verify, stat etc are useful at times,
  but these are not. This also fixes build with internal db for
  more recent versions of Berkeley DB.
2012-03-26 13:03:03 +03:00
Panu Matilainen ac5e6cd521 Bump library sonames in preparation for new release
- This is stupid... only librpm and librpmio actually need the bump due
  to ABI breakage, librpmbuild and librpmsign are unchanged and could
  use just a revision bump. But just incrementing the revision (or age)
  would set us on collision course with maintenance updates to 4.9.x.
  Then again its not like you can actually use librpmbuild or librpmsign
  without also linking to librpm(io) so from everything needs rebuilding
  anyway. This all also pretty much makes the whole libtool library
  versioning a bit moot. Bah.
2012-03-20 09:56:30 +02:00
Panu Matilainen f825911b73 Use pkg-config to find Lua + determine flags (ticket #88)
- Additionally clean up the logic a bit and dont bother building
  any lua-related bits if disabled
2011-03-28 12:54:42 +03:00
Panu Matilainen 805f7fd5af Move string hash function to librpmio and rename for namespacing
- There are places in rpmio and build that would benefit from hashing, but
  hashFunctionString() being internal to librpm has prevented that. Rename
  to rstrhash() to resemble the other foo in rpmstring.h for
  minimal namespacing as its now public function and update callers.
- Also mark the function as "pure" - it only looks at its arguments.
  This is one of the busiest functions in entire rpm so any optimization
  no matter how minor is well worth it.
- Hereby awarding hashFunctionString() with the grand prize for
  the Most Moved Around Function in rpm ;)
2011-03-10 10:17:39 +02:00
Panu Matilainen 2a54555aa2 Split user+group caching to separate source (again), rename
- We'll want to unify this and the similar caching done in librpmbuild,
  so we need to expose these in the ABI at least, rename to get
  them namespaced and use a separate source module (again) as
  this is a pretty distinct functionality.
- This would really belong to librpmio but leaving here for now...
2010-12-15 09:22:08 +02:00
Panu Matilainen ed950990c4 Bump library sonames
- Lots and lots of API changes, including what amounts to
  rewriting of librpmbuild external API... The only exception is
  librpmsign which is new and starts with 0
2010-12-03 14:09:09 +02:00
Panu Matilainen 638fb7ba84 Make our popt exec path more useful, permit environment override
- In 4.4.x days, we used to have bunch of helper binaries in /usr/lib/rpm
  executed through popt ping-pong, but there's nothing now that we'd
  want to execute through aliases. Instead use bindir for the
  default path, and additionally permit overriding through
  RPM_POPTEXEC_PATH environment variable (mostly probably useful for
  the testsuite)
2010-11-15 10:22:49 +02:00
Panu Matilainen 9f2c1bd909 Move librpmsign to its own subdirectory in the sources 2010-10-22 15:00:49 +03:00
Panu Matilainen 6d04be21eb And finally split the signing support into a separate library
- For a library with just one public function this might seem like
  a huge overkill but it permits cleanly separating dependencies:
  nothing but package signing requires GnuPG. This lets the signing
  support be stuffed into a separate package, avoiding having to
  drag gpg in on every installation (signing isn't something everybody
  does) and without having potentially broken interfaces in the API,
  essentially solving RhBug:624585.

  It also liberates signing to use libraries that might be off-limits
  for the core rpm, such as perhaps in the future doing signing
  by ourselves with the help of something like gpgme (which requires
  far too many things to drag into core rpm).
2010-09-29 12:12:58 +03:00
Panu Matilainen 45159a7060 Rename tagtbl.c -> tagtbl.C
- This isn't a regular source file: its not compiled as such but only
  included from tagname.c. Rename to disambiguate, and make it similar
  to rpmhash.[CH]
2010-09-21 14:47:46 +03:00
Panu Matilainen 9f68c7958f Rip IAM_RPMDB, ie --initdb, --rebuilddb etc modes out of rpmqv.c and librpm
- Add popt exec aliases to rpmdb for backwards compatibility
- Change test-suite to use 'rpmdb --initdb' instead of 'rpm --initdb'
  as popt exec aliases with absolute paths dont play very well
  with the test-suite, duh...
2010-09-03 17:13:10 +03:00
Panu Matilainen ed3860b8ef Split package signing out of rpmchecksig.c
- No functional changes, supposedly
2010-09-03 11:11:55 +03:00
Steve Lawrence 883f13c8b7 Update the plugin architecture to allow for remembering state
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.
2010-09-01 09:04:05 +03:00
Steve Lawrence 04bdec775a Add plugin calling support
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.
2010-06-22 11:12:43 +03:00
Panu Matilainen 90a37c2f5c Add a simple API for dealing with chroot state changes
- Chroot is a process global state so it needs to be tracked globally.
  A process can (in theory) have several transaction sets, each with
  different roots (although only one can be active at any time), so
  associating the chroot state with transaction set (as currently done)
  is not right.
- "Reference count" chroot entering and exiting so callers dont need
  to track the state changes individually when they need to go
  in and out of chroot if not already done.
- This should probably go to librpmio eventually but as there are no
  needs outside librpm currently, keeping this internal so we're free
  to fiddle with the api if necessary
2010-05-31 13:35:54 +03:00
Panu Matilainen 0e04c09d48 Move the lone hashFunctionString() into misc.[ch], eliminate rpmhash.[ch]
- Besides there not being much point in having a separate source + header
  for a small single function, this fixes build on case-insensitive
  systems such as Mac OS X.
2010-05-21 15:36:03 +03:00
Michael Schroeder dfa98e7a06 Adapt the Makefile as rpmdb_svc can no longer be built. 2010-04-12 12:11:56 +02:00
Panu Matilainen f30e6d409a Split dbiIndex out of rpmdb_internal.h into header of its own
- the dbi presents an internal api of its own, and deserves a separate
  header (baby steps to making dbiIndex opaque outside the backend)
- move dbiVerify() to the backend where it belongs
- mark all the dbiFoo() functions as internal
2010-04-01 11:13:37 +03:00
Panu Matilainen 7289fadea3 Move the little thats left of psm.h into rpmte_internal.h
- no functional changes, just shuffling declares around
2010-03-29 18:40:29 +03:00
Panu Matilainen 37ed237fbe Split rpm problem type + its "methods" to separate source + header
- rpmps is just something that stores rpm problems, problems themselves
  are individual and opaque "objects", deserving their own module
2010-03-25 16:46:39 +02:00
Panu Matilainen af659c87ce Eliminate rpmgi from public API & ABI 2010-03-19 19:15:44 +02:00
Panu Matilainen d221895352 Split file state structures + routines out of rpmte to separate sources
- no functional changes
2010-03-12 08:33:49 +02:00
Panu Matilainen 98fcb7566d First rough-cut version of scriptlet abstraction
- Split the low-level scriptlet machinery out of psm
- New struct to hold the necessary information about scriptlets so
  we can execute them without having a header at hand.
- Trigger handling is hackish and needs more love...
2010-02-25 10:58:51 +02:00
Florian Festi 51c96db046 Kill RPMTAG_FSNAMES and RPMTAG_FSSIZES and everything implementing them 2010-02-03 16:27:00 +01:00
Panu Matilainen 7e684c5630 Lose the now empty header_internal.c source 2009-12-22 12:34:19 +02:00
Panu Matilainen bb9878ed30 Rename hdrNVR.c to more obvious and generic headerutil.c
- no functional changes
- remove it from translation list, there's nothing here to translate...
2009-12-22 12:07:12 +02:00
Florian Festi e2c217b4b7 Remove support for sqlite based rpm database
Also remove abstraction layer between rpmdb.h and the back end
in lib/backend/
2009-12-07 15:59:13 +01:00
Panu Matilainen 7a2395941e Bump soname for all our libraries
- while the "really public" API of librpmio has only been enhanced,
  librpm and librpmbuild use some supposedly internal bits which *have*
  changed considerably, so just to prevent anybody thinking they can
  combine librpmio from rpm 4.7 and librpm from this...
- librpmbuild hasn't seen much real change but some (unfortunately)
  exposed struct members have changed so...
- librpm is mostly compatible but as rpmal has become internal API,
  we need to bump (annoyingly, as nothing actually uses rpmal ... sigh)
2009-12-07 13:35:53 +02:00
Panu Matilainen 8d79668a13 Fix out of source directory build (ticket #65) 2009-06-12 08:52:38 +03:00
Panu Matilainen 57884ba0d3 Split ordering code to separate source file 2009-06-10 17:19:27 +03:00
Panu Matilainen 26ac9b3d94 Make rpmal header & all internal
- rpmal is hardly useful outside rpm itself, avoid exporting stuff
  unnecessarily
2009-04-03 13:07:42 +03:00
Panu Matilainen d65c178785 Push signature verification down to librpmio
- new pgpVerifySig() call to perform the lowlevel verify, use for
  verifying DSA/RSA signatures
- librpm is now free of NSS specifics (apart from what still leaks through
  including rpmio/digest.h), remove linkage
2009-03-25 15:16:59 +02:00
Panu Matilainen caf759f8ca Switch to libtool versioning, starting at 0:0:0 2009-02-26 16:09:51 +02:00
Panu Matilainen 6be1bdf125 Add librpm level lua extension stub
- inspired by rpm5.org, details differ
- just rpm.vercmp() for now
- push all Lua initialization to rpmLuaInit()
2009-01-14 15:09:25 +02:00
Panu Matilainen 4e4a7a2d8c Add rpmhash.[CH] to EXTRA_DIST so they get included in tarballs 2008-11-25 18:06:31 +02:00
Panu Matilainen a0d1153085 Remove -DRPMCONFIG from CPPFLAGS where unnecessary 2008-11-22 18:10:10 +02:00
Panu Matilainen 43b08986a8 Use rpmConfigDir() for finding our popt alias file
- this allows popt aliases to be reliably available in tests
- why do we have the popt initialization done twice?
2008-11-22 18:08:40 +02:00
Panu Matilainen f4b5bd55db Beginnings of acl (POSIX.1e draft 17) verification support
- if built with --with-acl, check that files and directories don't have
  any extra acl's set
- for now, any acl beyond the regular unix permission set is reported as
  file mode difference as the acl's cannot have been set by rpm itself
- patch from Andreas Gruenbacher, modified to use libacl instead of raw
  xattrs for portability, BUT atm this uses non-portable acl_equiv_mode()
  Linux libacl extension, the posix draft doesn't seem to have much in
  the way of comparing entries :-/
2008-10-26 14:18:17 +02:00
Panu Matilainen 770a0f34c9 Beginnings of file capability (POSIX.1e draft 15) verification support
- add minimal bits and pieces to check for capabilities in files on verify
- for now, any capability set is a verification failure as the capability
  cannot have been set by rpm itself
- patch from Andreas Gruenbacher, modified to use libcap instead of raw
  xattrs for portability
2008-10-26 14:17:16 +02:00
Panu Matilainen 504e8231cb Yank out legacy.h, make the conversion functions static 2008-10-10 15:59:38 +03:00
Panu Matilainen d1ad87a7f8 Eliminate rpmTagTable internals from API/ABI completely
- everything is now accessible through other methods, no need to expose
  our internals
- tagtbl.c is now included from tagname.c instead and not separately built
2008-05-21 17:59:05 +03:00
Panu Matilainen 7d38c6e2d8 Split tag extensions out of formats.c
- they have practically nothing in common now..
2008-05-21 12:04:51 +03:00
Panu Matilainen a83cfce188 New "tag data" container struct + some basic methods to deal with it
- to be used for passing around header and extension data
- inspired by similar changes in rpm5.org, details and implementation differ
2008-05-13 11:02:45 +03:00