Compose the PostgreSQL component instead of including the shared tree #7
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Keel-Linux/keel-postgresql!7
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/postgresql-as-a-unit"
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?
The recipe stops including
mk/turnkey/pgsql.mk, stops naming the server packages, and composeskeel-linux/unit-postgresqlasunit.d/postgresql(its pull request 1). Decision 0013 is why: a database is a component, not a parent layer, so LAMP and LAPP can share oneapache-phplayer.listen_addresses = '::1,127.0.0.1'moves with the server, into the component. The line was written here last night, when this layer was found binding the IPv4 loopback alone because Debian's/etc/hostsnever maps::1tolocalhost. It belongs to whoever installs the server: LAPP will carry the component without carrying this recipe. What stays here is the check that the built image has the line, and the boot test still proves what the cluster binds on a running machine.The comparison, on the build host
Four builds of
bt-layer postgresql --parent core, all atSOURCE_DATE_EPOCH=1700000000, fab 1.1.1+keel2, parentcore7acf2c53, 116 to 126 seconds each:unit.d/postgresqlchangelogonlyThe noise floor is 13 of 37,439 regular files: 6 under
/var/lib/postgresql/**, plus/etc/webmin/postgresql/config,/var/webmin/module.infos.cache,/var/log/alternatives.log,/var/log/webmin/webmin.log,/var/cache/ldconfig/aux-cacheand the snakeoil key and certificate. All install-time state.Against the fourth build, which carries this changelog entry and nothing else of this branch:
That one path is
/etc/postgresql/17/main/postgresql.conf, and the difference is one line, the trailing comment of the line the fix writes:The value is byte identical,
pg_hba.confis identical, and the comment now names the file that writes it. That is the fix surviving the move, measured rather than asserted.The changelog entry alone accounts for the package line
turnkey-postgresql-19.02 against 3 and for three files (/usr/share/doc/turnkey-postgresql-19.0/changelog, itsmd5sums,/var/lib/dpkg/status), which is why the fourth build exists.The manifest records
units postgresql@1.0.0andbuild_units postgresql@1.0.0.Nothing was published: the staged
postgresqllayer,d5220c56, and its manifest were restored from the backup taken before the first build.Test plan:
tests/coverage.shunchanged by this branchappliance / build-and-boot, which fetches the published layerIndependent review, read-only. Verdict: Warning — not mergeable as it stands.
The extraction itself is faithful and decision 0010's prerequisites are genuinely
in place; what is not sound is the evidence around it.
Three merge blockers, shared with the sibling pull request:
clone
--branch v1.0.0, and neither unit repository has any tag or release.The documented build step fails with
Remote branch v1.0.0 not found. Sincedecision 0010's assembly step does not exist yet, this clone is the
assembly mechanism. Tag the unit, or pin a commit sha.
CONFLICTINGagainstmain, and the equivalencemeasurement was made against a tree that no longer exists.
mainhas sincegained merges that touch
Makefileandconf.d/main, including aroot.patched/prehook on the same target where fab applies the units. Allfour builds behind the "0 attributable differences" claim predate that. The
merged tree has never been built.
rebase. Verified by running the gate's own
entry_version/version_increasedagainst current
main.Two findings about the method, which outlive these pull requests:
/var/lib/mysql/**and/var/lib/postgresql/**, where only paths are compared and never the natureof the difference. Those directories hold
mysql/global_priv,mysql/user.*and
pg_authid. For a component whose build-time job is deleting accounts,the one directory the measurement cannot see is the one holding the accounts.
There is no real difference today — the review established that by diffing the
conf scripts against
common— but the reported measurement is not whatestablishes it.
scratch directory on the build host and the comparison step is committed
nowhere. Decision 0010 step 3 instructs re-running this comparison for every
future component; that instruction has no executable behind it.
Also recorded, and wider than these pull requests: the three green checks
never build the composed layer.
appliance / build-and-bootboots thepublished layer from the mirror, which on a recipe change is the code before
the change. Both bodies say so honestly with the box unticked. Tracked as
tracker#14.
Duplication has moved rather than gone.
commonstill carriesconf/mysql,conf/pgsql,overlays/mysql,overlays/pgsqland theirmakefiles, and they still have consumers —
keel-wordpressamong them. Nothingdetects divergence between the two copies, and
unit-postgresql/confhasalready diverged. Decide whether the
commoncopy is frozen with its consumersmigrating, or whether a check fails when the two drift.
One finding specific to this pull request, on top of the shared review comment.
Two build steps are dead on Debian 13, and the test fixture invents the file
that would make them work.
unit-postgresql/conf:32and:35:Against the real article on a PostgreSQL 17 host:
Neither pattern matches.
tests/conf.batsthen writes a fixture whose commentclaims it is what
pg_createclusterleaves behind, containing#password_encryption = onandshared_buffers = 32MB, and asserts the sedstransformed it. Two of eleven assertions pass against a file the build never
produces, and COVERAGE.md reports 100 percent on that basis.
The image is not wrong: the seds were equally dead in
common/conf/pgsql, sothe extraction really is equivalent, and PostgreSQL 17 defaults to
scram-sha-256 regardless — no security regression. What is wrong is that the
suite now certifies dead lines as working. Build the fixture from the installed
postgresql.conf.sample; then either delete the dead seds, which is a change tothe image and needs its own changelog entry, or assert they are no-ops and say
why.
The
listen_addressestests in the same file are the counter-example and thestandard the other two should meet: they drive the real default line, a
'*'line and a missing line, and assert the failure path.
Separately, before LAPP composes this component. The component sets
postgres/postgresby default, and the only removal lives inkeel-postgresql/conf.d/main. By decision 0013 LAPP composesunit-postgresqlonto
apache-php, not onto this recipe — so LAPP inherits a well-knownsuperuser password unless its own
conf.drepeats the removal, which is exactlythe copy-paste the split exists to prevent. It is documented in
conf-varsbutnothing enforces it. Bind the two halves together rather than documenting the
gap.
Superseded by the current build (common's pgsql.mk); the move to .deb overlays (decision 0036) is tracked separately.
Pull request closed