i did the following but gotten error when running rpmbuild
Files are there in path
Any help or hint are appreciated
Thanks
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
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
and the files structure
pwd
/nobackup/username/prod/packaging/redhat/bin-show
find . -name \*
./bin-show.spec
./root
./root/etc
./root/etc/testpackage.conf
The messages from
rpmbuild
can be obscure. It is probably complainingBUILDROOT
directory.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 theBUILDROOT
directory (and appear to have done this). But your package expectsand (allowing for the apparent location of the
BUILDROOT
directory) you have given itThomas is nearly correct about the origin of the error.
However rpmbuild expect that the file is present in
You should either create it in
%install
section:or provide as SourceX: