Commit Graph

248 Commits

Author SHA1 Message Date
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
Panu Matilainen 05b70ba53c Split header sprintf formatting to separate source
- header.c is now just low level header handling, headerfmt.c is the
  formatting engine and formats.c has the actual formats
- also move bunch of formatting-related stuff from header_internal.h to
  headerfmt.c, nothing else needs it
2008-05-12 15:52:29 +03:00
Panu Matilainen 90e10708f8 Fixup paths and Makefiles for rpmdb/ elimination 2008-05-12 12:28:12 +03:00
Panu Matilainen 962c7b49d2 Rip old, bit-rotten librpm test programs 2008-05-12 10:45:33 +03:00
Panu Matilainen d07bcfece1 Bump up sonames, we're not exactly ABI compatible with 4.4 anymore.. 2008-03-18 10:28:57 +02:00
Panu Matilainen db37b74a2b Nuke leftover rollback test program, update translations 2008-03-17 14:27:03 +02:00
Panu Matilainen 37543ee040 Remove rollback support
- not possible to do reliably within rpm
- effort is better wasted on investigating fs-level snapshots, which
  is way beyond rpm scope except for hooks to interact with the snapshot
  mechanism to communicate beginning/end of transaction and such
2008-03-17 11:53:27 +02:00
Panu Matilainen ed78cef2c3 Remove support for automatic rollback on failure
- 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
2008-03-17 12:04:39 +02:00