[Fedora-packaging] Packaging guidelines for rubygems

Mamoru Tasaka mtasaka at ioa.s.u-tokyo.ac.jp
Mon Mar 2 08:07:07 UTC 2009


David Lutterkort wrote, at 03/02/2009 03:08 PM +9:00:
> On Thu, 2009-02-26 at 17:41 +0100, Jeroen van Meeuwen wrote:
>> I find patching rubygems (for CVEs) a pain in the ass because of the 
>> packaging guideline requirement to have the rubygem package's Source0 be 
>> the actual gem.
>>
>> I'd much rather work from tarballs.
> 
> I think the real culprit is that nothing is done until %install in basic
> rubygem packages. 
> 
> Maybe we should move to a scheme where we 'install' the rubygem into the
> source dir during %prep, and then copy files from there to
> %{buildroot}%{gemdir} during %install.
> 
> David

I think you are saying "into the build dir" (i.e. %_builddir). Then:

As you know for rubygems containing C codes I suggested to install
them first under %_builddir, compile C codes there and copy all files
into %buildroot and this was already accepted by FPC/FESCo.
So I think suggesting to install _all_ rubygems under %_builddir first
can also be accepted.

What I am wondering currently is at what stage we should install rubygems
into %_builddir, whether %prep or %build.
Current "rubygem with C code" (proposed by me) is
- to create "empty" directory first by "%setup -q -c -T" at %prep
- then install rubygems under %_builddir at %build (then some compilation
  is done in %build)
- then copy all needed files at %install
However if we want to use "%patch0 -p1 -b .foo", for example, for files
installed under %_builddir, rubygems must be installed under %_builddir
at %prep, because rpm does not accept %patch? method at %build like:
-----------------------------------------------------
+ %patch0 -p0 -b .filechooser
/home/tasaka1/rpmbuild/INSTROOT/rpm-tmp.n07iGu: line 29: fg: no job control
-----------------------------------------------------

Regards,
Mamoru




More information about the Fedora-packaging mailing list