rpmbuild 中的大源文件(大于 4 GB)

Big source file (bigger than 4 GB) in rpmbuild

在尝试使用包含 5.7 GB 源文件的 rpmbuild 版本 4.11.3 生成 rpm 时,我收到以下错误消息:

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

我在 this page 上发现一条旧消息说:

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.

有没有办法将这种大小的源文件包含到 rpm 中?

Joachim Sauer 的评论确实回答了只有从 4.12 版本的 rpm 开始才能添加大于 4 GB 的源文件的可能性的问题。不幸的是,由于与其他 rpm 的兼容限制,我无法使用该解决方案。

Aaron D. Marasco 对另一个 post 的评论 link 建议您可以通过使用 'tar' 而不是 cpio 来解决这个问题,方法是在rpmrc。我没有选择这个解决方案。

针对我的具体情况,简单的解决方案是将源文件分成两个小于 4 GB 的源文件,这就成功了。