rpm-software-management / rpm

The RPM package manager
http://rpm.org
Other
502 stars 363 forks source link

Only copy git tracked files into test image on `make ci` #2970

Open dmnks opened 7 months ago

dmnks commented 7 months ago

While the "canonical" _build subdirectory in the source tree is ignored when copying the sources into the OCI image (when using make ci), there may be other directories and/or files and some of them may cause issues when copying them (e.g. if they're other overlayfs mounts).

The sane way would be to just copy the files tracked in git. I can't see a way to do that easily with the COPY instruction in the Dockerfile but there might be other ways.

dmnks commented 7 months ago

The ADD command can copy archives (and unpacks them also) so we might as well just do a git archive beforehand and copy that.