Commit Graph

12865 Commits

Author SHA1 Message Date
Lubos Kardos 1019fa396d There is no need to recalculate digests during signing.
Digests are not signatures even if they reside in "signature" header,
and signing a package must not affect the digests. So recalculating
digests on signing is not just wasteful, but also conceptually plain
wrong.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
2014-05-21 10:46:08 +03:00
Lubos Kardos 175521cc54 Removed historical leftover.
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
2014-05-21 10:40:34 +03:00
Panu Matilainen ca7373f566 Plug ages old memleak on package signing 2014-05-19 16:44:36 +03:00
Panu Matilainen e2659684b4 Revert back to DSA-1 only support for NSS
- This essentially reverts commit fe5a1e5dfa
  which apparently causes intermittent failures with DSA-1. Look at
  DSA-2 again on some sunnier day...
2014-05-19 15:50:32 +03:00
Panu Matilainen 46993cd384 Sometimes a smaller hammer is better (but only sometimes)
- The sed-munger added in commit ccd6281e69
  causes bigger breakage than it fixes, perhaps because the hammer
  applied was disproportionally large. The only thing needing adjustment
  is ${prefix} in case when localstatedir is not explicitly set, so
  we fixup just that instead of "everything".
- Discovered via RhBug:921973 testing
2014-05-09 11:02:19 +03:00
Panu Matilainen b08e63f508 Dont mess with PPC character signedness (RhBug:1085127)
- Overriding architecture default ABI is not something rpm upstream
  should do, such decisions belong to distro level.
- -fsigned-char was originally added in back in 1997 with little
  fanfare in commit 3cb5b141d5, for
  whatever it is worth...
2014-05-07 12:56:33 +03:00
Michael Schroeder 13a1ef9fb5 Add a %_rundir macro to the platform files.
The default value is /run, it can be changed with the --with-rundir
configure option.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
2014-05-07 09:12:46 +03:00
Lubos Kardos 68bddc353a Function writeRPM was modified to one pass implemntation to improve performance. Now data aren't written into temporary file and then copied into final file but they are directy written into final file.
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
2014-05-05 11:23:10 +03:00
Lubos Kardos cc8232d1d5 No longer needed.
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
2014-05-05 11:23:10 +03:00
Panu Matilainen 092717b760 Remember to actually install appdata.prov script
- Should've been in commit e6cadc6d5a
2014-04-14 16:52:05 +03:00
Florian Festi 3f4088707d Fix two off by one bugs breaking hardlinks in builds
for a link count of 2
2014-04-11 14:13:12 +02:00
Michal Schmidt 18e8d2dc0a Expand options in %autopatch only once
- Work around scoping "fun" wrt nested parametrized macro invocations
  combined with macro manipulation from %{lua:...}

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
2014-04-10 13:46:33 +03:00
Florian Festi 44acd3f63f Add rpmdsPutToHeader function to to API 2014-04-10 11:47:44 +02:00
Florian Festi ace39f7bf5 Add rpmdsTagF() and rpmdsTagEVR() to the API to accompany rpmdsTagN() 2014-04-10 11:46:45 +02:00
Michal Schmidt bf02debf73 add support for "%autosetup -S git_am"
- Similar to "%autosetup -S git", but assumes git-formatted patch files
  and hence preserves authorship information and commit messages.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
2014-04-08 16:02:58 +03:00
Panu Matilainen 935318220d rpm2archive missing from POTFILES 2014-04-07 13:17:23 +03:00
Panu Matilainen d07af12947 Use pax format for dist tarballs.
- Last year somebody decided that uid/gid stored in automake'd archives
  is somehow important, causing ustar format to be unusable with large
  uid/gid :(
  https://lists.gnu.org/archive/html/automake/2013-02/msg00075.html
2014-04-07 12:47:55 +03:00
Panu Matilainen f996665e2f Hopefully fix in-tree python build with setup.py
- Detect in-tree build in setup.py and adjust paths accordingly,
  based on patch by Bohuslav Kabrda.
2014-04-03 14:47:48 +03:00
Panu Matilainen f5134cef0c Drop the stupid source globbing from setup.py
- What was I thinking? Trying to be lazy in a way that only created
  more work, and broke with rpmfiles addition in whats most certainly
  a non-obvious way. Duh.
2014-04-03 14:29:14 +03:00
Panu Matilainen a1f62c26e0 Add a "release" target to Makefile.maint, mainly for changelog updating atm 2014-04-03 12:15:29 +03:00
Panu Matilainen 0462e61041 Minimally resurrect fine-grained progress callbacks on install
- Add an internal version where we can pass the psm for notifications for
  now, the callbacks will need a major rework but now is not the time...
2014-04-03 12:06:35 +03:00
Florian Festi 1097227842 Python binding for rpmfiArchiveHasContent 2014-04-01 16:05:17 +02:00
Panu Matilainen 630f70eb77 Axe unmaintained, bitrotten dependency generator scripts
- These platform specific scripts haven't been properly maintained
  in over ten years, its way past time to get rid of these scripts
  that forever confuse packagers as they assume these are actually
  being used for something.
- Sure there's theoretical portability loss here, but judging by the
  number of updates to these platforms over the last 10+ years... its
  indeed theoretical. Any such portability issues just need to be
  brought into the world of the "internal" dependency generator finally.
2014-03-31 17:22:49 +03:00
Panu Matilainen 48e94a1247 Dont bother looking for platform specific dependency generator scripts
- These scripts fell out of fashion more than ten years ago...
2014-03-31 17:01:05 +03:00
Panu Matilainen 37019e527b Always use the new dependency generator "engine"
- Replace platform specific find-{requires,provides} scripts with
  trivial wrapper scripts that just call rpmdeps with suitable
  arguments. This way the generated dependencies using the legacy
  external dependency are at least roughly on par with the internal
  depgen as, well, they're generated by the same thing.
- Changing from find-{requires,provides} scripts to rpmdeps could
  be done by just changing __find_{requires,provides} macros, but
  a lot of packages directly refer to the scripts instead so this
  way we cover far more ground and in an backwards compatible way.
2014-03-31 16:00:38 +03:00
Panu Matilainen f07490f5dc Only enable the unused macro warning on errors and when tracing
- In the current macro implementation the check is simply far too
  expensive to leave on always. Its useful though, so enable it
  when tracing macro expansion, in which case you're probably
  troubleshooting some macro-issues...
2014-03-26 11:43:41 +02:00
Panu Matilainen 4098bfd7fa Reset progress for src.rpm installation (RhBug:984724)
- Installation of binaries and sources are very different types of
  operations, this makes it more obvious when mixing binaries and
  sources in -U/-i operation. The progress report for sources is
  not identical to binaries but at least it doesn't exceed 100%.
- Combining src.rpm and binary install in the same command is more
  likely a mistake than intended, but preserving the functionality
  in case somebody relies on it.
2014-03-26 09:37:32 +02:00
Panu Matilainen 902b24c214 Move progress state variable out of the function to permit resetting 2014-03-26 09:32:53 +02:00
Panu Matilainen 91456b1bb8 Ensure clean paths are used for matching in debugedit (RhBug:1077148)
- Things like extra slashes can cause sources not to be found at all
  due to path prefix matching, canonicalize the argument paths first.
2014-03-25 14:06:34 +02:00
Panu Matilainen 72ade81876 Call psm pre- and post plugin hooks for script goals too
- Without this, plugins wouldn't have the slightest clue which package
  a %pretrans, %posttrans or %verify script belongs to.
- Whether everything is properly initialized in the %verifyscript context
  remains to be seen...
2014-03-25 11:58:49 +02:00
Tomas Mlcoch e67fad1a1f Fix creation of file manifest in rpmfcGenerateDependsHelper()
- Fixes regression from commit 0c2a5d5868

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
2014-03-24 10:39:47 +02:00
Andreas Schwab bc66cb3480 Add support for m68k
Tested on m68k-suse-linux.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
2014-03-24 10:37:58 +02:00
Panu Matilainen f311fb65ee Reset file actions between rpmtsRun() calls (RhBug:1076552)
- When the world changes underneath us (eg by %pretrans hackery)
  between test-transaction and actual transaction, in some cases
  the file action does not get recomputed if already set.
  Always reset file actions to FA_UNKNOWN before disposition
  calculations to ensure have a clean starting point.
2014-03-21 12:44:03 +02:00
Panu Matilainen e87df8ec8e Move notifications to rpmpsmInstall/Erase
- Restores progress output on src.rpm install to how it
  was before all this...
2014-03-21 09:35:17 +02:00
Panu Matilainen 25c13de050 Move rpmte payload open out of psm
- Perhaps not such a big deal, but this makes rpmPackageFilesInstall()
  and rpmPackageFilesRemove() interfaces identical, which could be
  useful. In any case there's no particular reason this code should
  be in psm either..
2014-03-21 09:07:46 +02:00
Panu Matilainen a54dabd7cf Move install/erase statistics to the relevant functions 2014-03-20 17:05:57 +02:00
Panu Matilainen bb1db2f54c Eliminate now unused and useless goal member from psm struct 2014-03-20 16:35:32 +02:00
Panu Matilainen f4a49c3d44 Unceremoniously eliminate rpmpsmNext()
- Split the remains into two separate install/erase functions where
  the logic is actually far easier to follow. Funny that.
- Since the code heavily relies on using break statement, move it
  into a one-shot while loop to avoid having to change it all at once.
- Supposedly no functional changes here.
2014-03-20 16:28:17 +02:00
Panu Matilainen 964fb4cd4e Lift file removal out of rpmpsmNext() to helper function
- This also changes callback semantics a bit to be more like install:
  issue start and stop callbacks on JUSTDB too
2014-03-20 16:14:55 +02:00
Panu Matilainen d52af9f120 Add all the install-related foobar to header in dbAdd()
- Just to get it out of rpmpsmNext()
2014-03-20 16:06:31 +02:00
Panu Matilainen 696a7c922f Lift payload unpacking out of rpmpsmNext() to helper function 2014-03-20 15:58:22 +02:00
Panu Matilainen 200ddffde9 Eliminate now empty and useless PSM_INIT and PSM_FINI stages 2014-03-20 15:12:48 +02:00
Panu Matilainen 373b9ebac6 Eliminate failedFile member from psm struct, handle locally as needed 2014-03-20 15:08:58 +02:00
Panu Matilainen 121c9c3f6f Eliminate dead code
- Since rc will always be RPMRC_OK from entry to rpmpsmNext(), the
  error path can never happen. It might've been possible to activate
  in the past where rc was taken from psm->rc but nobody has
  missed this particular error in several years so... might as well
  axe it.
2014-03-20 15:03:31 +02:00
Panu Matilainen c285dcb56a Handle replacedpkgs hack in PSM_PRE instead of PSM_INIT
- ...as it makes no difference whatsoever, leaving PSM_INIT empty now
2014-03-20 15:01:31 +02:00
Panu Matilainen b3cd1eb4ab Eliminate goalName member from psm struct
- Grab name from pkgGoalString() where "needed", this is mostly
  just debugging cruft
2014-03-20 14:52:04 +02:00
Panu Matilainen f5291eb4fa Move psm->total initialization to rpmpsmNew() too 2014-03-20 14:29:10 +02:00
Panu Matilainen 045a87134e Also pass number of installed packages to %verifyscript as $1
- Like %pre- and %posttrans, %verifyscript has always been a bit of
  an oddball and always received 0 as $1 script argument. It does
  seem kinda reasonable to pass the number of installed instances
  here too - another note in release notes needed as there are
  compatibility implications.
- Test %verifyscript in the scripts argument testcase too
2014-03-20 14:01:13 +02:00
Panu Matilainen ab069ec876 Fix %pretrans and %posttrans $1 argument
- $1 argument to both %pretrans and %posttrans has been broken (always 0)
  since the introduction of these scriptlets. Make them behave like
  other scripts, duh.
- In theory its possible this breaks somebody's scriptlets, although its
  hard to imagine why anybody would be checking for $1 which always
  has value of 0. Anyway, certainly needs mentioning in release notes.
- Update scriptlet test to match the new expectations.
2014-03-20 13:44:24 +02:00
Panu Matilainen ed14035d10 Figure package count and correction values in rpmpsmNew() already 2014-03-20 13:22:09 +02:00