即使文件位于路径中,也找不到rpmbuild错误文件 [英] rpmbuild error file not found even though files are in the path

查看:626
本文介绍了即使文件位于路径中,也找不到rpmbuild错误文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我执行了以下操作,但是在运行rpmbuild时出错了

i did the following but gotten error when running rpmbuild

文件在路径中

任何帮助

谢谢

rpmbuild -vv --buildroot $PWD/root --target x86_64 -bb bin-show.spec
Building target platforms: x86_64
Building for target x86_64
Processing files: helloworld-1.0-1.x86_64
error: File not found: /nobackup/username/prod/packaging/redhat/bin-show/root/etc/testpackage.conf


RPM build errors:
    File not found: /nobackup/username/prod/packaging/redhat/bin-show/root/etc/testpackage.conf

其中bin-show.spec

where bin-show.spec

#
# Hello World Spec File
#
Summary: Hello world!
Name: helloworld
Version: 1.0
Release: 1
License: Proprietary
Group: Applications/Utilities

%description
This is my first RPM test package!

%files
/etc/testpackage.conf

文件结构

pwd
/nobackup/username/prod/packaging/redhat/bin-show

find . -name \*

./bin-show.spec
./root
./root/etc
./root/etc/testpackage.conf


推荐答案

来自 rpmbuild的消息可能是晦涩的。可能是在抱怨

The messages from rpmbuild can be obscure. It is probably complaining


  • 不是您的文件系统缺少文件,

  • 相反表示在 BUILDROOT 目录下不存在相应的路径名。

  • not that your filesystem lacks the file,
  • but rather that the corresponding pathname does not exist under the BUILDROOT directory.

通常期望您的规范文件将在〜/ rpmbuild / BUILDROOT 下构造一组文件和目录,并将其收集到包。您可以覆盖 BUILDROOT 目录的位置(并且似乎已完成此操作)。但是您的软件包需要

It normally expects that your spec-file will construct a set of files and directories under ~/rpmbuild/BUILDROOT which it will collect into a package. You can override the location of the BUILDROOT directory (and appear to have done this). But your package expects

/etc/testpackage.conf

并且(允许 BUILDROOT 目录的明显位置)您已经给了它

and (allowing for the apparent location of the BUILDROOT directory) you have given it

/root/etc/testpackage.conf

这篇关于即使文件位于路径中,也找不到rpmbuild错误文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆