Classic confinement request for Erlang snap

Vetting done, +1 from the advocacy side.

Granted, this is now live.

Thanks, everyone!

  • Tristan

Do I need to do something in the snap or elsewhere to setup the aliases?

I have another issue I encountered (layout symlinks not working when they had when testing with devmode) so I’ve made the snap private for now and will be opening a separate issue to try to figure out what I’ve got wrong wth the use of layout.

A devmode snap works differently than a classic snap, and as far as I know layouts are not available for classic snaps so another solution will be needed - can you explain the problem at bit more?

Aliases must be granted separately - apologies I missed this when granting classic - will do this now.

FYI - aliases have now been granted

Oh, thanks. I was using them so any references to where Erlang was “installed” (prefix /usr) would work.

This will not work the way it would with a strict/devmode snap because with classic snaps, they are run in the host mount namespace (which is shared with all other non-strict/devmode applications including debs, etc.).

Were you hoping to be able to redirect any existing instances of erlang on the system to the one in your snap? If so, that’s unnecessary and I think a bit counter-intuitive, I wouldn’t expect installing the erlang snap would change files installed by the erlang deb, I would expect either they conflict with each other, or they don’t touch each other’s files.


Without those layout symlinks running erl will fail because it is looking for erlexec in /usr/lib/erlang/erts-10.6.1/bin/ when installed with --prefix=/usr.

It sounds like the issue you have is one with how the snap is built, are you compiling erlang in this snap by itself or are you reusing an existing package (like a deb for example) ?

Compiling in the snap. Am I supposed to do --prefix=SOME_SNAP_DIR for an argument to configure?

Can you start a new topic about this in the #snapcraft category?

Created Alternative to layout for classic confinement?

@alexmurray do individual aliases within have to be approved or should all aliases I add to the snap work?

I added an alias for each command the snap installs but when I installed the snap the only command I found that didn’t inlcude the erlang. prefix was erlc.

In the snapcraft.yaml I have:

    command: erl
    aliases: [erl]
    command: rebar3
    aliases: [rebar3]
    command: escript
    aliases: [escript]
    command: dialyzer
    aliases: [dialyzer]
    command: epmd
    aliases: [epmd]
    command: erlc
    aliases: [erlc]
    command: typer
    aliases: [type]
    command: run_erl
    aliases: [run_erl]
    command: to_erl
    aliases: [to_erl]
    command: ct_run
    aliases: [ct_run]

Wait, I was wrong, they are all there.

But there is still an issue. The names are not what I put in aliases. So ct_run is still ct-run, run_erl is still run-erl and to_erl is still to-erl.

Is the aliases list I added supposed to be the name given to the alias?

If this is expected and I’m using aliases wrong, is there a way to set the name so I can have underscores instead of dashes in the names?

Apologies - I just noticed I missed this distinction - I have updated the snap declaration now to list the aliases with the underscores - please let me know if this still is not resolved but I hope it should be correct now.

Awesome, thanks again! They look good now.

@alexmurray sorry, I spoke too soon! Just had someone else give it a try and they immediately noticed that erl is missing an alias, it is still only erlang.erl. Can you add that one?

Done - sorry for the mixups.

Perfect, thanks, I think it is all good now