@@ -10,31 +10,8 @@ if [ -f /etc/alpine-release ]; then
10
10
rc-service qemu-binfmt stop --ifstarted
11
11
fi
12
12
13
- # Mount the rosetta volume for non cloud-init based images
14
- rosetta_interpreter=/mnt/lima-rosetta/rosetta
15
- if [ ! -f " $rosetta_interpreter " ]; then
16
- rosetta_mountpoint=$( dirname " $rosetta_interpreter " )
17
- mkdir -p " $rosetta_mountpoint "
18
-
19
- # Check selinux is enabled by kernel
20
- if [ -d /sys/fs/selinux ]; then
21
- # #########################################################################################
22
- # # When using vz & virtiofs, initially container_file_t selinux label
23
- # # was considered which works perfectly for container work loads
24
- # # but it might break for other work loads if the process is running with
25
- # # different label. Also these are the remote mounts from the host machine,
26
- # # so keeping the label as nfs_t fits right. Package container-selinux by
27
- # # default adds rules for nfs_t context which allows container workloads to work as well.
28
- # # https://github.com/lima-vm/lima/pull/1965
29
- # #########################################################################################
30
- mount -t virtiofs vz-rosetta " $rosetta_mountpoint " -o context=" system_u:object_r:nfs_t:s0"
31
- else
32
- mount -t virtiofs vz-rosetta " $rosetta_mountpoint "
33
- fi
34
- fi
35
-
36
13
if [ " $LIMA_CIDATA_ROSETTA_BINFMT " = " true" ]; then
37
- rosetta_binfmt=" :rosetta:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x3e\x00:\xff\xff\xff\xff\xff\xfe\xfe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:$rosetta_interpreter :OCF"
14
+ rosetta_binfmt=" :rosetta:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x3e\x00:\xff\xff\xff\xff\xff\xfe\xfe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/mnt/lima-rosetta/rosetta :OCF"
38
15
39
16
# If rosetta is not registered in binfmt_misc, register it.
40
17
[ -f /proc/sys/fs/binfmt_misc/rosetta ] || echo " $rosetta_binfmt " > /proc/sys/fs/binfmt_misc/register
0 commit comments