Trouble Understanding %files in spec file
This question is somewhat basic; I am attempting to compile and install an Apache so module via rpm. This as much is accomplished when the rpm is built but when the rpm itself is installed, nothing occurs because I have incorrectly ennumerated the %files section of the spec file.
My question is, how are the files supposed to be listed in the %files section so that they are copied to their proper location? It seems that all the files are processed with $RPM_BUILD_ROOT appended to their location? Here is the relevant portion of my spec file. Code:
%description Code:
chmod 755 /usr/lib/httpd/modules/mod_authz_svn_eecs.so |
Quote:
Code:
cp /usr/lib/httpd/modules/mod_authz_svn_eecs.so $RPM_BUILD_ROOT/mod_authz_svn_eecs.so Code:
cp /usr/lib/httpd/modules/mod_authz_svn_eecs.so $RPM_BUILD_ROOT/usr/lib/mod_authz_svn_eecs.so Quote:
|
Fixed spec file, still questions
I altered the spec file so that the .so file is properly copied to the %files directory.
Code:
Summary: Code:
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/test/rpmbuild/BUILDROOT/mod_authz_svn_eecs-0-0.i386 |
Odd. %{_libdir} should expand to %{_exec_prefix}/%{_lib}, %{_exec_prefix} should expand to %{_prefix} which is '%define _prefix /usr' if you 'rpmbuild --showrc|egrep "^-.*(_prefix|_exec_prefix|libdir)"'. Another way would be to use auto-fill which should make your %files section look like this:
Code:
%files -f %{_tmppath}/%{name}_contents.txt Code:
find $RPM_BUILD_ROOT -not -type d -printf "%%%attr(%%m,root,root) %%p\n" | sed -e "s|$RPM_BUILD_ROOT||g" > %{_tmppath}/%{name}_contents.txt |
working spec file
I went ahead and cleaned out all the temporary files from previous builds (which was probably why that errant file was being copied to root) and altered the spec file one last time, the cp in the %install section copies the file to the directory. This spec file works.
Code:
%prep |
All times are GMT -5. The time now is 06:23 PM. |