From cc44ae457950db63cbbea66db1f1760dcd72b234 Mon Sep 17 00:00:00 2001 From: Bruno Lopes Date: Tue, 30 Dec 2025 15:36:06 -0300 Subject: [PATCH] tools: Add comment and fix variable on "codesign" section --- tools/lib_bundle.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/lib_bundle.py b/tools/lib_bundle.py index b7df9002c4..7acf2e0dbc 100644 --- a/tools/lib_bundle.py +++ b/tools/lib_bundle.py @@ -277,13 +277,14 @@ def set_rpath(binary, destbin=None): except subprocess.CalledProcessError as e: sys.stderr.write(f"Failed to rewrite LC_ID_DYLIB {old_dylib_path}: {e}\n") + # Normalize signature after all the changes result = subprocess.run(["codesign", "-v", binary], capture_output=True, text=True) if "invalid signature" in result.stdout + result.stderr: try: subprocess.run(["codesign", "--sign", "-", "--force", "--preserve-metadata=entitlements,requirements,flags,runtime", binary], check=True, stderr=subprocess.DEVNULL) #sys.stdout.write(f"Re-signed {binary}\n") except subprocess.CalledProcessError as e: - sys.stderr.write(f"Failed to ad-hoc sign {file}: {e}\n") + sys.stderr.write(f"Failed to ad-hoc sign {binary}: {e}\n") if __name__ == "__main__":