diff --git a/hack/update-template-oraclelinux.sh b/hack/update-template-oraclelinux.sh index 065311e69b0..8997da2a0db 100755 --- a/hack/update-template-oraclelinux.sh +++ b/hack/update-template-oraclelinux.sh @@ -27,7 +27,7 @@ Description: Published Oracle Linux image information is fetched from the following URLs: - OL8: + OL8: x86_64: https://yum.oracle.com/templates/OracleLinux/ol8-template.json aarch64: https://yum.oracle.com/templates/OracleLinux/ol8_aarch64-cloud-template.json @@ -35,6 +35,10 @@ Description: x86_64: https://yum.oracle.com/templates/OracleLinux/ol9-template.json aarch64: https://yum.oracle.com/templates/OracleLinux/ol9_aarch64-cloud-template.json + OL10: + x86_64: https://yum.oracle.com/templates/OracleLinux/ol10-template.json + aarch64: https://yum.oracle.com/templates/OracleLinux/ol10_aarch64-cloud-template.json + The downloaded files will be cached in the Lima cache directory. Examples: diff --git a/pkg/cidata/cidata.TEMPLATE.d/boot/30-install-packages.sh b/pkg/cidata/cidata.TEMPLATE.d/boot/30-install-packages.sh index a274b0a075e..eb145182e76 100644 --- a/pkg/cidata/cidata.TEMPLATE.d/boot/30-install-packages.sh +++ b/pkg/cidata/cidata.TEMPLATE.d/boot/30-install-packages.sh @@ -102,6 +102,15 @@ elif command -v dnf >/dev/null 2>&1; then dnf install ${dnf_install_flags} oracle-epel-release-el9 dnf config-manager --disable ol9_developer_EPEL >/dev/null 2>&1 epel_install_flags="${epel_install_flags} --enablerepo ol9_developer_EPEL" + elif grep -q "Oracle Linux Server release 10" /etc/system-release; then + oraclelinux_version="$(awk '{print $5}' /etc/system-release)" + oraclelinux_version_major=$(echo "$oraclelinux_version" | cut -d. -f1) + oraclelinux_version_minor=$(echo "$oraclelinux_version" | cut -d. -f2) + oraclelinux_epel_repo="ol${oraclelinux_version_major}_u${oraclelinux_version_minor}_developer_EPEL" + # shellcheck disable=SC2086 + dnf install ${dnf_install_flags} oracle-epel-release-el${oraclelinux_version_major} + dnf config-manager --disable "$oraclelinux_epel_repo" >/dev/null 2>&1 || true + epel_install_flags="${epel_install_flags} --enablerepo $oraclelinux_epel_repo" elif grep -q -E "release (9|10)" /etc/system-release; then # shellcheck disable=SC2086 dnf install ${dnf_install_flags} epel-release diff --git a/templates/README.md b/templates/README.md index 513657eb3e4..525294de73c 100644 --- a/templates/README.md +++ b/templates/README.md @@ -27,7 +27,8 @@ Distro: - [`opensuse-leap-15`](./opensuse-leap-15.yaml): openSUSE Leap 15 - [`opensuse-leap-16`](./opensuse-leap-16.yaml), `opensuse-leap.yaml`, `opensuse.yaml`: ⭐openSUSE Leap 16 - [`oraclelinux-8`](./oraclelinux-8.yaml): Oracle Linux 8 -- [`oraclelinux-9`](./oraclelinux-9.yaml), `oraclelinux.yaml`: Oracle Linux 9 +- [`oraclelinux-9`](./oraclelinux-9.yaml): Oracle Linux 9 +- [`oraclelinux-10`](./oraclelinux-10.yaml), `oraclelinux.yaml`: Oracle Linux 10 - [`rocky-8`](./rocky-8.yaml): Rocky Linux 8 - [`rocky-9`](./rocky-9.yaml): Rocky Linux 9 - [`rocky-10`](./rocky-10.yaml), `rocky.yaml`: Rocky Linux 10 diff --git a/templates/_images/oraclelinux-10.yaml b/templates/_images/oraclelinux-10.yaml new file mode 100644 index 00000000000..504bea901f9 --- /dev/null +++ b/templates/_images/oraclelinux-10.yaml @@ -0,0 +1,11 @@ +# Oracle image license: https://www.oracle.com/downloads/licenses/oracle-linux-license.html +# Image source: https://yum.oracle.com/oracle-linux-templates.html + +images: +- location: "https://yum.oracle.com/templates/OracleLinux/OL10/u0/x86_64/OL10U0_x86_64-kvm-b266.qcow2" + arch: "x86_64" + digest: "sha256:f88b0f73a5a48cbcb23a72cae33c93847c10fd183de6527ddf1ae807a84ca19e" +- location: "https://yum.oracle.com/templates/OracleLinux/OL10/u0/aarch64/OL10U0_aarch64-kvm-cloud-b143.qcow2" + arch: "aarch64" + digest: "sha256:cd6c154d08c61630160791ba247a0fc61a613dd7c5addec8b91672252fe49ed2" +mountTypesUnsupported: [9p] diff --git a/templates/oraclelinux-10.yaml b/templates/oraclelinux-10.yaml new file mode 100644 index 00000000000..5b53adf4175 --- /dev/null +++ b/templates/oraclelinux-10.yaml @@ -0,0 +1,5 @@ +minimumLimaVersion: 1.1.0 + +base: +- template://_images/oraclelinux-10 +- template://_default/mounts diff --git a/templates/oraclelinux.yaml b/templates/oraclelinux.yaml index ac8a02c1587..f0bba402e31 120000 --- a/templates/oraclelinux.yaml +++ b/templates/oraclelinux.yaml @@ -1 +1 @@ -oraclelinux-9.yaml \ No newline at end of file +oraclelinux-10.yaml \ No newline at end of file