.sopm Reference
The .sopm (Source OPM) is the XML source file of a package. The .opm file is generated from it during the build process. This reference describes the most common elements.
Root Element
| Fork | Root Element | Example |
|---|---|---|
| OTOBO | otobo_package | <otobo_package version="1.1"> |
| Znuny / OTRS CE | otrs_package | <otrs_package version="1.0"> |
The content is otherwise identical, which is why a package is usually portable across forks.
Required Elements
<Name>MyPackage</Name> <!-- CamelCase, no spaces -->
<Version>1.0.0</Version> <!-- major.minor.patch -->
<Framework>11.0.x</Framework> <!-- at least one, format major.minor.x -->
<Vendor>Example GmbH</Vendor>
<License>GPL-3.0</License>
<Description Lang="en">...</Description>
<Framework>
Declares the compatible framework version lines. Multiple lines are allowed and act as the key to cross-fork compatibility:
<Framework Minimum="11.0.9">11.0.x</Framework>
<Framework>7.0.x</Framework>
The optional Minimum attribute enforces a minimum patch version. Read more in the Compatibility Guide.
<Filelist>
Lists all files included in the package with their path and Unix permissions:
<Filelist>
<File Permission="660" Location="Kernel/Config/Files/XML/MyPackage.xml" />
<File Permission="644" Location="var/httpd/htdocs/js/MyPackage.js" />
</Filelist>
Dependencies
<PackageRequired Version="11.0.1">ITSMCore</PackageRequired>
<ModuleRequired Version="3.0">JSON::XS</ModuleRequired>
PackageRequired— another.opmpackage must be installed.ModuleRequired— a Perl module (CPAN) must be available.
Install / Upgrade Sections
<DatabaseInstall Type="post">
<TableCreate Name="my_table">
<Column Name="id" Required="true" PrimaryKey="true" AutoIncrement="true" Type="INTEGER" />
<Column Name="name" Required="true" Size="200" Type="VARCHAR" />
</TableCreate>
</DatabaseInstall>
<CodeInstall Type="post"><![CDATA[
$Kernel::OM->Get('Kernel::System::MyModule')->Setup();
]]></CodeInstall>
Counterparts: DatabaseUninstall, CodeUninstall, DatabaseUpgrade, CodeUpgrade. The Type controls the timing (pre/post).
Tools
- .sopm Generator — create manifests via form
- .sopm Validator — check existing manifests
