]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
uninative.bbclass: handle read only files outside of patchelf
authorSteve Sakoman <steve@sakoman.com>
Sat, 3 Jun 2023 19:37:18 +0000 (09:37 -1000)
committerSteve Sakoman <steve@sakoman.com>
Mon, 19 Jun 2023 16:23:31 +0000 (06:23 -1000)
We are seeing autobuilder failures with the latest uninative:

patchelf: open: Permission denied

See upstream discussion which suggests handling
read-only files explicitly outside of patchelf:
https://github.com/NixOS/patchelf/pull/89

Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/classes/uninative.bbclass

index 2940935dd74410e50920a03b617a8612c1201e60..4d4f53ad4d792c98cdbc85fb3c725dabffc5419d 100644 (file)
@@ -169,5 +169,7 @@ python uninative_changeinterp () {
             if not elf.isDynamic():
                 continue
 
+            os.chmod(f, s[stat.ST_MODE] | stat.S_IWUSR)
             subprocess.check_output(("patchelf-uninative", "--set-interpreter", d.getVar("UNINATIVE_LOADER"), f), stderr=subprocess.STDOUT)
+            os.chmod(f, s[stat.ST_MODE])
 }