# HG changeset patch # User wenzelm # Date 1581171538 -3600 # Node ID 5d5be87330b5cb8f61961ebddc739817d9f2dbe9 # Parent 5de8c6d92bd036f5ae82f90e47521d2f03859821 allow to override repository versions at runtime; diff -r 5de8c6d92bd0 -r 5d5be87330b5 etc/options --- a/etc/options Fri Feb 07 20:26:31 2020 +0100 +++ b/etc/options Sat Feb 08 15:18:58 2020 +0100 @@ -283,6 +283,18 @@ -- "maximum number of messages to keep SSH server connection alive" +section "Phabricator" + +option phabricator_version_arcanist : string = "729100955129851a52588cdfd9b425197cf05815" + -- "repository version for arcanist" + +option phabricator_version_libphutil : string = "034cf7cc39940b935e83923dbb1bacbcfe645a85" + -- "repository version for libphutil" + +option phabricator_version_phabricator : string = "46fcd135ae681bb90a1282114fb2147ab21e4f34" + -- "repository version for phabricator" + + section "Theory Export" option export_document : bool = false diff -r 5de8c6d92bd0 -r 5d5be87330b5 src/Doc/System/Phabricator.thy --- a/src/Doc/System/Phabricator.thy Fri Feb 07 20:26:31 2020 +0100 +++ b/src/Doc/System/Phabricator.thy Sat Feb 08 15:18:58 2020 +0100 @@ -398,6 +398,7 @@ -R DIR repository directory (default: "/var/www/phabricator-NAME/repo") -U full update of system packages before installation -n NAME Phabricator installation name (default: "vcs") + -o OPTION override Isabelle system OPTION (via NAME=VAL or NAME) -r DIR installation root directory (default: "/var/www/phabricator-NAME") Install Phabricator as LAMP application (Linux, Apache, MySQL, PHP). @@ -438,6 +439,10 @@ also uses the same suffix, but that can (and should) be changed later via regular Apache configuration. + Option \<^verbatim>\-o\ augments the environment of Isabelle system options: relevant + options for Isabelle/Phabricator have the prefix ``\<^verbatim>\phabricator_\'' (see + also the result of e.g. ``\<^verbatim>\isabelle options -l\''). + Option \<^verbatim>\-r\ specifies an alternative installation root directory: it needs to be accessible for the Apache web server. diff -r 5de8c6d92bd0 -r 5d5be87330b5 src/Pure/Tools/phabricator.scala --- a/src/Pure/Tools/phabricator.scala Fri Feb 07 20:26:31 2020 +0100 +++ b/src/Pure/Tools/phabricator.scala Sat Feb 08 15:18:58 2020 +0100 @@ -220,6 +220,7 @@ } def phabricator_setup( + options: Options, name: String = default_name, root: String = "", repo: String = "", @@ -287,14 +288,17 @@ set -e echo "Cloning distribution repositories:" - git clone --branch stable https://github.com/phacility/libphutil.git - git -C libphutil reset --hard 034cf7cc39940b935e83923dbb1bacbcfe645a85 + git clone --branch stable https://github.com/phacility/arcanist.git + git -C arcanist reset --hard """ + + Bash.string(options.string("phabricator_version_arcanist")) + """ - git clone --branch stable https://github.com/phacility/arcanist.git - git -C arcanist reset --hard 729100955129851a52588cdfd9b425197cf05815 + git clone --branch stable https://github.com/phacility/libphutil.git + git -C libphutil reset --hard """ + + Bash.string(options.string("phabricator_version_libphutil")) + """ git clone --branch stable https://github.com/phacility/phabricator.git - git -C phabricator reset --hard 46fcd135ae681bb90a1282114fb2147ab21e4f34 + git -C phabricator reset --hard """ + + Bash.string(options.string("phabricator_version_phabricator")) + """ """).check val config = Config(name, root_path) @@ -529,6 +533,7 @@ var repo = "" var package_update = false var name = default_name + var options = Options.init() var root = "" val getopts = @@ -541,6 +546,7 @@ -R DIR repository directory (default: """ + default_repo("NAME") + """) -U full update of system packages before installation -n NAME Phabricator installation name (default: """ + quote(default_name) + """) + -o OPTION override Isabelle system OPTION (via NAME=VAL or NAME) -r DIR installation root directory (default: """ + default_root("NAME") + """) Install Phabricator as LAMP application (Linux, Apache, MySQL, PHP). @@ -552,6 +558,7 @@ "R:" -> (arg => repo = arg), "U" -> (_ => package_update = true), "n:" -> (arg => name = arg), + "o:" -> (arg => options = options + arg), "r:" -> (arg => root = arg)) val more_args = getopts(args) @@ -562,7 +569,7 @@ val release = Linux.Release() if (!release.is_ubuntu_18_04) error("Bad Linux version: Ubuntu 18.04 LTS required") - phabricator_setup(name = name, root = root, repo = repo, + phabricator_setup(options, name = name, root = root, repo = repo, package_update = package_update, mercurial_source = mercurial_source, progress = progress) })