rubygem packaging: macro for the gems path?
Hi all, to silence some of the warnings on the rubygem-krane package I added the following to the gem2rpm.yml file:
:post_install: |- cd %{buildroot}%{_libdir}/ruby/gems/3.3.0/gems/krane-%{version}/ rm -rvf .github rm -vf .gitignore rm -vf .rubocop-http---shopify-github-io-ruby-style-guide-rubocop-yml rm -vf .rubocop.yml sed -i 's|usr/bin/env bash|usr/bin/bash|g' bin/setup sed -i 's|usr/bin/env bash|usr/bin/bash|g' dev/flamegraph-from-tests
https://build.opensuse.org/package/view_file/home:ojkastl_buildservice:Branc...
This works, but obviously only for one ruby version. Is there a convenient macro for this? I failed to find one... Or is there a wrapper macro like the python expand macro, that executes something with each ruby version that is being built? Kind Regards, Johannes
Hi all, On 04.02.24 14:56 Johannes Kastl wrote:
to silence some of the warnings on the rubygem-krane package I added the following to the gem2rpm.yml file:
:post_install: |- cd %{buildroot}%{_libdir}/ruby/gems/3.3.0/gems/krane-%{version}/ rm -rvf .github rm -vf .gitignore rm -vf .rubocop-http---shopify-github-io-ruby-style-guide-rubocop-yml rm -vf .rubocop.yml sed -i 's|usr/bin/env bash|usr/bin/bash|g' bin/setup sed -i 's|usr/bin/env bash|usr/bin/bash|g' dev/flamegraph-from-tests
https://build.opensuse.org/package/view_file/home:ojkastl_buildservice:Branc...
This works, but obviously only for one ruby version. Is there a convenient macro for this? I failed to find one...
I just added a for-loop over all the ruby versions found in %{buildroot}%{_libdir}/ruby/gems/: gem2rpm.yml:
:post_install: |- for ruby in %{buildroot}%{_libdir}/ruby/gems/* do cd "${ruby}/gems/krane-%{version}/" rm -rvf .github rm -vf .gitignore rm -vf .rubocop-http---shopify-github-io-ruby-style-guide-rubocop-yml rm -vf .rubocop.yml sed -i 's|usr/bin/env bash|usr/bin/bash|g' bin/setup sed -i 's|usr/bin/env bash|usr/bin/bash|g' dev/flamegraph-from-tests done
Kind Regards, Johannes
participants (2)
-
Johannes Kastl
-
Johannes Kastl