Skip to content

Commit 318de52

Browse files
authored
Merge pull request #245 from mtelvers/patch
Add Windows LTSC 2025 and openSUSE Leap 16.0
2 parents d115bd5 + 42b5cc6 commit 318de52

File tree

4 files changed

+61
-33
lines changed

4 files changed

+61
-33
lines changed

src-opam/distro.ml

Lines changed: 40 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ type distro =
8282
| `V15_4
8383
| `V15_5
8484
| `V15_6
85+
| `V16_0
8586
| `Tumbleweed ]
8687
| `Ubuntu of
8788
[ `V12_04
@@ -110,7 +111,7 @@ type distro =
110111
| `V25_10 ]
111112
| `Cygwin of [ `Ltsc2016 | `Ltsc2019 | `Ltsc2022 ]
112113
| `Windows of [ `Mingw | `Msvc ] * [ `Ltsc2019 ]
113-
| `WindowsServer of [ `Mingw | `Msvc ] * [ `Ltsc2022 ] ]
114+
| `WindowsServer of [ `Mingw | `Msvc ] * [ `Ltsc2022 | `Ltsc2025 ] ]
114115
[@@deriving sexp]
115116

116117
type t =
@@ -186,6 +187,7 @@ type t =
186187
| `V15_4
187188
| `V15_5
188189
| `V15_6
190+
| `V16_0
189191
| `Tumbleweed
190192
| `Latest ]
191193
| `Ubuntu of
@@ -217,7 +219,8 @@ type t =
217219
| `LTS ]
218220
| `Cygwin of [ `Ltsc2016 | `Ltsc2019 | `Ltsc2022 | `Latest ]
219221
| `Windows of [ `Mingw | `Msvc ] * [ `Ltsc2019 | `Latest ]
220-
| `WindowsServer of [ `Mingw | `Msvc ] * [ `Ltsc2022 | `Latest ] ]
222+
| `WindowsServer of [ `Mingw | `Msvc ] * [ `Ltsc2022 | `Ltsc2025 | `Latest ]
223+
]
221224
[@@deriving sexp]
222225

223226
type os_family = [ `Cygwin | `Linux | `Windows ] [@@deriving sexp]
@@ -331,6 +334,7 @@ let distros : t list =
331334
`OpenSUSE `V15_4;
332335
`OpenSUSE `V15_5;
333336
`OpenSUSE `V15_6;
337+
`OpenSUSE `V16_0;
334338
`OpenSUSE `Tumbleweed;
335339
`OpenSUSE `Latest;
336340
`Ubuntu `V12_04;
@@ -368,8 +372,10 @@ let distros : t list =
368372
`Windows (`Msvc, `Ltsc2019);
369373
`Windows (`Msvc, `Latest);
370374
`WindowsServer (`Mingw, `Ltsc2022);
375+
`WindowsServer (`Mingw, `Ltsc2025);
371376
`WindowsServer (`Mingw, `Latest);
372377
`WindowsServer (`Msvc, `Ltsc2022);
378+
`WindowsServer (`Msvc, `Ltsc2025);
373379
`WindowsServer (`Msvc, `Latest);
374380
]
375381

@@ -380,12 +386,12 @@ let resolve_alias (d : t) : distro =
380386
| `Debian `Stable -> `Debian `V13
381387
| `Fedora `Latest -> `Fedora `V43
382388
| `OracleLinux `Latest -> `OracleLinux `V10
383-
| `OpenSUSE `Latest -> `OpenSUSE `V15_6
389+
| `OpenSUSE `Latest -> `OpenSUSE `V16_0
384390
| `Ubuntu `Latest -> `Ubuntu `V25_10
385391
| `Ubuntu `LTS -> `Ubuntu `V24_04
386392
| `Cygwin `Latest -> `Cygwin `Ltsc2022
387393
| `Windows (cc, `Latest) -> `Windows (cc, `Ltsc2019)
388-
| `WindowsServer (cc, `Latest) -> `WindowsServer (cc, `Ltsc2022)
394+
| `WindowsServer (cc, `Latest) -> `WindowsServer (cc, `Ltsc2025)
389395
| ( `Alpine
390396
( `V3_3 | `V3_4 | `V3_5 | `V3_6 | `V3_7 | `V3_8 | `V3_9 | `V3_10
391397
| `V3_11 | `V3_12 | `V3_13 | `V3_14 | `V3_15 | `V3_16 | `V3_17 | `V3_18
@@ -401,15 +407,15 @@ let resolve_alias (d : t) : distro =
401407
| `OracleLinux (`V7 | `V8 | `V9 | `V10)
402408
| `OpenSUSE
403409
( `V42_1 | `V42_2 | `V42_3 | `V15_0 | `V15_1 | `V15_2 | `V15_3 | `V15_4
404-
| `V15_5 | `V15_6 | `Tumbleweed )
410+
| `V15_5 | `V15_6 | `V16_0 | `Tumbleweed )
405411
| `Ubuntu
406412
( `V12_04 | `V14_04 | `V15_04 | `V15_10 | `V16_04 | `V16_10 | `V17_04
407413
| `V17_10 | `V18_04 | `V18_10 | `V19_04 | `V19_10 | `V20_04 | `V20_10
408414
| `V21_04 | `V21_10 | `V22_04 | `V22_10 | `V23_04 | `V23_10 | `V24_04
409415
| `V24_10 | `V25_04 | `V25_10 )
410416
| `Cygwin (`Ltsc2016 | `Ltsc2019 | `Ltsc2022)
411417
| `Windows (_, `Ltsc2019)
412-
| `WindowsServer (_, `Ltsc2022) ) as d ->
418+
| `WindowsServer (_, (`Ltsc2022 | `Ltsc2025)) ) as d ->
413419
d
414420

415421
let distro_status (d : t) : status =
@@ -426,25 +432,24 @@ let distro_status (d : t) : status =
426432
| `Archlinux `Latest -> `Active `Tier3
427433
| `CentOS (`V9 | `V10) -> `Active `Tier3
428434
| `CentOS (`V6 | `V7 | `V8) -> `Deprecated
429-
| `Debian (`V7 | `V8 | `V9 | `V10) -> `Deprecated
430-
| `Debian `V11 -> `Active `Tier2
435+
| `Debian (`V7 | `V8 | `V9 | `V10 | `V11) -> `Deprecated
431436
| `Debian `V12 -> `Active `Tier2
432437
| `Debian `V13 -> `Active `Tier1
433438
| `Debian `Testing -> `Active `Tier3
434439
| `Debian `Unstable -> `Active `Tier3
435440
| `Fedora
436441
( `V21 | `V22 | `V23 | `V24 | `V25 | `V26 | `V27 | `V28 | `V29 | `V30
437-
| `V31 | `V32 | `V33 | `V34 | `V35 | `V36 | `V37 | `V38 | `V39 | `V40 )
438-
->
442+
| `V31 | `V32 | `V33 | `V34 | `V35 | `V36 | `V37 | `V38 | `V39 | `V40
443+
| `V41 ) ->
439444
`Deprecated
440-
| `Fedora (`V41 | `V42 | `V43) -> `Active `Tier2
441-
| `OracleLinux `V7 -> `Deprecated
442-
| `OracleLinux (`V8 | `V9 | `V10) -> `Active `Tier3
445+
| `Fedora (`V42 | `V43) -> `Active `Tier2
446+
| `OracleLinux (`V7 | `V8 | `V9) -> `Deprecated
447+
| `OracleLinux `V10 -> `Active `Tier3
443448
| `OpenSUSE
444449
( `V42_1 | `V42_2 | `V42_3 | `V15_0 | `V15_1 | `V15_2 | `V15_3 | `V15_4
445450
| `V15_5 ) ->
446451
`Deprecated
447-
| `OpenSUSE `V15_6 -> `Active `Tier2
452+
| `OpenSUSE (`V15_6 | `V16_0) -> `Active `Tier2
448453
| `OpenSUSE `Tumbleweed -> `Active `Tier2
449454
| `Ubuntu (`V22_04 | `V24_04 | `V25_04 | `V25_10) -> `Active `Tier2
450455
| `Ubuntu
@@ -455,7 +460,7 @@ let distro_status (d : t) : status =
455460
| `Cygwin (`Ltsc2016 | `Ltsc2019) -> `Deprecated
456461
| `Cygwin `Ltsc2022 -> `Active `Tier3
457462
| `Windows (_, `Ltsc2019) -> `Active `Tier3
458-
| `WindowsServer (_, `Ltsc2022) -> `Active `Tier3
463+
| `WindowsServer (_, (`Ltsc2022 | `Ltsc2025)) -> `Active `Tier3
459464

460465
let latest_distros =
461466
[
@@ -512,18 +517,21 @@ let distro_arches ov (d : t) =
512517
[ `X86_64; `Aarch64; `Ppc64le; `S390x ]
513518
| ( `Ubuntu
514519
( `V20_04 | `V20_10 | `V21_04 | `V21_10 | `V22_04 | `V22_10 | `V23_04
515-
| `V23_10 | `V24_04 | `V24_10 | `V25_04 | `V25_10 ),
520+
| `V23_10 | `V24_04 | `V24_10 | `V25_04 ),
516521
ov )
517522
when OV.(compare Releases.v4_05_0 ov) = -1 ->
518523
let base = [ `X86_64; `Aarch64; `Ppc64le; `S390x ] in
519524
if OV.(compare Releases.v4_11_0 ov) <= 0 then `Riscv64 :: base else base
525+
| `Ubuntu `V25_10, ov when OV.(compare Releases.v4_05_0 ov) = -1 ->
526+
(* Ubuntu 25.10's Only Supported RISC-V Platform is QEMU Virtualization *)
527+
[ `X86_64; `Aarch64; `Ppc64le; `S390x ]
520528
| ( `Fedora
521529
( `V33 | `V34 | `V35 | `V36 | `V37 | `V38 | `V39 | `V40 | `V41 | `V42
522530
| `V43 ),
523531
ov )
524532
when OV.(compare Releases.v4_08_0 ov) = -1 ->
525533
[ `X86_64; `Aarch64 ]
526-
| `OpenSUSE (`V15_4 | `V15_5 | `V15_6), ov
534+
| `OpenSUSE (`V15_4 | `V15_5 | `V15_6 | `V16_0), ov
527535
when OV.(compare Releases.v4_02_0 ov) = -1 ->
528536
[ `X86_64; `Aarch64 ]
529537
(* OCaml for Windows doesn't package OCaml 5.0.
@@ -665,6 +673,7 @@ let builtin_ocaml_of_distro (d : t) : string option =
665673
| `OpenSUSE `V15_4 -> Some "4.05.0"
666674
| `OpenSUSE `V15_5 -> Some "4.05.0"
667675
| `OpenSUSE `V15_6 -> Some "4.14.2"
676+
| `OpenSUSE `V16_0 -> Some "4.14.2"
668677
| `OpenSUSE `Tumbleweed -> Some "4.14.1"
669678
| `OracleLinux `V7 -> Some "4.01.0"
670679
| `OracleLinux `V8 -> Some "4.07.0"
@@ -781,6 +790,7 @@ let tag_of_distro (d : t) =
781790
| `OpenSUSE `V15_4 -> "opensuse-15.4"
782791
| `OpenSUSE `V15_5 -> "opensuse-15.5"
783792
| `OpenSUSE `V15_6 -> "opensuse-15.6"
793+
| `OpenSUSE `V16_0 -> "opensuse-16.0"
784794
| `OpenSUSE `Tumbleweed -> "opensuse-tumbleweed"
785795
| `OpenSUSE `Latest -> "opensuse"
786796
| `Cygwin `Ltsc2016 -> "cygwin-2016"
@@ -792,8 +802,10 @@ let tag_of_distro (d : t) =
792802
| `Windows (`Msvc, `Ltsc2019) -> "windows-msvc-ltsc2019"
793803
| `Windows (`Msvc, `Latest) -> "windows-msvc"
794804
| `WindowsServer (`Mingw, `Ltsc2022) -> "windows-server-mingw-ltsc2022"
805+
| `WindowsServer (`Mingw, `Ltsc2025) -> "windows-server-mingw-ltsc2025"
795806
| `WindowsServer (`Mingw, `Latest) -> "windows-server-mingw"
796807
| `WindowsServer (`Msvc, `Ltsc2022) -> "windows-server-msvc-ltsc2022"
808+
| `WindowsServer (`Msvc, `Ltsc2025) -> "windows-server-msvc-ltsc2025"
797809
| `WindowsServer (`Msvc, `Latest) -> "windows-server-msvc"
798810

799811
let distro_of_tag x : t option =
@@ -900,6 +912,7 @@ let distro_of_tag x : t option =
900912
| "opensuse-15.4" -> Some (`OpenSUSE `V15_4)
901913
| "opensuse-15.5" -> Some (`OpenSUSE `V15_5)
902914
| "opensuse-15.6" -> Some (`OpenSUSE `V15_6)
915+
| "opensuse-16.0" -> Some (`OpenSUSE `V16_0)
903916
| "opensuse-tumbleweed" -> Some (`OpenSUSE `Tumbleweed)
904917
| "opensuse" -> Some (`OpenSUSE `Latest)
905918
| "cygwin-ltsc2016" -> Some (`Cygwin `Ltsc2016)
@@ -911,8 +924,10 @@ let distro_of_tag x : t option =
911924
| "windows-msvc-ltsc2019" -> Some (`Windows (`Msvc, `Ltsc2019))
912925
| "windows-msvc" -> Some (`Windows (`Msvc, `Latest))
913926
| "windows-server-mingw-ltsc2022" -> Some (`WindowsServer (`Mingw, `Ltsc2022))
927+
| "windows-server-mingw-ltsc2025" -> Some (`WindowsServer (`Mingw, `Ltsc2025))
914928
| "windows-server-mingw" -> Some (`WindowsServer (`Mingw, `Latest))
915929
| "windows-server-msvc-ltsc2022" -> Some (`WindowsServer (`Msvc, `Ltsc2022))
930+
| "windows-server-msvc-ltsc2025" -> Some (`WindowsServer (`Msvc, `Ltsc2025))
916931
| "windows-server-msvc" -> Some (`WindowsServer (`Msvc, `Latest))
917932
| _ -> None
918933

@@ -1016,14 +1031,17 @@ let human_readable_string_of_distro (d : t) =
10161031
| `OpenSUSE `V15_4 -> "OpenSUSE 15.4 (Leap)"
10171032
| `OpenSUSE `V15_5 -> "OpenSUSE 15.5 (Leap)"
10181033
| `OpenSUSE `V15_6 -> "OpenSUSE 15.6 (Leap)"
1034+
| `OpenSUSE `V16_0 -> "OpenSUSE 16.0 (Leap)"
10191035
| `OpenSUSE `Tumbleweed -> "OpenSUSE Tumbleweed"
10201036
| `Cygwin `Ltsc2016 -> "Cygwin Ltsc2016"
10211037
| `Cygwin `Ltsc2019 -> "Cygwin Ltsc2019"
10221038
| `Cygwin `Ltsc2022 -> "Cygwin Ltsc2022"
10231039
| `Windows (`Mingw, `Ltsc2019) -> "Windows Ltsc2019 mingw"
10241040
| `Windows (`Msvc, `Ltsc2019) -> "Windows Ltsc2019 msvc"
10251041
| `WindowsServer (`Mingw, `Ltsc2022) -> "Windows Server Ltsc2022 mingw"
1042+
| `WindowsServer (`Mingw, `Ltsc2025) -> "Windows Server Ltsc2025 mingw"
10261043
| `WindowsServer (`Msvc, `Ltsc2022) -> "Windows Server Ltsc2022 msvc"
1044+
| `WindowsServer (`Msvc, `Ltsc2025) -> "Windows Server Ltsc2025 msvc"
10271045

10281046
let human_readable_short_string_of_distro (t : t) =
10291047
match t with
@@ -1178,6 +1196,7 @@ let bubblewrap_version (t : t) =
11781196
| `OpenSUSE `V15_4 -> Some (0, 4, 1)
11791197
| `OpenSUSE `V15_5 -> Some (0, 7, 0)
11801198
| `OpenSUSE `V15_6 -> Some (0, 8, 0)
1199+
| `OpenSUSE `V16_0 -> Some (0, 11, 0)
11811200
| `OpenSUSE `Tumbleweed -> Some (0, 8, 0)
11821201
| `Cygwin _ -> None
11831202
| `Windows _ -> None
@@ -1317,6 +1336,7 @@ let base_distro_tag ?(arch = `X86_64) d =
13171336
| `V15_4 -> "15.4"
13181337
| `V15_5 -> "15.5"
13191338
| `V15_6 -> "15.6"
1339+
| `V16_0 -> "16.0"
13201340
| `Tumbleweed -> assert false
13211341
in
13221342
("opensuse/leap", tag)
@@ -1332,7 +1352,9 @@ let base_distro_tag ?(arch = `X86_64) d =
13321352
let tag = match v with _, `Ltsc2019 -> "ltsc2019" in
13331353
("mcr.microsoft.com/windows", tag)
13341354
| `WindowsServer v ->
1335-
let tag = match v with _, `Ltsc2022 -> "ltsc2022" in
1355+
let tag =
1356+
match v with _, `Ltsc2022 -> "ltsc2022" | _, `Ltsc2025 -> "ltsc2025"
1357+
in
13361358
("mcr.microsoft.com/windows/server", tag)
13371359

13381360
let compare a b =

src-opam/distro.mli

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ type distro =
8383
| `V15_4
8484
| `V15_5
8585
| `V15_6
86+
| `V16_0
8687
| `Tumbleweed ]
8788
| `Ubuntu of
8889
[ `V12_04
@@ -111,7 +112,7 @@ type distro =
111112
| `V25_10 ]
112113
| `Cygwin of [ `Ltsc2016 | `Ltsc2019 | `Ltsc2022 ]
113114
| `Windows of [ `Mingw | `Msvc ] * [ `Ltsc2019 ]
114-
| `WindowsServer of [ `Mingw | `Msvc ] * [ `Ltsc2022 ] ]
115+
| `WindowsServer of [ `Mingw | `Msvc ] * [ `Ltsc2022 | `Ltsc2025 ] ]
115116
[@@deriving sexp]
116117

117118
type t =
@@ -187,6 +188,7 @@ type t =
187188
| `V15_4
188189
| `V15_5
189190
| `V15_6
191+
| `V16_0
190192
| `Tumbleweed
191193
| `Latest ]
192194
| `Ubuntu of
@@ -218,7 +220,8 @@ type t =
218220
| `LTS ]
219221
| `Cygwin of [ `Ltsc2016 | `Ltsc2019 | `Ltsc2022 | `Latest ]
220222
| `Windows of [ `Mingw | `Msvc ] * [ `Ltsc2019 | `Latest ]
221-
| `WindowsServer of [ `Mingw | `Msvc ] * [ `Ltsc2022 | `Latest ] ]
223+
| `WindowsServer of [ `Mingw | `Msvc ] * [ `Ltsc2022 | `Ltsc2025 | `Latest ]
224+
]
222225
[@@deriving sexp]
223226

224227
type os_family = [ `Cygwin | `Linux | `Windows ] [@@deriving sexp]

src-opam/linux.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ module RPM = struct
5151

5252
let dev_packages ?extra () =
5353
install
54-
"sudo passwd bzip2 unzip patch rsync nano gcc-c++ git tar curl xz \
54+
"sudo passwd bzip2 unzip patch rsync nano gcc-c++ git tar xz \
5555
libX11-devel which m4 gawk diffutils findutils%s"
5656
(match extra with None -> "" | Some x -> " " ^ x)
5757

src-opam/opam.ml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -390,15 +390,16 @@ let apt_opam2 ?(labels = []) ?arch distro ~opam_hashes () =
390390
[yum_workaround] activates the overlay/yum workaround needed
391391
for older versions of yum as found in CentOS 7 and earlier
392392
393-
[enable_powertools] enables the PowerTools repository on CentOS 8 and above.
393+
[powertools_repo] enables the PowerTools/CRB repository on CentOS 8 and above.
394394
This is needed to get most of *-devel packages frequently used by opam packages.
395+
The repository name is "powertools" for CentOS 8 and "crb" for CentOS 9+.
395396
396397
[dnf_version] version of DNF tool installed which affects the syntax of groupinstall.
397398
398399
[c_devtools_libs] is the name of the package group e.g. "C Development Tools and Libraries" on Fedora, or
399400
otherwise "Development Tools". *)
400-
let yum_opam2 ?(labels = []) ?arch ~yum_workaround ~enable_powertools
401-
~dnf_version ~c_devtools_libs ~opam_hashes distro () =
401+
let yum_opam2 ?(labels = []) ?arch ~yum_workaround ~powertools_repo ~dnf_version
402+
~c_devtools_libs ~opam_hashes distro () =
402403
let opam_master_hash, opam_branches = create_opam_branches opam_hashes in
403404
let workaround =
404405
if yum_workaround then
@@ -411,7 +412,7 @@ let yum_opam2 ?(labels = []) ?arch ~yum_workaround ~enable_powertools
411412
@@ workaround @@ Linux.RPM.update
412413
@@ Linux.RPM.groupinstall dnf_version c_devtools_libs
413414
@@ Linux.RPM.install
414-
"git patch unzip which tar curl xz libcap-devel openssl sudo bzip2 gawk"
415+
"git patch unzip which tar xz libcap-devel openssl sudo bzip2 gawk"
415416
@@ Linux.Git.init ()
416417
@@ maybe_build_bubblewrap_from_source distro
417418
@@ install_opams ~prefix:"/usr" opam_master_hash opam_branches
@@ -421,9 +422,10 @@ let yum_opam2 ?(labels = []) ?arch ~yum_workaround ~enable_powertools
421422
@@ Linux.RPM.groupinstall dnf_version c_devtools_libs
422423
@@ bubblewrap_and_dev_packages distro
423424
@@ copy_opams ~src:"/usr/bin" ~dst:"/usr/bin" opam_branches
424-
@@ (if enable_powertools then
425-
run "yum config-manager --set-enabled powertools" @@ Linux.RPM.update
426-
else empty)
425+
@@ (match powertools_repo with
426+
| Some repo ->
427+
run "dnf config-manager --set-enabled %s" repo @@ Linux.RPM.update
428+
| None -> empty)
427429
@@ run
428430
"sed -i.bak '/LC_TIME LC_ALL LANGUAGE/aDefaults env_keep += \
429431
\"OPAMYES OPAMJOBS OPAMVERBOSE\"' /etc/sudoers"
@@ -565,11 +567,12 @@ let gen_opam2_distro ?override_tag ?(clone_opam_repo = true) ?arch ?labels
565567
| `Apt -> apt_opam2 ?labels ?arch ~opam_hashes d ()
566568
| `Yum ->
567569
let yum_workaround = match d with `CentOS `V7 -> true | _ -> false in
568-
let enable_powertools =
570+
let powertools_repo =
569571
match d with
570-
| `CentOS (`V6 | `V7) -> false
571-
| `CentOS _ -> true
572-
| _ -> false
572+
| `CentOS (`V6 | `V7) -> None
573+
| `CentOS `V8 -> Some "powertools"
574+
| `CentOS _ -> Some "crb"
575+
| _ -> None
573576
in
574577
let (dnf_version, c_devtools_libs) : int * (t, unit, string, t) format4
575578
=
@@ -582,7 +585,7 @@ let gen_opam2_distro ?override_tag ?(clone_opam_repo = true) ?arch ?labels
582585
| `Fedora _ -> (5, {|"c-development"|})
583586
| _ -> (3, {|"Development Tools"|})
584587
in
585-
yum_opam2 ?labels ?arch ~yum_workaround ~enable_powertools ~dnf_version
588+
yum_opam2 ?labels ?arch ~yum_workaround ~powertools_repo ~dnf_version
586589
~c_devtools_libs ~opam_hashes d ()
587590
| `Zypper -> zypper_opam2 ?labels ?arch ~opam_hashes d ()
588591
| `Pacman -> pacman_opam2 ?labels ?arch ~opam_hashes d ()

0 commit comments

Comments
 (0)