rpm 构建错误

发布于 2024-08-13 17:03:10 字数 186 浏览 3 评论 0原文

我尝试构建一个 rpm 包,但出现以下错误

  • /usr/lib/rpm/find-debuginfo.sh /usr/src/redhat/BUILD/RPMS 查找:无效谓词“” 错误:/var/tmp/rpm-tmp.86590 (%install) 的退出状态错误 可能是什么原因。任何人都可以帮助我吗...谢谢

I tried to build a rpm package which is giving me the following error

  • /usr/lib/rpm/find-debuginfo.sh /usr/src/redhat/BUILD/RPMS
    find: invalid predicate `'
    error: Bad exit status from /var/tmp/rpm-tmp.86590 (%install)
    what could be the reason .can any one help me in this...Thanks

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

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

发布评论

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

评论(3

箹锭⒈辈孓 2024-08-20 17:03:10

尝试在规范文件中定义 BuildRoot 变量。 find-debuginfo 脚本会多次查找该目录,如果没有它就会死掉。

这通常看起来像: BuildRoot: %{_tmpdir}/%{name}-%{version}-%{release}

至于你的第二个问题,我不能在没有看到规范文件的情况下说并直接获取来源,而且我绝不是 RPM 专家。我会向您推荐《Maximum RPM》第 13 章(可在线免费获取副本),以及 Tom Callaway 在 如何制作好的 RPM 包 - 我发现这里的规范示例在过去非常有帮助。

Try defining the BuildRoot variable in your spec file. The find-debuginfo script looks in to that directory several times, and will die without it.

This will usually look something like: BuildRoot: %{_tmpdir}/%{name}-%{version}-%{release}

As to your second question, I can't say without seeing spec file and sources directly, and I am by no means an RPM expert. I will recommend you to Chapter 13 of Maximum RPM(there are copies available free online), and the notes from Tom Callaway's presentation on How to make good RPM packages - I've found the spec examples here to be very helpful in the past.

朦胧时间 2024-08-20 17:03:10

在您的规范中,您可以在顶部执行此操作:

%define debug_package %{nil}

这应该绕过此问题

In your spec you can do this at the top:

%define debug_package %{nil}

This should bypass this problem

浮华 2024-08-20 17:03:10

当我尝试在 RedHat 5.3 服务器上构建时,我刚刚遇到了同样的问题。这是我发现的。该错误似乎是由空的 RPM_BUILD_ROOT 变量引起的。下面是一个有问题的行:

find "$RPM_BUILD_ROOT" ! -path "${debugdir}/*.debug" -type f \
                 \( -perm -0100 -or -perm -0010 -or -perm -0001 \) \
                 -print |

如果尚未定义RPM_BUILD_ROOT,则要查找的第一个参数是空字符串“”,这会导致此错误。有趣的是,如果您删除 $RPM_BUILD_ROOT 周围的引号,则命令可以正常工作,因为第一个参数将变为“!”。由于不需要在规范文件中定义“BuildRoot:”,因此这对我来说肯定是一个错误。

I just hit this same problem when attempting to build on a RedHat 5.3 server. Here is what I found. The error appears to be caused by an empty RPM_BUILD_ROOT variable. Below is one offending line:

find "$RPM_BUILD_ROOT" ! -path "${debugdir}/*.debug" -type f \
                 \( -perm -0100 -or -perm -0010 -or -perm -0001 \) \
                 -print |

If RPM_BUILD_ROOT hasn't been defined, then the first argument to find is an empty string "", which causes this error. Interestingly enough, if you remove the quotes from around $RPM_BUILD_ROOT, then command works fine since the first argument would become the "!". Since it's not required to define a "BuildRoot:" in the spec file, this certainly looks like a bug to me.

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