platform/upstream/rpm.git
13 years agoPreparing for 4.8.1 rpm-4.8.1-release
Panu Matilainen [Fri, 11 Jun 2010 09:15:17 +0000 (12:15 +0300)]
Preparing for 4.8.1

13 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
(cherry picked from commit 89be57ad9239c9ada0cba94a5003876b456d46bf)

13 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...
(cherry picked from commit 15c0c4e7a1291915a4ea4115e94d2b747d5091ac)

13 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.
(cherry picked from commit 4d172a194addc49851e558ea390d3045894e3230)

13 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.
- backported from commit ca2d6b2b484f1501eafdde02e1688409340d2383

13 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.
(cherry picked from commit cadab3afa55388f3082a3468d582896caabfd55c)

13 years agoUse pgpValString() for :pgpsig header formatting (RhBug:587755)
Panu Matilainen [Wed, 19 May 2010 12:33:52 +0000 (15:33 +0300)]
Use pgpValString() for :pgpsig header formatting (RhBug:587755)
- instead of copy-slopping (and forgetting to do so whenever something
  changes) just use the values we know from pgpVals..
(cherry picked from commit e63293b0ea1c6a3a4be6aca328ee9fae4c3bfcdb)

13 years agoAdd public pgpValString() function + enum for the various types
Panu Matilainen [Wed, 19 May 2010 12:32:54 +0000 (15:32 +0300)]
Add public pgpValString() function + enum for the various types
- The equivalent used to be possible in 4.4.x era as the value tables
  were all exported, but this way we need to export far less
  and the implementation details stay internal.
(cherry picked from commit 2be413810cd78b0a503699ceca3f8e1505f1b425)

13 years agoHandle non-existent dependency sets in python (RhBug:593553)
Panu Matilainen [Wed, 19 May 2010 07:12:43 +0000 (10:12 +0300)]
Handle non-existent dependency sets in python (RhBug:593553)
- rpmdsNew() returns NULL if the requested dependency type doesn't
  exist in the header. The C-side API can handle NULL to all rpmds
  "methods" and this is how librpm deals with non-existent sets rather
  than waste memory on for empty ds structures. However the python side
  wasn't expecting NULL for legal requests (but not setting error either)
  and thus blowing up with SystemError exception.
- Raise TypeError on illegal arguments to rpm.ds constructor, and present
  non-existent dependency sets as empty rpm.ds objects to python. This
  lets python callers use iteration over ds items regardless of whether
  the dependency actually exists or not. The alternative of returning
  None (or raising exceptions) would break existing code for no
  particularly good reason.
(cherry picked from commit 0e0e332b466a9784620c483faa374067381e96ce)

13 years agoFix return from chroot() on verify (RhBug:590588)
Panu Matilainen [Tue, 18 May 2010 07:39:22 +0000 (10:39 +0300)]
Fix return from chroot() on verify (RhBug:590588)
- a couple of important steps in chroot() in and out sequence missing,
  causing "No such file or directory" whining on return from chroot()
  unless cwd happened to be /
- backported from commit 2b7884ce2914c48514023dbe61dc7a126964f438

13 years agoFix minor header iterator leak in rpmReSign()
Panu Matilainen [Thu, 6 May 2010 09:28:23 +0000 (12:28 +0300)]
Fix minor header iterator leak in rpmReSign()
- fix dumb double-initialization error introduced somewhere between
  4.4 and 4.6, also while-loop is more natural here than for-loop
(cherry picked from commit 834c8383476fe54c65fe07b69c01cd3d35f5a488)

13 years agoDon't process desktop files without Type=Application and Exec= line
Pavol Rusnak [Wed, 17 Mar 2010 15:02:46 +0000 (16:02 +0100)]
Don't process desktop files without Type=Application and Exec= line
(cherry picked from commit 3b96dfb29ab75a4f7f37713a93ec39460c158ef0)

13 years agoMake rpm version available to python through __version__, add __version_info__
Panu Matilainen [Fri, 11 Jun 2010 06:22:38 +0000 (09:22 +0300)]
Make rpm version available to python through __version__, add __version_info__
- backported from commits ed74161b7e5b90ba886926ced14ba3aca018a4f4 and
  21962ab6142cd1e54f1087a545244de506d9abf1

13 years agoFixes missing __fxstat64 symbol on mac.
Giulio Eulisse [Tue, 20 Apr 2010 09:42:10 +0000 (11:42 +0200)]
Fixes missing __fxstat64 symbol on mac.
(cherry picked from commit d131c3393a2a43d87047bffdd73cf9ae3c8146c2)

13 years agoAdd a basic reinstall test to test-suite
Panu Matilainen [Wed, 14 Apr 2010 09:24:37 +0000 (12:24 +0300)]
Add a basic reinstall test to test-suite
- this currently fails due to commit e16695e932e294ec600e673d38c41bde20931204,
  on reinstall element header vs db header mismatch, adding this as
  a reminder to fix it...
(cherry picked from commit a0ed26b894e301d479c8092c9c7fa16f2d6c3c2c)

13 years agoUse correct tag for NOPATCH
Panu Matilainen [Tue, 13 Apr 2010 05:35:45 +0000 (08:35 +0300)]
Use correct tag for NOPATCH
- dumb copy-paste error from commit a317eaadc3f7b9b4ec373719e7d60fb8b98e2c21
(cherry picked from commit a761daa2f8a0edb66733444f49f032f3a13035b1)

13 years agoRPMTAG_NOSOURCE and NOPATCH aren't internal, they end up in nosrc headers
Panu Matilainen [Tue, 13 Apr 2010 05:32:49 +0000 (08:32 +0300)]
RPMTAG_NOSOURCE and NOPATCH aren't internal, they end up in nosrc headers
(cherry picked from commit 538ddff69cacbd0db346cac3c10171424ae9b229)

13 years agoGnu tar sometimes prints a "tar: Record size = 16" message, breaking
Michael Schroeder [Mon, 12 Apr 2010 10:12:46 +0000 (12:12 +0200)]
Gnu tar sometimes prints a "tar: Record size = 16" message, breaking
rpmbuild -ta.
(cherry picked from commit b2efc89d7db4f3a31dfd7f91028c5a9f9643334f)

13 years agoAdapt the Makefile as rpmdb_svc can no longer be built.
Michael Schroeder [Mon, 12 Apr 2010 10:11:56 +0000 (12:11 +0200)]
Adapt the Makefile as rpmdb_svc can no longer be built.
(cherry picked from commit dfa98e7a064d9ea28b416b52f2673202799bcb9f)

13 years agoNew gcc versions comlpain about undefined behaviour...
Michael Schroeder [Mon, 12 Apr 2010 10:11:05 +0000 (12:11 +0200)]
New gcc versions comlpain about undefined behaviour...
(cherry picked from commit 18c3e1a37c482811b7b3af1415ef67aac527b869)

13 years agoreadLineFromOFI may modify the fileStack, thus we have to re-set
Michael Schroeder [Mon, 12 Apr 2010 10:10:20 +0000 (12:10 +0200)]
readLineFromOFI may modify the fileStack, thus we have to re-set
ofi after calling it
(cherry picked from commit daec6ebf58331776279f389738af4788b865033d)

13 years agoDo not load keyring if signature checking is disabled.
Michael Schroeder [Mon, 12 Apr 2010 10:09:04 +0000 (12:09 +0200)]
Do not load keyring if signature checking is disabled.
(cherry picked from commit cad147070e5513312d851f44998012e8f0cdf1e3)

13 years agoSeems like a change was made to make %attr(-) go back to the
Michael Schroeder [Mon, 12 Apr 2010 10:07:01 +0000 (12:07 +0200)]
Seems like a change was made to make %attr(-) go back to the
defattr setting. Unfortunatelly this broke %defattr(-).
(cherry picked from commit 64e7f2aeb4ce01fccacde021fb22c85083284efb)

13 years agoOn header iteration format queries, dump the contents as-is
Panu Matilainen [Thu, 1 Apr 2010 07:03:21 +0000 (10:03 +0300)]
On header iteration format queries, dump the contents as-is
- This makes eg --xml query of packages give out the true contents
  of the package, raw i18n strings and all, which is what you probably
  want when examining the contents on this level. Regular queries still
  run with all bells 'n whistless enabled.
(cherry picked from commit c397a09be3efd087afeb25a5b01715eb8c889cdb)

13 years agoDisable header i18n lookup in headerCopyTags() (RhBug:578299)
Panu Matilainen [Thu, 1 Apr 2010 06:15:06 +0000 (09:15 +0300)]
Disable header i18n lookup in headerCopyTags() (RhBug:578299)
- without HEADERGET_RAW here, only one of the translations in header
  (whatever happens to be "current" locale) gets copied
- backported from commit 3ac99bd8c21436d8c70d462b64bf63453415a689

13 years agoReport all enabled dependency bits in deptype format extension
Panu Matilainen [Mon, 29 Mar 2010 04:20:33 +0000 (07:20 +0300)]
Report all enabled dependency bits in deptype format extension
- dont make assumptions about which bits can be enabled simultaneously,
  just dump 'em all
(cherry picked from commit 750b534942f0191f2d14d2974541ecaaa13820a5)

13 years agoDocument deprecation of mi.count() and ds.Count().
Ville Skyttä [Fri, 19 Mar 2010 18:09:15 +0000 (20:09 +0200)]
Document deprecation of mi.count() and ds.Count().
(cherry picked from commit e50e3d14e5149f5c7b30c8a0208e7e8bd80ee24a)

13 years agoAdd RPMBUILD_ISFOO constants to python rpmb module (ticket #123)
Panu Matilainen [Wed, 24 Mar 2010 08:24:55 +0000 (10:24 +0200)]
Add RPMBUILD_ISFOO constants to python rpmb module (ticket #123)
(cherry picked from commit ee98a373cf79d3248122ae147d98ac461d59c9b7)

13 years agoAdd __bool__() / __nonzero__() method to python rpmmi objects (ticket #153)
Panu Matilainen [Wed, 24 Mar 2010 07:53:25 +0000 (09:53 +0200)]
Add __bool__() / __nonzero__() method to python rpmmi objects (ticket #153)
- Objects supporting __len__() use (len > 0) for boolean representation,
  which normally makes sense but as the match iterator count is often
  zero despite the iterator actually existing and returning something,
  and breaks existing code (rpmlint at least)
- Adding a __bool__() (known as __nonzero__() in Python < 3) method
  returning true for non-NULL iterator fixes this and gives more
  meaningful answers than pre 4.8.0 which simply always returned True
(cherry picked from commit 40f788a7bf3741f9c613ff302d4e1b0ceec2658c)

13 years agoVerify the various version comparison results in testsuite
Panu Matilainen [Fri, 19 Mar 2010 08:49:17 +0000 (10:49 +0200)]
Verify the various version comparison results in testsuite
(cherry picked from commit 09423eb47039a6f830592cc326d40bcd71650530)

13 years agoAdd some basic dependency check tests to test-suite
Panu Matilainen [Thu, 18 Mar 2010 10:34:44 +0000 (12:34 +0200)]
Add some basic dependency check tests to test-suite
(cherry picked from commit d2d7ca7d43be0491f2f43d4867d4adbefbf922de)

13 years agoDifferentiate between conflicts in db versus install set
Panu Matilainen [Thu, 18 Mar 2010 10:23:38 +0000 (12:23 +0200)]
Differentiate between conflicts in db versus install set
- this appears to have been broken since its introduction in 2002,
  commit d89ce5854d39a9e896759fb96e6e303c67573bb6...
- backported from commit a609aa7dbcf4738f3b47a63d3062dcadf58ef2fa

13 years agoAvoid eating empty lines in spec %prep section (RhBug:573339)
Panu Matilainen [Mon, 15 Mar 2010 10:00:55 +0000 (12:00 +0200)]
Avoid eating empty lines in spec %prep section (RhBug:573339)
- In spec %prep context empty lines don't usually matter but they can
  be significant in eg here-documents.
- Fixes regression from commit 94ff22b129aeb31c38848231e40f87aa4a5613a1
(cherry picked from commit 12802c36c9a3b7260d9f788afc826b1cc5ee05e2)

13 years agoAdd an enhanced argvSplitString() function for splitting strings to argv's
Panu Matilainen [Mon, 15 Mar 2010 09:54:55 +0000 (11:54 +0200)]
Add an enhanced argvSplitString() function for splitting strings to argv's
- Returns the newly created argv instead of useless "this always returns 0"
- By default make a "real" split, including empty strings
- Flags argument allows controlling behavior, for now only flag is to
  preserve argvSplit() behavior but leaves room for future enhancements
  such as quoted splitting etc
(cherry picked from commit 35052b96232810cbf0d91a4f1d1d3ff25a142fd0)

13 years agoTell python about RPMTRANS_FLAG_NOCONTEXTS
Panu Matilainen [Mon, 15 Mar 2010 07:45:49 +0000 (09:45 +0200)]
Tell python about RPMTRANS_FLAG_NOCONTEXTS
(cherry picked from commit 8c5332984e32d27d28f9a440947b070af0d14c45)

13 years agoPlug a silly memleak in processPackageFiles()
Panu Matilainen [Wed, 17 Feb 2010 10:58:40 +0000 (12:58 +0200)]
Plug a silly memleak in processPackageFiles()
(cherry picked from commit f3ca4fb48171b4bd0549fe67f302517135c465ff)

13 years agoHandle erased packages wrt disk-space problem reporting (RhBug:561160)
Panu Matilainen [Thu, 4 Feb 2010 13:55:16 +0000 (15:55 +0200)]
Handle erased packages wrt disk-space problem reporting (RhBug:561160)
- erased packages in the transaction cause space needs to shrink, which
  commit 2222e81e1cf74bbf78acb9969592ab06e2289929 failed to take into
  account, causing false disk space errors from unaffected packages
- adjust obneeded and oineeded when the requirements shrink
- new disk space problems can only occur when the requirements grow,
  change the pmtsCheckDSIProblems() check to reflect that (although not
  strictly necessary)
(cherry picked from commit 4e4aec28c544f2884cb76be37d508f376db5cb7c)

13 years agoRemove no longer neede rpmts->filesystemCount and->filesystems
Florian Festi [Fri, 5 Feb 2010 11:43:21 +0000 (12:43 +0100)]
Remove no longer neede rpmts->filesystemCount and->filesystems
(cherry picked from commit 27b216694a9e19f932f24e6fceb6c114aeae5fb9)

13 years agoFix stupid off by one error
Florian Festi [Wed, 3 Feb 2010 14:42:52 +0000 (15:42 +0100)]
Fix stupid off by one error
(cherry picked from commit ee35635243f1e282d04066014af6349227cd6498)

13 years agoAvoid loading information for all filesystems
Florian Festi [Wed, 3 Feb 2010 10:45:21 +0000 (11:45 +0100)]
Avoid loading information for all filesystems

This patch is heavily based on the "lazystatfs" patch by Michael Schroeder from
Novell/SUSE. Thanks!
(cherry picked from commit 647a809641a15cf0fcbc02ada85adcd493f2dc3b)

13 years agoFix include path of luaext subdir
Panu Matilainen [Wed, 27 Jan 2010 13:06:05 +0000 (15:06 +0200)]
Fix include path of luaext subdir
(cherry picked from commit 53e3f65b8e2f3b8883a8410c7732062155b87957)

13 years agoDocument --conflicts in rpm(8).
Ville Skyttä [Sat, 23 Jan 2010 12:50:17 +0000 (14:50 +0200)]
Document --conflicts in rpm(8).
(cherry picked from commit d390e2544660e028bf42441c8cec57b4b92c018e)

13 years agoSanitize signature checking formatResult() a bit
Panu Matilainen [Tue, 5 Jan 2010 08:45:23 +0000 (10:45 +0200)]
Sanitize signature checking formatResult() a bit
- whole lotta unnecessary wankery here (what have I been thinking)
- avoid using the non-standard strndup(), we checked for it in configure
  but didn't provide an alternative so checking was just bogus
- backported from commit 0edc291e50f9b6023a3e8e560d590e1dd2149a7f

14 years agoReally fix verification error code to not depend on verbosity (RhBug:557101)
Panu Matilainen [Thu, 21 Jan 2010 12:14:28 +0000 (14:14 +0200)]
Really fix verification error code to not depend on verbosity (RhBug:557101)
- earlier fix from commit 6649c23cac5823d0c7415df5cfd66e5aac5eebd2 was
  broken as it could reset return code to zero after detecting errors
  earlier
(cherry picked from commit 04ad4b1155ec4b082fbac425a575a0ba05337ab1)

14 years agoFix double-free segfault on url retrieve to read-only media (RhBug:557118)
Panu Matilainen [Thu, 21 Jan 2010 11:45:34 +0000 (13:45 +0200)]
Fix double-free segfault on url retrieve to read-only media (RhBug:557118)
(cherry picked from commit ce1d2e87157f4a7ebc4f4d6f26024ac597400367)

14 years agoPreparing for rpm 4.8.0 rpm-4.8.0-release
Panu Matilainen [Fri, 8 Jan 2010 08:36:21 +0000 (10:36 +0200)]
Preparing for rpm 4.8.0

14 years agoHardwire lead major version to 3 (RhBug:546663)
Panu Matilainen [Thu, 17 Dec 2009 09:35:11 +0000 (11:35 +0200)]
Hardwire lead major version to 3 (RhBug:546663)
- besides the logic being backwards wrt intended --nodirtokens linkage,
  LSB wants this to be 3 and .. it just makes no difference whatsover
  anyway
(cherry picked from commit 0bac1d421ccdcc719e2e60bcfb4859d0f602510c)

14 years agoMove python ts element key refcounting back to C-side of things
Panu Matilainen [Thu, 17 Dec 2009 08:38:08 +0000 (10:38 +0200)]
Move python ts element key refcounting back to C-side of things
- it's really the C-side that needs this, doing it in C avoids nasty
  surprises when subclassing rpm.ts
- partial revert of commit 92d18d1d7139b37065ea742cfe0e8cee5e9c3500
(cherry picked from commit edac0476a8ea3fbd1d86df2667a1b62d831b2653)

14 years agoPermit unexpanded macros to slip through spec tag sanity checks (RhBug:547997)
Panu Matilainen [Thu, 17 Dec 2009 06:43:31 +0000 (08:43 +0200)]
Permit unexpanded macros to slip through spec tag sanity checks (RhBug:547997)
- For now, let %{} characters through our valid character set checks
  on specs. This isn't right really, but unexpanded, unrelated macros
  in spec can now cause failure to parse out buildrequires which would
  allow those macros to be expanded. This needs a better fix.
(cherry picked from commit 507f21f6bb4bf7029a0bca255cfe4aae3361f358)

14 years agoEliminate transaction disk space checking functions from the API
Panu Matilainen [Mon, 14 Dec 2009 13:23:28 +0000 (15:23 +0200)]
Eliminate transaction disk space checking functions from the API
- The DSI stuff runs from deep inside rpmtsRun() with no chance for
  API users to do anything with it. Bury into transaction.c and
  make static to let us change the way it works without API constraints...
(cherry picked from commit 91eb212654b80d00202432da36e9746567d4f30b)

14 years agoFix memleak in python ts.hdrFromFdno()
Panu Matilainen [Wed, 9 Dec 2009 13:11:39 +0000 (15:11 +0200)]
Fix memleak in python ts.hdrFromFdno()
- the python object holds reference to header here, decref the header
  so it gets freed eventually
(cherry picked from commit 17eb18d0b1b259dbeb269148e6571ae49df9259f)

14 years agoFix a few list-related memleaks in python bindings
Panu Matilainen [Wed, 9 Dec 2009 12:42:03 +0000 (14:42 +0200)]
Fix a few list-related memleaks in python bindings
- PyList_Append() bumps the object reference count, callers need to
  explicitly decref them... oops :)
(cherry picked from commit 60b66dc7d9c728d6b779d3d772ac36b9134a2f56)

14 years agoAvoid exposing libmagic dependency in public headers
Panu Matilainen [Tue, 8 Dec 2009 14:22:42 +0000 (16:22 +0200)]
Avoid exposing libmagic dependency in public headers
(cherry picked from commit 50d1b52edb202fbf9329cea0ecec285c0a73414f)

14 years agoAvoid noise from python bytecompile on non-python pkgs (RhBug:539635)
Panu Matilainen [Tue, 8 Dec 2009 13:58:51 +0000 (15:58 +0200)]
Avoid noise from python bytecompile on non-python pkgs (RhBug:539635)
- If a pattern doesn't match, we'd prefer an empty list instead of
  unexpanded garbage thank you... nullglob shell option is just what the
  doctor ordered but unfortunately its a bash-specific thing. Otoh there
  are number of other bash-specific scripts in rpm so probably not
  much of an issue...
(cherry picked from commit d6bda5a1665d8d04526aea299781570ee7486b2e)

14 years agoPreparing for 4.8.0-beta1 rpm-4.8.0-beta1
Panu Matilainen [Mon, 7 Dec 2009 11:51:48 +0000 (13:51 +0200)]
Preparing for 4.8.0-beta1

14 years agoBump soname for all our libraries
Panu Matilainen [Mon, 7 Dec 2009 11:35:53 +0000 (13:35 +0200)]
Bump soname for all our libraries
- while the "really public" API of librpmio has only been enhanced,
  librpm and librpmbuild use some supposedly internal bits which *have*
  changed considerably, so just to prevent anybody thinking they can
  combine librpmio from rpm 4.7 and librpm from this...
- librpmbuild hasn't seen much real change but some (unfortunately)
  exposed struct members have changed so...
- librpm is mostly compatible but as rpmal has become internal API,
  we need to bump (annoyingly, as nothing actually uses rpmal ... sigh)

14 years agots.check() is supposed to return empty list when no problems
Panu Matilainen [Mon, 7 Dec 2009 10:38:39 +0000 (12:38 +0200)]
ts.check() is supposed to return empty list when no problems

14 years agoDisable the entire rpm.td type for now
Panu Matilainen [Mon, 7 Dec 2009 09:32:51 +0000 (11:32 +0200)]
Disable the entire rpm.td type for now
- need to figure out saner semantics & stuff...

14 years agoMake python header iterator return keys, not values
Panu Matilainen [Mon, 7 Dec 2009 09:21:14 +0000 (11:21 +0200)]
Make python header iterator return keys, not values
- this is how python built-in dictionary works, be consistent with that
- also avoids having to decide what to do with rpm.td type right now...

14 years agoAlways return malloced data from i18n extensions for consistency
Panu Matilainen [Mon, 7 Dec 2009 07:12:44 +0000 (09:12 +0200)]
Always return malloced data from i18n extensions for consistency

14 years agoBump up the python version requirement to match reality
Panu Matilainen [Sat, 5 Dec 2009 09:05:39 +0000 (11:05 +0200)]
Bump up the python version requirement to match reality
- Python >= 2.6 is known to work, 2.5 might be possible with __future__
  imports but until somebody tests it...

14 years agoFix the posix chown test for selinux enabled systems (RhBug:543035)
Panu Matilainen [Wed, 2 Dec 2009 13:30:27 +0000 (15:30 +0200)]
Fix the posix chown test for selinux enabled systems (RhBug:543035)
- on selinux enabled systems, 'ls -l' mode string is longer than
  expected here, just trim the ls output to our expected length

14 years agoBack out overly strict file type check on %ghost files
Panu Matilainen [Wed, 2 Dec 2009 11:22:11 +0000 (13:22 +0200)]
Back out overly strict file type check on %ghost files
- we currently only support creating regular files for %ghosts which
  dont exist in the buildroot, but for files that do exist in the buildroot
  there's no reason to place such limits (eg its perfectly ok to have
  symlinks marked as %ghosts)

14 years agoUse AS_HELP_STRING() for configure option output
Panu Matilainen [Fri, 27 Nov 2009 13:57:44 +0000 (15:57 +0200)]
Use AS_HELP_STRING() for configure option output

14 years agoRemove pointless message translation from check-buildroot
Panu Matilainen [Fri, 27 Nov 2009 13:12:52 +0000 (15:12 +0200)]
Remove pointless message translation from check-buildroot
- these scripts aren't processed for translation and unlikely to ever be...
- fixes the remaining complaint from ticket #62

14 years agoRemove ancient broken scripts from the repository
Panu Matilainen [Fri, 27 Nov 2009 13:10:57 +0000 (15:10 +0200)]
Remove ancient broken scripts from the repository
- also eliminates one more "bashism" complaint of ticket #62

14 years agoFiddling with ulimit settings does not belong to dep extractor scripts
Panu Matilainen [Fri, 27 Nov 2009 12:55:12 +0000 (14:55 +0200)]
Fiddling with ulimit settings does not belong to dep extractor scripts
- fixes one of the bashisms in ticket #62

14 years agoCorrectly pass optional tag argument from hdr.dsFromHeader() (ticket #108)
Panu Matilainen [Fri, 27 Nov 2009 07:28:11 +0000 (09:28 +0200)]
Correctly pass optional tag argument from hdr.dsFromHeader() (ticket #108)

14 years agoDont try to pass anything to rpm.fi() from hdr.fiFromHeader()
Panu Matilainen [Fri, 27 Nov 2009 07:15:56 +0000 (09:15 +0200)]
Dont try to pass anything to rpm.fi() from hdr.fiFromHeader()
- hdr.fiFromHeader() is just a deprecated backwards compatibility dummy
  and doesn't need to pass anything as there were no meaningful
  parameters in older versions

14 years agoDont fail build on unrecognized non-executable files (ticket #105)
Panu Matilainen [Thu, 26 Nov 2009 08:22:41 +0000 (10:22 +0200)]
Dont fail build on unrecognized non-executable files (ticket #105)
- Generally only executable files are critical for dependency extraction,
  whereas oddball application data files can cause unnecessary build
  failure due to libmagic misdetections etc, so just let non-executables
  pass with a warning and mark them as unknown data

14 years agoJust use autoreconf in autogen.sh (ticket #109)
Panu Matilainen [Thu, 26 Nov 2009 07:46:48 +0000 (09:46 +0200)]
Just use autoreconf in autogen.sh (ticket #109)
- instead of doing stuff by "hand" and getting it wrong, let autoreconf
  worry about getting it right (if nothing else, we can then blame
  autoreconf instead of ourselves ;)

14 years agoFix signature password checking result on abnormal conditions (RhBug:496754)
Panu Matilainen [Wed, 25 Nov 2009 14:42:43 +0000 (16:42 +0200)]
Fix signature password checking result on abnormal conditions (RhBug:496754)
- Execve() failure wasn't returning an error code, causing rpm to
  think the password was ok when we couldn't even try verifying
- Stricter return code checking from the password checking child:
  the password can only be ok if the child exits with WIFEXITED() *and*
  WIFEXITCODE() of 0. Also WIFEXITCODE() should only be called if
  WIFEXITED() returns true.

14 years agoWe can't handle OpenPGP subkeys or secret keys, so dont even try
Panu Matilainen [Wed, 25 Nov 2009 13:07:17 +0000 (15:07 +0200)]
We can't handle OpenPGP subkeys or secret keys, so dont even try
- parsing subkeys ends up overwriting data in the main key, causing
  bogus signature checking failures
- this is the final missing piece of RhBug:436812, short of adding
  proper support for subkeys (maybe someday...)

14 years agoDont blow up on headers without requireflags in rpmdsNew()
Panu Matilainen [Tue, 24 Nov 2009 14:57:46 +0000 (16:57 +0200)]
Dont blow up on headers without requireflags in rpmdsNew()

14 years agoNuke leftover debug junk
Panu Matilainen [Tue, 24 Nov 2009 12:36:03 +0000 (14:36 +0200)]
Nuke leftover debug junk

14 years agoSupport constructing header data from python
Panu Matilainen [Tue, 24 Nov 2009 12:27:49 +0000 (14:27 +0200)]
Support constructing header data from python
- no proper i18n string support yet, just the basic types
- basic data type validation only, no overflow checking for integer types
- for lists, validate all items before trying to insert anything
- duplicate tag creation not permitted
- appending not permitted, only assignment (and deletion already)
- there are probably bugs...
- watch out for librpm bugs when passed incomplete headers, ugh

14 years agoDisable rpm.td type for now
Panu Matilainen [Tue, 24 Nov 2009 12:02:52 +0000 (14:02 +0200)]
Disable rpm.td type for now
- its not that clear that exporting the td type is really useful
  (certainly not in its current form), avoid exporting an interface we
  might not want to support

14 years agoFix hdrContains() return value on error
Panu Matilainen [Mon, 23 Nov 2009 14:45:09 +0000 (16:45 +0200)]
Fix hdrContains() return value on error

14 years agoRemove bogus rpmpopt.pot file (ticket #77)
Panu Matilainen [Mon, 23 Nov 2009 13:12:04 +0000 (15:12 +0200)]
Remove bogus rpmpopt.pot file (ticket #77)
- this is supposed to automatically generated on update-po time from
  toplevel rpmpopt file and merged into rpm.pot but has been broken for
  a long long time and also the $ translation marking has been deprecated
  for security reasons

14 years agoRemove hdr.has_key() method, support 'key in h' style instead
Panu Matilainen [Sat, 21 Nov 2009 09:31:50 +0000 (11:31 +0200)]
Remove hdr.has_key() method, support 'key in h' style instead
- Python 3 removed has_key() from dictionaries, as the 'in' way is the
  way of the future support that from the start (has_key() is not in
  any released rpm version so its safe to remove)

14 years agoRemove unnecessary hdr.instance() method
Panu Matilainen [Sat, 21 Nov 2009 09:07:29 +0000 (11:07 +0200)]
Remove unnecessary hdr.instance() method
- this is available through tag extension now, no point having a
  separate method for it

14 years agoTypos in exception messages
Panu Matilainen [Sat, 21 Nov 2009 08:55:24 +0000 (10:55 +0200)]
Typos in exception messages

14 years agoError out early trying to install on readonly fs (ticket #99, RhBug:464750)
Panu Matilainen [Fri, 20 Nov 2009 14:00:06 +0000 (16:00 +0200)]
Error out early trying to install on readonly fs (ticket #99, RhBug:464750)
- simply make readonly filesystems appear as full, preventing install
  early instead of failing with cpio errors in middle of transaction

14 years agoConvert French man page to Unix line-endings
Panu Matilainen [Fri, 20 Nov 2009 09:49:05 +0000 (11:49 +0200)]
Convert French man page to Unix line-endings

14 years agoFix build with binutils-gold (ticket #107)
Panu Matilainen [Fri, 20 Nov 2009 09:12:39 +0000 (11:12 +0200)]
Fix build with binutils-gold (ticket #107)
- patch from Michal Čihař

14 years agoAdd RPMTAG_EPOCHNUM tag extension
Panu Matilainen [Fri, 20 Nov 2009 08:32:47 +0000 (10:32 +0200)]
Add RPMTAG_EPOCHNUM tag extension
- return RPMTAG_EPOCH but convert non-existent epoch to 0, as rpm internals
  treat it

14 years agoAdd spec package type with access to headers to python rpmb module
Panu Matilainen [Thu, 19 Nov 2009 08:51:23 +0000 (10:51 +0200)]
Add spec package type with access to headers to python rpmb module
- permits python to access parsed headers from spec files
- ticket #14, RhBug:462726

14 years agoPermit header object generation from PyCObjects
Panu Matilainen [Thu, 19 Nov 2009 08:16:15 +0000 (10:16 +0200)]
Permit header object generation from PyCObjects
- needed for generating header objects from other extension modules &
  might be handy in some other cases too
- patently type-unsafe but as long as python doesn't provide a better
  way, not really our headache

14 years agoLose the silly specFromSpec()
Panu Matilainen [Wed, 18 Nov 2009 15:41:39 +0000 (17:41 +0200)]
Lose the silly specFromSpec()
- its our own private data structure we're accessing here, no need
  for extra wrappers and nothing outside spec-py.c needs this

14 years agoTurn current python spec methods into read-only attributes via getseters
Panu Matilainen [Wed, 18 Nov 2009 15:28:13 +0000 (17:28 +0200)]
Turn current python spec methods into read-only attributes via getseters
- incompatible, but nobody is really using the spec bindings for
  anything as there's been very little you've been able do with them
- having the stuff accessible as getseters means we dont need 50 different
  fooSet() methods if/when we permit modifying these from python

14 years agoSanitize python spec.sources()
Panu Matilainen [Wed, 18 Nov 2009 15:16:45 +0000 (17:16 +0200)]
Sanitize python spec.sources()
- spec without sources is perfectly valid, just return an empty list
  instead of invalid NULL return without exception set and simplify

14 years agoPut a bit of sanity into python spec methods
Panu Matilainen [Wed, 18 Nov 2009 15:03:32 +0000 (17:03 +0200)]
Put a bit of sanity into python spec methods
- prep, build etc missing from spec are not errors
- instead of returning NULLs (with no exception set!), just return None
  for anything that doesn't exist
- dont bother with NULL checks, if s->spec is NULL then something else
  has screwed up big time

14 years agoOops, tp_dealloc doesn't return anything
Panu Matilainen [Wed, 18 Nov 2009 10:21:41 +0000 (12:21 +0200)]
Oops, tp_dealloc doesn't return anything

14 years agoFix rpmProblem reference counting in python bindings
Panu Matilainen [Wed, 18 Nov 2009 09:33:57 +0000 (11:33 +0200)]
Fix rpmProblem reference counting in python bindings

14 years agoDeclare a few python functions only taking one argument as such
Panu Matilainen [Wed, 18 Nov 2009 09:22:55 +0000 (11:22 +0200)]
Declare a few python functions only taking one argument as such

14 years agoRip python checkSignals() wtf'ery
Panu Matilainen [Wed, 18 Nov 2009 09:17:51 +0000 (11:17 +0200)]
Rip python checkSignals() wtf'ery
- since the function takes no arguments, declare it as such...

14 years agoPython archscore() only ever takes one argument, simplify
Panu Matilainen [Wed, 18 Nov 2009 08:54:58 +0000 (10:54 +0200)]
Python archscore() only ever takes one argument, simplify

14 years agoMake python ts.problems() return a python list, not rpm.ps object
Panu Matilainen [Wed, 18 Nov 2009 08:41:26 +0000 (10:41 +0200)]
Make python ts.problems() return a python list, not rpm.ps object
- rpm.ps object only supports iteration and subscript (with wonderfully
  wacko semantics), returning a regular list serves us better
- rip the now useless rpm.ps object type

14 years agoRemove unused psFromPs()
Panu Matilainen [Wed, 18 Nov 2009 07:40:30 +0000 (09:40 +0200)]
Remove unused psFromPs()

14 years agoEliminate broken rpmps append() method from python bindings (RhBug:538218)
Panu Matilainen [Wed, 18 Nov 2009 07:35:41 +0000 (09:35 +0200)]
Eliminate broken rpmps append() method from python bindings (RhBug:538218)
- The code to insert new problems has been using invalid conversion code
  causing crashes since 2004 and nobody noticed, safe to say this is an
  unused interface. Additionally the method argument flags were wrong, it
  was declared as METH_VARARGS but actually expected METH_O semantics. RIP.