| 1742 |
1742 |
|
|
| 1743 |
1743 |
|
// --- glibc_check(binary) -> string: assert the build host did not produce
|
| 1744 |
1744 |
|
// a binary the service host's glibc is too old to exec. Aborts the run
|
| 1745 |
|
- |
// if it did; returns "needs X, host has Y" for the log if it did not. ---
|
|
1745 |
+ |
// if it did; returns "needs X, host has Y" for the log if it did not.
|
|
1746 |
+ |
//
|
|
1747 |
+ |
// WHICH RECIPES CALL THIS, AND WHY THE OTHERS MUST NOT. The rule is not
|
|
1748 |
+ |
// a style preference and it is not optional: this reads the recipe's
|
|
1749 |
+ |
// `[[deploy]]` entry to learn which machine runs the bytes, so a recipe
|
|
1750 |
+ |
// with no `[[deploy]]` cannot call it at all.
|
|
1751 |
+ |
//
|
|
1752 |
+ |
// - A service that installs ITSELF (`[[deploy]]` present: magicmirror,
|
|
1753 |
+ |
// wam, mnw-cli) SHOULD call it. Bento is both builder and installer
|
|
1754 |
+ |
// there, so it knows the service host, and nothing downstream will
|
|
1755 |
+ |
// check on its behalf.
|
|
1756 |
+ |
// - A service HANDED OFF to Sando (`[[deploy]]` absent: pom) MUST NOT,
|
|
1757 |
+ |
// and the absence is the Sando/Bento boundary rather than an omission.
|
|
1758 |
+ |
// Which machine runs the bytes is environment knowledge, which is
|
|
1759 |
+ |
// Sando's half. Sando covers it on the far side, more strongly: it runs
|
|
1760 |
+ |
// the node's own loader against the rsynced bytes before the symlink
|
|
1761 |
+ |
// swap (`sando_daemon::deploy::ldd_guard_script`), and since 0.2.12
|
|
1762 |
+ |
// also compares the bundle's glibc floor against the node's declared
|
|
1763 |
+ |
// `libc` before the rsync (`check_bundle_fits_node`).
|
|
1764 |
+ |
//
|
|
1765 |
+ |
// So a new service recipe takes its answer from whether it carries a
|
|
1766 |
+ |
// `[[deploy]]` table, not from whichever sibling recipe it was copied
|
|
1767 |
+ |
// from. Wiki `sando-bento-boundary`, `host-base-images`. ---
|
| 1746 |
1768 |
|
{
|
| 1747 |
1769 |
|
let ctx = ctx.clone();
|
| 1748 |
1770 |
|
engine.register_fn(
|