Re: Snap packages as build dependencies of other snaps

2017-04-08 Thread XiaoGuo Liu
can you do it by remote parts? you can find more info by:

$ snapcraft update
$ snapcraft search

There are a number of existing parts there already. You can publish your
own.

Best regards,
XiaoGuo


On Sun, Apr 9, 2017 at 12:51 AM, Joseph Rushton Wakeling <
joseph.wakel...@webdrake.net> wrote:

> Hello folks,
>
> Is it possible to specify an existing snap package (by track and release
> channel) as a build dependency of a part of another snap package?
>
> I'm interested specifically in the case of using an existing snap package
> to provide a compiler used to build another snap.  From what I understand
> from discussion around the go snapcraft plugin, there is some intention to
> allow this, but is it just for plugins?
>
> Thanks & best wishes,
>
> -- Joe
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
> an/listinfo/snapcraft
>



-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Issues creating webapps snaps with stric confinement

2017-04-04 Thread XiaoGuo Liu
Hi Winael,

Have you seen the tutorial at
https://tutorials.ubuntu.com/tutorial/snap-a-website#0?

Best regards,
XiaoGuo

On Fri, Mar 31, 2017 at 9:28 PM, Vincent JOBARD <vinzjob...@gmail.com>
wrote:

> Hi Everyone
>
> I just try to follow the tutorial to learn how to create webapps snaps
> using snapcraft. (
> https://developer.ubuntu.com/en/phone/web/ubuntu-webapps-guide/, very nice
> tutorial by the way)
>
> Unfortunately, when I try to create my snap with strict confinement, I have
> a network Error page, but all works fine in devmode.
>
> I'm at work behind a proxy with cntlm authentification. could it be related
> ?
>
> Thx for your answers guys
>
> Cheers
> Winael
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>



-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: content interface, DENIED mounting $SNAP/mydir

2017-03-02 Thread XiaoGuo Liu
Can we use the configure hook to create the directory at installation?

On Fri, Mar 3, 2017 at 3:06 PM, Simon Fels <simon.f...@canonical.com> wrote:

> On 03.03.2017 01:06, Michi Henning wrote:
> >
> >> On 3 Mar 2017, at 4:33 , knitzsche <kyle.nitzs...@canonical.com
> >> <mailto:kyle.nitzs...@canonical.com>> wrote:
> >>
> >> Hi,
> >>
> >> I am trying to use the wifi-ap content sharing interface.
> >>
> >> It is DENIED (see below) when I try to use a $SNAP directory.
> >>
> >> It works when I instead use $SNAP_DATA directory for the content
> >> sharing. But, I have to create that directory at run time: I can't
> >> figure out so far how to create (from snapcraft.yaml) an empty dir in
> >> $SNAP_COMMON or $SNAP_DATA at install time. (Knowing this would solve
> >> my problem.)
> >
> >
> > We do this to create a directory:
> >
> > install: |
> >   # Make sure we have a mount point for ubuntu-app-platform
> >   mkdir -p $SNAPCRAFT_PART_INSTALL/ubuntu-app-platform
>
> That doesn't help much here as we're bind-mounting read/write data and
> that seems to be not possible to go into somewhere below $SNAP.
>
> I fear the only answer to this problem are interface hooks which would
> allow us to create the relevant directory before the bind-mount happens
> inside $SNAP_DATA.
>
> regards,
> Simon
>
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>



-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Is there any way to choose the arch to build on build.snapcraft.io?

2017-03-02 Thread XiaoGuo Liu
Hi,

I just tried to use build.snapcraft.io to build my application. The build
was successful. However, the app was meant for amd64. After I chose my
repos, it built for armhf and amd64 at the same time. The both versions
were published. How can I choose the arch to publish?

Thanks & best regards,
XiaoGuo

-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: snapcraft 2.27 has been released

2017-02-28 Thread XiaoGuo Liu
Hi Roberto,

In that case, you can just run your own script in the command in stead of
directly launching your app. In your script, just do whatever thing there.

Best regards,
XiaoGuo

On Tue, Feb 28, 2017 at 9:51 PM, Roberto Mier Escandón  <
roberto.escan...@canonical.com> wrote:

> Hey guys,
>
> Couldn't we have environment property pointing also to a file script as
> in the case of scriptlets. In the case of needing to set a bunch of
> things before launching app I'd prefer having it in that way.
>
> Cheers.
>
> On 24/02/17 20:05, Kyle Fazzari wrote:
> >
> >
> > On 02/24/2017 10:49 AM, Claudio André wrote:
> >>
> >> 2017-02-17 10:49 GMT-02:00 Sergio Schvezov
> >> <sergio.schve...@canonical.com <mailto:sergio.schve...@canonical.com>>:
> >>
> >> Hello snapcrafters!
> >>
> >> ## Setting up environment
> >>
> >> No more wrapper scripts just to setup on environment entry, this is
> >> now tied into an app entry in `apps`. Here's a quick example:
> >>
> >> ```yaml
> >> apps:
> >> vim:
> >> command: bin/vim
> >> environment:
> >> VIMRUNTIME: $SNAP/share/vim/vim80
> >> ```
> >>
> >>
> >> Hi, I tried to append to path (see below). It is not supported.
> >>
> >> ```yaml
> >> environment:
> >>   PATH: "$SNAP/usr/lib/jvm/default-java/bin:$PATH"
> >> ```
> >>
> >> I'm ok with it. But, in case this is not by design, I'm mailing you
> guys.
> >
> > I can verify this. To clarify, this builds and runs fine, but actually
> > results in the PATH including the string `$PATH` instead of expanding it.
> >
> > Can a snapd dev comment on this? Is that intended?
> >
> >
> >
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>



-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: snap connect myapp:camera out-of-the-box

2017-02-22 Thread XiaoGuo Liu
I have updated the bug report. Please check my answers.

Best regards,
XiaoGuo

On Tue, Feb 21, 2017 at 11:44 PM, Dev Dev <d...@tobogganstudio.com> wrote:

> Hi,
>
> Anyone can give me more information (ETA, how it will works) about the
> connection to camera. Right now, I need to ask my users who installed
> myapp via the Software Center to open a terminal and run:
> sudo snap connect myapp:camera
>
> It needs to be automagically connected.
>
> I reported this issue here:
> https://bugs.launchpad.net/snapcraft/+bug/1609577
>
> Thanks
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>



-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Experimental Python interpreter snap

2017-02-19 Thread XiaoGuo Liu
Hi James,

Nice. This is a nice example showing how to reduce a python snap package.
A few days ago, I also made a small example to make use of the python3
coming with the core at:

https://github.com/liu-xiao-guo/httpstat

In the above example, I in fact do not package the python. It works.

Thanks & best regards,
XiaoGuo

On Mon, Feb 20, 2017 at 10:16 AM, James Henstridge <
james.henstri...@canonical.com> wrote:

> To learn a bit more about I put together a snap for Python 3.6.0,
> which can be installed with:
>
> snap install --edge python36-jamesh
>
> You can then run "python36-jamesh.python3", which will give you the a
> Python shell running with strict confinement, with the full standard
> library available.
>
> Now I know Snapcraft already has support for packaging Python
> applications, so what benefits does this package add?  There were a
> few extra points in how I built the package:
>
> 1. the interpreter binary and extension modules all have appropriate
> $ORIGIN relative rpath set.
>
> 2. a sitecustomize.py is provided that will add
> $SNAP/lib/python3.6/site-packages to sys.path. (more on why this is
> useful later)
>
> This makes the interpreter fully relocatable in the file system while
> still being able to find the bundled libraries.  In turn, this means
> the interpreter is functional when exported to another snap via the
> content interface.
>
> To demonstrate this, I put together a trivial "hello world" snapcraft
> project here:
>
> https://github.com/jhenstridge/python-snap-pkg/tree/master/examples/hello-
> world
>
> After building this package, it can be run after installing and
> connecting the interface:
>
> $ snap install --dangerous hello-world_0.1_amd64.snap
> hello-world 0.1 installed
> $ snap connect hello-world:python3 python36-jamesh:python3
> $ hello-world
> Hello world!
>
> Since the hello-world snap doesn't actually include Python, it is
> quite light weight (4 kB, which I think is as small as a squashfs
> gets).  The space savings may not be that great with a single snap
> (the interpreter snap is almost 20MB), but the space savings increase
> as you install more snaps using the interface.  It also means that we
> could upgrade to Python 3.6.1 (when it comes out) without rebuilding
> this snap.
>
> And since the interpreter is being run under the hello-world snap's
> confinement policy, it can do potentially do things the main
> "python36-jamesh.python3" binary can't.  For example, if you add the
> "network" plug, you'll be able to access the network.
>
> And the sitecustomize script will also mean the interpreter can locate
> packages shipped in the plug snap.
>
> I'd be interested in any suggestions or feedback about the snap.
>
> Thanks,
>
> James.
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>



-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: New stable "core" and "ubuntu-core" snaps released

2017-02-16 Thread XiaoGuo Liu
Thanks. May I know what is the "reload-command" for in the snap.yaml? How
to make use of it in the snapcraft.yaml?

Best regards,
XiaoGuo

On Thu, Feb 16, 2017 at 10:55 PM, Michael Vogt <michael.v...@canonical.com>
wrote:

> Hello,
>
> The Snappy team is happy to announce the promotion of snapd 2.22.2
> from the candidate channel to stable in both the "core" and
> "ubuntu-core" snaps. It will also be available via the regular apt
> update mechanism in Ubuntu 14.04, 16.04 and 16.10. Other distributions
> will follow on their own schedule.
>
> As a reminder 2.22.2 brings with it:
>
> - automatically transition ubuntu-core snaps to core
> - support for X-Ayatana-Desktop-Shortcuts in desktop files
> - improve retry handling on network errors further
> - support for disabling sshd from the core config
> - support new "reload-command" in snap.yaml
> - fix snap try with classic confinement
> - many more bugfixes
> - interface improvements:
>   - opengl, default, network-control, network-manager
>   - new interfaces:
> - unity8-download-manager, evolution, account-control,
>   core-support
>
> Due to the power of Ubuntu Core, your device will update and reboot
> automatically so there is nothing for you to do :)
>
> Please let us know if you notice any issues and enjoy the new release!
>
> Cheers,
>  Michael (on behalf of the snappy team)
>
>
> --
> Devices mailing list
> devi...@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.snapcraft.io/
> mailman/listinfo/devices
>



-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Currernt config hook implementation scales very badly

2017-02-13 Thread XiaoGuo Liu
Hi,

Today, I just followed the instructions at:

https://github.com/CanonicalLtd/ubuntu-core-docs/blob/master/en/reference/core-configuration.md

to disable ssh. However, I got the error like:

liu-xiao-guo@localhost:~$ sudo snap set core service.ssh.disable=true
error: cannot perform the following tasks:
- Run configure hook of "core" snap (/snap/core/1177/meta/hooks/configure:
62: /snap/core/1177/meta/hooks/configure: systemctl: Permission denied)

Is this a bug? It was tested on Raspberry Pi2 device, and my core system
info is like:

liu-xiao-guo@localhost:~$ snap version
snap2.23~201702101018.git.979009c~ubuntu16.04.1
snapd   2.23~201702101018.git.979009c~ubuntu16.04.1
series  16

liu-xiao-guo@localhost:~$ snap info core
name:  core
summary:   "snapd runtime environment"
publisher: canonical
description: |
  The core runtime environment for snapd
type:core
tracking:edge
installed:   16.04.1 (1177) 68MB -
refreshed:   2017-02-13 04:42:55 + UTC
channels:
  stable:16.04.1 (893)  67MB -
  candidate: 16.04.1 (1083) 68MB -
  beta:  16.04.1 (1083) 68MB -
  edge:  16.04.1 (1177) 68MB -

Thanks & best regards,
xiaoguo

On Wed, Feb 1, 2017 at 6:31 PM, Oliver Grawert <o...@ubuntu.com> wrote:

> hi,
>
> after we recently added a config hook [1] to the core snap it is now
> possible to disable ssh if you require [2] ...
>
> there is a long standing request to do the same for syslog for systems
> running from SD card, which is why i looked into trying to extend the
> existing configure script for this, which made me notice some issue...
>
> when you call "snap set core foo=bar", there is no indication at all
> for the script which variable changes a value, neither in the shell
> environment nor in the argument list.
>
> the only way to get your value is to call snapctl for every existing
> variable [3]. since you dont know what specific variable was requested
> to change the only way to reliably write it is to write *all* existing
> variables ...
>
> now, if you package something with a more complex config that you want
> completely handled via snap config this gets ugly very fast... imagine
> something like postfix with can potentially have 100s of config
> options. instead of atomically changing a single option you will
> regenerate the full config from scratch. this takes a lot longer,
> bringing the risk of a completely broken config in case of a power
> loss, beyond resulting an an awful config hook script with a large
> block of "snapctl get" calls at the top.
>
> can we extend the config hook implementation minimally so a "snap set
> core foo=bar" would at least have something like "SNAP_OPTION=foo" in
> the environment that the generating script or binary could read to
> avoid the unnecessary processing or would that break some design
> concept ?
>
> ciao
> oli
>
> [1] http://bazaar.launchpad.net/~snappy-dev/core-snap/trunk/view/head:/
> hooks/configure
> [2] https://github.com/CanonicalLtd/ubuntu-core-docs/blob/master/en/ref
> erence/core-configuration.md
> [3] https://github.com/snapcore/snapd/wiki/hooks
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>
>


-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Package too old for cleanbuild

2017-02-12 Thread XiaoGuo Liu
Will the new release address the issue at
https://bugs.launchpad.net/snapcraft/+bug/1662464? Currently, I am using
ogra's packageproxy, and it works perfectly.  I created a blog at
http://blog.csdn.net/ubuntutouch/article/details/54405477

However, nodejs is not a debian package. Instead, it downloads every time
after the project is cleaned and rebuilt. This is a really a bad developer
experience. Last time, when I had a hackathon event, it was almost
impossible for a developer to develop a nodejs at the site since the
download took years to get it finished due to the network limitation or
other reasons. Even now at home, sometimes it takes quite a while to
download the nodejs package. I need to try different combination of VPN. It
is really troublesome for me.

Best regards,
XiaoGuo

On Mon, Feb 13, 2017 at 10:44 AM, Michi Henning <michi.henn...@canonical.com
> wrote:

> >
> > While I don't disagree with the suggestions here, if I may suggest a
> > workaround:
> >
> > If you find yourself using cleanbuild a lot (it makes a new ephemeral
> > container, builds, then destroys the container), you might find some
> > workflow improvements by simply developing the snap in a container. You
> > can even bind-mount the source from the host, if you want. This is the
> > workflow I use personally. It allows for one to fully customize the apt
> > sources while also utilizing Snapcraft's built-in stage package cache*,
> > and it doesn't clutter the development environment on the host.
>
> Thanks Kyle!
>
> While this works, I don’t think it meets the pragmatic needs of the
> developer. It’s already complex enough to learn a new tool chain and figure
> out an effective edit/debug/test cycle. If I have to set up my own
> container for this, I end up adding yet more variables and possible sources
> of errors.
>
> We really need the tool to take care of this, otherwise everyone goes
> through the same pain (and mistakes) over and over. The big bottleneck here
> is the endless re-downloading of all the packages. If snapcraft could take
> care of this transparently and use a cache, things would proceed at a
> tolerable pace, without everyone having to re-invent their own wheel.
>
> Cheers,
>
> Michi.
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>



-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: start engine before client

2017-02-12 Thread XiaoGuo Liu
I think you can just make a script. Inside the script, launch the engine
first, then start the player client. You just need one app which launches
your created script.

Best regards,
xiaoguo

On Fri, Feb 10, 2017 at 9:08 PM, Vasilisc <vasilisc...@gmail.com> wrote:

> The program "app1" is not mine. It consists of two parts.
>
> I create snapcraft.yaml
> 
> apps:
>  engine:
>   command: $SNAP/opt/app1/engine --start
>   plugs: [home, unity7, x11, pulseaudio, network, network-bind]
>
>  player:
>   command: $SNAP/opt/app1/player "$@"
>   plugs: [home, unity7, x11, pulseaudio, network, network-bind]
> 
>
> If to launch an engine (app1.engine) and then the client (app1.player),
> then everything works perfectly. How to make that start of the client
> automatically launched an engine?
>
> Sorry for my english.
> --
> Best regards,
> vasilisc
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
> an/listinfo/snapcraft
>



-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: 'organize' affects 'stage-packages'

2017-02-09 Thread XiaoGuo Liu
I think you may point a folder name there in the organize something like:

 organize:
  'usr/share/ubuntu-html5-ui-toolkit/': www/ubuntu-html5-ui-toolkit

Basically, the folder "usr/share/ubuntu-html5-ui-toolkit" will be moved to
directory "www/ubuntu-html5-ui-toolkit" in the snap.

Best regards,
xiaoguo

On Fri, Feb 10, 2017 at 12:47 PM, Ruddick Lawrence <rudd...@carbon.ai>
wrote:

> I just discovered that a part with:
>
> organize:
>   '*': opt/
> stage-packages:
> - some-great-package
>
> moves the contents of the stage-packages into opt in addition to the
> output of the plugin. Is this the intended behavior, and if so, is there a
> way to move only the plugin output into a subfolder?
>
> Thanks,
> Ruddick
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>
>


-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: snapd available in Trusty Tahr

2017-02-09 Thread XiaoGuo Liu
Hi Thomas,

Thanks. I have reported a bug at
https://bugs.launchpad.net/snapd/+bug/1663174

Best regards,
XiaoGuo

On Thu, Feb 9, 2017 at 5:11 PM, Thomas Voß <thomas.v...@canonical.com>
wrote:

>
>
> On Thu, Feb 9, 2017 at 10:09 AM, XiaoGuo Liu <xiaoguo@canonical.com>
> wrote:
>
>> Hi Jamie,
>>
>> For my case, right now, after I log out and login again (in fact, I
>> rebooted my machine). the /snap/bin path is still not added. Everything is
>> still the same. I cannot execute the "hello-word" snap app. I do not know
>> where I did wrongly.
>>
>>
> ​In this case, please file a bug against launchpad.net/snapd, and tag it
> with trusty. /snap/bin should be in your PATH after a reboot.
>
> Thanks,
>
>   Thomas​
>
>
>
>> Thanks & bestt regards,
>> XiaoGuo
>>
>> On Thu, Feb 9, 2017 at 5:05 PM, Jamie Bennett <
>> jamie.benn...@canonical.com> wrote:
>>
>>> The simplest way is to log out and back in again. We are looking at
>>> other options on how to make this easier.
>>>
>>> Regards,
>>> Jamie.
>>>
>>> On 9 Feb 2017, at 09:02, XiaoGuo Liu <xiaoguo@canonical.com> wrote:
>>>
>>> Hi Thomas,
>>>
>>> So, an end user needs to manually add the path, right? It is not a
>>> little bit straightforward though. I think it would be good to come with
>>> detailed instructions.
>>>
>>> Thanks & best regards,
>>> XiaoGuo
>>>
>>>
>>> On Thu, Feb 9, 2017 at 4:39 PM, Thomas Voß <thomas.v...@canonical.com>
>>> wrote:
>>>
>>>>
>>>>
>>>> On Thu, Feb 9, 2017 at 5:02 AM, XiaoGuo Liu <xiaoguo@canonical.com>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I just tried to install the snapd and installed a hello-world snap app
>>>>> on 14.04 desktop. However, I found a problem. When I un the hello-world, 
>>>>> it
>>>>> shows:
>>>>>
>>>>> liuxg@liuxg:/snap/bin$ hello-world
>>>>> hello-world: command not found
>>>>>
>>>>>
>>>> This is expected behavior right now. PATH is adjusted in
>>>> /etc/profile.d/apps-bin-path.sh (comes with the snapd package).
>>>> /etc/profile and the entries in /etc/profile.d/* are only considered for
>>>> login shells. With that, a reboot, logout/login, or sourcing /etc/profile
>>>> in your current shell will give you the correct PATH setup.
>>>>
>>>> We are looking into letting the user know when installing the debian
>>>> package (as opposed to the situation where snapd is already part of the
>>>> image). See https://github.com/snapcore/snapd/pull/2819 for reference.
>>>>
>>>> Thanks for testing,
>>>>
>>>>   Thomas
>>>>
>>>>
>>>>
>>>>> Which means that /snap/bin path is not added to the path after
>>>>> installing the core. Also, when I run it under the /snap/bin, it shows:
>>>>>
>>>>> liuxg@liuxg:/snap/bin$ ./hello-world
>>>>> ERROR: ld.so: object '/lib/$LIB/liblsp.so' from /etc/ld.so.preload
>>>>> cannot be preloaded (cannot open shared object file): ignored.
>>>>> ERROR: ld.so: object '/lib/$LIB/liblsp.so' from /etc/ld.so.preload
>>>>> cannot be preloaded (cannot open shared object file): ignored.
>>>>> Hello World!
>>>>>
>>>>> My desktop info is:
>>>>>
>>>>> liuxg@liuxg:~$ lsb_release -a
>>>>> No LSB modules are available.
>>>>> Distributor ID: Ubuntu
>>>>> Description: Ubuntu 14.04.5 LTS
>>>>> Release: 14.04
>>>>> Codename: trusty
>>>>>
>>>>> liuxg@liuxg:~$ snap list
>>>>> Name Version  Rev  Developer  Notes
>>>>> core 16.04.1  888  canonical  -
>>>>> hello-world  6.3  27   canonical  -
>>>>>
>>>>> Thanks & best regards,
>>>>> XiaoGuo
>>>>>
>>>>>
>>>>> On Wed, Feb 8, 2017 at 5:35 AM, Andrew Mason <
>>>>> and...@miniatureworldmaker.com.au> wrote:
>>>>>
>>>>>> Awesome, i am going to give this a try!
>>>>>>
>>>>>> On 8 February 2017 8:01:30 am ACDT, Manik Taneja <ma...@canonical.com&

Re: snapd available in Trusty Tahr

2017-02-09 Thread XiaoGuo Liu
Hi Jamie,

For my case, right now, after I log out and login again (in fact, I
rebooted my machine). the /snap/bin path is still not added. Everything is
still the same. I cannot execute the "hello-word" snap app. I do not know
where I did wrongly.

Thanks & bestt regards,
XiaoGuo

On Thu, Feb 9, 2017 at 5:05 PM, Jamie Bennett <jamie.benn...@canonical.com>
wrote:

> The simplest way is to log out and back in again. We are looking at other
> options on how to make this easier.
>
> Regards,
> Jamie.
>
> On 9 Feb 2017, at 09:02, XiaoGuo Liu <xiaoguo@canonical.com> wrote:
>
> Hi Thomas,
>
> So, an end user needs to manually add the path, right? It is not a little
> bit straightforward though. I think it would be good to come with detailed
> instructions.
>
> Thanks & best regards,
> XiaoGuo
>
>
> On Thu, Feb 9, 2017 at 4:39 PM, Thomas Voß <thomas.v...@canonical.com>
> wrote:
>
>>
>>
>> On Thu, Feb 9, 2017 at 5:02 AM, XiaoGuo Liu <xiaoguo@canonical.com>
>> wrote:
>>
>>> Hi,
>>>
>>> I just tried to install the snapd and installed a hello-world snap app
>>> on 14.04 desktop. However, I found a problem. When I un the hello-world, it
>>> shows:
>>>
>>> liuxg@liuxg:/snap/bin$ hello-world
>>> hello-world: command not found
>>>
>>>
>> This is expected behavior right now. PATH is adjusted in
>> /etc/profile.d/apps-bin-path.sh (comes with the snapd package).
>> /etc/profile and the entries in /etc/profile.d/* are only considered for
>> login shells. With that, a reboot, logout/login, or sourcing /etc/profile
>> in your current shell will give you the correct PATH setup.
>>
>> We are looking into letting the user know when installing the debian
>> package (as opposed to the situation where snapd is already part of the
>> image). See https://github.com/snapcore/snapd/pull/2819 for reference.
>>
>> Thanks for testing,
>>
>>   Thomas
>>
>>
>>
>>> Which means that /snap/bin path is not added to the path after
>>> installing the core. Also, when I run it under the /snap/bin, it shows:
>>>
>>> liuxg@liuxg:/snap/bin$ ./hello-world
>>> ERROR: ld.so: object '/lib/$LIB/liblsp.so' from /etc/ld.so.preload
>>> cannot be preloaded (cannot open shared object file): ignored.
>>> ERROR: ld.so: object '/lib/$LIB/liblsp.so' from /etc/ld.so.preload
>>> cannot be preloaded (cannot open shared object file): ignored.
>>> Hello World!
>>>
>>> My desktop info is:
>>>
>>> liuxg@liuxg:~$ lsb_release -a
>>> No LSB modules are available.
>>> Distributor ID: Ubuntu
>>> Description: Ubuntu 14.04.5 LTS
>>> Release: 14.04
>>> Codename: trusty
>>>
>>> liuxg@liuxg:~$ snap list
>>> Name Version  Rev  Developer  Notes
>>> core 16.04.1  888  canonical  -
>>> hello-world  6.3  27   canonical  -
>>>
>>> Thanks & best regards,
>>> XiaoGuo
>>>
>>>
>>> On Wed, Feb 8, 2017 at 5:35 AM, Andrew Mason <
>>> and...@miniatureworldmaker.com.au> wrote:
>>>
>>>> Awesome, i am going to give this a try!
>>>>
>>>> On 8 February 2017 8:01:30 am ACDT, Manik Taneja <ma...@canonical.com>
>>>> wrote:
>>>>>
>>>>>
>>>>>
>>>>> On Tue, Feb 7, 2017 at 12:36 PM, Mark Shuttleworth <m...@ubuntu.com>
>>>>> wrote:
>>>>>
>>>>>> On 07/02/17 20:17, Thomas Voß wrote:
>>>>>> > https://bugs.launchpad.net/ubuntu/+source/xorg-server-lts-xe
>>>>>> nial/+bug/1655724
>>>>>> > was released to the updates pocket today.
>>>>>>
>>>>>> Congrats! Quick feedback from folks with Trusty (14.04 LTS) systems,
>>>>>> cloud or desktop, would be welcome. Pick a favorite snap and take it
>>>>>> for
>>>>>> a spin.
>>>>>>
>>>>> The experience is very clean now. I just tried on AWS and have
>>>>> RocketChat up and
>>>>> running-
>>>>>
>>>>> [image: Inline image 1]
>>>>> Kudos to everyone involved in delivering this!
>>>>>
>>>>> Cheers,
>>>>> Manik
>>>>>
>>>>
>>>> --
>>>> Sent from my mobile device.
>>>>
>>>> --
>>>> Snapcraft mailing list
>>>> Snapcraft@lists.snapcraft.io
>>>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>>>> an/listinfo/snapcraft
>>>>
>>>>
>>>
>>>
>>> --
>>> XiaoGuo, Liu
>>>
>>> --
>>> Snapcraft mailing list
>>> Snapcraft@lists.snapcraft.io
>>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>>> an/listinfo/snapcraft
>>>
>>>
>>
>> --
>> Snapcraft mailing list
>> Snapcraft@lists.snapcraft.io
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>> an/listinfo/snapcraft
>>
>>
>
>
> --
> XiaoGuo, Liu
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>
>
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>
>


-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: snapd available in Trusty Tahr

2017-02-09 Thread XiaoGuo Liu
Hi Thomas,

So, an end user needs to manually add the path, right? It is not a little
bit straightforward though. I think it would be good to come with detailed
instructions.

Thanks & best regards,
XiaoGuo


On Thu, Feb 9, 2017 at 4:39 PM, Thomas Voß <thomas.v...@canonical.com>
wrote:

>
>
> On Thu, Feb 9, 2017 at 5:02 AM, XiaoGuo Liu <xiaoguo@canonical.com>
> wrote:
>
>> Hi,
>>
>> I just tried to install the snapd and installed a hello-world snap app on
>> 14.04 desktop. However, I found a problem. When I un the hello-world, it
>> shows:
>>
>> liuxg@liuxg:/snap/bin$ hello-world
>> hello-world: command not found
>>
>>
> This is expected behavior right now. PATH is adjusted in
> /etc/profile.d/apps-bin-path.sh (comes with the snapd package).
> /etc/profile and the entries in /etc/profile.d/* are only considered for
> login shells. With that, a reboot, logout/login, or sourcing /etc/profile
> in your current shell will give you the correct PATH setup.
>
> We are looking into letting the user know when installing the debian
> package (as opposed to the situation where snapd is already part of the
> image). See https://github.com/snapcore/snapd/pull/2819 for reference.
>
> Thanks for testing,
>
>   Thomas
>
>
>
>> Which means that /snap/bin path is not added to the path after installing
>> the core. Also, when I run it under the /snap/bin, it shows:
>>
>> liuxg@liuxg:/snap/bin$ ./hello-world
>> ERROR: ld.so: object '/lib/$LIB/liblsp.so' from /etc/ld.so.preload cannot
>> be preloaded (cannot open shared object file): ignored.
>> ERROR: ld.so: object '/lib/$LIB/liblsp.so' from /etc/ld.so.preload cannot
>> be preloaded (cannot open shared object file): ignored.
>> Hello World!
>>
>> My desktop info is:
>>
>> liuxg@liuxg:~$ lsb_release -a
>> No LSB modules are available.
>> Distributor ID: Ubuntu
>> Description: Ubuntu 14.04.5 LTS
>> Release: 14.04
>> Codename: trusty
>>
>> liuxg@liuxg:~$ snap list
>> Name Version  Rev  Developer  Notes
>> core 16.04.1  888  canonical  -
>> hello-world  6.3  27   canonical  -
>>
>> Thanks & best regards,
>> XiaoGuo
>>
>>
>> On Wed, Feb 8, 2017 at 5:35 AM, Andrew Mason <
>> and...@miniatureworldmaker.com.au> wrote:
>>
>>> Awesome, i am going to give this a try!
>>>
>>> On 8 February 2017 8:01:30 am ACDT, Manik Taneja <ma...@canonical.com>
>>> wrote:
>>>>
>>>>
>>>>
>>>> On Tue, Feb 7, 2017 at 12:36 PM, Mark Shuttleworth <m...@ubuntu.com>
>>>> wrote:
>>>>
>>>>> On 07/02/17 20:17, Thomas Voß wrote:
>>>>> > https://bugs.launchpad.net/ubuntu/+source/xorg-server-lts-xe
>>>>> nial/+bug/1655724
>>>>> > was released to the updates pocket today.
>>>>>
>>>>> Congrats! Quick feedback from folks with Trusty (14.04 LTS) systems,
>>>>> cloud or desktop, would be welcome. Pick a favorite snap and take it
>>>>> for
>>>>> a spin.
>>>>>
>>>> The experience is very clean now. I just tried on AWS and have
>>>> RocketChat up and
>>>> running-
>>>>
>>>> [image: Inline image 1]
>>>> Kudos to everyone involved in delivering this!
>>>>
>>>> Cheers,
>>>> Manik
>>>>
>>>
>>> --
>>> Sent from my mobile device.
>>>
>>> --
>>> Snapcraft mailing list
>>> Snapcraft@lists.snapcraft.io
>>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>>> an/listinfo/snapcraft
>>>
>>>
>>
>>
>> --
>> XiaoGuo, Liu
>>
>> --
>> Snapcraft mailing list
>> Snapcraft@lists.snapcraft.io
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>> an/listinfo/snapcraft
>>
>>
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>
>


-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: ubuntu-app-platform updated to Qt 5.6.2

2017-02-08 Thread XiaoGuo Liu
Hi James,

Thanks for your reply. Yeah, it could be reason for it. I used to have a Qt
project, and the app was launched by desktop-launch:

https://github.com/liu-xiao-guo/rssreader_platform

For my case, it is a html5 app. I do not know what is the correct way to
launch the app. Do you know what should be set up correctly? I may have my
own script to set them up.

Thanks & best regards,
XiaoGuo

On Thu, Feb 9, 2017 at 12:02 PM, James Henstridge <
james.henstri...@canonical.com> wrote:

> On 9 February 2017 at 10:43, XiaoGuo Liu <xiaoguo@canonical.com>
> wrote:
> > I am now trying to snap a html5 webapp. My source code is here at:
> >
> > https://github.com/liu-xiao-guo/wuziqi
>
> Looking at the snapcraft.yaml file, you don't seem to be using the
> launcher shell script provided by the part.  Without that,
> LD_LIBRARY_PATH and other environment variables won't be set up
> correctly to use libraries provided by ubuntu-app-platform.
>
> James.
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>



-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: ubuntu-app-platform updated to Qt 5.6.2

2017-02-08 Thread XiaoGuo Liu
These days, I tried to make use of ubuntu-app-platform. I have upgraded the
snap to the latest version 34 from the edge channel. Still I get an error
like:

This application failed to start because it could not find or load the Qt
platform plugin "xcb"
in "".

Reinstalling the application may fix this problem.
Aborted (core dumped)

What could be the problem for it?

Thanks & best regards,
XiaoGuo

On Wed, Feb 8, 2017 at 11:54 PM, Florian Boucault <
florian.bouca...@canonical.com> wrote:

> Indeed, sorry about that. The latest version with no Qt bundled is
> released now.
>
> Florian
>
> Le mer. 8 févr. 2017 à 14:20, Timo Jyrinki <timo.jyri...@gmail.com> a
> écrit :
>
>> 2017-02-07 17:00 GMT+02:00 Florian Boucault <florian.boucault@canonical.
>> com>:
>> > I thought I fixed the terminal last week. At least the terminal
>> available on
>> > the edge channel now is working for me. Does it work for you?
>> > I made sure that the stage-packages only contain packages that are not
>> in
>> > ubuntu-app-platform and also used  build-attributes:
>> [no-system-libraries]
>>
>> It does not work if I upgrade to the edge version of
>> ubuntu-app-platform (and uninstall and reinstall ubuntu-terminal-app).
>>
>> So yes you fixed it, and I tested the fix but the fixed version needs
>> to be uploaded to the store by someone with rights. Maybe Bill?
>>
>> The current 33 version in the store still has the bundled Qt libraries
>> - see $ ls /snap/ubuntu-terminal-app/33/usr/lib/x86_64-linux-gnu/
>>
>> -Timo
>>
>> --
>> Snapcraft mailing list
>> Snapcraft@lists.snapcraft.io
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/
>> mailman/listinfo/snapcraft
>>
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>
>


-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Where to save stuff (in snap-agnostic way)

2017-02-07 Thread XiaoGuo Liu
Hi Jamie,

Thanks for your explanation. You are right. The directory name takes the
very first execution of the command. After that, when accessing the /tmp
directory, it uses the directory created earlier if it is running from
another command.

I have updated my example code at
https://github.com/liu-xiao-guo/helloworld-fifo

When I firstly run "hello.fifo", the directory name takes something
"like snap.1000_snap.hello.fifo_5BpMiB". When trying to write to it using
"hello.fifo1", the same directory is used.

When I firstly run "hello.fifo1", the directory name takes something
"snap.1000_snap.hello.fifo1_6MJX5m". When trying to write to it using
"hello.fifo", the same directory is used.

Thanks & best regards,
XiaoGuo


On Wed, Feb 8, 2017 at 12:21 AM, Jamie Strandboge <ja...@canonical.com>
wrote:

> On Tue, 2017-02-07 at 12:04 +0800, XiaoGuo Liu wrote:
> > Hi Jamie,
> >
> > For my sample app at https://github.com/liu-xiao-guo/helloworld-fifo, I
> > tried to use the /tmp file to create a file, and  finally I get a file on
> > my Desktop like:
> >
> > root@liuxg:/tmp/snap.1000_snap.hello.fifo_TovLTW/tmp# ls
> > anothefile
> >
> > It seems to me that the path is still related to the command name "fifo".
> > Does this conflict with your saying?
>
> It does not. That directory is what is bind mounted into mount namespace
> and
> that is remembered for subsequent invocations of that command or other
> commands
> from the same snap. Try it: create a snap with two commands, have one
> create a
> file in /tmp and another to read the same file in /tmp-- it will work and
> the
> temporary directory in the system's /tmp will be
> /tmp/snap.0_snap.$SNAP_NAME._... will have the
> file you
> created in it.
>
> --
> Jamie Strandboge     | http://www.canonical.com
>
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>
>


-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Where to save stuff (in snap-agnostic way)

2017-02-06 Thread XiaoGuo Liu
Hi Jamie,

For my sample app at https://github.com/liu-xiao-guo/helloworld-fifo, I
tried to use the /tmp file to create a file, and  finally I get a file on
my Desktop like:

root@liuxg:/tmp/snap.1000_snap.hello.fifo_TovLTW/tmp# ls
anothefile

It seems to me that the path is still related to the command name "fifo".
Does this conflict with your saying?

Currently, my snapd version on 16.04 desktop is:

liuxg@liuxg:~$ snap version
snap2.22.1
snapd   2.22.1
series  16
ubuntu  16.04

Thanks & best regards,
XiaoGuo



On Tue, Feb 7, 2017 at 1:21 AM, Jamie Strandboge <ja...@canonical.com>
wrote:

> On Sun, 2017-02-05 at 08:04 +0800, XiaoGuo Liu wrote:
> > Hi Oli,
> >
> > Does it mean all of the snaps have the same /tmp or each snap has its own
> > /tmp? I am a little bit confused about this.
> >
>
> You might be confused because the behavior changed. For a long time, each
> snap
> *command* had its own /tmp directory. That was changed late last year so
> that
> all commands with the same snap share the same /tmp directory such that
> each
> snap has its own /tmp directory.
>
> --
> Jamie Strandboge | http://www.canonical.com
>
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>
>


-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: HowTo: How to create a snap for a Python app with networking using snapcraft in Ubuntu 16.04

2017-02-06 Thread XiaoGuo Liu
Hi Simos,

Thanks! It is really nice to see the tutorial, and it is very detailed.

Best regards,
XiaoGuo

On Mon, Feb 6, 2017 at 5:56 PM, Simos Xenitellis <simos.li...@googlemail.com
> wrote:

> Hi All,
>
> I wrote an article about creating a snap for an existing Python
> program using the new snapcraft 2.26. Then, I uploaded to the Ubuntu
> Store.
>
> I am looking forward to receiving feedback :-)
>
> Link: https://blog.simos.info/how-to-create-a-snap-for-a-python-
> app-with-networking-using-snapcraft-in-ubuntu-16-04/
>
> Link to HN submission: https://news.ycombinator.com/item?id=13578034
>
> Simos
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>



-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Snap icon in the Ubuntu Store

2017-02-06 Thread XiaoGuo Liu
Hi Kyle,

Thanks for your reply. I cannot remember it exactly whether I set an icon
for it or not. But this is definitely a confusing part.

I think snapweb may have a bug for it since I change another picture in my
package, but it is not reflected at all after the new installation.

Best regards,
XiaoGuo

On Mon, Feb 6, 2017 at 1:42 PM, Kyle Fazzari <kyle.fazz...@canonical.com>
wrote:

> Any chance the snap in question has an icon set store side? I believe the
> one in the store takes precedence over the one in the snap itself.
>
> Kyle
>
> On Feb 5, 2017 4:47 PM, "XiaoGuo Liu" <xiaoguo@canonical.com> wrote:
>
>> I just found another problem with snapweb. If I change the icon to
>> another picture in the snapcraft.yaml file, after new installation, the
>> package icon in the snapweb is not updated, and the old one is still used.
>> Is this a bug?
>>
>> Thanks & best regards,
>> XiaoGuo
>>
>> On Mon, Feb 6, 2017 at 8:15 AM, XiaoGuo Liu <xiaoguo@canonical.com>
>> wrote:
>>
>>> Hi,
>>>
>>> I am a little confused about the snap icon in the store. According to
>>> the document at:
>>>
>>> https://snapcraft.io/docs/build-snaps/metadata
>>>
>>> A package icon is defined by the "icon" field in the snapcraft.yaml.
>>> However, my own project at:
>>>
>>> https://github.com/liu-xiao-guo/ss-qt
>>>
>>> does not have the "icon" field, and it can be found at:
>>>
>>> https://uappexplorer.com/app/ss-qt.xiaoguo
>>>
>>> However, after installation on my desktop, in the snapweb, it does show
>>> an snap icon for it. Why is it like this? For some of the apps, if I do not
>>> have the icon field defined, it does not show the snap icon in the snapweb
>>> at all.
>>>
>>> Attached please find the picture for it.
>>>
>>> Thanks & best regards,
>>> XiaoGuo
>>>
>>>
>>> --
>>> XiaoGuo, Liu
>>>
>>
>>
>>
>> --
>> XiaoGuo, Liu
>>
>> --
>> Snapcraft mailing list
>> Snapcraft@lists.snapcraft.io
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>> an/listinfo/snapcraft
>>
>>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>
>


-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Snap icon in the Ubuntu Store

2017-02-05 Thread XiaoGuo Liu
I just found another problem with snapweb. If I change the icon to another
picture in the snapcraft.yaml file, after new installation, the package
icon in the snapweb is not updated, and the old one is still used. Is this
a bug?

Thanks & best regards,
XiaoGuo

On Mon, Feb 6, 2017 at 8:15 AM, XiaoGuo Liu <xiaoguo@canonical.com>
wrote:

> Hi,
>
> I am a little confused about the snap icon in the store. According to the
> document at:
>
> https://snapcraft.io/docs/build-snaps/metadata
>
> A package icon is defined by the "icon" field in the snapcraft.yaml.
> However, my own project at:
>
> https://github.com/liu-xiao-guo/ss-qt
>
> does not have the "icon" field, and it can be found at:
>
> https://uappexplorer.com/app/ss-qt.xiaoguo
>
> However, after installation on my desktop, in the snapweb, it does show an
> snap icon for it. Why is it like this? For some of the apps, if I do not
> have the icon field defined, it does not show the snap icon in the snapweb
> at all.
>
> Attached please find the picture for it.
>
> Thanks & best regards,
> XiaoGuo
>
>
> --
> XiaoGuo, Liu
>



-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Where to save stuff (in snap-agnostic way)

2017-02-04 Thread XiaoGuo Liu
Sorry,

I just found that each snap has its own "tmp" directory created in the /tmp
directory of the system. I just created a file, and it looks like:

root@liuxg:/tmp/snap.1000_snap.hello.fifo_TovLTW/tmp# ls
anothefile

Thanks & best regards,
XiaoGuo

On Sun, Feb 5, 2017 at 8:04 AM, XiaoGuo Liu <xiaoguo@canonical.com>
wrote:

> Hi Oli,
>
> Does it mean all of the snaps have the same /tmp or each snap has its own
> /tmp? I am a little bit confused about this.
>
> Thanks & best regards,
> XiaoGuo
>
>
>
> On Sat, Feb 4, 2017 at 6:43 PM, Oliver Grawert <o...@ubuntu.com> wrote:
>
>> hi,
>> Am Freitag, den 03.02.2017, 21:04 +0100 schrieb Luca Dionisi:
>> > What is the best place to write (and read) a temporary FIFO file from
>> > a confined snap application?
>> > This is for simple IPC between 2 processes of the same snap.
>> > Before attempting to snap the application I was using a fixed
>> > filename
>> > in /tmp. Admittedly poor solution.
>> > The solution should be usable also with another packaging system.
>> >
>> well ... in case of snaps /tmp is a private directory that only your
>> snap can access so it is actually a good place for such stuff ...
>>
>> ... that said ... if you want to use it in other packaging systems
>> where this is not the case it might indeed not be the best choice and
>> using XDG_RUNTIME_DIR might be the better way, as others pointed out.
>>
>> ciao
>>     oli
>> --
>> Snapcraft mailing list
>> Snapcraft@lists.snapcraft.io
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>> an/listinfo/snapcraft
>>
>>
>
>
> --
> XiaoGuo, Liu
>



-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Where to save stuff (in snap-agnostic way)

2017-02-04 Thread XiaoGuo Liu
Hi Oli,

Does it mean all of the snaps have the same /tmp or each snap has its own
/tmp? I am a little bit confused about this.

Thanks & best regards,
XiaoGuo



On Sat, Feb 4, 2017 at 6:43 PM, Oliver Grawert <o...@ubuntu.com> wrote:

> hi,
> Am Freitag, den 03.02.2017, 21:04 +0100 schrieb Luca Dionisi:
> > What is the best place to write (and read) a temporary FIFO file from
> > a confined snap application?
> > This is for simple IPC between 2 processes of the same snap.
> > Before attempting to snap the application I was using a fixed
> > filename
> > in /tmp. Admittedly poor solution.
> > The solution should be usable also with another packaging system.
> >
> well ... in case of snaps /tmp is a private directory that only your
> snap can access so it is actually a good place for such stuff ...
>
> ... that said ... if you want to use it in other packaging systems
> where this is not the case it might indeed not be the best choice and
> using XDG_RUNTIME_DIR might be the better way, as others pointed out.
>
> ciao
> oli
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>
>


-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Where to save stuff (in snap-agnostic way)

2017-02-03 Thread XiaoGuo Liu
Hi Seth,

Thanks. You are right. I just created a new dir under the root, and I tried
to access it, and it was successful this time.

liuxg@liuxg:~/snappy/desktop$ sudo snap run --shell hello.env
[sudo] password for liuxg:
root@liuxg:/home/liuxg/snappy/desktop# cd /run/user/0/snap.hello
root@liuxg:/run/user/0/snap.hello# ls

Many thanks
Best regards,
XiaoGuo

On Sat, Feb 4, 2017 at 10:40 AM, Seth Arnold <seth.arn...@canonical.com>
wrote:

> On Sat, Feb 04, 2017 at 10:33:20AM +0800, XiaoGuo Liu wrote:
> > liuxg@liuxg:~/snappy/desktop/ss$ hello.env | grep XDG_RUNTIME
> > XDG_RUNTIME_DIR=/run/user/1000/snap.hello
> > $ sudo snap run --shell hello.env
> > # env | grep XDG_RUNTIME_DIR
> > XDG_RUNTIME_DIR=/run/user/0/snap.hello
>
> Your first command was run as a standard user, probably the first user
> installed on the system, since it is user 1000.
>
> Your second command was run as root via the sudo tool, thus you get a
> different directory. Every user's data should be stored in a place where
> it won't collide with other users, and root is no different in this case.
>
> Thanks
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>
>


-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Where to save stuff (in snap-agnostic way)

2017-02-03 Thread XiaoGuo Liu
Hi,

I just tried it with my helloworld snap example. It shows:

liuxg@liuxg:~/snappy/desktop/ss$ hello.env | grep XDG_RUNTIME
XDG_RUNTIME_DIR=/run/user/1000/snap.hello

When I tried to run it with:

$ sudo snap run --shell hello.env

Inside the shell, I find different variable for XDG_RUNTIME_DIR:

# env | grep XDG_RUNTIME_DIR
XDG_RUNTIME_DIR=/run/user/0/snap.hello

I tried to create the above named dir /run/user/1000/snap.hello, but it is
not accessible in the  shell

Thanks.



On Sat, Feb 4, 2017 at 5:41 AM, Michael Hall <mhall...@ubuntu.com> wrote:

> Be sure to use XDG_RUNTIME_DIR and not '/var/run' specifically, as
> XDG_RUNTIME_DIR is /run/user//snap./ in a snap's
> runtime. You may also need to create that directory before using it.
>
> Michael Hall
> mhall...@ubuntu.com
>
> On 02/03/2017 04:19 PM, Christian Dywan wrote:
> > Hey Luca,
> >
> > I'll suggest XDG_RUNTIME_DIR i.e. /var/run
> >
> > Regards,
> > Cris
> >
> > Am 3. Februar 2017 21:04:19 MEZ schrieb Luca Dionisi
> > <luca.dion...@gmail.com>:
> >
> > What is the best place to write (and read) a temporary FIFO file from
> > a confined snap application?
> > This is for simple IPC between 2 processes of the same snap.
> > Before attempting to snap the application I was using a fixed
> filename
> > in /tmp. Admittedly poor solution.
> > The solution should be usable also with another packaging system.
> >
> > --Luca
> >
> > P.S. the problem with Vala library has been solved and I was able to
> > make the snap work in devmode. Now I am trying to move from devmode
> to
> > strict.
> >
> >
> > --
> > Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail
> > gesendet.
> >
> >
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
> an/listinfo/snapcraft
>



-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Snapcraft 2.25 has been released.

2017-01-23 Thread XiaoGuo Liu
Hi Olivier,

Sorry, I do not understand what exactly you mean "no app in the snap is
named like
the snap itself". Could you please elaborate it more?

Thanks & best regards,
XiaoGuo

On Mon, Jan 23, 2017 at 9:50 PM, Olivier Tilloy <
olivier.til...@canonical.com> wrote:

> Hi XiaoGuo,
>
> Your example happens to work because no app in the snap is named like
> the snap itself. For such snaps, using the new desktop feature should
> be safe.
>
> Cheers,
>
>  Olivier
>
>
> On Mon, Jan 23, 2017 at 3:48 AM, XiaoGuo Liu <xiaoguo@canonical.com>
> wrote:
> > Hi Olivier,
> >
> > Based on the snapcraft release 2.25, I have made an example at:
> >
> > https://github.com/liu-xiao-guo/helloworld-desktop
> >
> > So, far, I do not have any problems with it. Is there anything I am doing
> > wrongly? I can see the launchers in the Ubuntu dash without any problems
> and
> > the apps are launched well.
> >
> > By the way, I have created a blog for it at
> > http://blog.csdn.net/ubuntutouch/article/details/54691673. It has the
> > captured pictures.
> >
> > Thanks & best regards,
> > XiaoGuo
> >
> > On Sat, Jan 21, 2017 at 12:09 AM, Olivier Tilloy
> > <olivier.til...@canonical.com> wrote:
> >>
> >> On Thu, Jan 19, 2017 at 3:47 AM, Sergio Schvezov <sergius...@gmail.com>
> >> wrote:
> >> > Hello snapcrafters!
> >> >
> >> > We are pleased to announce the release of version `2.25` of snapcraft
> >> > has been released:
> >> > https://launchpad.net/snapcraft/+milestone/2.25
> >> >
> >> > This release is now available on xenial-updates, yakkety-updates and
> >> > zesty.
> >> > What follows are the full release notes (the prettier version can be
> >> > read at https://github.com/snapcore/snapcraft/releases/tag/2.25)
> >> >
> >> > # New in this release
> >> >
> >> > ## Support for hooks
> >> > Hooks support has arrived. There are currently two ways to use them,
> >> > either with a by-convention path or by using a `part` and installing
> into an
> >> > expected path in the part's install directory.
> >> >
> >> > Find out more about this feature at
> >> > https://github.com/snapcore/snapcraft/blob/master/docs/hooks.md
> >> >
> >> > ## Desktop file support
> >> > Aside from the by-convention functionality already in place, you can
> now
> >> > declare a desktop file from your app within an `apps` entry using a
> path
> >> > relative to the `prime` directory pointing to a desktop file,
> snapcraft will
> >> > take care of the rest.
> >>
> >> I would not recommend starting to use that new feature because of
> >> https://launchpad.net/bugs/1658123. This will hopefully be usable in
> >> time for 2.26.
> >>
> >>
> >> > So if your project already has a desktop file, say in
> >> > `./prime/usr/share/applications/my-app.desktop` all you need to do is
> >> > something like this:
> >> >
> >> > ```yaml
> >> > apps:
> >> > my-app:
> >> > command: my-app
> >> > desktop: usr/share/applications/my-app.desktop
> >> > ```
> >> >
> >> > That said, it is worth mentioning that the by-convention mechanism is
> >> > still supported.
> >> >
> >> > ## rust plugin
> >> > The `rust` plugin has seen an improvement and a couple of bug fixes.
> >> >
> >> > The added feature allow for one to set `rust-features` which is a list
> >> > of strings used to build optional dependencies (run `snapcraft help
> rust`
> >> > for a bit more details).
> >> >
> >> > The bug fixes relate to:
> >> >
> >> > - Allowing to build with `Cargo.toml` not in the base source
> directory.
> >> > - Repecting the other `rust` plugin properties: `rust-channel` and
> >> > `rust-revision`.
> >> >
> >> > ## nodejs plugin
> >> > The plugin now correctly downloads dependencies in `package.json` to
> the
> >> > correct location.
> >> >
> >> > ## godeps plugin
> >> > This plugin is now no longer affected by `GOBIN` being set in the
> >> > environment.
> >> >
> >> > ## deb sources
> >> > `deb` sources are now being handled

Re: Snapcraft 2.25 has been released.

2017-01-19 Thread XiaoGuo Liu
Hi,

For the desktop, can each of the app have its own icon? If yes, how can we
define the icons for each of them?

Thanks & best regards,
XiaoGuo

On Thu, Jan 19, 2017 at 10:47 AM, Sergio Schvezov <sergius...@gmail.com>
wrote:

> Hello snapcrafters!
>
> We are pleased to announce the release of version `2.25` of snapcraft has
> been released:
> https://launchpad.net/snapcraft/+milestone/2.25
>
> This release is now available on xenial-updates, yakkety-updates and zesty.
> What follows are the full release notes (the prettier version can be read
> at https://github.com/snapcore/snapcraft/releases/tag/2.25)
>
> # New in this release
>
> ## Support for hooks
> Hooks support has arrived. There are currently two ways to use them,
> either with a by-convention path or by using a `part` and installing into
> an expected path in the part's install directory.
>
> Find out more about this feature at https://github.com/snapcore/
> snapcraft/blob/master/docs/hooks.md
>
> ## Desktop file support
> Aside from the by-convention functionality already in place, you can now
> declare a desktop file from your app within an `apps` entry using a path
> relative to the `prime` directory pointing to a desktop file, snapcraft
> will take care of the rest. So if your project already has a desktop file,
> say in `./prime/usr/share/applications/my-app.desktop` all you need to do
> is something like this:
>
> ```yaml
> apps:
> my-app:
> command: my-app
> desktop: usr/share/applications/my-app.desktop
> ```
>
> That said, it is worth mentioning that the by-convention mechanism is
> still supported.
>
> ## rust plugin
> The `rust` plugin has seen an improvement and a couple of bug fixes.
>
> The added feature allow for one to set `rust-features` which is a list of
> strings used to build optional dependencies (run `snapcraft help rust` for
> a bit more details).
>
> The bug fixes relate to:
>
> - Allowing to build with `Cargo.toml` not in the base source directory.
> - Repecting the other `rust` plugin properties: `rust-channel` and
> `rust-revision`.
>
> ## nodejs plugin
> The plugin now correctly downloads dependencies in `package.json` to the
> correct location.
>
> ## godeps plugin
> This plugin is now no longer affected by `GOBIN` being set in the
> environment.
>
> ## deb sources
> `deb` sources are now being handled with `python-debian` which does
> incorrecly handle symlinks.
>
> ## More modes for daemon's in apps
> You can now set the `daemon` property in an `apps` entry to `notify` (and
> it will follow systemd's expected behavior for this service type).
>
> ## Deprecations
> Some new deprecations have been introduced, for `parts` the `prime`
> keyword is now favored over the `snap` one. When using the `snap` keyword a
> link to http://snapcraft.io/docs/deprecation-notices/dn1 will be
> presented with more information and the migration path.
>
> Plugins that are part of snapcraft that were displaying `DEPRECATED`
> notices have all been updated to use the newer plugin API.
>
> ## Classic confinement
> Some improvements were made to classic confinement with a more
> comprehensive error when the prerequisites to build a classic confined snap
> are not met.
>
> ## parts
> Improvements were made to the core parts management of snapcraft:
>
> - `stage` entries now don't need to be replicated in `prime`.
> - cleaning all parts works correctly even if `snapcraft.yaml` is broken.
>
> ## Others
> For the full list of things available on 2.25 feel free to check
> https://launchpad.net/snapcraft/+milestone/2.25
>
> # Contributions
> This release has seen some contributions from outside of the snapcraft
> core team, so we want to give a shout out to these folks, here's a team
> thank you for:
>
> - Chris Holcombe
> - Jonathon Love
> - Kit Randel
> - Marco Trevisan
> - Matthew Aguirre
> - Olivier Tilloy
>
> # Final Notes
> To get the source for this release check it out at
> https://github.com/snapcore/snapcraft/releases/tag/2.25
>
> A great place to collaborate and discuss features, bugs and ideas on
> snapcraft is snapcraft@lists.snapcraft.io mailing list or on the snapcraft
> channel on Rocket Chat https://rocket.ubuntu.com/channel/snapcraft
>
> To file bugs, please go to https://bugs.launchpad.net/snapcraft/+filebug.
>
> Happy snapcrafting!
> -- Sergio and the team
>
> --
> Sent using Dekko from my Ubuntu device
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>



-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Which snap interface allows accessing /dev/rfkill?

2017-01-19 Thread XiaoGuo Liu
I think it would be good to let "snappy-debug" snap output what are the
needed plugs. Sometimes, the utility does  not give us hints. Is there any
way to improve the app? It is even easier than looking for some info on the
website.

https://github.com/snapcore/snapd/wiki/Security

Thanks &  best regards,
xiaoguo

On Fri, Jan 20, 2017 at 5:48 AM, Oliver Ries <oliver.r...@canonical.com>
wrote:

> On Thu, Jan 19, 2017 at 8:54 AM, Sergio Schvezov <
> sergio.schve...@canonical.com> wrote:
>
>> On Thu, 19 Jan 2017 07:58:53 -0700, Oliver Ries wrote:
>> > On Thu, Jan 19, 2017 at 2:49 AM, Jamie Bennett <
>> jamie.benn...@canonical.com>
>> > wrote:
>> >
>> >> Hi Tonny,
>> >>
>> >> A quick grep of the snapd source code shows that /dev/rfkill is part of
>> >> the network-control and network-manager interfaces.
>> >>
>> >
>> > this method (grep the code) has been a repeated answer in the last few
>> > days, do we have any way of publishing this as part of our
>> documentation?
>>
>> It was one of the feedback items from James last week:
>>
>> - all interfaces described.
>> - extended information on what the interface provides (apparmor rules and
>> seccomp) for easier debugging or figuring out what you need. These don't
>> need to be in your face
>
>
> what does this mean specifically?
> Olli
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>
>


-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Snap portability between different boards?

2017-01-05 Thread XiaoGuo Liu
I think it should as long as they both have the same architecture (32bit or
64bit). If the app use any specific hardware, we need to make sure it
exists on both platform, for example camera.

On Fri, Jan 6, 2017 at 2:39 AM, Dan Kegel <d...@kegel.com> wrote:

> Hi all,
> can snaps built on the pi run on the artik, and vice versa?
> A compatibility matrix might be handy.
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>



-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Issues generating snap

2017-01-04 Thread XiaoGuo Liu
Hi Gareth,

I would recommend looking at the example project at
https://github.com/snapcore/snapcraft/tree/master/demos/py3-project. It is
a working example for your reference.

Best regards,
XiaoGuo

On Wed, Jan 4, 2017 at 9:57 PM, <gareth.fra...@cliftonts.co.uk> wrote:

>
> You're welcome, it takes a big community to make Ubuntu happen. I hope
>> that you find snaps have just as big an impact :) It would be wonderful
>> if we can really improve the flow of bits from upstreams to users, or
>> even just make it easier for people to manage private apps that they are
>> pushing around on their networks.
>>
>> Mark
>>
>
> Actually I developed a niche application for use on desktop, a product
> only really available on Windows. I packaged it over and over for deb but
> it seems impossible to do. I then paid for someone to package it and a year
> on I'm still waiting for the approval process in the developer portal to
> finish, but there doesn't seem to be anyone to approach about this.
>
> So I have been trying to package in deb format for at least 2 years. I
> built a snap in a night. Ok it didn't work but you have now told me why. I
> get the feeling I'm going to get along with your vision just fine. Expect
> to see a desktop remote control for roku and now TV boxes and PAT testing
> software appearing in the software store soon.
>
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
> an/listinfo/snapcraft
>



-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Issues generating snap

2017-01-04 Thread XiaoGuo Liu
Hi Gareth,

Please see my comments below. I am sorry that some places might not be so
clear to you. You can use google-translate to translate it.

Best regards,
XiaoGuo

On Wed, Jan 4, 2017 at 1:33 PM, Gareth France <gareth.fra...@cliftonts.co.uk
> wrote:

>
>
> On 04/01/17 04:13, XiaoGuo Liu wrote:
>
> Hi Gareth,
>
> Based on sergio's scripts at http://paste.ubuntu.com/23733207/ , I have
> created a tutorial for it. Hopefully, it is useful to you. You may find it
> at:
>
> http://blog.csdn.net/ubuntutouch/article/details/54017425
>
> Best regards,
> XiaoGuo
>
>
> That is wonderful, thank you. However I have encountered several issues.
> First your tutorial is in Chinese, second it is not clear how you are
> naming your container (the command to create it simply refers to it as
> yakkety but the responses to that command state creating and starting
> flying-snake).
>

The name "flying-snake" is automatically chosen during the process. For
your case, it could be a different name. You have to replace it with your
own container name.


>
> When adding a user mine simply returns to the command prompt it does not
> add user,
>

You probably need to use your own container name instead of the one
"flying-snake" in my blog. You may try it again.


> group, home directory, request a password etc. Adding admin privilages
> same issue. Then you tell me to add something at the end of 'the file' but
> you have not said which file or how I should be accessing it.
>

$ lxc exec flying-snake -- visudo  -- it will invoke an editor for editing
some stuff there.

>
>

> I decided to stop here as I doubt very much this is working at my end.
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>
>


-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Issues generating snap

2017-01-03 Thread XiaoGuo Liu
Hi Gareth,

Based on sergio's scripts at http://paste.ubuntu.com/23733207/ , I have
created a tutorial for it. Hopefully, it is useful to you. You may find it
at:

http://blog.csdn.net/ubuntutouch/article/details/54017425

Best regards,
XiaoGuo

On Wed, Jan 4, 2017 at 4:49 AM, Gareth France <gareth.fra...@cliftonts.co.uk
> wrote:

>
>
> On 03/01/17 20:33, Sergio Schvezov wrote:
>
>> Can you install lxd and create a yakkety container as I did in the paste
>> and try from there?
>>
>
> Installed, but sorry, how do I do that?
>
>
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
> an/listinfo/snapcraft
>



-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Tutorial: how to give apps alias name?

2016-12-22 Thread XiaoGuo Liu
Hi,

I just created a blog on how to give apps alias name in snap packages. You
need to have snap 2.20 and snapcraft 2.24 to support it. The tutorial can
be found at:

http://blog.csdn.net/ubuntutouch/article/details/53839566

Thanks & best regards,
XiaoGuo

-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: content sharing from $SNAP_COMMON

2016-12-21 Thread XiaoGuo Liu
Hi,

If I want to define "executables" and "writable-data" for the same snap
application, what should be the correct way of writing the snapcraft yaml?

Currently, according to the document at
https://github.com/snapcore/snapd/wiki/Content-Interface

slots:
  content:
content: writable-data
write:
  - $SNAP_DATA

There are two "content" there, and it confuses the developers. Which one is
customizable?

Thanks & best regards,
XiaoGuo

On Thu, Dec 22, 2016 at 2:25 AM, Jacek Nykis <jacek.ny...@canonical.com>
wrote:

> On 21/12/16 17:43, Jacek Nykis wrote:
> > On 21/12/16 17:22, Pat McGowan wrote:
> >> The documentation on sharing writable data was updated last week,
> notably
> >> saying this works in version 2.19.1 and later. There is also a
> >> recommendation to not use subfolders. 2.20.1 is available from xenial
> >> proposed.
> >>
> >> https://github.com/snapcore/snapd/wiki/Content-Interface
> >>
> >> Hope it helps
> >> Pat
> >
> > Thanks for suggestion Pat.
> >
> > I saw that page but I am trying to share read only data. It does not
> > work in 2.17, I also tried with 2.20.1 without luck.
> >
> > I am trying to share single directory containing one file.
> >
> > Regards,
> > Jacek
>
> Thank you everybody for help, especially zyga on rocketchat!
>
> He was able to clarify things for me and provider workaround. I added
> info to the bug in case others hit this problem:
> https://bugs.launchpad.net/snappy/+bug/1650671/comments/2
>
> Regards,
> Jacek
>
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>
>


-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Dashboard service to view deployed snaps/versions on fleet of devices running Ubuntu Core

2016-12-21 Thread XiaoGuo Liu
You may find more reading in my blog at
http://blog.csdn.net/ubuntutouch/article/details/52980068

On Wed, Dec 21, 2016 at 5:48 PM, XiaoGuo Liu <xiaoguo@canonical.com>
wrote:

> Firstly, you log into your ubuntu core device, and use the following
> command to install snapweb:
>
> $ sudo snap install snapweb
>
> Then on your desktop browser, just open the address like:
> ubuntu-core-device-ip:4200. On the browser, you will see the installed apps
> and also you can install some new apps there.
>
> Best regards,
> XiaoGuo
>
> On Wed, Dec 21, 2016 at 5:38 PM, Luther Goh Lu Feng <elf...@yahoo.com>
> wrote:
>
>> I am interested to know if there are any online management dashboards for
>> Ubuntu Core device management. Thanks.
>>
>> -- Luther
>>
>> --
>> Snapcraft mailing list
>> Snapcraft@lists.snapcraft.io
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>> an/listinfo/snapcraft
>>
>
>
>
> --
> XiaoGuo, Liu
>



-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: mysqltuner on a snap install

2016-12-15 Thread XiaoGuo Liu
Hi,

Some time ago, I created a tomcat/mysql/jsp web application. The sample
snap app can be found at:

https://github.com/liu-xiao-guo/tomcat-maven-webapp

I created a blog for at
http://blog.csdn.net/ubuntutouch/article/details/52217173

Hopefully, the example code is useful to you!

Best regards,
XiaoGuo

On Thu, Dec 15, 2016 at 7:40 PM, Tiago Carrondo <tcarro...@ubuntu.com>
wrote:

> Hi, all
>
> I have a question/problem:
>
> I have installed the nexcloud snap and I want to use de mysqltuner to
> fine tune his mysql server but if I "apt install" mysqltuner is going to
> run on the global mysq server of the  machine but not on the server
> inside the snap.
>
> How can I solve this?
>
> Thanks in advance
>
> --
> Melhores cumprimentos/Regards
>
> Tiago Carrondo
> consultor | formador | sysadmin
> https://carrondo.net
> https://launchpad.net/~tcarrondo
> https://wiki.ubuntu.com/tcarrondo
>
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>



-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Cannot install snap apps from store

2016-12-10 Thread XiaoGuo Liu
Hi Madper,

Thanks for your reply. Yeah, it has been confirmed in the bug report at
https://bugs.launchpad.net/snappy/+bug/1639981. It happens in other regions
as well.

Best regards,
XiaoGuo

On Fri, Dec 9, 2016 at 8:29 PM, Madper Xie <madper@canonical.com> wrote:

> Hi Xiaoguo,
>
> I do believe that you have a good proxy. So just try to use your proxy
> when you reproduce the timeout issue again. So that we can know if Mainland
> China is the only affected area.
>
>
>- sudo systemctl edit snapd; #adding following configure:
>
> [Service]
> Environment=http_proxy=http://host:port
>
>- sudo systemctl restart snapd
>- If you do only have a socks proxy you can use polipoc as a bridge.
>Which will accept http input and redirect it to a socks interface.
>- Put following configuration into /etc/polipo/config
>
> `
>
> logSyslog = true
> logFile = /var/log/polipo/polipo.log
> proxyAddress = "0.0.0.0"
> proxyPort = 8118
> socksParentProxy = "127.0.0.1:1080" # please modify this line as
> needed.
> socksProxyType = socks5
> ```
>
> On Fri, Dec 9, 2016 at 7:46 PM, Shuduo Sang <shuduo.s...@canonical.com>
> wrote:
>
>> Not sure if there are CDN deployed in China to accelerate Ubuntu Core
>> store. If there are, the issue need be resolved by CDN vendor. If there are
>> not, please help to deploy some. Network issue really make Chinese
>> developer and Ubuntu Core taster frustrated.
>>
>> On Fri, Dec 9, 2016 at 3:54 PM, XiaoGuo Liu <xiaoguo@canonical.com>
>> wrote:
>>
>>> Yes, at one time, it was consistent that it did not work at all no
>>> matter how many times I tried, and it was quite embarrassing during a
>>> training session. I thought it was network problem. After some time, it
>>> became OK.
>>>
>>> On Fri, Dec 9, 2016 at 3:46 PM, Manik Taneja <manik.tan...@canonical.com
>>> > wrote:
>>>
>>>>
>>>>
>>>> On Dec 8, 2016, at 11:13 PM, Michael Nelson <
>>>> michael.nel...@canonical.com> wrote:
>>>>
>>>> On Fri, Dec 9, 2016 at 5:39 PM Manik Taneja <manik.tan...@canonical.com>
>>>> wrote:
>>>>
>>>>> On Dec 8, 2016, at 8:21 PM, Oliver Ries <oliver.r...@canonical.com>
>>>>> wrote:
>>>>>
>>>>> Hi
>>>>>
>>>>> On Thu, Dec 8, 2016 at 6:31 PM, XiaoGuo Liu <xiaoguo@canonical.com
>>>>> > wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I do not know how many of you have met the issue. When I try to
>>>>> install an app from the store, it comes me an error like:
>>>>>
>>>>> liuxg@ubuntu:~$ sudo snap install tensorflow-demo --devmode --beta
>>>>> error: cannot install "tensorflow-demo": Get
>>>>> https://search.apps.ubuntu.com/api/v1/snaps/details/tensorfl
>>>>> ow-demo?channel=beta: net/http: request canceled while waiting for
>>>>> connection (Client.Timeout exceeded while awaiting headers)
>>>>> liuxg@ubuntu:~$ sudo snap install tensorflow-demo --devmode --beta
>>>>> error: cannot install "tensorflow-demo": Get
>>>>> https://search.apps.ubuntu.com/api/v1/snaps/details/tensorfl
>>>>> ow-demo?channel=beta: net/http: request canceled while waiting for
>>>>> connection (Client.Timeout exceeded while awaiting headers)
>>>>>
>>>>> This has been usually because of CDN issues afaik. The store team
>>>>> should able to confirm shortly.
>>>>>
>>>>
>>>> In this case, it's an issue just with the initial connection from the
>>>> client to search.apps.ubuntu.com, before following any CDN url to
>>>> download the snap. I also tried to reproduce around 40mins after XiaoGuo
>>>> and couldn't.
>>>>
>>>> After trying to reproduce, I checked the apache logs for
>>>> search.apps.ubuntu.com and saw that during that time it only ever saw
>>>> requests which resulted in 200 replies:
>>>>
>>>> http://paste.ubuntu.com/23602216/
>>>>
>>>> There were no relevant errors in the error log that I could see, nor
>>>> does our monitoring show any high load at the time, so unless apache isn't
>>>> logging timeouts, I suspect the requests weren't getting through to
>>>> search.apps.ubuntu.com for some network-related reason, but I'm keen
>>>> 

Cannot install snap apps from store

2016-12-08 Thread XiaoGuo Liu
Hi,

I do not know how many of you have met the issue. When I try to install an
app from the store, it comes me an error like:

liuxg@ubuntu:~$ sudo snap install tensorflow-demo --devmode --beta
error: cannot install "tensorflow-demo": Get
https://search.apps.ubuntu.com/api/v1/snaps/details/tensorflow-demo?channel=beta:
net/http: request canceled while waiting for connection (Client.Timeout
exceeded while awaiting headers)
liuxg@ubuntu:~$ sudo snap install tensorflow-demo --devmode --beta
error: cannot install "tensorflow-demo": Get
https://search.apps.ubuntu.com/api/v1/snaps/details/tensorflow-demo?channel=beta:
net/http: request canceled while waiting for connection (Client.Timeout
exceeded while awaiting headers)

In fact, I have met this this problem a number of times, and sometimes it
works fine. Also, my colleague said to me that he gets the same issue
sometimes. What is the root cause for this?

Thanks  & best regards,
XiaoGuo

-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Tutorial: How to make use of QEMU to build armhf/arm64 snap on Ubuntu desktop 16.04

2016-12-06 Thread XiaoGuo Liu
Hi Oliver,

Thanks! I will have a try with your solution.

Best regards,
XiaoGuo

On Tue, Dec 6, 2016 at 5:39 PM, Oliver Grawert <o...@ubuntu.com> wrote:

> hi,
> Am Dienstag, den 06.12.2016, 15:31 +0800 schrieb XiaoGuo Liu:
> >
> > Hi,
> >
> > Today, I made a tutorial on how to compile a armhf/arm64 snap on
> > Ubuntu Destkop 16.04 desktop. It could be useful to those people who
> > do not have a ARM board with you. The tutorial can be found at:
> >
> > http://blog.csdn.net/ubuntutouch/article/details/53482262
> >
> you can easily replace point 2 with:
>
> wget a tarball from http://cdimage.ubuntu.com/ubuntu-base/xenial/daily/
> current/ ... even downloading through a slow connection and untarring
> will likely be a lot faster than running your own debootstrap from
> scratch. the tarballs will also have the very recent updates installed
> from xenial-updates and xenial-security and are specifically designed
> as clean build chroots.
>
> note that you need to copy /etc/resolv.conf from the host to have
> working networking inside the chroot...
>
> ciao
> oli
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>
>


-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Tutorial: How to make use of QEMU to build armhf/arm64 snap on Ubuntu desktop 16.04

2016-12-05 Thread XiaoGuo Liu
Hi,

Today, I made a tutorial on how to compile a armhf/arm64 snap on Ubuntu
Destkop 16.04 desktop. It could be useful to those people who do not have a
ARM board with you. The tutorial can be found at:

http://blog.csdn.net/ubuntutouch/article/details/53482262

Thanks & best regards,
-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Snapping Ubuntu phone app using "ubuntu-app-platform"

2016-11-22 Thread XiaoGuo Liu
Hi all,

I just found that there was nothing wrong with my project. After some
troubleshooting, I finally found the root cause of the problem. The
ubuntu-app-platform
is based on Qt 5.6.1 version. However, the Qt version on my desktop is Qt
5.5.1

As suggested by the blog https://developer.ubuntu.com/en/blog/2016/11/16/
snapping-qt-apps/, we need to install the  stable-phone-overlay at
https://launchpad.net/~ci-train-ppa-service/+archive/
ubuntu/stable-phone-overlay/. We need to do "sudo apt upgrade" and "sudo
apt dist-upgrade" to make sure our Qt version is Qt 5.6.1. Then everything
will be fine.

Best regards,
XiaoGuo





On Wed, Nov 23, 2016 at 12:21 PM, XiaoGuo Liu <xiaoguo@canonical.com>
wrote:

> Hi,
>
> I just read a blog about snapping a Qt app at:
>
> https://developer.ubuntu.com/en/blog/2016/11/16/snapping-qt-apps/
>
> I followed the step, and I made my own project at:
>
> https://github.com/liu-xiao-guo/rssreader_platform
>
> The file size is dropped dramatically. However, there is a problem when
> launching the app:
>
> =
> "This application failed to start because it could not find or load the Qt
> platform plugin "xcb".
>
> Reinstalling the application may fix this problem.
> Aborted (core dumped)
> =
>
> I am not sure what is missing in my project.
>
> However, my sample app at https://github.com/liu-xiao-guo/rssreader_slim.
> It works fine, and it does not use "ubuntu-app-platform", which uses the
> content sharing.
>
> Can anyone help me?
>
> Thanks & best regards,
> XiaoGuo
>
>
> --
> XiaoGuo, Liu
>



-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: How to install Ubuntu core into virtualbox

2016-11-21 Thread XiaoGuo Liu
I am sorry that I forgot to put the link in my last email.

The correct link is at
http://blog.csdn.net/ubuntutouch/article/details/53285110

On Tue, Nov 22, 2016 at 2:46 PM, XiaoGuo Liu <xiaoguo@canonical.com>
wrote:

> Hi,
>
> Based on Kyle's blog at:
>
> https://kyrofa.com/posts/ubuntu-core-on-virtualbox
>
> I created a more detailed blog for installing Ubuntu Core 16 into
> virutalbox. Hopefully, it is useful to you!
>
> Thanks & best regards,
> XiaoGuo
>
> --
> XiaoGuo, Liu
>



-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


How to install Ubuntu core into virtualbox

2016-11-21 Thread XiaoGuo Liu
Hi,

Based on Kyle's blog at:

https://kyrofa.com/posts/ubuntu-core-on-virtualbox

I created a more detailed blog for installing Ubuntu Core 16 into
virutalbox. Hopefully, it is useful to you!

Thanks & best regards,
XiaoGuo

-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Tutorial: how to create a simple snapcraft custom plugin

2016-11-13 Thread XiaoGuo Liu
Hi,

I am sorry that I pasted the wrong link for the article. The correct one is:

http://blog.csdn.net/ubuntutouch/article/details/53157531

Best regards,
XiaoGuo

On Mon, Nov 14, 2016 at 2:57 PM, XiaoGuo Liu <xiaoguo@canonical.com>
wrote:

> Hi,
>
> Today, I created a very simple tutorial on how to create a snapcraft
> custom plugin. The link is at:
>
> http://blog.csdn.net/ubuntutouch/article/details/52981623
>
> Hopefully, it is useful to some of you!
>
> Best regards,
> XiaoGuo
>
> --
> XiaoGuo, Liu
>



-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Tutorial: how to create a simple snapcraft custom plugin

2016-11-13 Thread XiaoGuo Liu
Hi,

Today, I created a very simple tutorial on how to create a snapcraft custom
plugin. The link is at:

http://blog.csdn.net/ubuntutouch/article/details/52981623

Hopefully, it is useful to some of you!

Best regards,
XiaoGuo

-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Cliqz Snap

2016-11-12 Thread XiaoGuo Liu
Hi Chris,

You may find the tips at https://github.com/snapcore/snapd/wiki/Security.
You may use the command like:

$ scmp_sys_resolver 983045
set_tls

to find out the security violation.

Best regards,
XiaoGuo

On Sun, Nov 13, 2016 at 7:13 AM, Chris <cpoll...@embarqmail.com> wrote:

> Has anyone gotten this snap to run? The install went fine AFAICT but
> when executed nothing happens. Syslog shows
>
> Nov 12 17:00:55 localhost /usr/lib/snapd/snapd[844]: daemon.go:174:
> DEBUG: uid=1000;@ GET /v2/snaps 31.184976ms 200
>
> Nov 12 17:00:55 localhost kernel: [250160.993225] audit: type=1326
> audit(1478991655.666:65): auid=1000 uid=1000 gid=1000 ses=3 pid=10201
> comm="cliqz" exe="/snap/cliqz/6/opt/CLIQZ/CLIQZ" sig=31 arch=c03e
> syscall=272 compat=0 ip=0x7f5d82721c19 code=0x0
>
> When executed from the cli
>
> chris@localhost:~$ cliqz
> Bad system call
>
> --
> Chris
> KeyID 0xE372A7DA98E6705C
> 31.11972; -97.90167 (Elev. 1092 ft)
> 16:59:51 up 2 days, 21:28, 1 user, load average: 0.32, 0.37, 0.36
> Ubuntu 16.04.1 LTS, kernel 4.4.0-47-generic #68-Ubuntu SMP Wed Oct 26
> 19:39:52 UTC 2016
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>
>


-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Snapping Chrome browser

2016-11-07 Thread XiaoGuo Liu
Sorry, There is a typo in the last email. The installation instruction is:

$ sudo snap install --beta --devmode

:)

On Tue, Nov 8, 2016 at 10:02 AM, XiaoGuo Liu <xiaoguo@canonical.com>
wrote:

> Hi,
>
> After spending some effort, I finally made the Chrome browser snap working
> though it worked in "devmode". There is a small problem when I am trying to
> install it not using devmode.
>
> You can now install it like:
>
> $ sudo snap install --beta --devmoe
>
> The source code can be found at: https://github.com/liu-xiao-guo/mychrome
>
> I have created a blog at: http://blog.csdn.net/
> ubuntutouch/article/details/53078713
>
> Currently, it supports Chinese language and also Chinese input method.
>
> Thanks & best regards,
> XiaoGuo
>
> --
> XiaoGuo, Liu
>



-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Snapping Chrome browser

2016-11-07 Thread XiaoGuo Liu
Hi,

After spending some effort, I finally made the Chrome browser snap working
though it worked in "devmode". There is a small problem when I am trying to
install it not using devmode.

You can now install it like:

$ sudo snap install --beta --devmoe

The source code can be found at: https://github.com/liu-xiao-guo/mychrome

I have created a blog at:
http://blog.csdn.net/ubuntutouch/article/details/53078713

Currently, it supports Chinese language and also Chinese input method.

Thanks & best regards,
XiaoGuo

-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Project templates in snapcraft

2016-11-04 Thread XiaoGuo Liu
+1

I think it may apply to "nodejs", "python", "tomcat", "mysql", "php",
"java" etc.

Best regards,
XiaoGuo

On Sat, Nov 5, 2016 at 1:39 AM, Benjamin Zeller <
benjamin.zel...@canonical.com> wrote:

> Just a small proposal to have templates in snapcraft, that provide some
> sort of starting point for
> people without the need to read lots of tutorials, but get started with
> their project right away.
>
> My proposal would be to add a template engine in snapcraft, that generates
> predefined projects
> or at least a predefined snapcraft.yaml for a specific use case.
>
> Something like:
>
> snapcraft init --template=ubuntu-touch-app , which would bootstrap a
> simple snapcraft project
> targeting QML/Qt APIs.
>
> I think that could help people to get their apps snapped even faster.
>
> Cheers,
>
> Benjamin
>
>
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
> an/listinfo/snapcraft
>



-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Installing Ubuntu Core system

2016-11-04 Thread XiaoGuo Liu
Hi,

I have created a tutorial on how to install Ubuntu Core systems. It can be
found at http://blog.csdn.net/ubuntutouch/article/details/53036627.
Hopefully, it is useful to the developers.

Thanks & have a nice weekend!
-- 
XiaoGuo, Liu
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


How to assign a hardware in my snap application?

2016-08-24 Thread XiaoGuo Liu
Hi,

On Series 16, we need to use interface to make the connection between the
Ubuntu core and Snap apps in order to make use of the hardware. Previously,
on 15.04, I used the following command do get the hardware assignment:

(RaspberryPi2)ubuntu@localhost:~$ sudo snappy hw-assign piglow.sideload
/dev/i2c-1
'piglow.sideload' is now allowed to access '/dev/i2c-1'

Currently, I list all of the interfaces from raspberry pi snappy image, but
I do not find any interface which corresponds to my requirement.  Do I need
to wait for the interface? or I did it wrongly? What should be the right
interface to use in my case?

ubuntu@localhost:~/apps$ snap interfaces
SlotPlug
:bluetooth-control  -
:firewall-control   -
:fuse-support   -
:hardware-observe   -
:home   -
:kernel-module-control  -
:locale-control -
:log-observe-
:mount-observe  -
:networkpiglow-app,snapweb
:network-bind   piglow-app,snapweb,webcam-webui
:network-control-
:network-observe-
:opengl -
:ppp-
:process-control-
:snapd-control  snapweb
:system-observe -
:system-trace   -
:timeserver-control -
:timezone-control   -
:tpm-
-   webcam-webui:camera

Also, I find that the "camera" interface is missing in the current image.

Thanks & best regards,
XiaoGuo

-- 
XiaoGuo, Liu (刘晓国)
Mobile: +86-13911181302
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Does anyone know how to build snap for ARM architecture?

2016-08-24 Thread XiaoGuo Liu
Hi Loïc,

Thanks! Yes, I want to build it for Ubuntu core series 16. I will have a
try.

Best regards,
XiaoGuo

On Wed, Aug 24, 2016 at 2:40 PM, Loïc Minier <loic.min...@ubuntu.com> wrote:

> Hi,
>
> On Wed, Aug 24, 2016 at 7:34 AM, XiaoGuo Liu <xiaoguo@canonical.com>
> wrote:
>
>> I just now successfully used launchpad.net to build snaps for ARM
>> architecture. However, the precondition is that it works on my desktop
>> well. I am thinking whether there is an alternative way to compile snaps
>> for armhf in view of the fact that raspberry is now supporting the
>> architecture. I used to come with a docker solution to it for 15.04. Now
>> docker snap is not there any more. Can anyone tell me how to build for
>> armhf snaps?
>>
>
> Docker snap should be available for 15.04 in stable channel; it's only in
> the edge channel (and using devmode) for series 16 (install with snap
> install --devmode --edge docker). Please let me know if it's in any way
> broken or missing!
>
> Otherwise you can indeed use the classic environment, or a classic image
> as Simon mentioned.
>
> Cheers,
> - Loïc
>



-- 
XiaoGuo, Liu (刘晓国)
Mobile: +86-13911181302
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Does anyone know how to build snap for ARM architecture?

2016-08-24 Thread XiaoGuo Liu
Hi Simon,

Thanks a lot for your reply. On 15.04, I installed docker, and inside
docker, I installed a Ubuntu Server so that I can compile for armhf. A lot
of developers may not have the luxury to have two arm devices. I am
thinking your second option could be more realistic. I do not have a Ubuntu
Core device yet. So, the right command is:

$ snap install --devmode --edge classic

In this case, it enters to the classic ubuntu mode, rightt?

By the way, how to exit the mode? Previously, I saw some instructions like:

$ sudo snappy enable-classic
$ snappy shell classic
$ sudo snappy destroy-classic

I think they were for the 15.04 Ubuntu core.

Thanks & best regards,
XiaoGuo


On Wed, Aug 24, 2016 at 1:44 PM, Simon Fels <simon.f...@canonical.com>
wrote:

> On 24.08.2016 07:34, XiaoGuo Liu wrote:
> > Hi,
> >
> > I just now successfully used launchpad.net <http://launchpad.net> to
> > build snaps for ARM architecture. However, the precondition is that it
> > works on my desktop well. I am thinking whether there is an alternative
> > way to compile snaps for armhf in view of the fact that raspberry is now
> > supporting the architecture. I used to come with a docker solution to it
> > for 15.04. Now docker snap is not there any more. Can anyone tell me how
> > to build for armhf snaps?
>
> I've installed Ubuntu Server for that purpose on one of my pi2 machines
> and doing all builds there. The classic snap from the store (not sure
> how far that is, but installing with snap install --devmode --edge
> classic should work) would be another possible way to build on an arm
> device as it gives you a full apt-get'able system on an all-snap one.
>
> regards,
> Simon
>
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>



-- 
XiaoGuo, Liu (刘晓国)
Mobile: +86-13911181302
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: How to resolve same file conflicts from different parts when building a snap project?

2016-08-01 Thread XiaoGuo Liu
Hi Didier,

I think it should be the same issue as the one described there. By the way,
 my snapcraft version is:

liuxg@liuxg:~$ snapcraft --version
2.13.1

You can try my example at
https://github.com/liu-xiao-guo/rssreader_snap/blob/master/snapcraft.yaml.

You just need to take off the following line:


stage:
- -usr/share/pkgconfig/xkeyboard-config.pc

in order to duplicate the issue.


Best regards,
XiaoGuo

On Mon, Aug 1, 2016 at 2:14 PM, Didier Roche <didro...@ubuntu.com> wrote:

> Le 01/08/2016 à 04:37, XiaoGuo Liu a écrit :
>
> Hi,
>
> I finally solved the problem by adding:
>
> stage:
>   - -usr/share/pkgconfig/xkeyboard-config.pc
>
> in one of the parts to avoid the conflicts (the same file from different
> parts with the same installation path).
>
>
> Hey,
>
> I think you are getting https://bugs.launchpad.net/snapcraft/+bug/1604472,
> which was supposed to be fixed already in 2.13. Which version of snapcraft
> is it running?
>
> Sergio, do you mind confirming (he's the second to mention it)?
>
> Cheers,
> Didier
>
>
> Best regards,
> XiaoGuo
>
> On Mon, Aug 1, 2016 at 9:54 AM, XiaoGuo Liu <xiaoguo@canonical.com>
> wrote:
>
>> Hi,
>>
>> Recently, I tried to convert a qmake project from Ubuntu phone SDK to a
>> snap project, and it worked well initially two weeks ago. The source code
>> can be found at:
>>
>> https://github.com/liu-xiao-guo/rssreader_snap
>>
>> However, now I try to rebuild the project, and I get the following error:
>>
>> ==
>> Removing suid/guid from
>> /home/liuxg/snappy/desktop/rssreader/parts/rssreader/install/usr/lib/x86_64-linux-gnu/oxide-qt/chrome-sandbox
>> Pulling rssreader
>> Skipping build desktop/qt5 (already ran)
>> 'rssreader' has prerequisites that need to be staged: desktop/qt5
>> Skipping pull desktop/qt5 (already ran)
>> Skipping build desktop/qt5 (already ran)
>> Parts 'desktop/qt5' and 'rssreader' have the following file paths in
>> common which have different contents:
>> usr/share/pkgconfig/xkeyboard-config.pc
>> =
>>
>> I find that the same file "xkeyboard-config.pc" is from two different
>> parts:
>>
>>  - rssreader
>>  - desktop (desktop/qt5), which is used to invoke the Qt app.
>>
>> I do not know how to resolve the conflict issue the same file comes from
>> two different parts
>>
>> Thanks & best regards,
>> XiaoGuo
>>
>> --
>> XiaoGuo, Liu (刘晓国)
>> Mobile: +86-13911181302
>>
>
>
>
> --
> XiaoGuo, Liu (刘晓国)
> Mobile: +86-13911181302
>
>
>
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/snapcraft
>
>


-- 
XiaoGuo, Liu (刘晓国)
Mobile: +86-13911181302
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft