版本更新时遇到 RPM 构建错误
关于这个 RPM 构建错误有什么想法吗?我正在进行版本更新并重新运行 RPM 构建。 我的 SOURCES
目录有一个名为 electric-fence_2.1.13-0.1.tar.gz
的 tar 和补丁,我不想更改原始 tar,但只添加了补丁。
这是错误:
eFence]$ ~/rpmmacros/rpmbuild arm-linux-gnueabi-arm SPECS/target-reltool-electric-fence.spec
RPM Package building for CE Linux 6.0
Building target platforms: arm-linux
Building for target arm-linux
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.2742
+ umask 022
+ cd /home/raj/eFence/BUILD
+ cd /home/raj/eFence/BUILD
+ rm -rf electric-fence-2.1.14
+ /bin/gzip -dc /home/raj/eFence/SOURCES/electric-fence_2.1.13-0.1.tar.gz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd electric-fence-2.1.14
/var/tmp/rpm-tmp.2742: line 31: cd: electric-fence-2.1.14: No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.2742 (%prep)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.2742 (%prep)
这是我的规范文件在不同重要部分的摘录:
enter code here
12 Version: 2.1.14
13 Release: 06000001
18 Group: %{abc_group}
19 URL: http://perens.com/works/software/ElectricFence/
20 Source0: electric-fence_2.1.13-0.1.tar.gz
21
51 %setup -q -n electric-fence-2.1.14
Any idea about this RPM build error? I am doing version update and re-run RPM build.
My SOURCES
dir has a tar called electric-fence_2.1.13-0.1.tar.gz
and patches, which i don't want to change the original tar but only added patches.
This is the error:
eFence]$ ~/rpmmacros/rpmbuild arm-linux-gnueabi-arm SPECS/target-reltool-electric-fence.spec
RPM Package building for CE Linux 6.0
Building target platforms: arm-linux
Building for target arm-linux
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.2742
+ umask 022
+ cd /home/raj/eFence/BUILD
+ cd /home/raj/eFence/BUILD
+ rm -rf electric-fence-2.1.14
+ /bin/gzip -dc /home/raj/eFence/SOURCES/electric-fence_2.1.13-0.1.tar.gz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd electric-fence-2.1.14
/var/tmp/rpm-tmp.2742: line 31: cd: electric-fence-2.1.14: No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.2742 (%prep)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.2742 (%prep)
Here is my spec file extracts at different important parts:
enter code here
12 Version: 2.1.14
13 Release: 06000001
18 Group: %{abc_group}
19 URL: http://perens.com/works/software/ElectricFence/
20 Source0: electric-fence_2.1.13-0.1.tar.gz
21
51 %setup -q -n electric-fence-2.1.14
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题是您已经告诉 RPM 您正在构建 2.1.14 并且存档包含一个名为
electric-fence-2.1.14
的目录,但存档不包含该目录。鉴于存档是
electric-fence_2.1.13-0.1.tar.gz
我猜测它实际上包含一个名为electric-fence-2.1.13
的目录或其他内容。The problem is that you've told RPM that you are building 2.1.14 and that the archive contains a directory called
electric-fence-2.1.14
but the archive doesn't contain that directory.Given that the archive is
electric-fence_2.1.13-0.1.tar.gz
I would guess it actually contains a directory calledelectric-fence-2.1.13
or something.