marcmengel / spack-linuxexternals

Spack extension that finds more externals on Linux using rpm / apt commands.
Apache License 2.0
0 stars 0 forks source link

Mangled specs on AlmaLinux9 #1

Closed marcmengel closed 1 month ago

marcmengel commented 3 months ago

Currently the code works, but we're getting mangled spec strings on 2 packages on AlamaLinux9: libxvmc @sed (GNU sed) 4.8 %gcc@11.4.1 os=almalinux9 texlive @26. %gcc@11.4.1 os=almalinux9 which indeicate our regexp for matching versions is a bit lax. vers_re = r'^.*?[^0-9]([0-9][0-9]*\.[0-9.kp]*)[^0-9].*$'

we're fooled in the texlive case because the actual version "20200406" does not have any kind of dot in it, so we prefer the 26. from the build number... Do we special case that?

The libxvmc case is more convoluted; I'm not sure how we'er getting the (Gnu sed) text in there, AND we do not have such a library installed.

Also, for 0.21.x and later spack, we need "glibc" instead of "libc" for our providers...

marcmengel commented 3 months ago

Oh wait, now I see it. If our package is "lib..." we set: cmd="ls -l /usr/lib/{cmd}. | sed -e s/.{cmd}.[a-z]\.//" but we later run f"{cmd} --version" which puts --version on the "sed" command line, and gets us sed's version (4.8) in the output... sigh.

marcmengel commented 1 month ago

I believe these are both fixed now, with a slightly clever-er regex for version matching, and some variable name cleanup...