创建 RPM 来简单地解压 tar 球

发布于 2024-09-24 19:04:02 字数 200 浏览 0 评论 0原文

我正在为 rpm 编写一个 .spec 文件,该文件只是将 tar 球解压到文件系统上的某个目录中

那么我应该将原始 tar 球放在哪里?我见过的所有例子都是从互联网上下载原始的 tar 球。但我的情况并非如此。

我应该将 tar 球放入 %files 部分,以便它成为 rpm 的一部分吗?如果是这样,那么我如何在要解压它的 %setup 宏中引用它?

I am writing a .spec file for a rpm that is simply going to unpack a tar ball into some directory on the filesystem

So where do I put the original tar ball? All the examples I have seen download the original tar ball from the internet. But that is not so in my case.

Should I put the tar ball in the %files section so that it becomes part of the rpm? If so then how do I reference it in the %setup macro which is going to unpack it?

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

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

发布评论

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

评论(2

樱桃奶球 2024-10-01 19:04:02

RPM 内的 tarball - 坏主意。您应该做的是在%install阶段将tarball解压到临时假根文件夹中的适当位置,然后列出%files中的所有内容。 RPM 会压缩内容,因此您不会在 RPM 大小上丢失任何内容,但现在会跟踪新 RPM 中包含的文件的更改并进行验证 (rpm -qV)。

Tarball inside RPM - bad idea. What you should do is unpack the tarball in the %install phase to the appropriate places in the temporary fake root folder, then list all the contents in %files. RPM compresses the contents so you are not losing anything on the size of the RPM, but the files contained in your new RPM are now tracked for changes and can be verified (rpm -qV).

半步萧音过轻尘 2024-10-01 19:04:02

更好的想法:

使用 fpm 将 tarball 制作为 RPM:

fpm -s tar -t rpm --name <rpm-name> --version <rpm-version> <tarball-file-name>

Beter idea:

Use fpm to make your tarball into an RPM:

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