# HG changeset patch # User wenzelm # Date 1604094975 -3600 # Node ID 354bfab78cbfb0e792314969a235f450e50e82ad # Parent 581d9d74e1e4623798a849733ac3b2e0d66d5bbe Isabelle/Phabricator supports Ubuntu 20.04 LTS; diff -r 581d9d74e1e4 -r 354bfab78cbf NEWS --- a/NEWS Fri Oct 30 21:10:18 2020 +0100 +++ b/NEWS Fri Oct 30 22:56:15 2020 +0100 @@ -244,6 +244,8 @@ * Isabelle server allows user-defined commands via isabelle_scala_service. +* Isabelle/Phabricator supports Ubuntu 20.04 LTS. + * Isabelle/Phabricator setup has been updated to follow ongoing development: libphutil has been discontinued. Minor INCOMPATIBILITY: existing server installations should remove libphutil from diff -r 581d9d74e1e4 -r 354bfab78cbf src/Doc/System/Phabricator.thy --- a/src/Doc/System/Phabricator.thy Fri Oct 30 21:10:18 2020 +0100 +++ b/src/Doc/System/Phabricator.thy Fri Oct 30 22:56:15 2020 +0100 @@ -63,7 +63,7 @@ section \Quick start\ text \ - The starting point is a fresh installation of \<^bold>\Ubuntu 18.04 + The starting point is a fresh installation of \<^bold>\Ubuntu 18.04 or 20.04 LTS\\<^footnote>\\<^url>\https://ubuntu.com/download\\: this version is mandatory due to subtle dependencies on system packages and configuration that is assumed by the Isabelle setup tool. @@ -233,7 +233,7 @@ @{verbatim [display] \ systemctl reload apache2\} \<^item> Install \<^verbatim>\certbot\ from \<^url>\https://certbot.eff.org\ following the - description for Apache and Ubuntu 18.04 on + description for Apache and Ubuntu 18.04 or 20.04 on \<^url>\https://certbot.eff.org/lets-encrypt/ubuntubionic-apache\. Run \<^verbatim>\certbot\ interactively and let it operate on the domain \<^verbatim>\vcs.example.org\. @@ -390,7 +390,7 @@ text \ The @{tool_def phabricator_setup} tool installs a fresh Phabricator instance - on Ubuntu 18.04 LTS: + on Ubuntu 18.04 or 20.04 LTS: @{verbatim [display] \Usage: isabelle phabricator_setup [OPTIONS] Options are: @@ -428,9 +428,9 @@ Option \<^verbatim>\-M:\ installs a standard Mercurial release from source --- the one that is used by the Phabricator hosting service \<^url>\https://admin.phacility.com\. This avoids various problems with the - package provided by Ubuntu 18.04. Alternatively, an explicit file path or - URL the source archive (\<^verbatim>\.tar.gz\) may be given here. This option is - recommended for production use, but it requires to \<^emph>\uninstall\ existing + package provided by Ubuntu 18.04 or 20.04. Alternatively, an explicit file + path or URL the source archive (\<^verbatim>\.tar.gz\) may be given here. This option + is recommended for production use, but it requires to \<^emph>\uninstall\ existing Mercurial packages provided by the operating system. Option \<^verbatim>\-n\ provides an alternative installation name. The default name diff -r 581d9d74e1e4 -r 354bfab78cbf src/Pure/System/linux.scala --- a/src/Pure/System/linux.scala Fri Oct 30 21:10:18 2020 +0100 +++ b/src/Pure/System/linux.scala Fri Oct 30 22:56:15 2020 +0100 @@ -46,6 +46,7 @@ def is_ubuntu: Boolean = id == "Ubuntu" def is_ubuntu_18_04: Boolean = is_ubuntu && release == "18.04" + def is_ubuntu_20_04: Boolean = is_ubuntu && release == "20.04" } diff -r 581d9d74e1e4 -r 354bfab78cbf src/Pure/Tools/phabricator.scala --- a/src/Pure/Tools/phabricator.scala Fri Oct 30 21:10:18 2020 +0100 +++ b/src/Pure/Tools/phabricator.scala Fri Oct 30 22:56:15 2020 +0100 @@ -21,7 +21,7 @@ /* required packages */ - val packages: List[String] = + val packages_ubuntu_18_04: List[String] = Build_Docker.packages ::: List( // https://secure.phabricator.com/source/phabricator/browse/master/scripts/install/install_ubuntu.sh 15e6e2adea61 @@ -32,6 +32,18 @@ // mercurial build packages "make", "gcc", "python", "python-dev", "python-docutils", "python-pygments", "python-openssl") + val packages_ubuntu_20_04: List[String] = + packages_ubuntu_18_04.map((name: String) => + if (name.startsWith("python")) name.replace("python", "python3") else name) + + def packages: List[String] = + { + val release = Linux.Release() + if (release.is_ubuntu_18_04) packages_ubuntu_18_04 + else if (release.is_ubuntu_20_04) packages_ubuntu_20_04 + else error("Bad Linux version: expected Ubuntu 18.04 or 20.04 LTS") + } + /* global system resources */ @@ -557,9 +569,6 @@ val progress = new Console_Progress - val release = Linux.Release() - if (!release.is_ubuntu_18_04) error("Bad Linux version: Ubuntu 18.04 LTS required") - phabricator_setup(options, name = name, root = root, repo = repo, package_update = package_update, mercurial_source = mercurial_source, progress = progress) })