From eccd467785aaa88924e5370a59b5213eb9e0a71c Mon Sep 17 00:00:00 2001 From: Kate Date: Mon, 20 Jan 2025 21:27:37 +0000 Subject: [PATCH] Improve the installation documentation --- doc/pages/Distribution.md | 126 -------------------------------------- doc/pages/Install.md | 116 +++++++---------------------------- doc/pages/index.menu | 1 - master_changes.md | 1 + release/readme.md | 1 + 5 files changed, 24 insertions(+), 221 deletions(-) delete mode 100644 doc/pages/Distribution.md diff --git a/doc/pages/Distribution.md b/doc/pages/Distribution.md deleted file mode 100644 index 9af0fc46a02..00000000000 --- a/doc/pages/Distribution.md +++ /dev/null @@ -1,126 +0,0 @@ -# opam and other package managers: distributions list - -This page tracks the state of binary packaging of opam on upstream -distributions. If you do package up opam for your various OS, please feel free -to add it below, update [this file](https://github.com/ocaml/opam/tree/master/doc/pages/Distribution.md) -and open a [pull request](https://github.com/ocaml/opam/compare). - -Opam is in [![Packaging status](https://repology.org/badge/tiny-repos/opam.svg?header=)](https://repology.org/project/opam/versions) repository families. - -The pages/files linked are the ones that give the best overview of the available -versions. - -Those [_pkgs_](http://pkgs.org/search/opam) and -[_repology_]() pages may be used to -get an up-to-date overview of official packages on most Linux distributions. - -## _Official_ packages - -OS/distrubtion, their latest opam version and their maintainers: - -* Arch Linux - [![Arch package](https://repology.org/badge/version-for-repo/arch/opam.svg?header=)](https://www.archlinux.org/packages/?q=opam) - * [Package search](https://www.archlinux.org/packages/community/x86_64/opam/) - * Alexander F. Rødseth [@xyproto](https://github.com/xyproto) - -* Debian Linux (9, oldstable, Stretch) - [![Debian Oldstable package](https://repology.org/badge/version-for-repo/debian_oldstable/opam.svg?header=)](https://packages.debian.org/oldstable/source/opam) - * [Package search](https://packages.debian.org/search?keywords=opam&searchon=names&suite=all§ion=all) - * Mehdi Dogguy [@mehdid](https://github.com/mehdid), nicoo [@nbraud](https://www.github.com/nbraud) - -* Debian Linux (10, stable, Buster) - [![Debian Stable package](https://repology.org/badge/version-for-repo/debian_stable/opam.svg?header=)](https://packages.debian.org/stable/source/opam) - * [Package search](https://packages.debian.org/search?keywords=opam&searchon=names&suite=all§ion=all) - * Mehdi Dogguy [@mehdid](https://github.com/mehdid), nicoo [@nbraud](https://www.github.com/nbraud) - -* Debian Linux (11, testing, Bullseye) - [![Debian Testing package](https://repology.org/badge/version-for-repo/debian_testing/opam.svg?header=)](https://packages.debian.org/testing/source/opam) - * [Package search](https://packages.debian.org/search?keywords=opam&searchon=names&suite=all§ion=all) - * Mehdi Dogguy [@mehdid](https://github.com/mehdid), nicoo [@nbraud](https://www.github.com/nbraud) - -* Debian Linux (unstable, sid) - [![Debian Unstable package](https://repology.org/badge/version-for-repo/debian_unstable/opam.svg?header=)](https://packages.debian.org/unstable/source/opam) - * [Package search](https://packages.debian.org/search?keywords=opam&searchon=names&suite=all§ion=all) - * Mehdi Dogguy [@mehdid](https://github.com/mehdid), nicoo [@nbraud](https://www.github.com/nbraud) - -* Fedora 32 - [![Fedora 32 package](https://repology.org/badge/version-for-repo/fedora_32/opam.svg?header=)](https://src.fedoraproject.org/rpms/opam) - * [Package page](https://apps.fedoraproject.org/packages/opam) - * Ben Rosser [@TC01](https://www.github.com/TC01) - -* FreeBSD - [![FreeBSD port](https://repology.org/badge/version-for-repo/freebsd/opam.svg?header=)](https://www.freshports.org/devel/ocaml-opam) - * [Package search](http://www.freebsd.org/cgi/ports.cgi?query=opam&stype=all) - * Hannes Mehnert [@hannesm](https://www.github.com/hannesm) - -* Gnu Guix - [![GNU Guix package](https://repology.org/badge/version-for-repo/gnuguix/opam.svg?header=)](https://guix.gnu.org/packages/opam-2.0.6/) - * [Package definition](https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/ocaml.scm#n428) - * Julien Lepiller [@roptat](https://github.com/roptat) - -* Homebrew (macOS) - [![Homebrew package](https://repology.org/badge/version-for-repo/homebrew/opam.svg?header=)](https://formulae.brew.sh/formula/opam) - -* Macports (macOS) - [![MacPorts package](https://repology.org/badge/version-for-repo/macports/opam.svg?header=)](https://ports.macports.org/port/opam/summary) - * [Package definition](https://github.com/macports/macports-ports/blob/master/sysutils/opam/Portfile) - * Perry E. Metzger [@pmetzger](https://www.github.com/pmetzger) - -* Mageia Linux (Cauldron) - [![Mageia Cauldron package](https://repology.org/badge/version-for-repo/mageia_cauldron/opam.svg?header=)](https://madb.mageia.org/package/show/source/1/application/0/release/cauldron/name/opam) - * [Package definition](http://svnweb.mageia.org/packages/cauldron/opam/current/SPECS/opam.spec?view=markup) - * David Geiger [@david-geiger](https://www.github.com/david-geiger) - -* NixOS - [![nixpkgs stable package](https://repology.org/badge/version-for-repo/nix_stable/opam.svg?header=)](https://github.com/NixOS/nixpkgs/blob/release-20.03/pkgs/development/tools/ocaml/opam/default.nix#L114) - * [Package definitions](https://github.com/NixOS/nixpkgs/tree/master/pkgs/development/tools/ocaml/opam) - * Henry Till - -* OpenBSD - [![OpenBSD port](https://repology.org/badge/version-for-repo/openbsd/opam.svg?header=)](http://openports.se/sysutils/opam) - * [Package page](http://ports.su/sysutils/opam,-main) - * Christopher Zimmerman [@madroach](https://github.com/madroach) - -* OpenSuse (Tumbleweed) - [![openSUSE Tumbleweed package](https://repology.org/badge/version-for-repo/opensuse_tumbleweed/opam.svg?header=)](https://build.opensuse.org/package/show/openSUSE:Factory/opam) - * Anil Madhavapeddy [@avsm](https://www.github.com/avsm) - -* Ubuntu Linux (16.04, LTS, xenial) - [![Ubuntu 16.04 package](https://repology.org/badge/version-for-repo/ubuntu_16_04/opam.svg?header=)](https://packages.ubuntu.com/source/xenial/opam) - * [Package search](http://packages.ubuntu.com/search?keywords=opam&searchon=names&suite=all§ion=all) - bwrap unavailable - -* Ubuntu Linux (18.04, LTS, bionic) - [![Ubuntu 18.04 package](https://repology.org/badge/version-for-repo/ubuntu_18_04/opam.svg?header=)](https://packages.ubuntu.com/source/bionic/opam) - * [Package search](http://packages.ubuntu.com/search?keywords=opam&searchon=names&suite=all§ion=all) - -* Ubuntu Linux (20.04, LTS, focal) - [![Ubuntu 20.04 package](https://repology.org/badge/version-for-repo/ubuntu_20_04/opam.svg?header=)](https://packages.ubuntu.com/focal/opam) - * [Package search](https://packages.ubuntu.com/search?keywords=opam&searchon=names&suite=focal§ion=all) - -* Ubuntu Linux (22.04, LTS, jammy) - [![Ubuntu 22.04 package](https://repology.org/badge/version-for-repo/ubuntu_22_04/opam.svg?header=)](https://packages.ubuntu.com/jammy/opam) - * [Package search](https://packages.ubuntu.com/search?keywords=opam&searchon=names&suite=jammy§ion=all) - -## Third party packages - - -* CentOS (6,7) - * Anil Madhavapeddy [@avsm](https://www.github.com/avsm) - -* Exherbo Linux - * 1.1.1 [Package page](http://git.exherbo.org/summer/packages/dev-ocaml/opam/index.html) (_ocaml-unofficial_) - * nicoo [@nbraud](https://www.github.com/nbraud) - -* Ubuntu Linux PPA - * 2.0.4 [Anil's official opam PPA](https://launchpad.net/~avsm) and [ppa post](https://discuss.ocaml.org/t/opam-2-0-experimental-ppas/2446) - * Anil Madhavapeddy [@avsm](https://www.github.com/avsm) - -* Windows - * [MinGW repo](https://github.com/fdopen/opam-repository-mingw) - Andreas Hauptmann [@fdopen](https://www.github.com/fdopen) - * David Allsopp [@dra27](https://www.github.com/dra27) - -If you can't find latest version packages for your distribution here, see [the -opam installation page](Install.html) for binaries or building from source. - -[Docker containers](http://hub.docker.com/r/ocaml/opam) for severals -distributions and OCaml compiler versions are also available. diff --git a/doc/pages/Install.md b/doc/pages/Install.md index 71cb2b2105e..907d9d1980b 100644 --- a/doc/pages/Install.md +++ b/doc/pages/Install.md @@ -43,6 +43,7 @@ We provide pre-compiled binaries for: - macOS (amd64, arm64) - FreeBSD (amd64) - OpenBSD (amd64) +- NetBSD (amd64) - Windows (amd64) (other platforms are available using the other methods below) @@ -60,87 +61,44 @@ sudo install /usr/local/bin/opam ## Using your system's package manager -This is generally the recommended way, **when available and up-to-date** (you -can check [here](Distribution.html) the latest -available release per distribution). Here is a list of supported distributions: +This is generally the recommended way, **when available and up-to-date**. You +can check the following table: -#### Arch Linux +[![repology package status](https://repology.org/badge/vertical-allrepos/opam.svg?exclude_unsupported=1)](https://repology.org/project/opam/versions) -[![badge](https://repology.org/badge/version-for-repo/arch/opam.svg)](https://repology.org/project/opam/versions) +If your distribution is up-to-date you can install opam the following way: -The [opam](https://www.archlinux.org/packages/extra/x86_64/opam/) -package is available in the official distribution. To install it simply run: +#### Arch Linux ``` pacman -S opam ``` -If you'd like to use the development version there is an [opam-git](https://aur.archlinux.org/packages/opam-git/) -package available in the [AUR](https://wiki.archlinux.org/index.php/Arch_User_Repository). -Assuming you have [yay](https://github.com/Jguer/yay) installed just run the following command: - -``` -yay -S opam-git -``` - -#### Debian +#### Debian and Ubuntu -[![badge](https://repology.org/badge/version-for-repo/debian_stable/opam.svg)](https://repology.org/project/opam/versions) [![badge](https://repology.org/badge/version-for-repo/debian_testing/opam.svg)](https://repology.org/project/opam/versions) [![badge](https://repology.org/badge/version-for-repo/debian_unstable/opam.svg)](https://repology.org/project/opam/versions) - -Binary packages of opam are available for the -[stable](http://packages.debian.org/jessie/opam), -[testing](http://packages.debian.org/stretch/opam) and -[unstable](http://packages.debian.org/sid/opam) distributions, from the official -repositories. You should be set with: - -``` -apt-get install opam ``` - -#### [Exherbo](http://exherbo.org) - -The -[`dev-ocaml/opam`](http://git.exherbo.org/summer/packages/dev-ocaml/opam/index.html) -package can be installed with the command: - -``` -cave resolve -x dev-ocaml/opam +apt install opam ``` -You might need to add the `::ocaml-unofficial` repository first: - -``` -cave resolve -x repository/ocaml-unofficial -``` - -#### [Fedora](http://fedoraproject.org), [CentOS](http://centos.org) and RHEL - -[![Fedora 39](https://repology.org/badge/version-for-repo/fedora_39/opam.svg)](https://repology.org/project/opam/versions) - -The opam package for Fedora can be installed with the command: +#### Fedora ``` dnf install opam ``` -There is not currently a package for CentOS/RHEL. You will need to use our -pre-built binaries, or build from sources. - #### Mageia -[![badge](https://repology.org/badge/version-for-repo/mageia_cauldron/opam.svg)](https://repology.org/project/opam/versions) - -The opam package for Mageia can be installed with the command: - ``` urpmi opam ``` -#### OpenBSD +#### Alpine Linux -[![badge](https://repology.org/badge/version-for-repo/openbsd/opam.svg)](https://repology.org/project/opam/versions) +``` +apk add opam +``` -The opam package for OpenBSD can be installed with the command (since OpenBSD 5.7): +#### OpenBSD ``` pkg_add opam @@ -148,26 +106,13 @@ pkg_add opam #### FreeBSD -[![badge](https://repology.org/badge/version-for-repo/freebsd/opam.svg)](https://repology.org/project/opam/versions) - -Opam is available in the ports and packages tree on FreeBSD 11 or higher. - ``` pkg install ocaml-opam ``` -or to install from source: - -``` -cd /usr/ports/devel/ocaml-opam -make install -``` - #### macOS -[![badge](https://repology.org/badge/version-for-repo/homebrew/opam.svg)](https://repology.org/project/opam/versions) [![badge](https://repology.org/badge/version-for-repo/macports/opam.svg)](https://repology.org/project/opam/versions) - -Opam packages for [homebrew](http://mxcl.github.com/homebrew/) and [MacPorts](http://www.macports.org/) are available. +Opam packages for [Homebrew](https://brew.sh/) and [MacPorts](http://www.macports.org/) are available. ``` # Homebrew @@ -177,37 +122,21 @@ brew install opam port install opam ``` -See also -[howto setup Emacs.app](https://github.com/ocaml/opam/wiki/Setup-Emacs.app-on-macosx-for-opam-usage) -for Opam usage. - -#### Ubuntu - -[![badge](https://repology.org/badge/version-for-repo/ubuntu_24_04/opam.svg)](https://repology.org/project/opam/versions) - -``` -apt install opam -``` - #### Guix & Guix System -[![badge](https://repology.org/badge/version-for-repo/gnuguix/opam.svg)](https://repology.org/project/opam/versions) - -The opam package for [guix](https://www.gnu.org/software/guix/) can be installed with the command: - ``` -# Guix guix install opam ``` #### Windows -[![badge](https://repology.org/badge/version-for-repo/winget/opam.svg)](https://repology.org/project/opam/versions) - ``` winget install Git.Git OCaml.opam ``` +WinGet the Windows Package Manager is available on Windows 11, modern versions of Windows 10, and Windows Server 2025. +See the [official documentation](https://learn.microsoft.com/en-us/windows/package-manager/winget/) for additional info. + ## From Sources #### Getting the Sources @@ -217,12 +146,11 @@ Sources of the latest stable version of opam are available on Github: * [Opam releases on Github](https://github.com/ocaml/opam/releases) You can also download the full archives, including opam dependencies (these -don't require any extra downloads, just the OCaml compiler -- 4.02.3 or later -for the latest version): +don't require any extra downloads): -* [2.2.0](https://github.com/ocaml/opam/releases/download/2.2.0/opam-full-2.2.0-2.tar.gz) - - MD5: ba94fd83c0e023b0d3c91857f28b8755 - - SHA384: 365eb949bfe18d0f189b35e620fa854628ab3e962721ee43488865456bf80da0dbba037b8fdb3830abb83f64b7c79106 +* [2.3.0](https://github.com/ocaml/opam/releases/download/2.3.0/opam-full-2.3.0.tar.gz) + - MD5: 81d029c2b79c53f4d99005df47696bef + - SHA384: 7c62af375f7fc293236f5ce49c51957f39356a937a578683a79fbe1a3ed9e96b64d97c369206923248cbec62c4c251dc Follow the instructions in the included [`README.md`](https://github.com/ocaml/opam#readme) to get opam built and diff --git a/doc/pages/index.menu b/doc/pages/index.menu index 871dad55d66..0ed1962d848 100644 --- a/doc/pages/index.menu +++ b/doc/pages/index.menu @@ -12,7 +12,6 @@ Usage.md FAQ.md Tricks.md Packaging.md -Distribution.md External_solvers.md Manual.md diff --git a/master_changes.md b/master_changes.md index d3b285e1322..e13dc51ff29 100644 --- a/master_changes.md +++ b/master_changes.md @@ -195,6 +195,7 @@ users) * Add winget command for installing opam [#6338 @tobil4sk] * Fix broken link to non-existing archlinux community repo [#6361 @juergenhoetzel] * Document the meaning of colored version numbers in the manpage of `opam show` [#6358 @kit-ty-kate] + * Improve the installation documentation [#6372 @kit-ty-kate] ## Security fixes diff --git a/release/readme.md b/release/readme.md index c250f8f4b84..9638441e85d 100644 --- a/release/readme.md +++ b/release/readme.md @@ -38,6 +38,7 @@ * finalise the release (publish) * add hashes in `install.sh` and `install.ps1` (and check signatures) * bring the changes to the changelog (CHANGES) from the branch of the release to the `master` branch +* Update doc/pages/Install.md * publish opam packages in opam-repository (use `opam publish --pre-release` if this is not a stable version) * update versions (and messages, if necessary) in https://github.com/ocaml/opam-repository/blob/master/repo