Search code examples
rpmlarge-filesrpmbuildrpm-speccpio

Big source file (bigger than 4 GB) in rpmbuild


While trying to generate an rpm using rpmbuild version 4.11.3 including a source file of 5.7 GB I get the following error message :

error: create archive failed on file /path_and_name_of_file cpio: File too large for archive

I found an old message on this page saying :

The support for large files is not something we can ever backport to rpm 4.11 (and thus rhel-7) within reason, the related changes are way, way too intrusive.

Is there no way to include a source file of this size into an rpm?


Solution

  • Joachim Sauer comment did answer the question that the possibility of adding a source file bigger than 4 GB is possible only starting with version 4.12 of rpm. Unfortunately due to compatible limitation with other rpm I could not use that solution.

    Aaron D. Marasco comment link to another post that suggest the you could go around the issue by using 'tar' instead of cpio, by specifying 'cpiobin' in rpmrc. I didn't go for this solution.

    The easy solution for my specific case was to divide the source file in two source files of less than 4 GB and that did the trick.