Skip to content
Snippets Groups Projects

implement merged-/usr by post-merging

Merged Helmut Grohne requested to merge helmutg/debootstrap:bootstrap-protocol into master
  1. Aug 12, 2023
    • Helmut Grohne's avatar
      implement merged-/usr by post-merging · a37ac22b
      Helmut Grohne authored
      The implementation of merged-/usr in debootstrap currently creates the
      aliasing symlinks prior to initial unpack. Since it also passes -k to
      tar, this method will fail once base-files ships the aliasing symlinks.
      To avoid this failure, we swap the initial unpack and the /usr-merge.
      Shipping these links in a package is a mitigation (DEP17-M4) to avoid
      accidentally deleting the aliasing links during a package upgrade
      (DEP17-P9).
      
      This swap comes at a complexity. Earlier we only had to create a few
      directories and a few symlinks in an empty tree, but after unpack, we
      have to actually perform the same task as the usrmerge package without
      the atomicity requirement.
      
      On the flip side, this swap allows us to determine the required multilib
      directories from the unpacked filesystem tree rather than hard coding
      them into debootstrap.
      
      This post-merging implementation also comes with other limitations.
       * We assume that there are no non-directory conflicts between files in
         / and files in /usr. This property is required by Debian policy 10.1.
       * We assume that no relative symbolic links cross the root directory.
         This property is required by Debian policy 10.5.
      a37ac22b
Loading