Hi all,
I have been using openSUSE Tumbleweed for a few years now and am maintaining a small number of packages for that distribution. A few months ago I went the (probably) common route from Ruby to Crystal and have been quite happy with it. I thought about getting a Crystal compiler package into Tumbleweed’s main repository, which would have the great benefit of enabling getting packages of other programs written in Crystal into the main repository as well, apart from making the compiler install process easier.
I found the packages at https://build.opensuse.org/project/show/devel:languages:crystal but unfortunately they just extract a prebuilt binary, which, as far as I know, is not acceptable for Tumbleweed. Additionally, even though it is on the same build service and the name looks like it, it is not a devel project for Tumbleweed (which it would need to be to submit a package).
Effectively, this means the following:
- Each compiler version package must be built from source.
- Either devel:languages:crystal needs to become a devel project for Tumbleweed, or a new project needs to be created. (The naming conflict would need to be solved, potentially together with the Tumbleweed maintainers.)
The first point is especially interesting because, if I understand correctly, up until 1.0, each compiler version needs the previous version to compile. I see 2 solutions for this problem:
- Bootstrap a recent compiler from the old Ruby implementation.
- I have tried doing this with the bootstrap script, which I had to update, but the first stage segfaults and I don’t know why.
- Use a prebuilt binary to compile a recent compiler in the package build process, and base packages for the following versions on that.
How this has to be handled depends on the Tumbleweed maintainers. Unfortunately, I haven’t received an answer through the appropriate Matrix and Discord channels, so I guess I have to try the mailing list next.
For the second point, as per the openSUSE Wiki, it may be as easy as writing an email to a specific mailing list. One requirement is that the factory-maintainers group would become a maintainer of the project. (I don’t see this as an issue, just wanted to point it out in case someone else does.)
I am not sure how both points would affect the package builds for other distributions. DPKG-based distributions could be completely unaffected, but RPM-based ones seem tricky. Their packages could also be built from source, but if that is not realistically possible for even a single one, the source-compiling Tumbleweed packages may need to be separate.
If it needs to be separate, I think a new subproject devel:languages:crystal:Factory would be most fitting, to not bother users of the existing project.
I would be willing and (probably) able to do most if not all of the packaging work (apart from what I have no permissions for). With this post I want to get the thoughts of you Crystal compiler people on that topic in general, and specifically for the following questions:
- What do you think about having the Crystal compiler in Tumbleweed’s main repository?
- Is there a preference for changing existing package build instructions vs. having a new subproject specifically for Tumbleweed (with the option of building for openSUSE Leap as well)?
- If the compiler needs to be bootstrapped, would someone be able to support me a bit in debugging? (Outside of this thread, of course.)