@@ -24,11 +24,15 @@ include("auditor/codesigning.jl")
2424# something can't be opened. Possibly use that within BinaryProvider too?
2525
2626"""
27- audit(prefix::Prefix; platform::AbstractPlatform = HostPlatform();
27+ audit(prefix::Prefix, src_name::AbstractString = "";
28+ io=stderr,
29+ platform::AbstractPlatform = HostPlatform(),
2830 verbose::Bool = false,
2931 silent::Bool = false,
3032 autofix::Bool = false,
31- require_license::Bool = true)
33+ has_csl::Bool = true,
34+ require_license::Bool = true,
35+ )
3236
3337Audits a prefix to attempt to find deployability issues with the binary objects
3438that have been installed within. This auditing will check for relocatability
@@ -47,7 +51,8 @@ function audit(prefix::Prefix, src_name::AbstractString = "";
4751 silent:: Bool = false ,
4852 autofix:: Bool = false ,
4953 has_csl:: Bool = true ,
50- require_license:: Bool = true )
54+ require_license:: Bool = true ,
55+ )
5156 # This would be really weird, but don't let someone set `silent` and `verbose` to true
5257 if silent
5358 verbose = false
@@ -107,13 +112,13 @@ function audit(prefix::Prefix, src_name::AbstractString = "";
107112 # DO THIS ONE LAST as it can actually mutate the file, which causes the previous
108113 # checks to freak out a little bit.
109114 all_ok &= check_dynamic_linkage (oh, prefix, bin_files;
110- platform, silent, verbose, autofix)
115+ platform, silent, verbose, autofix, src_name )
111116 end
112117 end
113118 end
114119
115120 # Ensure this file is codesigned (currently only does something on Apple platforms)
116- all_ok &= ensure_codesigned (f, prefix, platform; verbose)
121+ all_ok &= ensure_codesigned (f, prefix, platform; verbose, subdir = src_name )
117122 catch e
118123 if ! isa (e, ObjectFile. MagicMismatch)
119124 rethrow (e)
@@ -172,7 +177,7 @@ function audit(prefix::Prefix, src_name::AbstractString = "";
172177 # Ensure that all libraries have at least some kind of SONAME, if we're
173178 # on that kind of platform
174179 if ! Sys. iswindows (platform)
175- all_ok &= ensure_soname (prefix, f, platform; verbose= verbose , autofix= autofix )
180+ all_ok &= ensure_soname (prefix, f, platform; verbose, autofix, subdir = src_name )
176181 end
177182
178183 # Ensure that this library is available at its own SONAME
@@ -306,7 +311,9 @@ function check_dynamic_linkage(oh, prefix, bin_files;
306311 platform:: AbstractPlatform = HostPlatform (),
307312 verbose:: Bool = false ,
308313 silent:: Bool = false ,
309- autofix:: Bool = true )
314+ autofix:: Bool = true ,
315+ src_name:: AbstractString = " " ,
316+ )
310317 all_ok = true
311318 # If it's a dynamic binary, check its linkage
312319 if isdynamic (oh)
@@ -331,7 +338,7 @@ function check_dynamic_linkage(oh, prefix, bin_files;
331338 if verbose
332339 @info (" Rpathify'ing default library $(libname) " )
333340 end
334- relink_to_rpath (prefix, platform, path (oh), libs[libname]; verbose= verbose )
341+ relink_to_rpath (prefix, platform, path (oh), libs[libname]; verbose, subdir = src_name )
335342 end
336343 continue
337344 end
@@ -345,7 +352,7 @@ function check_dynamic_linkage(oh, prefix, bin_files;
345352 kidx = findfirst (known_bins .== lowercase (basename (libname)))
346353 if kidx != = nothing
347354 # If it is, point to that file instead!
348- new_link = update_linkage (prefix, platform, path (oh), libs[libname], bin_files[kidx]; verbose= verbose )
355+ new_link = update_linkage (prefix, platform, path (oh), libs[libname], bin_files[kidx]; verbose, subdir = src_name )
349356
350357 if verbose && new_link != = nothing
351358 @info (" Linked library $(libname) has been auto-mapped to $(new_link) " )
@@ -379,7 +386,7 @@ function check_dynamic_linkage(oh, prefix, bin_files;
379386
380387 # If there is an identity mismatch (which only happens on macOS) fix it
381388 if autofix
382- fix_identity_mismatch (prefix, platform, path (oh), oh; verbose= verbose )
389+ fix_identity_mismatch (prefix, platform, path (oh), oh; verbose, subdir = src_name )
383390 end
384391 end
385392 return all_ok
0 commit comments