interfasys
Verified User
Here is a pretty common scenario when using CB
The problem
CB doesn't only use templates as is or doesn't only replace some of the templates' content before putting config files in place, it also generates partial or full config files, but only does so if we're not using custom configs.
Let's say I have httpd-aliases.conf in my custom folder and I've decided to let CB generate aliases for me by making changes in options.conf.
After rebuilding the configs, I'll see no change, because CB detected a file with the same name in the custom folder and simply copied it over.
That means that as CB evolves, we don't get the changes or fixes and we have no easy way of knowing how CB is now generating some of the configs.
I understand that merging changes can break havoc, but maybe more templates could be used and content replaced with regexp?
Or maybe CB could generate the files it wants to using a different file extension?
That way we would have httpd-aliases.conf.cb in the same folder and could quickly check for modifications by comparing it with our file.
What other strategy would work?
- Configure PHP using CB's default templates
- Decide that some of the generated files don't look quite right
- Copy a few templates to the custom folder
- Modify the custom template
- Generate configs again
The problem
CB doesn't only use templates as is or doesn't only replace some of the templates' content before putting config files in place, it also generates partial or full config files, but only does so if we're not using custom configs.
Let's say I have httpd-aliases.conf in my custom folder and I've decided to let CB generate aliases for me by making changes in options.conf.
After rebuilding the configs, I'll see no change, because CB detected a file with the same name in the custom folder and simply copied it over.
Code:
if [ -e ${WORKDIR}/custom/ap2/conf/extra/httpd-alias.conf ]; then
cp -pf ${WORKDIR}/custom/ap2/conf/extra/httpd-alias.conf /etc/httpd/conf/extra/httpd-alias.conf
else
I understand that merging changes can break havoc, but maybe more templates could be used and content replaced with regexp?
Or maybe CB could generate the files it wants to using a different file extension?
That way we would have httpd-aliases.conf.cb in the same folder and could quickly check for modifications by comparing it with our file.
What other strategy would work?