Crystal: Distribution of crystal in Debian (/Ubuntu ?) official releases

Created on 23 Apr 2016  路  5Comments  路  Source: crystal-lang/crystal

Hello,

For the moment crystal can be installed on Debian based systems using the package available on
crystal-lang APT repository.
I think that someday, the software will be integrated distribution's official package management systems so I took some time to check the current .deb packaging and tried to improve it a little bit.

For the moment, the archive -that seems to be generated using Omnibus- is working properly and allow to install and use the crystal tools. On the other hand, regarding to official packaging policies, I don't think it's "clean enough" to be integrated in the Debian -or Ubuntu- distribution.

So, I've built a new crystal package from scratch trying to respect Debian's packaging policy.
What I worked on is available in this repository: https://github.com/olbat/crystal/tree/debian .

It allows to build Crystal 0.15.0 from a Debian/stretch (testing) machine (stable does not have libgc >= 7.4). All the build-dependencies have been set in the control file, do you think you can find the time to check them ?

I also opened a Request For Package on Debian's bugtracker to initiate the work -and also since finding a maintainer can take time: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=822275 .
_I don't know that much about Ubuntu, but if you find the idea interesting, someone may open a RFP (or similar) on their tracker's too ?_

I'm currently working on writing a Dockerfile to automate the building task, don't hesitate to give me your feedbacks !

question infrastructure

Most helpful comment

Another consideration is that the language and thus its community is still moving very fast. Being accepted into Debian and getting into a stable Debian release subsequently, will mean Debian users using the official repository will be stuck on an old Crystal version that's incompatible with the rest of the ecosystem very quickly. Same basically applies to Ubuntu.

I appreciate your effort but I feel like it might come a bit too early still.

All 5 comments

Another consideration is that the language and thus its community is still moving very fast. Being accepted into Debian and getting into a stable Debian release subsequently, will mean Debian users using the official repository will be stuck on an old Crystal version that's incompatible with the rest of the ecosystem very quickly. Same basically applies to Ubuntu.

I appreciate your effort but I feel like it might come a bit too early still.

That said maintaining a Ubuntu PPA that doesn't has to comply to Debian's stability policy, using non Omnibus but hand-crafted packages can be a worthwhile effort, exploring things like packaging best practices for Crystal (see for example the route we took in the Archlinux packages) or compatibility considerations for Crystal (see for example #1614), so that we catch these things early on and don't head into a direction that'll later makes it impossible to include Crystal into mainstream distributions, once it stabilizes.

I understand, in fact I do not really know the state of the project yet, it's probably a bit too early :)

BTW the day you'll want the project to be distributed into Debian or Ubuntu, do not hesitate to look into the repository I worked on if you need something to start with.

I'm done working on the docker image that allow to build crystal and it's Debian package (see Dockerfile). [As you can see since build dependencies are given in the package (the [control](https://github.com/olbat/crystal/blob/debian/debian/control) file), it's much easier to install them using _mk-build-deps_ or _apt-get build-dep_]

You can build the .deb archive using the docker image by doing docker run --rm -v ${PWD}:/src/crystal olbat/debian-crystal (generated files will be copied into the repository's directory).

I tried to rebuild a new crystal package using the version of crystal that I compiled, it worked like a charm.


One last thing, during the build I got some warnings about program's linking that you may find interesting:

dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/crystal/usr/bin/crystal was not linked against libedit.so.2 (it uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/crystal/usr/bin/crystal was not linked against libffi.so.6 (it uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/crystal/usr/bin/crystal was not linked against librt.so.1 (it uses none of the library's symbols)

And some warnings about program's build flags (see https://lintian.debian.org/tags/hardening-no-relro.html):

W: crystal: hardening-no-relro usr/bin/crystal

I'd prefer to wait until we start distributing official packages for some distros. For now, I think it's better to move this discussion to a place like Google Groups, because there's nothing we'll do about this right now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

asterite picture asterite  路  139Comments

akzhan picture akzhan  路  67Comments

asterite picture asterite  路  78Comments

fridgerator picture fridgerator  路  79Comments

chocolateboy picture chocolateboy  路  87Comments