如何制作RPM包(无需rpmbuild)

发布于 2024-11-11 14:14:54 字数 320 浏览 3 评论 0原文

deb:

fakeroot dpkb-build -b directory package.deb
# Name, version, architecture, etc. are in directory/DEBIAN/control

rpm:

$SOME_COMMAND directory package.rpm
# Name, version, architecture, etc. are in SOME_FILE

使用什么作为 SOME_COMMAND 和 SOME_FILE?

deb:

fakeroot dpkb-build -b directory package.deb
# Name, version, architecture, etc. are in directory/DEBIAN/control

rpm:

$SOME_COMMAND directory package.rpm
# Name, version, architecture, etc. are in SOME_FILE

What to use as SOME_COMMAND and SOME_FILE?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不美如何 2024-11-18 14:14:54

首先,不清楚您打算构建什么样的 RPM 包。它是 .src.rpm 还是二进制 .rpm

RPM 包具有文件格式。它由一个引导块、多个标头结构、一个签名块和一个存档组成。它类似于 ZIP 文件,但它在开头包含二进制的额外信息,以确保存储包元数据并可供那些希望在安装之前查询包的人访问。

因此,您可以根据遵循规范,或者可以使用保证文件按照规范编写的工具(即rpmbuild)。我强烈推荐后者,因为 RPM 不是“只是另一个 ZIP 文件”,也不是“只是另一个 tar 文件”。它具有比这更多的结构,并且“手动”滚动它的成本最终开始产生重新开发 rpmbuild 部分的成本。

请注意,rpmbuild 可以安装在实际上不使用 RPM 进行内部包管理的系统上。

First it is not clear what kind of RPM package you intend to build. It is .src.rpm or a binary .rpm?

RPM packages have a file format. This consists of a lead block, a number of header structures, a signature block, and an archive. It's like a ZIP file, but it contains extra information in binary at the beginning to ensure that the package meta-data is stored and accessible for those who wish to query the package prior to installation.

So you can either write a binary file according to the specification, or you can use the tools which guarantee the file is written according to the specification (namely rpmbuild). I would highly recommend the latter, as an RPM is not "just another ZIP file" and it's not "just another tar file". It has more structure than that, and the cost of rolling it "manually" eventually starts to incur the cost of redeveloping portions of rpmbuild.

Note that rpmbuild can be installed on systems that don't actually use RPM for their own internal package management.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文