This repository has been archived by the owner on Feb 14, 2025. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(RE-14082) Monkey-patch docker ezbake build Ruby
FOSS port of pe-puppetdb's 0886afb401129df40da1d0965b91ee2c08c76e7a There's a particularly gnarly bug in Linux kernels 5.6 to 5.10 that can result in 0 byte files being written when copying files inside containers in a specific workflow as described in: docker/for-linux#1015 This impacts the packaging gem used by ezbake when it renders ERB templates, resulting in 0 byte files critical to the execution of the build process. Using a different filesystem (like tmpfs) for /tmp as a workaround didn't seem to work. Since there is no way to explicitly control the kernel version in environments like Travis, the best approach is to monkey-patch the _Entry class in Ruby that supports FileUtils.cp, such that a no-op mode change is performed on the source and destination files before and after being written to prevent the 0 byte files from being written. In local OSX testing, no-op modifying the source file prior to copy is the solution, but other users reported that no-op modifying the destination file worked for them -- both solutions are therefore employed for completeness. This is a really hacky solution, but it only impacts two specific scenarios: * Developer builds against any commit in a branch without using mismatched packages * Travis CI PR testing
- Loading branch information