@@ -56,12 +56,14 @@ if head -c 4 "$(command -v apt-get)" | grep -qP '\x7fELF' >/dev/null 2>&1; then
56
56
fi
57
57
elif command -v dnf > /dev/null 2>&1 ; then
58
58
pkgs=" "
59
+ extrapkgs=" "
59
60
if ! command -v tar > /dev/null 2>&1 ; then
60
61
pkgs=" ${pkgs} tar"
61
62
fi
62
63
if [ " ${LIMA_CIDATA_MOUNTTYPE} " = " reverse-sshfs" ]; then
63
64
if [ " ${LIMA_CIDATA_MOUNTS} " -gt 0 ] && ! command -v sshfs > /dev/null 2>&1 ; then
64
- pkgs=" ${pkgs} fuse-sshfs"
65
+ # fuse-sshfs is not included in EL
66
+ extrapkgs=" ${extrapkgs} fuse-sshfs"
65
67
fi
66
68
fi
67
69
if [ " ${INSTALL_IPTABLES} " = 1 ] && [ ! -e /usr/sbin/iptables ]; then
@@ -75,8 +77,9 @@ elif command -v dnf >/dev/null 2>&1; then
75
77
pkgs=" ${pkgs} fuse3"
76
78
fi
77
79
fi
78
- if [ -n " ${pkgs} " ]; then
80
+ if [ -n " ${pkgs} " ] || [ -n " ${extrapkgs} " ] ; then
79
81
dnf_install_flags=" -y --setopt=install_weak_deps=False"
82
+ epel_install_flags=" "
80
83
if grep -q " Oracle Linux Server release 8" /etc/system-release; then
81
84
# repo flag instead of enable repo to reduce metadata syncing on slow Oracle repos
82
85
dnf_install_flags=" ${dnf_install_flags} --repo ol8_baseos_latest --repo ol8_codeready_builder"
@@ -86,16 +89,22 @@ elif command -v dnf >/dev/null 2>&1; then
86
89
# shellcheck disable=SC2086
87
90
dnf install ${dnf_install_flags} oracle-epel-release-el9
88
91
dnf config-manager --disable ol9_developer_EPEL > /dev/null 2>&1
89
- dnf_install_flags =" ${dnf_install_flags } --enablerepo ol9_developer_EPEL"
92
+ epel_install_flags =" ${epel_install_flags } --enablerepo ol9_developer_EPEL"
90
93
elif grep -q -E " release (9|10)" /etc/system-release; then
91
94
# shellcheck disable=SC2086
92
95
dnf install ${dnf_install_flags} epel-release
93
96
# Disable the OpenH264 repository as well, by default
94
97
dnf config-manager --disable epel\* > /dev/null 2>&1
95
- dnf_install_flags=" ${dnf_install_flags} --enablerepo epel"
98
+ epel_install_flags=" ${epel_install_flags} --enablerepo epel"
99
+ fi
100
+ if [ -n " ${pkgs} " ]; then
101
+ # shellcheck disable=SC2086
102
+ dnf install ${dnf_install_flags} ${pkgs}
103
+ fi
104
+ if [ -n " ${extrapkgs} " ]; then
105
+ # shellcheck disable=SC2086
106
+ dnf install ${dnf_install_flags} ${epel_install_flags} ${extrapkgs}
96
107
fi
97
- # shellcheck disable=SC2086
98
- dnf install ${dnf_install_flags} ${pkgs}
99
108
fi
100
109
if [ " ${LIMA_CIDATA_CONTAINERD_USER} " = 1 ] && [ ! -e /usr/bin/fusermount ]; then
101
110
# Workaround for https://github.com/containerd/stargz-snapshotter/issues/340
0 commit comments