https://github.com/updatehub/uhu
UpdateHub's firmware update package management utilities
https://github.com/updatehub/uhu
Last synced: about 1 year ago
JSON representation
UpdateHub's firmware update package management utilities
- Host: GitHub
- URL: https://github.com/updatehub/uhu
- Owner: UpdateHub
- License: other
- Created: 2017-05-10T20:59:26.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2024-08-19T18:06:22.000Z (almost 2 years ago)
- Last Synced: 2025-04-11T05:20:37.535Z (about 1 year ago)
- Language: Python
- Homepage:
- Size: 913 KB
- Stars: 10
- Watchers: 2
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

[](https://coveralls.io/github/UpdateHub/uhu?branch=master)
[](https://pypi.python.org/pypi/uhu/)
[](https://pypi.python.org/pypi/uhu/)
# uhu - UpdateHub Utilities
uhu is an interactive prompt and a command line utility to manage update
packages for [UpdateHub](https://github.com/UpdateHub/updatehub) agent.
## Installing
uhu is available in PyPI and can be install with `pip`:
```
pip3 install uhu
```
### System Dependencies
uhu is compatible with Python 3.4 and onwards.
If you plan to work with compressed data, be sure to also have
installed in your system the compressors you use.
Until now, UpdateHub supports the following compressors:
* lzop
* xz
* gzip
## Getting started
To start uhu interactive prompt, just type `uhu` in your
terminal. Within interactive prompt, you can always press `tab` to
autocomplete or to check available commands.
### Setting credentials
In the first run `uhu`, you will be prompted to provide your UpdateHub
credentials. You can get your access and secret keys in UpdateHub web
interface.
After that you are ready to start creating update packages.
> You just have to do this step once, since uhu will save your
> credentials at `$HOME/.uhu`. If you need to update your credentials,
> you may use the `auth` command within interactive prompt.
## Creating an update package
To create a update package, we need to set some basic info first.
> The `show` command will always print your current package data so
> you can check if everything is ok.
### 1. Set the product
Currently, you can't create a new product within `uhu`, so you have to
first create a product in the web interface.
After that, grab the product UID generated and type the following
within the interactive prompt:
product use
Your prompt will be updated with an abbreviated version of what you
typed. And remember, if you need to check if everything is ok, just
type `show`.
### 2. Set the package version
The package version plays a very important role within UpdateHub. This
version will be the software version that your device will run after
an update. To set it, just type:
package version
### 3. Set the hardware compatibility
By default, the package that you are creating will be available for
all type of hardware that you have. But if you have many devices in
field it is also possible that you also have different brands of
hardware for the same product. Taking this in consideration, it is
possible that, for example, hardware brand X requires an incompatible
configuration with hardware brand Y to update to version 2.0.
For this kind of issue, `uhu` presents a way to create an update
package to only selected hardware. To do so, just add the hardware
identifiers that are compatible with the package that you are
creating:
hardware add
It will start a new prompt that will ask you to specify a hardware
identifier that you want to target with this package.
If you need to remove a hardware identifier, type the following:
hardware remove
And you all be presented to a prompt that will assist you into remove
the identifiers that you want.
### 4. Add objects (files, images, firmwares, etc...)
With everything set, you are now able to add true content of your
updated package. Since this content may be diverse, from just an image
file to a complete root filesystem image, we like to call them as
objects.
To add an object to your package, type:
package add
It will start a new prompt asking you all the needed information to
instruct the UpdateHub device agent on how to install the object
within your device.
There are also 2 more commands to help you to manage objects, `edit` and `remove`:
package edit # edit an already added object
package remove # remove an added object
### 5. Push the package
After to set product, version, supported hardware and objects, you are now able
to upload your package to the UpdateHub server. To do so:
package push
It's done! You are now able to go to the UpdateHub web interface and
rollout your package.
## License
uhu is released under the GPL-2.0 license.