1. 28 Feb, 2019 3 commits
    • Karel Koci's avatar
      updater: do not download package unless we know that it is approved · 0be0315a
      Karel Koci authored
      We do not download any package unless we know that they are going to be
      installed with this commit. It is done by split of download to separate
      function.
      0be0315a
    • Karel Koci's avatar
      transaction: instead of data use files on fs · 5b9b4d2f
      Karel Koci authored
      This replaces problematic data pass in Lua with files saved on disk.
      Original problem is that Lua in some cases like closures duplicates
      environment and that means also all data. If this happens few times
      (from measurements it seems like two or three times in code segment we
      are dropping in this) then we can have few times bigger memory
      requirements.
      
      This also temporally disables test test-sys-pkgupdate-plan-unapproved as
      it does not expect additional files. This is going to be solved in
      following commit.
      5b9b4d2f
    • Karel Koci's avatar
      Add memory usage test bench · d3bd91ba
      Karel Koci authored
      d3bd91ba
  2. 28 Jan, 2019 2 commits
    • Karel Koci's avatar
      Drop package content extra option · a8489ebe
      Karel Koci authored
      This was originaly introduced to allow local packages to be installed.
      It was later replaced with localrepo and was marked as obsoleted for
      long time.
      a8489ebe
    • Karel Koci's avatar
      Drop morpher · 6d3cad56
      Karel Koci authored
      Morpher is obsoleted for more than year and should not be used any more.
      We are doing now huge changes with approaching Turris OS 4.0 and that is
      best time to drop this.
      6d3cad56
  3. 21 Jan, 2019 1 commit
    • Karel Koci's avatar
      Rename opkg-trans to pkgtransaction · 196761e1
      Karel Koci authored
      This is huge change but it makes sense. Original name is now pretty
      confusing and it should be clear that this tool is part of updater-ng.
      This new name should signal that.
      This new name also contains whole word "transaction" so it should
      possibly be more clearer what it really does. This also adds comment
      that this tool is dangerous to play with.
      196761e1
  4. 12 Dec, 2018 2 commits
    • Karel Koci's avatar
      subprocess: fix problem with lost stdout content · 8502ac4b
      Karel Koci authored
      I originally was thinking that Lua is doing something nasty like
      duplicating original file descriptor for stdout but it turns out that
      exec was a culprit. For some reason a call to exec truncates (or at
      least removes unfinished line) from stdout. I have no idea why it
      behaves that way but adding flush just after callback (before exec)
      solves that problem and allows us to correctly use print in callback.
      The weird part is that the same thing does not happen with stderr but
      non the less I also added flush for it.
      8502ac4b
    • Karel Koci's avatar
      subprocess: mark some arguments as not possible to be NULL · a803ad41
      Karel Koci authored
      This also removes possibly hack to run C/Lua code in subprocess without
      providing command. It is overhead but it is more systematic to use
      'true' as a command instead of possibly in code unexpected value NULL.
      a803ad41
  5. 11 Dec, 2018 9 commits
  6. 30 Nov, 2018 1 commit
  7. 16 Aug, 2018 3 commits
  8. 15 Aug, 2018 1 commit
  9. 12 Aug, 2018 1 commit
    • Karel Koci's avatar
      Drop valgrind suppressions · 0c0973dc
      Karel Koci authored
      These suppressions are not required as we are either using openssl with
      PURITY enabled or valgrind suppressions are system defined (Debian).
      0c0973dc
  10. 17 Jul, 2018 2 commits
    • Karel Koci's avatar
      Implement Lua bindings for cleanup · a88c35b8
      Karel Koci authored
      a88c35b8
    • Karel Koci's avatar
      Add cleanup functions · ef01234a
      Karel Koci authored
      These new functions should be used for correct cleanup. Idea is that you
      will register your cleanup function that would be called if fatal error
      is detected and if no such error happens then you will call cleanup_run
      to call and unregister given cleanup function anyway.
      ef01234a
  11. 03 Jul, 2018 2 commits
    • Karel Koci's avatar
      Cleanup luacheck.config · a2bae936
      Karel Koci authored
      Since we are using new version of luacheck we can drop some of the old
      definitions. Modules are now automatically detected by luacheck and
      listing them out is no longer necessary.
      a2bae936
    • Karel Koci's avatar
      Add options --model and --board · 1c3769dc
      Karel Koci authored
      This also moves some configuration variables from backend to separate
      syscnf module.
      Original design where hard coded in values were used as defaults is not
      replaced with design where set function is required to be called before
      anything is done. Commonly that is suppose to be done in C before we
      start using other Lua modules.
      Thanks to new options --model and --board we can now set target even
      outside of the router environment without requiring /tmp tainting. It's
      now also not possible to run updater's executables on non-openwrt
      platform without specifying those two options.
      1c3769dc
  12. 27 Jun, 2018 1 commit
  13. 26 Jun, 2018 1 commit
  14. 13 Apr, 2018 1 commit
  15. 11 Apr, 2018 1 commit
  16. 10 Apr, 2018 1 commit
  17. 27 Feb, 2018 4 commits
  18. 07 Dec, 2017 1 commit
  19. 28 Nov, 2017 3 commits
    • Karel Koci's avatar
      Drop restrict option of Script · 70aaae4f
      Karel Koci authored
      Restricting accessible uris for script at first look looks like an very
      good feature but in reality it cripples scripts ability and adds no
      additional security because if we use https and signatures then there
      should be no worry about script badness. And if it's then this is just
      small garden wall anyone exploiting https and signatures could go
      around just by using same https exploit again and again so this really
      doesn't make any sense.
      70aaae4f
    • Karel Koci's avatar
      Previous commit dropped support for early uri checks so don't test it · 49af043c
      Karel Koci authored
      Yes this allows us to pass sub-script a invalid uri but it doesn't
      matter if it won't use if and if it will then it will fail on its own.
      So just do that check when we need it not always.
      49af043c
    • Karel Koci's avatar
      Don't validate uri options when they are inserted to context · 63a7ae41
      Karel Koci authored
      It makes little to no sense to validate extra arguments when they are
      pushed to sub-script context as if they would be invalid the target
      script would already failed. This is just useless check and would add
      complexity as it makes table from any argument passed to it so this way
      it discards uri.system_cas and uri.no_crl and creates bugged system.
      63a7ae41