eLux SDK VM for eLux RP 6 Virtual machine for software development based on eLux and for creating eLux packages with the eLux Builder Kit

Last edited: 2021-05-20

0. Legal information 3 1. About the eLux SDK VM 4 1.1. Kernel development 5 1.2. System packages 5 1.3. Command line tool 6 1.4. Example packages 7 2. Starting eLux Builder Kit 8 3. eLux Builder Kit interface 9 3.1. Main window 9 3.2. Menu options 10 3.3. Context menus 11 3.4. File Browser 12 3.5. Package properties in the Properties Editor 14 3.6. Build section 16 3.7. Output Window 16 4. Creating individual packages in the eLux Builder Kit 17 4.1. Creating a new workspace 17 4.2. Creating a folder 17 4.3. Defining new packages 18 4.4. Creating a Symbolic link 19 5. eLux Builder Kit preferences 20 5.1. Global tab 20 5.2. Build tab 22 5.3. EPM/FPM tab 22 5.4. Invalid settings 23 6. The epkg tool 24 6.1. How to use the epkg tool 25 6.2. How to configure the epkg tool 26 6.3. Metafile structure 29 6.4. Examples of use 33 7. Other 35 7.1. Citrix virtual channels 35 7.2. Scripts on configuration update 35 0. Legal information

0. Legal information

© 2021 Unicon Software Entwicklungs- und Vertriebsgesellschaft mbH

This document is copyrighted. All rights reserved. No part of this document may be reproduced or trans- mitted in any form or by any means, without our express consent. Information in this document is subject to change without notice. We disclaim all liability regarding correctness, completeness and topicality of the information contained herein and any errors or damage resulting from the information provided. eLux® and Scout Enterprise Management Suite® are registered trademarks of Unicon Software Entwicklungs- und Vertriebsgesellschaft mbH in the European Union, GB and the United States. ScoutaaS® is a registered trademark of Unicon Software Entwicklungs- und Vertriebsgesellschaft mbH in the European Union, GB, the United States and Japan. All other product names are registered trademarks of their relevant owners. Unicon Software Entwicklungs- und Vertriebsgesellschaft mbH Ludwig-Erhard-Allee 26 76131 Karlsruhe +49 (0)721 96451-0

3 1. About the eLux SDK VM

The eLux SDK VM is a virtual machine equipped with Software Development Kit tools for eLux RP 6 (64-bit) that we provide upon request. The Linux system comes as a VMware image and runs on all VMware Server versions. We provide a version of our eLux SDK VM which corresponds to the latest eLux version.1

Version Description Deployment eLux SDK VM 3.9 contains the eLux Builder Kit as an .ova template for eLux RP 6 (64-bit) In your VMware environment, use the Deploy OVF Template option to install the machine from the template. epkg for eLux SDK Command line tool for creating Install the epkg packages on an VM 3.9 eLux RP 6 packages system.

The eLux-Builder-Kit is a development environment that allows skilled Linux developers or admin- istrators to package any software as .epm and .fpm files. You can also compile your own source code and/or kernel drivers. You can include any packages built with the eLux Builder Kit in an eLux image definition file (.idf) by using ELIAS. Alternatively, use our epkg tool to build eLux packages from the command line. You can also automate the process of building packages by using epkg.

Using the eLux SDK requires knowledge of

Network and communication hardware Administration of Linux operating systems Administration of eLux ELIAS features

Logon

The following system accounts are available: root – elux elux – elux The home directory of the user elux is /home/elux. Log on with user elux, either in the VMware console or remote via ssh.

1For example, eLux SDK VM 3.9 relates to eLux RP 62103 and 2104

4 1. About the eLux SDK VM

Note Alternatively, click Applications > Internet > X11VNC Server after you have logged on to the VMware console and use a VNCviewer to connect.

The machine is configured to use DHCP by default.

Creating eLux packages

When the system starts, the Mate Desktop is started automatically and you are logged in as user elux. Use the eLux Builder Kit. A good way to become familiar with the program is to build the pack- ages of the example workspace. For further information, see Example package. Alternatively, the command line tool epkg is provided. For further information, see The epkg tool.

Windows Shared Folder (Samba)

The samba4 server package is installed on the image but not yet configured. To configure the samba server, see https://help.ubuntu.com/lts/serverguide/samba-fileserver.html or use the command man smb.conf to read the official smb.conf manual.

1.1. Kernel development

The kernel is patched and pre-configured. The compiled kernel modules can be found as Debian pack- ages under /usr/src/. For eLux RP 6, only the 64-bit version is supported.

1.2. System packages

The eLux RP 6 system is based on Ubuntu 16.04 "Xenial". All packages modified or backported by Unicon are included in this image. Any additional package can be obtained with the usual Debian way ((apt-get oder aptitude).

5 1.3. Command line tool

– only for SDK VM 3.x – epkg is a command line tool for building eLux packages which can also be used to automate the build- ing process. In our example workspace, under /home/elux/workspace/examples/build, you will find the build.sh script that you can use to build the example package.

Converting packages

During the build process, epkg sets up an eLux Builder Kit workspace. It allows you to easily edit the package meta data. To enable epkg to use the eLux Builder Kit, you need to convert the package tree. You can do so using epkg. For an example, see the convert folder and script: /home/elux/workspace/examples/convert/convert.sh

After you have built the example package, the created workspace can be found under /home/elux/workspace/examples/build/tcpdump/output/.ebkworkspace. For ease of use, this workspace is also included in the recently used list of the File menu. You can now edit the meta data for the packages in the eLux Builder Kit, and then start the final build pro- cess. The final package files (.epm, .fpm) can be found in the output directory: /home/elux/workspace/examples/build/output/container/UC_RP6-1.0-1/

epkg also offers the option to install packages. They are copied from the output directory to a defined container directory (example: /home/containers). The file /usr/share/epkg/settings.ini holds the configuration for installing and signing pack- ages. For further information, see The epkg tool.

6 1. About the eLux SDK VM

1.4. Example packages

For the eLux Builder Kit, we have included an example workspace that provides an EPM with FPMs: eLux debug: /home/elux/examples/packaging/debug/output/devel1 SDK The workspace contains examples for creating eLux packages from development tools such VM as gdb, file, strace, ltrace, valgrin, less, coredump, tcpdump, 3.9 vim, libpython, systemd-debug-shell, eluxbuild

Building example packages

1. Open the example workspace (.ebkworkspace) of the specified directory. To do so, you can use the Recently used entry of the File menu. 2. Select the top level (the EPM). 3. Click the Build button.

All packages of the workspace are built. The resulting package files (.epm, .fpm) can be found in the output directory: eLux SDK VM /home/elux/examples/packaging/devel/output/container/UC_ 3.9 RP6_X64-1.0-1/

Building a kernel module

– for eLux SDK VM 3.5 and later versions– Under /home/elux/examples/compiling/kernel_module/, you will find a make file. Use the make command to build a kernel module which you can load into eLux.

Important

The kernel module stands in dependence to the kernel of the eLux version. For example, a ker- nel module built with the eLux SDK VM 3.5 will only work with eLux RP 6.7.

1from eLux SDK VM 3.6

7 2. Starting eLux Builder Kit

1. On the desktop, double-click the application icon of the eLux Builder Kit (EBKGUI), or at the com- mand prompt, enter ebkgui. 2. To sign your packages, edit the certificate settings as required. For further information, see eLux Builder Kit preferences. 3. Open an existing or create a new workspace.

The eLux Builder Kit main window is displayed.

Familiarize yourself with the interface (see main window) and try out the example.

To start your own project, create a new workspace. Then define your packages, edit the package properties and the build settings, before you start the build process.

8 3. eLux Builder Kit interface

3. eLux Builder Kit interface

3.1. Main window

Legend 1 File Browser 2 Workspace Browser Shows the structure of the currently opened workspace including EPMs, FPMs, directories, files and Symbolic Links 3 Properties Editor Shows the properties of the object selected in the Workspace Browser with Property and Value You can edit most of the properties directly in their field or by using the ... button in the Value field. Dimmed Properties cannot be modified. 4 Build settings 5 Output window

9 3.2. Menu options

File menu

Option Description New workspace Generates a new workspace Open workspace Opens an existing workspace Save Saves the currently opened workspace Import EPM folder Imports an EPM from another workspace into the opened workspace Export selected Exports an EPM from the workspace into any folder EPM Link to EPM folder Links an EPM from another workspace into the opened workspace Exit Closes the eLux Builder Kit application Recently used The workspaces opened most recently are made available for re-opening. In workspaces addition, an example workspace is shown.

Edit menu

Option Description Reload work- Reloads the currently open workspace space Strip file Executes the strip command for the selected file Calculate FPM- Calculates the size and number of files of the selected FPM Size Calculate all sizes Calculates the size and number of the files of all FPMs Create Symbolic Creates a new Symbolic Link Link Move FPM up Moves the selected FPM up by one position Move FPM down Moves the selected FPM down by one position

Build menu

Option Description Build Workspace Builds all packages of the current workspace Build selected Builds only the package of the currently selected object. If the workspace is selected, this corresponds to the Build Workspace com- mand. If an EPM is selected, the EPM and its FPMs are built.

Settings menu

10 3. eLux Builder Kit interface

Option Description Preferences Opens the Settings dialog Sign Settings Opens the Settings dialog and jumps to the settings for signing packages

Tools menu

Option Description EBKViewer Starts the EBKViewer, if installed Fix FPM SORT_ Fixes problems with the sorting order of FPMs ID

Log menu

Option Description Clear output win- Deletes the contents of the output window dow View build log file Opens the build log file of the currently opened workspace and displays it. Delete build log Deletes the build log file of the currently opened workspace file

3.3. Context menus

For the Workspace Browser and the File Browser, context menus provide quick access to frequently used commands.

Context menus in the Workspace Browser

The Workspace Browser provides a context menu for EPMs, FPMs, directories and files.

Option (EPM) Description Add new FPM Adds a new FPM for the EPM Delete EPM Deletes the EPM Build EPM – but Generates only the EPM without its FPMs not its FPMs This feature is only available in the context menu. Hand down … The values of the properties Version and Release of the subordinate FPMs are overwritten by the EPM values. This feature is only available in the context menu.

Option (FPM) Beschreibung Add new Folder Adds a new directory

11 Option (FPM) Beschreibung Delete FPM Deletes the FPM Create Symbolic Creates a Symbolic Link to a file or directory Link Calculate size and Calculates the size and number of files files Move down/up Moves the selected FPM down/up by one position

Option (File) Description Delete File Deletes the file from the FPM Strip Executes the strip command for the selected file Edit Opens the file for editing in an external editor (see preferences). This option is available for every file, even binary files. This feature is only available in the context menu.

Context menus in the File Browser

The File Browser provides a context menu for directories and files.

Option Description Directory File Add selected Adds the object with its content to the FPM or directory ✓ ✓ selected in the Workspace Browser Add with path Adds the object with its superior directories to the FPM or ✓ ✓ directory selected in the Workspace Browser Set as base dir Defines the top level of the File Browser ✓ Edit Opens file for editing in an external editor ✓

3.4. File Browser

The File Browser is used to add files and directories to an FPM. In addition to files and directories, the browser also displays the size in bytes, date/time of the last changes and the access rights (in octal numeral system).

Adding a file or directory to an FPM

Note The maximum size of an FPM is restricted to 100 MB.1 If you need more disk space for your installation, create a second FPM.

1from eLux RP 6.7 (before: 65 MB)

12 3. eLux Builder Kit interface

1. In the Workspace Browser, select the relevant FPM or subordinate directory. 2. In the File Browser, to add an object with its content, right-click the relevant file or directory, and on the context menu, click Add selected. 3. In the File Browser, to add an object with its superior directories, right-click the relevant file or dir- ectory, and on the context menu, click Add with path.

Files and directories that you add, keep the following properties: Date and time of the last change Owner Group File permissions

Defining top level of File Browser On the context menu of the relevant directory, click Set as base dir.

13 3.5. Package properties in the Properties Editor

Some package properties (meta data) can be edited directly in the fields of the Properties Editors. Other properties require a specific editor to be modified. Then, for the selected property, a button is shown in the Value field.

To edit a property of an EPMs or FPM which requires a specific editor, click .

Description, Pre-/Postinstall, Pre-/Postuninstall and Comment

For these properties, a plain text editor is used. Enter or modify text and confirm with Save.

Requires and Conflicts

Note The Requires property of an EPM always includes the entry %ELUX_BASEREQ. The entry specifies that the package being created requires an installed eLux-BaseOS.

Option Description Property entries Lists the defined entries for Requires or Conflicts. list Format: Package name Operator Version If you select an entry, you edit it in the Entry settings section. Delete The selected entry is deleted. New Entry Creates a new entry NewEntry

14 3. eLux Builder Kit interface

Option Description Packagename Name of the entry The name must correspond to the name of another existing package. Operator Operator that applies to the version defined in Version If the version of a package is irrelevant, select the operator . The entry then is applied to all versions of the package in Packagename. Version Specifies the version of the package defined in Packagename.

License

To obtain a valid license for your package, please contact Unicon Software Entwicklungs- und Ver- triebsgesellschaft mbH by e-mail: [email protected].

Option Description Save Enabled only if all three entry fields have been filled correctly Clear Deletes the current license To finally delete the license, click Save.

Containers

In this editor, you define for which container the EPM or FPM will be created. The setting affects only the current package.

Installoption

– only für FPMs –

Option Beschreibung Mandatory FPM must be installed Install Choose between two sub-options: as default – The FPM , but can be deselected in ELIAS. optional – The FPM is not installed by default, but can be selected in ELIAS for the installation. Force uninstall – uindependent of Mandatory or Install – instead of update Before an FPM package is installed, eLux is forced to first uninstall the old FPM package, if available, instead of performing an update.

15 3.6. Build section

The Build section helps you define some options such as whether the packages are signed and packed into a ZIP archive. These settings are saved within the workspace and are applied when the workspace is loaded.

Option Description Build - Container Target container Output Directory Target directory where the created packages, signatures and the zip archive are copied to. eLux Builder Kit automatically creates subdirectories with the con- tainer’s name in the output directory Build Options Sign packages – The created packages are to be signed and verified in ELIAS for a valid signature. Only available if the path for the signing program eluxsign and the key and cer- tificate are defined in the preferences Create ZIP archives – For each EPM, a separate ZIP archive is created. The archive contains the EPM, all FPMs and the signatures for the EPM and FPMs. Build Starts the build process for the selected EPM or FPM in the Workspace Browser. If the whole workspace is selected, the build is executed for all contained pack- ages. View Log Displays the log file of the workspace The log file includes detailed information about the creation of packages.

3.7. Output Window

In the output window, eLux Builder Kit displays status messages such as Progress of the current build process Creation of a new workspace Loading/Saving a workspace

Deleting messages from the output window Select the menu option Log > Clear output window.

16 4. Creating individual packages in the eLux Builder Kit

4. Creating individual packages in the eLux Builder Kit

To create your own packages, first define a new workspace and then EPM and FPM packages includ- ing meta data.

4.1. Creating a new workspace

1. Click File > New Workspace. 2. Edit the following fields:

Option Description Workspace Name of the new workspace name Workspace dir- Target directory for the new workspace ectory Use workspace In the selected target directory, a subdirectory with the workspace’s name is name to create a created. The workspace will be saved in this subdirectory. subdirectory Important: If you clear this option, the target directory must be empty.

3. Confirm with OK.

The new workspace is created and loaded into the Workspace Browser.

Subsequently, you can create EPMs and FPMs, see Defining new packages.

4.2. Creating a folder

1. In the Workspace Browser, select the relevant FPM or one of its subfolders. 2. Click Add or right-click the object and click Add new folder on the context menu. 3. Enter a name for the folder and confirm with Finish.

Continue to create folders or use the File Browser to add files to this folder.

17 4.3. Defining new packages

EPMs and FPMs are added as objects to an existing workspace.

Rules for naming packages

Allowed characters are a-z, A-Z, 0-9, _ We recommend that you avoid uppercase letters. Package names must be unique. A package name may only exist once, regardless of whether it is an EPM or FPM. Note, that a unique package name is also relevant for provides, conflicts and requires. Package names are composed of the following elements: --..[epm|fpm] Beispiel: baseosrp-6.8.4-1.UC_RP6_X64.epm Do not rename package files after the build process.

4.3.1. Adding an EPM

1. In the Workspace Browser, select the workspace object (top level). 2. Click Add or Right-click the workspace object, and on the context menu, click Add new EPM . 3. Enter a name for the EPM and confirm with Finish.

Subsequently, edit the properties of the EPM in the Properties Editor, see Package properties in the Properties Editor. Also, you can add further EPMs or FPMs to this EPM.

4.3.2. Adding an FPM

1. In the Workspace Browser, select the relevant EPM. 2. Click Add. or Right-click the EPM Object, and on the context menu, click Add new RPM. 3. Enter a name for the FPM and confirm with Finish. 4. Select the FPM in the Workspace Viewer to edit the FPM properties with the Properties Editor. You can also create additional FPMs or add files, directories and Symbolic Links to the FPM.

18 4. Creating individual packages in the eLux Builder Kit

To add objects to the FPM, use the File Browser. For further information, see File Browser.

Subsequently, edit the properties of the FPM in the Properties Editor, see Package properties in the Properties Editor. Also, you can add further FPMs or add a symbolic link to the FPM.

4.4. Creating a Symbolic link

A Symbolic Link is a kind of pointer to a file or directory located elsewhere. A symbolic link can only be created directly in an FPM or in one of its subfolders. 1. Select the relevant FPM or one of its subfolders. 2. Click the icon on the toolbar or right-click the FPM or its subfolder on the context menu to select Create symbolic link. 3. Edit the following fields:

Content dialog Description box Name of sym- Name for the symbolic link bolic link By default, the name is automatically taken over from the entry in [2] or [3]. If you want to create a name yourself or customize the automatically gen- erated one, deactivate the Generate symbolic name automatically option. Enter the target Enter the link target. If you want the link to point to a file or folder within the to which the sym- current FPM, use the Select link target button instead. bolic link will point Select link target Displays a list of all files and folders of the current FPM. The correct path of the selected object will then automatically be copied to Enter the target....

4. Confirm your entries with OK.

The link is created and shown in the corresponding subfolder. When you select the link, you can check the target in the Properties Editor.

19 5. eLux Builder Kit preferences

The Settings > Preferences dialog allows you to set various preferences. Also, on the Build tab, you can configure the certificates if you want to sign your packages.

If you have defined invalid settings, a message is shown. For further information, see Invalid settings.

5.1. Global tab

Add a comment to the Workspace, EPM or FPM when adding or deleting items

eLux Builder Kit automatically adds a comment to the superior element (Workspace, EPM or FPM) when one of the following actions is carried out:

Action Add ...a file to an FPM ...a folder to an FPM Delete ...an EPM from a workspace ...an FPM from an EPM ...a file from an FPM ...a folder from an FPM Create ...an EPM in a workspace ...an FPM in an EPM Import ...an EPM from a workspace other than the current one Link ...an EPM from a workspace other than the current one

The comments have the following format: DATE – TIME: [ACTION] ELEMENTTYPE (USER)

Format Description DATE current date TIME current time ACTION type of action (ADD, CREATE, DELETE, IMPORT, LINK) ELEMENTTYPE element type where the action has been performed (EPM, FPM, FILE, DIRECTORY) ELEMENTNAME element name USER name of the user who has performed the action

20 5. eLux Builder Kit preferences

Further options

Option Description Increment release The release number of an EPM or FPM is automatically incremented as soon as of EPMs/FPMs you modify at least one property of the EPM/FPM. Incrementing the release num- when they were ber is not performed immediately, but when the workspace is saved for the first changed time or when you click the Build button. Before the release number is incremented by eLux Builder Kit, a message is shown. If you confirm with Yes, the release numbers of all modified EPM/FPMs are incremented by one counter. Restrictions The action of adding files or folders to an FPM is not registered as a change by the eLux Builder Kit. The previous release number of the modified EPM/FPM must be numeric. If the previous release number is not numeric, eLux Builder Kit sets a 0. Open last work- When eLux Builder Kit is started, the workspace most recently used is auto- space on startup matically opened. Use external text Text files are edited by using an external editor. By default, eLux Builder Kit editor opens an Xterm shell and starts the vi editor. Alternatively, select another edtor by clicking he Browse button or start an editor from the command line. Restrictions eLux Builder Kit cannot distinguish text files from binary files. Thus, it is possible to open all files in the defined editor. The selected editor must accept the file to be edited as a transfer parameter. Defaults Resets the settings to the default values for the current tab

21 5.2. Build tab

Option Description Strip Parameters for the strip command to a file Zip location Path to the zip program eluxbuildrc loc- Path to the eluxbuildrc file ation Note that eLux Builder Kit needs the write permission for this file! Temp folder Folder for temporary files. eluxsign location Path to the eluxsign program which is required to sign the created packages Signature key Path to your key file Signature cer- Path to your certificate file tificate

Note For package signing, all signature settings (eluxsign location, Signature Key, Signature Certificate) must be specified correctly. If one of the settings is incorrect, signing will be deac- tivated. Use the PKCS#6 standard with PEM encoding (file formats .pem/.crt). For further information, see Organizing certificates for package validation in the ELIAS 18 guide.

5.3. EPM/FPM tab

Option Description Use default prop- eLux Builder Kit transfers the values entered under Copyright and Vendor to erties the corresponding properties when you create new EPMs or FPMs. Copyright Text that is set for each new EPM or FPM for the Copyright property. Vendor Text that is set for each new EPM or FPM for the Vendor property.

22 5. eLux Builder Kit preferences

5.4. Invalid settings

If you make incorrect settings and confirm with OK, a message is displayed and the incorrect settings are highlighted in red.

Important

If you click Cancel, the invalid settings are undone and the preferences are reset to the former ones.

1. Confirm with OK. 2. Correct the incorrect settings. 3. Click OK to save the settings.

Option Value must be valid No value allowed Strip command no yes Zip location yes no elxubuildrc yes no Temp folder yes no eluxsign location yes yes Signature Key yes yes Signature Certificate yes yes

23 6. The epkg tool

– for SDK VM 3.x – epkg is a command line tool that helps you create eLux packages in the .fpm and .epm format. It sup- ports the following modules:

Build Build EPM and FPM packages Convert Convert from an old metafile version to the latest version ConvertFrom Convert from a package tree to the latest metafile format Install Copy EPM and FPMs into the container directory New Create empty meta repository files for the given EPM and FPM names NewFrom Create empty meta repository files from a package tree Info Retrieve package meta data Size Calculate the uncompressed size or parse an eluxmanlog file to get the com- pressed size UpdateCopyrightInfo Update copyright md5sums

24 6. The epkg tool

6.1. How to use the epkg tool epkg combines several functions to build and manage eLux packages. Each function is covered by a specific module. Example: To build an EPM/FPM package, you need to use the Build module: epkg Build --container=rp6_x64

Help commands

Display a general help page where all available modules can be seen: epkg --help

Display the help page of a specific module: epkg --help

Test versus Release builds

With epkg, you can build either release packages or test packages. The type of build is controlled by the parameter --releaseType. A test build is given the release number 9999 can be overridden during the installation does not include updating the md5 checksums. For examples, see Examples of use.

25 6.2. How to configure the epkg tool

Preferences for epkg can be defined in the configuration file /usr/share/epkg/settings.ini.

Note Signing and Debian repository usage is disabled by default.

DevelopmentContainer

In order to work properly, it is important to define the DevelopmentContainer. This container is needed as destination for the Install module. If a package has not changed, the old FPM is used from there to create the .zip file. Add the following entry to the settings.ini file:

[Global] DevelopmentContainer=

Signing

To be able to sign packages, the certificate file and the private key file must be defined. Add the following entries to the settings.ini file:

[Signing] keyPath= certificatePath=

Debian repository usage

If you want epkg to use packages from Debian repositories as sources for EPMs and FPMs, the repos- itories need to be configured in a specific configuration file. Edit the file /usr/share/unicon/suiteCPP.ini and add the relevant entries.

The .ini file has the following structure: [source] name= base= architecture= source=

source Each section is a repository which can be referenced. needs to be incremented for each new section, start value is 0. name The name of this repository is used as key for other references

26 6. The epkg tool

base A repository can be based on another repository. This means that your repository includes the Debian sources of the base repository. Use the name of the base repository as value. architecture Debian architecture to be used in the form of a comma-separated list of architects Example: i386,amd64 source Can be included n times within a section needs to be incremented for each new value starting with 1. Each source represents a Debian source to look for packages and has the following format: deb

priority apt Pin-Priority, can be used to give priority to one source over another repository URL of the Debian repository URL distribution Name of the distribution component Space-separated list of components

Example:

[source0] name=rp6.0.0 architecture=i386,amd64 source1=501 deb http://repo.int.unicon-ka.de/rp6 rp6-mirror main restricted universe multiverse source2=502 deb http://repo.int.unicon-ka.de/rp6 rp6.0.0 main backports source3=503 deb http://repo.int.unicon-ka.de/rp6 rp6.0.0-staging main backports

[source1] name=rp6.1.0 architecture=i386,amd64 base=rp6.0.0 source1=504 deb http://repo.int.unicon-ka.de/rp6 rp6.1.0 main backports source2=505 deb http://repo.int.unicon-ka.de/rp6 rp6.1.0-staging main backports

[source2] name=rp6.2.0 architecture=i386,amd64 base=rp6.1.0 source1=506 deb http://repo.int.unicon-ka.de/rp6 rp6.2.0 main backports source2=507 deb http://repo.int.unicon-ka.de/rp6 rp6.2.0-staging main backports

[source3]

27 name=rp6.2.100 architecture=i386,amd64 base=rp6.2.0 source1=508 deb http://repo.int.unicon-ka.de/rp6 rp6.2.100 main backports source2=509 deb http://repo.int.unicon-ka.de/rp6 rp6.2.100-staging main backports

[source4] name=rp6.2.200 architecture=i386,amd64 base=rp6.2.0 source1=510 deb http://repo.int.unicon-ka.de/rp6 rp6.2.200 main backports source2=511 deb http://repo.int.unicon-ka.de/rp6 rp6.2.200-staging main backports

[source5] name=rp6.3.0 architecture=amd64,i386 base=rp6.2.0 source1=512 deb http://repo.int.unicon-ka.de/rp6 rp6.3.0 main backports source2=513 deb http://repo.int.unicon-ka.de/rp6 rp6.3.0-staging main backports

[source6] name=rp6.4.0 architecture=amd64,i386 base=rp6.3.0 source1=514 deb http://repo.int.unicon-ka.de/rp6 rp6.4.0 main backports source2=515 deb http://repo.int.unicon-ka.de/rp6 rp6.4.0-staging main backports

28 6. The epkg tool

6.3. Metafile structure epkg is structured in two folders: elux contains all meta files describing how the EPM/FPMs should be packed input contains all files modified or created to configure the package for eLux

The meta files themselves can be grouped into two categories: Global meta files control the behavior of all EPM/FPMs, while Per FPM meta files are required for each FPM.

Global meta files

File Description elux/control If Debian repositories are used, this file contains the key of the used Debian repository. elux/version Used internally only - do not touch! Defines the format version of the meta data elux/variables Defines variables which can be used in all other meta files Each line contains a variable definition in the format = Variables can be referenced in other files by %% elux/stripExcludes By default, all strippable files are stripped after copying them to the package tree. Each line contains a PERL regular expression of files that are to be excluded for stripping. For further information, see http://www.boost.org/doc/libs/1_57_0/libs/regex/doc/html/boost_regex/- syntax/perl_syntax.html elux/preCommands Contains commands to be executed before the files are copied to the package tree structure The %root% variable can be used to reference the tmp/ directory. The file is executed with sh - elux/_ Used internally only - do not touch! epm.md5 Contains all md5 checksums of data used by the EPM. This file is needed to check if the EPM has changed.

Starting with epkg version 1.0.50 (included in eLux SDK VM 3.3 and later versions), the pre- and post- (un)install scripts are bound as separate files directly to the respective packages:1

1in previous versions only via the GUI (ebkworkspace)

29 elux/_ Script that will be executed before the package is installed epm.preInst elux/_ Script that will be executed after the package is installed epm.postInst elux/_ Script that will be executed before the package is uninstalled epm.preUninst elux/_ Script that will be executed after the package is uninstalled epm.postUninst

For all install scripts, you can include additional files.1 This allows easy code sharing across different types of install scripts. To do so, use the #include statement followed by the relevant path relative to the elux directory. The #include statement will be replaced by the content of the specified file. Example: #include scripts/test

Per FPM meta files

File Description elux/.debs contains all Debian packages which provide files included in this FPM Each line contains the name of a Debian package. During the build process, the system tries to parse the license information included in the Debian package. If the parsing fails, a message is displayed and the license needs to be entered manually. This can be done by adding a new line directly below the name of the Debian package containing: Licence: ,

Example: Xauth Licence: MIT xfonts-utils Licence: BSD-2-Clause,MIT

elux/.dirs Each line in this file contains a directory which is created. This is needed if an FPM contains empty directories. elux/-.excludes Each line contains a PERL regular expression of files which should be excluded for packaging. This can be useful if wildcard characters are used in elux/.install

1from eLux SDK VM 3.7

30 6. The epkg tool

File Description elux/.install contains all files which will be included in the FPM Each line contains a string in one of the following formats: (if source and destination are identical) ->

The can contain wildcard characters (*) The is relative to tmp/ and the is relative to the package tree root. elux/.md5 Used internally only - do not touch! Contains all md5 checksums of data used by the FPM. This file is needed to check if the FPM has changed. elux/-.- Contains commands to be executed after the files are copied to the postCommands package tree structure. The %root% variable can be used to reference the package tree root. The file is executed with sh -c elux/.size Contains the uncompressed and compressed size of the FPM The uncompressed size is automatically calculated during the build process or by running the command epkg Size --calculate. The compressed size needs to be retrieved from the eluxmanlog file. This can be done with: epkg Size --fromEluxManLog

31 File Description elux/-.thirdparty Contains all thirdparty packages which provide files included in this FPM Each (second) line contains the path to a thirdparty package followed by a line which contains the license in the following format: Licence: ,

In addition, you can specify options by adding a line that begins with the string Options: Options is a comma-separated list of the following options: NoExtract: Do not try to extract the files, just copy to the tmp folder Supported extensions: .zip .tar.* .tar .tgz .rpm .deb .xpi .bz2 .bin (needed for Java 1.6 and works only for Java 1.6) Example: /home/mirror/import/mozilla/ESR//- 38.5.2esr/firefox.tar.bz2 Licence: MPL-2.0

Starting with epkg version 1.0.50 (included in eLux SDK VM 3.3 and later versions), the pre- and post- (un)install scripts are bound as separate files directly to the respective packages:1

elux/.preInst Script that will be executed before the package is installed elux/.postInst Script that will be executed after the package is installed elux/.preUninst Script that will be executed before the package is uninstalled elux/.postUninst Script that will be executed after the package is uninstalled

1in previous versions only via the GUI (ebkworkspace)

32 6. The epkg tool

6.4. Examples of use

Defining package category

With Scout Enterprise ELIAS 18, eLux packages can be shown sorted by category. Assign a category to your custom packages. 1. Edit the file /input/epkepm: edit ./input/epkepm

2. For your packages, in the epm section, set the category parameter. Example: [EPM] category=Communication

The following categories can be set:

Category Description Example System Operating system components eLux OS, Linux kernel, deskop environment Application Back-end and local applications, Citrix Workspace app, VMware web browsers Horizon client, Firefox Security VPN, smart card middleware Cisco AnyConnect, cryptovision sc/interface Communication Unified Communication, VoIP Cisco JVDI, Citrix HDX RTME, Zoom Citrix plugin, Zoom client for Linux, Ekiga SoftPhone Network Proxy, Network Access Control Squid proxy server, IEEE802.1X Multimedia Audio, Video GStreamer, Fluendo Codec Pack Driver Support for new hardware WLAN, WWAN, printers Utility Libraries BIOS update, XInput Calibrator Miscellaneous Custom packages, packages without category

If you do not set a category for your package, the package will be displayed under Miscellaneous.

Converting a package tree structure to the meta file structure

To convert a package tree into the new meta format, use the following commands: epkg NewFrom --pkgTree= All required files are created under elux/, but the files are empty.

33 Fill *.thirdparty and *.debs with the input data. epkg ConvertFrom --pkgTree= --container =rp6_x64

The *.install and *.dirs meta files are filled and the required folders are created under input/.

Building a package in test mode epkg Build --releaseType=test --container=rp6_x64

Building a package in release mode epkg Build --container=rp6_x64

Building a package without signing and zipping epkg Build --skipSign -–skipCreateZip --container=rp6_x64

Installing a package epkg Install All EPM/FPMs, the signature files and the ..zip file are copied to the configured container directory.

34 7. Other

7. Other

7.1. Citrix virtual channels

– for eLux RP 6.3 and later versions – With your individual eLux packages, you can provide virtual channels for Citrix Receiver (Citrix Virtual Channel). The necessary information for activating a virtual channel is provided to the relevant FPM in the form of an .ini file. The .ini file must be saved to the directory /usr/share/citrix/vd.d/ The .ini files located here, are merged by a script with the default .ini file module.ini.orig into the target file module.ini An .ini file can have the following structure: [WFClient] DesktopApplianceMode=True [ICA 3.0] GenericUSB=On VirtualDriver=GenericUSB [ClientDrive] MaxRequestSize2=4116 [GenericUSB] DriverName=VDGUSB.DLL

Note Values already existing in the module.ini.orig file are overridden by the new values, except for [ICA 3.0] VirtualDriver. Here, new values are appended to the list of existing drivers.

7.2. Scripts on configuration update

– from eLux RP 6.9.1000 – Scripts are normally executed after device startup. In some situations it might be helpful to execute instructions after synchronizing the local configuration with the system configuration. To do this, store a script file in the following directory: /etc/elux/eluxd.d/

The script is then called after each configuration update with the parameter config.

35