Activity log for bug #1670388

Date Who What changed Old value New value Message
2017-03-06 15:12:37 Didier Roche-Tolomelli bug added bug
2017-03-06 15:12:59 Didier Roche-Tolomelli bug task added snapcraft
2017-03-06 15:13:47 Didier Roche-Tolomelli summary classic snap are missing some env variables for reaching command classic snap are missing some env variables for reaching command name. (snap build, executing it fails)
2017-03-06 15:14:09 Didier Roche-Tolomelli description 1. Classic snap, where snapcraft.yaml can be found on lp:~didrocks/+junk/chuck-norris-webserver-classic. 2. Note that it declares: apps: node-service: command: chuck-norris-app daemon: simple restart-condition: always cli: command: chuck-norris-cli 3. Building and installing, executing: $ chuck-norris-webserver-classic.cli /snap/chuck-norris-webserver-classic/x2/command-cli.wrapper: 2: exec: chuck-norris-cli: not found The issue is that indeed, the wrapper don't add $SNAP/bin/ to $PATH: #!/bin/sh exec "chuck-norris-cli" "$@" The non classic version works as it does add it to the path. Note that specifying "bin/chuck-norris-cli" instead of just "chuck-norris-cli" works in classic and generate something like: exec "$SNAP/bin/node" "$SNAP/bin/chuck-norris-cli" "$@" 4. Another side effect is that it's not the snap node version which is used in that case. The script declares "#!/usr/bin/env node" resolving to system one. #!/bin/sh exec "chuck-norris-cli" "$@" -> will resolve to the system one, while if specified as bin/chuck-norris-cli: exec "$SNAP/bin/node" "$SNAP/bin/chuck-norris-cli" "$@" I would expect in both case to prefer the snap version. ProblemType: Bug DistroRelease: Ubuntu 16.04 Package: snapcraft 2.27.1 [modified: usr/lib/python3/dist-packages/snapcraft/_baseplugin.py usr/lib/python3/dist-packages/snapcraft/plugins/python.py] ProcVersionSignature: Ubuntu 4.4.0-64.85-generic 4.4.44 Uname: Linux 4.4.0-64-generic x86_64 NonfreeKernelModules: zfs zunicode zcommon znvpair zavl ApportVersion: 2.20.1-0ubuntu2.5 Architecture: amd64 CurrentDesktop: Unity Date: Mon Mar 6 16:06:59 2017 InstallationDate: Installed on 2012-05-28 (1743 days ago) InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425) PackageArchitecture: all SourcePackage: snapcraft UpgradeStatus: Upgraded to xenial on 2014-10-31 (857 days ago) 1. Classic snap, where snapcraft.yaml can be found on lp:~didrocks/+junk/chuck-norris-webserver-classic. 2. Note that it declares and builds ok: apps:   node-service:     command: chuck-norris-app     daemon: simple     restart-condition: always   cli:     command: chuck-norris-cli 3. Building and installing, executing: $ chuck-norris-webserver-classic.cli /snap/chuck-norris-webserver-classic/x2/command-cli.wrapper: 2: exec: chuck-norris-cli: not found The issue is that indeed, the wrapper don't add $SNAP/bin/ to $PATH: #!/bin/sh exec "chuck-norris-cli" "$@" The non classic version works as it does add it to the path. Note that specifying "bin/chuck-norris-cli" instead of just "chuck-norris-cli" works in classic and generate something like: exec "$SNAP/bin/node" "$SNAP/bin/chuck-norris-cli" "$@" 4. Another side effect is that it's not the snap node version which is used in that case. The script declares "#!/usr/bin/env node" resolving to system one. #!/bin/sh exec "chuck-norris-cli" "$@" -> will resolve to the system one, while if specified as bin/chuck-norris-cli: exec "$SNAP/bin/node" "$SNAP/bin/chuck-norris-cli" "$@" I would expect in both case to prefer the snap version. ProblemType: Bug DistroRelease: Ubuntu 16.04 Package: snapcraft 2.27.1 [modified: usr/lib/python3/dist-packages/snapcraft/_baseplugin.py usr/lib/python3/dist-packages/snapcraft/plugins/python.py] ProcVersionSignature: Ubuntu 4.4.0-64.85-generic 4.4.44 Uname: Linux 4.4.0-64-generic x86_64 NonfreeKernelModules: zfs zunicode zcommon znvpair zavl ApportVersion: 2.20.1-0ubuntu2.5 Architecture: amd64 CurrentDesktop: Unity Date: Mon Mar 6 16:06:59 2017 InstallationDate: Installed on 2012-05-28 (1743 days ago) InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425) PackageArchitecture: all SourcePackage: snapcraft UpgradeStatus: Upgraded to xenial on 2014-10-31 (857 days ago)
2017-03-07 14:02:02 Sergio Schvezov snapcraft: status New Triaged
2017-03-07 14:02:05 Sergio Schvezov snapcraft: importance Undecided Low
2017-03-07 14:02:08 Sergio Schvezov snapcraft: assignee Sergio Schvezov (sergiusens)
2017-03-10 01:17:41 Launchpad Janitor snapcraft (Ubuntu): status New Confirmed
2017-03-12 12:26:49 Alberto Salvia Novella snapcraft (Ubuntu): importance Undecided Low