On Mon, 2009-03-02 at 17:07 +0900, Mamoru Tasaka wrote:
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:
Yeah, that's what I meant.
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.
I would hope so, too.
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:
Since the main motiviation for a change is to enable the workflow that
RPM maintainers are used to, we do want the various sections to have
their 'usual' meanings, i.e.
%prep - unpack sources, apply patches
%build - compile/generate files from sources
%install - put files into their 'right' place
So the main deviation from what the guidelines for binary rubygems
suggest right now is that we'd run 'gem install' in %prep - for
Ruby-only gems not a big deal, but for binary gems, it's stupid, since
we'd need to recompile the gem in %build after patches have been
applied.
Unfortunately, rubygems don't have a way to split building them into
unpack/compile/install the same way as rpm's do.
David