Panu Matilainen [Fri, 22 Oct 2010 05:58:06 +0000 (08:58 +0300)]
Eliminate useless --fileid query selector
- Finding out which package provides a file with a given digest
is just .. useless functionality. Being next to useless is one
thing, but we pay a high price for this particular uselessness:
the index needed for this is one of the biggest and most expensive
indexes we have.
Florian Festi [Thu, 21 Oct 2010 09:59:14 +0000 (11:59 +0200)]
Fix Python bindings and raise KeyError when there is no index for the given tag
Florian Festi [Thu, 21 Oct 2010 08:41:49 +0000 (10:41 +0200)]
Fix typo / erroneously deleted line
Florian Festi [Tue, 15 Dec 2009 12:15:10 +0000 (13:15 +0100)]
rpmdbKeyIterator: loop over keys in the database indexes
Panu Matilainen [Wed, 20 Oct 2010 13:38:46 +0000 (16:38 +0300)]
Hardwire the fundamental BDB access method configuration inside rpm
- The different access methods have different capabilities and are not
interchangeable in all situations. Currently we can use either
hash and btree but this might not be always the case for all indexes.
- We'll eventually want to force-switch the index types to our liking,
but for now follow these simple rules:
1) For existing databases, we accept both btree and hash
2) For newly created databases, the main Packages database remains
a hash, all indexes are btrees.
- Rip out nearly all the rest of the remaining macro configuration.
Panu Matilainen [Wed, 20 Oct 2010 12:23:54 +0000 (15:23 +0300)]
Eliminate now unnecessary db rebuild macro goo and other leftovers
- Rpm knows how to handle db rebuilds by itself, no need to expose
these bits to configuration.
- Also rip out a pile of other leftover "documentation" about BDB
internal switches.
Panu Matilainen [Wed, 20 Oct 2010 12:11:20 +0000 (15:11 +0300)]
Lift fsync enable/disable configuration handling to rpmdb layer
- Add a fsync disable/enable function in the backend, call from
rpmdb layer: on initial database creation (including database
rebuild), it's "safe enough" to disable fsync as there's no former
data to protect. Considerably speeds up initial install to eg chroots.
- Always re-enable fsync when closing a read-write database - at that
point there /is/ data to protect.
Panu Matilainen [Wed, 20 Oct 2010 11:16:29 +0000 (14:16 +0300)]
Hardwire the fundamental BDB subsystem configuration inside rpm
- BDB subsystems are not something that can be just switched on and
off like that. If we want to support different configurations they
need to be rpm-specific settings such as transactional/concurrent
setting, not an arbitrary pile of flags that cause stuff to blow
up when abused.
- Eliminate dbi->dbi_eflags completely, the environment opening flags
can be fetched from BDB where needed. Subsystem configuration from
macros is no longer looked at or honored, but leaving the option
table there for debugging output at least for now.
Panu Matilainen [Wed, 20 Oct 2010 09:46:37 +0000 (12:46 +0300)]
Lift missing index detection to rpmdb layer
- Avoids unnecessarily modifying the parent rpmdb from backend layer
and since its the rpmdb layer that needs to deal with creating
indexes anyway...
- Also avoids bumping the counter in case of errors (eg permission denied)
Panu Matilainen [Wed, 20 Oct 2010 09:36:38 +0000 (12:36 +0300)]
Avoid umphteen unnecessary calls to rpmTagGetName()
- These aren't exactly hotpaths, but since the dbi always knows
its name already there's no point going through rpmTagGetName()
bsearch()'es and all for these.
Panu Matilainen [Wed, 20 Oct 2010 09:23:14 +0000 (12:23 +0300)]
Add a getter for dbi name
Panu Matilainen [Wed, 20 Oct 2010 09:13:33 +0000 (12:13 +0300)]
Clean up rpmdbOpenIndex() logic a bit, no functional changes
- dbi is guaranteed to be NULL on non-zero return from dbiOpen(),
dont bother triple-checking and freeing NULLs
- rearrange the success case a bit to pave way for other things that
we'll want to do here
Panu Matilainen [Wed, 20 Oct 2010 08:12:08 +0000 (11:12 +0300)]
Lose leftover, unwired pagesize db option
- db->set_pagesize() got semi-accidentally nuked in commit
f2957887fb7f80c2dbf6f0b4973c72ca66b0d2e8 but we really dont want
folks to mess with this anyway - filesystem I/O block size is generally
the best performing and safest option here.
Panu Matilainen [Wed, 20 Oct 2010 07:57:53 +0000 (10:57 +0300)]
Avoid directly accessing bdb-specific dbi members from rpmdb layer
Panu Matilainen [Wed, 20 Oct 2010 07:52:53 +0000 (10:52 +0300)]
Add a backend-independent flags + getter for dbis
- Keeping up pretense of being backend independent where its easy
to do... and rdonly+created status are rather obviously universally
mappable
Panu Matilainen [Tue, 19 Oct 2010 14:27:31 +0000 (17:27 +0300)]
Pass rpmdb, not dbi to db_init() and db_fini()
- These are global operations and dont need the individual dbi for
anything but finding the parent rpmdb. Another step closer to
decoupling db environment from dbi's...
Panu Matilainen [Tue, 19 Oct 2010 14:04:20 +0000 (17:04 +0300)]
Add a no-dbi version of the db error reporting function
- cvtdberr() only needs the dbi for figuring out the rpmdb api level,
split this part out to separate function so we dont need to carry
dbi's around where they dont belong
Panu Matilainen [Tue, 19 Oct 2010 13:44:46 +0000 (16:44 +0300)]
Move db environment-level configuration out of per-dbi structs
- Carrying global configuration in all dbi's is just dumb. First
step towards fixing the stupidity.
Panu Matilainen [Tue, 19 Oct 2010 13:14:24 +0000 (16:14 +0300)]
Group the database options to per-dbi and per-environment groups
- No other changes
Panu Matilainen [Tue, 19 Oct 2010 12:40:22 +0000 (15:40 +0300)]
Python dbMatch() doesn't take (or need) len argument, fix the docs
Panu Matilainen [Tue, 19 Oct 2010 12:29:54 +0000 (15:29 +0300)]
A few more rpmdb variable/argument renames, missed in previous round
Panu Matilainen [Tue, 19 Oct 2010 11:37:40 +0000 (14:37 +0300)]
Decouple dbiVerify() from dbiClose()
- When RPMDB_FLAG_VERIFYONLY is set, dbiOpen() now only creates and
returns the db handle without actually opening it. With this we
can sanely implement dbiVerify() as its own separate functionality,
also avoiding the need to have duplicate code for creating and
tearing down the db environment (which in turn kills our ability
to use DB_REGISTER if/when the day comes)
Panu Matilainen [Tue, 19 Oct 2010 11:13:58 +0000 (14:13 +0300)]
Add flags argument to dbiOpen(), pass through from rpmdbIndexOpen()
Panu Matilainen [Tue, 19 Oct 2010 07:58:25 +0000 (10:58 +0300)]
Oops, dumb copy-paste error causing --verifydb to --rebuilddb instead
Panu Matilainen [Tue, 19 Oct 2010 07:41:07 +0000 (10:41 +0300)]
Rename rpmdb variables in the backend to rdb to distinguish from its type
Panu Matilainen [Mon, 18 Oct 2010 12:03:35 +0000 (15:03 +0300)]
Generate missing database indexes automatically
- Now that we know whether backing files were created on open, we can
easily detect the need for index generation too. As index generation
requires expensive plowing through the entire Packages database, we
to create all missing indexes at once instead of risking several
loops over Packages. So if we spot a missing index, we open all
our indexes and generate all the missing bits in one go.
- Berkeley DB does support on-demand index generation for secondary
indexes created with db->associate(), but as rpm's indexes are in
a slightly different format (they store tag index besides the
header number), using it would require various other
changes too. Also the BDB indexing callback recieves the data
in serialized format, which in rpm's case would mean either
headerLoad() for every single indexed bit, or passing the in-memory
header through some other indirect means.
Panu Matilainen [Mon, 18 Oct 2010 11:35:57 +0000 (14:35 +0300)]
Create indexes too on rpmdbInit() (ticket #156)
- Seems strange to have an initializer function which doesn't
initialize
- This leaves RPMDB_FLAG_JUSTCHECK unused...
Panu Matilainen [Mon, 18 Oct 2010 11:31:55 +0000 (14:31 +0300)]
Avoid returning NULL from prDbiOpenFlags()
- While glibc can turn NULL %s to "(nil)", this is not required in
any standards. Avoid embarrassing segfault from a silly debug message.
Panu Matilainen [Mon, 18 Oct 2010 10:18:19 +0000 (13:18 +0300)]
Remember if we created the db backing file on open
- Instead of trying to figure out suitable flags beforehand, try to
open the db a couple of times with different flags. This way we know
whether the backing file was created on open or not. Also simplifies
the flag shuffling somewhat.
- We also do this when O_CREAT db_mode, for the same reason: rpmdbInit()
can be called on existing database too, and we want to know which
of the files actually got created.
Panu Matilainen [Mon, 18 Oct 2010 09:09:28 +0000 (12:09 +0300)]
Lift dbi fcntl() locking out of dbiOpen()
- Just to make dbiOpen() shorter and easier to read, locking is
different from opening...
Panu Matilainen [Sun, 17 Oct 2010 09:20:48 +0000 (12:20 +0300)]
Lift secondary index updating out of rpmdbAdd()
Florian Festi [Sat, 16 Oct 2010 07:45:13 +0000 (09:45 +0200)]
Support looping over indexes when giving keyp=NULL to rpmdbInitIterator()
Panu Matilainen [Wed, 13 Oct 2010 11:29:28 +0000 (14:29 +0300)]
Add python bindings for librpmsign
- Similarly to the build-bindings, permit import failures as librpmsign
might not be installed and we dont want to force the dependencies
into every single installation
Panu Matilainen [Wed, 13 Oct 2010 11:20:30 +0000 (14:20 +0300)]
Oops, fixup rpmsign exit codes on success
Panu Matilainen [Wed, 13 Oct 2010 10:37:42 +0000 (13:37 +0300)]
Make rpmPkgSign() actually honor the signing arguments
- For now just keyid string and hash algorithm supported. The
macro fiddling should perhaps go deeper into the signing process
but this'll do for now...
Panu Matilainen [Wed, 13 Oct 2010 10:20:40 +0000 (13:20 +0300)]
Nuke rpmcliSign() out of the orbit
Panu Matilainen [Wed, 13 Oct 2010 10:19:35 +0000 (13:19 +0300)]
Make rpmsign use the new signing interface (minimal conversion for now)
Panu Matilainen [Wed, 13 Oct 2010 10:11:54 +0000 (13:11 +0300)]
Add beginnings of a real API to librpmsign
Panu Matilainen [Tue, 12 Oct 2010 13:58:09 +0000 (16:58 +0300)]
Move plugins out of rpm config directory
- Plugins are by their very nature arch specific, while /usr/lib/rpm
is a hodgepodge of all sorts of ... stuff, most of which is
arch-independent and all. Use %{_libdir}/rpm-plugins to cleanly
differentiate 32 vs 64bit plugin paths
Colin Walters [Tue, 23 Feb 2010 16:02:46 +0000 (11:02 -0500)]
Add 'VCS' key
Spec files have a lot of metadata about a project. However one of the
most key components is the upstream version control system which was
notably lacking.
Resolve this by adding a "VCS" key. There is no specification
for contents of this key, given that the set of version control
systems (and features thereof) are not well-defined. However,
recommendations are:
* git: This URL should be in a form that can be passed to "git clone",
with the additional feature that an optional fragment identifier "#foo"
denotes a branch or tag.
Colin Walters [Tue, 23 Feb 2010 16:02:46 +0000 (11:02 -0500)]
Add 'VCS' key
Spec files have a lot of metadata about a project. However one of the
most key components is the upstream version control system which was
notably lacking.
Resolve this by adding a "VCS" key. There is no specification
for contents of this key, given that the set of version control
systems (and features thereof) are not well-defined. However,
recommendations are:
* git: This URL should be in a form that can be passed to "git clone",
with the additional feature that an optional fragment identifier "#foo"
denotes a branch or tag.
Panu Matilainen [Tue, 12 Oct 2010 12:39:52 +0000 (15:39 +0300)]
Add --requires etc popt aliases for rpmspec too
- In addition to the regular dependencies, add --buildrequires
and --buildconflicts which are just --srpm --requires and
--srpm --conflicts in reality
Panu Matilainen [Tue, 12 Oct 2010 12:10:26 +0000 (15:10 +0300)]
Rpm option descriptions begin with lowercase letters, follow suit in rpmspec
Panu Matilainen [Tue, 12 Oct 2010 12:07:38 +0000 (15:07 +0300)]
Only queryformat is relevant for specfiles
- Instead of including the entire rpmQueryPoptTable in rpmspec and
showing several bogus options, support --qf/--queryformat "manually"
Panu Matilainen [Tue, 12 Oct 2010 11:56:18 +0000 (14:56 +0300)]
Support overriding target for rpmspec queries too
Panu Matilainen [Tue, 12 Oct 2010 11:44:56 +0000 (14:44 +0300)]
Support both binary/source queries in rpmspec tool (RhBug:540807, ticket #89)
Panu Matilainen [Tue, 12 Oct 2010 11:41:35 +0000 (14:41 +0300)]
Add support for querying source rpm from spec too
- Handle source rpm query as a new query source type RPMQV_SPECSRPM,
rename the binary query to RPMQV_SPECRPMS, with RPMQV_SPECFILE
as a backwards compatibility alias to RPMQV_SPECRPMS.
Eric W. Biederman [Sun, 10 Oct 2010 14:36:34 +0000 (07:36 -0700)]
Add a python accessor for the source header
Make the source header visible to python code.
Eric W. Biederman [Sun, 10 Oct 2010 14:35:31 +0000 (07:35 -0700)]
Add a getter for the source header.
It appears the access to the source header has started to get buried
into usability so add an getter so the implementation can change a
little without breaking callers.
Panu Matilainen [Tue, 12 Oct 2010 06:27:46 +0000 (09:27 +0300)]
Fix misc/ include path
- -I$(top_builddir)/include/rpm was never right, and now with fts
moved into misc/ this shows as rpm/rpmutil.h not getting found.
Panu Matilainen [Fri, 8 Oct 2010 08:59:51 +0000 (11:59 +0300)]
Further split the cli-tools to rpminstall, rpmquery and rpmverify
- Installing/erasing packages, querying and verifying require different
amount of privileges on the system. Having separate binaries for
these functionalities permits limiting the capabilities through
SELinux and other similar security mechanisms: for example quering
needs much less privileges than installing.
- For now, leaving /bin/rpm to be the Swiss Army knife it
always was: capable of install/erase, query and verify. Eventually
it should be turned into just a dumb wrapper which just execs
the per-functionality binaries, but leaving that for later stage,
as popt exec/aliasing doesn't quite seem to up to par with the task.
Having the separate binaries available at least makes it possible
for callers to specify the amount of privileges they need.
Panu Matilainen [Wed, 6 Oct 2010 09:53:34 +0000 (12:53 +0300)]
Remove filesystem related leftover API definitions
- This should've been in all the way back in
commit
51c96db0464f86901b328899106dd8d4159dd878
Aron Griffis [Wed, 6 Oct 2010 07:55:09 +0000 (10:55 +0300)]
Use the right variable for absolute path (ticket #137)
- Fix the problem where rpm attempts to use the tarball as the specfile
Michal Čihař [Wed, 6 Oct 2010 07:26:23 +0000 (10:26 +0300)]
Fix generating platform config for arm
- We need to generate platform/arm-linux as well, not only all substitutes.
Panu Matilainen [Tue, 5 Oct 2010 06:53:13 +0000 (09:53 +0300)]
Require file attribute config to have .attr suffix
- Allows for more precise globbing, avoiding potential issues from
leftover / accidentally placed files in the fileattrs directory.
Panu Matilainen [Tue, 5 Oct 2010 06:35:45 +0000 (09:35 +0300)]
Replace __foo_exeonly attribute with a more generic mechanism
- Use a list of text keyword tokens to allow for more flags without
requiring adding special processing for every new flag we make
Panu Matilainen [Tue, 5 Oct 2010 06:11:13 +0000 (09:11 +0300)]
Tolerate NULL args in argvSplitString()
Panu Matilainen [Mon, 4 Oct 2010 13:04:47 +0000 (16:04 +0300)]
Add cli switches to override signing key and digest algorithm
Panu Matilainen [Mon, 4 Oct 2010 11:35:08 +0000 (14:35 +0300)]
Adjust rpm.pc private libraries
- we no longer have sqlite3 lib ever, but we might have lzma/xz libs
Panu Matilainen [Mon, 4 Oct 2010 11:02:53 +0000 (14:02 +0300)]
Further streamline rpmcliArgIter() and friends
- Turn applyFilters() into match iterator initializer which optionally
applies filters if present
- Handle NULL iterator error codes centrally in rpmcliShowMatches()
Panu Matilainen [Mon, 4 Oct 2010 10:33:18 +0000 (13:33 +0300)]
Lift specfile query out of main rpm(query) into separate binary
- Avoids having to link /bin/rpm with librpmbuild and everything it
might bring in (eg libmagic) which are not needed for core operation.
- Minimally preserve backwards compatibility with popt exec alias
Panu Matilainen [Mon, 4 Oct 2010 09:51:32 +0000 (12:51 +0300)]
Simplify queryformat popt callback handling
- No need to separate single vs multiple queryformats,
rstrcat() works for both cases. Whether catenating multiply specified
queryformats make sense is another question though...
- This can't get called with NULL arg (or then popt screwed up its
argument checking), dont bother checking.
Piotr Drąg [Mon, 4 Oct 2010 09:32:46 +0000 (09:32 +0000)]
l10n: Updated Polish (pl) translation to 100%
New status: 741 messages complete with 0 fuzzies and 0 untranslated.
Transmitted-via: Transifex (www.transifex.net).
Guido Grazioli [Sun, 3 Oct 2010 20:05:32 +0000 (20:05 +0000)]
l10n: Updated Italian (it) translation to 100%
New status: 732 messages complete with 0 fuzzies and 0 untranslated.
Transmitted-via: Transifex (www.transifex.net).
Panu Matilainen [Fri, 1 Oct 2010 12:30:31 +0000 (15:30 +0300)]
And now python bindings are really free of librpmbuild internals
- Just one leftover offender in the form of forgotten type rename
from commit
675bfca5cc300105f7859f028cc00ea036e72966
Panu Matilainen [Fri, 1 Oct 2010 12:28:40 +0000 (15:28 +0300)]
Kill spec.buildRoot from python
- We /could/ of course add a getter for this but ... sorry folks, what
rpm happens to use as buildroot internally isn't anybody elses
business.
Panu Matilainen [Fri, 1 Oct 2010 12:23:27 +0000 (15:23 +0300)]
Use the new spec section getter in python bindings
- Whee, for a change more lines removed than added...
Panu Matilainen [Fri, 1 Oct 2010 12:14:34 +0000 (15:14 +0300)]
Add getter for spec script sections too, bah...
- Pretty dumb and all, but to avoid breaking some python users
(some folks apparently have found /some/ use for these...)
Panu Matilainen [Fri, 1 Oct 2010 12:05:35 +0000 (15:05 +0300)]
Use the new spec src/pkg API in python instead of direct access to spec
Panu Matilainen [Fri, 1 Oct 2010 12:03:22 +0000 (15:03 +0300)]
Add minimal API for spec packages and sources
- Iterators for both (these could easily done as self-iteration over
->next but to keep the api similar to other rpm iterators...)
- Minimal getters to satisfy python bindings needs
Panu Matilainen [Fri, 1 Oct 2010 10:32:28 +0000 (13:32 +0300)]
Use namespaced names for spec pkg and source opaque typedefs
- Leaving the painful and somewhat pointless exercise of changing
all the Package and Source references for another rainy day
Panu Matilainen [Fri, 1 Oct 2010 10:25:38 +0000 (13:25 +0300)]
Finish off our librpmbuild API mass-murder by turning everything opaque
- These huge structs have no business being visible to the public.
Just brute-force split all remaining spec internal structures into
another internal header, including where needed.
- The only thing accessing these structs outside of librpmbuild is
the python spec bindings. Temporarily permit direct access to
rpmspec_internal.h until we have the necessary API in place.
Panu Matilainen [Fri, 1 Oct 2010 10:21:00 +0000 (13:21 +0300)]
rpmfcGenerateDepends() is internal, move away from public header
Panu Matilainen [Fri, 1 Oct 2010 08:46:00 +0000 (11:46 +0300)]
A few missing internal markers on librpm side too
Panu Matilainen [Fri, 1 Oct 2010 08:32:31 +0000 (11:32 +0300)]
Whoops, missing RPM_GNUC_INTERNAL on stashSt()
Panu Matilainen [Fri, 1 Oct 2010 08:22:13 +0000 (11:22 +0300)]
Stuff fts into a convenience library in misc/
- This is not really native rpm code but a copy of (glibc?) FTS
implementation, with slight modification to avoid symbol name
collisions. Stick it where the sun don't shine, we'd eventually
like to get rid of such bundled external code.
Panu Matilainen [Fri, 1 Oct 2010 08:17:24 +0000 (11:17 +0300)]
Lose rpmio-url leftovers from fts
- We never pass url's here, just plain old local paths
Panu Matilainen [Fri, 1 Oct 2010 08:05:45 +0000 (11:05 +0300)]
Force shared build of python extension
- Other than seeing "does it compile", statically linked python
extensions make no sense as they're unusable to python.
Panu Matilainen [Fri, 1 Oct 2010 07:43:55 +0000 (10:43 +0300)]
Add configure switch to disable plugins build
- For now this is really just to allow building statically while
hacking, for "real world" use this has implications on collections
support etc which is not handled by this patch.
Panu Matilainen [Fri, 1 Oct 2010 07:34:36 +0000 (10:34 +0300)]
Handle enable/disable python to configure.ac more sanely
- Conditionalize the python subdir on toplevel make instead of
python subdir makefile.
Panu Matilainen [Wed, 29 Sep 2010 13:44:19 +0000 (16:44 +0300)]
Remove configuration for no longer existing db indexes
Panu Matilainen [Wed, 29 Sep 2010 13:15:04 +0000 (16:15 +0300)]
And now sighdrPut() can be buried back into signature.c
Panu Matilainen [Wed, 29 Sep 2010 13:05:07 +0000 (16:05 +0300)]
Eliminate some redundancy in signature sanity checking
- Combine validation + actual insertion to header: rename validatePGPSig()
to putSignature() and move the details of parsing gpg generated
packet, validating them and finally inserting to header in there.
- The signature generation code is mostly now in reasonably sized
chunks, although there's room for further sanity here - the call
chain is ridiculously long.
Panu Matilainen [Wed, 29 Sep 2010 12:39:10 +0000 (15:39 +0300)]
Simplify the signature generation somewhat
- makeGPGSignature() callers only used the numerous return values
for passing them into headerPut() through sighdrPut(), might as
well have makeGPGSignature() do that part. It can also decide
the necessary tags by itself, it just needs to know whether its
a header-only signature or legacy header+payload signature.
Panu Matilainen [Wed, 29 Sep 2010 12:07:21 +0000 (15:07 +0300)]
Split the setup + running of gpg helper to a separate function
- No functional changes (supposedly...), just refactoring
makeGPGSignature() to smaller bits
Panu Matilainen [Wed, 29 Sep 2010 10:37:26 +0000 (13:37 +0300)]
Eliminate the pointless switch-case from makeHDRSignature()
- If we can't trust our own code to supply appropriate tag here...
Panu Matilainen [Wed, 29 Sep 2010 10:26:46 +0000 (13:26 +0300)]
Start ripping through the hysterical signature generation tangle
- rpmGenSignature() only ever gets called with RPMSIGTAG_GPG, eliminate
the pointless argument.
- Eliminate the useless switch-case in rpmGenSignature(), nothing
ever directly called it with RPMSIGTAG_DSA/RSA, those got generated
as a side-effect of the RPMSIGTAG_GPG/PGP. So we just need to generate
the, duh, signature.
Panu Matilainen [Wed, 29 Sep 2010 09:47:06 +0000 (12:47 +0300)]
Clean up makeHDRDigest() a bit
- No need to separately free this stuff (at least anymore), it
gets done on exit anyway.
Panu Matilainen [Wed, 29 Sep 2010 09:38:16 +0000 (12:38 +0300)]
Make rpmGenSignature() static
- Having it in signature.h is just wrong as it lives in a different
library now, and nothing outside rpmgensig.c needs it anymore.
Should've really been in commit
23a9d64ea40cfb526d0a12ba7350918dc335a305.
Panu Matilainen [Wed, 29 Sep 2010 10:09:31 +0000 (13:09 +0300)]
Whoops, couple of includes gone missing in the shuffle
Panu Matilainen [Wed, 29 Sep 2010 09:26:38 +0000 (12:26 +0300)]
Update translations to pick up stuff moving about etc
Panu Matilainen [Wed, 29 Sep 2010 09:01:49 +0000 (12:01 +0300)]
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).
Panu Matilainen [Wed, 29 Sep 2010 08:27:26 +0000 (11:27 +0300)]
Lift the signature generation in all its g(l)ory to rpmgensig.c
- signature.c is now entirely free of all actual signing activities,
which requires stuff that like gpg that nothing else needs.
Panu Matilainen [Wed, 29 Sep 2010 08:21:07 +0000 (11:21 +0300)]
Move sighdrPut() to inline function in signature.h
- Avoids having to expose this in the ABI in the next steps
Panu Matilainen [Wed, 29 Sep 2010 07:48:59 +0000 (10:48 +0300)]
Split signature and digest generation to separate functions
- Similar in spirit to commit
825691afb2a8e2c0b3c6a031950f3c7855dc4c6e,
these have fairly little in common really.
- Change the function names to force breakage on users (these are exported
in ABI but not in public headers so "users" are internal uses in
practise): the automatically generated bits in signature header are
not signatures, but digests (even size is a checksum of sorts) ...
and fix the couple of internal uses.
Panu Matilainen [Wed, 29 Sep 2010 07:29:18 +0000 (10:29 +0300)]
Split internal header signature and digest generation to separate functions
- These have fairly little in common in reality: one is always
automatically created on package generation, the other is optional
extra step requiring passphrases and all sorts of other things.
- The switch-cases are now fairly hysterical but leaving them for
later spring-clean to keep changes minimal for this step.
- No functional changes (supposedly ;)
Panu Matilainen [Wed, 29 Sep 2010 06:36:08 +0000 (09:36 +0300)]
Signer id is not sufficient measure for signature sameness (RhBug:608608)
- We used to only check whether signer ID matches for determining whether
a package needs resigning or can it be skipped, but this is nowhere
near sufficient as the same ID can be used with different algorithms
and even packet version etc. Compare all/most (?) relevant parameters
for signature identicality.
Panu Matilainen [Tue, 28 Sep 2010 20:06:29 +0000 (23:06 +0300)]
Make RPMFILE_STATE_MISSING part of the rpmfileState enum
- Shuts up couple of "not in enum" complaints from gcc, and actually
"no state" is a perfectly valid state for one case: non-installed
packages (so remove the "not valid" comment from formats.c)
- OTOH, this created a new complaint for not handled case in a switch.
Oh well, fix it up too...
Panu Matilainen [Tue, 28 Sep 2010 19:52:49 +0000 (22:52 +0300)]
Fix a rpmTag/rpmSigTag mismatch by using the more appropriate type
- This wouldn't make c++ any happier as the mismatch now occurs
with headerGet() and friends instead of the comparison, but will do for now.
Panu Matilainen [Tue, 28 Sep 2010 19:47:44 +0000 (22:47 +0300)]
Eliminate silly leftover switch-case from _tagType()
- Anybody calling rpmTagGetType() with RPMDBI_PACKAGES deserves to
wait for the search to figure there's no such thing and return
RPM_NULL_TYPE like with the switch case. Eliminates another
enum comparison mismatch warning.