Bringing scala to opensuse

First of all: Not sure whether this category is right. However, since I could answer the question ‘Do you want to improve the Scala experience’ with ‘yes, for openSUSE users’ I chose this category.

It’s my first day trying out Scala, I tried to install it via my package manager and realized its not available.
However it is in an devel project but does not build.
The log file can be seen here.

I saw that on the official Scala website one can download an rpm, and I wondered if the spec file used to create this rpm could be shared. I would like to bring Scala into the official openSUSE repos. I would just see the official spec file to compare it.

Any help is appreciated.

1 Like

Welcome @jubalh, and thanks for volunteering to do this!

Your log file reveals that the current openSUSE package is using the already deprecated ant scala integration to build the scala compiler. Now, scalac uses sbt.

The packaging of the scala distribution happens in this repository. I think you will be able to reuse a bunch of the code there. Consider making a PR if you want to add official support for it :slight_smile:

I think the one coordinating the scala distribution is Seth, so let me ping it in case he may have some useful advice (/cc @SethTisue).

Thanks @jvican.

Seems there will be some work :slight_smile: And that for Scala beginner like me.
Anyways, it seems like the sbt in that devel project is at 0.11.2 so I suppose I’ll have to update that first to 0.13.5.

I believe that’s an excellent way to get started!

I think most of the work will be understanding which sbt tasks to call and how to invoke them from openSUSE package manager’s installation scripts. This will get you to know sbt better. :slight_smile:

Feel free to drop us any doubt you have over Gitter, in our scala/contributors and sbt/sbt channel.

1 Like

So I started with packaging sbt now. Its at my branch

When I run sbt I get the following:

Getting org.scala-sbt sbt 0.13.15  (this may take some time)...

I figured that happens because it gets all its dependencies, but actually I installed the preloaded. I adapted the path though, to: /usr/share/java/sbt (as $sbt_home).

Maybe someone could take a look at the spec file and patch (aboe in teh devel project).

Two questions:

  • It seems that sbt-launch-lib.bash always tries to do stuff in $HOME ?
  • When is java9-rt-export.jar needed (meaning what is it for)?