Dne 14. 09. 23 v 14:13 Mamoru TASAKA napsal(a):
Hello, Vít:Thank you for initial work for ruby 3.3 . Vít Ondruch wrote on 2023/09/12 17:08:* `%gem_spec` macro with options:https://src.fedoraproject.org/fork/vondruch/rpms/ruby/blob/77c580dfa85f921d969a8da68eaf6e88987aab8a/f/macros.rubygems#_10This is my initial version, just to enable to use this macro in ruby.spec. I think I'll similarly modify all the related macros. While they'll be more complex, their use in ruby.spec will outweigh that. And I should add some documentation ...BTW there are several possibilities in choosing how complex/flexible this macro will be and I think this is one of the changes which could be backported to Ruby 3.2. So feedback is appreciated. Looking at the macro, this bit `%{?1:%{expand:%{%{1}_version}}}%{!?1:%{version}}` is probably not very good idea for possible use in rubygem-*.gemspec.I think this should be :%gem_spec(d) %{gem_dir}/specifications%{?-d:/default}/%{?1}%{!?1:%{gem_name}}-%{?1:%{expand:%{%{1}_version}}}%{!?1:%{version}}%{?prerelease}.gemspec(instead of %gem_spec(d) %{gem_dir}/specifications%{?-d:/default}/%{1}..... )Otherwise, for example trying to build rubygem-json fails like: ------------------------------------------- Processing files: rubygem-json-2.6.3-204.fc40.x86_64error: File not found: /builddir/build/BUILDROOT/rubygem-json-2.6.3-204.fc40.101.x86_64/usr/share/gems/specifications/%{1}json-2.6.3.gemspec File not found: /builddir/build/BUILDROOT/rubygem-json-2.6.3-204.fc40.101.x86_64/usr/share/gems/specifications/%{1}json-2.6.3.gemspec-------------------------------------------
Oh, right, sorry. I knew it is incomplete, but I have not realized this is immediately going to break other packages 🙈
My initial change included two options. There was also option to specify the version. I have later thought it is overcomplicated to have two options, if I could defer the macro name, but I have missed the original use case. And we were fine without this possibilities up to now.
Still, would there be some value in the option enabling to specify version? Should it be named or positional? The `%{prerelease}` does not make this question any easier.
Vít
Now I am trying to rebuild gem related pkgs depending on libruby.3.2 (with using %{?1} for %gem_spec macro)Regards, Mamoru _______________________________________________ ruby-sig mailing list -- ruby-sig@lists.fedoraproject.org To unsubscribe send an email to ruby-sig-le...@lists.fedoraproject.orgFedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelinesList Archives: https://lists.fedoraproject.org/archives/list/ruby-sig@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ ruby-sig mailing list -- ruby-sig@lists.fedoraproject.org To unsubscribe send an email to ruby-sig-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/ruby-sig@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue