IPK packages

Description

The IPK Update Module updates software on the device using the native local package manager.

A Mender Artifact containing one or more software packages is sent to the device, where the Update Module will call the package manager to install them in alphabetical order.

Specification

Module name ipk
Supports rollback no
Requires restart no
Artifact generation script no
Full system updater no
Source code Update Module

Please be aware that Mender Update modules are meant to update parts of the system and if not configured properly they could potentially delete parts or the complete system. Always inspect the code carefully and only test modules on a systems that you can recover easily.

It is not recommended to install a Mender Artifact on your workstation

Prepare the device

This section describes how to setup your target device, i.e. the device to be updated. This will also be referred to as the device environment.

All commands outlined in this section should be run in the device environment.

Prerequisites

This update module has the following prerequisites for the device environment:

This Update Module has the following prerequisites for the development environment:

Install the Update Module

Download the latest version of this Update Module by running:

mkdir -p /usr/share/mender/modules/v3 && wget -P /usr/share/mender/modules/v3 https://github.com/mendersoftware/mender-update-modules/blob/master/ipk/module/ipk

Prepare the development environment on your workstation

This section describes how to set up your development environment on your workstation.

All commands outlined in this section should be run in the development environment.

Prerequisites

This Update Module has the following prerequisites for the development environment:

Create Mender Artifacts

The Artifact can be generated using the mender-artifact tool.

Now generate a Mender Artifact using the following command:

ARTIFACT_NAME="my-update-1.0"
DEVICE_TYPE="my-device-type"
OUTPUT_PATH="my-update-1.0.mender"
PACKAGES="my-package-1.ipk my-package-2.ipk"
mender-artifact write module-image -T ipk -n ${ARTIFACT_NAME} -t ${DEVICE_TYPE} -o ${OUTPUT_PATH} -f $(echo "$PACKAGES" | sed -e 's/ / -f /g')
  • ARTIFACT_NAME - The name of the Mender Artifact
  • DEVICE_TYPE - The compatible device type of this Mender Artifact
  • OUTPUT_PATH - The path where to place the output Mender Artifact. This should always have a .mender suffix
  • PACKAGES - List of all .ipk packages to be contained in the Artifact.

You can either deploy this Artifact in managed mode with the Mender server as described in Deploy to physical devices or by using the Mender client only in Standalone deployments.

Artifact technical details

The Mender Artifact used by this Update Module has a payload with as many files as software packages we are sending in the Artifact.

Example of a ipk Update Module Artifact with two packages will look like:

Mender artifact:
  Name: my-update-1.0
  Format: mender
  Version: 3
  Signature: no signature
  Compatible devices: '[my-device-type]'
  Provides group: 
  Depends on one of artifact(s): []
  Depends on one of group(s): []
  State scripts:

Updates:
    0:
    Type:   ipk
    Provides: Nothing
    Depends: Nothing
    Metadata: Nothing
    Files:
      name:     my-package-1.ipk
      size:     0
      modified: 2019-04-15 11:27:10 +0200 CEST
      checksum: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
    Files:
      name:     my-package-2.ipk
      size:     0
      modified: 2019-04-15 11:27:12 +0200 CEST
      checksum: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b85