File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -115,6 +115,19 @@ bundle_deps_of() {
115115 local binary=" $1 "
116116 chmod u+w " $binary " 2> /dev/null || true
117117
118+ # If this binary is a dylib whose own LC_ID_DYLIB still points to an
119+ # external path (e.g. a copy that was vendored into the bundle pre-staged,
120+ # like Ruby's libyaml under server/native/ruby/...), rewrite the id to
121+ # @rpath/<base>. install_name_tool -change handles LC_LOAD_DYLIB only, so
122+ # the install name has to be fixed separately or the verify step trips.
123+ local own_id
124+ own_id=" $( otool -D " $binary " 2> /dev/null | sed -n ' 2p' ) "
125+ if [ -n " $own_id " ] && is_external_dep " $own_id " ; then
126+ unsign " $binary "
127+ install_name_tool -id " @rpath/$( basename " $own_id " ) " " $binary " 2> /dev/null \
128+ || log_warn " could not rewrite id of ${binary## ${RELEASE_APP} / } "
129+ fi
130+
118131 local deps_text
119132 deps_text=" $( otool_deps " $binary " ) "
120133
You can’t perform that action at this time.
0 commit comments