@@ -56,12 +56,14 @@ if head -c 4 "$(command -v apt-get)" | grep -qP '\x7fELF' >/dev/null 2>&1; then
5656 fi
5757elif command -v dnf > /dev/null 2>&1 ; then
5858 pkgs=" "
59+ extrapkgs=" "
5960 if ! command -v tar > /dev/null 2>&1 ; then
6061 pkgs=" ${pkgs} tar"
6162 fi
6263 if [ " ${LIMA_CIDATA_MOUNTTYPE} " = " reverse-sshfs" ]; then
6364 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"
6567 fi
6668 fi
6769 if [ " ${INSTALL_IPTABLES} " = 1 ] && [ ! -e /usr/sbin/iptables ]; then
@@ -75,8 +77,9 @@ elif command -v dnf >/dev/null 2>&1; then
7577 pkgs=" ${pkgs} fuse3"
7678 fi
7779 fi
78- if [ -n " ${pkgs} " ]; then
80+ if [ -n " ${pkgs} " ] || [ -n " ${extrapkgs} " ] ; then
7981 dnf_install_flags=" -y --setopt=install_weak_deps=False"
82+ epel_install_flags=" "
8083 if grep -q " Oracle Linux Server release 8" /etc/system-release; then
8184 # repo flag instead of enable repo to reduce metadata syncing on slow Oracle repos
8285 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
8689 # shellcheck disable=SC2086
8790 dnf install ${dnf_install_flags} oracle-epel-release-el9
8891 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"
9093 elif grep -q -E " release (9|10)" /etc/system-release; then
9194 # shellcheck disable=SC2086
9295 dnf install ${dnf_install_flags} epel-release
9396 # Disable the OpenH264 repository as well, by default
9497 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}
96107 fi
97- # shellcheck disable=SC2086
98- dnf install ${dnf_install_flags} ${pkgs}
99108 fi
100109 if [ " ${LIMA_CIDATA_CONTAINERD_USER} " = 1 ] && [ ! -e /usr/bin/fusermount ]; then
101110 # Workaround for https://github.com/containerd/stargz-snapshotter/issues/340
0 commit comments