Metafiles

Meta files describe and influence the meta information like description, package dependencies of eLux packages or control whether and where files will be packaged. This section describes which meta files are supported and what effect they have.

Empty files are not needed.

Global

Global Files

input/ebkepm

This file contains the metadata of an EPM and its FPMs. The secion for the EPM starts with [EPM], the sections for FPMs start with [FPMx]where x is a number >=1, unique within the EPM.

Table 1: Ebkepm Configuration Items:

Section Name [Supported Values] Description
EPM category   Category of the package.
EPM, FPM conflicts |-separated list of package names. Make sure to use the correct EPM/FPM here: e.g. when overwriting a file from an EPM, list the exact FPM that file is shipped with (most of the time EPMs contain no files, so using the EPM here makes no sense.
EPM, FPM containers   Bitfield specifying the containers this package is compatible with (e.g. 1024 = rp6*x64, 2048 = elux7). If no valid containers are specified (e.g. containers=0), this EPM/FPM will be skipped during build.
EPM, FPM copyright   Name of copyright holder of package.
EPM, FPM corrupts Comma-separated list of package names. Packages with installoption PKGOPT_RECOVERY (0x20) should not be listed as corrupted package since this leads to a plethora of issues (they will be installed/removed before chrooting, etc. pp).
EPM, FPM description   A description of the package’s purpose/content. About 1-3 sentences. This is shown in the detailed package view.
FPM files   Not documented.
FPM hasGzArchive   All these fields are only used by Unicon internally and should be set to false everywhere else.
  hasXzArchive    
  hasXzArchiveWithGzSuffix    
FPM includedLicenses   Not documented.
FPM includedMetaPackages   Not documented.
FPM includedMetaPackagesLicenses   Not documented.
FPM installoption   See Table 2: Install Options. Note: Option 1 (pre-select package) will be ignored by ELIAS, if package dependencies (requires=…) are not met. If you add the FPM’s dependencies to the EPM’s dependencies list, then ELIAS will resolve the dependencies at EPM-level. The FPM’s dependencies will then be met, too, and ELIAS will not ignore the pre-selection setting. Warning: Setting PKGOPT_RECOVERY (0x20) is used by Unicon base packages only. Do not use!
EPM, FPM licence   Not documented.
EPM, FPM majorVersion   This is a variable that Unicon uses for constructing version values. Customers are safe to ignore this variable.
EPM, FPM name   Package’s name.
EPM pkgoption   Used at Unicon internally only.
EPM, FPM postinstall   (legacy! Use <epm/fpm name>.postInst file) Run post install command(s).
EPM, FPM postuninstall   (legacy! Use <epm/fpm name>.postUninst file) Run post uninstall command(s).
EPM, FPM preinstall   (legacy! Use <epm/fpm name>.preInst file) Run pre install command(s).
EPM, FPM preuninstall   (legacy! Use <epm/fpm name>.preUninst file) Run pre uninstall command(s).
EPM, FPM provides SPACE-separated list of package names. List of package names being exported by this package. Only used if more than the package’s name shall be exported.
EPM, FPM release non-negative integer. Release number, will be added to version. If V is the version and R the release, then V-R will be the full version string.
EPM, FPM requires |-separated list of package names. Should always start with %ELUX_BASEREQ List of package names required by this package. For each package a version restriction may be specified, like …|BaseOS >= 6.2302.2000|…
FPM size   Not documented.
FPM sort non-negative integer, non-zero. Order for ELIAS to present the FPM.
EPM, FPM summary   A few words describing the package’s content shown in the package list.
EPM, FPM vendor   The package vendor.
EPM, FPM version   Version of this package.

Install options

A decimal that is a representation of an 8 digit binary number. Each digit of it depicts a binary option that can be true or false.

Table 2: Install Options:

Value Option Name Description
0x0 —- Deactivated by default. Can be activated, if needed
0x1 PKGOPT_INSTALL FPM is preselected if (and only if) all dependencies are already present in the IDF (else it will be silently disabled).
0x2 PKGOPT_MANDATORY FPM is mandatory. This means adding it will try to pull in all its dependencies.
0x4 PKGOPT_FILESYS  
0x8 PKGOPT_FORCEUNINSTALL Uninstall is forced before installation.
0x10 PKGOPT_FORCEUPDATE An Update is forced. (When false: Installation will skip if package is already installed.).
0x20 PKGOPT_RECOVERY Is used by Unicon base packages only. Do not use!
    Must be unset (0).
0x80 PKGOPT_UNSEAL Must be unset (0)

elux/control

This file configures the behavior of epkg for this package.

Format:ini-File

Table 3: Control File:

Section Name Default Supported Values Description
Global architectures Main architecture of eluxVersion i386, amd64 Space separated list of architectures the package should be built for. Default: empty.
Global checkMissingFiles 0 true, false If true epkg will check if a file in any source package is not included in any fpm. If files should be excluded intentionally see Error! Reference source not found.

elux/version

This file defines the format version of the meta data.

Important:

This file is internal to epkg and must not be changed.

elux/variables

This file defines variables which can be usd in all other meta files. Each line contains a variable definition in the format <name>=<value>. Variables can be referenced in other files with %<name>%.

Some of the key/value items of ebkepm are available as variables: The keys: name, majorVersion, version, release, summary, description are available with prefix “epm.” or “fpmX.”.

fpm8” the key “name” is “foobar”, then "%fpm8.name%” expands to “foobar”.

elux/stripExcludes

Each line contains a perl regular expression of files which should be excluded for stripping.

http://www.boost.org/doc/libs/1_57_0/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html

elux/allowedMissingFiles

Each line contains a perl regular expression of files which are allowed to be missing, missing means they are part if the source package but not of any fpm.

http://www.boost.org/doc/libs/1_57_0/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html

elux/preCommands

This file contains commands which should be executed before the files are copied to the package tree structure. The variable %root% can be used to reference the tmp/ directory. This file is executed with “sh -c”.

elux/<epmName>_epm.md5

This file contains all md5 checksums of data used by the epm. It is needed to check if the epm has changed. INTERNAL!

elux/< epmName >_epm.preInst

Script which will be executed before the package is installed. See scripts for additional information and features.

elux/< epmName >_epm.postInst

Script which will be executed after the package is installed. See scripts for additional information and features.

elux/< epmName >_epm.preUninst

Script which will be executed before the package is uninstalled. See scripts for additional information and features.

elux/< epmName >_epm.postUninst

Script which will be executed after the package is uninstalled. See scripts for additional information and features.

Per FPM

Files needed for every FPM.

elux/< fpmName >.debs

This file contains all debian packages which provide files included in this FPM. Each line contains the name of the debian package. During building it is tried to parse the licence information included in the debian package if it fails a warning is displayed and the licence needs to be entered manually. This can be done by adding a new line directly below the name of the debian package with the following content: “Licence: < Licence1>,< Licence2>”.

Example:

xauth

License: MIT

xfonts-utils

License: BSD-2-Clause,MIT

The values used in this field need to be valid SPDX license identifiers.

elux/< fpmName >.dirs

Each line in this file contains a directory which is created on installation. This is needed if a fpm contains empty directories.

elux/< fpmName >.excludes

Each line contains a perl regular expression of files which should be excluded for packaging. This can be useful if wildcards are used in elux/< fpmName>.install.

http://www.boost.org/doc/libs/1_57_0/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html

The path against which is checked from install will always begin with a ‘/’

elux/< fpmName >.install

This file contains all files which will be included in the fpm. Each line contains a string in one of the following formats: - < destinationPath> - < sourcePath> -> < destinationPath>

The first format can be used if source and destination are the same. The < sourcePath> can contain * as wildcard. The < sourcePath> is relative to tmp/ and the < destinationPath> is relative to the package tree root. It is possible to specify the rights of the destination file if no rights are specified the destination file will have the same rights as the source file. Rights can be specified by adding a line beginning with “Rights: “. The format is the same as with chmod.

Example:

usr/lib/test.so.2

Rights: 644

Important:

Since we just extract the files using dpkg -x any control information (like postinst or preinst scripts) is lost during packaging. This mean that if a package does important things, like setting the setuid flag on binaries in their postinst routines, this operation will be lost.

You can use dpkg-deb -e <package.deb>  to extract a package’s control files and manually inspect them.

Example: policykit-*.deb → /usr/bin/pkexec is NOT setuid on eLux as it should be.

elux/< fpmName>.md5

This file contains all md5 checksums of data used by the fpm. It is needed to check if the fpm has changed. INTERNAL!

elux/< fpmName>.preInst

Script which will be executed before the package is installed. See Error! Reference source not found. for additional information and features.

Important: This script may not be combined with eluxman –root < somedir> …  because < somedir> will not be passed as root for the script in librpm/libepm.

elux/< fpmName>.postInst

Script which will be executed after the package is installed. See Error! Reference source not found. for additional information and features below.

elux/< fpmName>.preUninst

Script which will be executed before the package is uninstalled. See Error! Reference source not found. for additional information and features below.

elux/< fpmName>.postUninst

Script which will be executed after the package is uninstalled. See Error! Reference source not found. for additional information and features below.

elux/< fpmName>.size

Contains the uncompressed and compressed sizes of the fpm. The uncompressed size is automatically calculated during build or by running “epkg Size --calculate”. The compressed size needs to be obtained from the eluxmanlog. This can be done with “epkg Size --fromEluxManLog < pathToEluxManLog>”.

Format: ini-File.

Table 4: Size Ini-File:

Section Name Default Supported Values Description
SizeInfo CompressedFiles 0 any number Number of compressed files.
SizeInfo CompressedSize 0 any number Compressed size in kilobytes.
SizeInfo CompressedVersion   any version string Version of the package in eluxmanlog which was used to get the size from.
SizeInfo UncompressedFiles 0 any number Number of uncompressed files.
SizeInfo UncompressedSize 0 any number Uncompressed size in kilobytes.

Size calculation uses a configurable offset: Each FPM’s size will be increased by “((size / 100) + 0.5) * SizeOffsetInPercent(/etc/epkg/settings.ini). The offset is currently configured to ‘2’.

The problem with this approach is that it checks FPM sizes in isolation and target devices might lead to different sizes depending on inode usage in folders like /usr/lib/* or /etc. It seems that we managed to be on the safe side with those 2% cushion, but in the end we “waste space”. Hopefully a few MB of space won’t be as important for future hardware/eLux versions.

elux/< fpmName>.thirdparty

This file contains all thirdparty packages which provide files included in this FPM. Each line contains the path to the thirdparty package followed by a line which contains the licence in the following format: "Licence: < Licence1>,< Licence2>". A thirdparty package can also be a http or https URL it will than be downloaded on every build of the package.

It is possible to extract to a specific folder by using "-> < path>". The path is relative to the tmp folder. Options are specified by adding a line beginning with “Options: “. Options is a comma separated list of the following options:

NoExtract - Do not try to extract the files just copy it to the tmp folder

Support extensions:

  • .zip

  • .tar.*

  • .tar

  • .tgz

  • .rpm

  • .deb

  • .xpi

  • bz2

  • .bin (this is needed for java 1.6 and works only for java 1.6)

Examples:

*/home/mirror/import/mozilla/ESR//38.5.2esr/firefox.tar.bz2* *Licence: MPL-2.0*

Metafiles