The setup.py build was only really added for dealing with parallel
installable Python 2 and 3 builds, and has been quite a PITA otherwise
because it's not what the upstream builds and tests use. Now that
the 2to3 transition is thankfully over, we can go back to building the
extension by ourselves. Only, in the meanwhile people have come to
depend on the egg-info data so create that from automake, that format is
not exactly rocket science.
This fixes us accidentally shipping two slightly different Python
modules for years (#2135719) and building with Python >= 3.12 where
distutils has been dropped, and does so in upstream compatible manner
(where a similar approach was taken when transitioning to cmake based
build system)
Much of the world outside Fedora itself appears to be signed using
obs-signd which defaults to OpenPGP v3 signatures, which the Sequoia
backend does not currently support. Revert for now to consider the
options.
Technically the packages depend on each other in that if you install on,
the other must be pulled in for the functionality. However the
installation order doesn't matter, as the plugin will only be used in
the next transaction anyway. Thus, making that dependency unordered by
flagging it as "meta" resolves the ordering loop.
The repo may be initialized before the macro runs, in which case we
would fail to create the initial main branch and thus fail on "git
branch --set-upstream-to=main". This caused an FTBFS in the edk2
package:
https://github.com/rpm-software-management/rpm/pull/2121#issuecomment-1202349789
Revert the patch for now as a hotfit and revisit the actual use case
later upstream, either fixing it properly or reverting there as well.
Drop upstreamed / unnecessary patches, drop debugedit conditionals
as it's now a hard external dependency. Add back
/usr/lib/rpm/find-debuginfo.sh as a compat symlink for now, this
is referred to from quite a few packages directly.
Pull couple of late upstream patches to avoid build dependency on
pandoc.
Apart from the obviously dropped upstreamed patches etc:
- Drop a local hack for a cosmetic Fedora 22 era rpm2cpio issue
- Drop BDB support leftovers from the spec (party like its's 1999!)
- Add build conditional for fsverity plugin
Make with/without bdb build option actually work. An expression would be
nicer but people want to be able to build rpm with older versions of
itself...
Clean up unpackaged /var/tmp from the buildroot, rpm >= 4.17 will fail
on it.
BDB will segfault on multiple failed attempts of certain kind, something
unexpected fails when selinux says no. Stop on first failure instead.
On a related note, fix double rpmdb open failure from lazy keyring open
recursing back to the same lazy open.
Newly created databases will be sqlite unless overridden in configuration.
If BDB database is detected at %posttrans of rpm itself, it's flagged
for rebuild in the next reboot. This will serve two purposes: the primary
objective is obviously to convert to configured (ie sqlite) format,
but as a secondary side-effect, any remaining BDB databases will get
a much needed maintenance rebuild from time to time.
Discussed in https://pagure.io/fesco/issue/2382, deemed to not require
any exceptions although this is a bit of an unusual path.
%triggerun as opposed to seemingly more obvious %triggerin is used to
ensure preset files have already been updated without adding new
ordering constraints.
%{name} and %{version} refer to the name and version strings of the
package that will be built and shouldn't be used for things that
do not honor those macros. Such as pre-existing or predetermined
filenames.
De-facto packaging practises over multiple decade liberally (ab)use
these and various other macros in places they don't belong - if rpm itself
doesn't follow its own rules then how can we expect anybody else to do so...
This doesn't change anything as is, but enables both Name: and Version:
to be changed arbitrarily without breaking the package build, which is
how it should optimally be. If this was strictly followed then scl-utils
would've been a walk in the park. Relatively speaking.
This can be activated with 'touch /var/lib/rpm/.rebuilddb' to perform
rpmdb rebuild on next reboot. The immediate motivation is having a place
to perform automatic database format conversion in a reasonably safe
manner, but could also serve recovery purposes.
Commit a5c4573419 caused a literal
/var/lib/rpm/.*.* file to be packaged as a ghost instead of the db lock
files it was supposed to catch. Ensure any hidden db locks get copied
too after initializing. Thanks to Thierry Vignaud for spotting.