Delete root-owned Chutney *.pyc early in the build process
Originally created by @CyrilBrulebois on #17559 (Redmine)
If one runs the test suite, one might end up with those files, owner by root:
kibi@armor:~/work/clients/tails/release/release-checkout$ find submodules/chutney/lib/chutney/ -name '*.pyc'|sort
submodules/chutney/lib/chutney/Debug.pyc
submodules/chutney/lib/chutney/Host.pyc
submodules/chutney/lib/chutney/__init__.pyc
submodules/chutney/lib/chutney/Templating.pyc
submodules/chutney/lib/chutney/Traffic.pyc
submodules/chutney/lib/chutney/Util.pyc
which the build system doesn’t quite like:
kibi@armor:~/work/clients/tails/release/release-checkout$ rake build
Using HTTP proxy: http://vagrant-buster:3142
rake aborted!
Errno::EPERM: Operation not permitted @ chmod_internal - submodules/chutney/lib/chutney/Templating.pyc
/home/kibi/work/clients/tails/release/release-checkout/Rakefile:415:in `block in <top (required)>'
Tasks: TOP => build => ensure_correct_permissions
(See full trace by running task with --trace)
Would it make sense to just remove those files when preparing to build
an image? From a technical point of view, that should be doable from
Rakefile
since the parent directory is still
(unprivileged-)user-owned.