Fix chroot cleanup scripts
Merge Checklist
All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)
- [x] The toolchain has been rebuilt successfully (or no changes were made to it)
- [x] The toolchain/worker package manifests are up-to-date
- [x] Any updated packages successfully build (or no packages were changed)
- [x] Packages depending on static components modified in this PR (Golang,
*-staticsubpackages, etc.) have had theirReleasetag incremented. - [x] Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
- [x] All package sources are available
- [x] cgmanifest files are up-to-date and sorted (
./cgmanifest.json,./toolkit/tools/cgmanifest.json,./toolkit/scripts/toolchain/cgmanifest.json,.github/workflows/cgmanifest.json) - [x] LICENSE-MAP files are up-to-date (
./SPECS/LICENSES-AND-NOTICES/data/licenses.json,./SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md,./SPECS/LICENSES-AND-NOTICES/LICENSE-EXCEPTIONS.PHOTON) - [x] All source files have up-to-date hashes in the
*.signatures.jsonfiles - [x]
sudo make go-tidy-allandsudo make go-test-coveragepass - [x] Documentation has been updated to match any changes to the build system
- [x] Ready to merge
Summary
In 2.0 we made the package fetchers use a chroot, we have a separate clean target for the pkg fetcher (clean-cache) which did not have an enforced ordering with the more general clean-workplan. If the package fetcher was killed halfway through it could leave behind a chroot which hasn't been cleaned up. Running make clean will generally run clean-workplan before running clean-cache which will try (and fail) to remove the chroot's /proc/* etc., and possibly put the host system into a bad state. This adds an explicit dependency so the chroot is cleaned up first.
We were also missing cleanups for the spec parsing chroot and snapshot chroots.
Change Log
- Add a dependency on
clean-cachetoclean-workplan - Add safeunmount.sh call for
$(rpms_snapshot_build_dir) - Add safeunmount.sh call for (new)
$(parse_working_dir)
Does this affect the toolchain?
NO
Test Methodology
- Local test