RPM updates - #46
Open
jhutz wants to merge 12 commits into
Open
Conversation
Actually run the tests during rpmbuild's check phase. Kerberos tests are enabled by providing the test principal name and keytab filename on the rpmbuild command line. Note that this introduces new build dependencies on rubygem-minitest (if building Ruby bindings) and fakeroot.
Also, fix a bug in generate-krb5-conf that prevented using a custom krb5.conf from actually working.
MIT Kerberos 1.18 (found in RHEL 8.3) now uses a default replay cache location based on the calling user's effective uid. Since RPM tests are run under fakeroot, it ends up using /var/tmp/krb5_0.rcache2, which it cannot actually access. Avoid this by setting KRB5RCACHEDIR to the test suite's temporary directory, where the krb5_0.rcache2 filename can be used without issues.
When REMCTL_PYTHON_LIBS includes arguments of the form -Wl,* make sure they make their way into extra_link_args, so the module will actually get linked correctly. This is needed when some of the libraries used are in non-default locations and require a DT_RUNPATH tag.
RHEL5/RHEL6 are well past end-of-life; there is little point in continuing to maintain special cases for them in the spec file.
Since remctl no longer supports python2.7, and newer RHEL no longer
includes it, stop trying to build packages for it. Instead, build for
python3. Also, accommodate relevant RPM macro changes. This means...
- Updating our build dependencies
- Renaming the binary package containing our Python bindings
- Use /usr/bin/python3 instead of 'python' or %{__python}
- Updating other RPM macro references
Update the way automake is invoked to avoid requiring NEWS. And, add CHANGELOG.md to EXTRA_DIST, so it's actually present when building from the dist tarball.
It seems that distribution vendors no longer want packages to contain .la files. As of RPM 4.17, there is a default policy which removes them from the buildroot. Thus, we should should not include it in the client packages files list. Further, we remove the file ourselves, to ensure proper behavior on older platforms.
Commit 1052e06 set KRB5RCACHEDIR to tests/tmp when running tests under RPM. Unfortunately, this breaks the ruby tests, which expect the tmp directory to be empty and removable for each test. Switch to using a separate tests/rcache directory for KRB5RCACHEDIR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This includes a number of spec file updates from a few years ago, plus a few new ones...
The most significant set of changes allow actually running the test suite when building RPMs. The tests are run by default, and new rpmbuild options are added to allow specifying a test principal, keytab, and optional krb5.conf to allow Kerberos-dependent tests to be run.
I also updated the RPM spec file to drop support for python2.7, instead always building packages for python3 (if buildpython is set). To simplify this, I also desupport building on RHEL6 and older, which also simplifies bits related to building PHP and Ruby bindings.
And there are some changes to reflect changes you've made in the last couple of years, like generating CHANGELOG.md instead of NEWS, and changes made in RedHat-based platforms, like dropping .la files, changes in the format of /etc/redhat-release, and so on.