Fix build and sign module initialization in python3 (RhBug:1064758)

- PyInit_foo() name needs to match the module name. Doh.

(cherry picked from commit 0073376965ee8d8df63c21b0da634fc315c97d0b)
Python 2/3 compat define for PyInt_AsSsize_t, used by rpmfiles

(cherry picked from commit 42d502d0180002224e64ab766b3f09846be6eb56)
Fix signing module methods missing on python3, duh

(cherry picked from commit a021aca8fda8fcb2f521e1816b78c4f8bb640706)
Python 3 doesn't have nb_divide in PyNumberMethods

(cherry picked from commit 05740e1d67b972a7909c1950dca7bb2ec4e35a60)
Build python 3 compatibile module names

- Python 2 accepts foomodule.so as an alias for foo.so, Python 3 does
  not. Build foo.so names which works with both...

(cherry picked from commit 1197c9d3eb60b6af4ab59a02c4318d235c6117d6)
Don't match use or requires within a multi-line print statement

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
(cherry picked from commit 0d5929ba5eabadec49273bb090ba9158dfccc30c)
Make room for SHA224 in digest bundles. Doh.

- Should've really been in commit 20cfa7d2b4c927798ad38126821d194fafd93ffe
  but at the time NSS didn't even support SHA-224 so it was untestable.
  Now that it does, and somebody actually bothered to test...
  Fixes RhBug:1066494.

(cherry picked from commit 85b62554d2632d06f975f90697c4c11c3f180931)
Disable curl globbing for remote retrievals

- urlGetFile() can only handle one file at a time, so globbing does
  not make sense and only confuses us. Besides, useful things like
  'rpm -Uvh http://somewhere.org/foo-1.2-1.{i386,x86_64}.rpm'
  work just as well without curl-level globbing.
- Incidentally this is also the documented workaround for using
  IPv6 numerical addresses with curl (RhBug:1076277)

(cherry picked from commit 409fa83c94d50ab0c4849b737f2647e1069aea8b)
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.
- Backported from commit f311fb65eea4791fa15a00412384b96fdccbbf1c
Add support for m68k

Tested on m68k-suse-linux.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
(cherry picked from commit bc66cb3480d05aad562ad55c6ad63ff71b57cd9f)
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.

(cherry picked from commit 91456b1bb8e93deef683a9c40b1fe7f1de3da99e)
Move progress state variable out of the function to permit resetting

(cherry picked from commit 902b24c214d76073216ffe8f2df13c3e28f4876a)
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.

(cherry picked from commit 4098bfd7fa94c89f70c162c46fcd3627c282a102)
Add a "release" target to Makefile.maint, mainly for changelog updating atm

(cherry picked from commit a1f62c26e0e2f7f9e17c700ffa07510e4534cb2a)
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 breaks easily
- Backported from commit f5134cef0c59152c5523dd5ea5ca5e651ba088c5
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.

(cherry picked from commit f996665e2fe6388a1e9f71ccd07c723e256a8fb3)
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>
(cherry picked from commit bf02debf73b4cad3aa344d5698af82c28619a248)
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>
(cherry picked from commit 18e8d2dc0ab05673770854a030b92bac169abcb6)
Remember to actually install appdata.prov script

- Should've been in commit e6cadc6d5a1d2cf2c61c738808b5f2b212452148

(cherry picked from commit 092717b760fbabfc67f8580757a1ae29be9495ec)
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>
(cherry picked from commit 13a1ef9fb5a00e7dc8642ad7fbe0b8587191d7fe)