Whenever we bump the RPM version in cmake, certain tests also need
updating, e.g. those that compare package digests or RPM sonames as
those are subject to the version number.
Up until now, this had to be done manually by running the test-suite,
looking at the failed tests' diffs and fixing up the expected outputs by
hand.
No more! Separate those tests and add the "make pinned" cmake target to
update them automatically. This makes use of the new-ish atshell
feature which runs a shell/command (*.sh scripts in tests/pinned/ in
this case) in the standard test environment in order to get the new
outputs.
See the included README for more details.
Right now, if the podman image fails to build or rpm fails to
build/install, we happily continue and run the test-suite, only to
eventually fail with some cryptic error, such as:
error: cannot find rpm
Not too helpful, indeed. Instead, just fail the whole tree preparation
process if we encounter an error.
Fix the return code of unshared() so that we don't fail on that, though.
Also, when building the RPM layer, use a proper cleanup trap instead of
ignoring SIGINT since a failing make_install() can now terminate the
script.
Fixes: #2667
This name is a better fit as it puts more emphasis on the format of the
resulting tree, not as much on the actual container engine used (which
can be swapped, and currently is in the CI where we use docker instead
of podman).
Also drop the awkward .docker symlink now and instead pass the container
engine through the MKTREE_ENGINE environment variable.