The four recipes carry the same build time archive block, and it should be one shared thing #8
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/tracker#8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Raised from tracker#7, which is the second defect that had to be fixed four times. The first was the stale bootstrap copy of the project archive (
bin/keel-archive-check, fixed in keel-nodebb and keel-wordpress and missing in keel-mariadb and keel-postgresql until tonight). The second was verification:[trusted=yes]with no keyring, in all four.What is duplicated today
keel-nodebb, keel-mariadb, keel-postgresql and keel-wordpress each carry:
bootstrap/postandroot.patched/preblock inMakefile, withKEEL_APT_REPO,KEEL_APT_DIST,KEEL_APT_KEYRING,KEEL_APT_KEYRING_PATH,KEEL_APT_KEYandKEEL_STAGING_LIST, about 40lines including the comment;
bin/keel-archive-check, byte for byte identical, 142 lines;tests/archive-check.bats, byte for byte identical, 27 tests;--include-patternentry and a COVERAGE.md row for it, four times.The fingerprint of the staging signing subkey is written down in four
Makefiles. A key rotation is therefore a four repository change, and a build
that reads the archive without verifying it is four edits away from coming
back.
Where it should live
keel-linux/common, the fab tree every recipe already includes through$(FAB_PATH)/common/mk/turnkey.mk, and which is already the home of theother half of this:
common/removelists-final/turnkey, which takes the copy,the source entry and the keyring back out of the image for every recipe at
once. Concretely:
common/mk/keel/staging-archive.mkwith the variables and the two hooks, soa recipe includes one line instead of copying forty;
common/bin/keel-archive-check, one copy, named from that mk file;common/tests/archive-check.bats, measured bycommon/tests/coverage.sh,whose threshold is already 100.
The four recipes then drop
bin/,tests/archive-check.bats, their includepatterns and their COVERAGE.md rows, and the staging key fingerprint is written
down once.
Why it was not done tonight
tracker#7 was urgent: the published
mariadblayer carried keel 0.2.1 and thetwo node replication gate on keel-mariadb#10 could not pass. Moving the block
into the shared tree in the same pass would have put a five repository
refactoring, and a common deployment the four recipes then depend on, in front
of a rebuild that was already blocking a merge. The defect is fixed in all four
and the duplication is recorded here instead.
The cost of waiting is bounded and known: one more four way edit if the staging
key rotates before this lands.