- valgrind is not happy about us now processing /proc/self/auxv on Linux,
this can be used to suppress the false positives when running
rpm under valgrind. At least until a better solution is found or
valgrind is taught to treat /proc/self/auxv specially (see
https://bugs.kde.org/show_bug.cgi?id=253519)
- Lump glob.h and glob.c into rpmglob.c in all their g(l)ory libc
decorations and make everything static to stop overriding system
library symbols with our own glob().
- In particular (aside from basics working) we're interested in
the broken symlink behavior: at least glibc and Solaris have
a weird glob() which doesn't return broken symlinks at all,
yet we need to be able to package them (and that's why rpm
carries its own copy of a differently broken, old glibc glob)
- Also test for directory-only match (RhBug:505995 cases)
- Only try to parse one thing at a time so the caller knows what
value its going to get if any and doesn't have to pass both
current and default pointers. Just simplifies things a little.
- Now that this is relatively sanely doable... make %license with
non-absolute paths behave similarly to %doc, only installing to a
different directory (%_licensedir) and with different flags:
licenses are not generic documentation and should not be skipped
on installation even if --nodocs is used. The common practise of
stuffing licenses into %doc actually violates various licenses
which require the license text to always accompany the software.
- While ticket #116 suggests various schemes to reduce disk usage,
adding some very special logic to installation code just to deal
with these doesn't seem justifiable, given how small the licenses
generally are. However with licenses now in their own directory
structure (/usr/share/licenses by default), running hardlink on
them is trivial for cases where disk space is tight
(live images, embedded systems etc)
- Spec being the first is easily detected from the current index,
no need for separate tracking variable
- Use the file records used variable to track the progress, no need
for separate index variable
- All the necessary data is in FileRecords struct so we only
need to pass that. Dont bother NULLing everything as these
are not passed around in a way where it would matter.
- The negate field has never been used nor does it seem very useful
either: %verify negation can't be handled by it anyway, and
for others it hardly makes sense.
- While at it, make virtualFileAttributes const and fix the
indentation
- Add a new struct to hold the necessary bits and pieces about
these special directories with functions to create & free for
easy management for callers, move the remaining processing into
processSpecialDocs() to make that part one-stop shop for the
caller as well.
- Should not change functionality in any way.
- Spit a warning on illegal _docdir_fmt and fall back to the default
format (which cannot fail). This just isn't worth dying for and
avoids having to deal with such a petty error elsewhere.
Teach %prep and %uncompress how to handle 7zip tarballs, with
the mingw toolchain landing in fedora, this may be useful when
crossbuilding Windows sources compressed using 7zip (CxImage is
one such project).
- There's no need to carry the special doc directory in the
package struct, the directory is only a fleeting thing deep down
in the filelist parsing. Handle local-only needs locally.
- No behavior/semantic changes intended or expected.
- Change parseForSimple() to return all filenames it finds, moving
most sanity checking and decision making of what goes where to
processPackageFiles() which has a better overall view of things.
This also means we could trivially handle more than one file per
%files line, but keeping the (now artificial) limitation for now
at least.
- Collect special %doc arguments individually to a local ARGV,
split the script generation and execution to a separate helper
function.
- Actual semantics / behavior is not supposed to change (other than
'cp' now getting called once per %doc arg, not per %doc line), but
knock wood, this is a larger at-once change than I care for.
- The negate field is unused in all the attributes anyway, but
the whole concept doesn't make any sense for the virtual file
attributes. Simplifies the thing another little bit.
- Cleans things up a little bit by removing the special test
for %dir in parseForSimple(). The separate isDir is still necessary
for directory recursion tracking but that's separate from parsing
the line.
- Simplifies and cleans up things a bit as parseForSimple() now only
parses this and processPackageFiles() acts on the result, and
doesn't need specific argument checking now (only %doc is allowed
to have more than one file per line)
- RPMFILE_EXCLUDE only exists during spec parse, and doesn't "leak"
into headers only because the file is, well, excluded to start with.
Unexport the internal-only bit and explicitly strip out any excess
bits from data going to header. The current 16/16 split is artificial
of course, RPMTAG_FILEATTRS is 32bit so there's plenty of room
for growing new file attributes, with internal-only adjustments
required.
- Eliminate RPMFILE_UNPATCHED while at it, this is a leftover
from Suse patch rpms which are no longer used anywhere.
- This always was a rare creature, driven to extinction long time
ago when Copyright: changed to License: which masks the %license
directive of %files list with a macro holding the the textual
description from License tag, causing errors.
- Override %license during %files parsing to bring back its original
meaning, useless as it might be in its current form.
- It doesn't need the entire filelist, just the current file
pointer (or actually just the caps string but for consistency...)
That we need to track for capability presence overall is a different
thing, that doesn't need to be in parseForCaps() at all.
- It doesn't need the entire filelist, just current file entry (actually
just the lang pointer but for consistency with others...)
- We could (and perhaps should) now quite easily support %deflang as well,
but leaving that to another time...