Prep, build and install

Vít Ondruch vondruch at
Thu Dec 22 13:30:10 UTC 2011

Dne 22.12.2011 14:17, Mo Morsi napsal(a):
> On 12/22/2011 04:44 AM, Vít Ondruch wrote:
>> And now we have the remaining 2% of gems, which have binary 
>> extensions, which unfortunately don't build and needs to be patched. 
>> This situation is not covered by the guidelines, but you are right 
>> that we should work that out, because this is unfortunate situation 
>> for both, package and reviewer. I have met already such situation and 
>> I opened the support ticket for this scenario [1], however no 
>> reasonable solution were provided.
> Yes this is an interesting scenario, though I've never run into it 
> myself (at least not as far as I recall).
> It could also be the case that the gem compiles fine but the source 
> needs to be patched anyways to remove some offending code, such as 
> something not licensed under an acceptable license or other.
>> I think we should do following steps for such case:
>> %prep
>> a) Do regular "gem install" in prep section. It is obvious that the 
>> gem installation fails, however the gem itself is unpacked in the 
>> correct locations.
> We would need to run the 'gem install' command appending an  "|| true" 
> afterwards so as not to break the build process when gem install fails.
> Why not just run "gem unpack %{SOURCE0}" here.

Well, that is also option. However the "gem install" is standardized, 
therefore no need to think about it, you just need to add:

"|| true"


"|| :"

or may be

"| grep 'some specific failure description'"

which has the advantage of checking that error is different from what 
was expected (for example when gem is updated and bug fixed).

Also, I am not sure if unpack does not unpack something somehow differently.

BTW, I think that we should also introduce something like "gem_install" 
macro which would be used in place of the wordy "gem install" with 


More information about the ruby-sig mailing list