Octave is a numerical computing environment largely compatible with MATLAB. As free software, Octave runs on GNU/Linux, macOS, BSD, and Windows. At the 2019 Snapcraft Summit, Mike Miller and Jordi Gutiérrez Hermoso of the Octave team worked on creating an Octave snap in stable and beta versions for the Snap Store.
As Mike and Jordi explained, “Octave is currently packaged for most of the major distributions, but sometimes it’s older than we would like.” The goal of the Octave snap was to allow users to easily access the current stable release of the software, independently of Linux distribution release cycles. A snap would also let them release Octave on distributions not covered so far.
Before starting with snaps, Octave depended on distribution maintainers, including those of CentOS, Debian, Fedora, and Ubuntu, for its binary packaging. With snaps, the situation has improved. The Octave team can now push out a release as soon as it ready for users eager to get it now, while other more conservative users wait for more traditional packages from their distribution. Mike and Jordi envisioned this to be the biggest benefit of coming to the Summit and creating an Octave snap.
They also foresee a reduction in the amount of maintenance needed, using one package across many Linux distributions. The Snap Store will help users discover Octave easier while the Octave homepage will also feature snaps as a download option.
Nevertheless, there was a learning curve: “We’re more used to Debian packaging, and snap packaging has different quirks that we’re not used to,” comments Jordi. In the first day of their snap creation, it took time to set up the environment and getting an initial build to work. “Time was needed for recompiling Octave each time with fixes for re-testing, as the application is large and has many dependencies, all of which must be compiled,” explains Mike.
The Octave team used Multipass on Linux to help build their snap and found that they “didn’t even notice it was there” for the most part. As Mike explains, “I had no issues other than a couple of teething problems due to the large build that Octave requires. However, after a little bit of digging in the documentation and asking the right people this was soon solved.”
Advice that they would pass on to others about using snaps is to avoid thinking that they are the same as containers. Mike and Jordi speak from experience because they started with this preconception as they explain, “this made it difficult because everything we did in the build environment had to be readjusted once we wanted to go into the runtime environment. We had to change the paths of everything.” Some functions that happened automatically in other packaging methods, like including libraries according to dependencies, must also be done manually for snaps.
Coming to an event like the Summit is another tip that they would give to would-be snap developers. As Mike and Jordi put it, “reading the documentation and doing this ourselves would have taken longer than having everyone here. The fact we can just walk around and say hey, how do we do this and get that help.”
Install Octave as a snap here.