Mailinglist Archive: opensuse-buildservice (233 mails)

< Previous Next >
Re: [opensuse-buildservice] openSuSE 11.1: Builds rpm and says failed
  • From: Pere Constans <constans@xxxxxxxxxxxxx>
  • Date: Thu, 18 Dec 2008 02:26:30 +0100
  • Message-id: <200812180226.30308.constans@xxxxxxxxxxxxx>
A Dijous 18 Desembre 2008, Marcus Hüwe va escriure:
This is due to your spec file:

find . -type d -fprint $RPM_BUILD_DIR/file.list.%{name}.dirs

so your package will own dirs like /usr/bin etc. which are already owned
by the filesystem rpm. I would suggest to list the files manually in the
%files section instead of using such find commands.


Marcus, thank you.

The syntax for that, would it be:
====================================
%clean
rm -rf $RPM_BUILD_ROOT

%files <--------------- NOT SURE HERE
%defattr(-,root,root)
/usr/bin/cb2bib
/usr/bin/dl_cb2bib
/usr/share/applications/cb2bib.desktop
/usr/share/applications/dl_cb2bib.desktop
/usr/share/pixmaps/cb2bib.png
/usr/share/cb2bib
/usr/share/cb2bib/* <---------- NOT SURE HERE (it should take the
whole dir and subdirs)
====================================


Now I have:
====================================
cd $RPM_BUILD_ROOT
find . -type d -fprint $RPM_BUILD_DIR/file.list.%{name}.dirs
find . -type f -fprint $RPM_BUILD_DIR/file.list.%{name}.files.tmp
sed '/\/man\//s/$/.gz/g' $RPM_BUILD_DIR/file.list.%{name}.files.tmp >
$RPM_BUILD_DIR/file.list.%{name}.files
find . -type l -fprint $RPM_BUILD_DIR/file.list.%{name}.libs
sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' $RPM_BUILD_DIR/file.list.
%{name}.dirs > $RPM_BUILD_DIR/file.list.%{name}
sed 's,^\.,\%attr(-\,root\,root) ,' $RPM_BUILD_DIR/file.list.%{name}.files >>
$RPM_BUILD_DIR/file.list.%{name}
sed 's,^\.,\%attr(-\,root\,root) ,' $RPM_BUILD_DIR/file.list.%{name}.libs >>
$RPM_BUILD_DIR/file.list.%{name}

%clean
rm -rf $RPM_BUILD_ROOT
rm -rf $RPM_BUILD_DIR/file.list.%{name}
rm -rf $RPM_BUILD_DIR/file.list.%{name}.libs
rm -rf $RPM_BUILD_DIR/file.list.%{name}.files
rm -rf $RPM_BUILD_DIR/file.list.%{name}.files.tmp
rm -rf $RPM_BUILD_DIR/file.list.%{name}.dirs

%files -f ../file.list.%{name}
====================================

--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >