Created
October 28, 2020 08:22
-
-
Save claui/d362138193358f28dca9a540b714a0b9 to your computer and use it in GitHub Desktop.
Code signature workaround for dylibs on macOS 11.0 (Apple Silicon)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ brew reinstall gettext | |
[…] | |
$ gettext --version | |
Killed: 9 | |
$ replace_inode() { | |
local filename | |
for filename; do | |
chmod o+w "${filename}" | |
rm -f "${filename}.bak" | |
mv -f "${filename}" "${filename}.bak" | |
cp "${filename}.bak" "${filename}" | |
rm -f "${filename}.bak" | |
done | |
} | |
$ export -f replace_inode | |
$ find /usr/local/opt/gettext/lib -type f -name '*.dylib' -print0 \ | |
| xargs -r0 bash -c 'replace_inode "$@" && codesign -s - -f "$@"' _ | |
/usr/local/opt/gettext/lib/libgettextpo.0.dylib: replacing existing signature | |
/usr/local/opt/gettext/lib/libtextstyle.0.dylib: replacing existing signature | |
/usr/local/opt/gettext/lib/libintl.8.dylib: replacing existing signature | |
/usr/local/opt/gettext/lib/libasprintf.0.dylib: replacing existing signature | |
/usr/local/opt/gettext/lib/libgettextsrc-0.21.dylib: replacing existing signature | |
/usr/local/opt/gettext/lib/libgettextlib-0.21.dylib: replacing existing signature | |
$ gettext --version | |
gettext (GNU gettext-runtime) 0.21 | |
Copyright (C) 1995-2020 Free Software Foundation, Inc. | |
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html> | |
This is free software: you are free to change and redistribute it. | |
There is NO WARRANTY, to the extent permitted by law. | |
Written by Ulrich Drepper. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
[on the basis that the issue is to do with flushing of information from the buffer cache] is it sufficient to change the inode (without regenerating the code signature)?