Skip to content

RPM updates - #46

Open
jhutz wants to merge 12 commits into
rra:mainfrom
jhutz:rpm-updates
Open

RPM updates#46
jhutz wants to merge 12 commits into
rra:mainfrom
jhutz:rpm-updates

Conversation

@jhutz

@jhutz jhutz commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

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.

jhutz added 12 commits August 8, 2026 16:48
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant