Skip to content

Maintain a small patch overlay for libntech/cfengine defects load-bearing on the generic bundle #3

Description

@djbclark

Why

policy/tendcf_services.cf (v1, launchd-only generic bundle, shipped
222da45) now actually depends at runtime on CFEngine/libntech code paths
we've found real defects in this week, filed upstream but not yet reviewed:

  • The bundle's plist rendering uses template_method => "mustache"
    (libntech mustache.c).
  • Any host_specific.json string value containing a backslash (env
    values, argv elements, CMDB data generally) round-trips through
    libntech's JSON parser, which currently double-decodes escapes.
  • host_specific.json itself is loaded through cfengine/core's CMDB
    loader, where one malformed entry used to drop its entire section.

17 PRs are open across cfengine/core and NorthernTechHQ/libntech with
essentially no reviewer engagement yet on the newest ones. Waiting on
upstream review shouldn't block testing/using our own bundle against a
correct build in the meantime.

Decision

Don't maintain full parallel forks of libntech/cfengine (ongoing
rebase/build/distribute burden this design has otherwise avoided — see
the guide's narrow "fork only to patch" stance for nix2cf/Shizuku). Keep
a small overlay pinned to a specific upstream commit, containing only
patches that are load-bearing for code we've actually shipped. Drop each
patch the moment its PR merges upstream.

Scope (exact commits, from docs/architecture/upstream-register.md)

libntech, base 0c0620d — two independent branches, no file overlap,
mergeable directly:

cfengine/core, base a0bca6aaf:

Mechanics (not yet done)

  1. One merge commit combining libntech's two branch tips onto 0c0620d.
  2. Point cfengine/core's libntech submodule at that merged commit.
  3. Build core at 8f0076b81 with the updated submodule pointer.
  4. Document the recipe (base commits + branches) somewhere reproducible —
    this issue, or a docs/architecture/ note if it grows — so a future
    session doesn't have to re-derive it from upstream-register.md.

No CI wiring yet: tendcf doesn't build/ship anything today (see README —
"Nothing described here is deployed"). This overlay is for local testing
of .cf policy against a correct build, the same way this session
verified policy/tendcf_services.cf ad hoc against the core-cmdbkey
worktree. Real packaging/pinning belongs to whenever tendcf-agent's build
pipeline actually exists — don't build that infra early.

Close when

Each component patch drops off this list as its upstream PR merges. Issue
closes when the list is empty (upstream has caught up) or when a real
build pipeline supersedes this with proper pinning.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions