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.