Skip to content

Commit 089165d

Browse files
authored
Merge pull request #177 from rancher-sandbox/qemu-share
Make sure /usr/local/share/qemu symlink is captured
2 parents e866b59 + 30a7148 commit 089165d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

hack/lima-and-qemu.pl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,20 @@
2929
#
3030
# It shows the following binaries from /usr/local are called:
3131

32+
my %deps;
3233
my $install_dir = "/usr/local";
3334
record("$install_dir/bin/limactl");
3435
record("$install_dir/bin/qemu-img");
3536
record("$install_dir/bin/qemu-system-x86_64");
3637

38+
# qemu 6.1.0 doesn't use the symlink to access data files anymore
39+
# but we need to include it because we replace the symlinks in
40+
# /usr/local/bin with the actual files, so data file references need
41+
# to resolve relative to that location too.
42+
my $name = "$install_dir/share/qemu";
43+
# Don't call record($name) because we only want the link, not the whole target directory
44+
$deps{$name} = "" . readlink($name);
45+
3746
# Capture any library and datafiles access with opensnoop
3847
my $opensnoop = "/tmp/opensnoop.log";
3948
END { system("sudo pkill dtrace") }
@@ -64,7 +73,6 @@
6473
record($_);
6574
}
6675

67-
my %deps;
6876
print "$_ $deps{$_}\n" for sort keys %deps;
6977
print "\n";
7078

0 commit comments

Comments
 (0)