Commit Graph

822 Commits

Author SHA1 Message Date
Panu Matilainen a8abeef91f Use rpmConfigDir() instead of hardwired value in Lua initialization
- userconfig is actually unused
2008-11-22 18:09:23 +02:00
Panu Matilainen da83a562e1 Add function to retrieve rpm config base directory
- one-shot to determine configuration base directory path from
  RPM_CONFIGDIR environement or build-time default
- rpmfileutil is a bit strange place, this would really belong to librpm
  but Lua initialization needs the path so...
2008-11-22 18:06:31 +02:00
Panu Matilainen 5e58eeb2d7 Permit relative paths in rpmioMkpath() and rpmMkdirs() 2008-11-21 09:50:53 +02:00
Panu Matilainen e30ad6d1af rpmsqAction() proto needs SA_SIGINFO conditionals too (ticket #4) 2008-11-06 10:03:10 +02:00
Jindrich Novy faaa0305f5 Return proper exit code when exec*() functions fail
- the correct exit code should be 127 accoring to bash(1),
  we want to keep the same exit code behaviour as bash for rpm
2008-11-04 10:09:31 +01:00
Panu Matilainen 73f61ecf05 Fix building on systems where SA_SIGINFO isn't available (ticket #4)
- patch from Adam Tkac
2008-11-04 10:28:20 +02:00
Panu Matilainen dc06dca3b9 Use more portable file access mode tests (ticket #5)
- don't make assumptions about how O_RDWR and friends are defined, use the
  portable way of masking flags with O_ACCMODE and explicit comparison
  against the mode we're interested in
2008-11-04 09:52:19 +02:00
Panu Matilainen 49c515179a Permit tab as whitespace between macro arguments (rhbz#467567)
- another dumb regression from macro handling cleanups
2008-10-19 01:53:03 +03:00
Panu Matilainen 085dcab72f Move luaext include fiddling out of toplevel configure 2008-10-14 15:49:57 +03:00
Panu Matilainen a1b05720b0 Sanitize libluaext linkage 2008-10-14 15:36:23 +03:00
Panu Matilainen a7ece3bc4a Add rpmMkdirs() to librpmio
- allows creating bunch of directories including parents at once
2008-10-10 14:28:41 +03:00
Panu Matilainen bd70d0e36c rstrcasecmp() and rstrncasecmp() are "pure" functions 2008-10-09 16:17:53 +03:00
Panu Matilainen eb9649dfa9 Mark risalpha() and friends as "const functions"
- they only process integers that are fed to them and no outside data
2008-10-09 16:14:23 +03:00
Panu Matilainen be50cb5bf7 Add RPM_GNUC_INTERNAL macro
- allows portable use of __attribute__((visibility("hidden")))
2008-10-09 15:21:15 +03:00
Jindrich Novy aadc1a3146 Use safer xrealloc() instead of realloc() 2008-09-25 20:03:51 +02:00
Jindrich Novy 50ef054902 Use safer xstrdup() instead of strdup() wherever possible 2008-09-25 20:03:50 +02:00
Panu Matilainen 9f85707825 Macro argument handling regression regression (rhbz#461180)
- commit f366011c42 is too simplistic and
  broke other stuff in turn...
2008-09-11 16:56:50 +03:00
Panu Matilainen 3897bdc37d Add couple of new rpmPubkey() methods
- rpmPubkeyDig() to retrieve parsed OpenPGP parameters of key
- rpmPubkeyBase64() to return base64 encoding of the key
2008-08-08 09:26:30 +03:00
Panu Matilainen ba644ed5aa Add (and use) refcounting for rpmKeyring and rpmPubkey 2008-07-17 15:50:35 +03:00
Panu Matilainen 1d9b4d00d7 Make rpmExpand() smarter wrt memory allocations
- precalculate unexpanded size and allocate enough for that plus MACROBUFSIZ
  for expansion
- typical allocation is way smaller than what gets allocated "just in case",
  calculate expanded size and realloc to actual size to avoid wasting
  memory
2008-07-16 10:52:33 +03:00
Panu Matilainen 889f9f5b41 Eliminate another unnecessary temp variable
- do all the copying inside a loop
2008-07-16 10:33:57 +03:00
Panu Matilainen 1b19676027 Eliminate unnecessary variable
- leftover from static buffer times..
2008-07-16 10:24:05 +03:00
Panu Matilainen f366011c42 Macro argument handling regression (rhbz#455333)
- expandMacro() wants the next \0 character to be returned, which might
  or might not be the same as lastc passed to grabArgs()
- use memcpy() instead of memmove() for the copy, the areas can't overlap
2008-07-16 09:40:10 +03:00
Panu Matilainen b256dc9e25 NSS uses unsigned int, not size_t for hash lengths
- broke ppc64 in entertaining ways...
2008-07-12 17:57:51 +03:00
Panu Matilainen 27a6edd36d Add a new legacy compatibility header, kill rpmints.h
- build-time generated rpmints.h causes issues with distcheck and is
  not really worth the trouble
- we have all sorts of legacy junk to deal with, sticking them all into
  rpmints.h would be just wrong...
2008-07-08 18:54:28 +03:00
Panu Matilainen b215f1145e Teach Fflush() about lzdio 2008-07-07 18:09:49 +03:00
Panu Matilainen 811436ec92 Kick out ftpStrerror() and related error code defines
- our url-retrieval error codes depend on the helper used which is
  configurable via macros so hardcoding eg curl codes wont work either
- need to figure out something better, pass helper error messages through
  FD_t or something...
2008-07-07 10:48:06 +03:00
Panu Matilainen 9e7cfa4d5b Stuff rpmio/ugid.[ch] contents to lib/misc.[ch]
- no uses outside librpm itself, and there they can be hidden away from
  exported ABI whereas in librpmio they cant
2008-07-04 16:09:47 +03:00
Panu Matilainen 104bc6a883 Make ufdClose() static, nothing outside rpmio.c needs directly 2008-07-04 16:09:47 +03:00
Panu Matilainen ebdfd2887f Remove unused ufdGetFile() from librpmio 2008-07-04 16:09:47 +03:00
Panu Matilainen bd078a5811 Remove unused _url_debug 2008-07-04 16:09:47 +03:00
Panu Matilainen 43a05ea363 Add documentation for keyring 2008-07-02 14:24:20 +03:00
Panu Matilainen 710750ebff Make rpmkeyring.h public header 2008-07-02 14:23:30 +03:00
Panu Matilainen cea83865c9 Some keyring improvements
- keep keyring sorted by keyid, use bsearch for key lookups
- check for key in keyring before adding it to avoid dupes
- actually check that pubkey parameters match the signature on keyring
  lookup like was done in rpmtsFindPubkey()
2008-07-02 13:31:12 +03:00
Panu Matilainen caf362cff8 Move keyring related typedefs to rpmtypes.h 2008-07-01 17:52:40 +03:00
Panu Matilainen 685877f2a0 Beginnings of an abstract keyring
- in librpmio to avoid dependencies on higher level stuff
- for now it's just an in-memory structure that needs to be populated
  by someone simply by feeding in GPG public keys
2008-07-01 17:52:40 +03:00
Panu Matilainen e435dde712 Create ascii armor that rpm itself accepts 2008-07-01 17:52:40 +03:00
Panu Matilainen bcb226480d Eliminate the nasty global _dig and _digp variables from rpmpgp
- pass the digest + parameters around as arguments instead
2008-07-01 11:22:40 +03:00
Panu Matilainen 9594f656d4 Unexport all the umphteen pgp related tables
- nothing outside rpmpgp.c needs
2008-07-01 11:09:15 +03:00
Panu Matilainen c2efff1486 Make every pgp function not needed by other parts of rpm static 2008-07-01 11:09:15 +03:00
Panu Matilainen 55d3bbd4b8 Enable rpmDoDigest() to pass large file sizes
- should probably be off_t instead of rpm_loff_t as this is lowlevel io
  business and only verification code cares about the size reported by
  it, otoh forcing 64bit always avoids having to deal with variable
  off_t type on printing.. shrug
2008-06-11 09:25:02 +03:00
Panu Matilainen b4b6e53183 fwrite() returns size_t, use correct type 2008-06-10 10:04:52 +03:00
Panu Matilainen af9518dce2 Use correct type for strlen() 2008-06-10 10:02:52 +03:00
Panu Matilainen 4ffee98a65 Silly signedness mismatch in pgpMpiSet() 2008-06-10 09:59:09 +03:00
Panu Matilainen e08c4251a5 FD_t contentLength field is useless for us too... 2008-06-09 15:42:24 +03:00
Panu Matilainen f2bdbe3d7d Lose bunch of unused fields from FD_t
- leftovers from times of internal http/dav etc transports..
2008-06-09 15:38:28 +03:00
Panu Matilainen 45ac934fdc Use 64bit type for fdSet/GetCpioPos() in rpmio 2008-06-09 15:33:27 +03:00
Panu Matilainen 6f010ec18d Unexport rpmsqCaught now that nothing needs it 2008-06-03 12:11:05 +03:00
Panu Matilainen cd040ba59b Add rpmsqIsCaught() for testing if a signal has been caught 2008-06-03 12:04:57 +03:00
Panu Matilainen df206dbaaf Unexpose signal queue and direct manipulation functions
- nothing outside rpmsq needs to fiddle with the queue directly
2008-06-03 11:44:20 +03:00