Panu Matilainen [Tue, 29 Apr 2008 12:50:43 +0000 (15:50 +0300)]
Remove unused alloca_strdup() define
Panu Matilainen [Tue, 29 Apr 2008 12:08:47 +0000 (15:08 +0300)]
Allocate directory names on heap in compressFilelist()
Panu Matilainen [Tue, 29 Apr 2008 11:44:28 +0000 (14:44 +0300)]
Use rpmGetPath() to construct full dbpath in db3open()
- another alloca() bites the dust...
Panu Matilainen [Tue, 29 Apr 2008 11:17:09 +0000 (14:17 +0300)]
Oops, one more alloca() in rpmtsOrder()
Panu Matilainen [Tue, 29 Apr 2008 11:13:59 +0000 (14:13 +0300)]
Remove alloca() from rpmtsOrder()
Panu Matilainen [Tue, 29 Apr 2008 11:02:06 +0000 (14:02 +0300)]
Dead code elimination
Panu Matilainen [Tue, 29 Apr 2008 10:49:53 +0000 (13:49 +0300)]
Remove alloca() from rpmvercmp()
- use variable array instead, versions had better be short enough to fit
on stack safely
Panu Matilainen [Tue, 29 Apr 2008 10:33:09 +0000 (13:33 +0300)]
Avoid alloca() in headerLoad()
- REGION_TAG_COUNT is a constant so local array would do even without
C99..
Panu Matilainen [Tue, 29 Apr 2008 10:17:33 +0000 (13:17 +0300)]
Avoid alloca() in findTag()
- instead of putting RPMTAG_ into strings where it's not present,
do it the other way around
- avoids a string copy and redundant string comparisons on the RPMTAG_ part
Panu Matilainen [Tue, 29 Apr 2008 09:59:20 +0000 (12:59 +0300)]
Avoid alloca() in shescapeFormat()
Panu Matilainen [Tue, 29 Apr 2008 09:45:51 +0000 (12:45 +0300)]
Avoid alloca() in headerAddI18NString()
Panu Matilainen [Tue, 29 Apr 2008 09:40:03 +0000 (12:40 +0300)]
This code has been commented out since -99, time to let go...
Panu Matilainen [Tue, 29 Apr 2008 08:54:44 +0000 (11:54 +0300)]
Eliminate remaining alloca() in rpmAddSignature()
Panu Matilainen [Tue, 29 Apr 2008 08:53:13 +0000 (11:53 +0300)]
Plug memleaks in signature generation
Panu Matilainen [Tue, 29 Apr 2008 08:35:30 +0000 (11:35 +0300)]
Avoid alloca() in rpmtsSetRootDir()
Panu Matilainen [Tue, 29 Apr 2008 08:26:00 +0000 (11:26 +0300)]
Avoid alloca() in rpmDetectPGPVersion()
- the whole detection is hysterical and could/should probably be killed
but what the heck...
Panu Matilainen [Tue, 29 Apr 2008 08:24:25 +0000 (11:24 +0300)]
Avoid alloca() in makeGPGSignature()
Panu Matilainen [Tue, 29 Apr 2008 08:16:46 +0000 (11:16 +0300)]
Avoid unchecked stpcpy() to static sized buf from alloca()
Panu Matilainen [Tue, 29 Apr 2008 08:12:15 +0000 (11:12 +0300)]
Avoid alloca() in rpmtsInitIterator()
Panu Matilainen [Tue, 29 Apr 2008 08:02:41 +0000 (11:02 +0300)]
Read "canonvendor" macros by default again
- the whole vendor etc stuff needs rethinking etc, but for now this "works"
Panu Matilainen [Tue, 29 Apr 2008 07:40:56 +0000 (10:40 +0300)]
Avoid alloca() in legacyRetrofit()
Panu Matilainen [Tue, 29 Apr 2008 07:34:54 +0000 (10:34 +0300)]
Use rpmioSlurp() for reading in rpmrc's
- have doReadRC() do the opening of files instead of caller
- always expand rc filename on entry, simplifies includes too
- streamline exit paths
Panu Matilainen [Tue, 29 Apr 2008 06:59:56 +0000 (09:59 +0300)]
Use rpmGlob() for expanding rcfiles globs
- avoids static filename buffer and simplifies things quite a bit
Jindrich Novy [Mon, 28 Apr 2008 15:30:25 +0000 (17:30 +0200)]
Rewrite rpmioMkpath()
Panu Matilainen [Mon, 28 Apr 2008 19:25:47 +0000 (22:25 +0300)]
genCpioListAndHeader() indentation fixes, no other changes
Panu Matilainen [Mon, 28 Apr 2008 18:58:26 +0000 (21:58 +0300)]
Allocate buffer for %doc filenames dynamically
Panu Matilainen [Mon, 28 Apr 2008 18:37:47 +0000 (21:37 +0300)]
Remove unnecessary block which just messes up indentation
Panu Matilainen [Mon, 28 Apr 2008 18:35:26 +0000 (21:35 +0300)]
Set processingFailed just once
Panu Matilainen [Mon, 28 Apr 2008 18:18:00 +0000 (21:18 +0300)]
Don't leak memory on failure in checkForValidArchitectures()
Panu Matilainen [Mon, 28 Apr 2008 17:05:07 +0000 (20:05 +0300)]
Remove unused alloca_strdup() macro
Panu Matilainen [Mon, 28 Apr 2008 16:10:25 +0000 (19:10 +0300)]
Remove alloca() from strntoul() helper in cpio
- only small (< 10 chars) buffers from struct cpioCrcPhysicalHeader are
ever passed in, tmp buffer on stack is safe
Jindrich Novy [Mon, 28 Apr 2008 13:59:46 +0000 (15:59 +0200)]
Get rid of string hackery in rpmdb-py.c
Jindrich Novy [Mon, 28 Apr 2008 13:42:04 +0000 (15:42 +0200)]
Remove alloca() from argv.c
Panu Matilainen [Mon, 28 Apr 2008 13:22:33 +0000 (16:22 +0300)]
Oops...
Panu Matilainen [Mon, 28 Apr 2008 13:03:44 +0000 (16:03 +0300)]
..and for parseForLang()
- return rpmRC like the others
- avoid alloca()
- streamline exit paths
Panu Matilainen [Mon, 28 Apr 2008 13:00:16 +0000 (16:00 +0300)]
..and the same for parseForConfig()
- streamline exists, avoid alloca()
Panu Matilainen [Mon, 28 Apr 2008 12:57:32 +0000 (15:57 +0300)]
parseForAttr() tweaks
- streamline exit paths a bit
- replace alloca() with xmalloc()
- avoid messing q value while checking for white space
- return rpmRC like the others
Panu Matilainen [Mon, 28 Apr 2008 12:50:15 +0000 (15:50 +0300)]
Avoid alloca() in parseForVerify(), streamline exit paths a bit
Panu Matilainen [Mon, 28 Apr 2008 12:41:55 +0000 (15:41 +0300)]
Avoid alloca() in parseForDev()
Jindrich Novy [Mon, 28 Apr 2008 12:08:35 +0000 (14:08 +0200)]
Oops, simplified it a little bit much, fixing
Panu Matilainen [Mon, 28 Apr 2008 11:47:12 +0000 (14:47 +0300)]
Avoid alloca() in rpmGetFilesystemUsage()
Panu Matilainen [Mon, 28 Apr 2008 11:42:10 +0000 (14:42 +0300)]
Avoid alloca() in getFilesystemList()
Jindrich Novy [Mon, 28 Apr 2008 11:41:45 +0000 (13:41 +0200)]
Remove remaining alloca() from rpmdb.c
Jindrich Novy [Mon, 28 Apr 2008 11:40:56 +0000 (13:40 +0200)]
Simplify dirName handling in rpmdbFindByFile()
Panu Matilainen [Mon, 28 Apr 2008 10:56:31 +0000 (13:56 +0300)]
Drop va_copy check, it's already done by C99 checks
Panu Matilainen [Mon, 28 Apr 2008 10:53:35 +0000 (13:53 +0300)]
Require C99 capable compiler in configure
- also enable C99 mode if not on by default
Jindrich Novy [Mon, 28 Apr 2008 10:50:24 +0000 (12:50 +0200)]
Remove alloca() ussage from rpmcache.c
Jindrich Novy [Mon, 28 Apr 2008 10:50:01 +0000 (12:50 +0200)]
Remove unused alloca'd variable
Jindrich Novy [Mon, 28 Apr 2008 10:38:32 +0000 (12:38 +0200)]
Remove alloca() from build()
Panu Matilainen [Mon, 28 Apr 2008 09:31:51 +0000 (12:31 +0300)]
Eliminate pointless alloca() of hsa struct
Panu Matilainen [Mon, 28 Apr 2008 09:25:25 +0000 (12:25 +0300)]
Remove bogus/misleading return value of hsaInit() and hsaFini()
- they don't (de)allocate anything, just modify contents of hsa arg
Panu Matilainen [Mon, 28 Apr 2008 09:22:33 +0000 (12:22 +0300)]
Remove useless hsa != NULL checks
- hsa has been already dereferenced before it's even checked for NULL in
both hsaInit() and hsaNext()
- they're just internal interfaces with limited number of callers, we know
hsa can't be NULL
Panu Matilainen [Mon, 28 Apr 2008 07:59:42 +0000 (10:59 +0300)]
Remove unused variable
Panu Matilainen [Sat, 26 Apr 2008 11:41:58 +0000 (14:41 +0300)]
Eliminate pointless alloca() of entryInfo and indexEntry structs
Panu Matilainen [Sat, 26 Apr 2008 12:05:50 +0000 (15:05 +0300)]
Eliminate pointless alloca() of local DBT structs
Panu Matilainen [Sat, 26 Apr 2008 12:02:33 +0000 (15:02 +0300)]
Eliminate pointless alloca() of struct fileIndexEntry struct
Panu Matilainen [Sat, 26 Apr 2008 11:59:09 +0000 (14:59 +0300)]
Eliminate pointless alloca() of availableIndexEntry struct.
Panu Matilainen [Sat, 26 Apr 2008 11:51:20 +0000 (14:51 +0300)]
Eliminate pointless alloca()'s of local dirInfo struct
Panu Matilainen [Sat, 26 Apr 2008 11:27:30 +0000 (14:27 +0300)]
Eliminate pointless alloca() of entryInfo and indexEntry structs
Panu Matilainen [Sat, 26 Apr 2008 11:21:22 +0000 (14:21 +0300)]
Eliminate pointless alloca() of local DBT structs.
Panu Matilainen [Fri, 25 Apr 2008 17:29:14 +0000 (20:29 +0300)]
Panu Matilainen [Fri, 25 Apr 2008 12:39:04 +0000 (15:39 +0300)]
Replace alloca() + memset() with xcalloc() in runImmedTriggers()
Panu Matilainen [Fri, 25 Apr 2008 12:37:09 +0000 (15:37 +0300)]
Avoid alloca() in markReplacedFiles()
Panu Matilainen [Fri, 25 Apr 2008 11:52:03 +0000 (14:52 +0300)]
Reduce alloca() use in relocateFileList()
- dirindexes and filelists can be *huge*
- filenames and such still allocated on stack, fix later...
Panu Matilainen [Fri, 25 Apr 2008 11:34:36 +0000 (14:34 +0300)]
Replace alloca() + memset() with xcalloc() in skipFiles()
Panu Matilainen [Fri, 25 Apr 2008 11:07:31 +0000 (14:07 +0300)]
Avoid alloca() on links in printFileInfo()
- also avoid unnecessary nulling of perms, no point ..
Panu Matilainen [Fri, 25 Apr 2008 10:54:59 +0000 (13:54 +0300)]
Avoid alloca() in rpmInstall()
Panu Matilainen [Fri, 25 Apr 2008 10:39:44 +0000 (13:39 +0300)]
Simplify setPathDefault()
- use rpmGetPath() to get sanitized path, avoid alloca()
Panu Matilainen [Fri, 25 Apr 2008 10:28:51 +0000 (13:28 +0300)]
Avoid alloca() in rpmteColorDS()
Panu Matilainen [Fri, 25 Apr 2008 08:55:14 +0000 (11:55 +0300)]
Single point of exit for dateToTimet(), avoid alloca()
Panu Matilainen [Fri, 25 Apr 2008 08:45:35 +0000 (11:45 +0300)]
Simplify lookupPackage(), avoid alloca()
Panu Matilainen [Thu, 24 Apr 2008 14:36:31 +0000 (17:36 +0300)]
Remove outdated comment, add a todo reminder
- callbacks for pkgs without files have been faked for some time now..
Panu Matilainen [Thu, 24 Apr 2008 13:48:32 +0000 (16:48 +0300)]
Might as well compare against tag shortname now that we have it
Panu Matilainen [Thu, 24 Apr 2008 12:40:36 +0000 (15:40 +0300)]
Update translations for a change
Panu Matilainen [Thu, 24 Apr 2008 12:38:45 +0000 (15:38 +0300)]
Remove bogus const from rpmfi pre- and posttrans members
- they're always duped, scaremem or not
Panu Matilainen [Thu, 24 Apr 2008 12:23:35 +0000 (15:23 +0300)]
Eliminate rpmtsi refcount debug junk from the API
Panu Matilainen [Thu, 24 Apr 2008 12:16:03 +0000 (15:16 +0300)]
Update doxygen docs for rpmteNEVR() and friends
Panu Matilainen [Thu, 24 Apr 2008 12:08:09 +0000 (15:08 +0300)]
Remove meaningless extern on function declarations in headers
Panu Matilainen [Thu, 24 Apr 2008 11:56:27 +0000 (14:56 +0300)]
Add rpmteEVR() function
- seems like a useful thing to have
- use in ensureOlder()
Panu Matilainen [Thu, 24 Apr 2008 11:51:58 +0000 (14:51 +0300)]
I'm out of words for this one.
Panu Matilainen [Thu, 24 Apr 2008 10:23:22 +0000 (13:23 +0300)]
Check for chroot() result in rpmtsRun()
- bail out early if it fails instead of blindly continuing and potentially
messing in real root (chroot can fail for priviledged user too)
Panu Matilainen [Thu, 24 Apr 2008 09:49:58 +0000 (12:49 +0300)]
Make verification with --root reliable (rhbz#434150)
- use chroot() instead of vain path manipulation games, otherwise we'll get
bogus results from users and groups not matching etc
- non-priviledged verification is unreliable anyway but running rpm under
fakechroot (unpriviledged) gives much better results than just prepending
root to paths
Panu Matilainen [Thu, 24 Apr 2008 09:03:45 +0000 (12:03 +0300)]
Force preloading of name service libraries early in initialization
- this used to be done in psm chroot operation, but we can end up chrooting
before that and without psm being involved
- don't bother with getpwnam() etc, a single gethostbyname() loads all
that we need
Panu Matilainen [Tue, 22 Apr 2008 13:08:43 +0000 (16:08 +0300)]
Relax spec permissions in tar build mode (rhbz#253648)
- mkstemp() can create the spec in overly protective mode (rpmlint whines),
relax up to what users umask permits
Panu Matilainen [Tue, 22 Apr 2008 12:23:38 +0000 (15:23 +0300)]
Simplify rebuild path generation
Panu Matilainen [Tue, 22 Apr 2008 10:55:41 +0000 (13:55 +0300)]
More path manipulation craziness eliminated in rpmdbRemoveDatabase()
Panu Matilainen [Tue, 22 Apr 2008 10:44:10 +0000 (13:44 +0300)]
Eliminate wtf dbpath shuffling in rpmdbMoveDatabase()
- Just use rpmGetPath() to construct a clean, sanitized path from the
components.
- Previously it went to great lengths to ensure trailing / on dbpath,
catenate the paths with %s/%s/%s and then rpmCleanPath() to get rid
of the extra slashes just created. Eh.
Panu Matilainen [Tue, 22 Apr 2008 10:32:52 +0000 (13:32 +0300)]
Don't use alloca for struct stat, there's no need to.
Panu Matilainen [Tue, 22 Apr 2008 10:30:52 +0000 (13:30 +0300)]
Add rpmdb internal helper for cleaning up db4 environment, use it
Jindrich Novy [Tue, 22 Apr 2008 10:41:08 +0000 (12:41 +0200)]
Recognize lzma payload from its magic
- old lzma formats without magic aren't supported
Jindrich Novy [Tue, 22 Apr 2008 10:39:55 +0000 (12:39 +0200)]
Prefer lzma's default -7 compression
Jindrich Novy [Tue, 22 Apr 2008 10:38:51 +0000 (12:38 +0200)]
Main lzma rpmio part based on SuSE patches, thanks for them!
Jindrich Novy [Tue, 22 Apr 2008 10:37:18 +0000 (12:37 +0200)]
Handle lzma payload
Jindrich Novy [Tue, 22 Apr 2008 10:36:27 +0000 (12:36 +0200)]
Check for lzma library in configure.ac and reference it in Makefile.am
Jindrich Novy [Tue, 22 Apr 2008 10:32:59 +0000 (12:32 +0200)]
Allow lzma payload in writeRPM()
Panu Matilainen [Mon, 21 Apr 2008 09:39:18 +0000 (12:39 +0300)]
Rip i386-specific RDTSC support from rpmsw, use gettimeofday() everywhere
- we don't need accuracy beyond what gettimeofday() offers for bleeping
debugging benchmarks
- we especially don't need hw-specific magic asm voodoo to get unreliable
timing results (RDTSC isn't reliable with multi-core/hyperthreaded CPU's
etc etc)
Panu Matilainen [Mon, 21 Apr 2008 08:13:13 +0000 (11:13 +0300)]
Avoid %patch0 getting applied twice
Panu Matilainen [Mon, 21 Apr 2008 07:59:31 +0000 (10:59 +0300)]
Retrofit RPMTAG_SOURCEPACKAGE to source rpms.
Panu Matilainen [Mon, 21 Apr 2008 07:33:02 +0000 (10:33 +0300)]
Use argvAppend() instead of manual reallocs, plug a leak from rpmGlob()
Panu Matilainen [Mon, 21 Apr 2008 07:18:14 +0000 (10:18 +0300)]
Use argvNew() instead of manual xcalloc()