YIO-Remote/remote-os

Remote App Update script

Closed this issue · 0 comments

zehnm commented

Expected Behavior or Design

The remote-app can be updated from an update archive to allow auto-updates from new releases.

Current Behavior or Design

A proof of concept script.

Possible Solution

  • remote-software app is responsible for:
    • Checking for available updates.
      Either manually in the settings menu, or automatically if auto-update is enabled
    • User interaction & feedback
    • Downloading latest update archive.
  • Update script in remote-os is response for:
    • Archive verification und unpacking
    • Calling optional pre-install script within archive
    • Stopping app
    • Replacing current app with new app
    • Old app is saved as backup.
      An old backup will be removed.
    • Calling optional post-install script within archive
    • Replacing the update script if the update archive contains a newer version
    • Starting app or rebooting remote

Detailed Description and Additional Information

  • App install location is read from $YIO_HOME
  • Update is logged in a dedicated log file. Directory is taken from $YIO_LOG_DIR_UPDATE

For a seamless update process the current directory layout must be changed:

  • fully separate the remote-software project, i.e. no other resources may be included or merged together by the remote-os build.
    • move web-configurator outside the app
    • move plugins outside the app
  • create a dedicated script directory
  • use a common Linux location(s) to store all YIO resources

Target directory structure

   |-opt
   |---yio
   |-----app
   |-----app-plugins
   |-----media
   |-------splash
   |-----scripts
   |-----web-configurator

Update archive specification

.
├── app.tar.gz
├── build.info
├── hooks
│   ├── post-install.sh
│   └── pre-install.sh
├── md5sums
└── version.txt
  • Tar or zip archive containing:
    • app.tar.gz: Data archive containing the complete /opt/yio/app folder
    • Meta information:
      • md5sums: Mandatory md5sum file of all files in the archive
      • version.txt: Mandatory text file containing the version number on the first line
      • build.info: Optional build information file
    • Optional installation hook scripts:
      • hooks/pre-install.sh: Optional pre-installation action
      • hooks/post-intall.sh: Optional post-installation action