- similarly to commit 53ee682a49, arrange
the header to contain necessary paths before calling rpmfiNew()
- avoid unnecessary accesses to rpmfi internals otherwise too
- octalFormat() and hexFormat() now work for any number, not just int32,
fixing rhbz#471820
- use a common helper-function for both formats, they only differ by o/x
- returns the value (as opposed to pointer to, like the rpmtdGetUint32()
and the like do) of any numeric type as uint64_t (largest supported
integer type so everything can be converted to it)
- handy when you don't really care what the internal presentation is
- there's no rpmtdGetNextNumber() as there's no meaningful way to return
end-of-iteration here
- rpm tag data can be either numeric, strings or binary data, each with
their own "subclasses" (different sized integers etc), add new
enumeration for these
- add rpmTagGetClass(), rpmtdClass() public functions for retrieving the
base class of tag and container
- useful for getting a basic idea how to handle tag/container data
- We need the on-disk paths for the cpio list in here, so instead of
creating an rpmfi with wrong paths (for build purposes) and then
painfully reconstructing half the fileinfo structures by hand, pass
the on-disk path into rpmfiNew() to begin with and then switch the
intended cpio path back into header.
- Duplicates and excludes are already filtered out from the header filelist
so walk that instead of spec filelist to avoid having to filter out
duplicates and excludes, again.
- rpmfiNew() only cares about ts for install-time relocations, nothing
to "fix" wrt that
- we know fip is never NULL (this is a static function with whopping two
callers), don't try to cover up for potential programmer errors
- internal rpmteOpen() and rpmteClose() functions replacing copy-paste
slop between rpmtsRun() and runTransScripts()
- eliminates bunch of rpmte privacy violations
- rpmtsRun() doesn't need the file descriptor for anything, might as well
keep it hidden
- the previous implementation was pretty busted up, cap_size() is the
size of external representation, not sizeof(*cap_t) as pointed out by
Andrew Morgan
- check for cap_compare() in configure and use it if available (it's
a Linux-specific extension to the posix draft and only very recent
libcap has it)
- if cap_compare() isn't available, use internal variant that does it
the hard way by converting the capabilities to external presentation
and comparing those
- Since we permit shared files to differ by mtime on installation, it makes
no sense to consider them as verification failure either. This has been
especially bad on multilib where timestamp differences make verify warning
lights look like Las Vegas at night. If file mtime on disk and header
differs, check if it's owned by more than one package and if so, ignore
the timestamp difference.
- rpmte db_instance and dboffset are exactly the same thing, unify
- pull rpmte->db_instance from header directly, ignore dboffset argument
to rpmteNew() (removing the arg would just break api needlessly, otoh
it's unlikely that anything outside rpm actually uses rpmteNew())
- eliminate the now unnecessary added/removed union from te struct
- rpmteDBOffset() is now just an alias for rpmteDBInstance(), deprecate?
- set "instance" number on retrieval from rpmdb
- add public headerGetInstance() function for retrieving the value
- ported from rpm5.org, useful for number of things
- allow to run helper programs to check:
- generated SRPM
- each generated RPM after it is successfully written
- whole successfully written binary package set
- it is possible to use it for sanity checks