1. 17 Mar, 2021 1 commit
    • Karel Koci's avatar
      lib/lua/transaction: fix postinst configure always reporting upgrade · 15b93504
      Karel Koci authored
      The issue here was that control fields in status were updated in
      pkg_move function but same and thus invalid check was used in
      pkg_scripts later on.
      This adds new table with all upgraded packages. This way we check
      original state before it is removed from status and pass this info to
      subsequent pkg_scripts.
  2. 17 Feb, 2021 2 commits
    • Karel Koci's avatar
      tests/lua/postprocess: remove usage of example.org · 839b7f78
      Karel Koci authored
      Web example.org now responds with valid HTML site on any URL thus we
      have to use different web to get 404 response. We use our own server
      that is used in other tests already.
      It also turns out that curl changed error messages so instead of
      matching exact error message this just tries to match the known minimum.
    • Karel Koci's avatar
      gitlab-ci: drop perl file slurp · 57bbfb6b
      Karel Koci authored
      The usage of this was removed in commit
  3. 24 Nov, 2020 2 commits
    • Karel Koci's avatar
      Version 69.0.0 · 73bc26bf
      Karel Koci authored
      * extra argument `pkg_hash_required` for `Repository` command
      * support for version limitation of `Install` and `Uninstall` requests
        in package name (such as `foo (>= 1.0.0)`).
      * Execution is now terminated when there is no hash for package being
        installed in repository index unless `pkg_hash_required` is set to
        `false` for that repository.
      * Extra option `version` for `Install` request. You should append
        version specifier to package name the same way as it is done for
      * `ROOT_DIR` not being defined for `hook_postinst` and
        `hook_reboot_required` on replan execution.
    • Karel Koci's avatar
      pkgupdate: fix missing ROOT_DIR in postupdate hook on replan · e8c800d4
      Karel Koci authored
      The previous expectation that ROOT_DIR is already set is true only if
      current execution is reexecution (subsequent execution after replan). In
      case of reexecution the ROOT_DIR set is skipped so we have to add it for
      postinst as well.
      That applies for both postupdate as well as reboot required hook.
  4. 21 Nov, 2020 2 commits
    • Karel Koci's avatar
      Refine support for Install and Uninstall version requests · 6a0bb155
      Karel Koci authored
      This changes how user can specify version limitation for Install request
      and adds the same feature for Uninstall as well.
      The original method might have been in some ways confusing. Extra field
      affects potentially multiple packages but version is commonly specified
      only for one specific package request. There is also fully supported way
      to specify version limitation in dependency description. This includes
      that and reuses the same code.
      Also note that code that splits package name from version is improved
      here. It should be more reliable now.
      This change makes extra option version of Install request obsolete so it
      is removed and no longer supported.
      Important thing to point out is also that documentation stated that
      version extra option can be also table but code never supported that. It
      could always have been just single string. That means that we do not
      loose any feature set.
    • Karel Koci's avatar
      Make missing package hashes in repository index fatal · e7f1fdac
      Karel Koci authored
      This changes default behavior for security reasons. The idea is to fail
      if package can't be verified from repository index as there is no hash
      supported to use for that. This prevents issue that packages can be
      potentially even falsified if index contains hashes unsupported by
      updater or even no hash at all.
      New extra argument was added to Repository command `pkg_hash_required`.
      This is considered in default as set to `true` but it can be
      overwritten and set to `false` to disable new behavior.
      This new behavior is reported by new feature in updater language:
  5. 20 Nov, 2020 2 commits
    • Karel Koci's avatar
      tests/c/subprocess: fix potential test fail · 99177d34
      Karel Koci authored
      It is possible that if we try to immediately kill process that it won't
      make it to exec and that way kill might be caught by check library and
      reported as failure. By waiting at least short amount we pretty much
      make sure that exec happens and that we are killing sleep process rather
      our fork.
    • Karel Koci's avatar
      tests/c/download: decrease number of parallel downloads · 22bd00a4
      Karel Koci authored
      With four parallel jobs it is common that connection fails with OCSP
      response error. This seems to be an issue with some sort of
      rate-limiting in nginx (target web server) on OCSP stamping. It looks
      like as 3 is the magic number here for that.
  6. 10 Nov, 2020 2 commits
  7. 06 Nov, 2020 1 commit
    • Karel Koci's avatar
      Version 68.0.0 · cf313897
      Karel Koci authored
      * Queue messages for 'upgrade' and 'downgrade' now also print current
        version in square brackets.
      * Default connection timeout for download was extended from one minute
        to ten minutes.
      * Possibility to reboot immediatelly after package installation. Reboot
        after update is deemed sufficient.
      * Queue messages now state 'upgrade', 'downgrade' and 'reinstall'
        instead of original generic 'install'.
  8. 01 Nov, 2020 1 commit
    • Karel Koci's avatar
      lib/lua/updater: fix broken queue messages about upgrade and downgrade · baa57c58
      Karel Koci authored
      The code used for checking current system status was invalid and in
      result whole if condition was being skipped silently. This now enabled
      "upgrade", "downgrade" and "reinstall" messages instead of "install".
      This also adds current version to upgrades and downgrades of packages.
      This is info that is beneficial to know in most cases so it makes no
      sense to not show it when we have simple access to it.
  9. 30 Oct, 2020 4 commits
    • Karel Koci's avatar
      lib/lua/transaction: fix previous commit · 75e168ef
      Karel Koci authored
    • Karel Koci's avatar
      lib/lua/transaction: remove unused variable · b85324a2
      Karel Koci authored
    • Karel Koci's avatar
      Remove immediate reboot · 7e559673
      Karel Koci authored
      This removes immediate reboot possibility from updater.
      Original reasoning was to reboot router because update of specific
      package broke system so much it can't continue. We never used it. It is
      also questionable how such package could break system in a way where
      reboot helps. That would have to be kernel module but having some core
      systems in module that we would have to do reboot and were unable to
      finish update seems like impossible. To finish update we in general need
      just filesystem and shell. Existing solution would not work with
      theoretical breakage of any of those anyway so it is pretty much useless
      feature. Anything this can solve can be also solved by reboot at the end
      of update.
    • Karel Koci's avatar
      lib/download: extend connection timeout to ten minutes · 37751919
      Karel Koci authored
      This should increase reliability on unstable network connection.
      One minute was was way short as it looks like. Ten minutes should be
      better, hopefully not the other way around (too long).
  10. 28 Oct, 2020 1 commit
    • Josef Schlehofer's avatar
      Create notification: drop Czech language · 3823547d
      Josef Schlehofer authored
      We are now focusing primary on English and, in the future, this could be
      translated via Weblate. By removing Czech language this script does not
      longer prints warning about running in compatible mode
  11. 21 Oct, 2020 2 commits
    • Karel Koci's avatar
      Version 67.0.3 · eef34f86
      Karel Koci authored
      * pkgupdate's conf.lua now loads scripts with Full security level
        instead of Local
      * libupdater is now versioned with release version (there is no API
        compatibility between versions)
    • Karel Koci's avatar
      pkgupdate: run all conf.d scripts with Full privileges · 5e7ed7ae
      Karel Koci authored
      Original idea was to limit what scripts placed there can do but in the
      end it makes code of those scripts pretty much ugly as it then requires
      duplicate code and prevents usage of libraries.
      We lost nothing with Full security as Local allows running any arbitrary
      shell code.
  12. 22 Sep, 2020 2 commits
    • Karel Koci's avatar
      libupdater: version library · 6230b6ef
      Karel Koci authored
      We use -release because libupdater is technically binary compatible only
      with same version of binary tools. This means every build requires new
      version of library and vice versa.
    • Karel Koci's avatar
      tests/system: add test for configuration stealing · e2b064a9
      Karel Koci authored
      This adds additional test for configuration stealing. It checks that
      stealing between installed packages works. It also renames original test
      to more reflect that it tests only stealing when package is being
  13. 06 Aug, 2020 2 commits
    • Karel Koci's avatar
      Version 67.0.2 · 97bda434
      Karel Koci authored
      * Warning about cycles for packages providing and at the same time
        conflicting with some other package
      * Configure script now checks if uthash is available
    • Karel Koci's avatar
      lib: Fix invalid warning about cycles · 25c4013e
      Karel Koci authored
      The reason is that Conflicts are included as negative dependencies but
      to allows flow that package can Conflict and at the same time Provide
      specific package (to do effectively replacement) it is implemented as
      negative dependency for any version. Version dependencies are satisfied
      only by packages of exact name, not by provided packages (for obvious
      reasons as Provided packages do not have same versioning scheme).
      Fix is that we pass to planning function version limitation of
      dependency and plan package only if that is fulfilled by candidate
      selected for given group.
  14. 04 Aug, 2020 1 commit
  15. 01 Jul, 2020 2 commits
    • Karel Koci's avatar
      Version · 9aa7af2d
      Karel Koci authored
      This is release to only fix build because of missing submodule.
      * Lunit submodule now points to new Github repository
    • Karel Koci's avatar
      Update URL to Lunit submodule · 69e80be6
      Karel Koci authored
      Original repository seems to be no longer accessible. The webside links
      to github repo now so this is replacement to that repo.
  16. 25 Jun, 2020 1 commit
  17. 24 Jun, 2020 1 commit
  18. 23 Jun, 2020 4 commits
    • Karel Koci's avatar
      src/lib/lua/planner: reinstall package if more than version not match · f850887a
      Karel Koci authored
      This extends list of fields checked for reinstall to not only Version
      but also to Architecture, LinkSignature, Depends, Conflicts, Provides.
      There are two reasons why we want to have these:
      First reason applies on Architecture, Depends, Conflicts and Provides.
      Those trigger update to get package information in sync with repository.
      Updater runs planning against repository so this has no effect but in
      the end if someone forgets to bump package but modifies dependencies for
      example then we reinstall package anyway.
      Second reason to reinstall package applies on LinkSignature and that is
      field inserted with hash generated from dynamic linker information
      collected for package. When this hash changes then link dependencies
      changed and even if version is same we have to reinstall such package as
      it most probably won't work with updated dependencies.
      As a tinny bonus logs now contain info about version or any other field
      if the differ and that way info about the reason to reinstall given
    • Karel Koci's avatar
      Version 67.0 · 236e08ce
      Karel Koci authored
    • Karel Koci's avatar
      tests/c: do not for when using valgrind · dc787b37
      Karel Koci authored
      We are grabing scripts output including stderr and because of that we
      can't trace childs. Instead we make it so most of our code runs without
    • Karel Koci's avatar
      Revert "tests: trace children using valgrind" · 58ab9d4b
      Karel Koci authored
      This reverts commit cd44f638.
      We can't do this as we are checking output of childs in subprocess and
      valgrind taints stderr output with its output.
  19. 22 Jun, 2020 3 commits
    • Karel Koci's avatar
      tests: trace children using valgrind · cd44f638
      Karel Koci authored
    • Karel Koci's avatar
      lib: replace libb64 with openssl · 7381cbdc
      Karel Koci authored
      We have problem with libb64 on ARM (it effectively does not work).
      Updater is already linked against OpenSSL so why not use it for that as
      well. The API for it is not exactly clean so it is wrapped in its own
      file but otherwise it is clean solution as it removes dependency and
      reuses existing one.
    • Karel Koci's avatar
      src/lib/signature: improve signature file read · f0917aec
      Karel Koci authored and Karel Koci's avatar Karel Koci committed
      There can be sunsequent lines although it is not part of standard.
      Accepting those and ignoring them fixes possible problem with invalid
      signature read as size might not match.
  20. 15 Jun, 2020 1 commit
  21. 14 Jun, 2020 2 commits
  22. 12 Jun, 2020 1 commit