<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:DengXian;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@DengXian";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-AU link="#0563C1" vlink="#954F72" style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal>Hey all,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Updating configuration files like log4perl.conf can be really painful. Surely, there has to be a better way? <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Jonathan and I talk a bit about this on “Bug 32791 - Log4perl configuration files need a tool for updating on package upgrade”.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>My first draft uses a bespoke tool, but this morning I learned about the “ucf” utility, which was designed to manage dynamically generated configuration in a similar way to how we manage configuration files packaged in koha-common!<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>If the installed file hasn’t been manually updated locally, it will be replaced with the newest generated version. If the installed file has been changed, then the user will be prompted with some options about installing the package version, retaining the local version, viewing a diff of the two files, or even doing a 3 way merge. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I think 99.9% of cases will show a lot of these files never get locally changed, so it would just automagically provide updated configuration.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>And for that 0.1% of cases where the sysadmin has updated the configuration, they’d have a familiar industry standard UI to work with. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I’m happy to provide a patch, but I’d like to get some more feedback first. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I think it would work very well for log4perl, and it could be useful for other configuration files too.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>(The only danger I see is when you have a large number of instances with local changes, and you get bogged down with the UI. But there are some ENV variables that can be used to auto-choose which version to install. The utility leaves behind files with extensions like “.ucf-dist” and “.ucf-old” as well so you can always go back and fix up your conf after the fact manually.)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Anyway, food for thought!<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>David Cook<o:p></o:p></p><p class=MsoNormal>Senior Software Engineer<o:p></o:p></p><p class=MsoNormal>Prosentient Systems<o:p></o:p></p><p class=MsoNormal>Suite 7.03<o:p></o:p></p><p class=MsoNormal>6a Glen St<o:p></o:p></p><p class=MsoNormal>Milsons Point NSW 2061<o:p></o:p></p><p class=MsoNormal>Australia<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Office: 02 9212 0899<o:p></o:p></p><p class=MsoNormal>Online: 02 8005 0595<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>