Moved to https://gitlab.com/jhinrichsen/opsi
This project is dead, abandonded, unmaintained. Documentation and code for history/ archive reasons only.
Create an OPSI package (opsi.org) without OPSI itself.
You can always use the OPSI provided opsi-makepackage
command, previously known as opsi-makeproductfile
.
This requires a complete OPSI setup though.
The suggested way is to use the provided virtual image which makes VMWare part of the game.
As of OPSI 4.1, the commandline tools are written in Python, which would make a standalone non-VMWare build pipeline cumbersome to set up.
So if your packaging is separated from your depot servers, this standalone tool might come in handy.
One single executable, no dependencies.
$ opsi-mkpkg -h (1) Usage: opsi-mkpkg [key1=value1]* -control string OPSI control file (default "./OPSI/control") -datadir string data directory used as input (default "./CLIENT_DATA") -into string OPSI package destination directory (default ".") -keep keep OPSI interim workbench for debugging purposes -opsidir string OPSI directory used as input (default "./OPSI")
-
Display help
$ opsi-mkpkg --control testdata/simple/OPSI/control --datadir=testdata/simple/CLIENT_DATA --opsidir=testdata/simple/OPSI (1)
-
Create
simple_1.2.3-4.opsi
package in local (.
) directory
Control files may contain placeholder that are replaced with current values when creating the package. Given the following controlfile template snippet:
[Package] version: {{.package_version}} (1) depends: [Product] type: localboot id: template name: Template description: Template based control file advice: version: {{.product_version}} (2)
<1>, <2> template values
Template values are written in default Go template syntax using mustache-like double curly braces and a leading dot .
.
Actual values can be passed via the commandline:
$ opsi-mkpkg package_version=4 product_version=1.2.3 (1) $ opsi-mkpkg package_version=${BUILDNO} product_version=${VERSION} (2)
-
hardcoded values
-
Using the Jenkins build number for package version and a VERSION environment variable
Note that there is no OPSI related naming convention for naming template values, use whatever you like.
The original OPSI packaging command has validity checks when creating a control file, or a package.
E.g. opsi-makepackage
will check the version number and bail out if it does not fit an internal scheme.
opsi-mkpkg
will allow you to create packages containing an illegal version number, e.g. 3_1_2
.