LAMP as a child of apache-php, in two content variants #2
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Keel-Linux/keel-lamp!2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/lamp-on-apache-php"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #1.
LAMP is now a child of the
apache-phplayer carrying themariadbunit, andthe recipe produces two artefacts split by content rather than by topology.
The two artefacts
lampapache-phpmariadb@1.0.0lamp-clientapache-phpThey are built from the same commit of this repository in two product
directories, and the only difference between those directories is whether
unit.d/mariadbwas cloned into it.lamp-clientis a strict subset:13 packages fewer and none of its own, all 13 the server closure
(
default-mysql-server,mariadb-server,mariadb-server-compat,mariadb-server-core,galera-4,webmin-mysql,python3-pymysql, andgawk,lsof,liblsof0,libmpfr6,libsigsegv2,socat).Nothing in the recipe asks which artefact is being built by name.
conf.d/mainreads what dpkg says the image contains, because a makefile variable says what
was asked for and dpkg says what happened.
Equivalence against a monolithic build
Measured the way decision 0010 measured the unit extraction, on the assembled
root and not on the delta: a scratch product
lamp-monoexpressing the samestack as one recipe on
core, built twice so the comparison has a noise floorto be read against. All builds at
SOURCE_DATE_EPOCH=1700000000,common6803422, fab 1.1.1+keel2, parent
core7acf2c53 andapache-phpb9dd64db.The noise floor first. Two runs of the identical control differ by 2
packages (
php-json,php8.4-phpdbg), 198 files, 42 paths and 29 symlinks.The package set of this stack is not deterministic run to run: both packages
arrive through composer's dependency closure and apt does not resolve it the
same way twice. That is the instrument decision 0012 exists to fix, and it is
why the third build is the point of the method.
Against the second control run, which is the one the composed build should
be read against:
The one package is
turnkey-apache-php-19.0, the parent layer's own releaserecord, and the 3 paths are that package's
changelog,.listand.md5sums.A chain records every layer it is made of and a monolith records one; that is
correct and cannot be otherwise. Every version of every shared package is
identical, all 519.
Differences attributable to the unit form, that is the control-vs-composed
set minus the control-vs-control set: 2 paths,
/etc/hostnameand/etc/hosts, and both are the product's own name, because the control has tobe a differently named product to exist beside the real one (
lamp-monoagainst
lamp, measured in both trees). Net attributable to the unit form:zero.
The 182 that do differ, all of them: 167 under
/var/lib/mysql/**, the datadirectory the database writes when the conf script starts it, same sizes with
a few bytes of creation stamp each;
/etc/hostnameand/etc/hosts, the twoabove;
/root/.wget-hsts, a clock written when the component downloadsmysqltuner; and 12 that are install-time state of the kind the M0 allow-list
already freezes:
/var/lib/dpkg/status,status-old,triggers/File,/var/lib/apt/extended_states,/var/cache/ldconfig/aux-cache,/var/log/alternatives.log,/var/log/webmin/webmin.log,/var/webmin/module.infos.cache,/etc/webmin/apache/config,/etc/webmin/apache/httpd-info,/etc/webmin/mysql/configand/etc/webmin/time/config.One correction to the method, because it changed the numbers. The first run of
the comparison read
sha256sumoutput withjoinon whitespace, so the onepath in the tree whose name contains a space,
setuptools/_vendor/jaraco/text/Lorem ipsum.txt, was split and counted as adifference in every pair. It is byte identical in all three trees. The
comparison is keyed on a tab-separated path now, and the numbers above are the
corrected ones: 198 and 182 rather than 199 and 183.
The boot test, which proves the stack rather than the ports
Both artefacts, on the build host, over the container's global IPv6 address.
lamp:lamp-client, with the same web verdicts and the absence in place of thedatabase:
The absence is asked four ways because each can be true while the others are
false, and an idle server in that artefact would be the cheapest failure to
ship and the most expensive to find.
A bug the boot test found, and the test that now holds it
The first
lamp-clientrun exited after the PHP verdict with no message.bt_has_local_databasereturns 1 for the artefact with no server, which is ananswer and not an error, and
bt_has_local_database "$x"; rc=$?is not exemptfrom errexit, so the verdict died at that line before it could print anything.
All 66 tests passed on that library, because
bats runturns errexit off.The idiom is
|| rc=$?now, and the 67th test runs the helpers in a scriptwith
set -euo pipefail, which is the only way a unit test sees this.Coverage
67 bats tests, 100 percent (284/284) of
tests/lib/boot-test-lib.shunderkcov, the threshold the workflow enforces.
What upstream ships and this does not
libapache2-mod-python(absent from Debian 13),php-xdebug,php-pear, andconf-available/remove-upgrade-header.conf. Each is in the changelog with itsreason. The last is a web server setting with no database in it and is
proposed for
apache-php, where both stacks would get it. Keeping any of themwould make this recipe differ from LAPP in something other than the database.
What I would change outside this repository, and did not
unit-mariadbshould set its own bind addresses.unit-postgresqlsetslisten_addressesinside its conf script, because the addresses a serveranswers on belong to whoever installs the server.
unit-mariadbdoes not,so
conf.d/mainhere writes99-keel-bind.cnfandkeel-mariadbcarriesthe same file in its overlay. One commit in the component, two deletions in
the consumers. Left alone because
keel-mariadbhas that change in flight(its PR #11 is open and the published
mariadblayer still recordsunits none).common/conf/adminer-mysqlshould be split into a driver half and anaccount half. It starts the database to create an account, so it can only
run in the artefact that has a server, while
conf/adminer-pgsqlis twosedlines and runs anywhere. Splitting it would remove the last structuraldifference between this recipe and LAPP's.
commonis shared and anotherchange landed there tonight, so this is proposed and not made.
keel-apache-php's workflow passesroles: primary replicatotest-appliance.yml, which boots two containers for a web layer with noreplication. Its
tests/coverage.shalso still carries the PostgreSQLinclude pattern. Both look like copies from the database appliance.
v1.0.0tag, thoughkeel-mariadb,keel-postgresqland now these two recipes all documentgit clone --branch v1.0.0. The pin resolves through theversionfile, sothe manifest is right either way, but the documented command does not work.
What argues against the composition
Nothing found. The package set is identical, every version is identical, the
symlinks are identical, the files attributable to the unit form are zero, both
artefacts boot and answer, and
lamp-clientis a strict subset oflamp. Thetwo things the measurement did surface are about other repositories: the
package closure of this stack is not reproducible run to run, which pinning
addresses, and a child inherits its parent's closure where a monolith
re-resolves it, which is a property of layering and is visible in the
manifest.