I'm testing out building an RPM for just script/conf files, the actual contents of the RPM would be many scripts/conf files etc. In this situation it is necessary to distribute it as an RPM:
The spec file, directory structure
What happens when I try to build the rpm...
The source (a compressed folder containing 2 dummy files)
The spec file culprit - have been commenting out to try and isolate where the issue lies
Naturally, there is no requirement to specify anything within %build as this will simply throw the relevant files around. When I have resolve this rpm building issue, the %prep section will include creating the appropriate binary directories etc.
Does anyone know how I can resolve this issue? System is Fedora 12 i686.
Edit:
I note that the arch references in /usr/lib/rpm/macros are i386:
$ cat /usr/lib/rpm/macros | grep %_build_arch
%_build_arch i386
$ cat /usr/lib/rpm/macros | grep %_arch
%_arch i386
Whilst uname -p shows:
$ uname -p
i686
The spec file, directory structure
[rwac@aputer SPECS]$ pwd
/home/rwac/rpmbuild/SPECS
[rwac@aputer SPECS]$ ls filebroker.spec
filebroker.spec
[rwac@aputer SPECS]$ ls ../
BUILD BUILDROOT RPMS SOURCES SPECS SRPMS
What happens when I try to build the rpm...
[rwac@aputer SPECS]$ rpmbuild -ba filebroker.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.ZtWSwz
+ umask 022
+ cd /home/rwac/rpmbuild/BUILD
+ cd /home/rwac/rpmbuild/BUILD
+ rm -rf filebroker-1.0
+ /usr/bin/gzip -dc /home/rwac/rpmbuild/SOURCES/filebroker-1.0.tar.gz
+ /bin/tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd filebroker-1.0
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.hrKK2J
+ umask 022
+ cd /home/rwac/rpmbuild/BUILD
+ cd filebroker-1.0
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.JZV0yU
+ umask 022
+ cd /home/rwac/rpmbuild/BUILD
+ cd filebroker-1.0
+ /usr/lib/rpm/brp-compress
/usr/lib/rpm/brp-compress: line 8: cd: /home/rwac/rpmbuild/BUILDROOT/filebroker-1.0-1.i386: No such file or directory
+ /usr/lib/rpm/brp-strip
find: `/home/rwac/rpmbuild/BUILDROOT/filebroker-1.0-1.i386': No such file or directory
+ /usr/lib/rpm/brp-strip-static-archive
find: `/home/rwac/rpmbuild/BUILDROOT/filebroker-1.0-1.i386': No such file or directory
+ /usr/lib/rpm/brp-strip-comment-note
find: `/home/rwac/rpmbuild/BUILDROOT/filebroker-1.0-1.i386': No such file or directory
Processing files: filebroker-1.0-1.i386
error: File must begin with "/": filebroker.sh
error: File must begin with "/": filebroker.conf
RPM build errors:
File must begin with "/": filebroker.sh
File must begin with "/": filebroker.conf
The source (a compressed folder containing 2 dummy files)
[rwac@aputer SPECS]$ ls ../SOURCES/filebroker-1.0.tar.gz
../SOURCES/filebroker-1.0.tar.gz
The spec file culprit - have been commenting out to try and isolate where the issue lies
[rwac@aputer SPECS]$ cat filebroker.spec
Name: filebroker
Version: 1.0
Release: 1
Summary: File Broker Package
Group: Applications/File
License: GPL
URL: http://fictional.com/filebroker
Packager: rwac puter <[email protected]>
#Source0: filebroker-1.0.tar.gz
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
#BuildRequires:
#Requires:
%description
Whizzy File Broker App
%prep
%setup -q
%build
# Prefix commented macros with %% to stop them causing errors
#%%configure
#make %%{?_smp_mflags}
%install
#rm -rf $RPM_BUILD_ROOT
#make install DESTDIR=$RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%files
#%%defattr(-,root,root,-)
#%%doc
filebroker.sh
filebroker.conf
%changelog
* Wed Feb 24 2010 rwac puter <[email protected]>
- First Version
Naturally, there is no requirement to specify anything within %build as this will simply throw the relevant files around. When I have resolve this rpm building issue, the %prep section will include creating the appropriate binary directories etc.
Does anyone know how I can resolve this issue? System is Fedora 12 i686.
Edit:
I note that the arch references in /usr/lib/rpm/macros are i386:
$ cat /usr/lib/rpm/macros | grep %_build_arch
%_build_arch i386
$ cat /usr/lib/rpm/macros | grep %_arch
%_arch i386
Whilst uname -p shows:
$ uname -p
i686
Last edited: