Repository navigation
Compose the PostgreSQL component instead of including the shared tree - #7
marcos-mendez wants to merge 1 commit into
Conversation
The recipe stops including mk/turnkey/pgsql.mk, stops naming the server packages, and composes keel-linux/unit-postgresql as unit.d/postgresql. fab resolves the component's plan with this one, applies its overlay, runs its conf script with the PGSQL_PASS its conf-vars asks for, and bt-layer records it in the layer manifest as "units postgresql@1.0.0". Decision 0013 is why: a database is a component and not a parent layer, so LAMP and LAPP can share one apache-php layer instead of being children of two different database layers. Decision 0010 is how, and it asks for the proof to be a comparison rather than a claim. listen_addresses = '::1,127.0.0.1' moves with the server. The line was written here last night, when the layer was found binding the IPv4 loopback alone because Debian's /etc/hosts never maps ::1 to localhost. It belongs to whoever installs the server: LAPP will carry the component without carrying this recipe, and a fix that lives here would have to be copied there. What stays here is the check that the built image has the line, so the component is verified by the recipe rather than trusted, and the boot test still proves what the cluster actually binds on a running machine. unit.d/ is ignored by git. Materialising it from the pin is the assembly step decision 0010 names as work of the project, and it does not exist yet: the clone in README.rst is that step today, and the layer manifest is the record of what a build applied.
|
Independent review, read-only. Verdict: Warning — not mergeable as it stands. Three merge blockers, shared with the sibling pull request:
Two findings about the method, which outlive these pull requests:
Also recorded, and wider than these pull requests: the three green checks Duplication has moved rather than gone. |
|
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 Against the real article on a PostgreSQL 17 host: Neither pattern matches. The image is not wrong: the seds were equally dead in The Separately, before LAPP composes this component. The component sets |
|
Superseded by the current build (common's pgsql.mk); the move to .deb overlays (decision 0036) is tracked separately. |
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 layer