Commit Graph

24 Commits

Author SHA1 Message Date
Panu Matilainen d10b403011 Make rpmplugins.h private for now
- We'll probably want to make some changes to the plugin type system
  before considered "ready", the current plugin slots are limited
  to 32 and Meego folks apparently want to use a largish number
  of slots. So we might want something like separate plugin type
  (collection, security... etc) and then have 32 slots per each type.
  Making this private for now to avoid having to potentially break
  the API shortly after introduction.
2010-12-22 13:11:40 +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
Steve Lawrence 383e275648 Add new %sepolicy section to the spec file format
The %sepolicy section is used to describe SELinux policy to be included
in a package. It's syntax is similar to other sections (%files, %pre,
%post, etc.) in that you can provide a string and -n after the
declaration to specify policy should be added to a subpackage.

For example:

%sepolicy
 # policy in this section will be added to the main package

%sepolicy foo
 # policy in this section will be added to the '<mainpackage>-foo' subpackage

%sepolicy -n bar
 # policy in this section will be added to the 'bar' subpackage

The %sepolicy section contains zero or more %semodule directives, with the
following format:

%semodule [OPTIONS] path/to/module.pp

The available options are:

-b, --base
	The module is a base module

-n, --name=NAME
	The name of the module. If not given, assumes the name is the basename of
	the module file with file extensions removed.

-t, --types=TYPES
	One or more comma-separated strings specifying which policy types the
	module can work with. To explicitly state that a module can work with any
	policy type, "default" can be specified as the value. If not specified,
	assumes the module can work with any policy type, and assigns the types as
	"default".

Below is an example of this new format:

  %sepolicy
  %semodule -n foo -t mls policy/foo.pp
  %semodule -n bar -t strict,targeted,mls -b policy/bar.pp

This also adds new header tags to store the new information:
 RPMTAG_POLICYNAMES        (string array)
 RPMTAG_POLICYTYPES        (string array)
 RPMTAG_POLICYTYPESINDEXES (uint32 array)
 RPMTAG_POLICYFLAGS        (uint32 array)

The index of NAMES and FLAGS maps directly to the index of RPMTAG_POLICIES.
However, because a single policy can have multiple types, the mapping for
TYPES is not direct. For this, the index maps to TYPESINDEXES, which
contains the index of the policy that the type maps to. This is similar to
how DIRINDEXES is used to map DIRNAMES and BASENAMES. As an example, the
previous %sepolicy section would have the following header tags:

RPMTAG_POLICIES:
 0: <foo.pp data, base64 encoded>
 1: <bar.pp data, base64 encoded>

RPMTAG_POLICYNAMES:
 0: foo
 1: bar

RPMTAG_POLICYFLAGS:
 0: 0
 1: 1	# assumes flag 1 == BASE

RPMTAG_POILCYTYPES:        RPMTAG_POLICYTYPESINDEXES:
 0: mls                     0: 0
 1: strict                  1: 1
 2: targeted                2: 1
 3: mls                     3: 1
2010-09-01 09:04:27 +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
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 7628c31bb9 Fix fallout from rpmgi.h moving to internal path 2010-03-23 16:32:46 +02: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 27a6edd36d Add a new legacy compatibility header, kill rpmints.h
- build-time generated rpmints.h causes issues with distcheck and is
  not really worth the trouble
- we have all sorts of legacy junk to deal with, sticking them all into
  rpmints.h would be just wrong...
2008-07-08 18:54:28 +03:00
Panu Matilainen 710750ebff Make rpmkeyring.h public header 2008-07-02 14:23:30 +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 90e10708f8 Fixup paths and Makefiles for rpmdb/ elimination 2008-05-12 12:28:12 +03: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 c46876daa4 Add new header for collecting utility macros
- atm consists of portability wrappers to various gcc extensions like
  __attribute__() to provide additional warnings and checks
- copied from glib to avoid an extra build dependency just for the silly
  macros, renamed to avoid namespace clashing
2008-02-25 11:02:07 +02:00
Panu Matilainen 50e2d4c26f Split non-cli verify bits from rpmcli to separate header 2008-02-05 13:49:13 +02:00
Panu Matilainen 0760e7389f Add stub rpmtypes.h header stub
- place to stick in common typedefs to untangle header cross-include jungle
2008-01-30 10:13:09 +02:00
Panu Matilainen a96f817d50 Split RPMTAG_* and related functions out of rpmlib.h to rpmtag.h 2007-12-03 10:47:25 +02:00
Panu Matilainen fc53d307ad Add separate public header for callback declarations
- rpmmessages is empty, lose it
- adjust includes
2007-12-01 10:08:13 +02:00
Ralf Corsépius f33505085a Regenerate. 2007-11-26 15:18:02 +01:00
Panu Matilainen eb72616113 Regenerate preinstall.am 2007-11-23 09:06:45 +02:00
Panu Matilainen d6990c3ab1 Move stringbuf into librpmio, rename header
- rename header to more generic rpmstring.h for collecting misc string
  helper functions
2007-11-23 08:11:42 +02:00
Ralf Corsépius 7fb2899b84 Fix typo in preinstall.am generation. 2007-11-23 06:28:09 +01:00
Ralf Corsépius 32f29c4cbf Regenerate. 2007-11-22 17:22:22 +01:00
Ralf Corsépius 5831404601 Add header preinstallation. 2007-11-22 15:54:42 +01:00