platform/upstream/rpm.git
13 years agoEliminate a bunch of now unnecessary cli-switch sanity checks
Panu Matilainen [Fri, 20 Aug 2010 07:24:53 +0000 (10:24 +0300)]
Eliminate a bunch of now unnecessary cli-switch sanity checks

13 years agoSimplify --root argument checking
Panu Matilainen [Fri, 20 Aug 2010 07:19:26 +0000 (10:19 +0300)]
Simplify --root argument checking
- We haven't accepted url's in as root since ages, wipe out the goo

13 years agoEliminate the IAM_RPMBT ifdef's from rpmbuild.c for real
Panu Matilainen [Fri, 20 Aug 2010 06:26:10 +0000 (09:26 +0300)]
Eliminate the IAM_RPMBT ifdef's from rpmbuild.c for real

13 years agoChainsaw the now unused #ifdef'ed parts out of rpmqv.c and rpmbuild.c
Panu Matilainen [Fri, 20 Aug 2010 06:20:16 +0000 (09:20 +0300)]
Chainsaw the now unused #ifdef'ed parts out of rpmqv.c and rpmbuild.c

13 years agoBegin splitting rpmbuild to separate sources
Panu Matilainen [Fri, 20 Aug 2010 06:00:26 +0000 (09:00 +0300)]
Begin splitting rpmbuild to separate sources
- Make a copy of the entire rpmqv.c source to rpmbuild.c and switch
  make to use the new copy. No functional changes. Making a copy first
  means we get much easier to follow patch-series on the changes
  that will follow.

13 years agoAdd a test-case for --specfile query
Panu Matilainen [Wed, 18 Aug 2010 09:32:23 +0000 (12:32 +0300)]
Add a test-case for --specfile query

13 years agoAdd %patch usage to hello.spec testcase
Panu Matilainen [Wed, 18 Aug 2010 08:55:19 +0000 (11:55 +0300)]
Add %patch usage to hello.spec testcase

13 years agoLose the now unnecessary rpmtsSELinuxEnabled() function
Panu Matilainen [Fri, 13 Aug 2010 07:58:51 +0000 (10:58 +0300)]
Lose the now unnecessary rpmtsSELinuxEnabled() function
- it never was anything more than a cached value of is_selinux_enabled()
  and caching this fairly expensive result is no longer needed as
  scriptlet execution wrt selinux contexts is now conditionalized on
  RPMTRANS_FLAG_NOCONTEXTS instead

13 years agoConditionalize rpm_execcon() usage on per-transaction flags
Panu Matilainen [Fri, 13 Aug 2010 07:52:40 +0000 (10:52 +0300)]
Conditionalize rpm_execcon() usage on per-transaction flags
- If we aren't laying down file contexts, executing scriptlets in
  contexts doesn't make much sense either as its just likely to fail.
- System-wide settings, such as is_selinux_enabled() value, are
  very ambiguous when it comes to chroots, using per-transaction
  controllable flags instead lets callers decide.

13 years agoAdd missing libgen.h include
Giulio Eulisse [Tue, 10 Aug 2010 08:50:48 +0000 (11:50 +0300)]
Add missing libgen.h include

13 years agoFix find-debuginfo.sh behavior on cross-directory hardlinks (RhBug:618426)
Roland McGrath [Mon, 9 Aug 2010 12:27:03 +0000 (15:27 +0300)]
Fix find-debuginfo.sh behavior on cross-directory hardlinks (RhBug:618426)
- The find-debuginfo.sh script makes hard links of .debug files to
  correspond to hard links between install binaries.  It can fail to
  create one of these .debug hard links if it's in a directory that
  didn't exist at that point in the script run. How this happens
  depends on things like the order "find" lists files, so it can
  be hard to reproduce off hand.

13 years agoCreate GDB index from find-debuginfo if possible (RhBug:617166)
Tom Tromey [Mon, 9 Aug 2010 12:22:51 +0000 (15:22 +0300)]
Create GDB index from find-debuginfo if possible (RhBug:617166)
- Details in https://fedoraproject.org/wiki/Features/GdbIndex

14 years agoRedirect macro stack backtrace printing to debug log.
Jindrich Novy [Tue, 13 Jul 2010 11:35:22 +0000 (13:35 +0200)]
Redirect macro stack backtrace printing to debug log.

14 years agoFix cryptic macro evaluation error message (RhBug:613010)
Jindrich Novy [Tue, 13 Jul 2010 11:34:05 +0000 (13:34 +0200)]
Fix cryptic macro evaluation error message (RhBug:613010)

14 years agol10n: Updated Ukrainian (uk) translation to 100%
Yuri Chornoivan [Sat, 10 Jul 2010 04:51:43 +0000 (04:51 +0000)]
l10n: Updated Ukrainian (uk) translation to 100%

New status: 732 messages complete with 0 fuzzies and 0 untranslated.

Transmitted-via: Transifex (www.transifex.net).

14 years agoSkip any initial comments when looking for pubkey start marker
Panu Matilainen [Fri, 9 Jul 2010 09:32:24 +0000 (12:32 +0300)]
Skip any initial comments when looking for pubkey start marker

14 years agoRemove never used fsmRmdirs() function
Florian Festi [Thu, 8 Jul 2010 12:29:36 +0000 (14:29 +0200)]
Remove never used fsmRmdirs() function
which should have removed implicitly created directories

14 years agoTidy up fsmMapPath a bit
Florian Festi [Thu, 8 Jul 2010 12:25:48 +0000 (14:25 +0200)]
Tidy up fsmMapPath a bit

14 years agoMake FSM_VERIFY a function
Florian Festi [Mon, 7 Jun 2010 13:56:51 +0000 (15:56 +0200)]
Make FSM_VERIFY a function

14 years agoMake FSM_CREATE a function
Florian Festi [Mon, 7 Jun 2010 10:10:08 +0000 (12:10 +0200)]
Make FSM_CREATE a function

14 years agoMake FSM_READLINK a function
Florian Festi [Fri, 4 Jun 2010 15:03:59 +0000 (17:03 +0200)]
Make FSM_READLINK a function

14 years agoMake FSM_LSTAT and FSM_STAT one function
Florian Festi [Fri, 4 Jun 2010 12:30:16 +0000 (14:30 +0200)]
Make FSM_LSTAT and FSM_STAT one function

14 years agoMove FSM_HREAD in place
Florian Festi [Fri, 18 Dec 2009 08:26:05 +0000 (09:26 +0100)]
Move FSM_HREAD in place

14 years agoMove FSM_HWRITE in place
Florian Festi [Fri, 18 Dec 2009 08:24:25 +0000 (09:24 +0100)]
Move FSM_HWRITE in place

14 years agoMove FSM_TRAILER in place
Florian Festi [Fri, 18 Dec 2009 08:22:27 +0000 (09:22 +0100)]
Move FSM_TRAILER in place

14 years agoMove FSM_MKNOD in place
Florian Festi [Thu, 17 Dec 2009 14:12:32 +0000 (15:12 +0100)]
Move FSM_MKNOD in place

14 years agoMove FSM_MKFIFO in place
Florian Festi [Thu, 17 Dec 2009 14:07:25 +0000 (15:07 +0100)]
Move FSM_MKFIFO in place

14 years agoMove FSM_LINK in place
Florian Festi [Thu, 17 Dec 2009 14:04:18 +0000 (15:04 +0100)]
Move FSM_LINK in place

14 years agoMove FSM_SYMLINK in place
Florian Festi [Thu, 17 Dec 2009 14:00:52 +0000 (15:00 +0100)]
Move FSM_SYMLINK in place

14 years agoMake FSM_CHOWN, FSM_LCHOWN, FSM_CHMOD, FSM_UTIME and FSM_SETCAP functions
Florian Festi [Thu, 17 Dec 2009 13:14:56 +0000 (14:14 +0100)]
Make FSM_CHOWN, FSM_LCHOWN, FSM_CHMOD, FSM_UTIME and FSM_SETCAP functions

14 years agoMake FSM_LSETFCON a function
Florian Festi [Thu, 17 Dec 2009 12:40:55 +0000 (13:40 +0100)]
Make FSM_LSETFCON a function

14 years agoMake FSM_RMDIR a function
Florian Festi [Thu, 17 Dec 2009 12:26:21 +0000 (13:26 +0100)]
Make FSM_RMDIR a function

14 years agoMake FSM_RENAME a function
Florian Festi [Thu, 17 Dec 2009 12:22:35 +0000 (13:22 +0100)]
Make FSM_RENAME a function

14 years agoMake FSM_UNLINK a function
Florian Festi [Thu, 17 Dec 2009 12:17:33 +0000 (13:17 +0100)]
Make FSM_UNLINK a function

14 years ago remove no longer needed FSM states
Florian Festi [Thu, 17 Dec 2009 12:06:59 +0000 (13:06 +0100)]
 remove no longer needed FSM states

14 years agoMake FSM_MKDIR a function
Florian Festi [Thu, 17 Dec 2009 12:05:16 +0000 (13:05 +0100)]
Make FSM_MKDIR a function

14 years agoUse fsmRmdirs and fsmMkdirs directly
Florian Festi [Thu, 17 Dec 2009 11:27:52 +0000 (12:27 +0100)]
Use fsmRmdirs and fsmMkdirs directly

14 years agoUse fsmMapPath directly instead of FSM_MAP
Florian Festi [Thu, 17 Dec 2009 11:20:38 +0000 (12:20 +0100)]
Use fsmMapPath directly instead of FSM_MAP
Move fsmMapPath to better position in the file

14 years agoMake FSM_INIT a function
Florian Festi [Thu, 17 Dec 2009 11:17:58 +0000 (12:17 +0100)]
Make FSM_INIT a function

14 years agoOops, dont hang in getOutputFrom() if we have nothing to write
Panu Matilainen [Sat, 3 Jul 2010 04:16:22 +0000 (07:16 +0300)]
Oops, dont hang in getOutputFrom() if we have nothing to write

14 years agoUgh, fix reversed condition on font-provide extractor
Panu Matilainen [Fri, 2 Jul 2010 10:23:11 +0000 (13:23 +0300)]
Ugh, fix reversed condition on font-provide extractor
- braindamage in commit 53045d5dcdce3988e2586cb315b35e6a675a8152

14 years agoRewrite getOutputFrom() in a race-free way (supposedly ;)
Panu Matilainen [Fri, 2 Jul 2010 09:21:00 +0000 (12:21 +0300)]
Rewrite getOutputFrom() in a race-free way (supposedly ;)
- Use a self-pipe to handle signal race on select(). pselect() would work
  too but this is more portable and avoids other signal hassles.
- Use non-blocking IO for communicating with the child to avoid spin-happy
  timeouts, just check all fd's properly before trying to use them
- Avoid leaking memory from readBuff on errors

14 years agol10n: Updated Spanish (Castilian) (es) translation to 100%
Héctor Daniel Cabrera [Wed, 30 Jun 2010 23:23:19 +0000 (23:23 +0000)]
l10n: Updated Spanish (Castilian) (es) translation to 100%

New status: 732 messages complete with 0 fuzzies and 0 untranslated.

Transmitted-via: Transifex (www.transifex.net).

14 years agol10n: Updated Polish (pl) translation to 100%
Piotr Drąg [Wed, 30 Jun 2010 09:38:22 +0000 (09:38 +0000)]
l10n: Updated Polish (pl) translation to 100%

New status: 732 messages complete with 0 fuzzies and 0 untranslated.

Transmitted-via: Transifex (www.transifex.net).

14 years agoMake the infamous getOutputFrom() error message more useful
Panu Matilainen [Wed, 30 Jun 2010 09:27:56 +0000 (12:27 +0300)]
Make the infamous getOutputFrom() error message more useful
- ...like actually saying what was the failing script, doh
- leaving the function name there for a googling hint

14 years agoFix potential getOutputFrom() error on font provide extraction (RhBug:609117)
Panu Matilainen [Wed, 30 Jun 2010 08:57:17 +0000 (11:57 +0300)]
Fix potential getOutputFrom() error on font provide extraction (RhBug:609117)
- if fonts are detected in the package being built but fc-query isn't
  present, the script exited without consuming stdin which can break
  getOutputFrom()

14 years agoExtract dependencies from "use base qw"..."" and "use base qw'...'".
Ville Skyttä [Sun, 23 May 2010 07:54:39 +0000 (10:54 +0300)]
Extract dependencies from "use base qw"..."" and "use base qw'...'".

14 years agoUpdate translations to pick up some recently added strings
Panu Matilainen [Tue, 29 Jun 2010 08:59:33 +0000 (11:59 +0300)]
Update translations to pick up some recently added strings

14 years agoAdd --delsign to man page
Panu Matilainen [Tue, 29 Jun 2010 08:34:32 +0000 (11:34 +0300)]
Add --delsign to man page

14 years agoAdd some sanity checks for generated signatures (related to RhBug:608599)
Panu Matilainen [Tue, 29 Jun 2010 07:47:18 +0000 (10:47 +0300)]
Add some sanity checks for generated signatures (related to RhBug:608599)
- GPG supports all sorts of algorithms NSS doesn't, do some basic tests
  to verify the generated signature is something we can actually use.

14 years agoTell rpm about SHA-224 existence (RhBug:608599)
Jiri Kastner [Tue, 29 Jun 2010 06:46:22 +0000 (09:46 +0300)]
Tell rpm about SHA-224 existence (RhBug:608599)
- Fixes "Unknown hash algorithm" message but this is cosmetic only as
  NSS doesn't currently support SHA-224.

14 years agoUse rpmdsThis() instead of doing the same manually
Panu Matilainen [Mon, 28 Jun 2010 12:59:23 +0000 (15:59 +0300)]
Use rpmdsThis() instead of doing the same manually

14 years agoMove collections tag to "known free" number, document reserved tags
Panu Matilainen [Thu, 24 Jun 2010 10:17:08 +0000 (13:17 +0300)]
Move collections tag to "known free" number, document reserved tags
- missed during review, oh well..

14 years agoErr, remove /build/ from .gitignore
Panu Matilainen [Thu, 24 Jun 2010 08:33:52 +0000 (11:33 +0300)]
Err, remove /build/ from .gitignore

14 years agoPermit plugins to use rpmChrootDone() too
Panu Matilainen [Wed, 23 Jun 2010 13:11:10 +0000 (16:11 +0300)]
Permit plugins to use rpmChrootDone() too

14 years agoRevert "If there are no hardlinks, dont bother with s-bit and caps removal"
Michal Schmidt [Tue, 22 Jun 2010 13:51:41 +0000 (15:51 +0200)]
Revert "If there are no hardlinks, dont bother with s-bit and caps removal"

Deciding whether it is necessary to remove the SUID bit based on
the current link count creates an opportunity for a race condition.
A hardlink could be created just between lstat() and chmod().

This reverts commit 89be57ad9239c9ada0cba94a5003876b456d46bf.

14 years agoAllow '--short-circuit' for '-bb'
Michal Schmidt [Wed, 23 Jun 2010 12:37:56 +0000 (14:37 +0200)]
Allow '--short-circuit' for '-bb'

This patch allows short-circuiting of building binary packages. To
prevent accidental use of short-circuited rpms, they are marked with
an unsatisfiable dependency "rpmlib(ShortCircuited)". A developer using
this feature for local development and testing will use "--nodeps".
Should such a rpm leak into the world, users will quickly notice
it does not install by default.

(v3: avoids API change, suggested by Panu Matilainen.
 v2: added poisoning with unsatisfiable dependency.)

Michal

14 years agoAdd configure.ac check for need to -ldl
Panu Matilainen [Wed, 23 Jun 2010 12:59:49 +0000 (15:59 +0300)]
Add configure.ac check for need to -ldl
- without this the build can barf on unresolved dl* symbols with a
  linker defaulting to --no-add-needed

14 years agoUse rpmlog() instead of fprintf() for collection error messages
Panu Matilainen [Wed, 23 Jun 2010 12:54:48 +0000 (15:54 +0300)]
Use rpmlog() instead of fprintf() for collection error messages

14 years agoMake rpmChrootIn/Out() accessible to plugins
Panu Matilainen [Wed, 23 Jun 2010 11:49:01 +0000 (14:49 +0300)]
Make rpmChrootIn/Out() accessible to plugins
- the exec plugin was using a private copy of rpmchroot.c to avoid
  RPM_GNUC_INTERNAL on the API, better let the plugins use librpm
  state instead
- the chroot API really belongs to librpmio but for now...

14 years agoFix python ts.check() dependency tuple munging
Panu Matilainen [Tue, 22 Jun 2010 11:51:31 +0000 (14:51 +0300)]
Fix python ts.check() dependency tuple munging
- braindamage from commit fab2debfe440d677dbd072c3cd73d2c99876e7a5,
  causing list index out of range for any non-versioned dependency
  and bogus garbage for the rest, doh...

14 years agoFix breakage from commit ccb545f0e9b6cb10e9e7c20b55f77aab754eb9cb
Panu Matilainen [Tue, 22 Jun 2010 11:20:47 +0000 (14:20 +0300)]
Fix breakage from commit ccb545f0e9b6cb10e9e7c20b55f77aab754eb9cb
- file dependencies aren't necessarily on real files, they can be
  virtual provides too eg when alternatives is used
- rc was being accessed unitialized
- oh well, at least I said "supposedly"...

14 years agonumAddedPackages is unused since rpm 4.8.0, eliminate
Panu Matilainen [Tue, 22 Jun 2010 09:22:04 +0000 (12:22 +0300)]
numAddedPackages is unused since rpm 4.8.0, eliminate

14 years agoAdd a generic plugin for use by simple Collections
Steve Lawrence [Mon, 21 Jun 2010 21:04:40 +0000 (17:04 -0400)]
Add a generic plugin for use by simple Collections

This patch adds a generic plugin, exec.so, that should be sufficient for the
majority of Collection actions. After all packages in a Collection have been
installed/removed, this plugin executes the arguments by calling system(3),
allowing for a very generic and powerful method to perform many actions.

This also adds two sample macros as examples of the format, using the exec.so
plugin.

14 years agoDetermine when to perform Collection actions
Steve Lawrence [Mon, 21 Jun 2010 21:04:37 +0000 (17:04 -0400)]
Determine when to perform Collection actions

There are three times during a transaction when Collection actions can be
performed:

1) After the last time a member of a collection is either installed or removed
2) After the last time a member of a collection is installed only
3) Before the first time a member of a collection is removed only

This patch adds three lists to the rpmte structure to mark which transaction
elements fall into each of these groups, and the collections that caused that.
A new function is added to the TSM to scan through all the transaction elements
and update these lists. When a collection is added to one of these lists, it
signifies that when that transaction element is installed, the appropriate
action should be performed for that collection.

14 years agoAdd plugin calling support
Steve Lawrence [Mon, 21 Jun 2010 21:04:39 +0000 (17:04 -0400)]
Add plugin calling support

This patch adds a simple plugin system that makes simple problems easy to
solve, and difficult problems, such as SELinux, possible.

When the transaction gets to the point where a collection action should occur,
it expands a macro of the form %__collection_<collection name> to get the path
to a plugin and any additional options. The plugin is dlopen'ed, and the
appropriate function is called in the plugin, with the additional arguments
passed in.

This also adds a --nocollections option to disable performing Collection
actions.

14 years agoAdd common Collection requirements
Steve Lawrence [Mon, 21 Jun 2010 21:04:38 +0000 (17:04 -0400)]
Add common Collection requirements

This patch adds the install-time feature that if a package requires a package
in a collection, then it also requires all other packages in that collection.
This has the effect that collections will be roughly grouped together during a
transaction.

Although this is not absolutely necessary for the majority of collections, it
is required for the SELinux collection. This is because all SELinux policies
must be installed before the applications they secure to ensure correct labels.
This means we must ensure packages in the selinux collection are ordered
earlier in the transaction than all applications they protect. Adding this
implicit runtime requirements achieves this in a general manner, without major
modifications to dependency ordering.

To accomplish this, this patch splits the addRelation function into two parts:
one that determines which relations to add, and one that actually adds them.
After the usual relation is added between two packages, it then determines if
the required package contains any collections. If so, it finds all other
packages that are in the same collections and creates additional relations.

14 years agoAdd new Collections preamble tag
Steve Lawrence [Mon, 21 Jun 2010 21:04:36 +0000 (17:04 -0400)]
Add new Collections preamble tag

This adds a new Collections preamble tag, which contains a space separated list
of collection names that the package belongs to.

14 years agol10n: Updated Spanish (Castilian) (es) translation to 100%
Héctor Daniel Cabrera [Mon, 14 Jun 2010 15:45:49 +0000 (15:45 +0000)]
l10n: Updated Spanish (Castilian) (es) translation to 100%

New status: 724 messages complete with 0 fuzzies and 0 untranslated.

Transmitted-via: Transifex (www.transifex.net).

14 years agoDont bother with selinux contexts in test transactions
Panu Matilainen [Fri, 11 Jun 2010 05:19:08 +0000 (08:19 +0300)]
Dont bother with selinux contexts in test transactions
- initializing contexts isn't exactly cheap, and test transactions
  have no use for them

14 years agoIf there are no hardlinks, dont bother with s-bit and caps removal
Panu Matilainen [Fri, 11 Jun 2010 05:17:12 +0000 (08:17 +0300)]
If there are no hardlinks, dont bother with s-bit and caps removal

14 years agol10n: Updated Japanese (ja) translation to 97%
Tadashi Jokagi [Mon, 7 Jun 2010 22:12:12 +0000 (22:12 +0000)]
l10n: Updated Japanese (ja) translation to 97%

New status: 707 messages complete with 9 fuzzies and 8 untranslated.

Transmitted-via: Transifex (www.transifex.net).

14 years agol10n: Updated Japanese (ja) translation to 97%
Tadashi Jokagi [Mon, 7 Jun 2010 22:10:29 +0000 (22:10 +0000)]
l10n: Updated Japanese (ja) translation to 97%

New status: 705 messages complete with 10 fuzzies and 9 untranslated.

Transmitted-via: Transifex (www.transifex.net).

14 years agoOops, bad format spec in Finnish translation
Panu Matilainen [Mon, 7 Jun 2010 11:01:02 +0000 (14:01 +0300)]
Oops, bad format spec in Finnish translation

14 years agoEliminate fuzzies from Finnish translation
Panu Matilainen [Mon, 7 Jun 2010 10:14:52 +0000 (13:14 +0300)]
Eliminate fuzzies from Finnish translation

14 years agoUpdate .gitignore a bit
Panu Matilainen [Mon, 7 Jun 2010 09:51:09 +0000 (12:51 +0300)]
Update .gitignore a bit

14 years agol10n: Updated Ukrainian (uk) translation to 100%
Yuri Chornoivan [Sun, 6 Jun 2010 05:40:03 +0000 (05:40 +0000)]
l10n: Updated Ukrainian (uk) translation to 100%

New status: 724 messages complete with 0 fuzzies and 0 untranslated.

Transmitted-via: Transifex (www.transifex.net).

14 years agol10n: Updated Polish (pl) translation to 100%
Piotr Drąg [Thu, 3 Jun 2010 18:45:25 +0000 (18:45 +0000)]
l10n: Updated Polish (pl) translation to 100%

New status: 724 messages complete with 0 fuzzies and 0 untranslated.

Transmitted-via: Transifex (www.transifex.net).

14 years agoFix "empty reply from server" curl-syndrome with url retrieval (RhBug:598988)
Panu Matilainen [Thu, 3 Jun 2010 13:22:09 +0000 (16:22 +0300)]
Fix "empty reply from server" curl-syndrome with url retrieval (RhBug:598988)
- We were adding a trailing newline to urlhelper command line passed
  to execvp(), with the newline ending up in the URL passed to curl.
  Many servers dont seem to mind the extra newline, but some do. Oh well...

14 years agoRemove POSIX file capabilities from executables on erase/rename too
Panu Matilainen [Thu, 3 Jun 2010 08:04:12 +0000 (11:04 +0300)]
Remove POSIX file capabilities from executables on erase/rename too
- Just like suid/sgid bits, hardlinks to executables with capabilities
  set can "leak" permissions to old, potentially vulnerable versions
  of binaries. Related to RhBug:598775.

14 years agoStrip s-bits on upgrade too (RhBug:598775)
Panu Matilainen [Wed, 2 Jun 2010 06:15:48 +0000 (09:15 +0300)]
Strip s-bits on upgrade too (RhBug:598775)
- Previously only actual package removal would clear s-bits from
  s[ug]id files. This needs to be done on upgrade too to prevent
  leaving vulnerable hardlinks of s[ug]id binaries around.

14 years agol10n: Updates to Japanese (ja) translation
Tadashi Jokagi [Wed, 2 Jun 2010 00:01:13 +0000 (00:01 +0000)]
l10n: Updates to Japanese (ja) translation

New status: 664 messages complete with 47 fuzzies and 13 untranslated.

Transmitted-via: Transifex (www.transifex.net).

14 years agoRefactor rpmdb lookups + caching to a helper function + cosmetics
Panu Matilainen [Tue, 1 Jun 2010 12:49:16 +0000 (15:49 +0300)]
Refactor rpmdb lookups + caching to a helper function + cosmetics
- no functional changes (supposedly ;) just cleaning things up a bit

14 years agoOn colored transactions, require matching arch for freshen (RhBug:553108)
Panu Matilainen [Tue, 1 Jun 2010 10:55:15 +0000 (13:55 +0300)]
On colored transactions, require matching arch for freshen (RhBug:553108)
- What we'd really want to compare here is the color or ISA of the packages
  but color isn't realiable as eg -devel packages often aren't correctly
  colored, and ISA isn't currently available in the header as a standalone
  entry. Comparing arch prevents otherwise reasoable i386 -> i686 type
  arch changes on freshen but at least it avoids the most pathological
  issues.

14 years agoPermit DOS line-endings in PGP armors (RhBug:532992)
Panu Matilainen [Tue, 1 Jun 2010 08:58:42 +0000 (11:58 +0300)]
Permit DOS line-endings in PGP armors (RhBug:532992)
- RFC-4880 doesn't requires unix-style line-endings, we shouldn't either.
  This is probably still oversly strict as RFC-4880 appears to permit
  any whitespace to follow armor headers but ... shrug.

14 years agoSupport many pubkeys in a single file in --import (RhBug:586827)
Panu Matilainen [Tue, 1 Jun 2010 07:37:09 +0000 (10:37 +0300)]
Support many pubkeys in a single file in --import (RhBug:586827)

14 years agoDon't return errors on trying to import duplicate keys
Panu Matilainen [Tue, 1 Jun 2010 07:15:10 +0000 (10:15 +0300)]
Don't return errors on trying to import duplicate keys
- On the principle of "no news is good news", if we already have the
  keys to be imported, then everything is ok. The former behavior is
  just confusing as witnessed in RhBug:462979

14 years agoNuke leftover variable from the chroot workout
Panu Matilainen [Mon, 31 May 2010 15:00:33 +0000 (18:00 +0300)]
Nuke leftover variable from the chroot workout

14 years agoUpdate translations to pick up chroot-related string changes
Panu Matilainen [Mon, 31 May 2010 14:01:53 +0000 (17:01 +0300)]
Update translations to pick up chroot-related string changes

14 years agoUse the new chroot API everywhere, eliminate old related goo
Panu Matilainen [Mon, 31 May 2010 11:07:46 +0000 (14:07 +0300)]
Use the new chroot API everywhere, eliminate old related goo

14 years agoAdd a simple API for dealing with chroot state changes
Panu Matilainen [Mon, 31 May 2010 10:11:47 +0000 (13:11 +0300)]
Add a simple API for dealing with chroot state changes
- Chroot is a process global state so it needs to be tracked globally.
  A process can (in theory) have several transaction sets, each with
  different roots (although only one can be active at any time), so
  associating the chroot state with transaction set (as currently done)
  is not right.
- "Reference count" chroot entering and exiting so callers dont need
  to track the state changes individually when they need to go
  in and out of chroot if not already done.
- This should probably go to librpmio eventually but as there are no
  needs outside librpm currently, keeping this internal so we're free
  to fiddle with the api if necessary

14 years agoEliminate unused no-op FSM_CHROOT stage
Panu Matilainen [Mon, 31 May 2010 10:28:58 +0000 (13:28 +0300)]
Eliminate unused no-op FSM_CHROOT stage
- the fsm thingie doesn't need to deal with chroot issues: except for
  build where it doesn't matter, its only called from psm where the
  chroot is already taken care of

14 years agoAdd internal helper for formatting file attribute strings
Panu Matilainen [Fri, 28 May 2010 09:57:59 +0000 (12:57 +0300)]
Add internal helper for formatting file attribute strings
- Eliminates some copy-paste slopping. Verify code traditionally only
  shows the first attribute, take care to keep that format to avoid
  breaking scripts unnecessarily

14 years agoAdd header extension tag RPMTAG_FILESTATUS for file verification
Panu Matilainen [Fri, 28 May 2010 09:21:34 +0000 (12:21 +0300)]
Add header extension tag RPMTAG_FILESTATUS for file verification
- Permits basic file verification with just a headerGet(), with some
  caveats: there's no way to control which attributes get verified,
  and there's no filtering of mtime differences of shared files. Those
  aside, rpm -q --qf "[%{filestates:vflags} %{filenames}\n] <args>" now
  performs the same as "rpm -V --nodeps --noscripts <args>"

14 years agoAdd internal helper for formatting verify flags
Panu Matilainen [Fri, 28 May 2010 09:18:26 +0000 (12:18 +0300)]
Add internal helper for formatting verify flags

14 years agoMove shared file timestamp filtering out of rpmVerifyFile()
Panu Matilainen [Fri, 28 May 2010 07:49:58 +0000 (10:49 +0300)]
Move shared file timestamp filtering out of rpmVerifyFile()
- rpmVerifyFile() reports things as they are in reality - if timestamps
  on disk differ to header then it reports it. Filtering on the result
  belongs to the code interpreting the results.

14 years agoDont crash on NULL ts to rpmtsInitIterator()
Panu Matilainen [Fri, 28 May 2010 07:27:01 +0000 (10:27 +0300)]
Dont crash on NULL ts to rpmtsInitIterator()

14 years agoOnly pass the info we actually care about to verifyHeader()
Panu Matilainen [Fri, 28 May 2010 06:57:09 +0000 (09:57 +0300)]
Only pass the info we actually care about to verifyHeader()

14 years agoEliminate unused argument to verifyDependencies()
Panu Matilainen [Fri, 28 May 2010 06:51:51 +0000 (09:51 +0300)]
Eliminate unused argument to verifyDependencies()

14 years agoClean up verify script handling a bit
Panu Matilainen [Fri, 28 May 2010 06:47:47 +0000 (09:47 +0300)]
Clean up verify script handling a bit
- test verifyscript existence in rpmVerifyScript() instead of caller,
  making it safe+correct for calling on any header
- eliminate unused/unnecessary arguments, local variables and bogus leftover
  comments