Speed up Ubuntu install ~3x: explicit packages instead of lamp-server^ - #41
Merged
Merged
Conversation
lamp-server^ is a tasksel "task" metapackage: it depends on the same apache2/mysql-server packages Debian already installs explicitly in this same function, but also pulls in a broad set of packages beyond the actual LAMP stack (CGI/Perl libraries, etc.) that SimpleRisk has no use for. It also meant installing whatever PHP version Ubuntu's own archive defaults to, then immediately overriding it with the pinned Sury version and swapping Apache's active PHP module - extra work for a result the explicit-install path gets directly. Now that Ubuntu already gets the same Sury PHP8 repo Debian uses (added in a recent commit), Ubuntu can just take the same explicit apache2/mysql-server/phpX.Y install path Debian already proves works, with no lamp-server^ special-casing and no module-swapping dance needed. Test Dockerfiles updated to pre-install the same explicit packages instead of lamp-server^ for the same reason. Verified end-to-end (install -> verify -> uninstall -> verify) on all three supported Ubuntu versions in Docker: 22.04, 24.04, and 26.04, all 28/28 install checks and 13/13 uninstall checks, correct PHP 8.5.10 active on all three. Total time per OS dropped roughly 3x (from ~20-24 minutes to ~7-8 minutes: Docker image build time dropped from minutes to ~30 seconds since there's far less to pre-install, and the script's own install step dropped from ~14 minutes to ~6.5-7 minutes since apt-get dist-upgrade now has a much smaller package set to churn through). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
lamp-server^is a tasksel "task" metapackage: it depends on the sameapache2/mysql-serverpackages the Debian branch ofsetup_ubuntu_debian()already installs explicitly, but also pulls in a broad set of packages beyond the actual LAMP stack (CGI/Perl libraries, etc.) that SimpleRisk has no use for — confirmed by inspecting an installed image: 211 packages includinglibcgi-fast-perl,libcgi-pm-perl,libhtml-template-perl, Python stdlib bits, etc. It also meant installing whatever PHP version Ubuntu's own archive defaults to for that release, then immediately overriding it with the pinned Sury version and swapping Apache's active PHP module (from #40's PHP-version-pinning fix) — extra work for a result the explicit-install path gets directly.Now that Ubuntu already gets the same Sury PHP8 repo Debian uses, Ubuntu can just take the same explicit
apache2/mysql-server/phpX.Yinstall path Debian already proves works, with nolamp-server^special-casing and no module-swapping dance needed. Test Dockerfiles updated to pre-install the same explicit packages instead oflamp-server^, for the same reason (and becauselamp-server^'s pre-bake was most of the Docker build-step time in CI).Test plan
bash -n simplerisk-setup.sh— syntax check passescourier-mtaregression from the earliersensible-mdauninstall fix.