[Midnightbsd-cvs] [MidnightBSD/mports] 8c58cc: magus: clear file flags before resetting slave chr...

Lucas Holt noreply at github.com
Wed Sep 2 17:32:44 EDT 2026


  Branch: refs/heads/magus/chroot-clear-flags
  Home:   https://github.com/MidnightBSD/mports
  Commit: 8c58cc2e6e58595d72ac77950e0cc3be3815375c
      https://github.com/MidnightBSD/mports/commit/8c58cc2e6e58595d72ac77950e0cc3be3815375c
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2026-09-02 (Wed, 02 Sep 2026)

  Changed paths:
    M Tools/lib/Magus/Chroot.pm

  Log Message:
  -----------
  magus: clear file flags before resetting slave chroot directories

The bootstrap tarball carries schg/uchg files (libc.so.7, ld-elf.so.1,
init, su, ...), so resetting a slave chroot on startup fails with EPERM:

  cannot unlink file for .../reference/usr/lib32/libcrypt.so.5:
    Operation not permitted
  tar: Error exit delayed from previous errors
  Couldn't untar root tarball: 256

Clear the flags before removing the reference dir, and before cpdup
re-syncs the reference dir over a dirty worker chroot (the chflags call
there was commented out).

rmtree() returns the number of entries it removed, so the old
"rmtree() || die" never fired on a partial removal.  The reference dir
survived and tar then extracted over the stale tree.  Check that the
directory is actually gone instead.

AI-Assisted-by: Claude Opus 5 <noreply at anthropic.com>
Signed-off-by: Lucas Holt <luke at foolishgames.com>



To unsubscribe from these emails, change your notification settings at https://github.com/MidnightBSD/mports/settings/notifications


More information about the Midnightbsd-cvs mailing list