-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add Arch Linux compatibility for OS dependency resolution #4116
base: develop
Are you sure you want to change the base?
Conversation
easybuild/tools/systemtools.py
Outdated
@@ -211,6 +212,19 @@ | |||
'setuptools': ('pkg_resources', "obtaining information on Python packages via pkg_resources module"), | |||
} | |||
|
|||
# os dependency constants that can be used in easyconfig (for name updates on arch distros) | |||
ARCH_OS_DEP_CONSTANTS = { | |||
'IBVERBS_DEV': (('libibverbs-dev', 'libibverbs-devel', 'rdma-core-devel'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LukeLabrie We already have constants for this in easybuild/framework/easyconfig/constants.py
, we shouldn't copy that here.
If the package names for openssl
& co are slightly different on Arch, then we should just add an item to the tuples in easybuild/framework/easyconfig/constants.py
, since the tuples specify alternatives for the package names that are considered.
So for example, adding rdma-core
to the tuple for OS_PKG_IBVERBS_DEV
:
EASYCONFIG_CONSTANTS = {
...
'OS_PKG_IBVERBS_DEV': (('libibverbs-dev', 'libibverbs-devel', 'rdma-core-devel', 'rdma-core'),
"OS packages providing ibverbs/infiniband development support"),
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback @boegel. To your first comment, I tried that initially but since easybuild/framework/easyconfig/constants.py
imports easybuild/tools/systemtools.py
importing the constants from constants.py
results in a circular import -- but as I mentioned I'm sure there's a cleaner way to avoid this so I can look into that.
To your second comment, I also tried that initially, but wouldn't that create an issue on distros where there is a meaningful difference between the names rdma-core
and rdma-core-devel
? For example, I think these would be two different packages on redhat distros, so adding rdma-core
to the tuple would mean a redhat user would pass a dependency check even if they didn't have rdma-core-devel
. That's the only reason I added specific logic for arch distros.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, that's a good point on rdma-core-devel
vs rdma-core
.
I guess that forces us to do the override you're suggesting for Arch/Manjaro, at least with the current approach.
It's probably a good idea to add a comment above the code block you're currently adding to constants.py
, since this complication is not immediately obvious, just to avoid that someone else goes "how silly, let's just add rdma-core
to the tuple instead"...
@boegel, per your feedback I added a comment to the codeblock in
(which could have equivalently been written as I think that if you want the package names (that will need to be changed for arch distros) to be defined in only one place (like |
per issue #833, added some logic to accommodate some archlinux distros (currently just arch and manjaro) when checking for os dependencies. some notes:
arch_distros
listARCH_OS_DEP_CONSTANTS
because an import ofEASYCONFIG_CONSTANTS
fromeasybuild.framework.easyconfig.constants
results in a circular import... perhaps there's a better way to do itEASYCONFIG_CONSTANTS
because then you might get the wrong version on other distrosworks for me locally... let me know your thoughts