Skip to content

systemd patch target not found

Source: Troubleshooting reference

Symptom: Linux bootstrap reports systemd patch target not found after a Homebrew formula update.

Cause: the old patch matched a literal "python3.14" interpreter and pinned lxml to 6.0.2. The formula now passes a python3 variable to virtualenv_create and declares its own newer lxml resource. Matching only the new interpreter spelling would still install the wrong lxml version.

Confirm: inspect the interpreter and resource in the local formula:

Terminal window
brew cat systemd | grep -A 5 -E 'resource "lxml"|virtualenv_create'

Fix: update the checkout and apply the maintained patch:

Terminal window
bash ~/dotfiles/install/patch-homebrew-systemd.sh

Expect a successful patch report, or an already-applied report on the next run. The patch retains the formula’s interpreter expression and obtains lxml’s version from resource("lxml").version. Linux builds require a wheel for that exact version and fail if none is available; macOS retains its original resource install. Unsupported formula shapes produce a visible failure without being rewritten. DF_PATCH_BREW_SYSTEMD=0 explicitly skips the patch.

This repairs the formula preparation step; it does not rebuild systemd. install/linux-packages.sh applies the patch before its package pass. See the patch source and Homebrew’s formula cookbook.