Generator of Update Packages (SWU) for SWUpdate OTA Agent
Project description
A host tool to generate SWU update package for SWUpdate.
SYNOPSIS
- usage: SWUGenerator [-h] [-K ENCRYPTION_KEY_FILE] [-k SIGN] [-s SW_DESCRIPTION]
[-a ARTIFACTORY] -o SWU_FILE [-c CONFIG] command
Generator SWU Packages for SWUpdate
- positional arguments:
- command:
- {create,sign} command to be executed
create creates a SWU file sign signs an existing SWU file provided by -i
- optional arguments:
- -h, --help
show this help message and exit
- -K ENCRYPTION_KEY_FILE, --encryption-key-file ENCRYPTION_KEY_FILE
AES Key to encrypt artifacts
- -n, --no-compress
Do not compress files
- -e, --no-encrypt
Do not encrypt files
- -x, --no-ivt
Do not generate IV when encrypting
- -y, --no-hash
Do not store sha256 hash in sw-description
- -k SIGN, --sign SIGN
RSA key or certificate to sign the SWU
- -s SW_DESCRIPTION, --sw-description SW_DESCRIPTION
sw-description template for the create command
- -t, --encrypt-swdesc
Encrypt sw-description
- -a ARTIFACTORY, --artifactory ARTIFACTORY
list of directories where artifacts are searched
- -o SWU_FILE, --swu-file SWU_FILE
SWU output file
- -i, --swu-in-file SWU_IN_FILE
SWU input file to be signed for the sign command
- -c CONFIG, --config CONFIG
configuration file
Description
swugenerator is a tool running on host to create and modify SWUpdate’s Update files (SWU). SWU file contains a meta description of the release (sw-description), and swugenerator adds components to a template passed from command line. This tool requires openssl to run and to sign the SWU. It is goal of the tool to fill the gap with Yocto/OE, where SWU generation is done by classes in the meta-swupdate layer, but other buildsystems like Debian or Buildroot have no tools to create a SWU.
The tool signs the SWU and can encrypt the artifacts. The tool parses the libconf based sw-description (tool does not work for JSON based sw-description) and provides the following features:
replace occurrencies of variables found in the CONFIG file
add sha256 to each artifact
check if an artifact should be encrypted and encrypts it
sign sw-description with one of the methods accepted by SWUpdate
pack all artifacts into a SWU file
It maybe run in two steps to create an unsigned swu file and then sign it later in a second call:
swugenerator -o output.swu -a . -s sw-description.in create swugenerator -o signed_output.swu -i output.swu -k CMS,key.pem,ca.crt sign
Installation
To install swugenerator clone the repository, and from the main project folder run pip (pip3 required): For new Linux distributions, replace it with pipx.
pip install .
To uninstall:
pip uninstall swugenerator
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file swugenerator-0.6.tar.gz.
File metadata
- Download URL: swugenerator-0.6.tar.gz
- Upload date:
- Size: 63.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a387b25c4b777b97b855dabd18bc29913b1a79c0d1dea9cef5d4dcc59eba28e
|
|
| MD5 |
df1548138f38f2d09f11f80ba65100c4
|
|
| BLAKE2b-256 |
63143a643251e20a35d69560175c847ec6869380b8d2193c658e43a5decb2f03
|
File details
Details for the file swugenerator-0.6-py3-none-any.whl.
File metadata
- Download URL: swugenerator-0.6-py3-none-any.whl
- Upload date:
- Size: 39.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e198bd538ac6d6ba1891d6dc315a0d2f3f53929fafc49173b11e0deacbcfe88
|
|
| MD5 |
5a8cf57810202cbd4252e0c12c07f4ff
|
|
| BLAKE2b-256 |
5c960f7d055cb7c903a82645cd310371b947a9fcdc0535177f03753d6612e026
|