Dne 01. 11. 23 v 11:27 jpro...@redhat.com napsal(a):

Hi

On 10/12/23 17:20, Vít Ondruch wrote:

Hi,

I am back again with yet another update, this time to e029375a7d. The changes are in the PR:

https://src.fedoraproject.org/rpms/ruby/pull-request/159

And the scratch build is running here:

https://koji.fedoraproject.org/koji/taskinfo?taskID=107409961

From upstream POV, there is nothing particularly interesting, except of the rename of the new Ruby source code parser from YART to prism and on strange JIT test failure.

From changes in the .spec file, I have migrated every custom reference of gem path to the %gem_ macros. This was enabled by this commit:

https://src.fedoraproject.org/fork/vondruch/rpms/ruby/c/c514f5f13c709dc289754663ba31491617d83811

Please note that this commit also introduces `%gem_name_version` macro, which we could use in place of `%{gem_name}-%{version}`.

Would you consider making the macro partially Lua instead,


I thought this will come, therefore I still have this laying around:


~~~

$ git stash show -p
diff --git a/macros.rubygems b/macros.rubygems
index f6e830f..f27ba48 100644
--- a/macros.rubygems
+++ b/macros.rubygems
@@ -12,7 +12,7 @@
 # to be predefined. Please note that for the version macros are the dashes
 # replaced by underscores.
 #
-%gem_name_version() %{?1}%{!?1:%{gem_name}}-%{?1:%{expand:%{%{gsub %{1} - _}_version}}}%{!?1:%{version}}%{?prerelease} +%gem_name_version() %{?1}%{!?1:%{gem_name}}-%{?1:%{expand:%{lua:local str = rpm.expand("%1"); str = str:gsub("-", "_"); print("%" .. str .. "_version");}}}%{!?1:%{version}}%{?prerelease}

 # Common gem locations and files.
 #
~~~


or do you want to enjoy the new features of RPM? :)


Actually I'd like it to keep as modern as possible. I know it is burden for RHEL, but I don't want RHEL to be obstacle for innovation.


For C9S and C8S the gsub RPM macro is problematic since it was introduced in RPM version 4.19 as a "lua-less" gsub macro option:
https://github.com/rpm-software-management/rpm/blob/05c3b37d1f8f91c3face5eeafe8d4c76fbdda495/docs/manual/macros.md?plain=1#L95

Trying to build it on those distros, I am currently experimenting with just using Lua for string manipulation and the later expansion, I can provide the Lua based macro once I finish rewriting it. I plan to rewrite only the portion where it expands the %{foo_version} for "%gem_name_version foo".


Actually, maybe it would be worth of asking RPM team if they would be willing to backport e.g. the `gsub` into RHEL.


Vít



Next on my table is allow usage of generators on default/bundled gems. More details on this approach is here:

https://lists.fedoraproject.org/archives/list/de...@lists.fedoraproject.org/thread/3MHROKOM53HM6NF7RGGLFBIQFG5IEIQG/

and in practice, this will look like:

<...snip>

Regards,
Jarek


Please take a look and as always, any feedback is welcome. And also, thx a lot who already did some test builds and compatibility fixes. That is really great!


Vít

_______________________________________________
ruby-sig mailing list --ruby-sig@lists.fedoraproject.org
To unsubscribe send an email toruby-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

Attachment: 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

Reply via email to