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

Re: Problem with ruby package with binary content...



On Wed, Jul 15, 2009 at 01:44:59AM +0900, Mamoru Tasaka wrote:
> This is because with your spec file gem is directly installed under
> %buildroot. So some C codes in the gem (usually under ext/ directory)
> are compiled under %buildroot and the string "%buildroot"
> is embedded in the built binary (with "gcc -g"). This will make 
> /usr/lib/rpm/check-buildroot complain.
> 
> The correct way is to expand (install) gem file once under %_builddir
> (at %prep or %build) and and copy all (under %_builddir) under
> %buildroot at %install like:
> 
> -------------------------------------------------------------------
> %prep
> %setup -q -c -T
> mkdir -p ./%{gemdir}
> export CONFIGURE_ARGS="--with-cflags='%{optflags}'"
> gem install --local --install-dir .%{gemdir} \
>             --force -V --rdoc %{SOURCE0}
> 
> %build
> 
> %install
> rm -rf %{buildroot}
> mkdir -p %{buildroot}%{gemdir}
> cp -a .%{gemdir}/* %{buildroot}%{gemdir}
> ....
> ....
> -------------------------------------------------------------------
> 
> With this debuginfo rpm will also be created correctly.

Awesome, that appears to have worked nicely. Thanks for the input. :)

-- 
Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc.
Virtual Machine Management - http://www.ovirt.org/
Is fearr Gaeilge bhriste ná Béarla cliste.

Attachment: pgpiHSVxbWzMS.pgp
Description: PGP signature


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