Updating ruby package guideline to only build gems and extensions once
Hello, in July David (dvzrv), Tim (bastelfreak) and I had a jitsi session in which we reworked the old ruby packaging guidelines [1] to make it more reflecting the current wishes and standards we already used when packaging ruby (like building from source, adding tests, ...). After it was pubslihed Felix (felixonmars) approached us and mentioned that there is a flaw in our logic as gems and extensions are now build twice. Once in the build() step which is then used for testing and once in the package() step. Recently Felix found a way to only build the gem and possible extensions once and use them for both testing and packaging. To reflect these changes I would propose that we update our ruby package guidelines with the new way that Felix found. I took the liberty of updating them on my personal space [2]. If there is no objection, then I would like to push the changes to the main page. Best regards Andreas [1] https://wiki.archlinux.org/title/Ruby_package_guidelines [2] https://wiki.archlinux.org/title/User:Segaja/Ruby_package_guidelines
On 2022-11-06 13:53:51 (+0100), Andreas 'Segaja' Schleifer wrote:
Recently Felix found a way to only build the gem and possible extensions once and use them for both testing and packaging.
To reflect these changes I would propose that we update our ruby package guidelines with the new way that Felix found.
Hi Andreas, Thanks for investigating further and staying on top of it! Simplifying the guidelines is immensely helpful to anyone trying to package Ruby packages on Arch. I took the initiative and already added the ruby-rspec change to the "Build and test" section. AFAICT, the new "Template" section looks alright! To not generate a huge changeset, I guess we can bit by bit adapt the "Gem based build" to match yours, then remove the "Rake based build", move the contents of "Gem based build" to its parent heading ("Template") and add the "Gotchas" subsections below a "Tips and tricks" section. If you need help, let me know and thanks again for further looking into this and keeping up with the documentation! Best, David -- https://sleepmap.de
On 11/6/22 18:15, David Runge wrote:
On 2022-11-06 13:53:51 (+0100), Andreas 'Segaja' Schleifer wrote:
Recently Felix found a way to only build the gem and possible extensions once and use them for both testing and packaging.
To reflect these changes I would propose that we update our ruby package guidelines with the new way that Felix found.
Hi Andreas,
Thanks for investigating further and staying on top of it! Simplifying the guidelines is immensely helpful to anyone trying to package Ruby packages on Arch.
I took the initiative and already added the ruby-rspec change to the "Build and test" section.
AFAICT, the new "Template" section looks alright! To not generate a huge changeset, I guess we can bit by bit adapt the "Gem based build" to match yours, then remove the "Rake based build", move the contents of "Gem based build" to its parent heading ("Template") and add the "Gotchas" subsections below a "Tips and tricks" section.
If you need help, let me know and thanks again for further looking into this and keeping up with the documentation!
Best, David
Hi David, thanks for the reply. I renamed the "Gotchas" section in my page into "Tips and tricks". I think it makes sense to first remove the "Rake based build" section and move the other one under "Template", as it is not really needed even in the old way of the build handling and then update the remaining template with the new template. At the end we can add the "Tips and tricks" as a final edit. Best regards Andreas
On 11/6/22 13:53, Andreas 'Segaja' Schleifer wrote:
To reflect these changes I would propose that we update our ruby package guidelines with the new way that Felix found.
I took the liberty of updating them on my personal space [2]. If there is no objection, then I would like to push the changes to the main page.
I've some a couple of tests, especially to check de- duplication, native extensions and reproducibility with the new proposal. They passed for all items of my test set. All of them also properly removed things where I previously had other de-duplication rm calls. Native extensions still work properly while not preserving intermediate object files in our packages for no reason. Overall the changes look good and very functional. The wiki proposal looks solid. A bit unfortunate that ruby requires all that shizzle, but welp, definitively better this way compared to not doing those cleanups. Thumbs up from me 👍 Cheers, Levente
On 11/8/22 23:24, Levente Polyak wrote:
On 11/6/22 13:53, Andreas 'Segaja' Schleifer wrote:
To reflect these changes I would propose that we update our ruby package guidelines with the new way that Felix found.
I took the liberty of updating them on my personal space [2]. If there is no objection, then I would like to push the changes to the main page.
I've some a couple of tests, especially to check de- duplication, native extensions and reproducibility with the new proposal.
They passed for all items of my test set. All of them also properly removed things where I previously had other de-duplication rm calls.
Native extensions still work properly while not preserving intermediate object files in our packages for no reason.
Overall the changes look good and very functional. The wiki proposal looks solid. A bit unfortunate that ruby requires all that shizzle, but welp, definitively better this way compared to not doing those cleanups.
Thumbs up from me 👍 Cheers, Levente
I'm sorry for the long delay, but I finally had time to update https://wiki.archlinux.org/title/Ruby_package_guidelines with the changes I had proposed. Any existing ruby package that is being touched should be updated to the new guideline. I will also publish some guidelines on how to package stdlib gems once I'm sure I got it fully figured out. Best regards Andreas
participants (3)
-
Andreas 'Segaja' Schleifer
-
David Runge
-
Levente Polyak