[Fedora-packaging] How to add additional files in rpm

Steve Traylen steve at traylen.net
Sun May 15 12:59:05 UTC 2011


2011/5/15  <Sunil_Gupta2 at dell.com>:
> Hello list,>
> I am trying to add some programs in rpm which are not the part of source
> package. I copied them in BUILD directory and mentioned them in
>
> %install and %files section but rpmbuild –bb specfile  always say
>
> Install: cannot stat `iotestlist.sh`: No such file or directory
>
> Am I missing something?

You have them now in the BUILD directory but not the BUILDROOT directory.
It is in this directory the files are prepared for grabbing by the
%files section.

A typical solution might be:

Source0: yourtar.tar.gz
# This extra file....
Source1:  iotestlist.sh

%prep
%setup
cp -p %{SOURCE1} iotestlist.sh

%install
install -p -m 755 iotestlist %{buildroot}%{_bindir}/iotestlist.sh

%files
....
%{_bindir}/iotestlist.sh

Steve.
-- 
Steve Traylen


More information about the packaging mailing list