Prep, build and install

Bohuslav Kabrda bkabrda at
Thu Dec 22 06:32:13 UTC 2011

Hi Steve,
thank you for your reaction.

----- Original Message -----
> From: "Steve Traylen" <steve.traylen at>
> To: ruby-sig at
> Sent: Wednesday, December 21, 2011 11:32:53 PM
> Subject: Prep, build and install
> Hi,
> I noticed the link to the new ruby packaging draft and had a comment.
> Currently the guidelines suggest to do everything basically within
> prep with build and install empty.

Not really - the guidelines say, that you should use %prep for the gem install command (which basically unpacks the gem into a proper directory structure) and %install to place the files precisely where we need to under %{buildroot}.

> Can it be considered to break this up into the prep build and install
> sections.
> The gem can unpacked in prep and im hoping its possible to build and
> then install from that unpack...( i dont know how to do this or if
> is possiblE?)

I think that it wouldn't make much sense - the install command in %prep does everything we need - unpacks the gem into a proper directory structure (and compiles the binary extension, if any). This way you can use %prep to apply patches and then, if you need to recompile a patched C extension (if any), the %build section is the place to do it. Otherwise, I see no point in using %build section with rubygems.

> In the current situation it is not obvious how you would apply a
> patch in the rpm and probably more importly the "rpmbuild -bp",
> "rpmbuild -bc" or "rpmbuild -bi" do not have there normal meaning.

Yes, well, if you have nothing to compile, it makes perfect sense to leave the %build section empty, doesn't it? And you use %prep to unpack the gem and %install to place it into a proper directory structure. What's wrong with that? I think that it works exactly as it should.


> --
> Steve Traylen
> _______________________________________________
> ruby-sig mailing list
> ruby-sig at

More information about the ruby-sig mailing list