Skip to content

Commit dce57ae

Browse files
authored
Merge pull request #4236 from valdela1/add_ol10
add Oracle Linux 10 support
2 parents fd04bd2 + ca8a41c commit dce57ae

File tree

6 files changed

+33
-3
lines changed

6 files changed

+33
-3
lines changed

hack/update-template-oraclelinux.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,18 @@ Description:
2727
2828
Published Oracle Linux image information is fetched from the following URLs:
2929
30-
OL8:
30+
OL8:
3131
x86_64: https://yum.oracle.com/templates/OracleLinux/ol8-template.json
3232
aarch64: https://yum.oracle.com/templates/OracleLinux/ol8_aarch64-cloud-template.json
3333
3434
OL9:
3535
x86_64: https://yum.oracle.com/templates/OracleLinux/ol9-template.json
3636
aarch64: https://yum.oracle.com/templates/OracleLinux/ol9_aarch64-cloud-template.json
3737
38+
OL10:
39+
x86_64: https://yum.oracle.com/templates/OracleLinux/ol10-template.json
40+
aarch64: https://yum.oracle.com/templates/OracleLinux/ol10_aarch64-cloud-template.json
41+
3842
The downloaded files will be cached in the Lima cache directory.
3943
4044
Examples:

pkg/cidata/cidata.TEMPLATE.d/boot/30-install-packages.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,15 @@ elif command -v dnf >/dev/null 2>&1; then
102102
dnf install ${dnf_install_flags} oracle-epel-release-el9
103103
dnf config-manager --disable ol9_developer_EPEL >/dev/null 2>&1
104104
epel_install_flags="${epel_install_flags} --enablerepo ol9_developer_EPEL"
105+
elif grep -q "Oracle Linux Server release 10" /etc/system-release; then
106+
oraclelinux_version="$(awk '{print $5}' /etc/system-release)"
107+
oraclelinux_version_major=$(echo "$oraclelinux_version" | cut -d. -f1)
108+
oraclelinux_version_minor=$(echo "$oraclelinux_version" | cut -d. -f2)
109+
oraclelinux_epel_repo="ol${oraclelinux_version_major}_u${oraclelinux_version_minor}_developer_EPEL"
110+
# shellcheck disable=SC2086
111+
dnf install ${dnf_install_flags} oracle-epel-release-el${oraclelinux_version_major}
112+
dnf config-manager --disable "$oraclelinux_epel_repo" >/dev/null 2>&1 || true
113+
epel_install_flags="${epel_install_flags} --enablerepo $oraclelinux_epel_repo"
105114
elif grep -q -E "release (9|10)" /etc/system-release; then
106115
# shellcheck disable=SC2086
107116
dnf install ${dnf_install_flags} epel-release

templates/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ Distro:
2727
- [`opensuse-leap-15`](./opensuse-leap-15.yaml): openSUSE Leap 15
2828
- [`opensuse-leap-16`](./opensuse-leap-16.yaml), `opensuse-leap.yaml`, `opensuse.yaml`: ⭐openSUSE Leap 16
2929
- [`oraclelinux-8`](./oraclelinux-8.yaml): Oracle Linux 8
30-
- [`oraclelinux-9`](./oraclelinux-9.yaml), `oraclelinux.yaml`: Oracle Linux 9
30+
- [`oraclelinux-9`](./oraclelinux-9.yaml): Oracle Linux 9
31+
- [`oraclelinux-10`](./oraclelinux-10.yaml), `oraclelinux.yaml`: Oracle Linux 10
3132
- [`rocky-8`](./rocky-8.yaml): Rocky Linux 8
3233
- [`rocky-9`](./rocky-9.yaml): Rocky Linux 9
3334
- [`rocky-10`](./rocky-10.yaml), `rocky.yaml`: Rocky Linux 10
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Oracle image license: https://www.oracle.com/downloads/licenses/oracle-linux-license.html
2+
# Image source: https://yum.oracle.com/oracle-linux-templates.html
3+
4+
images:
5+
- location: "https://yum.oracle.com/templates/OracleLinux/OL10/u0/x86_64/OL10U0_x86_64-kvm-b266.qcow2"
6+
arch: "x86_64"
7+
digest: "sha256:f88b0f73a5a48cbcb23a72cae33c93847c10fd183de6527ddf1ae807a84ca19e"
8+
- location: "https://yum.oracle.com/templates/OracleLinux/OL10/u0/aarch64/OL10U0_aarch64-kvm-cloud-b143.qcow2"
9+
arch: "aarch64"
10+
digest: "sha256:cd6c154d08c61630160791ba247a0fc61a613dd7c5addec8b91672252fe49ed2"
11+
mountTypesUnsupported: [9p]

templates/oraclelinux-10.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
minimumLimaVersion: 1.1.0
2+
3+
base:
4+
- template://_images/oraclelinux-10
5+
- template://_default/mounts

templates/oraclelinux.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
oraclelinux-9.yaml
1+
oraclelinux-10.yaml

0 commit comments

Comments
 (0)