# HG changeset patch # User wenzelm # Date 1575992756 -3600 # Node ID 6ca561001244509795c07e27c7990e48339be8ed # Parent 0c454a5d125d78aa730e549c8ab316556847c3d1 support for pwgen; diff -r 0c454a5d125d -r 6ca561001244 src/Pure/System/linux.scala --- a/src/Pure/System/linux.scala Tue Dec 10 01:06:39 2019 +0100 +++ b/src/Pure/System/linux.scala Tue Dec 10 16:45:56 2019 +0100 @@ -12,6 +12,11 @@ object Linux { + /* required packages */ + + val packages: List[String] = List("pwgen") + + /* check system */ def check_system(): Unit = @@ -138,4 +143,13 @@ service_enable(name) service_restart(name) } + + + /* passwords */ + + def generate_password(length: Int = 10): String = + { + require(length >= 6) + Isabelle_System.bash("pwgen " + length + " 1").check.out + } } diff -r 0c454a5d125d -r 6ca561001244 src/Pure/Tools/phabricator.scala --- a/src/Pure/Tools/phabricator.scala Tue Dec 10 01:06:39 2019 +0100 +++ b/src/Pure/Tools/phabricator.scala Tue Dec 10 16:45:56 2019 +0100 @@ -21,7 +21,7 @@ /* required packages */ val packages: List[String] = - Build_Docker.packages ::: + Build_Docker.packages ::: Linux.packages ::: List( // https://secure.phabricator.com/source/phabricator/browse/master/scripts/install/install_ubuntu.sh 15e6e2adea61 "git", "mysql-server", "apache2", "libapache2-mod-php", "php", "php-mysql",