[opensuse-ruby] gem2rpm: split off subpackages to reduce rubygem-*.rpm size
Hi, I, Pepa and Flavio were looking at a way to save space in our appliances. A major waste of disk space is the way we build gems into rpms: any rubygem-*.rpm includes the generated RDoc and RI documentation, averaging over a HALF of the rpm size. Furthemore, tests amount to another half of the rest. For example, rubygem-activerecord-2_3-2.3.8 is 12MB on disk, of which 6MB is one example sql file(!) and the actual library is 900KB, the rest being test cases. We propose to split off these parts to *-doc and *-testsuite subpackages, by enhancing the gem2rpm (opensuse) template. Another savings possibility is to completely remove the original gem file kept in the cache directory, arguing that if people install it via RPM, they are used to having the package on a remote repo only (or cached by libzypp). (Not implemented yet) Attached is a patch against opensuse.spec.template from rubygem-gem2rpm-0.6.0-13.2.i586.rpm (which BTW differs from SVN HEAD). We have tried it on one gem so far. Does it look good for sending upstream and for applying it across OBS (Factory, devel:languages:ruby:extensions)? It would be great for 11.4 (more space on DVD!!!) and for the appliances built in our department. -- Martin Vidner, YaST developer http://en.opensuse.org/User:Mvidner Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu
On 12/15/2010 at 03:43 AM, Martin Vidner
Hi,
I, Pepa and Flavio were looking at a way to save space in our appliances. A major waste of disk space is the way we build gems into rpms: any rubygem-*.rpm includes the generated RDoc and RI documentation, averaging over a HALF of the rpm size. Furthemore, tests amount to another half of the rest.
For example, rubygem-activerecord-2_3-2.3.8 is 12MB on disk, of which 6MB is one example sql file(!) and the actual library is 900KB, the rest being test cases.
We propose to split off these parts to *-doc and *-testsuite subpackages, by enhancing the gem2rpm (opensuse) template.
Another savings possibility is to completely remove the original gem file kept in the cache directory, arguing that if people install it via RPM, they are used to having the package on a remote repo only (or cached by libzypp). (Not implemented yet)
Attached is a patch against opensuse.spec.template from rubygem-gem2rpm-0.6.0-13.2.i586.rpm (which BTW differs from SVN HEAD). We have tried it on one gem so far.
Does it look good for sending upstream and for applying it across OBS (Factory, devel:languages:ruby:extensions)? It would be great for 11.4 (more space on DVD!!!) and for the appliances built in our department.
Looks reasonable to me (with the disclaimer that I've just read the
spec and patch, not actually tested it myself).
This should/will also benefit anyone freezing gems/rails into their
apps (e.g.: me :))
Regards,
Tim
--
Tim Serong
On Wed, Dec 15, 2010 at 09:38:19PM -0700, Tim Serong wrote:
On 12/15/2010 at 03:43 AM, Martin Vidner
wrote: Looks reasonable to me (with the disclaimer that I've just read the spec and patch, not actually tested it myself). This should/will also benefit anyone freezing gems/rails into their apps (e.g.: me :))
Regards,
Tim Thanks for the review, Tim.
There was a bug for gems with no tests. Attached is a fixed patch (s/detect/select) -- Martin Vidner, YaST developer http://en.opensuse.org/User:Mvidner Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu
On 12/14/2010 05:43 PM, Martin Vidner wrote:
Another savings possibility is to completely remove the original gem file kept in the cache directory, arguing that if people install it via RPM, they are used to having the package on a remote repo only (or cached by libzypp). (Not implemented yet)
If the original cached gem is removed, will still the installed gem be found ba plain gem command? -- Duncan Mac-Vicar P. - Novell® Making IT Work As One™ SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) -- To unsubscribe, e-mail: opensuse-ruby+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-ruby+help@opensuse.org
Duncan Mac-Vicar P. write:
On 12/14/2010 05:43 PM, Martin Vidner wrote:
Another savings possibility is to completely remove the original gem file kept in the cache directory, arguing that if people install it via RPM, they are used to having the package on a remote repo only (or cached by libzypp). (Not implemented yet)
If the original cached gem is removed, will still the installed gem be found ba plain gem command?
Yes, that is problem and reason why we decide to not do it. So we plan just to separate doc and testsuite subpackages. Josef -- Josef Reidinger Appliance Toolkit team maintainer of perl-Bootloader, yast2-bootloader and parts of webyast and SLMS -- To unsubscribe, e-mail: opensuse-ruby+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-ruby+help@opensuse.org
participants (4)
-
Duncan Mac-Vicar P.
-
Josef Reidinger
-
Martin Vidner
-
Tim Serong