Skip to content
Snippets Groups Projects
  1. Apr 07, 2022
  2. Mar 10, 2022
    • Simon McVittie's avatar
      pressure-vessel: Warn if we have to fall back to copying · b5441dc6
      Simon McVittie authored
      pressure-vessel is designed to use hard-links when preparing the
      container runtime, and we rely on them to get fast startup and not waste
      disk space. If we can't link() a file to its counterpart in the
      temporary runtime directory, log a warning so that people know they are
      in a situation that shouldn't really happen.
      
      To avoid spurious warnings if the copy fallback would also have failed
      with a fatal error, defer the warning until after the first copy
      fallback has succeeded. That way, if we can't write to the variable
      data directory at all (for example EROFS or something), we won't
      complain about link() failing, just show the fatal error from the copy
      fallback also failing.
      
      Helps: https://github.com/ValveSoftware/steam-runtime/issues/495
      
      
      Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
      b5441dc6
  3. Jun 08, 2021
    • Simon McVittie's avatar
      mtree: Parse the ignore, nochange and optional flags · 16e20ba0
      Simon McVittie authored
      
      The nochange flag is fully implemented here: it suppresses changing the
      modification time or permissions.
      
      The optional flag is mostly implemented here: it suppresses the error
      that would ordinarily occur if a file with content does not already
      exist.
      
      The ignore flag is not yet implemented, only parsed, because it only
      really applies when verifying whether a filesystem tree matches a
      specification.
      
      Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
      16e20ba0
  4. Apr 30, 2021
    • Simon McVittie's avatar
      pressure-vessel: Add code to parse and apply a mtree(5) manifest · 1bdf777d
      Simon McVittie authored
      
      This can be used to create directories, symlinks and zero-byte files,
      create files as a clone (hard-link or copy) of files in a reference
      directory, assert that files exist, set executable/non-executable
      permissions, and set files' modification times.
      
      When cloning files from a reference directory, the default is to use
      the same filename as the destination, but that can be overridden
      (for example to deal with inconvenient/non-Windows-friendly filenames).
      This is also actually slightly faster than pv_cheap_tree_copy(),
      presumably because the manifest is contiguous on-disk and the
      directories are not necessarily.
      
      Setting directories' modification times is implemented, but probably
      won't work in practice, because any files we create in the directory
      will alter its mtime.
      
      Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
      1bdf777d
Loading