[opensuse-ruby] Removing unneeded files from rubygem packages
Hi, For a rubygem-wdm [1] we need to remove some .c and .h files included in the original gem file. I tried to remove them using the post_install section of the gem2rpm.yml file: post_install: |- rm -rf %{buildroot}%{gem_base}/gems/%{mod_full_name}/ext However, that works only for 1 version of ruby, and since TW contains both 2.4 and 2.5 only removes the 2.4 version. How can I remove the ext directory for all ruby versions the gem is packaged for? Thanks, Robert [1]: https://build.opensuse.org/request/show/516918 [2]: https://build.opensuse.org/package/show/devel:languages:ruby:extensions/ruby... -- http://robert.muntea.nu/ -- To unsubscribe, e-mail: opensuse-ruby+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-ruby+owner@opensuse.org
On 08/29/2017 01:48 PM, Robert Munteanu wrote:
Hi,
For a rubygem-wdm [1] we need to remove some .c and .h files included in the original gem file. I tried to remove them using the post_install section of the gem2rpm.yml file:
post_install: |- rm -rf %{buildroot}%{gem_base}/gems/%{mod_full_name}/ext
However, that works only for 1 version of ruby, and since TW contains both 2.4 and 2.5 only removes the 2.4 version.
How can I remove the ext directory for all ruby versions the gem is packaged for?
rubygem-highline has this: rm -rf %{buildroot}%{_libdir}/ruby/gems/*/gems/%{mod_name}-%{version}/example Greetings, Stephan -- To unsubscribe, e-mail: opensuse-ruby+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-ruby+owner@opensuse.org
On Tue, Aug 29, 2017 at 2:59 PM, Stephan Kulow <coolo@suse.de> wrote:
On 08/29/2017 01:48 PM, Robert Munteanu wrote: rubygem-highline has this: rm -rf %{buildroot}%{_libdir}/ruby/gems/*/gems/%{mod_name}-%{version}/example
That works, thank you. Robert -- http://robert.muntea.nu/ -- To unsubscribe, e-mail: opensuse-ruby+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-ruby+owner@opensuse.org
On Tue, 29 Aug 2017 15:22:02 +0300 Robert Munteanu <robert.munteanu@gmail.com> wrote:
On Tue, Aug 29, 2017 at 2:59 PM, Stephan Kulow <coolo@suse.de> wrote:
On 08/29/2017 01:48 PM, Robert Munteanu wrote: rubygem-highline has this: rm -rf %{buildroot}%{_libdir}/ruby/gems/*/gems/%{mod_name}-%{version}/example
this will break gem pristine. We could make it a policy to remove all C files from the installed rpms and say that "gem pristine" is not a valid use case that we want to support. but until then we should not do it in some packages and not in others. darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org -- To unsubscribe, e-mail: opensuse-ruby+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-ruby+owner@opensuse.org
On Tue, Aug 29, 2017 at 4:21 PM, Marcus Rückert <darix@opensu.se> wrote:
On Tue, 29 Aug 2017 15:22:02 +0300 Robert Munteanu <robert.munteanu@gmail.com> wrote:
On Tue, Aug 29, 2017 at 2:59 PM, Stephan Kulow <coolo@suse.de> wrote:
On 08/29/2017 01:48 PM, Robert Munteanu wrote: rubygem-highline has this: rm -rf %{buildroot}%{_libdir}/ruby/gems/*/gems/%{mod_name}-%{version}/example
this will break gem pristine.
We could make it a policy to remove all C files from the installed rpms and say that "gem pristine" is not a valid use case that we want to support. but until then we should not do it in some packages and not in others.
I realized that in the end this gem only works on Windows, so I would rather drop it as a dependency from vagrant via a patch rather than spend more packaging it. Robert -- http://robert.muntea.nu/ -- To unsubscribe, e-mail: opensuse-ruby+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-ruby+owner@opensuse.org
participants (3)
-
Marcus Rückert
-
Robert Munteanu
-
Stephan Kulow