platform/upstream/rpm.git
13 years agoPreparing for 4.9.0-beta1 rpm-4.9.0-beta1
Panu Matilainen [Thu, 13 Jan 2011 13:33:29 +0000 (15:33 +0200)]
Preparing for 4.9.0-beta1

13 years agoAdd switch to allow printing only soname dependencies to elfdeps helper
Panu Matilainen [Thu, 13 Jan 2011 08:14:25 +0000 (10:14 +0200)]
Add switch to allow printing only soname dependencies to elfdeps helper
(cherry picked from commit fe68483d1b341416f28caa894d8392681d827868)

13 years agoFix rpmsign --key-id popt alias typo
Panu Matilainen [Mon, 10 Jan 2011 12:09:57 +0000 (14:09 +0200)]
Fix rpmsign --key-id popt alias typo
(cherry picked from commit 9f3a0debb686485312d184d7a8c8aad49978629f)

13 years agoHonor --root in rpmkeys too
Panu Matilainen [Fri, 7 Jan 2011 10:06:37 +0000 (12:06 +0200)]
Honor --root in rpmkeys too
(cherry picked from commit b4f4e2255f3bf5a9c738f6d9d67f477f208fe04b)

13 years agoHide --verifydb switch again
Panu Matilainen [Wed, 5 Jan 2011 13:22:00 +0000 (15:22 +0200)]
Hide --verifydb switch again
- It got exposed in the rpmdb tool splitup, but the functionality in
  it's current form is still just as dubious as it always was, hide
  it out of sight again.
(cherry picked from commit 599094e258fc69d76ef9291355850a10508acb3a)

13 years agoTweak up BDB flags to avoid breakage from --verifydb
Panu Matilainen [Wed, 5 Jan 2011 11:26:11 +0000 (13:26 +0200)]
Tweak up BDB flags to avoid breakage from --verifydb
- db->verify() has semantics unlike anything else in BDB and does
  strange things to a shared environment (causes persistent ENOMEM
  failures in the environment after a couple of attemps). Use a private
  environment and no CDB when verifying.
- The whole --verifydb is rather useless, perhaps the better option
  would be deleting the lot...
(cherry picked from commit 5c4135654f9d35772bea8a51c98c8020a3d20396)

13 years agoA largish man-page update
Panu Matilainen [Wed, 5 Jan 2011 08:05:33 +0000 (10:05 +0200)]
A largish man-page update
- Remove rpmquery and rpmverify manuals for now, the functionality
  didn't get split to separate binaries afterall and the manpages
  were in a rather bad shape afterall.
- Add some missing options, remove no longer existing options
- Remove rpmdb, rpmkeys, rpmsign and rpmspec related switches from
  man rpm manual, add them to the "see also"-section instead
- Adjust database file list on main rpm manual, remove it from rpmbuild man.
(cherry picked from commit c6d98322f1d30ca8028efb63bfde24b554abfda1)

13 years agoBump up default BDB cache- and allowed mmap size considerably
Panu Matilainen [Mon, 3 Jan 2011 13:49:50 +0000 (15:49 +0200)]
Bump up default BDB cache- and allowed mmap size considerably
- The former defaults come from nearly a decade ago, things have
  changed a bit since then... Even BDB's own default cache size is
  much larger (8MB) now than what we've been setting.
- Using 64MB cache improves cache hit rate (and performance) massively.
  Last-gasp default to roughly BDB's own current defaults, higher
  settings in the default macro setup.
(cherry picked from commit 6b6310b152475793a1272d8829a9df89a6edaee6)

13 years agoRequire %files section for package generation again
Panu Matilainen [Thu, 23 Dec 2010 07:24:25 +0000 (09:24 +0200)]
Require %files section for package generation again
- Turns out this change does more harm than good, people are actually
  relying on this behavior to avoid zillion conditionals in the spec.
  We'll want a saner way to conditionally disable/enable packages
  but until we have that, revert to the former longstanding behavior.
- This effectively reverts commit d010ec1c9026b35f5b2521be965c03c826894ce8
(cherry picked from commit b76fa1a7fdf738ccd45dd70a5489d5110a6d5534)

13 years agoOnly sepolicy-plugin needs linking to libsemanage
Panu Matilainen [Wed, 22 Dec 2010 12:58:11 +0000 (14:58 +0200)]
Only sepolicy-plugin needs linking to libsemanage
(cherry picked from commit 454859f3cbe6f59cbf6d5905fe469d3bf64adf4a)

13 years agoMake rpmplugins.h private for now
Panu Matilainen [Wed, 22 Dec 2010 11:11:40 +0000 (13:11 +0200)]
Make rpmplugins.h private for now
- We'll probably want to make some changes to the plugin type system
  before considered "ready", the current plugin slots are limited
  to 32 and Meego folks apparently want to use a largish number
  of slots. So we might want something like separate plugin type
  (collection, security... etc) and then have 32 slots per each type.
  Making this private for now to avoid having to potentially break
  the API shortly after introduction.
(cherry picked from commit d10b40301188f1b00cbdaf49b1c09786d546ede0)

13 years agoUpdate translations to kick out removed messages etc
Panu Matilainen [Tue, 21 Dec 2010 09:52:28 +0000 (11:52 +0200)]
Update translations to kick out removed messages etc

13 years agoMove rpmtsSELabelFoo() functions to an internal-only header
Panu Matilainen [Tue, 21 Dec 2010 09:01:22 +0000 (11:01 +0200)]
Move rpmtsSELabelFoo() functions to an internal-only header
- The sepolicy plugin needs them so the symbols can't be hidden, but
  these are not something external API-users should be messing with.
- Ultimately we'll want to push the actual labeling from FSM to
  the plugin, insulating rpm from all SELinux specifics, this is
  just a band-aid temporary "solution" to keep this out of the API.
(cherry picked from commit 00463e2fe0d115d873f141995e7d8b3041de7d36)

13 years agoFree up a bunch of bits from rpmtransFlags_e
Panu Matilainen [Mon, 20 Dec 2010 10:10:21 +0000 (12:10 +0200)]
Free up a bunch of bits from rpmtransFlags_e
- With all this unused junk gone from the bitfield, we suddenly
  have plenty of bits to play with...
- Preserving the symbols, just defined to 0, to avoid unnecessarily
  breaking compilation of stuff that refers to the old
  unused/unimplemented flags
(cherry picked from commit 247c5431776299196cf32e0a3980a4b9516379ea)

13 years agoMark two more unused rpmts flags as such
Panu Matilainen [Mon, 20 Dec 2010 09:58:44 +0000 (11:58 +0200)]
Mark two more unused rpmts flags as such
(cherry picked from commit c1d8fc34f9d36b3f47e30489caab848dae1f151a)

13 years agoRip the remains of --aid and --nosuggest, except for the callback
Panu Matilainen [Mon, 20 Dec 2010 09:50:30 +0000 (11:50 +0200)]
Rip the remains of --aid and --nosuggest, except for the callback
- Only thing ever using RPMTRANS_FLAG_ADDINDEPS and _NOSUGGEST was
  rpm itself, and we haven't had an in-rpm implementation for this
  since the broken "rpmdb as repo format" was ripped out in 4.6.0.
  We dont need these special flags to support the operation anyway,
  IF somebody sets the solve callback, it will be used and the one
  implementing the callback gets to deal with whether those bits
  should be added to transaction or not.
(cherry picked from commit 3b07e36fc430ae15a34a6b4c3249460ddf120c01)

13 years agoRip the stillborn, broken apply/commit transaction goo
Panu Matilainen [Mon, 20 Dec 2010 09:38:21 +0000 (11:38 +0200)]
Rip the stillborn, broken apply/commit transaction goo
- This was beginnings of something ten years ago, and that something
  was long since abandoned. These never did anything useful
  that --justdb/--noscripts wouldn't do.
(cherry picked from commit 89c2fd9f512df1e673a073229914b5371e619ea4)

13 years agoYet another pile of depmatch tests + added commentary
Panu Matilainen [Fri, 17 Dec 2010 09:00:41 +0000 (11:00 +0200)]
Yet another pile of depmatch tests + added commentary
(cherry picked from commit c91e00e81eabe287e6d0786bdc8b0a4f10f19d73)

13 years agoAdd pile of further dependency match testcases
Panu Matilainen [Fri, 17 Dec 2010 07:19:48 +0000 (09:19 +0200)]
Add pile of further dependency match testcases
- Test for provide ranges, versionless dependencies and different names
- Tabify the test-table for readability + editability
(cherry picked from commit 1f037a030a57f23e8305aa509987260644db74d1)

13 years agoAdd a pile of dependency matching tests for "obvious" cases
Panu Matilainen [Thu, 16 Dec 2010 15:39:00 +0000 (17:39 +0200)]
Add a pile of dependency matching tests for "obvious" cases
(cherry picked from commit 2c4899c8d7346ae3a9dbd830939fda29efb7a6a6)

13 years agoMove python test-suite macros to local.at, rename
Panu Matilainen [Thu, 16 Dec 2010 15:18:21 +0000 (17:18 +0200)]
Move python test-suite macros to local.at, rename
- We'll want to use these in other test parts than just python. Make
  available everywhere and use "namespace" to avoid potential future
  clashes.
(cherry picked from commit 8acb7f7c1d8d7e93a04ca214f98660a40ee2b319)

13 years agoPermit comparison operator strings (<, >= etc) in python ds constructor
Panu Matilainen [Thu, 16 Dec 2010 12:11:25 +0000 (14:11 +0200)]
Permit comparison operator strings (<, >= etc) in python ds constructor
- Creating ('foo', '>=', '1.2') dependency is much nicer than
  or'ing rpm.RPMSENSE_FOO for flags. Allow (but validate) the string
  usage, ints get passed as is.
(cherry picked from commit bf37b06d19b769572c06a667b31164d6ed279155)

13 years agoUnbreak file user/groupname handling in build
Panu Matilainen [Thu, 16 Dec 2010 07:35:08 +0000 (09:35 +0200)]
Unbreak file user/groupname handling in build
- Fixes regression from commit a2d002a34bc567e8ce88c9ed30270d55d7c904fd,
  the librpmbuild "name cache" was used for unique string storage too
  and not just user/group-info lookup cache, duh.
- At least for now, making this separation explicit in the code
  by separating the "stash this string" operation from the actual
  user/group lookups.
(cherry picked from commit 50ab0945c5ddffd354692f8c31616c3575ebbd11)

13 years agoAdd a "unique string cache" to rpmug
Panu Matilainen [Thu, 16 Dec 2010 07:31:20 +0000 (09:31 +0200)]
Add a "unique string cache" to rpmug
- Used for storing unique strings just once
(cherry picked from commit 353a7a81257e2a2a322b211b6ebf11b750ca6e68)

13 years agoSupport GetEntry() for hashes without datatype too
Panu Matilainen [Thu, 16 Dec 2010 07:28:34 +0000 (09:28 +0200)]
Support GetEntry() for hashes without datatype too
(cherry picked from commit 3296c651b90b1caed216a3c65f024ea741ea13f9)

13 years agoEliminate ancient dependency loop whiteout mechanism
Panu Matilainen [Wed, 15 Dec 2010 09:34:50 +0000 (11:34 +0200)]
Eliminate ancient dependency loop whiteout mechanism
- Nobody has been relying on this for ages, and with the new ordering
  code since rpm 4.8.x loops are handled much more gracefully than
  before. RIP.
(cherry picked from commit 69187d6bb04d36934a7f9f276d90164e842ef54c)

13 years agoRemove the now unused user/group caching code
Panu Matilainen [Wed, 15 Dec 2010 07:42:03 +0000 (09:42 +0200)]
Remove the now unused user/group caching code
(cherry picked from commit bc457015f6c2c82f84a2ba7e805883944a64f679)

13 years agoUnify the user+group caching between librpm and librpmbuild
Panu Matilainen [Wed, 15 Dec 2010 07:30:56 +0000 (09:30 +0200)]
Unify the user+group caching between librpm and librpmbuild
- The build version has getUidS() and getGidS() for which there is
  no counterpart in the rpmug api but there's not much point to them:
  they check whether the user/groupname exists but return our own
  string back to us even if it doesn't.
- The build version also caches more than current rpmug, but has an ugly
  hardwired limit causing (in theory) errors that can't be nicely
  handled, and is the last piece relying on RPMLOG_CRIT actually
  terminating the process. The librpm version doesn't fail, in the
  worst case its just a bit slower. And that can be fixed anytime by
  making it to use hash tables for caching.
(cherry picked from commit a2d002a34bc567e8ce88c9ed30270d55d7c904fd)

13 years agoSplit user+group caching to separate source (again), rename
Panu Matilainen [Tue, 14 Dec 2010 09:34:34 +0000 (11:34 +0200)]
Split user+group caching to separate source (again), rename
- We'll want to unify this and the similar caching done in librpmbuild,
  so we need to expose these in the ABI at least, rename to get
  them namespaced and use a separate source module (again) as
  this is a pretty distinct functionality.
- This would really belong to librpmio but leaving here for now...
(cherry picked from commit 2a54555aa2144f56a2ba518c48830c60da78c4d4)

13 years agoRemove hardcoded lock and mail group id's
Panu Matilainen [Tue, 14 Dec 2010 10:51:12 +0000 (12:51 +0200)]
Remove hardcoded lock and mail group id's
- Rpm has no business making assumptions about arbitrary group id's,
  if these are not available through getgrname() when needed,
  that's a packaging problem.
(cherry picked from commit a26848218cfdefd0f8ee538a14a57c9fea4e7b2d)

13 years agoCut down the initial db checked hash allocation somewhat
Panu Matilainen [Mon, 13 Dec 2010 12:53:35 +0000 (14:53 +0200)]
Cut down the initial db checked hash allocation somewhat
- The instance numbers are often much much bigger than the number
  of actual packages, and the hash table grows automatically as needed
  so there's no need to over-allocate at the start. Apply some
  (fairly arbitrary) heuristics to limit the initial allocation size.
(cherry picked from commit e40a7c61c422e79838226c69cb84f7a624fa6127)

13 years agoReplace verified header tracking bitfield with a hash table
Panu Matilainen [Mon, 13 Dec 2010 12:23:02 +0000 (14:23 +0200)]
Replace verified header tracking bitfield with a hash table
- No functional changes, but allows getting rid of yet another custom
  (re)allocation scheme + ugly bitfield manipulation macros. Also the
  header instance numbers can be rather sparse, making hash a natural
  fit for the purpose.
(cherry picked from commit 78097d55f446c32911f629d4ce3ef79fe3c5c898)

13 years agoImplement transaction ordering hinting
Panu Matilainen [Mon, 13 Dec 2010 10:03:18 +0000 (12:03 +0200)]
Implement transaction ordering hinting
- Add support for new "OrderWithRequires: foo" spec syntax
  which has "if and only if foo is present in transaction, order
  the transaction as if this package required foo" semantics.
  While it looks, and in some ways is, a soft dependency, this
  is not the same as recommends/suggests etc: those have unknown
  depsolver policy dependent semantics attached to them, whereas
  ordering hints have a clear definition and is only relevant for rpm
  itself, depsolvers should not even look at the data.
- This allows packages to express correct ordering for optional
  functionality, such as

      %post
      if [ -x %{_bindir}/register-component ]; then
          %{_bindir}/register-component %{name}
      fi

  If the package containing %{_bindir}/register-component is included
  in the same transaction, it makes sense to have it installed before the
  package(s) that use it. But as it is fully optional, Requires would
  not be appropriate. Using OrderWithRequires allows this to be expressed
  without dragging in extraneous dependencies for optional functionality.
(cherry picked from commit 5c43095e1d78b3befe93c746fd182746c3b96c92)

13 years agoImplement filtering of autogenerated dependencies
Panu Matilainen [Fri, 10 Dec 2010 14:18:15 +0000 (16:18 +0200)]
Implement filtering of autogenerated dependencies
- This allows both excluding entire paths from dependency generation
  and also excluding individual generated dependencies by regexes
  settable from spec or other configuration.
- %__(provides|requires)_exclude regex controls is matched against
  generated dependencies, %__(provides|requires)_exclude_from is
  matched against the currently processed path, with buildroot
  stripped out.
- We'll probably want some "higher level" macros to go with this,
  but the mechanism is usable as-is already.
(cherry picked from commit 185de185262b2772fa692efc69633f41afc5832a)

13 years agoSome further preliminaries for next bits
Panu Matilainen [Fri, 10 Dec 2010 14:12:06 +0000 (16:12 +0200)]
Some further preliminaries for next bits
- Add a helper function for freeing regex pointers
- Move regMatch() to top of rpmfc.c, we'll need it shortly
(cherry picked from commit 27a17ec74a21eb5c8ca44972e15531244881cc07)

13 years agoRefactor the helper execution out of rpmfcHelper()
Panu Matilainen [Fri, 10 Dec 2010 12:14:44 +0000 (14:14 +0200)]
Refactor the helper execution out of rpmfcHelper()
- Split the macro name generation and grabbing of argv-style output
  into yet another helper to reduce the clutter in rpmfcHelper()
  before adding more stuff in there.
(cherry picked from commit ca3089f8bc4de7e2426b129f998a3c59daeebfd0)

13 years agoRename pattern -> path for, duh, path patterns
Panu Matilainen [Fri, 10 Dec 2010 10:33:46 +0000 (12:33 +0200)]
Rename pattern -> path for, duh, path patterns
- 4.9 alpha used "pattern" but better fix the stupid name now than
  have to live with the non-obvious name forever
(cherry picked from commit a9bc1f51ae6bb6e1df0a5de71ac2a27b0932f144)

13 years agoSupport excluding by path or magic in file classification
Panu Matilainen [Fri, 10 Dec 2010 09:53:45 +0000 (11:53 +0200)]
Support excluding by path or magic in file classification
- %__foo_exclude_pattern and %__foo_exclude_magic regex'es now allow
  excluding attributes that would otherwise match.
(cherry picked from commit f5a657112a8f9a107314dcd02767146e64953abe)

13 years agoRemove broken versioned provides rpmlib() tracking
Panu Matilainen [Fri, 10 Dec 2010 08:36:45 +0000 (10:36 +0200)]
Remove broken versioned provides rpmlib() tracking
- Every single package since rpm >= 3.0.4 or so has a versioned provide
  through the automatically added N = VR provide, which hasn't gotten
  tracked in all these years. Drop the useless dependency.
(cherry picked from commit 17445a390a8686de6d1532b03cd4dc8314850dd3)

13 years agoAdd beginnings of python bindings test-suite
Panu Matilainen [Thu, 9 Dec 2010 14:32:56 +0000 (16:32 +0200)]
Add beginnings of python bindings test-suite
- Add some basic infrastructure: point PYTHONPATH to the testing
  directory, helper macros to allow use of in-line python in test-suite
- Throw in a couple of simple tests for starters
(cherry picked from commit 2a37d9a4dcfd172db9a63584ec2267702153e00b)

13 years agoKick out some long since invalid comments
Panu Matilainen [Fri, 3 Dec 2010 13:55:02 +0000 (15:55 +0200)]
Kick out some long since invalid comments
(cherry picked from commit f63e19d2986609193b409fea7a52e5eb41478a48)

13 years agoA bit of sanity checking in rpmtsRebuildDB()
Panu Matilainen [Fri, 3 Dec 2010 13:31:01 +0000 (15:31 +0200)]
A bit of sanity checking in rpmtsRebuildDB()
- Don't permit rebuilddb on populated transaction as rebuild can
  and usually does change header instance numbering.
(cherry picked from commit 626e78429ff6dd77de77abb9073c3defacdd5726)

13 years agoBump library sonames
Panu Matilainen [Fri, 3 Dec 2010 11:59:43 +0000 (13:59 +0200)]
Bump library sonames
- Lots and lots of API changes, including what amounts to
  rewriting of librpmbuild external API... The only exception is
  librpmsign which is new and starts with 0

13 years agoInternalize most direct rpmdb manipulation functions
Panu Matilainen [Fri, 3 Dec 2010 11:38:59 +0000 (13:38 +0200)]
Internalize most direct rpmdb manipulation functions
- Since rpm 4.1 times, callers are supposed to use the rpmtsFooDB()
  variants instead of the lower-level rpmdb functions, and mixing
  them is not safe. Enforce the use of ts-level versions by making
  rpmdbLink(), rpmdbOpen(), rpmdbInit(), rpmdbClose(),
  rpmdbSync(), rpmdbVerify() and rpmdbRebuild() internal-only.
- Doing this now to eliminate a few needs for breaking API again
  in 4.10 (one can wish, right?)

13 years agoRequire pkg-config 0.24 for creating pkgconfig() dependencies
Panu Matilainen [Fri, 3 Dec 2010 10:44:49 +0000 (12:44 +0200)]
Require pkg-config 0.24 for creating pkgconfig() dependencies
- The support for --print-requires|provides was only upstreamed in
  pkg-config 0.24, prior to that it relied on distros patching their
  pkg-config. Rpm relying on non-upstream stuff is not good...
  Now that it's upstream we can make a clean break and simply not
  even try to generate the dependencies with anything older.
- The upstreamed version behaves slightly differently from what distros
  were patching with, for rpm's purposes we also want
  --print-requires-private now.

13 years agoUpdate translations to pick up recent changes
Panu Matilainen [Wed, 1 Dec 2010 15:17:01 +0000 (17:17 +0200)]
Update translations to pick up recent changes

13 years agoFix bogus error reporting from autogenerated dependencies (ticket #181)
Panu Matilainen [Wed, 1 Dec 2010 15:15:18 +0000 (17:15 +0200)]
Fix bogus error reporting from autogenerated dependencies (ticket #181)
- Automatically generated dependencies do not relate to spec lines,
  use different error reporting for manually vs automatically added
  dependencies.

13 years agoOops, mono dependency extractors need a bunch of arguments
Panu Matilainen [Wed, 1 Dec 2010 09:55:46 +0000 (11:55 +0200)]
Oops, mono dependency extractors need a bunch of arguments
- Regression from the initial conversion to the new system in
  commit 8c7e53ec80e84f48bfc67181f3d5dd81ecdb7523
- The buildroot doesn't need passing as arg anymore but for now,
  just keep it compatible

13 years agoMake rpmdeps honor RPM_BUILD_ROOT if set
Panu Matilainen [Wed, 1 Dec 2010 09:22:32 +0000 (11:22 +0200)]
Make rpmdeps honor RPM_BUILD_ROOT if set
- rpmdeps calls the internal dependency generator as an external
  dependency generator (yes its more than a bit wacky), and the
  internal generator needs to know the buildroot as path patterns
  expect non-buildroot paths for accuracy.

13 years agoPass RPM_BUILD_ROOT to helper scripts through environment always
Panu Matilainen [Wed, 1 Dec 2010 09:18:19 +0000 (11:18 +0200)]
Pass RPM_BUILD_ROOT to helper scripts through environment always
- Many of the scripts need to know the buildroot in order to figure
  out correct resulting paths. This permits unifying the current
  adhoc methods of passing the data to the scripts.

13 years agoRemember buildroot directory in rpmfc struct
Panu Matilainen [Wed, 1 Dec 2010 09:09:02 +0000 (11:09 +0200)]
Remember buildroot directory in rpmfc struct
- New constructor rpmfcCreate() which takes buildroot as an argument,
  and "flags" argument for future use. Calculate brlen at initialization
  now that we can.
- Preserve rpmfcNew() as a compatibility wrapper as it's something
  somebody could, in theory, have used legitimately.

13 years agoEliminate unused dir argument to getOutputFrom()
Panu Matilainen [Wed, 1 Dec 2010 07:31:07 +0000 (09:31 +0200)]
Eliminate unused dir argument to getOutputFrom()

13 years agoUnbreak perl module dependency extraction
Panu Matilainen [Wed, 1 Dec 2010 07:06:05 +0000 (09:06 +0200)]
Unbreak perl module dependency extraction
- Dumb attribute vs macro name thinko/typo preventing it from working
  at all, duh.
- At least for now, revert back to magic based pattern: we dont really
  know where all the perl modules might live. OTOH this relies on
  the ugly "all .pm files are perl modules for now" hack inside rpmfc.c.
  We could of course use a loose /.*\\.pm path rule too for the same
  effect and eliminate the hack, but that'd leave strange stuff into
  fileclass tags when libmagic fails to detect its actually perl.
  Need to figure out something better here... maybe allow overriding
  libmagic detected strings from foo.attr or such.

13 years agoFix long-standing segfault on unknown tags on header iteration queries
Panu Matilainen [Mon, 29 Nov 2010 13:56:55 +0000 (15:56 +0200)]
Fix long-standing segfault on unknown tags on header iteration queries
- The simple and stupid tag cache was a bit too simple, failing
  to deal with unknown tags larger than our own tag table correctly.
  Use a hash table instead which is a far better suited for the
  sparse tag numbers anyway.

13 years agoEliminate dead RPMTAG_INSTALLPREFIX tag extension
Panu Matilainen [Mon, 29 Nov 2010 10:28:47 +0000 (12:28 +0200)]
Eliminate dead RPMTAG_INSTALLPREFIX tag extension
- This hasn't been functional since rpm 4.6 at least: the tag is marked
  internal so it's not recognized as a valid query tag, and there's
  no point supporting this anyway, it was already deprecated backwards
  compatibility hack in rpm 2.x in 1998 era.

13 years agoWe're already considering <pthread.h> mandatory header elsewhere
Panu Matilainen [Tue, 23 Nov 2010 15:52:06 +0000 (17:52 +0200)]
We're already considering <pthread.h> mandatory header elsewhere
- ... so might as well do so here too

13 years agoAxe the rpmsq debug code which was never getting built anyway
Panu Matilainen [Tue, 23 Nov 2010 15:49:16 +0000 (17:49 +0200)]
Axe the rpmsq debug code which was never getting built anyway

13 years agoLose all the stillborn code in rpmsq.[ch]
Panu Matilainen [Tue, 23 Nov 2010 15:43:45 +0000 (17:43 +0200)]
Lose all the stillborn code in rpmsq.[ch]
- rpmsqThread(), rpmsqJoin(), rpmsqThreadEqual() and rpmsqExecve()
  have never been used... get rid of them while we're bumping sonames
  anyway

13 years agoOops, missing include in previous commit
Panu Matilainen [Tue, 23 Nov 2010 15:42:57 +0000 (17:42 +0200)]
Oops, missing include in previous commit

13 years agoPermit unicode paths in rpm.fd() (RhBug:654145)
Panu Matilainen [Tue, 23 Nov 2010 10:30:38 +0000 (12:30 +0200)]
Permit unicode paths in rpm.fd() (RhBug:654145)
- Python 3 has fs-specific converter function, for Python 2 just
  assume utf-8 and hope the best.

13 years agoAdd bunch of rpmvercmp() algorithm tests to the test-suite
Panu Matilainen [Mon, 22 Nov 2010 09:40:44 +0000 (11:40 +0200)]
Add bunch of rpmvercmp() algorithm tests to the test-suite

13 years agoMove the current "version compare" tests to rpm install tests
Panu Matilainen [Mon, 22 Nov 2010 08:36:54 +0000 (10:36 +0200)]
Move the current "version compare" tests to rpm install tests
- These are more about rpm install/upgrade behavior than pure
  version comparison, although obviously version comparison is involved

13 years agol10n: Updated Ukrainian (uk) translation to 100%
Yuri Chornoivan [Sun, 21 Nov 2010 14:43:11 +0000 (14:43 +0000)]
l10n: Updated Ukrainian (uk) translation to 100%

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

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

13 years agol10n: Updated Polish (pl) translation to 100%
Piotr Drąg [Fri, 19 Nov 2010 08:13:59 +0000 (08:13 +0000)]
l10n: Updated Polish (pl) translation to 100%

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

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

13 years agoUpdate translations to pick up recent changes
Panu Matilainen [Thu, 18 Nov 2010 11:20:42 +0000 (13:20 +0200)]
Update translations to pick up recent changes

13 years agoOnly force default umask during transaction (RhBug:494440)
Panu Matilainen [Thu, 18 Nov 2010 10:50:55 +0000 (12:50 +0200)]
Only force default umask during transaction (RhBug:494440)
- For rpm itself forging global umask on init is kinda convenient, but can
  be troublesome for API users. This is especially bad in python bindings
  where just importing the rpm module silently changes process umask with
  no good reason.
- Instead of global setting on init, only change the umask to 022 default
  for the duration of rpmtsRun() where it's necessary for consistent
  transaction results on implicitly created directories and files created
  by scriptlets. This way we dont affect callers and provide better
  "protection" for ourselves too - we don't know if API users change
  umask again behind our back if we just set it on initialization.
- To make matters more fun, Lua scripts can change our umask. Save
  and restore umask when running Lua scriptlets.

13 years agoAlways exit rpmtsRun() via rpmtsFinish()
Panu Matilainen [Wed, 17 Nov 2010 14:27:10 +0000 (16:27 +0200)]
Always exit rpmtsRun() via rpmtsFinish()
- Fixes a memory leak from rpmtsSELabelInit()
- Ensures we get out of chroot() on the way out

13 years agoPlug a minor memory leak in librpmbuild doPatch()
Panu Matilainen [Wed, 17 Nov 2010 13:54:38 +0000 (15:54 +0200)]
Plug a minor memory leak in librpmbuild doPatch()

13 years agoRevert rpmquery/rpmverify split, ain't gonna happen this time around
Panu Matilainen [Wed, 17 Nov 2010 13:33:30 +0000 (15:33 +0200)]
Revert rpmquery/rpmverify split, ain't gonna happen this time around
- Dealing with the inevitable fallout and popt-foo needs more time
  to handle, revert to the rpm 4.6-4.8 setup where rpmquery and rpmverify
  are just symlinks to /bin/rpm, allowing especially query aliases
  to work. Releasing an intermediate version where 'rpmquery --requires'
  and the like dont work would do nothing but hurt the future intention
  of splitting these things up for real.
- This effectively reverts commit 26125015e4321765582dce0b76f83530e7604d4e

13 years agoYet another round of enum-as-function-argument elimination
Panu Matilainen [Wed, 17 Nov 2010 06:52:18 +0000 (08:52 +0200)]
Yet another round of enum-as-function-argument elimination
- Pass the yes/no magic argument to headerRead(), headerWrite() and
  headerSizeof() as int instead of enum.

13 years agoAvoid enum as function argument for headerConvert()
Panu Matilainen [Wed, 17 Nov 2010 06:46:21 +0000 (08:46 +0200)]
Avoid enum as function argument for headerConvert()
- While this /nearly/ qualifies for enum, places like python
  argument converting will not be able to produce "true enum" values.
  So dont even try.

13 years agoRemove RPMTAG_FILESTATUS tag extension
Panu Matilainen [Mon, 15 Nov 2010 09:06:44 +0000 (11:06 +0200)]
Remove RPMTAG_FILESTATUS tag extension
- This is a bad "API" for verification, it can't be controlled and
  causes heavy IO where one would not expect it. Getting rid of it now
  before anybody starts relying on it...
- Leaving :fstatus format extension alone however, it's at least harmless
  and produces a more predictable output than :vflags extension so it
  might be actually useful in scripts.

13 years agoRemove no longer relevant references to build from arg sanity checks
Panu Matilainen [Mon, 15 Nov 2010 08:48:33 +0000 (10:48 +0200)]
Remove no longer relevant references to build from arg sanity checks

13 years agoRemove absolute paths from our popt exec aliases now that we can
Panu Matilainen [Mon, 15 Nov 2010 08:21:23 +0000 (10:21 +0200)]
Remove absolute paths from our popt exec aliases now that we can
- poptExecPath() pointing to meaningful place allows removal of these.
- Make test-suite rely on the --initdb exec alias so we catch out
 if anything here breaks

13 years agoMake our popt exec path more useful, permit environment override
Panu Matilainen [Mon, 15 Nov 2010 08:18:49 +0000 (10:18 +0200)]
Make our popt exec path more useful, permit environment override
- In 4.4.x days, we used to have bunch of helper binaries in /usr/lib/rpm
  executed through popt ping-pong, but there's nothing now that we'd
  want to execute through aliases. Instead use bindir for the
  default path, and additionally permit overriding through
  RPM_POPTEXEC_PATH environment variable (mostly probably useful for
  the testsuite)

13 years agoEliminate pointless argument sanity check
Panu Matilainen [Mon, 15 Nov 2010 08:05:18 +0000 (10:05 +0200)]
Eliminate pointless argument sanity check
- --root is valid for all the remaining modes, no point checking for it
- MODES_FOR_DBPATH is completely unused (and dbpath is a common option
  to all anyway)

13 years agoHide obsolete --nomd5 switches from help output
Panu Matilainen [Mon, 15 Nov 2010 07:56:57 +0000 (09:56 +0200)]
Hide obsolete --nomd5 switches from help output
- We dont want new users to pick up using these old switches but
  preserving functionality for backwards compatibility for now

13 years agoBasic protection against Lua os.exit() and posix.exec() (ticket #167)
Panu Matilainen [Mon, 15 Nov 2010 07:36:17 +0000 (09:36 +0200)]
Basic protection against Lua os.exit() and posix.exec() (ticket #167)
- Track posix.fork() and only allow exit() and exec() if the script
  has forked. There are other questionable items in posix extensions
  too but these are the worst offenders.
- Using Lua registry for tracking forked status might be more Lua-way
  option but this'll do for now.

13 years agoRemove unnecessary includes
Panu Matilainen [Mon, 15 Nov 2010 07:17:25 +0000 (09:17 +0200)]
Remove unnecessary includes

13 years agoRearrange new cli utilities' popt tables for nicer output
Panu Matilainen [Mon, 15 Nov 2010 07:07:10 +0000 (09:07 +0200)]
Rearrange new cli utilities' popt tables for nicer output
- Use a separate table for the tool-specific options, include that from
  the "master" option table to get option group summary in --help.

13 years agoOops, rpmspec.c missing from POTFILES.in
Panu Matilainen [Mon, 15 Nov 2010 06:55:56 +0000 (08:55 +0200)]
Oops, rpmspec.c missing from POTFILES.in

13 years agoGet rid of 'rpminstall' binary & manual afterall, flip flop
Panu Matilainen [Fri, 12 Nov 2010 09:59:17 +0000 (11:59 +0200)]
Get rid of 'rpminstall' binary & manual afterall, flip flop
- It's a bad name for something that can also erase packages, leave
  the install/upgrade/erase modes for /bin/rpm instead.

13 years agoRemove superfluous dbiSync() call (refactoring thinko or such)
Panu Matilainen [Thu, 11 Nov 2010 12:33:01 +0000 (14:33 +0200)]
Remove superfluous dbiSync() call (refactoring thinko or such)

13 years agoSwitch fsync off while building indexes
Florian Festi [Wed, 10 Nov 2010 12:59:53 +0000 (13:59 +0100)]
Switch fsync off while building indexes

13 years agoFix index auto creation
Florian Festi [Wed, 10 Nov 2010 12:16:10 +0000 (13:16 +0100)]
Fix index auto creation

13 years agoRename rpm.ii.offsets() to .instances() to match name of mi.instance()
Florian Festi [Tue, 9 Nov 2010 10:59:34 +0000 (11:59 +0100)]
Rename rpm.ii.offsets() to .instances() to match name of mi.instance()

13 years agol10n: Updated Italian (it) translation to 100%
Guido Grazioli [Wed, 10 Nov 2010 15:21:02 +0000 (15:21 +0000)]
l10n: Updated Italian (it) translation to 100%

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

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

13 years agoDon't restore db file atime/mtime after rebuild
Panu Matilainen [Wed, 10 Nov 2010 11:44:02 +0000 (13:44 +0200)]
Don't restore db file atime/mtime after rebuild
- The files are regenerated from scratch, involving header record
  numbers moving around, possibly removing broken headers and all.
  Don't pretend nothing changed when some changes almost certainly,
  occurred, various API users rely on rpmdb mtime for determining
  whether the db has changed since they last accessed it.

13 years agoKill broken --rebuilddbpath popt alias
Panu Matilainen [Tue, 9 Nov 2010 13:56:12 +0000 (15:56 +0200)]
Kill broken --rebuilddbpath popt alias
- It's been broken because of a typo for the last ten years and nobody
  noticed, doesn't seem like a particularly useful switch...

13 years agoEliminate silly "I am about to create a directory now" debug logging
Panu Matilainen [Tue, 9 Nov 2010 10:04:06 +0000 (12:04 +0200)]
Eliminate silly "I am about to create a directory now" debug logging

13 years agoSimplify the dbpath shuffle in db rebuilds a bit
Panu Matilainen [Tue, 9 Nov 2010 09:59:17 +0000 (11:59 +0200)]
Simplify the dbpath shuffle in db rebuilds a bit
- We already have the non-prefixed dbpath at hand, use that instead
  of recalculating the path from the prefixed version

13 years agoDont bother NULL'ing local variables on exit
Panu Matilainen [Tue, 9 Nov 2010 09:45:31 +0000 (11:45 +0200)]
Dont bother NULL'ing local variables on exit

13 years agoEliminate pointless (and racy) test for rebuilddb directory existence
Panu Matilainen [Tue, 9 Nov 2010 07:54:31 +0000 (09:54 +0200)]
Eliminate pointless (and racy) test for rebuilddb directory existence
- mkdir() will error out with a reasonable error message of its
  own, no point doing separate, buggy test with access()

13 years agoRemove unused local variable
Florian Festi [Tue, 9 Nov 2010 08:52:33 +0000 (09:52 +0100)]
Remove unused local variable

13 years agoHide --aid and --nosuggest switches for now
Panu Matilainen [Tue, 9 Nov 2010 07:30:47 +0000 (09:30 +0200)]
Hide --aid and --nosuggest switches for now
- These have been no-ops since rpm 4.6, but might resurface one day so
  leaving them around but out of sight...

13 years agoLose useless --fileconflicts cli-switch
Panu Matilainen [Tue, 9 Nov 2010 07:27:55 +0000 (09:27 +0200)]
Lose useless --fileconflicts cli-switch
- We always detect file conflicts (duh!) unless forced, no need for this

13 years agoMove --dbpath into common rpm popt options table
Panu Matilainen [Tue, 9 Nov 2010 07:18:10 +0000 (09:18 +0200)]
Move --dbpath into common rpm popt options table
- This ensures its available in all our executables without adding
  umphteen copies into rpmpopt (after the cli splits, this was missing
  in eg rpmdb executable...)

13 years agoEliminate stillborn code
Panu Matilainen [Tue, 9 Nov 2010 07:02:21 +0000 (09:02 +0200)]
Eliminate stillborn code

13 years agoFix IndexIterator to not open an private dbi that never gets closed
Florian Festi [Fri, 5 Nov 2010 08:27:21 +0000 (09:27 +0100)]
Fix IndexIterator to not open an private dbi that never gets closed

13 years agoConst-correctness: rpmdsRpmlib() doesn't (and must not) modify tblp
Panu Matilainen [Fri, 5 Nov 2010 08:18:41 +0000 (10:18 +0200)]
Const-correctness: rpmdsRpmlib() doesn't (and must not) modify tblp