forked from semios/semios-packages
Merge pull request 'fix: autostrip fails on read-only permissions' (#82) from sisungo/semios-packages:autostrip-perm into master
Reviewed-on: semios/semios-packages#82
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
|
import stat
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
from lib import common
|
from lib import common
|
||||||
@@ -19,4 +20,7 @@ def autostrip(composer):
|
|||||||
continue
|
continue
|
||||||
if not _is_elf(ent.path):
|
if not _is_elf(ent.path):
|
||||||
continue
|
continue
|
||||||
|
oldperm = stat.S_IMODE(os.stat(ent.path).st_mode)
|
||||||
|
os.chmod(ent.path, 0o777)
|
||||||
subprocess.run([strip, ent.path], check=True)
|
subprocess.run([strip, ent.path], check=True)
|
||||||
|
os.chmod(ent.path, oldperm)
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ def build():
|
|||||||
)
|
)
|
||||||
cpp.make()
|
cpp.make()
|
||||||
cpp.make_install()
|
cpp.make_install()
|
||||||
os.chmod("bin/bmake", 0o655)
|
|
||||||
|
|
||||||
|
|
||||||
on_build(build)
|
on_build(build)
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ def build():
|
|||||||
cpp.configure()
|
cpp.configure()
|
||||||
cpp.make([f"CC={os.environ['CC']}"])
|
cpp.make([f"CC={os.environ['CC']}"])
|
||||||
cpp.make_install()
|
cpp.make_install()
|
||||||
subprocess.run(["sh", "-c", "chmod +w bin/* sbin/*"], check=True)
|
|
||||||
|
|
||||||
|
|
||||||
on_build(build)
|
on_build(build)
|
||||||
|
|||||||
Reference in New Issue
Block a user