https://github.com/thin-edge/tedge-archive-plugin
thin-edge.io archive software management plugin for devices without any package managers
https://github.com/thin-edge/tedge-archive-plugin
Last synced: 11 months ago
JSON representation
thin-edge.io archive software management plugin for devices without any package managers
- Host: GitHub
- URL: https://github.com/thin-edge/tedge-archive-plugin
- Owner: thin-edge
- License: apache-2.0
- Created: 2024-07-24T15:10:14.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-24T15:37:05.000Z (almost 2 years ago)
- Last Synced: 2025-01-30T12:19:44.410Z (over 1 year ago)
- Language: Shell
- Size: 17.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tedge-archive-plugin
## Plugin summary
Manage simple archive packages (e.g. tarballs) on a device using thin-edge.io software management plugin api.
**Technical summary**
The following details the technical aspects of the plugin to get an idea what systems it supports.
|||
|--|--|
|**Languages**|`shell` (posix compatible)|
|**CPU Architectures**|`all/noarch`. Not CPU specific|
|**Supported init systems**|`N/A`|
|**Required Dependencies**|-|
|**Optional Dependencies (feature specific)**|-|
### How to do I get it?
The following linux package formats are provided on the releases page and also in the [tedge-community](https://cloudsmith.io/~thinedge/repos/community/packages/) repository:
|Operating System|Repository link|
|--|--|
|Debian/Raspbian (deb)|[](https://cloudsmith.io/~thinedge/repos/community/packages/detail/deb/tedge-archive-plugin/latest/a=all;d=any-distro%252Fany-version;t=binary/)|
|Alpine Linux (apk)|[](https://cloudsmith.io/~thinedge/repos/community/packages/detail/alpine/tedge-archive-plugin/latest/a=noarch;d=alpine%252Fany-version/)|
|RHEL/CentOS/Fedora (rpm)|[](https://cloudsmith.io/~thinedge/repos/community/packages/detail/rpm/tedge-archive-plugin/latest/a=noarch;d=any-distro%252Fany-version;t=binary/)|
### What will be deployed to the device?
* The following software management plugins which is called when installing and removing `archive` packages via Cumulocity IoT
* `archive` - Manage (list/install/remove) packages using a tarball (gzip) format
## Plugin Dependencies
The following packages are required to use the plugin:
* Posix shell (`/bin/sh`)
## Package format
The software management plugin installs and removes archives (e.g. tarball) using a very simple packaging format which mirrors some of the Debian package format conventions.
The following Table
|Path|Description|
|----|-----------|
|`SCRIPTS/preinst`|Maintainer script which is executed prior to the archive being expanded. Must have `755` chmod permissions to be executed!|
|`SCRIPTS/postinst`|Maintainer script which is executed after the archive has been expanded. Must have `755` chmod permissions to be executed!|
|`*/*`|All other paths will be unpacked into the `ROOT_DIR` as defined in the `/etc/tedge/sm-plugins/archive` script|
The `ROOT_DIR` can be controlled by setting a dotenv file in the following location:
```sh
/etc/tedge-archive-plugin/env
```
```sh
# The root directory where all of the tars will be unpacked to
ROOT_DIR=/data
```
## Development
### Start demo
1. Start the demo
```sh
just up
```
2. Bootstrap the device
```sh
just bootstrap
```
### Stop demo
```sh
just down
```