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.
Panu Matilainen [Tue, 28 Sep 2010 19:35:10 +0000 (22:35 +0300)]
Remove leftover trap for RPMRC_FAIL errors where none should be seen
- Been 2.5 years now without seeing that trap trigger, should be safe
to remove now ... to silence a warning about comparing to non-existent
enumeration value.
Panu Matilainen [Tue, 28 Sep 2010 19:16:33 +0000 (22:16 +0300)]
Wrong enum type used for psm goal, gcc 4.5 complains (which is nice)
Panu Matilainen [Tue, 28 Sep 2010 19:13:25 +0000 (22:13 +0300)]
Whoops, wrong enum type used for pubkey algorithm
- dumb thinko/typo from commit
0e143cfe9f11abc42733d2265dc6d61cb716e5a4
Panu Matilainen [Tue, 28 Sep 2010 13:33:17 +0000 (16:33 +0300)]
Eliminate %_signature from man pages too
Panu Matilainen [Tue, 28 Sep 2010 13:28:21 +0000 (16:28 +0300)]
Rip the useless %_signature macro and everything around it
Panu Matilainen [Tue, 28 Sep 2010 13:09:30 +0000 (16:09 +0300)]
Fix the broken existing signature checking on add/resign (RhBug:488953)
- The previously used %_signature macro for determining the generated
signature type is utterly useless as gpg can generate both DSA and RSA
signatures just fine. Generate the new signature and compare with the
previous one in the header (if any) for real results. This is ugly
hackery around limitations in the lower level signature functions but
to keep this remotely backportable for now...
Panu Matilainen [Tue, 28 Sep 2010 11:55:29 +0000 (14:55 +0300)]
Decide header sigtag based on what was actually written
- makeGPGSignature() figures the signature type by parsing the
created signature, use that instead of the rather bogus tag
based on %_signature macro value passed from the cli level.
Panu Matilainen [Mon, 27 Sep 2010 14:15:15 +0000 (17:15 +0300)]
Handle non-terminated substrings centrally in expandMacro()
- expandMacro() is big and ugly already, but handling the non-terminated
substrings there once and for all avoids having to ping-pong recurse
through couple of helpers to get there.
Panu Matilainen [Mon, 27 Sep 2010 13:32:15 +0000 (16:32 +0300)]
Dynamic expansion buffer reallocation for lua macros too
Panu Matilainen [Mon, 27 Sep 2010 13:22:38 +0000 (16:22 +0300)]
Panu Matilainen [Mon, 27 Sep 2010 13:03:56 +0000 (16:03 +0300)]
Eliminate the internal in-place-expansion buffer limitation
- Return the dynamically allocated expansion buffer to callers from
expandU(), except using a slightly less cryptic expandThis() name
for it now. Also deal with non-terminated strings centrally in
expandThis() instead of doing alloc + copy to terminate in every caller.
Panu Matilainen [Mon, 27 Sep 2010 11:22:56 +0000 (14:22 +0300)]
Simplify / sanitize expandU() a bit
- Instead of saving and restoring the bits we'll mess with, just
make a temporary expansion state struct with non-buffer state
copied from "parent".
Panu Matilainen [Mon, 27 Sep 2010 11:05:37 +0000 (14:05 +0300)]
Dynamically reallocate macro expansion buffer (ticket #45)
- Eliminate the underlying limitation of macro expansion limit by
growing the buffer as needed when adding characters to it. This
doesn't fix the entire issue yet however: expandU() and expandMacros()
are still limited to caller-specified buffer size, and output
from lua-macros isn't dynamically resized. One step at a time...
Panu Matilainen [Mon, 27 Sep 2010 10:05:37 +0000 (13:05 +0300)]
Let expandMacro() allocate its own buffer
- More pre-requisites for dynamic buffer resizing, callers have no
clue how much expandMacro() is going to need.
Panu Matilainen [Mon, 27 Sep 2010 09:19:13 +0000 (12:19 +0300)]
Track current expansion point via distance to buffer start
- Supposedly no functional changes, just paving way for dynamic
buffer resizing which is impossible when accessing pointers directly.
Panu Matilainen [Fri, 24 Sep 2010 09:48:15 +0000 (12:48 +0300)]
Push the macro buffer size limit down by one level
- Turn expandMacros() into a wrapper around internal doExpandMacros()
which returns the expanded string in a newly allocated buffer, use
the internal version for rpmExpand() too.
Panu Matilainen [Mon, 27 Sep 2010 07:02:17 +0000 (10:02 +0300)]
Eliminate unused spec field from macro expansion state struct
Panu Matilainen [Mon, 27 Sep 2010 06:33:35 +0000 (09:33 +0300)]
Avoid calloc() in macro findEntry()
- It's just the macro name we're grabbing here, that ought to fit
on stack comfortably enough.
Panu Matilainen [Fri, 24 Sep 2010 07:49:19 +0000 (10:49 +0300)]
Avoid unnecessary round-trip through expandT() where possible
- In the cases where expandT() was called with strlen(source) we can
now just bypass it and call expandMacro() directly, avoiding an
unnecessary string copy.
Panu Matilainen [Fri, 24 Sep 2010 07:42:38 +0000 (10:42 +0300)]
Use function arguments to pass, duh, arguments into functions. Duh.
- No functional changes, just eliminating mindless save-and-restore
ping-pong through macro expansion state struct.
Jindrich Novy [Sun, 26 Sep 2010 16:45:34 +0000 (18:45 +0200)]
Fix segfault in rpmdeps (RhBug:637357)
Panu Matilainen [Wed, 22 Sep 2010 13:37:12 +0000 (16:37 +0300)]
Eliminate separate fileIndexEntry from rpmal
- This is exactly the same structure as availableIndexEntry, no need
for a different struct for it.
Panu Matilainen [Wed, 22 Sep 2010 11:28:32 +0000 (14:28 +0300)]
Use headerNextTag() for header format iteration
- Doesn't really win anything performance-wise but makes the code nicer
Panu Matilainen [Wed, 22 Sep 2010 06:46:25 +0000 (09:46 +0300)]
Use HEADER_MAGIC_FOO enums instead of 0/1 in python header code
Panu Matilainen [Wed, 22 Sep 2010 06:19:07 +0000 (09:19 +0300)]
Remove double const in urlstring struct
Panu Matilainen [Wed, 22 Sep 2010 06:14:12 +0000 (09:14 +0300)]
Make rpmsqAction compatible to sa_sigaction
Hajime Taira [Tue, 21 Sep 2010 22:27:34 +0000 (22:27 +0000)]
l10n: Updated Japanese (ja) translation to 100%
New status: 732 messages complete with 0 fuzzies and 0 untranslated.
Transmitted-via: Transifex (www.transifex.net).
Panu Matilainen [Tue, 21 Sep 2010 13:57:08 +0000 (16:57 +0300)]
Remove double const on rpmrc tables
Panu Matilainen [Tue, 21 Sep 2010 13:43:46 +0000 (16:43 +0300)]
Fix rpmRC/int return mismatch by counting errors from handleOneTrigger
Panu Matilainen [Tue, 21 Sep 2010 13:39:59 +0000 (16:39 +0300)]
Use rpmTag as psm scriptTag for type correctness
Panu Matilainen [Tue, 21 Sep 2010 13:35:10 +0000 (16:35 +0300)]
Default to the common case wrt dir name/index tags, not relocation
- Avoids an unnecessary extra initialization in the common case, and
also avoids int/enum mismatch from initializing to 0.
Panu Matilainen [Tue, 21 Sep 2010 13:28:34 +0000 (16:28 +0300)]
Move PTOK type enum out of the sprintfToken struct
- While legal in C++, the enum and its values are only visible within
the scope it was declared in, making it invisible to the rest of
the program.
Panu Matilainen [Tue, 21 Sep 2010 13:18:22 +0000 (16:18 +0300)]
Remove bunch of double consts in librpmbuild
Panu Matilainen [Tue, 21 Sep 2010 12:55:02 +0000 (15:55 +0300)]
Initialize nametag to RPMTAG_NOT_FOUND in parseRCPOT()
- Doesn't matter what the value is, the switch (somewhat hysterically)
makes it default to RPMTAG_REQUIRENAME in unknown cases anyway
Panu Matilainen [Tue, 21 Sep 2010 12:53:38 +0000 (15:53 +0300)]
Const pedantry: taropts only ever points to string constants
Panu Matilainen [Tue, 21 Sep 2010 12:38:41 +0000 (15:38 +0300)]
Move expression type enum out of the struct
- While legal in C++, the enum and its values are only visible within
the scope it was declared in, making it invisible to the rest of
the program.
Panu Matilainen [Tue, 21 Sep 2010 12:25:53 +0000 (15:25 +0300)]
Use actual enum values in tag table sentinel to avoid int/enum mismatch
- tagLoadIndex() looks for NULL in tag name, the other values aren't
looked at so it doesn't matter...
Panu Matilainen [Tue, 21 Sep 2010 12:21:12 +0000 (15:21 +0300)]
Add "c++ protection" to (hopefully) all of our internal headers
Panu Matilainen [Tue, 21 Sep 2010 12:17:46 +0000 (15:17 +0300)]
Missing c++ end marker in rpmdb_internal.h, oops
Panu Matilainen [Tue, 21 Sep 2010 12:13:02 +0000 (15:13 +0300)]
Add "C++ protection" to the public rpmutil.h header, oops...
Panu Matilainen [Tue, 21 Sep 2010 12:11:04 +0000 (15:11 +0300)]
void stepping on toes of relatives, part 5
- Eliminate remaining (hopefully) C++ reserved keywords in rpmbuild cli tool
Panu Matilainen [Tue, 21 Sep 2010 12:08:08 +0000 (15:08 +0300)]
Avoid stepping on toes of relatives, part 4
- Eliminate remaining (hopefully) C++ reserved keywords in librpm
Panu Matilainen [Tue, 21 Sep 2010 12:07:08 +0000 (15:07 +0300)]
Avoid stepping on toes of relatives, part 3
- Eliminate remaining (hopefully) C++ reserved keywords in librpmbuild
Panu Matilainen [Tue, 21 Sep 2010 12:02:43 +0000 (15:02 +0300)]
Avoid stepping on toes of relatives, part 2
- Eliminate uses of "class" which is a reserved keyword in C++
Panu Matilainen [Tue, 21 Sep 2010 11:55:03 +0000 (14:55 +0300)]
Avoid stepping on toes of relatives, part 1
- Eliminate uses of "this" which is a reserved keyword in C++
Panu Matilainen [Tue, 21 Sep 2010 11:50:40 +0000 (14:50 +0300)]
Queryformat string sanity in queryArgCallback()
- Use our string helper functions instead of manual length calculations
and allocations
Panu Matilainen [Tue, 21 Sep 2010 11:49:36 +0000 (14:49 +0300)]
Use rasprintf() instead of manual alloc + sprintf()
Panu Matilainen [Tue, 21 Sep 2010 11:47:46 +0000 (14:47 +0300)]
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]
Panu Matilainen [Tue, 21 Sep 2010 11:47:14 +0000 (14:47 +0300)]
Use the macro allocator variants within librpm*
Panu Matilainen [Tue, 21 Sep 2010 11:33:57 +0000 (14:33 +0300)]
Use _free() instead of rfree() where "return value" is assigned
Panu Matilainen [Tue, 21 Sep 2010 11:26:29 +0000 (14:26 +0300)]
Return explicit NULL from various fooFree() functions everywhere
Panu Matilainen [Tue, 21 Sep 2010 11:22:29 +0000 (14:22 +0300)]
Return typed pointers from rpmluaFree() and rpmluavFree()
Panu Matilainen [Tue, 21 Sep 2010 11:19:11 +0000 (14:19 +0300)]
Return typed pointer from headerformat cacheFree()
Panu Matilainen [Tue, 21 Sep 2010 11:16:23 +0000 (14:16 +0300)]
Return typed pointer from freeHardLink()
Panu Matilainen [Tue, 21 Sep 2010 11:14:29 +0000 (14:14 +0300)]
Use typed instead of void pointer for fsm dnl iterator
- Passing a void pointer for an internal helper function which
casts to the destination is just ... pfff.
Panu Matilainen [Tue, 21 Sep 2010 11:12:55 +0000 (14:12 +0300)]
Use typed instead of void pointer for fsm map iterator
- Passing a void pointer for an internal helper function which
casts to the destination is just ... pfff.
Panu Matilainen [Tue, 21 Sep 2010 11:04:44 +0000 (14:04 +0300)]
Adjust pgpMpiSet() dest type to match actual use
Panu Matilainen [Tue, 21 Sep 2010 11:03:43 +0000 (14:03 +0300)]
Error string is const char *, not void pointer
Panu Matilainen [Tue, 21 Sep 2010 10:43:48 +0000 (13:43 +0300)]
Adjust internal io read, write and digest update to take buf as void pointer
- This matches ffread() and read() much better, avoiding pile of casts.
- By some stroke of genious, glibc cookie interfaces disagree with the
other file stream protos by using char * for buf. Argh. Add explicit
cast for the schizophrenia.
Panu Matilainen [Tue, 21 Sep 2010 10:41:25 +0000 (13:41 +0300)]
Avoid using void pointer when we have a real type for the memfail function
Panu Matilainen [Tue, 21 Sep 2010 10:39:25 +0000 (13:39 +0300)]
Move the RPMVERSION constant among its friends in depends.c
- Doesn't make any difference, just grouping similar goo in one spot.
Panu Matilainen [Tue, 21 Sep 2010 10:29:01 +0000 (13:29 +0300)]
strrchr() family considered harmful, part 666
- strrchr() was silently casting away a const on a string coming
from rpmtdGetString(). Add an explicit cast and warning/fixme commentary
to the compressFilelist() hack which modifies (and then restores) the
const string.
Panu Matilainen [Tue, 21 Sep 2010 10:14:20 +0000 (13:14 +0300)]
strstr() considered harmful, part 541
- buf isn't const here, it's modified through pointer acquired through
strstr() which silently casts away the const.
Panu Matilainen [Tue, 21 Sep 2010 10:11:56 +0000 (13:11 +0300)]
Use RPMTAG_NOT_FOUND instead of for "invalid tag" value
Panu Matilainen [Tue, 21 Sep 2010 10:02:53 +0000 (13:02 +0300)]
Move RPMTAG_NOT_FOUND into rpmTag enumeration
- Permits presenting "invalid tag" cleanly via the rpmTag enum type
on function returns etc
Panu Matilainen [Tue, 21 Sep 2010 09:49:46 +0000 (12:49 +0300)]
Move rpmHeaderTagFunc() a bit to avoid unnecessary forward declaration
Panu Matilainen [Tue, 21 Sep 2010 09:45:53 +0000 (12:45 +0300)]
Move format extension table a bit to avoid unnecessary forward declaration
Panu Matilainen [Tue, 21 Sep 2010 09:40:33 +0000 (12:40 +0300)]
Use the new tag type/return type getters everywhere
- Instead of masking and bitfiddling all over the place, use the
new getters to get the exact (enum) type directly. rpmTagGetType()
is now unused within rpm but leaving around for backwards compatibility
Panu Matilainen [Tue, 21 Sep 2010 09:30:05 +0000 (12:30 +0300)]
Add yet more rpmTagTagTagFoo() functions
- Two stupid new getters: one for the real tag type, and another
for the return type. rpmTagGetType() returns both requiring bitmasking
all over the place
Panu Matilainen [Tue, 21 Sep 2010 09:27:27 +0000 (12:27 +0300)]
Split tag type and return type to separate fields in tag table
- rpmTagType is a pure enum really, avoid mixing it up unnecessarily
Panu Matilainen [Tue, 21 Sep 2010 09:26:23 +0000 (12:26 +0300)]
Use the enum name instead of value when generating the tagtable source
- This makes the table populated with actual enums instead of the
numbers they present
Panu Matilainen [Tue, 21 Sep 2010 09:23:18 +0000 (12:23 +0300)]
Use proper types for tag and format extension functions
- Stuff the tag prototypes into misc.h in lack of better place
- Actually use the headerTagFooFunction prototypes instead of void *
Panu Matilainen [Tue, 21 Sep 2010 09:15:44 +0000 (12:15 +0300)]
Differentiate between the possible te types and iterator selector values
- 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.
Panu Matilainen [Tue, 21 Sep 2010 09:07:27 +0000 (12:07 +0300)]
Change fdstat functions to take fdOpx enum to fix int/enum mismatches
Panu Matilainen [Tue, 21 Sep 2010 09:06:24 +0000 (12:06 +0300)]
Fix up silly int/enum and type vs variable name mixups in urlPath()
Panu Matilainen [Tue, 21 Sep 2010 08:58:08 +0000 (11:58 +0300)]
Use actual rpmTags in place of the old HEADER_FOO defines everywhere
Panu Matilainen [Tue, 21 Sep 2010 08:40:49 +0000 (11:40 +0300)]
Rename specdFlags to remove unnecessary type vs variable name confusion