platform/upstream/rpm.git
15 years agoUpdated Spanish translation (Domingo Becker)
Panu Matilainen [Tue, 12 May 2009 07:30:10 +0000 (10:30 +0300)]
Updated Spanish translation (Domingo Becker)

15 years agoUpdated Portugese Brazilian translation (Igor Pires Soares)
Panu Matilainen [Tue, 12 May 2009 07:28:00 +0000 (10:28 +0300)]
Updated Portugese Brazilian translation (Igor Pires Soares)

15 years agoMinor fix to Japanese translation (Masaki Furuta)
Panu Matilainen [Fri, 8 May 2009 12:22:25 +0000 (15:22 +0300)]
Minor fix to Japanese translation (Masaki Furuta)

15 years agoFix parsing of pubkey signature packets. Ick.
Panu Matilainen [Fri, 8 May 2009 12:01:15 +0000 (15:01 +0300)]
Fix parsing of pubkey signature packets. Ick.
- busted all the way from commit bcb226480d0b60a8667eade77d81c29de4c3d6c9

15 years agoDont bother generation rpmds debug messages unless in debug mode
Panu Matilainen [Thu, 7 May 2009 11:31:57 +0000 (14:31 +0300)]
Dont bother generation rpmds debug messages unless in debug mode
- rpmdsNotify() which does nothing but generate RPMLOG_DEBUG messages
  gets called often enough that avoiding the unnecessary
  rpmlog() and strcmp() calls is easily visible in wallclock times

15 years agorpmdsThis() is really just a special case of rpmdsSingle()
Panu Matilainen [Wed, 6 May 2009 11:54:10 +0000 (14:54 +0300)]
rpmdsThis() is really just a special case of rpmdsSingle()

15 years agoHide NSS peculiarities from API
Panu Matilainen [Thu, 23 Apr 2009 12:54:09 +0000 (15:54 +0300)]
Hide NSS peculiarities from API
- PKCS#11 standard requires modules to be re-initialized after fork(),
  arrange this to occur automatically.
- Most of the time child processes will exec() something else so dont
  bother shutting down NSS for every child, only lazily re-initialize
  as needed.
- This lets us initialize NSS early to force preloading of its dlopen()'ed
  libraries to avoid issues on chroot(), without causing problems to API
  users which fork() after initializing rpm (such as func, urpmi etc).

15 years ago- Removed unnecessary rpmdbFreeIterator call and moved them to enditer label.
Rakesh Pandit [Sat, 14 Mar 2009 13:08:53 +0000 (18:38 +0530)]
- Removed unnecessary rpmdbFreeIterator call and moved them to enditer label.
- Rearranged bit to keep the logic sane.

15 years agoCleanup: Move similar patterns in rpmcliArgIter to rpmcliArgIterHelper.
Rakesh Pandit [Sat, 14 Mar 2009 12:29:03 +0000 (17:59 +0530)]
Cleanup: Move similar patterns in rpmcliArgIter to rpmcliArgIterHelper.

15 years ago- Moved code to check possibility of freshen operation to checkFreshenStatus.
Rakesh Pandit [Sat, 14 Mar 2009 12:02:59 +0000 (17:32 +0530)]
- Moved code to check possibility of freshen operation to checkFreshenStatus.

15 years ago- Move header reading part from rpminstall to tryReadHeader function.
Rakesh Pandit [Sat, 14 Mar 2009 11:08:10 +0000 (16:38 +0530)]
- Move header reading part from rpminstall to tryReadHeader function.

15 years agoMinor cleanups to installplatform script
Panu Matilainen [Wed, 22 Apr 2009 14:12:37 +0000 (17:12 +0300)]
Minor cleanups to installplatform script
- eliminate unused target and target_platform variables
- eliminate unnecessary temporary rpmrc (used to make a difference when
  macro path was in there, not anymore)

15 years agoEliminate unnecessary rpmts_internal.h include
Panu Matilainen [Wed, 22 Apr 2009 13:22:54 +0000 (16:22 +0300)]
Eliminate unnecessary rpmts_internal.h include

15 years agoRefactor ts out of the main signature checking worker
Panu Matilainen [Wed, 22 Apr 2009 11:58:10 +0000 (14:58 +0300)]
Refactor ts out of the main signature checking worker
- Add lower level rpmpkgVerifySigs() function which does the real work,
  ts and full qva isn't needed there, just keyring and flags what to verify.
  Static only for now, but this is the kind of interface we'll want to
  export eventually.
- rpmVerifySignatures() is now just a API-compatibility wrapper.
- Use rpmpkgVerifySigs() instead of rpmVerifySignatures() in rpmcliSign()
  verify loop so we only retrieve keyring once.

15 years agoDont try to refcount NULL keyring
Panu Matilainen [Wed, 22 Apr 2009 11:01:40 +0000 (14:01 +0300)]
Dont try to refcount NULL keyring

15 years agoFix --with-kde with KDE3 (rhbz#466009).
Ville Skyttä [Sun, 12 Apr 2009 18:39:50 +0000 (21:39 +0300)]
Fix --with-kde with KDE3 (rhbz#466009).

15 years agoRequire file attributes in spec if %ghost files are missing from build root
Jindrich Novy [Mon, 20 Apr 2009 11:23:30 +0000 (13:23 +0200)]
Require file attributes in spec if %ghost files are missing from build root

15 years agoFix a few file permissions from "make install"
Panu Matilainen [Sat, 18 Apr 2009 11:31:48 +0000 (14:31 +0300)]
Fix a few file permissions from "make install"
- macros.perl, logrotate examples etc aren't scripts and shouldn't be
  executable. Ditto for python __init__.py

15 years agoIntroduce changelog trimming in binary packages feature (ticket #47)
Jindrich Novy [Thu, 16 Apr 2009 12:13:34 +0000 (14:13 +0200)]
Introduce changelog trimming in binary packages feature (ticket #47)

15 years agoIntroduce _changelog_trimtime and obsolete _instchangelog
Jindrich Novy [Thu, 16 Apr 2009 12:12:20 +0000 (14:12 +0200)]
Introduce _changelog_trimtime and obsolete _instchangelog

15 years agoPad RSA signatures up to modulus size if necessary (rhbz#494049)
Panu Matilainen [Thu, 16 Apr 2009 08:03:29 +0000 (11:03 +0300)]
Pad RSA signatures up to modulus size if necessary (rhbz#494049)
- unfortunately can't be detected at initial allocation so extra
  copy is needed at verification time

15 years agoCheck for termination signals during signing / signature checking loop
Panu Matilainen [Tue, 14 Apr 2009 07:42:20 +0000 (10:42 +0300)]
Check for termination signals during signing / signature checking loop

15 years agoRevert erase relations before checking whether we already added it
Florian Festi [Tue, 14 Apr 2009 08:57:46 +0000 (10:57 +0200)]
Revert erase relations before checking whether we already added it

15 years agoError out at build on unsupported payload compressors (rhbz#495429)
Panu Matilainen [Mon, 13 Apr 2009 10:58:39 +0000 (13:58 +0300)]
Error out at build on unsupported payload compressors (rhbz#495429)
- only permit bzip2/lzma/xz payload compression if rpm built with the
  necessary libraries

15 years agoDon't require %ghost file presence in build root (rhbz#495040)
Jindrich Novy [Fri, 10 Apr 2009 09:27:49 +0000 (11:27 +0200)]
Don't require %ghost file presence in build root (rhbz#495040)

15 years agoRemove file flags that have never been enabled
Jindrich Novy [Thu, 9 Apr 2009 12:48:02 +0000 (14:48 +0200)]
Remove file flags that have never been enabled

15 years agoMake it clearer that PACKAGE_FILE logic applies to all -F, -U, and -i.
Ville Skyttä [Mon, 6 Apr 2009 20:08:15 +0000 (23:08 +0300)]
Make it clearer that PACKAGE_FILE logic applies to all -F, -U, and -i.

15 years agoRemove obsolete info about --buildarch and --buildos.
Ville Skyttä [Mon, 6 Apr 2009 20:00:56 +0000 (23:00 +0300)]
Remove obsolete info about --buildarch and --buildos.

15 years agoUpdated Spanish translation (Oscar Bacho)
Panu Matilainen [Thu, 9 Apr 2009 11:06:14 +0000 (14:06 +0300)]
Updated Spanish translation (Oscar Bacho)

15 years agoUpdated Serbian translations (Milos Komarcevic)
Panu Matilainen [Thu, 9 Apr 2009 11:04:46 +0000 (14:04 +0300)]
Updated Serbian translations (Milos Komarcevic)

15 years agoUpdated Catalan translation (Xavier Conde)
Panu Matilainen [Thu, 9 Apr 2009 10:54:09 +0000 (13:54 +0300)]
Updated Catalan translation (Xavier Conde)

15 years agoFix PGP v4 fingerprint calculation (rhbz#493777)
Panu Matilainen [Thu, 9 Apr 2009 10:05:00 +0000 (13:05 +0300)]
Fix PGP v4 fingerprint calculation (rhbz#493777)
- patch from openSUSE / Michael Schroeder

15 years agoDon't allow '~', '/' characters and ".." sequence in NVR (rhbz#493157)
Jindrich Novy [Mon, 6 Apr 2009 08:20:47 +0000 (10:20 +0200)]
Don't allow '~',  '/' characters and ".." sequence in NVR (rhbz#493157)

15 years agoMake rpmal header & all internal
Panu Matilainen [Fri, 3 Apr 2009 10:07:42 +0000 (13:07 +0300)]
Make rpmal header & all internal
- rpmal is hardly useful outside rpm itself, avoid exporting stuff
  unnecessarily

15 years agoMake sure installed files have state (rhbz#492947)
Panu Matilainen [Fri, 3 Apr 2009 07:28:59 +0000 (10:28 +0300)]
Make sure installed files have state (rhbz#492947)
- rpmfsSetState() doesn't get called for skipped files like %ghost and
  %config(noreplace), causing incorrect file state ("no state") getting
  recorded in rpmdb, leading to inapproriate removal/rename on erase, ick
- For TR_ADDED, always default file states to RPMFILE_STATE_NORMAL, fsm
  changes it as necessary for skipped colors and such. Lazy alloc on
  rpmfsSetState() is not correct as rpmfsSetState() might not get called
  at all.
- originally broken by commit 8d6c4b8c95b59f5a71d90c582c2e98f5c7ed7b9d

15 years agoUse -mtune instead of -mcpu (rhbz#493696)
Jindrich Novy [Thu, 2 Apr 2009 18:49:48 +0000 (20:49 +0200)]
Use -mtune instead of -mcpu (rhbz#493696)

15 years agoPolish translation update (Piotr Drąg)
Panu Matilainen [Wed, 1 Apr 2009 09:17:45 +0000 (12:17 +0300)]
Polish translation update (Piotr Drąg)

15 years agoUpdate translations for a change...
Panu Matilainen [Tue, 31 Mar 2009 10:14:53 +0000 (13:14 +0300)]
Update translations for a change...

15 years agoPrefer more specific types over generic "text" in classification (rhbz#491349)
Panu Matilainen [Tue, 31 Mar 2009 10:14:08 +0000 (13:14 +0300)]
Prefer more specific types over generic "text" in classification (rhbz#491349)

15 years agoAllocate ts->addedPackages lazily from rpmtsAddInstallElement()
Panu Matilainen [Tue, 31 Mar 2009 10:00:59 +0000 (13:00 +0300)]
Allocate ts->addedPackages lazily from rpmtsAddInstallElement()
- at least verification calls rpmtsClean() which wipes out ts->addedPackages,
  make sure it's always alloced when needed

15 years agoErase relations are reversed, use requires of target
Florian Festi [Mon, 30 Mar 2009 19:56:09 +0000 (21:56 +0200)]
Erase relations are reversed, use requires of target

15 years agoTidy up rpmfi struct definition a bit
Panu Matilainen [Fri, 27 Mar 2009 14:15:00 +0000 (16:15 +0200)]
Tidy up rpmfi struct definition a bit

15 years agoLose unused/useless Type and tagN fields from rpmfi struct
Panu Matilainen [Fri, 27 Mar 2009 14:12:25 +0000 (16:12 +0200)]
Lose unused/useless Type and tagN fields from rpmfi struct

15 years agoHandle XZ in %uncompress macro
Panu Matilainen [Fri, 27 Mar 2009 12:11:43 +0000 (14:11 +0200)]
Handle XZ in %uncompress macro
- should've been in commit 8078d0ba24662308b10d9eb0f0da978584b7e757

15 years agoRip the macro default settings in rpmrc setDefaults()
Panu Matilainen [Fri, 27 Mar 2009 12:08:56 +0000 (14:08 +0200)]
Rip the macro default settings in rpmrc setDefaults()
- these get nuked and not reloaded on package builds
- rpm(build) needs a properly set up macros file in any case

15 years agoAdd built-in %getconfdir macro for getting rpmConfigDir() value
Panu Matilainen [Fri, 27 Mar 2009 12:01:47 +0000 (14:01 +0200)]
Add built-in %getconfdir macro for getting rpmConfigDir() value
- define %_rpmconfigdir via %getconfdir in the main macro config, this
  avoids it getting lost on macro reloads as happens when building
  several packages at once

15 years agoPlug minor memleak from default rc and macro file paths
Panu Matilainen [Fri, 27 Mar 2009 11:45:08 +0000 (13:45 +0200)]
Plug minor memleak from default rc and macro file paths
- build code can call these several times, only init once

15 years agoPlug minor memleak from rpmGetCwd() on build
Panu Matilainen [Fri, 27 Mar 2009 11:44:46 +0000 (13:44 +0200)]
Plug minor memleak from rpmGetCwd() on build

15 years agoEliminate pointless xstrdup()'s, the strings are never modified
Panu Matilainen [Thu, 26 Mar 2009 13:31:10 +0000 (15:31 +0200)]
Eliminate pointless xstrdup()'s, the strings are never modified

15 years agoFix: use the file's color to decide whether to add it to the rpmal not the color...
Florian Festi [Thu, 26 Mar 2009 12:53:26 +0000 (13:53 +0100)]
Fix: use the file's color to decide whether to add it to the rpmal not the color of the rpmfi

15 years agoRemove rpmal from the Python API
Florian Festi [Thu, 26 Mar 2009 10:48:09 +0000 (11:48 +0100)]
Remove rpmal from the Python API
as it changed and never was usable anyway

15 years agoReimplement rpmal by using hashes and cleaning up the color handling
Florian Festi [Fri, 20 Mar 2009 07:22:41 +0000 (08:22 +0100)]
Reimplement rpmal by using hashes and cleaning up the color handling

15 years agoMake rpmal store rpmtes and kill rpmte->pkgKey
Florian Festi [Mon, 16 Mar 2009 16:02:16 +0000 (17:02 +0100)]
Make rpmal store rpmtes and kill rpmte->pkgKey

15 years agoAlso order erases.
Florian Festi [Wed, 11 Mar 2009 13:15:56 +0000 (14:15 +0100)]
Also order erases.

 - partially using code from rpm5.org

15 years agoImplement rpmteSetDependsOn and rpmteDependsOn using a rpmte
Florian Festi [Wed, 25 Mar 2009 15:29:09 +0000 (16:29 +0100)]
Implement rpmteSetDependsOn and rpmteDependsOn using a rpmte

15 years agoPut the PGP foobar signature generation out of its misery
Panu Matilainen [Thu, 26 Mar 2009 07:59:01 +0000 (09:59 +0200)]
Put the PGP foobar signature generation out of its misery
- the last freeware PGP version (6.5.8) is from year 2000 and doesn't
  come close to compiling on modern distros, commercial versions we're
  not interested in
- "PGP" signatures in rpm mean RSA, gpg can handle that just fine since
  forever
- the code's been unused for years, unlikely to be functional anyway...

15 years agoprocess the "./" in file paths correctly (rhbz#491388)
Jindrich Novy [Wed, 25 Mar 2009 16:28:24 +0000 (17:28 +0100)]
process the "./" in file paths correctly (rhbz#491388)

15 years agoMake sure fd bundle is always NULLed on rpmVerifySignatures() exit
Panu Matilainen [Wed, 25 Mar 2009 15:00:41 +0000 (17:00 +0200)]
Make sure fd bundle is always NULLed on rpmVerifySignatures() exit
- readFile() failure could crash on double-free otherwise

15 years agoUnify DSA/RSA/GPG/blaa signature verification, simplify
Panu Matilainen [Wed, 25 Mar 2009 14:48:24 +0000 (16:48 +0200)]
Unify DSA/RSA/GPG/blaa signature verification, simplify
- verifyRSA/DSA were just the same already, differences are in key/sig
  parameters which dont matter on this level
- these dont need sigtd for anything, the data has been parsed into pgpDig
  before we get here
- add extra flag for header-only vs header+payload signatures,
  we know which is it in rpmVerifySignature()

15 years agoRename internal signature verification functions
Panu Matilainen [Wed, 25 Mar 2009 14:35:41 +0000 (16:35 +0200)]
Rename internal signature verification functions
- size, md5 and sha1 aren't really signatures

15 years agoReorder internal signature verification arguments
Panu Matilainen [Wed, 25 Mar 2009 14:33:29 +0000 (16:33 +0200)]
Reorder internal signature verification arguments
- move retval msg last everywhere

15 years agoPush signature identification to librpmio / pgp handling
Panu Matilainen [Wed, 25 Mar 2009 14:30:20 +0000 (16:30 +0200)]
Push signature identification to librpmio / pgp handling
- retrieve names from pgp tables instead of manually duplicated strings

15 years agoRemove redundant RSA/DSA parameter checks
Panu Matilainen [Wed, 25 Mar 2009 13:42:30 +0000 (15:42 +0200)]
Remove redundant RSA/DSA parameter checks
- if this stuff doesn't match, pgpVerifySig() will fail anyway, dont
  bother checking for same things over and over

15 years agoPush signature verification down to librpmio
Panu Matilainen [Wed, 25 Mar 2009 13:16:59 +0000 (15:16 +0200)]
Push signature verification down to librpmio
- new pgpVerifySig() call to perform the lowlevel verify, use for
  verifying DSA/RSA signatures
- librpm is now free of NSS specifics (apart from what still leaks through
  including rpmio/digest.h), remove linkage

15 years agoThese cases are identical now...
Panu Matilainen [Wed, 25 Mar 2009 12:39:29 +0000 (14:39 +0200)]
These cases are identical now...

15 years agoRename arguments, RSA keys are certainly not limited to md5 hashes
Panu Matilainen [Wed, 25 Mar 2009 12:37:43 +0000 (14:37 +0200)]
Rename arguments, RSA keys are certainly not limited to md5 hashes

15 years agoUse makeGPGSignature() for both DSA and RSA
Panu Matilainen [Wed, 25 Mar 2009 12:17:34 +0000 (14:17 +0200)]
Use makeGPGSignature() for both DSA and RSA
- in reality makePGPSignature() never gets called here due to other fun...

15 years agoRemove unnecessary {} block inflating indentation, streamline
Panu Matilainen [Wed, 25 Mar 2009 12:09:42 +0000 (14:09 +0200)]
Remove unnecessary {} block inflating indentation, streamline

15 years agoEliminate copy-paste digest calculation in rpmReadPackageFile()
Panu Matilainen [Wed, 25 Mar 2009 11:51:47 +0000 (13:51 +0200)]
Eliminate copy-paste digest calculation in rpmReadPackageFile()
- for DSA and RSA we want to grab the hash algo from signature, other
  than that it's just the same for all header-only DSA/RSA/SHA1 sigs

15 years agoEliminate copy-paste digest calculation in headerCheck()
Panu Matilainen [Wed, 25 Mar 2009 11:48:37 +0000 (13:48 +0200)]
Eliminate copy-paste digest calculation in headerCheck()
- for DSA and RSA we want to grab the hash algo from signature, other
  than that it's just the same for all DSA/RSA/SHA1 sigs

15 years agoEliminate header/payload digests from pgpDig_s, they dont belong
Panu Matilainen [Wed, 25 Mar 2009 11:23:19 +0000 (13:23 +0200)]
Eliminate header/payload digests from pgpDig_s, they dont belong
- allocate+free digests locally where needed, pass around in separate argument
- use digest bundles to handle rpmVerifySignatures() needs
- kill-kill-kill fdStealDigest(), dup the contexts from bundles as needed

15 years agoImplement fdUpdateDigests() and friends using digest bundle
Panu Matilainen [Wed, 25 Mar 2009 11:10:23 +0000 (13:10 +0200)]
Implement fdUpdateDigests() and friends using digest bundle

15 years agoAdd a type + basic api for bundle of digests (on same data)
Panu Matilainen [Wed, 25 Mar 2009 11:08:09 +0000 (13:08 +0200)]
Add a type + basic api for bundle of digests (on same data)
- in various places we need to calculate different digests of the same
  data, having them stored in a single container makes managing easier
- can hold as many digest types as we support
- remembers how much input data it has handled

15 years agoShow query/verify selection options just once in --help
Panu Matilainen [Thu, 19 Mar 2009 14:07:18 +0000 (16:07 +0200)]
Show query/verify selection options just once in --help

15 years agoPython doesn't need libelf, nss or popt directly
Panu Matilainen [Thu, 19 Mar 2009 12:56:45 +0000 (14:56 +0200)]
Python doesn't need libelf, nss or popt directly

15 years agolibrpmio doesn't need libmagic for anything
Panu Matilainen [Thu, 19 Mar 2009 12:41:43 +0000 (14:41 +0200)]
librpmio doesn't need libmagic for anything

15 years agoMove leftover signature stuff from rpmlib.h to signature.h
Panu Matilainen [Tue, 17 Mar 2009 14:33:12 +0000 (16:33 +0200)]
Move leftover signature stuff from rpmlib.h to signature.h
- these aren't really usable or useful outside rpm, and even less so
  as all the rest of the signature stuff is in a private header too

15 years agoRevert couple of checksum -> digest renames
Panu Matilainen [Thu, 19 Mar 2009 08:15:49 +0000 (10:15 +0200)]
Revert couple of checksum -> digest renames
- physical cpio header and elf header have checksums, not digests
  (from commit 7acdfded4a82e86a673418c3953aa6bf8106d313)
- doesn't affect functionality though

15 years agoDon't try to parse %patch on spec query (rhbz#487855)
Panu Matilainen [Wed, 18 Mar 2009 12:53:34 +0000 (14:53 +0200)]
Don't try to parse %patch on spec query (rhbz#487855)

15 years agoDoxygen parameter name mismatch
Panu Matilainen [Wed, 18 Mar 2009 09:57:16 +0000 (11:57 +0200)]
Doxygen parameter name mismatch

15 years agoAdd support for "lzma alone" compression format (lzdio)
Panu Matilainen [Wed, 18 Mar 2009 09:24:52 +0000 (11:24 +0200)]
Add support for "lzma alone" compression format (lzdio)
- "lzma alone" is superseeded by XZ but it's used by Suse and Mandriva
  distros so it's nice to have as it doesn't need much, only open differs
  from XZ
- rpmlib() dependency versions are an uuuuuuuugly mess here: Suse used
  "PayloadIsLzma = 4.4.2-1" so that's what we provide to be most compatible
  (hopefully). Built packages require "PayloadIsLzma <= 4.4.6-1" however
  to be compatible with Mandriva 2008.0. Did I already say it's ugly?
- Based on similar patch in Mandriva by Per Øyvind Karlsen, but avoiding
  unnecessary renames in rpmio

15 years agoLZMA -> XZ renaming
Panu Matilainen [Wed, 18 Mar 2009 07:42:23 +0000 (09:42 +0200)]
LZMA -> XZ renaming
- what we support now in payloads is XZ, not the former LZMA format, rename
  user- and header-visible parts to match this
- rpmlib(PayloadIsXz) dependency versioned 5.2-1 to avoid unnecessary
  incompatibility with what rpm5 has and what Mandriva is already using
- only provide the rpmlib dependency if actually built with xz support
- rpmFileIsCompressed() attempts to guess the magicless old lzma format
  by file suffix, so it can handle both right now

15 years agoHandle rpmDigestDup() failure in signature checking
Panu Matilainen [Mon, 16 Mar 2009 12:19:30 +0000 (14:19 +0200)]
Handle rpmDigestDup() failure in signature checking

15 years agoProper error handling in rpmDigestDup()
Panu Matilainen [Mon, 16 Mar 2009 12:13:00 +0000 (14:13 +0200)]
Proper error handling in rpmDigestDup()
- tolerate calling with NULL
- avoid allocations in case of failure
- return NULL instead of calling exit(), ick

15 years agoEliminate unnecessary pgpNewPublicKey() wrappers
Panu Matilainen [Mon, 16 Mar 2009 10:25:03 +0000 (12:25 +0200)]
Eliminate unnecessary pgpNewPublicKey() wrappers

15 years agoEliminate unnecessary field from pgpDig_s
Panu Matilainen [Mon, 16 Mar 2009 10:18:01 +0000 (12:18 +0200)]
Eliminate unnecessary field from pgpDig_s
- key/signature can't be both DSA and RSA at the same time

15 years agoFree all keys not only those on the first buckets
Florian Festi [Sat, 14 Mar 2009 18:12:43 +0000 (19:12 +0100)]
Free all keys not only those on the first buckets
 - Thanks to Alexey Tourbin for pointing that out!

15 years ago- Cleanup: removing unnecessary repeated code.
Rakesh Pandit [Fri, 13 Mar 2009 07:20:35 +0000 (12:50 +0530)]
- Cleanup: removing unnecessary repeated code.

15 years agorpm-python only accepts string objects, not unicode
Panu Matilainen [Fri, 13 Mar 2009 07:26:04 +0000 (09:26 +0200)]
rpm-python only accepts string objects, not unicode
- Reverts broken commit 832fe4f01865cd17ab9393fc48b960206da223b0.
  Anything trying to pass in unicode objects is already broken as
  PyString_AsString() uses default encoding for unicode conversions, which
  by default is ascii (at least in python >= 2.5) so any non-ascii string
  will cause it to fail anyway.
- Only accepting strings keeps encoding madness out of rpm, thank you Toshio.

15 years agoCatch exceptions from python conversions in dbMatch()
Panu Matilainen [Fri, 13 Mar 2009 06:55:53 +0000 (08:55 +0200)]
Catch exceptions from python conversions in dbMatch()
- Prior to this, string conversion (eg on unicode object) could fall
  through to rpmtsInitIterator() with key of NULL, matching everything
  and only much later spitting out an obscure traceback. PyInt_FromLong()
  can fail too, causing us to look for bogons.

15 years agoMD5 and SHA1 digests are handled just the same here...
Panu Matilainen [Thu, 12 Mar 2009 09:42:42 +0000 (11:42 +0200)]
MD5 and SHA1 digests are handled just the same here...

15 years agoRip all handling of broken md5 sums from 1997, rpm 2.x era
Panu Matilainen [Thu, 12 Mar 2009 09:39:29 +0000 (11:39 +0200)]
Rip all handling of broken md5 sums from 1997, rpm 2.x era
- we dont even recognize rpm 2.x packages as rpms...

15 years agoEliminate can't happen code
Panu Matilainen [Thu, 12 Mar 2009 09:17:27 +0000 (11:17 +0200)]
Eliminate can't happen code
- sigtd.tag can't very well be something else than it's matching case
  in a switch, eh

15 years agoSilence compiler whining on rpmsort and rpminject
Panu Matilainen [Thu, 12 Mar 2009 07:54:31 +0000 (09:54 +0200)]
Silence compiler whining on rpmsort and rpminject

15 years agoPlug a memleak in genCpioListAndHeader()
Panu Matilainen [Wed, 11 Mar 2009 19:43:44 +0000 (21:43 +0200)]
Plug a memleak in genCpioListAndHeader()

15 years agoNSS supports MD2, we might as well handle it too
Panu Matilainen [Wed, 11 Mar 2009 19:41:57 +0000 (21:41 +0200)]
NSS supports MD2, we might as well handle it too
- also getHashType() is a "pure" function, mark it as such

15 years agoEliminate now unnecessary FDDIGEST_t
Panu Matilainen [Wed, 11 Mar 2009 16:10:19 +0000 (18:10 +0200)]
Eliminate now unnecessary FDDIGEST_t
- contexts know their hash algorithm, this is not needed anymore

15 years agoRemember hash algorithm in digest context
Panu Matilainen [Wed, 11 Mar 2009 16:07:22 +0000 (18:07 +0200)]
Remember hash algorithm in digest context
- alternatively we could reverse map NSS hash types (HASHContext
  knows its type) but shrug...

15 years agoStreamline rpmDigestInit() a bit
Panu Matilainen [Wed, 11 Mar 2009 15:14:25 +0000 (17:14 +0200)]
Streamline rpmDigestInit() a bit
- single point of exit, rearrange to avoid having to free if stuff fails

15 years agoMove headerIsEntry() check of sigtag into _chk() macro
Panu Matilainen [Wed, 11 Mar 2009 13:28:30 +0000 (15:28 +0200)]
Move headerIsEntry() check of sigtag into _chk() macro
- ...and reformat the if-elses now that they fit into single lines nicely