1. 29 Jun, 2021 23 commits
  2. 25 Jun, 2021 7 commits
  3. 24 Jun, 2021 5 commits
  4. 21 Jun, 2021 5 commits
    • Zygmunt Krynicki's avatar
      README.md: expand testing section with spread qemu · 98d9b7ac
      Zygmunt Krynicki authored
      
      
      GitLab CI uses spread with the qemu backend but this was not documented.
      In addition, the generic instructions `spread` would run the tests
      twice, once for each backend. Expand the testing section to cover qemu
      and adjust example commands to still use LXD when developing locally.
      Signed-off-by: Zygmunt Krynicki's avatarZygmunt Krynicki <zygmunt.krynicki@huawei.com>
      98d9b7ac
    • Zygmunt Krynicki's avatar
      boot,cmd,service: add CancelSwitch to boot protocol · 20170401
      Zygmunt Krynicki authored
      The new CancelSwitch method does not change the boot protocol at a
      fundamental level. It makes it possible for the system to clean up any
      temporary state that is left over from a rollback operation on a failed
      update.
      
      On the Raspberry Pi, the CancelSwitch method removes the tryboot.txt
      file, ignoring the error if no such file exists.
      
      The new method is added to D-Bus introspection data and exposed by the
      service. Relevant tests are adjusted.
      
      Closes: OSTC/OHOS/components/sysota#12
      
      Signed-off-by: Zygmunt Krynicki's avatarZygmunt Krynicki <zygmunt.krynicki@huawei.com>
      20170401
    • Zygmunt Krynicki's avatar
      man: add manual page for sysotad.conf · 530c662c
      Zygmunt Krynicki authored
      
      
      The manual page is automatically syntax-checked and installed by zmk.
      Add dedicated spread test checks that it gets installed and integrated
      correctly into the man system.
      
      A new integration tests ensures that the manual pages are installed
      correctly and can be used to look up OTA information.
      Signed-off-by: Zygmunt Krynicki's avatarZygmunt Krynicki <zygmunt.krynicki@huawei.com>
      530c662c
    • Zygmunt Krynicki's avatar
      cmd/sysotad: replace fakeBootDir with sysotad.conf · 93aa57cc
      Zygmunt Krynicki authored
      Having defined a configuration system, we can now drop the hack present
      in sysotad, which allows boot loader selection with an environment
      variable override, and adjust tests to put a regular configuration file
      in place.
      
      New integration test verifies behavior when the boot loader is set to
      "inert" mode, which causes sysotad not to set any boot protocol
      instance. Another test verifies that malformed configuration file causes
      the service to fail to start. This behavior will be relevant for
      eventual rollback, where the new OTA service must be able to load the
      configuration of its predecessor or a rollback will trigger, enforcing
      the backwards-compatibility of the OTA service itself.
      
      Fixes: OSTC/OHOS/components/sysota#10
      
      Signed-off-by: Zygmunt Krynicki's avatarZygmunt Krynicki <zygmunt.krynicki@huawei.com>
      93aa57cc
    • Zygmunt Krynicki's avatar
      ota: add configuration system · 404bc9bc
      Zygmunt Krynicki authored
      
      
      The sysotad service lacks any means of configuration, hard-coding dummy
      values for model, maker and update stream. In addition, there are hacks
      that exist only for testing, that cannot be removed without introducing
      a configuration system first.
      
      As a first step towards fixing this situation, introduce ota.Config that
      holds OTA configuration, starting with something that is sufficient to
      remove the hack needed for testing: the boot loader type and the place
      where the system boot partition is mounted.  OTA configuration can be
      loaded with ota.LoadConfig, providing all the building blocks to sysotad
      to use.
      Signed-off-by: Zygmunt Krynicki's avatarZygmunt Krynicki <zygmunt.krynicki@huawei.com>
      404bc9bc