Create a folder containing your overlay at the root of your cfbs project.
For example:
[root@hub local_deploy]# find . | grep -v git . ./overlay ./overlay/controls ./overlay/controls/def.cf ./overlay/controls/cf_execd.cf ./postfix.cf ./cfbs.json
Add the overlay as a module to your cfbs.json after the masterfiles entry:
{
"name" "My cfbs project",
"type": "policy-set",
"build": [
{
"name": "masterfiles",
"description": "Official CFEngine Masterfiles Policy Framework (MPF)",
"tags": ["supported", "base"],
"repo": "https://github.com/cfengine/masterfiles",
"by": "https://github.com/cfengine",
"version": "3.18.2",
"commit": "a87b7fea6f7a88808b327730a4ba784a3dc664eb",
"added_by": "cfbs add",
"steps": ["run ./prepare.sh -y", "copy ./ ./"]
},
{
"name": "./overlay/",
"description": "Local subdirectory added using cfbs command line",
"tags": ["local"],
"added_by": "cfbs add",
"steps": [
"directory ./ ."
]
}
]
}
Now cfbs build
will build the mpf from 3.18.2 but then overwirte controls/cf_execd.cf
and controls/def.cf
with my custom versions. From there it’s easy enoguh to diff between build steps to see the difference of my customized mpf files.
@basvandervlies I know you were looking for this, did this work out the way you hoped?