# HG changeset patch # User wenzelm # Date 1573079056 -3600 # Node ID 510b89906d863719135220be3d918d20b013be3e # Parent 67cbf2e52785b1f92ff4e55ecdd1ecc63d486f8b discontinued somewhat pointless Isabelle options: setup implicitly assumes Ubuntu 18.04; diff -r 67cbf2e52785 -r 510b89906d86 etc/options --- a/etc/options Wed Nov 06 23:16:30 2019 +0100 +++ b/etc/options Wed Nov 06 23:24:16 2019 +0100 @@ -343,15 +343,6 @@ option build_log_transaction_size : int = 1 -- "number of log files for each db update" -section "Phabricator server" - -option phabricator_www_user : string = "www-data" -option phabricator_www_root : string = "/var/www" - -option phabricator_mysql_config : string = "/etc/mysql/debian.cnf" -option phabricator_apache_root : string = "/etc/apache2" - - section "Isabelle/Scala/ML system channel" option system_channel_address : string = "" diff -r 67cbf2e52785 -r 510b89906d86 src/Pure/Tools/phabricator.scala --- a/src/Pure/Tools/phabricator.scala Wed Nov 06 23:16:30 2019 +0100 +++ b/src/Pure/Tools/phabricator.scala Wed Nov 06 23:24:16 2019 +0100 @@ -1,7 +1,9 @@ /* Title: Pure/Tools/phabricator.scala Author: Makarius -Support for Phabricator server. See also: +Support for Phabricator server, notably for Ubuntu 18.04 LTS. + +See also: - https://www.phacility.com/phabricator - https://secure.phabricator.com/book/phabricator */ @@ -30,6 +32,8 @@ /* global system resources */ + val www_user = "www-data" + val daemon_user = "phabricator" val ssh_standard = 22 @@ -47,12 +51,10 @@ def isabelle_phabricator_name(name: String = "", ext: String = ""): String = "isabelle-" + phabricator_name(name = name, ext = ext) - def default_root(options: Options, name: String): Path = - Path.explode(options.string("phabricator_www_root")) + - Path.basic(phabricator_name(name = name)) + def default_root(name: String): Path = + Path.explode("/var/www") + Path.basic(phabricator_name(name = name)) - def default_repo(options: Options, name: String): Path = - default_root(options, name) + Path.basic("repo") + def default_repo(name: String): Path = default_root(name) + Path.basic("repo") val mailers_path: Path = Path.explode("mailers.json") @@ -126,7 +128,6 @@ } def phabricator_setup( - options: Options, name: String = default_name, root: String = "", repo: String = "", @@ -155,13 +156,11 @@ user_setup(daemon_user, "Phabricator Daemon User", ssh_setup = true) user_setup(name, "Phabricator SSH User") - val www_user = options.string("phabricator_www_user") - /* basic installation */ - val root_path = if (root.nonEmpty) Path.explode(root) else default_root(options, name) - val repo_path = if (repo.nonEmpty) Path.explode(repo) else default_repo(options, name) + val root_path = if (root.nonEmpty) Path.explode(root) else default_root(name) + val repo_path = if (repo.nonEmpty) Path.explode(repo) else default_repo(name) val configs = read_config() @@ -221,8 +220,7 @@ def mysql_conf(R: Regex): Option[String] = - split_lines(File.read(Path.explode(options.string("phabricator_mysql_config")))). - collectFirst({ case R(a) => a }) + split_lines(File.read(Path.explode("/etc/mysql/debian.cnf"))).collectFirst({ case R(a) => a }) for (user <- mysql_conf("""^user\s*=\s*(\S*)\s*$""".r)) { config.execute("config set mysql.user " + Bash.string(user)) @@ -278,7 +276,7 @@ progress.echo("Apache setup...") - val apache_root = Path.explode(options.string("phabricator_apache_root")) + val apache_root = Path.explode("/etc/apache2") val apache_sites = apache_root + Path.explode("sites-available") if (!apache_sites.is_dir) error("Bad Apache sites directory " + apache_sites) @@ -355,7 +353,6 @@ { var repo = "" var package_update = false - var options = Options.init() var root = "" val getopts = @@ -363,10 +360,9 @@ Usage: isabelle phabricator_setup [OPTIONS] [NAME] Options are: - -R DIR repository directory (default: """ + default_repo(options, "NAME") + """) + -R DIR repository directory (default: """ + default_repo("NAME") + """) -U full update of system packages before installation - -o OPTION override Isabelle system OPTION (via NAME=VAL or NAME) - -r DIR installation root directory (default: """ + default_root(options, "NAME") + """) + -r DIR installation root directory (default: """ + default_root("NAME") + """) Install Phabricator as Ubuntu LAMP application (Linux, Apache, MySQL, PHP). @@ -378,7 +374,6 @@ """, "R:" -> (arg => repo = arg), "U" -> (_ => package_update = true), - "o:" -> (arg => options = options + arg), "r:" -> (arg => root = arg)) val more_args = getopts(args) @@ -392,7 +387,7 @@ val progress = new Console_Progress - phabricator_setup(options, name, root = root, repo = repo, + phabricator_setup(name, root = root, repo = repo, package_update = package_update, progress = progress) })