$ snap version
snap 2.35
snapd 2.35
series 16
neon 16.04
kernel 4.15.0-33-generic
$ snap info hello
name: hello
summary: GNU Hello, the "hello world" snap
publisher: Canonical✓
contact: snaps@canonical.com
license: unset
description: |
GNU hello prints a friendly greeting. This is part of the snapcraft tour at
https://snapcraft.io/
commands:
- hello
- hello.universe
snap-id: mVyGrEwiqSi5PugCwyH7WgpoQLemtTd6
tracking: stable
refresh-date: today at 12:38 CST
channels:
stable: 2.10 (20) 65kB -
candidate: 2.10 (20) 65kB -
beta: 2.10.1 (29) 65kB -
edge: 2.10.42 (34) 65kB -
installed: 2.10 (20) 65kB -
$ locale
LANG=zh_TW.UTF-8
LANGUAGE=zh_TW:zh_CN:en_US:zh_TW:zh_CN
LC_CTYPE="zh_TW.UTF-8"
LC_NUMERIC="zh_TW.UTF-8"
LC_TIME="zh_TW.UTF-8"
LC_COLLATE="zh_TW.UTF-8"
LC_MONETARY="zh_TW.UTF-8"
LC_MESSAGES="zh_TW.UTF-8"
LC_PAPER="zh_TW.UTF-8"
LC_NAME="zh_TW.UTF-8"
LC_ADDRESS="zh_TW.UTF-8"
LC_TELEPHONE="zh_TW.UTF-8"
LC_MEASUREMENT="zh_TW.UTF-8"
LC_IDENTIFICATION="zh_TW.UTF-8"
LC_ALL=
$ snap run hello
Hello, world!
$ which hello
/usr/bin/hello
$ hello
哈囉,大家好!
Regular ping…
Regular ping…
Regular bump…
Are you looking for the source that actually built the snap (ie the snapcraft.yaml)? Or the code for the gnu hello? I believe the gnu hello code is here:
https://www.gnu.org/software/hello/
Yes, that’s what I want.
seems apple localized it in french though (sorry, could not resist )
Regular ping……
Based on the description of the snap, I suspect it is built from the snapcraft.yaml included in this section of the documentation:
There should be somewhere hosting the snap’s source? Apparently there’s a packaging bug in the snap and as an demonstrative snap this is quite not acceptable.
The source of the documentation is here:
https://github.com/canonical-docs/snappy-docs/blob/master/build-snaps/your-first-snap.md
I’m not sure it’d be useful to add extra work-arounds to that snapcraft.yaml, since it would reduce its utility as a tutorial.
As for the bug you mentioned, the problem is almost certainly down to snapcraft building autotools projects with a prefix that differs to where the app is actually going to be installed.
Neither of the values for the install-via
property are appropriate: one configures the project with a prefix of ""
, and the other with a temporary directory as the prefix. Neither option is appropriate for apps that compile in absolute paths based on the prefix (as is likely the case with GNU Hello’s bindtextdomain
call).
I noticed that the hello
snap actually output different messages according to it’s providing channel:
$ snap refresh --channel=beta hello
hello (beta) 2.10.1 from Canonical✓ refreshed
$ snap run hello
Hello, snap padawan!
$ snap refresh --channel=edge hello
hello (edge) 2.10.42 from Canonical✓ refreshed
$ snap run hello
Hello, snap guru!
Nevermind, I finally found it:
I have filed a fix here:
https://github.com/ubuntu-core/hello-snapcraftio/pull/3