fix: restart Dever releases at 0.0.1 with complete signed assets
This commit is contained in:
1 parent
5589b657db
commit
faf8b168a7
22 files changed
+582
-94
No files matched your search
@@ -32,6 +32,7 @@ TOOLS = {
|
||||
)},
|
||||
}
|
||||
LIBRARIES = (
|
||||
"ld-linux-x86-64.so.2",
|
||||
"libc.so.6", "libm.so.6", "libdl.so.2", "libpthread.so.0", "librt.so.1",
|
||||
"libgcc_s.so.1", "libstdc++.so.6", "libisl.so.23", "libmpc.so.3",
|
||||
"libmpfr.so.6", "libgmp.so.10", "libz.so.1", "libzstd.so.1",
|
||||
@@ -46,8 +47,10 @@ LIBRARIES = (
|
||||
|
||||
def signed_library_paths(content):
|
||||
# 仅迁移以 /lib 开头的绝对 token,不能再次改写已有的 /usr/lib。
|
||||
return re.sub(r"(?<!\S)/lib/" + re.escape(MULTIARCH) + "/",
|
||||
f"/usr/lib/{MULTIARCH}/", content)
|
||||
rewritten = re.sub(r"(?<!\S)/lib/" + re.escape(MULTIARCH) + "/",
|
||||
f"/usr/lib/{MULTIARCH}/", content)
|
||||
return re.sub(r"(?<!\S)/lib64/ld-linux-x86-64\.so\.2(?=[\s)])",
|
||||
f"/usr/lib/{MULTIARCH}/ld-linux-x86-64.so.2", rewritten)
|
||||
|
||||
|
||||
def sdk_leaf(source, destination, changes):
|
||||
|
||||
@@ -11,6 +11,8 @@ class LinkerScriptTests(unittest.TestCase):
|
||||
f"/usr/lib/{MULTIARCH}/libc_nonshared.a "
|
||||
"AS_NEEDED ( /lib64/ld-linux-x86-64.so.2 ) )")
|
||||
expected = original.replace(f"( /lib/{MULTIARCH}/", f"( /usr/lib/{MULTIARCH}/")
|
||||
expected = expected.replace("/lib64/ld-linux-x86-64.so.2",
|
||||
f"/usr/lib/{MULTIARCH}/ld-linux-x86-64.so.2")
|
||||
self.assertEqual(signed_library_paths(original), expected)
|
||||
self.assertEqual(signed_library_paths(expected), expected)
|
||||
|
||||
|
||||
Reference in new issue
Block a user