%gem_install macro

Vít Ondruch vondruch at redhat.com
Mon Mar 18 14:27:43 UTC 2013


Dne 18.3.2013 14:59, Troy Dawson napsal(a):
> On 03/18/2013 04:10 AM, Vít Ondruch wrote:
>> Hi everybody,
>>
>> I have noticed, that although you are updating your packages to be
>> buildable with F19, you are not doing it properly. The %gem_install
>> macro, which is mentioned in guidelines, was not introduced just to
>> annoy you. It should help you. You probably did not noticed, but without
>> the macro, your package does not contain generated RDoc documentation
>> anymore. Please fix your packages.
>>
>> If you want to have your life a bit easier, I prepared update script for
>> you [1]. The f19.rb is doing the basic conversion. If you want to update
>> also the changelog, then please use the update.rb.
>>
>>
>> Thank you.
>>
>>
>> Vít
>>
>>
>>
>>
>> [1] https://github.com/voxik/fermig
>> _______________________________________________
>> ruby-sig mailing list
>> ruby-sig at lists.fedoraproject.org
>> https://admin.fedoraproject.org/mailman/listinfo/ruby-sig
> Hi Vit,
> You are correct, on the packages that I fixed up I haven't been doing
> that.  I wasn't doing it because I still have to maintain several gems
> across the Fedora's and EPEL.

You can use the same approach we used previously for other macros, e.g.

%{?!gem_install: %global %gem_install(d:n:) \
mkdir -p %{-d*}%{!?-d:.%{gem_dir}} \
\
CONFIGURE_ARGS="--with-cflags='%{optflags}' $CONFIGURE_ARGS" \\\
gem install \\\
         -V \\\
         --local \\\
         --install-dir %{-d*}%{!?-d:.%{gem_dir}} \\\
         --bindir .%{_bindir} \\\
         --force \\\
         --document=ri,rdoc \\\
         %{-n*}%{!?-n:%{gem_name}-%{version}.gem} \
%{nil}
}

Or some simplified version. Please note that I did not tested this 
macro, so I am pretty sure it does not work out of the box ;) Of course 
if you can express your voice in this ticket [3], that wold be best :)

> I looked at your scripts (very nice by the way) and then at the
> documentation,[2] to try to figure out the clearest, easiest way to have
> it work on both, and I had a surprise.
> Did something happen to the documentation?
> I would have sworn it had something on %gem_install, but now I can't
> find it at all.

Good catch. Thank you for pointing out. It is just in draft [1]. 
Although it was approved [2] (with some comments), it is not propagated 
into main guidelines page :/

Vít




[1] https://fedoraproject.org/wiki/PackagingDrafts/Ruby
[2] https://fedorahosted.org/fpc/ticket/256#comment:2
[3] https://bugzilla.redhat.com/show_bug.cgi?id=788001



More information about the ruby-sig mailing list