likwid: Fix the perms script (#48666)
* likwid: Fix the perms script The script loops over the path (which includes the prefix), but additionally adds the prefix up front which results in duplicate paths and a double "/" in the command like in the following one: chown root:root /opt/csg/spack/opt/spack/linux-debian12-zen2/gcc-12.2.0/likwid-5.4.1-xfc6quebnf2kosydl3ospaeoskxnxwhn//opt/csg/spack/opt/spack/linux-debian12-zen2/gcc-12.2.0/likwid-5.4.1-xfc6quebnf2kosydl3ospaeoskxnxwhn/sbin/likwid-accessD Additionally the path is currently not quoted which can potentially result in word splitting for weird paths. Signed-off-by: Christian Heusel <christian@heusel.eu> * likwid: Make the perm scripts' name unique Also move it into the proper binary folder as per the Filesystem Hierarchy Standard. Signed-off-by: Christian Heusel <christian@heusel.eu> --------- Signed-off-by: Christian Heusel <christian@heusel.eu>
This commit is contained in:
parent
9c5b3ccb4e
commit
1601193e12
@ -260,8 +260,8 @@ def install(self, spec, prefix):
|
||||
@run_after("install")
|
||||
def caveats(self):
|
||||
if self.spec.satisfies("accessmode=accessdaemon"):
|
||||
perm_script = "spack_perms_fix.sh"
|
||||
perm_script_path = join_path(self.spec.prefix, perm_script)
|
||||
perm_script = "spack_likwid_fix_perms.sh.j2"
|
||||
perm_script_path = join_path(self.spec.prefix.bin, perm_script)
|
||||
daemons = glob.glob(join_path(self.spec.prefix, "sbin", "*"))
|
||||
with open(perm_script_path, "w") as f:
|
||||
env = spack.tengine.make_environment(dirs=self.package_dir)
|
||||
|
@ -1,11 +1,9 @@
|
||||
#!/bin/sh -eu
|
||||
|
||||
{% for cf in chowns %}
|
||||
chown root:root {{ prefix }}/{{ cf }}
|
||||
chown root:root "{{ cf }}"
|
||||
{% endfor %}
|
||||
|
||||
{% for sf in chmods %}
|
||||
chmod 4755 {{ prefix }}/{{ sf }}
|
||||
chmod 4755 "{{ sf }}"
|
||||
{% endfor %}
|
||||
|
||||
# end
|
Loading…
Reference in New Issue
Block a user