Rpm-build 限制 [英] Rpm-build limitaitons

查看:108
本文介绍了Rpm-build 限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 rpm 打包的初学者,据我所知,由于 cpio 限制,rpm-build 存在文件大小>4GB 的问题.因此,我将包中的大文件与 gnu 拆分为 512MB 的文件 [这是作为 rpmbuild 的一部分完成的,因为大文件是在构建时生成的].我仍然看到错误:错误:在文件/io1/dm/build/BUILDROOT/pkg/installdir/lib/clfsplitab: cpio: Bad magic 上创建存档失败",其中 clfsplitab 是大文件的 512MB 拆分.任何建议如何追踪确切的问题?或者有没有更好的方法来处理/生成大型有效载荷包?
更新: 如图所示,错误出现在 clfsplitab 上,即拆分的第二个文件(因为 gnu 拆分通常拆分后缀为 aa、ab、ac 等的文件.看起来 cpio 无法识别类型文件,第一个文件是 tar,第二个和其余的是数据..gzipped 分割部分).似乎只解决了一个错误以引发相同的错误魔术错误,但这一次是在最后一部分.
注意:我可以控制 rpm 中文件的输出大小.理想情况下,转储的完整文件的大小约为 4g [分为 512mb 块].但是为了测试包大小确实没有问题,我稳定地减小了生成的目标文件的大小,如果包低于 2G,它似乎可以正常工作,并且我得到了很好的 rpm.如果我没记错的话,大小问题自 rpm 4.4.x 以来已修复.这似乎仍然是 cpio 问题,rpm 使用它进行归档吗?

I am beginner in rpm packaging and as I understand rpm-build has issue with file sizes>4GB due to cpio limitations. So I split the large file in my package with gnu split into files of 512MB [which is done as a part of rpmbuild since the large files are generated build time]. I still see the error: "error: create archive failed on file /io1/dm/build/BUILDROOT/pkg/installdir/lib/clfsplitab: cpio: Bad magic" where clfsplitab is the 512MB split of the large file. Any suggestions on how to trace the exact issue? Or is there a better way to handle/genrate large payload packages?
Update: As shown the error was on clfsplitab i.e. second file of the split (since gnu split usually splits files with suffix aa, ab, ac and so on. It looks like cpio was unable to recognize the type of file,first file was tar, second and rest were data..gzipped the split parts). It seems to solved only one error to raise same bad magic error, but this time on the last part.
Note: I can control the size of the output of the files that go in the rpm. Ideally the size of the full file dumped is about 4g [which is split in 512mb blocks]. But to test that it is indeed no issue with package size, I steady decreased the size of the object file generated, and if the package goes below 2G it seems to work correcty, and I get a good rpm. If I recall correctly the size issue was fixed since rpm 4.4.x. Does this still seem like cpio issue, which is used by rpm for archiving?

推荐答案

虽然非常规,但我通过使用 'tar' 而不是 cpio 解决了这个问题,在 rpmrc 中指定cpiobin".

While unconventional, I got around the issue by using 'tar' instead of cpio, by specifying 'cpiobin' in rpmrc.

这篇关于Rpm-build 限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆