[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Unexpected result 'rpm -bb'



On Fri, Dec 28, 2001 at 07:46:02AM +0100, Michael Schwendt wrote:

> On 2001-12-27, Alexander Volovics wrote:
 
> >> Without having looked at that package, you could gzip the man
> >> pages before the file list gets created.

> >This does not work!
 
> Why not?
 
> >The file "file.list.bbconf" gets created during the whole 
> >"configure/make/install" process started by 'rpm -bb bbconf.spec'.
 
> Yes, but with the files already installed in the $RPM_BUILD_ROOT
> directory.
 
> ># Build the file-list automagically :)
> >cd $RPM_BUILD_ROOT
 
> E.g. compress the man pages here, so that the *.gz file names get
> included in the file list:
 
> find $RPM_BUILD_ROOT/%{_mandir} -type f | xargs -n 1 gzip -9
 
> >find . -type d | grep -v include | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > $RPM_BUILD_DIR/file.list.%{name}
> >find . -type f | grep -v include | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.%{name}
> >find . -type l | grep -v include | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.%{name}

This works. I just now tried it.
I had already made the rpm by deleting this 'automagic' scenario
and explicitly writing out the %files list.

But this is indeed easier and 'automatically' applicable (I think)
in other cases.

(I'll have to start studying sed and regular expressions to understand
 what is actually being done there).

Thank you for the help. 

Alexander





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]