I want to create simple RPM file with many small files.
[root@laptop rpm]# tree
.
├── BUILD
├── BUILDROOT
├── RPMS
├── SOURCES
│ └── some_agent-1.0.tar.gz
├── SPECS
│ ├── kernel.spec
│ └── kernel.spec~
└── SRPMS
6 directories, 3 files
[root@laptop rpm]#
I have this spec file:
Summary: some_agent
Name: some_agent
Version: 1.0
Release: 1
License: Apache
Group: application
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
%description
Test
%prep
%setup -q
%build
%install
rm -rf $RPM_BUILD_ROOT
make root=$RPM_BUILD_ROOT install
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc
agent/*
But when I try to build the RPM package I get this error:
[root@laptop ~]$ rpmbuild -bb -v ~/rpm/SPECS/kernel.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.RUwFW5
+ umask 022
+ cd /home/rcbandit/rpm/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /home/rcbandit/rpm/BUILD
+ rm -rf some_agent-1.0
+ /usr/bin/gzip -dc /home/rcbandit/rpm/SOURCES/some_agent-1.0.tar.gz
+ /bin/tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd some_agent-1.0
/var/tmp/rpm-tmp.RUwFW5: line 38: cd: some_agent-1.0: No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.RUwFW5 (%prep)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.RUwFW5 (%prep)
[root@laptop ~]$ ^C
Do you have any idea where is my mistake?
I copied the source file but for some reason it's not found.
some_agent-1.0.tar.gz
tarball, do you end up with a directory calledsome_agent-1.0
? Or something else? – Hessenassau