Panu Matilainen [Tue, 13 May 2008 09:32:25 +0000 (12:32 +0300)]
Add headerPut() for adding data to headers through tag container
- tag container isn't that big a win on add/append operations as it is on
retrieval, just use the existing headerAddEntry() family to do the
actual work
- headerPut() is a nice and short name, lifted from rpm5.org, API might
differ
- flags to control operation, just whether append is permitted or not for now
Panu Matilainen [Tue, 13 May 2008 08:59:19 +0000 (11:59 +0300)]
Use a macro for copying td entries in compat wrappers
- just to avoid tedious umphteen copies of if (c) *c = ...
Panu Matilainen [Tue, 13 May 2008 08:46:33 +0000 (11:46 +0300)]
Convert header tag iterator to use rpmtd
- new API function headerNext() for the new interface
- headerNextIterator() is just a compat wrapper
Panu Matilainen [Tue, 13 May 2008 08:38:38 +0000 (11:38 +0300)]
Convert headerGetEntry() internals to use rpmtd for data
- new public API function headerGet() that returns data in rpmtd, with
flags to control operation (just minmem or no for now)
- headerGet() is nice and short name, lifted from rpm5.org but our API
differs as this takes a separate arg for the tag to get instead of
(ab)using the container to pass data back and forth
- internal compatibility wrapper to keep headerGetEntry() and -MinMem
version working
Panu Matilainen [Tue, 13 May 2008 08:14:50 +0000 (11:14 +0300)]
Start converting header internals to use the rpmtd struct
- turn copyEntry() into a wrapper around copyTdEntry() to avoid having
to convert everything at once
- copyTdEntry() takes rpmtd and populates with data and whether memory
was allocated or not
Panu Matilainen [Tue, 13 May 2008 08:02:45 +0000 (11:02 +0300)]
New "tag data" container struct + some basic methods to deal with it
- to be used for passing around header and extension data
- inspired by similar changes in rpm5.org, details and implementation differ
Panu Matilainen [Mon, 12 May 2008 15:32:11 +0000 (18:32 +0300)]
Remove tags from headerSprintfArguments
- its always rpmTagTable so no point carrying it around
Panu Matilainen [Mon, 12 May 2008 15:27:36 +0000 (18:27 +0300)]
Update translations again for headerfmt.c split
Panu Matilainen [Mon, 12 May 2008 15:26:11 +0000 (18:26 +0300)]
headerfmt.c has translatable strings, add to POTFILES
Panu Matilainen [Mon, 12 May 2008 15:03:47 +0000 (18:03 +0300)]
Use rpmTagGetFoo() instead of local myTagFoo() versions
- hsa tags will always be our default rpmTagTable so we can use the
somewhat optimized rpmTagGet() versions instead of dumb linear searchs
Panu Matilainen [Mon, 12 May 2008 14:25:54 +0000 (17:25 +0300)]
Push extension defaults one level deeper into headerFormat()
Panu Matilainen [Mon, 12 May 2008 14:08:12 +0000 (17:08 +0300)]
Simplify header extension handling
- remove the now unnecessary chaining to different extension tables
Panu Matilainen [Mon, 12 May 2008 13:53:26 +0000 (16:53 +0300)]
Move headerVerifyInfo() to header.[ch] where it logically belongs
- removes the need for copy-paste typeAlign array in package.c
Panu Matilainen [Mon, 12 May 2008 13:31:27 +0000 (16:31 +0300)]
Eliminate copy-paste versions of hdrchkFoo() macros
- just stick 'em into header_internal.h, both header.c and package.c
need it anyway
Panu Matilainen [Mon, 12 May 2008 13:20:13 +0000 (16:20 +0300)]
Convert internal uses of headerSprintf() to headerFormat()
Panu Matilainen [Mon, 12 May 2008 13:16:37 +0000 (16:16 +0300)]
Add simpler headerFormat() function, deprecate headerSprintf()
- headerSprintf() is just a dumb wrapper around headerFormat() now,
tbltags and extensions are not used at all
- baby steps towards eliminating the the tag and extension tables from
the API/ABI...
Panu Matilainen [Mon, 12 May 2008 12:48:31 +0000 (15:48 +0300)]
Split header sprintf formatting to separate source
- header.c is now just low level header handling, headerfmt.c is the
formatting engine and formats.c has the actual formats
- also move bunch of formatting-related stuff from header_internal.h to
headerfmt.c, nothing else needs it
Jindrich Novy [Mon, 12 May 2008 10:46:37 +0000 (12:46 +0200)]
fully translate to CZ after latest po files regeneration
Panu Matilainen [Mon, 12 May 2008 09:54:36 +0000 (12:54 +0300)]
Move header "default" formats to formats.c along with the rest of 'em
Panu Matilainen [Mon, 12 May 2008 09:31:54 +0000 (12:31 +0300)]
Update translations after the big shuffle
Panu Matilainen [Mon, 12 May 2008 09:30:00 +0000 (12:30 +0300)]
Adjust pkg-config now that librpmdb is gone
Panu Matilainen [Mon, 12 May 2008 09:28:12 +0000 (12:28 +0300)]
Fixup paths and Makefiles for rpmdb/ elimination
Panu Matilainen [Mon, 12 May 2008 09:17:01 +0000 (12:17 +0300)]
Start (re-)joining librpmdb and librpm
- the split is largely arbitrary and mostly just causes, well, arbitrary
issues and limitations
- just move content from rpmdb/ to lib/ for now
Panu Matilainen [Mon, 12 May 2008 07:45:33 +0000 (10:45 +0300)]
Rip old, bit-rotten librpm test programs
Panu Matilainen [Mon, 12 May 2008 07:44:07 +0000 (10:44 +0300)]
Rip old, bit-rotten librpmio test programs
Panu Matilainen [Mon, 12 May 2008 07:40:14 +0000 (10:40 +0300)]
Rip old, bit-rotten librpmdb test programs
Panu Matilainen [Mon, 12 May 2008 06:14:09 +0000 (09:14 +0300)]
Remove internal copy of Lua for good
- we can do just fine with externally linked lua, no need to carry
this around
Jindrich Novy [Sat, 10 May 2008 06:55:04 +0000 (08:55 +0200)]
Fully transale RPM to Czech
- convert the po file to UTF-8
- translate all strings
Panu Matilainen [Thu, 8 May 2008 16:03:12 +0000 (19:03 +0300)]
Caught pants down with strlcpy() vs strncpy() semantics
- rstrlcpy() calculates source string size regardless of length limit,
but cpio fields are fixed length character arrays, not strings -> kaboom
- wondering if zero-terminating strncpy() variant might be more fit to our
purposes than strlcpy()-clone
Panu Matilainen [Thu, 8 May 2008 14:10:10 +0000 (17:10 +0300)]
Eliminate static print buffer from prDbiOpenFlags()
- unlikely to actually overflow but it'd be all the more embarrasing
as it's just diagnostics/debug code...
Panu Matilainen [Thu, 8 May 2008 12:24:46 +0000 (15:24 +0300)]
Avoid entirely unnecessary static temp string buffer
Panu Matilainen [Thu, 8 May 2008 11:37:29 +0000 (14:37 +0300)]
Rip useless ROOT_GROUP checking from configure
- it was only used for an ancient RH-specific %_fixgroup anyway which
in turn only ever did anything when building as root - bad bad...
Panu Matilainen [Thu, 8 May 2008 11:36:08 +0000 (14:36 +0300)]
Don't run fixowner and fixgroup at end of %prep
- they'd only work for root, and we don't want to encourage people to build
as root...
Panu Matilainen [Thu, 8 May 2008 10:40:26 +0000 (13:40 +0300)]
Oops, matchpathcon() wants st_mode, not the entire struct stat
Panu Matilainen [Thu, 8 May 2008 10:35:27 +0000 (13:35 +0300)]
Block signals while moving the rpmdb to final location after rebuild
- interrupt there would be pretty disastrous..
Panu Matilainen [Thu, 8 May 2008 10:30:16 +0000 (13:30 +0300)]
Lose the silly db argument from block/unblockSignals()
- unused, and unusable anyway as signals are global, not per db thing...
Panu Matilainen [Thu, 8 May 2008 10:06:34 +0000 (13:06 +0300)]
Restore rpmdb selinux contexts to default after rebuild (rhbz#442149)
Panu Matilainen [Thu, 8 May 2008 09:40:37 +0000 (12:40 +0300)]
is_selinux_enabled() returns 0 if not enabled, not -1
Panu Matilainen [Thu, 8 May 2008 08:53:42 +0000 (11:53 +0300)]
Check for transaction root sanity in rpmtsSetRootDir()
- only regular paths starting with / permitted
- change prototype to permit return codes
Panu Matilainen [Thu, 8 May 2008 08:38:52 +0000 (11:38 +0300)]
Set ts rootdir to /, not empty if rootDir arg is NULL
- lets see what break... ;)
Panu Matilainen [Thu, 8 May 2008 08:27:58 +0000 (11:27 +0300)]
Only append trailing slash to ts rootdir if rootdir != "/"
Panu Matilainen [Thu, 8 May 2008 07:20:39 +0000 (10:20 +0300)]
Fix up some fuzz in Finnish translation
Panu Matilainen [Thu, 8 May 2008 07:07:31 +0000 (10:07 +0300)]
Fix up / remove some fuzzy German translations
Panu Matilainen [Thu, 8 May 2008 07:00:04 +0000 (10:00 +0300)]
Updated Serbian translations from Igor Miletic (rhbz#441101)
Panu Matilainen [Thu, 8 May 2008 06:56:54 +0000 (09:56 +0300)]
Updated Polish translation from Piotr Drąg
Panu Matilainen [Thu, 8 May 2008 06:53:36 +0000 (09:53 +0300)]
Updated German translation from Fabian Affolter (rhbz#438178)
Panu Matilainen [Thu, 8 May 2008 04:48:51 +0000 (07:48 +0300)]
Check rpmAddSignature() return codes (rhbz#442761)
- headerGetEntry() on RPMTAG_HEADERIMMUTABLE already caught the corrupted
package, we just didn't paying attention
- make the hge failed error message a bit more meaningful
Panu Matilainen [Wed, 7 May 2008 09:15:22 +0000 (12:15 +0300)]
Oops, don't access variable after freeing
Panu Matilainen [Wed, 7 May 2008 08:33:33 +0000 (11:33 +0300)]
Oops, plug leak introduced by previous commit
Panu Matilainen [Wed, 7 May 2008 08:12:17 +0000 (11:12 +0300)]
Simplify doPatch()
- use %{uncompress} macro to pass files to patch always
- gains support for lzma patches for free
Panu Matilainen [Wed, 7 May 2008 06:48:39 +0000 (09:48 +0300)]
Plug another memleak from genCpioListAndHeader()
- free fuser + fgroup info instead of NULLing, add comment on side-effects
Panu Matilainen [Wed, 7 May 2008 05:32:36 +0000 (08:32 +0300)]
rpmfi actions is already alloced by rpmfiNew(), don't leak memory
Panu Matilainen [Tue, 6 May 2008 09:48:09 +0000 (12:48 +0300)]
Eliminate nasty hackery with "special" doc + docdir format
- figure out docdir early on in spec parsing, store in package struct
instead of abusing parse buffer
- fixes memleaks from docdir_fmt and headerSprintf too
Panu Matilainen [Tue, 6 May 2008 07:00:07 +0000 (10:00 +0300)]
Eliminate static buffer in lua findkey()
Jindrich Novy [Tue, 6 May 2008 06:47:18 +0000 (08:47 +0200)]
Nuke EXPRBUFSIZ, it is now useless
Jindrich Novy [Tue, 6 May 2008 06:46:50 +0000 (08:46 +0200)]
Don't use static buffer for parsing an expression
Panu Matilainen [Mon, 5 May 2008 10:52:19 +0000 (13:52 +0300)]
Indentation fixes
Panu Matilainen [Mon, 5 May 2008 08:53:48 +0000 (11:53 +0300)]
Eliminate static sized string buffer in parseScript()
Panu Matilainen [Mon, 5 May 2008 08:37:08 +0000 (11:37 +0300)]
Trap RPMRC_FAIL returns from spec parse with abort() for now
Panu Matilainen [Mon, 5 May 2008 08:31:09 +0000 (11:31 +0300)]
Make readLine() return PART_ERROR on errors
Panu Matilainen [Mon, 5 May 2008 08:27:49 +0000 (11:27 +0300)]
Fix (hopefully ;) signaling for line continuations on spec parsing
Panu Matilainen [Mon, 5 May 2008 08:20:13 +0000 (11:20 +0300)]
Indentation fixes
Panu Matilainen [Mon, 5 May 2008 08:15:12 +0000 (11:15 +0300)]
Make parseSpec() return PART_ERROR on all errors
- also fix memleak from buildroot errors
Panu Matilainen [Mon, 5 May 2008 08:00:45 +0000 (11:00 +0300)]
Make parseFiles() return PART_ERROR on failure
- streamline exits by assuming failure
Panu Matilainen [Mon, 5 May 2008 07:56:55 +0000 (10:56 +0300)]
Make parseScript() return PART_ERROR on errors
- streamline exists by assuming failure
Panu Matilainen [Mon, 5 May 2008 07:46:43 +0000 (10:46 +0300)]
Make parseDescription() return PART_ERROR on errors
Panu Matilainen [Mon, 5 May 2008 07:42:41 +0000 (10:42 +0300)]
Make parseChangeLog() return PART_ERROR on errors
- streamline exits, fixing memleak from stringbuf on various paths
Panu Matilainen [Mon, 5 May 2008 07:34:33 +0000 (10:34 +0300)]
Make parseBuildInstallClean() return PART_ERROR on errors, streamline exits
Panu Matilainen [Mon, 5 May 2008 07:24:22 +0000 (10:24 +0300)]
Make parsePrep() return PART_ERROR on errors
Panu Matilainen [Mon, 5 May 2008 07:08:33 +0000 (10:08 +0300)]
Streamline parsePreamble() exists
- assume failure, single point of exit
- fixes memleak from NVR
- use PART_ERROR for error exits
Panu Matilainen [Mon, 5 May 2008 06:51:14 +0000 (09:51 +0300)]
Start cleaning up the rpmerr removal mess of build/ return codes
- define PART_ERROR for error returns from various parse bits,
teach parseSpec() about it
- streamline parseSpec() exists
Jindrich Novy [Mon, 5 May 2008 06:12:04 +0000 (08:12 +0200)]
Remove obsolete parseForRegexLang()
- no use for it since _langpatt is now gone
Jindrich Novy [Mon, 5 May 2008 06:05:50 +0000 (08:05 +0200)]
macros.in cleanup
- really deprecate _langpatt
- obsolete _package_version
- use paths more conforming to FHS
- fix typos
Panu Matilainen [Mon, 5 May 2008 05:38:57 +0000 (08:38 +0300)]
Use fprintf() for writing PGP passphrase (like we do for GPG)
- avoids having two separate write()'s to check
- ...if we actually checked the result, gcc doesn't whine about
unchecked fprintf() return...
Panu Matilainen [Mon, 5 May 2008 05:27:07 +0000 (08:27 +0300)]
Check for pipe() returns on GPG and PGP signature creation
Panu Matilainen [Mon, 5 May 2008 05:23:24 +0000 (08:23 +0300)]
Check for pipe() returns in rpmfc helper output reading
Panu Matilainen [Mon, 5 May 2008 05:15:17 +0000 (08:15 +0300)]
Silence bogus warning on memset()
- gcc doesn't realize shrank == 0 would terminate the process via error()
before reaching memset(), work around...
Panu Matilainen [Mon, 5 May 2008 04:37:50 +0000 (07:37 +0300)]
Check for pipe() return code on --pipe
Panu Matilainen [Sat, 3 May 2008 09:44:16 +0000 (12:44 +0300)]
Add missing include
Panu Matilainen [Sat, 3 May 2008 09:43:37 +0000 (12:43 +0300)]
Initialize nb before use
Panu Matilainen [Sat, 3 May 2008 09:38:02 +0000 (12:38 +0300)]
Create signature target rpm in same directory as original
- rename() doesn't work across devices, oops...
Panu Matilainen [Sat, 3 May 2008 09:34:19 +0000 (12:34 +0300)]
Temp file handling tweaks
- rename rpmMkTemp() (back) to rpmMkTempFile()
- rpmMkTemp() is now a lower level thin wrapper around mkstemp()
Panu Matilainen [Sat, 3 May 2008 07:36:00 +0000 (10:36 +0300)]
rpmReSign() doesn't return rpmRC codes, make it more obvious
- cleanup "rc = RPMRC_FAIL" copy-paste leftovers
Panu Matilainen [Sat, 3 May 2008 07:27:16 +0000 (10:27 +0300)]
Eliminate static sized string buffer frpm rpmReSign()
- use rpmMkTemp() for creating the temp file instead of insecure
close(mkstemp())
Panu Matilainen [Fri, 2 May 2008 08:48:27 +0000 (11:48 +0300)]
Check for arch compatibility on multilib too
Panu Matilainen [Fri, 2 May 2008 08:40:29 +0000 (11:40 +0300)]
Ensure default SIGPIPE handler for --pipe (rhbz#444389)
Panu Matilainen [Wed, 30 Apr 2008 11:38:09 +0000 (14:38 +0300)]
RIP alloca()
Jindrich Novy [Wed, 30 Apr 2008 11:24:51 +0000 (13:24 +0200)]
Rewrite xmlFormat() and remove useless xmlstrlen() and xmlstrcpy()
Panu Matilainen [Wed, 30 Apr 2008 10:34:28 +0000 (13:34 +0300)]
Kill of alloca() from tufdio tests
- yes it leaks, who cares
Panu Matilainen [Wed, 30 Apr 2008 10:30:54 +0000 (13:30 +0300)]
Lazily copy basenames in relocation if needed
- couple of tiny array helper funcs to push stuff out of relocateFileList()
instead of adding yet more gunk
- use the helpers for dirnames too
Panu Matilainen [Wed, 30 Apr 2008 09:45:16 +0000 (12:45 +0300)]
Simplify relocation directory name manipulation
Jindrich Novy [Wed, 30 Apr 2008 09:39:49 +0000 (11:39 +0200)]
Don't use alloca in rpmal.c
Panu Matilainen [Wed, 30 Apr 2008 09:29:40 +0000 (12:29 +0300)]
Allocate relocation dirnames on heap, not stack
Jindrich Novy [Wed, 30 Apr 2008 08:32:33 +0000 (10:32 +0200)]
Don't use alloca() in fpsCompare()
Panu Matilainen [Wed, 30 Apr 2008 07:32:57 +0000 (10:32 +0300)]
Begin untangling relocation alloca()'s
- allocate rpmRelocation paths on heap, not stack
Panu Matilainen [Wed, 30 Apr 2008 07:05:48 +0000 (10:05 +0300)]
Kill the remaining alloca in fp doLookup()
Panu Matilainen [Wed, 30 Apr 2008 06:47:25 +0000 (09:47 +0300)]
One alloca() down in fp doLookup()
- single point of exit from the point where buf gets allocated
Panu Matilainen [Tue, 29 Apr 2008 14:38:21 +0000 (17:38 +0300)]
Plug a memleak in lzclose()
Panu Matilainen [Tue, 29 Apr 2008 14:09:07 +0000 (17:09 +0300)]
Plug memleak in parseSimplePart()
Panu Matilainen [Tue, 29 Apr 2008 14:04:08 +0000 (17:04 +0300)]
Plug memleak in macro doFoo()