easybuild-framework icon indicating copy to clipboard operation
easybuild-framework copied to clipboard

add Arch Linux compatibility for OS dependency resolution

Open LukeLabrie opened this issue 3 years ago • 1 comments

per issue #833, added some logic to accommodate some archlinux distros (currently just arch and manjaro) when checking for os dependencies. some notes:

  • should work for any arch distro that uses pacman as long as it's added to the arch_distros list
  • i had to specifically define ARCH_OS_DEP_CONSTANTS because an import of EASYCONFIG_CONSTANTS from easybuild.framework.easyconfig.constants results in a circular import... perhaps there's a better way to do it
  • the names of the packages need to be changed when using those constants, since they have different names on arch. arch packages typically don't have the "...-dev" suffix, but it seems like the arch packages incorporate the dev features from other distros. I don't think you can just add the names to EASYCONFIG_CONSTANTS because then you might get the wrong version on other distros

works for me locally... let me know your thoughts

LukeLabrie avatar Oct 30 '22 16:10 LukeLabrie

@boegel, per your feedback I added a comment to the codeblock in constants.py to explain why it can't simply be added to the tuples. However after some testing, I found that given the current approach it is still necessary to define the package names that require modification in systemtools.py, even though they're already defined in constants.py. The logic in constants.py is fine so long as the easyconfig uses the predefined easyconfig constants for the os dependencies. But it is fairly common for the dependencies to instead be defined explicitly. For example in easybuild-easyconfigs/easybuild/easyconfigs/p/Python/Python-3.8.2-GCCcore-9.3.0.eb, we have

osdependencies = [('openssl-devel', 'libssl-dev', 'libopenssl-devel')]

(which could have equivalently been written as 'OS_PKG_OPENSSL_DEV') in which case the dependencies will be fed directly into the check_os_dependency() function in systemtools.py without modification from constants.py. In the above commits, I've tried to do accommodate for this in a minimal way.

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 constants.py), there needs to be some refactoring such that constants.py does not depend on systemtools.py. Let me know your thoughts.

LukeLabrie avatar Nov 15 '22 14:11 LukeLabrie