[vlc-commits] macOS codesign.sh: Regenerate the cache after signing modules
David Fuhrmann
git at videolan.org
Sat Jan 13 18:49:47 CET 2018
vlc/vlc-3.0 | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Sat Jan 13 17:58:53 2018 +0100| [6ba5f973597ae3610b1195afb05473dfe9ed79d9] | committer: David Fuhrmann
macOS codesign.sh: Regenerate the cache after signing modules
The cache is only valid if mod time and size of the plugins match.
As macOS codesign adapts the binaries, the cache will be invalid
after signing. Additionally, the cache file itself must be signed
as well, because of its location inside the bundle. Therefore,
regenerate the cache at the correct stage in the middle of the
signing script.
The script searches for vlc-cache-gen when executed inside vlcs
build directory, as well as inside the release package.
refs #19448
(cherry picked from commit 61150035b9083a733fc3a90b653332c3e8a33e85)
Signed-off-by: David Fuhrmann <dfuhrmann at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=6ba5f973597ae3610b1195afb05473dfe9ed79d9
---
extras/package/macosx/codesign.sh | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/extras/package/macosx/codesign.sh b/extras/package/macosx/codesign.sh
index cdbc866313..614dd997db 100755
--- a/extras/package/macosx/codesign.sh
+++ b/extras/package/macosx/codesign.sh
@@ -67,6 +67,18 @@ if [ "x$1" != "x" ]; then
exit 1
fi
+VLCCACHEGEN=""
+if [ -e "./bin/vlc-cache-gen" ]; then
+ VLCCACHEGEN="./bin/vlc-cache-gen"
+fi
+if [ -e "./vlc-cache-gen" ]; then
+ VLCCACHEGEN="./vlc-cache-gen"
+fi
+
+if [ -z "$VLCCACHEGEN" ]; then
+info "WARN: Cannot find vlc-cache-gen, cache will be corrupt after signing"
+fi
+
# Call with $1 = file or folder, $2 = identifier (if empty, file name is used)
sign()
{
@@ -140,11 +152,17 @@ done
info "Signing the modules"
-for i in $(find VLC.app/Contents/MacOS/plugins -type f -exec echo {} \;)
+for i in $(find VLC.app/Contents/MacOS/plugins -type f -name "*.dylib" -exec echo {} \;)
do
sign "$i"
done
+if [ ! -z "$VLCCACHEGEN" ]; then
+ $VLCCACHEGEN VLC.app/Contents/MacOS/plugins
+fi
+
+sign "VLC.app/Contents/MacOS/plugins/plugins.dat"
+
info "Signing the libraries"
for i in $(find VLC.app/Contents/MacOS/lib -type f -exec echo {} \;)
More information about the vlc-commits
mailing list