1. 04 Sep, 2019 1 commit
    • Karel Koci's avatar
      pkgupdate: create links to alternatives in correct path · 8467e68f
      Karel Koci authored
      The previous fix correctly changed source of alternatives but it was
      still trying to create link in invalid location (ignoring configured
      root). This adds this path in appropriate location.
      
      Note that TRG is an absolute path so there does not have to be any slash
      between ROOT_DIR and TRG.
      8467e68f
  2. 26 Aug, 2019 2 commits
    • Karel Koci's avatar
      pkgupdate: do not create reboot notification for non-root system · 2166034b
      Karel Koci authored
      This skips content of create-notification reboot_required hook in case
      if path to system is not /. Only currently running system should raise
      reboot_required request.
      2166034b
    • Karel Koci's avatar
      pkgupdate: update alternatives hook fix to use ROOT_DIR · bfd4acf3
      Karel Koci authored
      This fixes problem where alternatives were not correctly created in
      system run in non-root mode. This was because as source the global path
      was used but in places like build system this path is invalid. We have
      those files but relative to ROOT_DIR path. This fixes that.
      
      This also just fixes small shell syntax problem where paths were no
      quoted.
      bfd4acf3
  3. 15 Jun, 2019 1 commit
  4. 06 Jun, 2019 1 commit
    • Karel Koci's avatar
      lib: move prerm to be run before postinst in transaction · 0ecb39fc
      Karel Koci authored
      This moves execution of prerm script from pkg_scripts step to pkg_move
      step. This effectivelly means that prerm and preinst scripts are run in
      plan order at the same time. This solves problems where prerm disables
      service or in general does operation which revers one done previous
      preinst.
      
      There are two consideration required. This code defines content of
      journal. The difference is that instead of editing all_configs table in
      pkg_scripts we generate it in its fullest in pkg_move. That is all right
      and fully compatible. The more problematic case is when we update from
      previous version of updater and there is journal stuck with completed
      pkg_move step but not yet completed pkg_scripts step. The result is that
      in such case prerm scripts are not run and packages are not in reality
      removed (removed from state). The real removal happens with next updater
      execution. So this is self healing problem that happens only with small
      probability.
      
      This also does one degradation in behavior. Previously we were ignoring
      removal operation for packages that were intended to be installed. In
      that case we just skipped remove section. The problem is that pkg_move
      does not have to_install argument and that makes it impossible to check
      if operation tries to remove package that is installed by some other
      one. The effect of such operation in this new implementation is that we
      would run in such case prerm script and removed given package info from
      status while preserved its files in system. That is worst case scenario.
      Other case where install request comes after remove request returns
      given info to state and runs preinst. That effectively just causes us to
      run both prerm and preinst where it should have been reinstall. That
      effectively should not cause anything bad.
      The real reason why we do not care too much is that only case when
      something like that happens is when pkgtransaction is used. pkgupdate
      never generates two operations for same package. Because pkgtransaction
      is dangerous tool in general I don't see it as huge problem.
      Other option is to pass to_install table to pkg_move as well but we
      would have to take care of situation where this field is not part of
      journal.
      0ecb39fc
  5. 09 Apr, 2019 6 commits
    • Karel Koci's avatar
      pkgupdate: fix --no-reboot causing reboot · 8089fc51
      Karel Koci authored
      In rewrite to argp the --no-reboot and --reboot-required options were
      mangled together and that meant that reboot was happening always when
      reboot was disabled. How unfortunate.
      8089fc51
    • Karel Koci's avatar
      pkgupdate: configs: fix obsolete syntax · b9ac3ebd
      Karel Koci authored
      b9ac3ebd
    • Karel Koci's avatar
      gitignore: drop unnecessary ignore rules · ffab22fa
      Karel Koci authored
      We no longer use python in this repository and CRL is no longer tested
      so neither downloaded.
      ffab22fa
    • Karel Koci's avatar
      uri: make threads conditional · c09470a5
      Karel Koci authored
      We do not need error variables to be thread_local but it would be good
      to set them so. The problem is that some libc implementations with C11
      support do not provide this header. We can check for that and for now
      just ignore given option. This means that we provide it in case of
      existing threads.h and ignore it in other case.
      c09470a5
    • Karel Koci's avatar
      openssl_purity: simplify makefile · ce8d8ba0
      Karel Koci authored
      This just refactors original openssl_purity.mk.
      
      Also note that this might no longer be required. From OpenSSL 1.1.0 it
      seems that problems with valgrind were fixed and this might meant that
      we can drop this. We don't want to do that now because OpenSSL 1.0.0
      only systems might still exists but we can do it in future.
      ce8d8ba0
    • Karel Koci's avatar
      libupdater: build newer version of uriparser · f5fdb85b
      Karel Koci authored
      This builds uriparser if system provides older version then required.
      This is pretty simple hack but hack non the less.
      f5fdb85b
  6. 08 Apr, 2019 29 commits