可以使用 RPM 来分发 *.bin 文件吗
我从来没有这样做过,我也不确定你能不能做到。但是我可以使用 RPM 来分发已经创建的 *.bin 文件(Linux 自解压二进制文件)吗?我的场景是这样的,我们使用 RPM 来分发我们所有的软件。我有一个供应商软件,它已经是一个 bin 文件。说 myapp.bin。我想使用 RPM 将软件分发到 /tmp,然后启动脚本来安装 myapp.bin 作为 RPM %post% 的一部分。这可能吗?如果是这样,有人有 SPEC 文件示例吗?
谢谢
I've never had to do this and I'm not really sure you can do it or not. But can I use RPM to distribute an already created *.bin file (a Linux self extracting binary files). My scenario is this, we use RPM to distribute all of our software. I have a piece of vendor software thats already a bin file. Say myapp.bin. I would like to use RPM to distribute the software to say /tmp and then kick off a script to install myapp.bin as part of the RPM %post%. Is this possible? If so, does anyone have a SPEC file example.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
为什么不在构建时提取自解压程序,然后将提取的安装文件包含在 RPM 中?
您大概可以使用 %build 和 %install 部分中的脚本来执行此操作。
这样就没有人需要担心运行自解压程序了,一切都已经在那里了。
Why not extract the self-extractor at build-time, then include the extracted, installed files in the RPM?
You can presumably do this with the scripts in the %build and %install sections.
Then nobody would need to worry about running the self-extractor, it would all be already there.
您可能只需将 .bin 文件提取到 buildroot (%setup),执行它(在 %build 部分),然后在 %install 部分进行任何修改。
最后,只需在 %files 部分列出已安装的文件。如果您发布了规范的内容,如果不清楚,我可能可以调整到足以说明我所说的内容。
You can probably just extract the .bin file to the buildroot (%setup), execute it (in the %build section), and then do any modifications in the %install section.
Finally, just list the installed files in the %files section..if you post what you have for a spec I can probably adjust to enough to illustrate what I am saying if this is not clear.