Commit Graph

12809 Commits

Author SHA1 Message Date
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
Panu Matilainen 1f255f6533 Move psm goal initialization to rpmpsmNew() where it belongs... 2014-03-20 13:18:42 +02:00
Panu Matilainen 2072a59bae Begin consolidating our tribal scriptlet knowledge into a struct
- There are all sorts of strange quirks and associations across
  several different tags, sense flags and coded logic scattered
  all over the codebase. Begin what's no doubt going to be a long
  and arduous process of getting this consolidated into a data
  structure.
- Just the trivial basics here, some of it is still unused and various
  bits still missing, gotta start someplace...
2014-03-20 12:08:36 +02:00
Panu Matilainen 59468a27c2 Add an enumeration of our scriptlet types
- Regular scripts can be fetched from headers by tag, but triggers
  are all in the same tag set and distinguished by sense flags.
  To confuse matters further, tags for all the separate trigger types
  do exist but they are only used by librpmbuild, they are never
  present in headers. Throw in an "abstraction" that allows covering
  these both.
- Defined in bitfield style to make them nicely manipulable, 32 bits
  should be plenty enough for different scriptlet types for a couple
  of decades more
- Remember the type in rpmscript API + add a getter. Currently derived
  from the tag that's passed in, ultimately we'll want it the other
  way around but to avoid changing too many things at once...
2014-03-20 12:08:36 +02:00
Panu Matilainen 1e5342b992 Plug recently introduced memleak regression in package reading
- (Re)introduced in commit 567b544f34,
  headerVerify() may return a message with RPMRC_OK which we want to
  pass on if nothing else can be verified, but we need to free the
  message if signature/digest checking is done.
2014-03-20 11:56:37 +02:00
Panu Matilainen 42ab58b936 *facepalm* mixup in previous commit 2014-03-20 10:41:48 +02:00
Panu Matilainen 3a35368465 Plug recently introduced memleaks in fsm file/link creation
- Unlike rpmfiFN(), rpmfilesFN() returns malloced memory which caller
  must free...
2014-03-20 10:39:07 +02:00