Skip to content

Commit

Permalink
Add Debian 12 as main distribution (ocurrent#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
MisterDA authored and tmcgilchrist committed Jun 28, 2023
1 parent b36f059 commit 9192670
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
unreleased
----------

- Add Debian 12 as main distribution. (@MisterDA #172)
- Add OpenSUSE Tumbleweed to Tier 2. (@MisterDA #168 #169)
- Deprecate Fedora 36. (@MisterDA #170)
- Add Alpine 3.18. (@MisterDA #167)
Expand Down
28 changes: 18 additions & 10 deletions src-opam/distro.ml
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ type distro =
| `V3_18 ]
| `Archlinux of [ `Latest ]
| `CentOS of [ `V6 | `V7 | `V8 ]
| `Debian of [ `V11 | `V10 | `V9 | `V8 | `V7 | `Testing | `Unstable ]
| `Debian of [ `V12 | `V11 | `V10 | `V9 | `V8 | `V7 | `Testing | `Unstable ]
| `Fedora of
[ `V21
| `V22
Expand Down Expand Up @@ -337,7 +337,8 @@ type t =
| `Latest ]
| `Archlinux of [ `Latest ]
| `CentOS of [ `V6 | `V7 | `V8 | `Latest ]
| `Debian of [ `V11 | `V10 | `V9 | `V8 | `V7 | `Stable | `Testing | `Unstable ]
| `Debian of
[ `V12 | `V11 | `V10 | `V9 | `V8 | `V7 | `Stable | `Testing | `Unstable ]
| `Fedora of
[ `V21
| `V22
Expand Down Expand Up @@ -453,6 +454,7 @@ let distros : t list =
`CentOS `V7;
`CentOS `V8;
`CentOS `Latest;
`Debian `V12;
`Debian `V11;
`Debian `V10;
`Debian `V9;
Expand Down Expand Up @@ -592,7 +594,7 @@ let resolve_alias (d : t) : distro =
match d with
| `Alpine `Latest -> `Alpine `V3_18
| `CentOS `Latest -> `CentOS `V7
| `Debian `Stable -> `Debian `V11
| `Debian `Stable -> `Debian `V12
| `Fedora `Latest -> `Fedora `V38
| `OracleLinux `Latest -> `OracleLinux `V9
| `OpenSUSE `Latest -> `OpenSUSE `V15_4
Expand All @@ -606,7 +608,7 @@ let resolve_alias (d : t) : distro =
)
| `Archlinux `Latest
| `CentOS (`V6 | `V7 | `V8)
| `Debian (`V7 | `V8 | `V9 | `V10 | `V11 | `Testing | `Unstable)
| `Debian (`V7 | `V8 | `V9 | `V10 | `V11 | `V12 | `Testing | `Unstable)
| `Fedora
( `V21 | `V22 | `V23 | `V24 | `V25 | `V26 | `V27 | `V28 | `V29 | `V30
| `V31 | `V32 | `V33 | `V34 | `V35 | `V36 | `V37 | `V38 )
Expand Down Expand Up @@ -643,8 +645,8 @@ let distro_status (d : t) : status =
| `CentOS `V7 -> `Active `Tier3
| `CentOS (`V6 | `V8) -> `Deprecated
| `Debian (`V7 | `V8 | `V9) -> `Deprecated
| `Debian `V10 -> `Active `Tier2
| `Debian `V11 -> `Active `Tier1
| `Debian (`V10 | `V11) -> `Active `Tier2
| `Debian `V12 -> `Active `Tier1
| `Debian `Testing -> `Active `Tier3
| `Debian `Unstable -> `Active `Tier3
| `Fedora
Expand Down Expand Up @@ -695,9 +697,9 @@ module OV = Ocaml_version
let distro_arches ov (d : t) =
match (resolve_alias d, ov) with
| (`CentOS (`V6 | `V7) | `OracleLinux `V7), ov when OV.major ov >= 5 -> []
| `Debian `V11, ov when OV.(compare Releases.v4_03_0 ov) = -1 ->
| `Debian (`V11 | `V12), ov when OV.(compare Releases.v4_03_0 ov) = -1 ->
[ `I386; `X86_64; `Aarch64; `Aarch32; `Ppc64le; `S390x ]
| `Debian `V11, ov when OV.(compare Releases.v4_02_0 ov) = -1 ->
| `Debian (`V11 | `V12), ov when OV.(compare Releases.v4_02_0 ov) = -1 ->
[ `I386; `X86_64; `Aarch64; `Aarch32 ]
| `Debian `V10, ov when OV.(compare Releases.v4_03_0 ov) = -1 ->
[ `I386; `X86_64; `Aarch64; `Aarch32; `Ppc64le; `S390x ]
Expand Down Expand Up @@ -770,6 +772,7 @@ let builtin_ocaml_of_distro (d : t) : string option =
| `Debian `V9 -> Some "4.02.3"
| `Debian `V10 -> Some "4.05.0"
| `Debian `V11 -> Some "4.11.1"
| `Debian `V12 -> Some "4.13.1"
| `Ubuntu `V12_04 -> Some "3.12.1"
| `Ubuntu `V14_04 -> Some "4.01.0"
| `Ubuntu `V15_04 -> Some "4.01.0"
Expand Down Expand Up @@ -939,6 +942,7 @@ let tag_of_distro (d : t) =
| `Debian `Stable -> "debian-stable"
| `Debian `Unstable -> "debian-unstable"
| `Debian `Testing -> "debian-testing"
| `Debian `V12 -> "debian-12"
| `Debian `V11 -> "debian-11"
| `Debian `V10 -> "debian-10"
| `Debian `V9 -> "debian-9"
Expand Down Expand Up @@ -1035,6 +1039,7 @@ let distro_of_tag x : t option =
| "debian-stable" -> Some (`Debian `Stable)
| "debian-unstable" -> Some (`Debian `Unstable)
| "debian-testing" -> Some (`Debian `Testing)
| "debian-12" -> Some (`Debian `V12)
| "debian-11" -> Some (`Debian `V11)
| "debian-10" -> Some (`Debian `V10)
| "debian-9" -> Some (`Debian `V9)
Expand Down Expand Up @@ -1125,6 +1130,7 @@ let human_readable_string_of_distro (d : t) =
| `Ubuntu `V23_04 -> "Ubuntu 23.04"
| `Debian `Unstable -> "Debian Unstable"
| `Debian `Testing -> "Debian Testing"
| `Debian `V12 -> "Debian 12 (Bookworm)"
| `Debian `V11 -> "Debian 11 (Bullseye)"
| `Debian `V10 -> "Debian 10 (Buster)"
| `Debian `V9 -> "Debian 9 (Stretch)"
Expand Down Expand Up @@ -1261,8 +1267,9 @@ let bubblewrap_version (t : t) =
| `Debian `V9 -> Some (0, 1, 7)
| `Debian `V10 -> Some (0, 3, 1)
| `Debian `V11 -> Some (0, 4, 1)
| `Debian `Testing -> Some (0, 7, 0)
| `Debian `Unstable -> Some (0, 7, 0)
| `Debian `V12 -> Some (0, 8, 0)
| `Debian `Testing -> Some (0, 8, 0)
| `Debian `Unstable -> Some (0, 8, 0)
| `CentOS `V6 -> None
| `CentOS `V7 -> None
| `CentOS `V8 -> Some (0, 4, 0)
Expand Down Expand Up @@ -1358,6 +1365,7 @@ let base_distro_tag ?win10_revision ?(arch = `X86_64) d =
| `V9 -> "9"
| `V10 -> "10"
| `V11 -> "11"
| `V12 -> "12"
| `Testing -> "testing"
| `Unstable -> "unstable"
in
Expand Down
5 changes: 3 additions & 2 deletions src-opam/distro.mli
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ type distro =
| `V3_18 ]
| `Archlinux of [ `Latest ]
| `CentOS of [ `V6 | `V7 | `V8 ]
| `Debian of [ `V11 | `V10 | `V9 | `V8 | `V7 | `Testing | `Unstable ]
| `Debian of [ `V12 | `V11 | `V10 | `V9 | `V8 | `V7 | `Testing | `Unstable ]
| `Fedora of
[ `V21
| `V22
Expand Down Expand Up @@ -183,7 +183,8 @@ type t =
| `Latest ]
| `Archlinux of [ `Latest ]
| `CentOS of [ `V6 | `V7 | `V8 | `Latest ]
| `Debian of [ `V11 | `V10 | `V9 | `V8 | `V7 | `Stable | `Testing | `Unstable ]
| `Debian of
[ `V12 | `V11 | `V10 | `V9 | `V8 | `V7 | `Stable | `Testing | `Unstable ]
| `Fedora of
[ `V21
| `V22
Expand Down

0 comments on commit 9192670

Please sign in to comment.