Skip to content

Commit

Permalink
Add ARMv7hf Raspbian distro (Wheezy and Jessie)
Browse files Browse the repository at this point in the history
  • Loading branch information
avsm committed Mar 10, 2016
1 parent c79b46b commit f49d4c3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Add `distro_of_tag` and `generate_dockerfile` to `Dockerfile_distro`.
* Add `nano` to images to satisfy `opam pin` going interactive.
* Also include `4.03.0` flambda build.
* Add ARMv7hf Raspbian distro (Wheezy and Jessie).

1.2.0:
* Add `dev-repo` metadata to OPAM file.
Expand Down
16 changes: 13 additions & 3 deletions lib/dockerfile_distro.ml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ type t = [
| `Alpine of [ `V3_3 ]
| `CentOS of [ `V6 | `V7 ]
| `Debian of [ `V9 | `V8 | `V7 | `Stable | `Testing | `Unstable ]
| `Raspbian of [ `V8 | `V7 ]
| `Fedora of [ `V21 | `V22 | `V23 ]
| `OracleLinux of [ `V7 ]
| `Ubuntu of [ `V12_04 | `V14_04 | `V15_04 | `V15_10 | `V16_04 ]
Expand All @@ -31,6 +32,7 @@ type t = [
let distros = [ (`Ubuntu `V12_04); (`Ubuntu `V14_04); (`Ubuntu `V15_10); (`Ubuntu `V16_04);
(`Debian `Stable); (`Debian `Testing); (`Debian `Unstable);
(`Debian `V9); (`Debian `V8); (`Debian `V7);
(`Raspbian `V8); (`Raspbian `V7);
(`Fedora `V22); (`Fedora `V23);
(`CentOS `V6); (`CentOS `V7);
(`OracleLinux `V7);
Expand All @@ -48,10 +50,10 @@ let latest_opam_version = "1.2.2"

(* The distro-supplied version of OCaml *)
let builtin_ocaml_of_distro = function
|`Debian (`Stable |`V8) -> Some "4.01.0"
|`Debian (`Stable |`V8) | `Raspbian `V8 -> Some "4.01.0"
|`Debian `Testing -> Some "4.02.3"
|`Debian (`Unstable | `V9) -> Some "4.02.3"
|`Debian `V7 -> Some "3.12.1"
|`Debian `V7 | `Raspbian `V7-> Some "3.12.1"
|`Ubuntu `V12_04 -> Some "3.12.1"
|`Ubuntu `V14_04 -> Some "4.01.0"
|`Ubuntu `V15_04 -> Some "4.01.0"
Expand All @@ -78,6 +80,8 @@ let tag_of_distro = function
|`Debian `V9 -> "debian-9"
|`Debian `V8 -> "debian-8"
|`Debian `V7 -> "debian-7"
|`Raspbian `V7 -> "raspbian-7"
|`Raspbian `V8 -> "raspbian-8"
|`CentOS `V6 -> "centos-6"
|`CentOS `V7 -> "centos-7"
|`Fedora `V21 -> "fedora-21"
Expand All @@ -98,6 +102,8 @@ let distro_of_tag = function
|"debian-9" -> Some (`Debian `V9)
|"debian-8" -> Some (`Debian `V8)
|"debian-7" -> Some (`Debian `V7)
|"raspbian-8" -> Some (`Raspbian `V8)
|"raspbian-7" -> Some (`Raspbian `V7)
|"centos-6" -> Some (`CentOS `V6)
|"centos-7" -> Some (`CentOS `V7)
|"fedora-21" -> Some (`Fedora `V21)
Expand All @@ -119,6 +125,8 @@ let human_readable_string_of_distro = function
|`Debian `V9 -> "Debian 9 (Stretch)"
|`Debian `V8 -> "Debian 8 (Jessie)"
|`Debian `V7 -> "Debian 7 (Wheezy)"
|`Raspbian `V8 -> "Raspbian 8 (Jessie)"
|`Raspbian `V7 -> "Raspbian 7 (Wheezy)"
|`CentOS `V6 -> "CentOS 6"
|`CentOS `V7 -> "CentOS 7"
|`Fedora `V21 -> "Fedora 21"
Expand All @@ -131,6 +139,7 @@ let human_readable_short_string_of_distro (t:t) =
match t with
|`Ubuntu _ -> "Ubuntu"
|`Debian _ -> "Debian"
|`Raspbian _ -> "Raspbian"
|`CentOS _ -> "CentOS"
|`Fedora _ -> "Fedora"
|`OracleLinux _ -> "OracleLinux"
Expand All @@ -141,6 +150,7 @@ let latest_tag_of_distro (t:t) =
match t with
|`Ubuntu _ -> "ubuntu"
|`Debian _ -> "debian"
|`Raspbian _ -> "raspbian"
|`CentOS _ -> "centos"
|`Fedora _ -> "fedora"
|`OracleLinux _ -> "oraclelinux"
Expand Down Expand Up @@ -224,7 +234,7 @@ let to_dockerfile ~ocaml_version ~distro =
| None | Some _ (* when v <> ocaml_version *) -> Some ocaml_version
in
match distro with
| `Ubuntu _ | `Debian _ -> apt_opam ?compiler_version labels distro tag
| `Ubuntu _ | `Debian _ | `Raspbian _ -> apt_opam ?compiler_version labels distro tag
| `CentOS _ | `Fedora _ | `OracleLinux _ -> yum_opam ?compiler_version labels distro tag
| `Alpine _ -> apk_opam ?compiler_version labels tag

Expand Down
1 change: 1 addition & 0 deletions lib/dockerfile_distro.mli
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ type t = [
| `Alpine of [ `V3_3 ]
| `CentOS of [ `V6 | `V7 ]
| `Debian of [ `V9 | `V8 | `V7 | `Stable | `Testing | `Unstable ]
| `Raspbian of [ `V8 | `V7 ]
| `Fedora of [ `V21 | `V22 | `V23 ]
| `OracleLinux of [ `V7 ]
| `Ubuntu of [ `V12_04 | `V14_04 | `V15_04 | `V15_10 | `V16_04 ]
Expand Down

0 comments on commit f49d4c3

Please sign in to comment.