VRT System/Customization

From Wikitech

Local Customizations


The codebase has some local customizations, which are applied as Znuny packages. The packages are stored in the database in otrs.package_repository and can be reapplied after update via the web UI or the command line The packages can also be downloaded from within the web interface, when logged in as an admin user:

Admin-->Package Manager-->{packages listed under Local Repository}-->Download

via the command line, packages can be reapplied with:

sudo -u www-data /opt/otrs/bin/otrs.Console.pl Admin::Package::ReinstallAll

The packages are in gerrit in the operations/software/otrs repo. Their structure is similar to the way the VRTS source code is structured. The reason for that is because OTRS/Znuny packages can override a "proper" file. e.g.

  • Custom / Kernel / Output / HTML / Templates / Standard / AgentDashboardUserOnline.tt

will override

  • Kernel / Output / HTML / Templates / Standard / AgentDashboardUserOnline.tt

That makes it a bit harder then just maintaining as patches as we have to keep the entirety of the files in sync with upstream and not just the differences (which are arguably very small). Maintaining consists of fetching the new files the package overrides per version and manually merging the new upstream stuff.


Installing the packages requires that they are first built. Building the packages happens on the command line using:

sudo -u otrs /opt/otrs/bin/otrs.Console.pl Dev::Package::Build --module-directory packages/WikimediaTemplates/ packages/WikimediaTemplates/WikimediaTemplates.sopm /tmp

In the command above, the module directory is just a checkout of the repo mentioned above. /tmp is the output directory and the path to the .sopm file is so the code is bundled alongside the description. The .sopm file is an XML file and the format is pretty self-explanatory.


Installing the package happens using:

sudo -u www-data /opt/otrs/bin/otrs.Console.pl Admin::Package::Install /tmp/WikimediaTemplates-1.0.18.opm

The version (1.0.18 in the example above) will need adjustment per package version and is defined in the .sopm file above.