Eris Linux A.P.I. 0.1
API to access Eris Linux system from a custom container
Loading...
Searching...
No Matches
SBOM

Functions to access Software Bill of Materials. More...

Functions

int eris_get_list_of_packages (char *buffer, size_t size)
 Get the list of Eris Linux installed packages.
int eris_get_package_recipe (const char *name, char *buffer, size_t size)
 Get the name of the recipe used to build a package.
int eris_get_package_version (const char *name, char *buffer, size_t size)
 Get the version of a packages.
int eris_get_package_licenses (const char *name, char *buffer, size_t size)
 Get the licenses concerning a package.
int eris_get_list_of_licenses (char *buffer, size_t size)
 Get the list of the licenses used by installed packages.
int eris_get_license_text (const char *name, char *buffer, size_t size)
 Get the text of a license.

Detailed Description

Functions to access Software Bill of Materials.

Function Documentation

◆ eris_get_license_text()

int eris_get_license_text ( const char * name,
char * buffer,
size_t size )

Get the text of a license.

Parameters
nameThe name of the license.
bufferThe buffer to fill with the text of the license.
sizeThe size of the buffer.
Returns
0 on success, -1 on error and errno is set appropriately.

This function fills the buffer with the text of the given license.

Some license texts extend to 350 Kb. Therefore we recommend providing a quite large buffer (512Kb for example).

◆ eris_get_list_of_licenses()

int eris_get_list_of_licenses ( char * buffer,
size_t size )

Get the list of the licenses used by installed packages.

Parameters
bufferThe buffer to fill with the list of licenses.
sizeThe size of the buffer.
Returns
0 on success, -1 on error and errno is set appropriately.

This function fills the buffer with a space-separated list of the licenses used by the packages embedde din Eris Linux system (not in the containers).

We suggest using a 1Kb sized buffer to ensure the list fits.

◆ eris_get_list_of_packages()

int eris_get_list_of_packages ( char * buffer,
size_t size )

Get the list of Eris Linux installed packages.

Parameters
bufferThe buffer to fill with the list of packages.
sizeThe size of the buffer.
Returns
0 on success, -1 on error and errno is set appropriately.

This function fills the buffer with a space-separated list of packages embedded in Eris Linux system (but not in containers).

The system packages are installed during the production of the system and cannot be modified further.

We suggest using a 4Kb sized buffer to ensure the list fits.

◆ eris_get_package_licenses()

int eris_get_package_licenses ( const char * name,
char * buffer,
size_t size )

Get the licenses concerning a package.

Parameters
nameThe name of the package extracted from the result of eris_list_packages.
bufferThe buffer to fill with the details of the licenses.
sizeThe size of the buffer.
Returns
0 on success, -1 on error and errno is set appropriately.

Some packages contain files coming from multiple sources. These files may be released under different licenses. Sometimes, the author of a package allows the user to choose from several licenses for its usage.

This function populates the buffer with the logical combination of applicable licenses. Most of the time only one license name will appear.

◆ eris_get_package_recipe()

int eris_get_package_recipe ( const char * name,
char * buffer,
size_t size )

Get the name of the recipe used to build a package.

Parameters
nameThe name of the package extracted from the result of eris_list_packages.
bufferThe buffer to fill with the recipe name.
sizeThe size of the buffer.
Returns
0 on success, -1 on error and errno is set appropriately.

This function fills the buffer with the name of the recipe used to build the package.

A small buffer of 32 bytes, for example, will generally be sufficient.

◆ eris_get_package_version()

int eris_get_package_version ( const char * name,
char * buffer,
size_t size )

Get the version of a packages.

Parameters
nameThe name of the package extracted from the result of eris_list_packages.
bufferThe buffer to fill with the version of the package.
sizeThe size of the buffer.
Returns
0 on success, -1 on error and errno is set appropriately.

This function fills the buffer with the version of the package used to build Eris Linux system.

A small buffer of 32 bytes, for example, will generally be sufficient.