Public bug reported:
I have a snap that works fine in devmode with the following snapcraft
YAML:
...
environment:
LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/lib:$SNAP/usr/lib/x86_64-linux-gnu
However, this doesn't work when I change the confinement mode to
'classic'. When I do 'snap run --shell <snap>', I see errors, and then
when I look at the environment variables I notice they haven't been
expanded:
$ snap run --shell <snap>
Command 'lesspipe' is available in the following places
* /bin/lesspipe
* /usr/bin/lesspipe
The command could not be located because '/bin:/usr/bin' is not included in the
PATH environment variable.
lesspipe: command not found
Command 'dircolors' is available in '/usr/bin/dircolors'
The command could not be located because '/usr/bin' is not included in the PATH
environment variable.
dircolors: command not found
Command 'ls' is available in '/bin/ls'
The command could not be located because '/bin' is not included in the PATH
environment variable.
ls: command not found
Command 'mkdir' is available in '/bin/mkdir'
The command could not be located because '/bin' is not included in the PATH
environment variable.
mkdir: command not found
$ echo $LD_LIBRARY_PATH
$LD_LIBRARY_PATH:$SNAP/lib:$SNAP/usr/lib/x86_64-linux-gnu
Other environment variables, such as $PATH, are also not properly updated.
This is using snapd 2.24, as follows:
$ snap version
snap 2.24
snapd 2.24
series 16
ubuntu 16.04
kernel 4.4.0-75-generic
** Affects: snapd (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1688335
Title:
Classic confinement doesn't work with custom environment
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1688335/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs