40 // more packages |
40 // more packages |
41 "php-xml", "php-zip", "python3-pygments", "ssh", "subversion", |
41 "php-xml", "php-zip", "python3-pygments", "ssh", "subversion", |
42 // mercurial build packages |
42 // mercurial build packages |
43 "make", "gcc", "gettext", "python3", "python3-dev", "python3-docutils", "python3-setuptools") |
43 "make", "gcc", "gettext", "python3", "python3-dev", "python3-docutils", "python3-setuptools") |
44 |
44 |
45 def packages(webserver: Webserver): List[String] = { |
45 def system_packages(): List[String] = { |
46 val release = Linux.Release() |
46 val release = Linux.Release() |
47 val pkgs = |
47 if (release.is_ubuntu_22_04) packages_ubuntu_22_04 |
48 if (release.is_ubuntu_22_04) packages_ubuntu_22_04 |
48 else if (release.is_ubuntu_24_04) packages_ubuntu_24_04 |
49 else if (release.is_ubuntu_24_04) packages_ubuntu_24_04 |
49 else error("Bad Linux version: expected Ubuntu 20.04 or 22.04 or 24.04 LTS") |
50 else error("Bad Linux version: expected Ubuntu 20.04 or 22.04 or 24.04 LTS") |
|
51 pkgs ::: webserver.packages() |
|
52 } |
50 } |
53 |
51 |
54 |
52 |
55 /* webservers */ |
53 /* webservers */ |
56 |
54 |
370 if (package_update) { |
368 if (package_update) { |
371 Linux.package_update(progress = progress) |
369 Linux.package_update(progress = progress) |
372 Linux.check_reboot_required() |
370 Linux.check_reboot_required() |
373 } |
371 } |
374 |
372 |
375 Linux.package_install(packages(webserver), progress = progress) |
373 Linux.package_install(webserver.packages(), progress = progress) |
|
374 Linux.package_install(system_packages(), progress = progress) |
376 Linux.check_reboot_required() |
375 Linux.check_reboot_required() |
377 |
376 |
378 |
377 |
379 if (mercurial_source.nonEmpty) { |
378 if (mercurial_source.nonEmpty) { |
380 for { name <- List("mercurial", "mercurial-common") if Linux.package_installed(name) } { |
379 for { name <- List("mercurial", "mercurial-common") if Linux.package_installed(name) } { |