Build cleanups - #76
Open
michich wants to merge 6 commits into
Open
Conversation
@COMPATLIB@, @COMPATMAJOR@, and @LIBPSM2_COMPAT_CONF_DIR@ do not appear in libpsm2.spec.in, so the corresponding sed expressions were no-ops. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
40-psm.rules set MODE="0666" on hfi1 device nodes as a workaround for
old kernels that did not set proper permissions.
Since kernel commit e116a64fab650 ("IB/hfi: Properly set permissions for
user device files"), the driver itself ensures the device node access
mode is 0666. The commit is from 2015. It was included in Linux v4.3 and
backported to RHEL in version 7.2. The udev rule has been redundant for
more than 10 years.
Remove 40-psm.rules entirely and drop the redundant MODE="0666" from
40-psm-compat.rules, keeping only its SYMLINK+="ipath" directives.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Maintenance support phase for RHEL 6 ended in June 2024 ([1]). RHEL 6 is in "Extended life cycle support" phase now. Its users likely prefer to not touch anything, so they have no need to run the latest upstream psm2 code. Drop the special handling of RHEL 6 in the spec file template. @UDEVDIR@ becomes unused. Remove the substitution in the Makefile. [1] https://access.redhat.com/support/policy/updates/errata#Life_Cycle_Dates Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Instead of hardcoding /usr/lib for Fedora and /etc for everything else, query kmod's pkg-config for the distconfdir variable. kmod ships kmod.pc since version 32 (March 2024). Older distros have no kmod.pc, so if the detection fails, fall back to /lib. /lib/modprobe.d has been supported since module-init-tools 3.13 (May 2011), so the fallback works on all relevant distros, with or without /usr-merge. I considered changing the name LIBPSM2_COMPAT_CONF_DIR to KMOD_DISTCONFDIR, but I noticed that SUSE's RPM spec sets the variable, so I chose to keep it. Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
To truly avoid adding a space, do not use the "+=" operator, but variable expansion and concatenation. Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
DISTRO's only remaining purpose was setting SPEC_FILE_RELEASE_DIST to
%{?dist} on Fedora. Replace it with a direct shell snippet that checks
whether "fedora" appears as a word in ID or ID_LIKE from /etc/os-release,
which correctly covers Fedora itself and derivatives like RHEL, CentOS,
and AlmaLinux. Drop the now-empty RHEL and SLES ifeq stubs along with
the stale comment block.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
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.
Drop support for very old kernels (2015) and distros (RHEL 6).
Fix detection of Fedora-like distros.
Change modprobe.d from /etc to /lib - sensible for distros after 2011.
Simplify the Makefile.