Problem with ruby package with binary content...
Darryl L. Pierce
dpierce at redhat.com
Tue Jul 14 17:28:51 UTC 2009
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/devel/attachments/20090714/a1c12724/attachment.bin
More information about the devel
mailing list