Panu Matilainen [Thu, 26 Jun 2008 10:59:06 +0000 (13:59 +0300)]
Unbreak compressFilelist()
- well and truly broken by yours truly by a Monday morning commit
efe1665024e374a8f8704d229b1d306af232c396, blush...
- can't use headerIsSource() here, as build calls compressFilelist()
before RPMTAG_SOURCERPM is added to the header, revert to earlier hack
and check filename beginning with / or not
- dncmp() expects address of a string, not the string itself, this was
masked by the above bug
Panu Matilainen [Thu, 26 Jun 2008 08:38:28 +0000 (11:38 +0300)]
Add a bit of protection against oversized files
- max size of individual files in cpio new ascii format is well known,
check we don't try to stuff in larger than what fits and abort cleanly
- this should do as long as we only support new ascii format cpio payloads
Panu Matilainen [Thu, 26 Jun 2008 07:50:01 +0000 (10:50 +0300)]
Type corrections
- Fread() and Fwrite() return ssize_t, not int32_t
- sigtag is rpmSigTag, not int32_t
Panu Matilainen [Wed, 25 Jun 2008 07:59:20 +0000 (10:59 +0300)]
Fix handling of "%posttrans -p /xxx" with no body (Pascal Rigaux)
Panu Matilainen [Wed, 25 Jun 2008 06:56:12 +0000 (09:56 +0300)]
Adjust autotest querytag expectations to match current tags
Panu Matilainen [Wed, 25 Jun 2008 06:53:21 +0000 (09:53 +0300)]
Adjust autotests for rpmi etc removal
Panu Matilainen [Wed, 25 Jun 2008 06:33:50 +0000 (09:33 +0300)]
Force "rpm" popt context for everything but build
- we want the same set of aliases to be seen no matter what name we're
invoked with, except for build which has it's own set of aliases
- this has a nice little side-effect of permitting popt aliases to work
from source tree on non-static builds despite libtool calling executables
lt-something instead of their real names
Panu Matilainen [Wed, 25 Jun 2008 06:20:27 +0000 (09:20 +0300)]
--buildpolicy is rpmbuild, not rpm, alias
Panu Matilainen [Wed, 25 Jun 2008 06:19:13 +0000 (09:19 +0300)]
Kill the million duplicate aliases in rpmpopt
Panu Matilainen [Wed, 25 Jun 2008 06:18:51 +0000 (09:18 +0300)]
Eliminate rpmd, rpmi, rpmk, rpmq "helper binaries"
- it's all rolled into "rpm" itself, these are just clutter and complicate
things needlessly
- leave symlinks to rpmquery, rpmverify, rpmsign and rpmdb -> rpm to
preserve some compatibility (at least rpmquery is known to be used
in scripts)
Panu Matilainen [Tue, 24 Jun 2008 13:07:05 +0000 (16:07 +0300)]
Update rpm manpage wrt build modes
- the build modes have been removed ages ago, just point to rpmbuild manual
Panu Matilainen [Tue, 24 Jun 2008 12:23:30 +0000 (15:23 +0300)]
Eliminate build-related aliases on "rpm"
- "rpm" for building packages hasn't worked in ~six years, time to clean
up the junk from rpmpopt
Panu Matilainen [Tue, 24 Jun 2008 08:11:38 +0000 (11:11 +0300)]
Eliminate already commented out build mode aliases for rpm
- these haven't been enabled in six years and not coming back...
Panu Matilainen [Tue, 24 Jun 2008 08:09:00 +0000 (11:09 +0300)]
Eliminate rpmb aliases from rpmpopt
Panu Matilainen [Tue, 24 Jun 2008 08:08:05 +0000 (11:08 +0300)]
Eliminate the pointless rpmb + rpmt symlinkery
- just build "rpmbuild" executable and install to bindir instead of
mucking with several different names
Panu Matilainen [Tue, 24 Jun 2008 07:08:37 +0000 (10:08 +0300)]
Force FD_CLOEXEC on all potentially open descriptors
- instead of just "100 should be large enough", use sysconf() to grab
number of max open files and do them all. If sysconf() fails,
use 1024 as "should be enough for everybody"
Panu Matilainen [Mon, 23 Jun 2008 13:57:51 +0000 (16:57 +0300)]
Remove artificial limit in dependency loop elimination attempts
- continue processing as long as progress can be made instead of artificial
hardcoded magic "try ten times"
Panu Matilainen [Mon, 23 Jun 2008 12:02:10 +0000 (15:02 +0300)]
Avoid silly deprecation warning on headerFreeData()
Panu Matilainen [Mon, 23 Jun 2008 11:37:54 +0000 (14:37 +0300)]
Simplify requires and provides addition in rpmfcGenerateDepends()
- just feed (name, evr and flags) one by one into header instead of
constructing arrays of them
Panu Matilainen [Mon, 23 Jun 2008 11:31:54 +0000 (14:31 +0300)]
Oops, provideflags were being inserted as requireflags
Panu Matilainen [Mon, 23 Jun 2008 05:46:51 +0000 (08:46 +0300)]
Add Malay translation from Sharuzzaman Ahmat Raslan
Panu Matilainen [Thu, 19 Jun 2008 13:08:00 +0000 (16:08 +0300)]
Dumb, dumb thinko/leftover from earlier prototype...
Panu Matilainen [Thu, 19 Jun 2008 12:52:54 +0000 (15:52 +0300)]
Use type-specific headerPuts() for rpmcache
- ...to finish of undoing yesterdays damage, sigh ;)
Panu Matilainen [Thu, 19 Jun 2008 12:52:19 +0000 (15:52 +0300)]
Use type-specific headerPut() for the case where it makes sense in relocs
Panu Matilainen [Thu, 19 Jun 2008 12:51:07 +0000 (15:51 +0300)]
Use type-specific headerPut() in rpmpsmStage()
Panu Matilainen [Thu, 19 Jun 2008 12:50:32 +0000 (15:50 +0300)]
Use type-specific headerPut() for installtid stuff in rpmdbAdd()
Panu Matilainen [Thu, 19 Jun 2008 12:49:09 +0000 (15:49 +0300)]
Use type-specific headerPut()'s for rpmtsImportPubkey()
Panu Matilainen [Thu, 19 Jun 2008 12:48:31 +0000 (15:48 +0300)]
Use type-specific headerPut()'s for legacy retrofitting stuff
Panu Matilainen [Thu, 19 Jun 2008 12:47:04 +0000 (15:47 +0300)]
Use type-specific headerPut() where makes sense in build/parseScript
Panu Matilainen [Thu, 19 Jun 2008 12:46:34 +0000 (15:46 +0300)]
Use type-specific headerPut() where makes sense in build/rpmfc.c
Panu Matilainen [Thu, 19 Jun 2008 12:45:57 +0000 (15:45 +0300)]
use type-specific headerPut() on all of build/reqprov.c
Panu Matilainen [Thu, 19 Jun 2008 12:45:37 +0000 (15:45 +0300)]
Use type-specific headerPut() on all of build/parseSpec.c
Panu Matilainen [Thu, 19 Jun 2008 12:45:06 +0000 (15:45 +0300)]
Use type-specific headerPut() for all of build/parsePreamble.c
Panu Matilainen [Thu, 19 Jun 2008 12:44:29 +0000 (15:44 +0300)]
Use type-specific headerPut() for all of build/parseChangelog.c
Panu Matilainen [Thu, 19 Jun 2008 12:43:45 +0000 (15:43 +0300)]
Use type specific headerPut() for all of build/pack.c
Panu Matilainen [Thu, 19 Jun 2008 12:43:14 +0000 (15:43 +0300)]
Use type specific headerPut() for all of build/files.c
Panu Matilainen [Thu, 19 Jun 2008 12:41:58 +0000 (15:41 +0300)]
Add type-safe headerPutFoo() methods for supported tag data types
- requiring all access through rpmtdFromFoo() just adds unnecessary
indirection and pain for little gain, the header is fairly intelligent
when it comes to inserting data
- this gives us various benefits over the old headerAddEntry() interface too:
+ basic type checking done by compiler
+ extra sanity checking (ie you can't add string data to integer tags,
don't permit adding more than one entry to non-array data etc)
+ "do the right thing" approach - add / append as needed and supported
by various types
+ headerPutString() can now be used on both single strings and string
arrays making the interface much nicer for the rather common case of
appending strings one by one to string array tags
Panu Matilainen [Wed, 18 Jun 2008 13:14:36 +0000 (16:14 +0300)]
Dumb thinko breaking scriptlet interpreter
Panu Matilainen [Wed, 18 Jun 2008 12:39:59 +0000 (15:39 +0300)]
Group legacy interfaces at the end of header.h
- out of sight, out of mind ;)
- add deprecation warnings where missing
- move to header_legacy doxygen group to avoid littering main documentation
Panu Matilainen [Wed, 18 Jun 2008 12:22:46 +0000 (15:22 +0300)]
Convert headerAddI18NString() to use headerPut()
Panu Matilainen [Wed, 18 Jun 2008 12:16:05 +0000 (15:16 +0300)]
Switch around headerAdd*Entry() family vs headerPut()
- make internal header add + append take rpmtd as argument, legacy
interfaces are just wrappers around them
- add deprecation markers
Panu Matilainen [Wed, 18 Jun 2008 11:59:13 +0000 (14:59 +0300)]
Switch around headerMod() and headerModifyEntry()
- headerModifyEntry() is the legacy interface going away, make it
use headerMod() and deprecate it
Panu Matilainen [Wed, 18 Jun 2008 11:54:41 +0000 (14:54 +0300)]
Stuff legacy compat wrappers out of sight into header_internal.c
- probably need to carry the compat stuff around for a while but get
them out of the way...
- headerFreeTag() and headerFreeData() are just the same thing, with
headerFreeTag() supposedly being the "new" interface which never was
used, duh :)
Panu Matilainen [Wed, 18 Jun 2008 11:35:56 +0000 (14:35 +0300)]
Start shredding legacy cruft out of header code
- headerGetRaw() can now be done with just a flag to headerGet()
Panu Matilainen [Wed, 18 Jun 2008 10:15:46 +0000 (13:15 +0300)]
Convert signature code to use headerPut()
- tags in signature header overlap with those in "regular" header,
can't use rpmtdFromFoo() as that would give totally bogus types and errors
- just add a wrapper around headerPut() that behaves like headerAddEntry()
Panu Matilainen [Wed, 18 Jun 2008 10:13:22 +0000 (13:13 +0300)]
Convert parseScript() to headerPut()
- AFAIR the only place in rpm where the type of a tag varies like this, ugh
- any modern rpm can handle the type being either string or string array,
but preserving legacy behavior for now...
Panu Matilainen [Wed, 18 Jun 2008 09:57:36 +0000 (12:57 +0300)]
Convert rpmpsmStage() to use headerPut()
Panu Matilainen [Wed, 18 Jun 2008 09:55:02 +0000 (12:55 +0300)]
Convert rpmdbAdd() to use headerPut()
Panu Matilainen [Wed, 18 Jun 2008 09:52:28 +0000 (12:52 +0300)]
Convert rpmtsImportPubkey() to use headerPut()
Panu Matilainen [Wed, 18 Jun 2008 09:37:42 +0000 (12:37 +0300)]
Convert RPM_BIN_TYPE uses in build to headerPut()
Panu Matilainen [Wed, 18 Jun 2008 09:36:20 +0000 (12:36 +0300)]
Add rpmtdFromUint8()
- handles CHAR, INT8 and BIN types
Panu Matilainen [Wed, 18 Jun 2008 08:32:59 +0000 (11:32 +0300)]
Convert legacy retrofits & friends to headerPut()
Panu Matilainen [Wed, 18 Jun 2008 08:16:04 +0000 (11:16 +0300)]
Lose the remaining hae and hme vectors from rpmfi
Panu Matilainen [Wed, 18 Jun 2008 08:13:58 +0000 (11:13 +0300)]
Convert file relocation to use headerPut/Mod
Panu Matilainen [Wed, 18 Jun 2008 07:59:45 +0000 (10:59 +0300)]
Add headerMod() to headerPut() etc family
- just a dumb wrapper around old headerModifyEntry() for now
Panu Matilainen [Wed, 18 Jun 2008 07:15:37 +0000 (10:15 +0300)]
Convert rpmcache to headerGet+Put
Panu Matilainen [Tue, 17 Jun 2008 13:11:49 +0000 (16:11 +0300)]
Number of sources can't very well be negative...
- also happens to avoid compiler whining about differing signedness
Panu Matilainen [Tue, 17 Jun 2008 13:07:55 +0000 (16:07 +0300)]
Shut up incompatible pointer warnings from rpmtdFromStringArray()
- it'd be far nicer to be able to append single strings to string arrays
through rpmtdFromString() but it'll require some interesting hackery
in header.c
- use temporary const char* pointer where necessary to convert to
const char ** compatible type before passing to rpmtdFromStringArray()
Panu Matilainen [Tue, 17 Jun 2008 13:04:12 +0000 (16:04 +0300)]
Make rpmtdFromStringArray() data argument const afterall
- produces somewhat less warnings as is, a bit surprisingly
Panu Matilainen [Tue, 17 Jun 2008 12:36:33 +0000 (15:36 +0300)]
Oops, RPMTAG_FILEMODES is INT16, not 32 type
Panu Matilainen [Tue, 17 Jun 2008 11:54:44 +0000 (14:54 +0300)]
Convert rest of writeRPM() to headerPut()
- can't use rpmtdFromFoo() on signature header tags so need to construct
them manually
Panu Matilainen [Tue, 17 Jun 2008 11:45:14 +0000 (14:45 +0300)]
Convert the final pieces of rpmfc to headerPut()
- more const-impedance here.. need to do something about it
Panu Matilainen [Tue, 17 Jun 2008 11:37:55 +0000 (14:37 +0300)]
Convert the rest of genCpioListAndHeader() to headerPut()
- explicitly cast all platform dependent data like time_t, mode_t etc
to the type used in headers always instead of having everything doubled
Panu Matilainen [Tue, 17 Jun 2008 11:24:16 +0000 (14:24 +0300)]
Add rpmtdFrom() methods for 16 and 64 bit types
Panu Matilainen [Tue, 17 Jun 2008 10:30:08 +0000 (13:30 +0300)]
Convert the straightforward bits of build/files.c to headerPut()
Panu Matilainen [Tue, 17 Jun 2008 09:57:59 +0000 (12:57 +0300)]
Convert most of parsePreamble to headerPut()
Panu Matilainen [Tue, 17 Jun 2008 09:56:53 +0000 (12:56 +0300)]
Convert build reqprov to headerPut()
- also changes index type to uint32_t instead of signed
Panu Matilainen [Tue, 17 Jun 2008 09:55:33 +0000 (12:55 +0300)]
Convert parseSpec to headerPut()
Panu Matilainen [Tue, 17 Jun 2008 09:55:01 +0000 (12:55 +0300)]
Convert parseChangelog to headerPut()
Panu Matilainen [Tue, 17 Jun 2008 09:10:01 +0000 (12:10 +0300)]
Convert most of build/pack.c to use rpmtdFromFoo() and headerPut()
- heavy on asserts() for now to catch out any problems
- sigtags can't use rpmtdFromFoo() as the tag numbers collide with the
regular tag table and would cause failures if we tried
Panu Matilainen [Tue, 17 Jun 2008 09:07:19 +0000 (12:07 +0300)]
Add some new rpmtd creation methods
- rpmtdFromString(), rpmtdFromStringArray() and rpmtdFromUint32() permit
populating tag containers of compatible datatypes that can be used for
headerPut() with some extra type-safety and sanity checks on the types
Panu Matilainen [Tue, 17 Jun 2008 06:07:37 +0000 (09:07 +0300)]
Replace headerRemoveEntry() with headerDel() everywhere
- this is a no-brainer s/headerRemoveEntry/headerDel/g operation as the
interface didn't actually change at all
Panu Matilainen [Tue, 17 Jun 2008 06:02:41 +0000 (09:02 +0300)]
Rename headerRemoveEntry() to headerDel(), add compat wrapper
- no differences here except headerDel is a nice short name (lifted from
rpm5.org) to go with the new headerGet() etc family
- deprecate headerRemoveEntry()
Panu Matilainen [Tue, 17 Jun 2008 05:49:19 +0000 (08:49 +0300)]
Eliminate last headerFreeData() in rpmfi
Panu Matilainen [Sat, 14 Jun 2008 11:43:15 +0000 (14:43 +0300)]
Preserve headerNext() allocation behavior
- commit
bca23d19af0a6d7371d18f6fd763e37e03f6e21a accidentally changed
it to MINMEM which breaks signature checking, lovely...
Panu Matilainen [Sat, 14 Jun 2008 08:31:15 +0000 (11:31 +0300)]
Lose the useless tag data type fields from rpmds
- we know names and evrs are string arrays, if they're not we're screwed
anyway, and flags need to be freed if header is not around
- there goes hfd() too...
Panu Matilainen [Mon, 16 Jun 2008 06:24:46 +0000 (09:24 +0300)]
Use PRIu64 for file size formatter in queries
Panu Matilainen [Mon, 16 Jun 2008 06:06:15 +0000 (09:06 +0300)]
Doxygen parameter name mismatch
Panu Matilainen [Fri, 13 Jun 2008 13:55:12 +0000 (16:55 +0300)]
Deprecate headerGetEntry() and headerGetEntryMinMemory()
Panu Matilainen [Fri, 13 Jun 2008 13:52:39 +0000 (16:52 +0300)]
Convert rpmtsSolve() to new headerGet()
Panu Matilainen [Fri, 13 Jun 2008 13:44:35 +0000 (16:44 +0300)]
Kill off hge() and hfd() vectors in rpmfi_s
- hfd() with FORCEFREE or STRING_ARRAY is just regular free()
- hge() no longer needed...
Panu Matilainen [Fri, 13 Jun 2008 13:38:10 +0000 (16:38 +0300)]
Lose the remaining hge() uses in rpmfi relocation
- ugly hackery for now, otoh it wasn't pretty to start with...
- always make a "sparse" dupe of directory names so we know how to free
it even if just some of the directories were relocated (this was broken
from the previous round of relocation alloca removal hackery)
- take advantage of RPMTD_PTR_ALLOCED to correctly free in all cases
Panu Matilainen [Fri, 13 Jun 2008 11:17:08 +0000 (14:17 +0300)]
RPMTAG_FILEFLAGS is not used for anything in relocations
Panu Matilainen [Fri, 13 Jun 2008 10:59:04 +0000 (13:59 +0300)]
Convert validRelocation parts of relocateFileList() to new headerGet()
- one piece at a time, this baby breaks easily ;)
- take advantage of iterating over td as possible..
Panu Matilainen [Fri, 13 Jun 2008 10:52:32 +0000 (13:52 +0300)]
Unbreak relocations broken by
621e7518418a0e031d302e8681fe0bf81d0c4b72
- stick scareFlags into rpmfi_s for now so they're available everywhere
- subtle games with how fi->dil is alloced on scareMem behavior, don't
blow up and don't leak memory either
- stuff scareFlags into rpmfi struct for now
Jindrich Novy [Fri, 13 Jun 2008 10:51:01 +0000 (12:51 +0200)]
Use 64bit sizes by default in rpmcache
Jindrich Novy [Fri, 13 Jun 2008 10:31:26 +0000 (12:31 +0200)]
Allow spaces in Source/Patch URLs and filenames
Panu Matilainen [Fri, 13 Jun 2008 09:23:46 +0000 (12:23 +0300)]
Simplify providePackageNVR()
- convert providePackageNVR() to new headerGet()
- use rpmds to figure if we already have the provide instead of manually
doing it
Panu Matilainen [Fri, 13 Jun 2008 08:42:46 +0000 (11:42 +0300)]
hfd with FORCEFREE is just _free()
Panu Matilainen [Fri, 13 Jun 2008 08:42:06 +0000 (11:42 +0300)]
Convert rpmpsmStage() to new headerGet()
- grabbing fi->fuser and fi->fgroup there seem completely unnecessary,
they're always populated from rpmfiNew() afaict...
- hfd() with FORCEFREE is just the same as _free()...
Panu Matilainen [Fri, 13 Jun 2008 08:27:13 +0000 (11:27 +0300)]
Convert runImmedTriggers() to use new headerGet()
Panu Matilainen [Fri, 13 Jun 2008 08:17:00 +0000 (11:17 +0300)]
Minimally convert handleOneTrigger() to use new headerGet()
Panu Matilainen [Fri, 13 Jun 2008 07:27:46 +0000 (10:27 +0300)]
Convert legacyRetrofit() to new headerGet()
Panu Matilainen [Fri, 13 Jun 2008 07:21:40 +0000 (10:21 +0300)]
Minimally convert handleInstInstalledFiles() to new headerGet()
- fi->hge style doesn't matter as otherStates is just local temp variable,
use MINMEM always to avoid unnecessary copy (DEFAULT wouldn't copy either
atm but..)
Panu Matilainen [Fri, 13 Jun 2008 07:16:24 +0000 (10:16 +0300)]
Minimally convert rpmdbFindFpList() to use new headerGet()
Panu Matilainen [Fri, 13 Jun 2008 07:09:20 +0000 (10:09 +0300)]
Minimally convert rpmdsNew() to use new headerGet()
- take advantage of HEADERGET_ALLOC to avoid manually duplicating Flags
- otherwise just dumb minimal conversion for now, rpmds could make use
of rpmtd iteration etc but leaving that for later...
Panu Matilainen [Thu, 12 Jun 2008 14:37:33 +0000 (17:37 +0300)]
Convert a few hge()'s in relocation code to new headerGet() & friends
Panu Matilainen [Thu, 12 Jun 2008 14:09:35 +0000 (17:09 +0300)]
Make fssizes tag extension 64bit
- type changing doesn't matter much as this is just runtime generated data,
not from headers
- also gets rid of the remaining old hge() use in tagexts
Panu Matilainen [Thu, 12 Jun 2008 14:03:04 +0000 (17:03 +0300)]
Change rpmGetFilesystemUsage() size args to rpm_loff_t
Panu Matilainen [Thu, 12 Jun 2008 13:41:31 +0000 (16:41 +0300)]
Make rpmfiFSize() return rpm_loff_t type, fixup callers
- Internally file sizes are still stored as 32bit, going to 64bit wouldn't
make much sense (would only waste memory for nothing) as long as we're
bound by cpio's 32bit per-file limit. Being "64bit ready" for filesizes
doesn't hurt anything though...