User Tools

Site Tools


kb:embedded:raspberrypi:udpate

21 Updater

see also HAPROplace Updater .

The updater consists of the following components:

  1. updatePackage.tar.gpg: Encrypted package containing the updatePackage.tar archive
    • Uploaded to the device via the web interface
  2. updatePackage.tar: archive containing the install script and the components directory
    • is included in the updatePackage.tar.gpg package
  3. components: directory containing the actual updates in the form of debian packages
    • is included in the updatePackage.tar archive
  4. install: script executed by setup
    • is included in the updatePackage.tar archive
  5. setup: script that runs at every boot and runs install (if present)

Update Package

  • Update Package is a gpg encrypted tar archive
  • Uploaded to the device via the web interface
  • root-node decrypts the update package
  • decrypted file is the update archive (tar) and is called updatePackage.tar
  • if decryption succeeds:
  • root-node unpacks the update-archive updatePackage.tar to /var/local/setup/

Update archive

  • updatePackage.tar contains the install script and the components directory
  • install-script /var/local/setup/install
  • Directory /var/local/setup/components/

Create

Components archive

  • components directory, which contains the actual updates in the form of debian packages

Create

Install script

  • install is a Python script that performs the actual update
  • is located in /var/local/setup
  • standard operation: install the debian packages in components/ (s.o.) (?)
  • additional actions optional (rights, other installs, etc. etc.)

Setup script

20160905: No longer own setup script, as the same script in raspi-sd-builder -> haprotec-setup

  • “webic-setup” is a Python script that executes the install script
  • Default operation: searches for a script /var/local/setup/install
  • if available: execute
  • automatically empties the folder /var/local/ setup after successful execution of the install script
  • If the install script ends with exit-code 100, the system restarts and the script is called again
  • installation
  • is in /usr/etc
  • must be executable (chmod +x)
  • template is in webic-setup (siehe auch haprotec-setup)
  • is executed by systemd on every boot
  • service file is in /etc/systemd/system
  • template is in webic-setup.service (siehe auch haprotec-setup.service)
  • activate with sudo systemctl enable webic-setup

Python scripts

  • shebang = #!/usr/bin/env python3
  • prerequisite: a symlink of python3→python3.4
  • to be created with ln -s /usr/bin/python3.4 /usr/bin/python3
kb/embedded/raspberrypi/udpate.txt · Last modified: 2022/08/16 13:10 by joerg.hampel