Commit Graph

10495 Commits

Author SHA1 Message Date
Florian Festi 10b3a34363 Make FSM_LSETFCON a function 2010-07-07 16:37:25 +02:00
Florian Festi 37a4e8c200 Make FSM_RMDIR a function 2010-07-07 16:37:25 +02:00
Florian Festi f0fa864de7 Make FSM_RENAME a function 2010-07-07 16:37:25 +02:00
Florian Festi f0b0ef96ef Make FSM_UNLINK a function 2010-07-07 16:37:25 +02:00
Florian Festi a23df654c6 remove no longer needed FSM states 2010-07-07 16:37:24 +02:00
Florian Festi 38967315c0 Make FSM_MKDIR a function 2010-07-07 16:37:24 +02:00
Florian Festi 80673746c9 Use fsmRmdirs and fsmMkdirs directly 2010-07-07 16:37:24 +02:00
Florian Festi 16fc8739a8 Use fsmMapPath directly instead of FSM_MAP
Move fsmMapPath to better position in the file
2010-07-07 16:37:24 +02:00
Florian Festi a5ab0681ce Make FSM_INIT a function 2010-07-07 16:37:24 +02:00
Panu Matilainen 74c84ef992 Oops, dont hang in getOutputFrom() if we have nothing to write 2010-07-03 07:16:22 +03:00
Panu Matilainen d44d2ec682 Ugh, fix reversed condition on font-provide extractor
- braindamage in commit 53045d5dcd
2010-07-02 13:23:11 +03:00
Panu Matilainen 375a6b5630 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
2010-07-02 12:23:43 +03:00
Héctor Daniel Cabrera 8fe6438fde 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).
2010-06-30 23:23:19 +00:00
Piotr Drąg 5c2d5a19b9 l10n: Updated Polish (pl) translation to 100%
New status: 732 messages complete with 0 fuzzies and 0 untranslated.

Transmitted-via: Transifex (www.transifex.net).
2010-06-30 09:38:22 +00:00
Panu Matilainen 5711982e27 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
2010-06-30 12:30:49 +03:00
Panu Matilainen 53045d5dcd 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()
2010-06-30 11:57:17 +03:00
Ville Skyttä 7caf820c77 Extract dependencies from "use base qw"..."" and "use base qw'...'". 2010-06-29 13:18:52 +03:00
Panu Matilainen 6a37f166a8 Update translations to pick up some recently added strings 2010-06-29 11:59:33 +03:00
Panu Matilainen 419bc7762d Add --delsign to man page 2010-06-29 11:34:32 +03:00
Panu Matilainen 0e143cfe9f 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.
2010-06-29 10:47:18 +03:00
Jiri Kastner 20cfa7d2b4 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.
2010-06-29 09:48:43 +03:00
Panu Matilainen 85437f43ab Use rpmdsThis() instead of doing the same manually 2010-06-28 16:02:14 +03:00
Panu Matilainen 122cf542d1 Move collections tag to "known free" number, document reserved tags
- missed during review, oh well..
2010-06-24 14:38:20 +03:00
Panu Matilainen 520e9a17c5 Err, remove /build/ from .gitignore 2010-06-24 14:38:14 +03:00
Panu Matilainen a8aa658409 Permit plugins to use rpmChrootDone() too 2010-06-23 16:11:10 +03:00
Michal Schmidt 26874707ed 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 89be57ad92.
2010-06-23 16:10:15 +03:00
Michal Schmidt 7583fcc341 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
2010-06-23 16:06:43 +03:00
Panu Matilainen b6adef396b 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
2010-06-23 15:59:49 +03:00
Panu Matilainen a0e4220d35 Use rpmlog() instead of fprintf() for collection error messages 2010-06-23 15:54:48 +03:00
Panu Matilainen deb24a5698 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...
2010-06-23 14:49:01 +03:00
Panu Matilainen 3aac9445db Fix python ts.check() dependency tuple munging
- braindamage from commit fab2debfe4,
  causing list index out of range for any non-versioned dependency
  and bogus garbage for the rest, doh...
2010-06-22 14:51:31 +03:00
Panu Matilainen 6012c56c0b Fix breakage from commit ccb545f0e9
- 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"...
2010-06-22 14:20:47 +03:00
Panu Matilainen 4ee9296757 numAddedPackages is unused since rpm 4.8.0, eliminate 2010-06-22 12:22:04 +03:00
Steve Lawrence f3bcf9a18c 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.
2010-06-22 11:12:43 +03:00
Steve Lawrence 85d89bafdc 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.
2010-06-22 11:12:43 +03:00
Steve Lawrence 04bdec775a 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.
2010-06-22 11:12:43 +03:00
Steve Lawrence 2fd0913a6a 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.
2010-06-22 11:12:43 +03:00
Steve Lawrence 0158708305 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.
2010-06-22 11:12:43 +03:00
Héctor Daniel Cabrera d6795bee66 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).
2010-06-14 15:45:49 +00:00
Panu Matilainen 33197fd4b1 Dont bother with selinux contexts in test transactions
- initializing contexts isn't exactly cheap, and test transactions
  have no use for them
2010-06-11 08:20:32 +03:00
Panu Matilainen 89be57ad92 If there are no hardlinks, dont bother with s-bit and caps removal 2010-06-11 08:17:12 +03:00
Tadashi Jokagi 0d61354b48 l10n: Updated Japanese (ja) translation to 97%
New status: 707 messages complete with 9 fuzzies and 8 untranslated.

Transmitted-via: Transifex (www.transifex.net).
2010-06-07 22:12:12 +00:00
Tadashi Jokagi 7b9d87a044 l10n: Updated Japanese (ja) translation to 97%
New status: 705 messages complete with 10 fuzzies and 9 untranslated.

Transmitted-via: Transifex (www.transifex.net).
2010-06-07 22:10:29 +00:00
Panu Matilainen 61f5bea69e Oops, bad format spec in Finnish translation 2010-06-07 14:01:02 +03:00
Panu Matilainen 36e8e3d9fe Eliminate fuzzies from Finnish translation 2010-06-07 13:14:52 +03:00
Panu Matilainen cbb37abb4f Update .gitignore a bit 2010-06-07 12:51:09 +03:00
Yuri Chornoivan d8e99d2076 l10n: Updated Ukrainian (uk) translation to 100%
New status: 724 messages complete with 0 fuzzies and 0 untranslated.

Transmitted-via: Transifex (www.transifex.net).
2010-06-06 05:40:03 +00:00
Piotr Drąg c19d846176 l10n: Updated Polish (pl) translation to 100%
New status: 724 messages complete with 0 fuzzies and 0 untranslated.

Transmitted-via: Transifex (www.transifex.net).
2010-06-03 18:45:25 +00:00
Panu Matilainen 15c0c4e7a1 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...
2010-06-03 16:22:09 +03:00
Panu Matilainen 4d172a194a 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.
2010-06-03 11:04:12 +03:00