summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-09-06$RPM_BUILD_ROOT breaks brp-* scripts if it contains spaces (ticket #843)Jeff Tickle10-21/+22
- This patch adds quotes around $RPM_BUILD_ROOT in places that I noticed they were missing, and attempts to handle some of the problems that can occur when looping over the output of find. Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
2011-09-06Manual typo fix.Ville Skyttä1-1/+1
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
2011-09-06Sync autoconf macro defaults in manual with the macros file.Ville Skyttä1-3/+3
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
2011-09-05Make --pipe command failures reflect our exit codes (RhBug:735481)Panu Matilainen5-7/+20
2011-09-02Make rpmScript opaquePanu Matilainen3-12/+20
- Add accessor for fetching the script tag, the final piece that psm needs (and will continue to do so) from script internals. This allows the script type to become opaque for real.
2011-09-02Add an API for creating real rpmScript items out of triggers, use itPanu Matilainen3-37/+53
- Bury rpmScriptNew() into being internal helper in rpmscript - triggers and other scripts differ quite a bit in how their data is laid out in the header, especially args need "special attention". - Besides cleaning up things in the psm side, this technically makes trigger scripts runnable without having a header at hand. Of course currently trigger scripts are currently created and destroyed on the spot from headers so this is of academic interest...
2011-09-02First step towards unifying triggers into rpmScript APIPanu Matilainen3-44/+47
- Add a lower level script creation function to deal with the body expansions and such, use it for triggers as well. - This is still fairly ugly but its something that can be reasonably backported to 4.9.x which needs this too, as currently triggers are forgetting to set script->descr, causing "(null) failure" messages on glibc and on others, in would just crash on trigger failure and/or in debug verbosity level.
2011-09-01Fix up one strict-prototype warning that has crept in meantimePanu Matilainen1-1/+1
2011-09-01GCC warning option tweaksPanu Matilainen1-3/+1
- WTH are we compiling with -Wno-char-subscripts? This appears to have been there since the dawn of times, and at least nowadays removing it causes no new warnings. - Re-enable -Wstrict-prototypes, either NSS headers have gotten fixed or GCC has gotten smarter and no longer whines about broken system headers.
2011-09-01Oops, RPMSENSE_PRETRANS and _POSTTRANS missing from python bindingsPanu Matilainen1-0/+2
2011-09-01Don't add config() provides if config install is disabledPanu Matilainen1-0/+5
- Similarly to commit 40ee8e7427ace319687dd36bd5f745d1ef2f2236, take --noconfigs into account for the virtual config() provides too
2011-09-01Don't add file provides for doc/config files if they wont be installedPanu Matilainen1-0/+8
- Files which dont get installed cannot very well satisfy dependencies, take this into account for docs and configs when --nodocs & --noconfigs flags are used.
2011-09-01Pass tsflags to rpmal and remember themPanu Matilainen4-4/+12
- No functional changes here, but we'll need to know some of these bits for accurately calculating various dependency bits later on.
2011-09-01Source formatting cosmetics: function blocks start on the next linePanu Matilainen7-18/+34
2011-09-01Only consider installed files when looking at removed dependenciesPanu Matilainen1-1/+2
- Non-installed files cannot very well have dependencies, this eliminates some bogosities from those cases.
2011-09-01Add RPMTAG_INSTFILENAMES tag extension for state-aware file listsPanu Matilainen4-21/+49
- For a more consistent experience wrt all the state-awareness stuff, this needs to be easily querifiable too. - Also makes the tagnames kludgery from commit cac8c389607d7a5735b2905035fdfe4404670d06 unnecessary
2011-09-01Add + use helper macro for testing for installed file statePanu Matilainen2-2/+3
2011-09-01Oops, missing include for rpmFreeMacros() in python modulePanu Matilainen1-0/+1
- This should've been in commit f07ab5c1afa9b0b7105082a8617ec6a7657fc27e
2011-09-01Avoid SystemError on inserting an empty list insert to header from pythonPanu Matilainen1-0/+2
2011-09-01Add method to reset + reload rpm configuration to python bindingsPanu Matilainen1-0/+18
2011-08-31Remember ds color (if set) through rpmdsCurrent()Panu Matilainen1-4/+7
- Currently only dependency sets coming from transaction elements get colored, only bother allocating memory for non-zero color.
2011-08-31Oops, forgot to add the instfilenames pseudo index to tag lookup codePanu Matilainen1-0/+5
- DBI tags dont really belong there to begin with but changing this would be more painful than its worth...
2011-08-29Use RPMDBI_INSTFILENAMES on file queries as wellPanu Matilainen1-1/+2
- This changes query behavior quite a bit as files with non-installed status are no longer returned as matches. The rationale is that it makes figuring out dependency issues with the "new" behavior more obvious (but perhaps we should have a switch to enable former behavior). Besides not satisfying dependencies, files with non-installed status are not really owned by the package, as they would not be removed on package removal.
2011-08-29Take advantage on RPMDBI_INSTFILENAMES in rpmdbProvides()Panu Matilainen1-12/+3
- No functional changes, we did the same thing "manually" here already. Only now the data is more conveniently available through API to other callers who might care (yum & friends)
2011-08-29Add a new pseudo index for actually installed filesPanu Matilainen3-10/+33
- RPMDBI_BASENAMES (ugh) returns all headers with matching filenames, whether the files are actually installed or not, which can be rather misleading when dealing with file dependencies. The new RPMDBI_INSTFILENAMES only returns headers with matching filenames whose state indicates they are actually present on the system.
2011-08-29Generalize pseudo tag handling in rpmdbInitIterator()Panu Matilainen1-9/+8
- No functional changes, just makes the case where a pseudo index uses a differently numbered underlying physical db index more generic.
2011-08-29Use correct file state for colored file replacementsPanu Matilainen4-6/+13
- On colored file conflict resolution, the non-preferred colored file state would depend on installation order: if non-preferred arch is installed first, and the preferred arch in another transaction, the non-preferred color would get marked "replaced" indicating a forced install when none was used. This fixes the file state in such cases to "wrong color" to be consistent of the other installation scenarios.
2011-08-25Add test for ts.clear() as a side-effect of add to ts testPanu Matilainen1-0/+3
2011-08-25Export rpmtsEmpty() to python as ts.clear()Panu Matilainen1-0/+11
- Why the heck hasn't this been exported before, duh? - Method name clear() chosen as this appears to be emerging as a standard of sorts for this kind of operation: dictionaries and sets have it and list will get it in some python 3.x version. Additionally foo.empty() could easily be mistaken for "test whether container foo is empty or not" (especially those with c++ background...)
2011-08-19Remove support for ancient bzip2 library versionsPanu Matilainen2-26/+10
- bzip2 1.0 is over ten years old by now, anybody still using versions older than that get what they deserve...
2011-08-19Remove unused FDFOO macrosPanu Matilainen1-10/+0
2011-08-17Handle query format field width centrally in formatValue()Panu Matilainen4-109/+65
- Eliminate the quirky formatPrefix buffer argument to formatter functions, deal with the width at formatValue() if specified. - This not only simplifies things a great deal, removes a nasty unbounded buffer writing from formatter functions and speeds things up somewhat by removing extra rasprintf()'s in many cases, it also gives us width formatting of everything including "error messages" like "(none)" and "(not a number)" which previously got dumped without any formatting. - The cost of this is the loss of zero padding support for numeric data but that's hardly a big deal.
2011-08-17Take length of format width specifier into account for format string bufferPanu Matilainen1-1/+1
- Prevents buffer overflow in case of ridiculous field width specifiers like --qf "%100000000000000000000000000{name}". There's another similar static-sized buffer in rpmtdFormat() but there we're not dealing with user-speficied format strings so its okay even if ugly. - The format string handling wants a bigger overhaul but this makes for a nice little backportable patch for starters.
2011-08-17Validate query format field width specifier is sanePanu Matilainen2-1/+21
- Only allow [[-]<number>] in the format field, users have no business telling which format conversion sprintf() should use for tag data. Fixes embarrassing segfaults from things like %s{size} which rpm has merrily passed on to sprintf() as-is.
2011-08-02Strip trailing slash from paths at addFile()Panu Matilainen1-1/+11
- Fixes regression from commit 23167c3ea459405c98d8e759993efb6d9b1ea7f3 which causes all %dir entries to have a trailing slash, breaking at least dependencies on such directories and probably something else as well.
2011-08-02pgpVerifySig() check of NULL hash is the wrong way aroundPanu Matilainen1-1/+1
- NULL hash is pretty much a can't happen-case here but lets be sane if it happens afterall - NULL hash would be an error and we dont want to process the rest if that happened.
2011-08-02Restore %defattr() behavior on special %docMichael Schroeder1-1/+6
- With the change in the defattr handling (commit 09efbe96), you also need to save the current defattr setting when processing %doc. Otherwise doc files will just get the value from the latest defattr line.
2011-08-01Fix misleading error message when gpg key is expired (RhBug:672727)Jindrich Novy1-1/+1
2011-07-14Sanity check signatures even if we dont have a keyPanu Matilainen2-6/+13
- Fixes a regression originating all the way back from commit c7fc09d585ff3831924f72f61d990aa791f2c3f2 (ie rpm >= 4.8.0) where a package with a bogus signature can slip through undetected if we dont have a key for it. - This additional sanity check on the signature prevents is enough to prevent the fuzzed package in RhBug:721225 from crashing us by stopping the bad package at the front door. That we don't have proper tag data validation is another, much wider issue...
2011-07-13Fix memleak on keys with more than one user idPanu Matilainen1-3/+3
- This is not "correct", we should permit more than one user id. Leaking memory is still worse than not leaking, corrent behavior or not.
2011-07-13Fix crash on PGP packets/armors with more than one key (RhBug:667582)Panu Matilainen1-4/+8
- While OpenPGP permits arbitrary number of keys per packet/armor, we can't handle more than one, error out early. The poor user wont get much of a clue as to what went wrong, but thats still better than crashing and burning. - Return NULL from pgpPrtPubkeyParams() on errors and pass it onwards from pgpPrtKey() which propagates it up to callers. Besides the crash, this also fixes the error path from pgpNewPublicKey() failures.
2011-07-13Oops, rpmPubkeyDig() should return NULL if pgpPrtPkts() failsPanu Matilainen1-4/+10
2011-07-13Only increment number of query/verify sources when we encounter new typesPanu Matilainen1-21/+15
- This makes it legal to specify the same query/verify source more than once. Not that it makes a whole lot of sense to do so, but complaining "only one type of query/verify permitted at a time" seems silly as well if you're just (accidentally) specifying the same source twice. Besides, this makes the code a bit cleaner. - Kinda related to RhBug:691930.
2011-07-13Fix the sanity check on number of query/verify sources (RhBug:691930)Panu Matilainen1-1/+1
- Prior to commit 2e672f3fae9d8ff7ee64ae13cfa2fe65272c2ede, the callback would get called twice for every option so the expected number of query/verify sources was doubled. Now the numbers match with reality, adjust the check.
2011-07-12Whoops, wrong variable passed to io debuggingPanu Matilainen1-1/+1
2011-07-11Cleanup fdRead(), fdWrite() and fdSeek() a bitPanu Matilainen1-21/+5
- Remove unnecessary fluff, these are very simple operations and dont need any temporary variables, re-re-redundant NULL checking etc, its already done at the caller level.
2011-07-11Cosmetics: remove empty comments and suchPanu Matilainen1-31/+3
2011-07-11Dont bother checking for NULL fd on stats collectionPanu Matilainen1-2/+0
- All the places calling these are already checking for NULL fd, no point re-re-re-re-re-checking it
2011-07-11Centralize most of the debug goo as wellPanu Matilainen1-21/+19
2011-07-11Just pass fd pointers around instead of "cookies" cast to fdPanu Matilainen2-63/+37
- There's not a whole lot of point passing our own data structure around in void pointers and re-re-re-re-re-recasting them to fd's again all over the place. Just pass the damn fd to begin with.