apertis-update-manager manual

low

Image Types:
minimal-armhf
Image Deployment:
OSTree
Type:
functional

Description

Test the manual update with apertis-update-manager. The automated version of this test: https://qa.apertis.org/aum-offline-upgrade.html


Resources

  • A PC must be connected to DUT serial port
  • A static update bundle file of the same architecture, variant and version as the testing image
  • The latest static update file can be downloaded at the same location than the target image. It has the same basename, and a '.delta' extension

Execution Steps

  1. Check the initial deployment
  2. $ sudo ostree admin status
  3. Prepare the copy of commit and deploy to allow the upgrade to the same version
  4. Command below shows you an initial commit ID, for instance
  5. $ export BOOTID=$(sudo ostree admin status | sed -n -e 's/^\* apertis \([0-9a-f]*\)\.[0-9]$/\1/p'); echo $BOOTID
  6. Get the Collection ID and ref
  7. $ export CID=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 1 -d ' '); echo COLLECTION_ID=$CID
    $ export REF=$(sudo ostree refs -c | head -n 1 | tr -d '(),' | cut -f 2 -d ' '); echo REF=$REF
  8. Create the list of files to skip and enshure there are some files in these directories
  9. $ ls -1d /usr/share/locale /usr/share/man /usr/share/zoneinfo > /tmp/skip
    $ du -sh /usr/share/locale /usr/share/man /usr/share/zoneinfo
  10. Create the commit with changed timestamp and skipped list from above to allow upgrade with recent update file
  11. $ export NEWID=$(sudo ostree commit --orphan --tree=ref=$BOOTID --add-metadata-string=ostree.collection-binding=$CID --bind-ref=$REF --timestamp="1 year ago" --skip-list=/tmp/skip); echo "New commit: $NEWID"
  12. Deploy the prepared commit
  13. $ sudo ostree admin upgrade --allow-downgrade --deploy-only --override-commit=$NEWID --reboot
  14. Wait until the system is booted again and check the deployment
  15. $ sudo ostree admin status
  16. The booted commit (started with '*') must have ID which we prepare and the initial commit ID should be marked as '(rollback)'
  17. Check booted deployment have no file objects which we skip
  18. $ du -sh /usr/share/locale /usr/share/man /usr/share/zoneinfo
  19. Remove the initial deployment
  20. $ sudo ostree admin undeploy 1
  21. Reboot the system
  22. Check the current deployment
  23. $ sudo ostree admin status
  24. Remove blacklist file if it exists
  25. $ sudo rm -f /var/aum_blacklist.conf
  26. From the host, copy the static delta update to the target using scp
  27. $ scp /path/to/static/delta user@target:update.bundle
  28. The update does not start automatically, start it manually
  29. $ sudo updatectl --apply-static-delta /home/user/update.bundle
  30. After the update, the device will reboot automatically
  31. Check the current deployment has been updated and that the rollback entry points to the prepared deployment
  32. $ sudo ostree admin status

Expected

The update was properly applied