Re: classic 32 bit application

2017-04-04 Thread Loïc Minier
Hi!

On Tue, Apr 4, 2017 at 4:53 PM, Alistair Grant <akgrant0...@gmail.com>
wrote:

> The project is at: https://github.com/akgrant43/pharo-snap
>

I gave this a quick build-try, but build failed in the pharo part with this
tail in build.log:

Set up version info...
Add PharoV50.sources...
cp: cannot stat 'PharoV50.sources': No such file or directory


Looking at the error you're getting, first check if you're running ldd
against a shell script or an ELF file; it should work against a 32-bits
ELF. I did manage to bundle a prebuilt 32-bits app in an amd64 snap here:

https://github.com/lool/quortus-epc-snap/blob/master/snap/snapcraft.yaml

and it basically just involved shipping libc6:i386 in the snap, so
double-check that the runtime linker (/lib/ld-linux.so.2) and all dependent
32-bits libraries are in the snap and in the search path. If the runtime
linker can't be found for some reason, create your own wrapper to launch
your executable by calling the runtime linker directly (run
"/lib/ld-linux.so.2" to get help output or see man page).

Hope this helps!
- Loïc Minier
-- 
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-03-31 Thread Loïc Minier
Hi Vincent,

What plugs did you use?

This is a quick snap I assembled recently which I tested successfully
on top of X11:
https://github.com/lool/soracom-console-snap/blob/master/snapcraft.yaml

Cheers,
- Loïc

On Fri, Mar 31, 2017 at 3:28 PM, Vincent JOBARD 
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
>



-- 
- Loïc
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: udev rules

2017-03-21 Thread Loïc Minier
Hi!

On Mon, Mar 20, 2017 at 8:29 PM, Jamie Strandboge 
wrote:

> The aksusbd case seems like it could be covered by existing interface
> techniques. The providing snap slots the hasp interface and that interface
> could
> add udev rules that point to (the snappy command aliased)
> /snap/bin/aksusbd.
> There is probably a little thought to be had there since it assumes the
> aksusbd
> alias and that might be somewhat awkward for different slot
> implementations.
>

Would it make sense to point at a hook for this? The command to handle udev
events doesn't necessarily need to pollute the PATH namespace.


> This would all work for gadget snaps that provide the /dev files (like with
> serial-port, etc) and won't work for classic/hotplugging.
>

Are you saying these rules would be limited to /dev files described in the
gadget?

Why wouldn't this work for classic/hotplugging?

Cheers,
- Loïc
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


udev rules

2017-03-20 Thread Loïc Minier
Hi!

I saw a couple of software pieces that rely on udev rules to work; I guess
these use cases need design to be supported in snaps; I wanted to share
some specifics below.

1) aksusbd is a Gemalto daemon to assert presence of a license USB dongle;
it requires USB access, and also these udev rules that call binaries on
addition/removal of devices and create /dev symlinks:
http://www.feflow.info/download/FEFLOW/linux/dongle-2.41/linux_dinst/hasp.rules

This is a dependency of e.g. Quortus EPC (4G core network). It could be
delivered as a part or more likely as a separate snap since Quortus can
operate in different modes.

2) LimeSDR is SDR hardware that comes in USB and PCI form-factor. It might
be used from desktop apps, e.g. Gqrx is a spectrum exploration tool and
typically a desktop app that runs as non-root. This is the set of udev
rules that upstream recommends installing:
https://github.com/myriadrf/LimeSuite/blob/master/udev-rules/64-limesuite.rules

These two use cases (triggering commands when devices are plugged /
unplugged and granting permissions to desktop users to a new /dev node)
don't seem possible right now. I think the former is probably covered in
hotplugging requirements, not sure about the latter. Perhaps I should add
these to some existing design doc?

Thanks,
- Loïc Minier
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: pro tip: use scriptlets instead of custom plugins

2017-02-20 Thread Loïc Minier
I can't really say how common this is; it's the first time I had to hack
around stage-packages; it could indeed have been addressed through a plugin

I was just thinking that if you add pre- post- hooks for every step of the
lifecycle, then one before pull would have worked for me here; I have a
solution in place, so this was just FYI

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

> On Feb 20, 2017 9:14 AM, "Loïc Minier" <loic.min...@ubuntu.com> wrote:
>
>
>
> On Mon, Feb 20, 2017 at 5:55 PM, Kyle Fazzari <kyle.fazz...@canonical.com>
> wrote:
>
>>
>> - 'prepare' runs before build
>> - 'build' replaces plugin build (including install)
>> - 'install' runs after build. This is useful e.g. for a Makefile with no
>> installation targets, or copying over some config files after the plugin
>> does its thing.
>>
>
> I had a case where I wanted to run something before stage-packages were
> pulled; I worked around the lack of hooks before stage-packages by using a
> separate part; see:
> https://github.com/lool/quortus-epc-snap/blob/master/snap/
> snapcraft.yaml#L23
>
> I dont know how common this is, thought I'd mention it
>
>
> Haha, nice hack. If it were me, I would have considered writing a new
> plugin to hide that from my YAML. I'm a little OCD though, so let's be
> honest: is a dirtier YAML worth not having to write a plugin? Should we
> support pre/post scriptlets for the 'pull' step as well?
>
> Kyle
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>
>


-- 
- Loïc
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: IPC between snaps

2017-02-09 Thread Loïc Minier
Hi,

Yes, this is typically how you allow a snap to talk to snapd or docker
daemon or lxd. You need a new interface to grant access to this socket
path. If you'd like some examples or look at existing ones, grep for socket
under github.com/snapcore/snapd/interfaces.

Cheers,
- Loïc

On Thu, Feb 9, 2017 at 10:27 AM, Roberto Mier Escandón  <
roberto.escan...@canonical.com> wrote:

> Hi,
>
> Is there any way to communicate processes in different snaps using
> pipes?. How can it be done in this or other way?
>
>
> Cheers.
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>



-- 
- Loïc
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Using docker for clean builds of classic snaps

2017-02-05 Thread Loïc Minier
Hi Joseph,

On Sun, Feb 5, 2017 at 3:13 PM, Joseph Rushton Wakeling <
joseph.wakel...@webdrake.net> wrote:

> $ sudo docker run -v $PWD:$PWD -w $PWD [my-image-id] snap install core &&
> snapcraft clean && snapcraft
> 2017/02/05 14:07:35.998824 main.go:220: WARNING: cannot create syslog
> logger
> error: cannot communicate with server: Post http://localhost/v2/snaps/core:
> dial unix /run/snapd-snap.socket: connect: no such file or directory
>

I dont think "snapd" is in the "ubuntu" Docker image which is trimmed down
a bit; it's also likely that snapd/snaps would hit some technical issues
when inside Docker. (This might be worth researching/debugging if you're
tempted.)

Cheers,
- Loïc
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: dlopen cannot load shared library

2017-02-03 Thread Loïc Minier
Hi,

On Fri, Feb 3, 2017 at 11:20 AM, Roberto Mier Escandón  <
roberto.escan...@canonical.com> wrote:

> I'm having a problem with a snap which start certain daemon when
> installed. This daemon tries to load certain shared library but it's not
> able to do it even in devmode [1]. However it loads it well in classic
> mode. The library is in a rw path, provided directly to a dlopen method
> [1]. Have anybody hit this kind of issue before?
>

In classic mode, you see libraries from your classic Ubuntu system
including X11; in devmode/confined mode, you only see system libraries from
the core snap which doesn't contain X11.

I suggest you embed X11 and other libs that your dlopen-ed library depends
on.

Cheers,
- Loïc Minier
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Using docker for clean builds of classic snaps

2017-02-02 Thread Loïc Minier
There are a bunch of Docker images providing snapcraft
,
unfortunately they are all behind. These should be autobuilt instead of
manually updated, in the mean time I suggest you build your own (relatively
easy) .
Otherwise, Didier's image
 is only a month old
and should include a snapcraft with experimental support for classic snaps.

Cheers,
- Loïc

On Thu, Feb 2, 2017 at 9:18 PM, Joseph Rushton Wakeling <
joseph.wakel...@webdrake.net> wrote:

> On 02/02/17 14:40, Jamie Bennett wrote:
>
>> We have this page that explains how to build using Docker containers (the
>> url name is wrong but the contents are right).
>>
>>   * https://snapcraft.io/docs/build-snaps/trusty
>>
>
> Hi Jamie -- thanks for the pointer.  Unfortunately it doesn't work with
> classic snaps :-(
>
> $ sudo docker run -v $PWD:$PWD -w $PWD snapcore/snapcraft snapcraft
> Unable to find image 'snapcore/snapcraft:latest' locally
> latest: Pulling from snapcore/snapcraft
> 2f0243478e1f: Pull complete
> d8909ae88469: Pull complete
> 820f09abed29: Pull complete
> 01193a8f3d88: Pull complete
> 22802091ea0e: Pull complete
> Digest: sha256:a1c3ddcfd7d8af5a9ad5762f3d014389ef6db718a848ce59c5add
> 791b65036a4
> Status: Downloaded newer image for snapcore/snapcraft:latest
> Issues while validating snapcraft.yaml: The 'confinement' property does
> not match the required schema: 'classic' is not one of ['devmode', 'strict']
>
>
>
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
> an/listinfo/snapcraft
>



-- 
- Loïc
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Relationship between snaps and containers, if any

2017-01-25 Thread Loïc Minier
Hi Luther!

Docker containers and snaps are different but sometimes overlap in solving
certain classes of technical problems. For instance, "software
distribution" as a broad problem is addressed by both snaps and Docker
containers, but with very different implementations.

First of all, yes you can run Docker on top of an all-snaps system such as
Ubuntu Core, and the Docker snap will also give you a Docker engine runtime
on Ubuntu classic.

Docker containers and snaps are built on different goals. Snaps will
typically look and feel like system or user apps running directly on your
regular system: you see them in the process list, they see each other if
the sandboxing allows it, they may interact with the screen/USB
devices/whatever if permissions allow it etc.. Docker containers feel more
like very efficient virtual machines that you connect to, they allow for
sandboxing as well – where the whole container is sandboxed – and for
resource quotas.

On your question of snapping a docker container: yes, you would be able to
wrap a Docker image inside a snap which would be a client of the Docker
snap.

On the top of my head, I can personally think of two main cases where you
would want to run containers on top of an all snap system: when your
workload is already packaged as a container, or when you want to use the
resource limits featured in Docker or LXD (e.g. limit network usage, CPU
usage etc.).

Cheers,
- Loïc Minier

On Wed, Jan 25, 2017 at 12:53 AM, Luther Goh Lu Feng <elf...@yahoo.com>
wrote:

> I seek clarity in understanding how docker containers are different from
> snaps. The question originated as I pondered if docker containers are the
> equivalent of snaps. Is there a blog post or FAQ somewhere that already
> addresses this?
>
>
> I also read this article[1], though dated, mentions docker support in
> Snappy, which makes me wonder:
>
> - the scenarios that I would want to deploy docker containers alongside
> snaps
> - snapping a docker container.
>
> Appreciate if someone can enlighten me. Thanks.
>
>
> -- Luther
> [1] http://thenewstack.io/snappy-ubuntu-a-new-cloud-os-with-
> support-for-docker-in-a-post-shellshock-era/
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>



-- 
- Loïc
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Locally extending trusted certificates

2017-01-06 Thread Loïc Minier
Hi,

This question came up in the context of Docker registries with self-signed
certificates:
http://askubuntu.com/questions/868268/add-self-signed-
certificate-in-ubuntu-core-16-04
this could be addressed in ways specific to the Docker snap, but I believe
this touches a larger question: support for extending the list of
system-trusted certificates.

Our Ubuntu Core images ship with a set of trusted certificates. These are
inherited from the .deb world where there is a mechanism to locally extend
the list of trusted certificates (update-ca-certificates). This mechanism
doesn't work with core images due to read-only directories (and perhaps
other issues as well).

Here are some possible options to address this:
1) fix the update-ca-certificates system to also work on core images; this
might just be a matter of making some directories bind-mounts to the
writable space

2) implement some kind of snapd keystore feature/configs/APIs (much like
system keystores on mobile OSes); this is likely significant work, but
opens interesting perspectives in providing new management APIs and a more
secure implementation. For instance, one could design this to store secrets
in hw-specific secure stores, or offer mechanisms to roll out new
certificates/keys via assertions, or to disable some specific CAs

3) keep the list of system certificates as static and not locally
configurable; this will likely result in some snaps developing alternate
keystores

I'm sure there are other options and I'd to hear how people think this
should best be addressed in the snap/snapd world.

Cheers,
- Loïc Minier
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Development environment for debs and snaps for raspberry pi 3?

2016-12-15 Thread Loïc Minier
For docker, make sure you're using snapd 2.19.1 or newer; the core (OS)
snap from the edge channel works for me:

*lool@localhost*:*~*$ snap list

Name Version Rev  Developer  Notes

core 16.04.1 694  canonical  -

[...]

*lool@localhost*:*~*$ snap version

snap2.19+ppa129.c327d93a-1

snapd   2.19+ppa129.c327d93a-1

series  16

*lool@localhost*:*~*$ sudo docker run --rm -it hello-world

[...]

Hello from Docker!

[...]



On Tue, Dec 13, 2016 at 10:48 PM, Gregory Lutostanski <
gregory.lutostan...@canonical.com> wrote:

> On that note... I haven't been able to get either docker nor lxd working
> on my rpi2/3 anybody else been able to?
> https://bugs.launchpad.net/snappy/+bug/1606510 is what I hit for lxd.
> I didnt know about the classic snap, maybe that will enable me to get lxd
> working, which would be my preferred choice.
>
> --Greg
>
>
> On Tue, Dec 13, 2016 at 3:31 PM, Loïc Minier <loic.min...@ubuntu.com>
> wrote:
>
>> Hi!
>>
>> On Tue, Dec 13, 2016 at 8:46 PM, Dan Kegel <d...@kegel.com> wrote:
>>
>>> 2) if one were to want to use the official snappy core ubuntu 16.04
>>> for raspberry pi 3 as a development host, is there a reasonable way to
>>> do that?  e.g. installing lxd on it and running an ubuntu desktop
>>> environment inside lxd?
>>>
>>
>> On top of what David Callé said about the classic snap, installing the
>> LXD or Docker snaps and running snapcraft in a container would certainly
>> work! I haven't tried running a full desktop and would love to hear how
>> that fares  :-)
>>
>> Cheers,
>> - Loïc Minier
>>
>> --
>> 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
>
>


-- 
- Loïc
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: docker snap not working

2016-12-06 Thread Loïc Minier
Michael Vogt just added this check; nice!

https://github.com/snapcore/snapd/pull/2421

On Tue, Dec 6, 2016 at 3:34 PM, Mark Shuttleworth <m...@ubuntu.com> wrote:

>
> Can we add Docker to a list of 'critical snaps' that is part of our
> pre-release validation suite?
>
> Mark
>
>
> On 06/12/16 05:05, Manik Taneja wrote:
>
>
>
> On Dec 6, 2016, at 4:51 AM, Loïc Minier <loic.min...@ubuntu.com> wrote:
>
> Hi,
>
> On Tue, Dec 6, 2016 at 3:49 AM, Peng Liu <pengliu.m...@gmail.com> wrote:
>
>> There is some known issue of the docker snap, check the google doc for
>> detailed information.
>> https://docs.google.com/document/d/1JHa6tkuR9PtpnAVVmAJIAKuy
>> KBy8E9ZkvG5Wbc6HZSY/edit#
>>
>> And you need to make sure your snapd is the latest version.
>>
>
> Exactly; it only affects Ubuntu Core images (not snaps on classic), and
> there are two workarounds:
> - either install the snap with devmode
> - or run this after boot (and then restart dockerd):
>
> $ sudo nsenter -m/run/snapd/ns/docker.mnt
>
> # umount --lazy /var/lib/snapd/hostfs/sys
> The fix is in snap-confine git and is planned for upload this Friday.
>
> Thanks Loic!
>
>
> Best regards,
> - Loïc Minier
>
> --
> 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
>
>


-- 
- Loïc
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: docker snap not working

2016-12-06 Thread Loïc Minier
Hi,

On Tue, Dec 6, 2016 at 3:49 AM, Peng Liu <pengliu.m...@gmail.com> wrote:

> There is some known issue of the docker snap, check the google doc for
> detailed information.
> https://docs.google.com/document/d/1JHa6tkuR9PtpnAVVmAJIAKuyKBy8E
> 9ZkvG5Wbc6HZSY/edit#
>
> And you need to make sure your snapd is the latest version.
>

Exactly; it only affects Ubuntu Core images (not snaps on classic), and
there are two workarounds:
- either install the snap with devmode
- or run this after boot (and then restart dockerd):

$ sudo nsenter -m/run/snapd/ns/docker.mnt

# umount --lazy /var/lib/snapd/hostfs/sys
The fix is in snap-confine git and is planned for upload this Friday.

Best regards,
- Loïc Minier
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: is there an Avahi (mDNS) service snap?

2016-11-29 Thread Loïc Minier
Hi!

I suggest you look at the short mDNS implementation used by snapweb; it
relies on a Go module called github.com/presotto/go-mdns-sd:
https://github.com/snapcore/snapweb/blob/master/avahi/avahi.go

Cheers,
- Loïc Minier

PS: I've sent the same reply to your ask.u.c post :-)

On Tue, Nov 29, 2016 at 4:42 PM, George Gross <gmgr...@shoreham.net> wrote:

> Hi,
>
> I'm a Ubuntu Snap newbie, so if there is a readily available and
> reliable web database stating which Debian packages have been converted
> into snaps, please direct me to that web link, as that would help me a
> lot to get oriented.
>
> My question on the subject line is similar to this one found on
> askubuntu.com. The pending question is here:
>
> http://askubuntu.com/questions/853134/avahi-samba-on-snappy-core-16-04-arm
>
>
> I'm trying to get the avahi-daemon and its related command line commands
> running on a Ubuntu snappy core, on a RPi3 platform.
>
> Q: is this something that needs to be built from source for armv7 target
> and then repackaged from .deb into snap?
>
> tia,
> George
>
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>



-- 
- Loïc
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Docker to snappy

2016-11-28 Thread Loïc Minier
Hi!

On Mon, Nov 28, 2016 at 2:37 PM, Didier Roche <didro...@ubuntu.com> wrote:

>
> > It is possible to imagine some tool to transform a docker recipe to
> > snappy ?
> > Example: https://github.com/discourse/discourse_docker


I dont think we have a discourse snap (yet), albeit some people seem to
consider this would be an excellent idea
<https://meta.discourse.org/t/has-anyone-considered-ubuntu-snap-format-for-deploying-discourse/51719>
 :-)

I don't think transforming a dockerfile directly in a snap would work.
> Indeed, you are running scripts, don't necessarily have you stack
> location in relocatable path and such. I feel this will more error out
> and take more time to do the final conversion than being beneficial.
>
> However, as a transition solution, I know we have some docker snap.
> Loïc (who worked on snapping docker), is it possible to turn this into a
> docker part and embed the image + docker itself, while pointing at the
> entry point?
>

I wouldn't recommend embedding docker as a part to a snap because it
requires restricted interfaces to operate properly and we wouldn't want to
give these permissions to a large number of snaps; however, it would be
possible to:
- install docker snap
- install a discourse-docker snap which would contain the docker image
(import the latest image as shipped by the snap before "docker run"-ning it)
(I don't have an example of such a snap)

@Anca, however it's likely simpler to snap Discourse! Have you tried this?
Did you face some questions that we can perhaps help you with?

Thanks for your work on getting Discourse on snappy systems!  :-)

Cheers,
- Loïc Minier
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: [snaps/deb] Cross dependencies / forward compatibility between debs & snaps?

2016-11-05 Thread Loïc Minier
docker versions
and socket locations without conflicts. It's exactly this kind of issues
that NVidia is trying to solve with their fork!

Obviously these are all long shots and I didn't provide any practical
answer on improving deb to snap or snap to deb transition; this is a larger
question not specific to the docker snap that we need to keep working on.

Cheers,
- Loïc Minier
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Confined Docker snap available

2016-11-01 Thread Loïc Minier
Hi,

What's the output of snap --version?

Thanks!
- Loïc Minier

On Tue, Nov 1, 2016 at 4:21 AM, Peng Liu <pengliu.m...@gmail.com> wrote:

> Hi Loïc,
>
> I encountered some errors when I tried to connect the interfaces, for
> example:
> 
> sudo snap connect docker:docker-cli docker:docker-daemon
>
> error: cannot perform the following tasks: - Connect docker:docker-cli to
> docker:docker-daemon (cannot connect plug "docker-cli" from snap "docker",
> no such plug) 
>
> Then I am not able to run a simple docker command like "docker run --rm
> hello-world"
>
> Did I miss something? Is there anything need to do after installing the
> docker snap?
> Thanks.
>
> Peng
>
> On Tue, Oct 18, 2016 at 6:48 AM, Loïc Minier <loic.min...@ubuntu.com>
> wrote:
>
>> Hi!
>>
>> Docker is since some days available as a properly confined snap. This
>> will work on top of classic Ubuntu 16.04+ or on top of an up-to-date Ubuntu
>> Core series 16.
>>
>> Because the docker.sock path is hardcoded in a lot of images, this snap
>> conflicts with docker debs, so make sure you remove them first:
>> sudo apt purge docker docker-engine
>>
>> Create a system group for docker:
>> sudo groupadd --system docker
>>
>> Install the snap:
>> sudo snap install docker
>>
>> And connect the interfaces (these will go away we have a snap-declaration
>> in place):
>> sudo snap connect docker:docker-cli docker:docker-daemon
>> sudo snap connect docker:firewall-control ubuntu-core:firewall-control
>> sudo snap connect docker:support ubuntu-core:docker-support
>> sudo service snap.docker.dockerd stop
>> sudo service snap.docker.dockerd start
>>
>> You're now ready to use docker, e.g.:
>> sudo /snap/bin/docker run --rm -it hello-world
>> sudo /snap/bin/docker run --rm -it ubuntu
>>
>> At the moment, the Docker snap is available for amd64, armhf, arm64, i386.
>>
>> Docker-compose is also included, and may be used with the
>> "docker.compose" command.
>>
>> Want to read more about docker? Read the Docker snap status and FAQ doc
>> <https://docs.google.com/document/d/1JHa6tkuR9PtpnAVVmAJIAKuyKBy8E9ZkvG5Wbc6HZSY/edit?usp=sharing>
>> !
>>
>> Have fun and please report issues against https://github.com/doc
>> ker-snap/docker
>>
>> Cheers,
>> - Loïc Minier
>>
>> --
>> Snapcraft mailing list
>> Snapcraft@lists.snapcraft.io
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>> an/listinfo/snapcraft
>>
>>
>


-- 
- Loïc
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Confined Docker snap available

2016-10-20 Thread Loïc Minier
On Thu, Oct 20, 2016 at 8:18 PM, Dustin Kirkland 
wrote:

> > Because the docker.sock path is hardcoded in a lot of images, this snap
> > conflicts with docker debs, so make sure you remove them first:
> > sudo apt purge docker docker-engine
>
> Hmm, that feels like something Snaps should learn to express as a
> declaration, right?  Surely if we're successful in moving more
> applications, like Docker, from debs to snaps, our users would
> appreciate a kindly mechanism to
>

It's actually something that Docker upstream should get support for IMO;
not a Snap issue.

Basically, a lot of scripts/container images/docs hardcode this arg:
-v /var/run/docker.sock:/var/run/docker.sock
and then expect to find /var/run/docker.sock from inside the container.
(There are of course variations and slight differences on top)

This means we want the Docker snap to listen there, but then the .deb can't
listen there too.

IMO a cleaner approach would be for docker to have a
--expose-docker-socket-inside-container flag (albeit shorter :-).

Alternatively, I guess we could filter command-line arguments and remap
them, but it's start getting tricky – just like it's a bit tricky to know
which docker you mean when you run "docker" and that might pick up either
the /snap/bin/ one or the /usr/bin/ one.


> Very nice.  What's the ETA on snap-declaration?
>

(have to check on that; it's either just an admin thing or "soon")


> Any blockers for s390x?
>

We need an OS snap for this arch first, and we don't have this ATM;
maintaining a .deb might be less work – not sure.

- Loïc
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Removing a key

2016-10-13 Thread Loïc Minier
It is likely deleting keys isn't implemented yet:
https://myapps.developer.ubuntu.com/docs/api/account.html

In the mean time, I suggest you just register and use another key.

Cheers,
- Loïc Minier

On Thu, Oct 13, 2016 at 11:54 PM, Luke Williams <luke.willi...@canonical.com
> wrote:

> Hello,
>
> That didn’t work, it just dumped the snapcraft usage
>
> Thanks,
>
> Luke Williams - Technical Partner Manager, Network Switches/Ubuntu-Core
> email: luke.willi...@canonical.com
> http://www.canonical.com/ | http://www.ubuntu.com
>
>
>
>
>
> On Oct 13, 2016, at 2:45 PM, Manik Taneja <ma...@canonical.com> wrote:
>
>
>
> On Thu, Oct 13, 2016 at 1:48 PM, Luke Williams <
> luke.willi...@canonical.com> wrote:
>
> Hello,
>>
>> I was trying to build an Ubuntu-Core image and noticed that I don't have
>> my original snap key on my newly rebuilt system (hard drive failure on my
>> build machine) so I created a new default key, but can't upload it since I
>> already have a key named default.  I ended up creating a new key with a new
>> name, but I would like to remove the original key, but can't seem to find
>> anything on how to do this. I can see the keys with snapcraft list-keys but
>> no way to remove them. Any ideas?
>>
>> try this-
>
> snapcraft revoke-key 
>
> /manik
>
>
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>
>


-- 
- Loïc
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: My second snap ;-)

2016-10-02 Thread Loïc Minier
Hi,

Right; matplotlib expects matplotlibrc to be installed. Looking at
matplotlib/__init__.py,
you can see rc_params() calls matplotlib_fname() to get the default config
filename.

The search order there is:

- `$PWD/matplotlibrc`

- `$MATPLOTLIBRC/matplotlibrc`

- `$MPLCONFIGDIR/matplotlibrc`

  - `$HOME/.matplotlib/matplotlibrc`, if it exists

  - or `$XDG_CONFIG_HOME/matplotlib/matplotlibrc` (if

$XDG_CONFIG_HOME is defined)

  - or `$HOME/.config/matplotlib/matplotlibrc` (if

$XDG_CONFIG_HOME is not defined)

 - `$HOME/.matplotlib/matplotlibrc` if `$HOME` is defined.

- Lastly, it looks in `$MATPLOTLIBDATA/matplotlibrc` for a

  system-defined copy.


So just create a matplotlibrc in your $SNAP and you should be good

Cheers,

- Loïc

On Sun, Oct 2, 2016 at 9:54 AM, Robert Park 
wrote:

> Hi all!
>
> Back again with a second attempt, this time I'm not trying to modify
> the host system so I'm hoping this should be a lot easier/possible!
>
> Here's my snapcraft.yaml:
>
> https://git.launchpad.net/~robru/+git/weightloss/tree/snapcraft.yaml
>
> Pretty simple little flask webapp, just does some data manipulations
> and then serves graphics over HTTP.
>
> Snap builds ok but when I run it I get this:
>
>  weighttracker
> Traceback (most recent call last):
>   File "/snap/weighttracker/x2/run.py", line 15, in 
> from graph import draw
>   File "/snap/weighttracker/x2/graph.py", line 14, in 
> from matplotlib.dates import DateFormatter
>   File "/snap/weighttracker/x2/usr/lib/python3/dist-packages/
> matplotlib/__init__.py",
> line 1133, in 
> rcParams = rc_params()
>   File "/snap/weighttracker/x2/usr/lib/python3/dist-packages/
> matplotlib/__init__.py",
> line 977, in rc_params
> return rc_params_from_file(fname, fail_on_error)
>   File "/snap/weighttracker/x2/usr/lib/python3/dist-packages/
> matplotlib/__init__.py",
> line 1102, in rc_params_from_file
> config_from_file = _rc_params_in_file(fname, fail_on_error)
>   File "/snap/weighttracker/x2/usr/lib/python3/dist-packages/
> matplotlib/__init__.py",
> line 1020, in _rc_params_in_file
> with _open_file_or_url(fname) as fd:
>   File "/snap/weighttracker/x2/usr/lib/python3.5/contextlib.py", line
> 59, in __enter__
> return next(self.gen)
>   File "/snap/weighttracker/x2/usr/lib/python3/dist-packages/
> matplotlib/__init__.py",
> line 1005, in _open_file_or_url
> with io.open(fname, encoding=encoding) as f:
> PermissionError: [Errno 13] Permission denied: '/etc/matplotlibrc'
>
>
> Not really sure what's going on, but it looks like matplotlib is
> hard-coding "/etc":
>
> $ cat /snap/weighttracker/x2/usr/lib/python3/dist-packages/
> matplotlib/__init__.py
> | grep /etc
> path = '/etc'  # guaranteed to exist or raise
>
>
> Do I have to patch matplotlib here or is there some way snapcraft can
> fix this for me?
>
> (frustratingly the matplotlib code seems to harmlessly ignore the file
> if it doesn't exist, but they didn't anticipate the idea that they
> wouldn't have permission, so the code just barfs)
>
>
>
> Thanks.
>
> --
> robru
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>



-- 
- Loïc
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Docker image for building Ubuntu (amd64/i386/armhf/arm64) snaps

2016-09-22 Thread Loïc Minier
Hi!

Is there a big difference with the
https://hub.docker.com/r/snapcore/snapcraft/ image? Perhaps we can merge
the two to avoid confusion from end-users?

Thanks,
- Loïc

On Thu, Sep 22, 2016 at 3:24 PM, Rex Tsai  wrote:

>
> This image includes toolchains and snapcraft to help app developers (and
> hardware enablement engineers) who don't have a Ubuntu installation to
> build a snap software package.
>
> It's also support building snap on amd64, i386 (native and amd64
> architecture), armhf (native and amd64 architecture), arm64 (native and
> amd64 architecture). That help an app developer to cross build a arm-based
> snap from amd64.
>
> To use the docker container to build a
> #
> ​ ​
> Please put this line in your
> ${HOME}/.$(basename ${SHELL})rc
> ​
> alias snapcraft-docker='docker run -u $(id -u) -t -i --rm -v $(pwd):/build
> \
> -v ${HOME}/.snap:/build/.snap \
> -v ${HOME}/.local/share/snapcraft:/build/.local/share/snapcraft \
> snapcraft/xenial-amd64 snapcraft'
>
> snapcraft-docker tour
> cd snapcraft-tour/00-SNAPCRAFT/01-easy-start && snapcraft-docker
>
> Please find the README on https://hub.docker.com/r/snapcraft/xenial-amd64/
>
> Cheers
> -Rex
>



-- 
- Loïc
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Build snaps in container

2016-09-13 Thread Loïc Minier
Are these Ubuntu images? I'm usually running armhf/ubuntu which I believe
is the one officially maintained by Canonical. But given we propose using
snapcraft from docker as an officially supported image too, I figured it
would be nice to have it on armhf too for people building on rpi2/3.

Cheers,
- Loïc

On Tue, Sep 13, 2016 at 4:31 AM, YC Cheng <yc.ch...@canonical.com> wrote:

> Hi Loic,
>
> Maybe you already knew that https://hub.docker.com/r/vicamo/ubuntu/tags/
> have both
>
> xenial-arm64 and xenial-armhf tag.
>
> YC
>
> 2016-09-12 23:00 GMT+08:00 Loïc Minier <loic.min...@ubuntu.com>:
>
>> Hi folks,
>>
>> Could we also get the docker container snapcore/snapcraft built for ARM?
>> (I'm using classic mode for now though.)
>>
>> Thanks!
>> - Loïc Minier
>>
>> On Tue, Aug 23, 2016 at 2:48 PM, Sergio Schvezov <
>> sergio.schve...@canonical.com> wrote:
>>
>>>
>>>
>>> El 23/08/16 a las 07:33, Loïc Minier escribió:
>>> > Hi,
>>> >
>>> > On Tue, Aug 16, 2016 at 3:39 PM, Matt Bruzek
>>> > <matthew.bru...@canonical.com <mailto:matthew.bru...@canonical.com>>
>>> wrote:
>>> >
>>> > It is also available on docker hub:
>>> > https://hub.docker.com/r/jujusolutions/snapbox/
>>> > <https://hub.docker.com/r/jujusolutions/snapbox/>
>>> >
>>> >
>>> > Thanks for sharing! Didier and Sergio had already published Docker
>>> > images with snapcraft:
>>> > https://hub.docker.com/r/didrocks/snapcraft/
>>> > https://hub.docker.com/r/sergiusens/snapcraft/
>>> > I guess we should consolidate these and have some kind of official
>>> > Ubuntu namespace and images.
>>>
>>> I discussed with Evan and we are going to move the Dockerfile to an
>>> official location like snapcore/snapcraft and have it updated regularly.
>>>
>>>
>>> --
>>> Snapcraft mailing list
>>> Snapcraft@lists.snapcraft.io
>>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>>> an/listinfo/snapcraft
>>>
>>>
>>
>>
>> --
>> - Loïc
>>
>> --
>> Snapcraft mailing list
>> Snapcraft@lists.snapcraft.io
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>> an/listinfo/snapcraft
>>
>>
>


-- 
- Loïc
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Build snaps in container

2016-09-12 Thread Loïc Minier
Hi folks,

Could we also get the docker container snapcore/snapcraft built for ARM?
(I'm using classic mode for now though.)

Thanks!
- Loïc Minier

On Tue, Aug 23, 2016 at 2:48 PM, Sergio Schvezov <
sergio.schve...@canonical.com> wrote:

>
>
> El 23/08/16 a las 07:33, Loïc Minier escribió:
> > Hi,
> >
> > On Tue, Aug 16, 2016 at 3:39 PM, Matt Bruzek
> > <matthew.bru...@canonical.com <mailto:matthew.bru...@canonical.com>>
> wrote:
> >
> > It is also available on docker hub:
> > https://hub.docker.com/r/jujusolutions/snapbox/
> > <https://hub.docker.com/r/jujusolutions/snapbox/>
> >
> >
> > Thanks for sharing! Didier and Sergio had already published Docker
> > images with snapcraft:
> > https://hub.docker.com/r/didrocks/snapcraft/
> > https://hub.docker.com/r/sergiusens/snapcraft/
> > I guess we should consolidate these and have some kind of official
> > Ubuntu namespace and images.
>
> I discussed with Evan and we are going to move the Dockerfile to an
> official location like snapcore/snapcraft and have it updated regularly.
>
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>
>


-- 
- Loïc
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Access denied to /dev/ttyUSB0

2016-09-07 Thread Loïc Minier
Ok, then this should work:
sudo snappy hw-assign yoursnap /dev/ttyUSB0


On Wed, Sep 7, 2016 at 4:41 PM, Jenny Murphy <jenny.mur...@episensor.com>
wrote:

> Yes I am using Ubuntu 15.04
> On 7 Sep 2016 15:24, "Zygmunt Krynicki" <zygmunt.kryni...@canonical.com>
> wrote:
>
>>
>> > On 7 Sep 2016, at 16:05, Loïc Minier <loic.min...@ubuntu.com> wrote:
>> >
>> > Hi,
>> >
>> > You need to use:
>> > plugs: [serial-port]
>> >
>>
>> I don’t think this will work as this is a 15.04 based system.
>>
>> Jenny, can you confirm that you are using Ubuntu Core 15.04?
>>
>> Best regards
>> ZK
>>
>>


-- 
- Loïc
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Access to a Serial Port using Java RXTX library

2016-09-07 Thread Loïc Minier
Great; now we even have google juice for other people trying to use RXTX
with snaps, thanks!  :-)

On Wed, Sep 7, 2016 at 4:04 PM, Jenny Murphy <jenny.mur...@episensor.com>
wrote:

> Hi,
> No, actually the configure file in RXTX needed to be modified to support
> java 1.7 :
>
>
> case $JAVA_VERSION in
> 1.2*|1.3*|1.4*|1.5*)
> #fix_parameters $JPATH/jre/lib/javax.comm.properties
> CLASSPATH=".:\$(TOP):\$(TOP)/src:"`find $JPATH/ -name RXTXcomm.jar |head
> -n1`
> RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)"
> JHOME=$JPATH/"jre/lib/ext"
>
> So the paths were not being set up correctly for me.
>
> I changed it to
> case $JAVA_VERSION in
> 1.2*|1.3*|1.4*|1.5*|1.7*)
>
> Thanks a million for your suggestion.
>
> Jenny
>
>
> On 7 September 2016 at 15:01, Loïc Minier <loic.min...@ubuntu.com> wrote:
>
>> Hi,
>>
>> I'm guessing the Java version change solved the rebuilding problem?
>>
>> Cheers,
>> - Loïc Minier
>>
>> On Wed, Sep 7, 2016 at 3:32 PM, Jenny Murphy <jenny.mur...@episensor.com>
>> wrote:
>>
>>> Hi all,
>>>  This is solved . The problem was to do with the Java versions supported
>>> by RXTX.
>>> Jenny
>>>
>>> On 7 September 2016 at 12:51, Jenny Murphy <jenny.mur...@episensor.com>
>>> wrote:
>>>
>>>> Hi,
>>>>  I am having some difficulty building RXTX (get unsatisfied link errors
>>>> with the new shared objects and jar file).
>>>> Is there an other alternative to workaround my original problem with
>>>> the permissions to use lock file?
>>>> Thanks.
>>>>
>>>>
>>>> On 6 September 2016 at 12:48, Loïc Minier <loic.min...@ubuntu.com>
>>>> wrote:
>>>>
>>>>> Hi Jenny,
>>>>>
>>>>> The INSTALL file
>>>>> <https://github.com/rxtx/rxtx/blob/development/INSTALL> suggests that
>>>>> RXTX implements custom locking which requires OS integration; because you
>>>>> want your app to be the only one accessing the serial port(s), you should
>>>>> build RXTX with --disable-lockfiles to disable this feature of the 
>>>>> library.
>>>>>
>>>>> Cheers,
>>>>> - Loïc
>>>>>
>>>>> On Tue, Sep 6, 2016 at 1:34 PM, Jenny Murphy <
>>>>> jenny.mur...@episensor.com> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>>  I have a java application running in a .snap package.
>>>>>> The java application is going to access the serial port and uses the
>>>>>> RXTX Java library to do this. The RXTX jar is included in the .snap.
>>>>>>
>>>>>> When it runs I get the following error :
>>>>>>
>>>>>> check_group_uucp(): error testing lock file creation Error
>>>>>> details:Permission deniedcheck_lock_status: No permission to create lock
>>>>>> file.
>>>>>> please see: How can I use Lock Files with rxtx? in INSTALL
>>>>>>
>>>>>>
>>>>>> Anyone have any experience of this ?
>>>>>>
>>>>>> Thanks in advance.
>>>>>> Jenny
>>>>>>
>>>>>> --
>>>>>> *Jenny Murphy*
>>>>>> *EpiSensor, Georges Quay House, Georges Quay, Limerick, Ireland*
>>>>>> jenny.mur...@episensor.com <jenny.mur...@episensor.com>  t | +353
>>>>>> (0) 61 512 511  w | http://www.episensor.com
>>>>>>
>>>>>> --
>>>>>> Snapcraft mailing list
>>>>>> Snapcraft@lists.snapcraft.io
>>>>>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>>>>>> an/listinfo/snapcraft
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> - Loïc
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> *Jenny Murphy*
>>>> *EpiSensor, Georges Quay House, Georges Quay, Limerick, Ireland*
>>>> jenny.mur...@episensor.com <jenny.mur...@episensor.com>  t | +353 (0)
>>>> 61 512 511  w | http://www.episensor.com
>>>>
>>>
>>>
>>>
>>> --
>>> *Jenny Murphy*
>>> *EpiSensor, Georges Quay House, Georges Quay, Limerick, Ireland*
>>> jenny.mur...@episensor.com <jenny.mur...@episensor.com>  t | +353 (0)
>>> 61 512 511  w | http://www.episensor.com
>>>
>>
>>
>>
>> --
>> - Loïc
>>
>
>
>
> --
> *Jenny Murphy*
> *EpiSensor, Georges Quay House, Georges Quay, Limerick, Ireland*
> jenny.mur...@episensor.com <jenny.mur...@episensor.com>  t | +353 (0) 61
> 512 511  w | http://www.episensor.com
>



-- 
- Loïc
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Access denied to /dev/ttyUSB0

2016-09-07 Thread Loïc Minier
Hi,

You need to use:

plugs: [serial-port]

In your snapcraft.yaml; then you also have to connect your snap to that
interface manually as it's not autoconnected; check "snap interfaces" to
see which plugs and slots are connected.

Cheers,

- Loïc Minier

On Wed, Sep 7, 2016 at 4:00 PM, Jenny Murphy <jenny.mur...@episensor.com>
wrote:

> Hi,
>  I solved the previous issue regarding the use of the RXTX java library
> and the application is loading and running without errors.
> However my java code isn't detecting the port, it should be able to see
> /dev/ttyUSB0.
>
> In the dmesg log I see the following errors :
>
> [101043.875139] usb 1-2: new full-speed USB device number 7 using xhci_hcd
> [101044.006418] usb 1-2: New USB device found, idVendor=10c4,
> idProduct=ea60
> [101044.006441] usb 1-2: New USB device strings: Mfr=1, Product=2,
> SerialNumber=3
> [101044.006456] usb 1-2: Product: CP2102 USB to UART Bridge Controller
> [101044.006470] usb 1-2: Manufacturer: Silicon Labs
> [101044.006482] usb 1-2: SerialNumber: 0001
> [101044.011589] cp210x 1-2:1.0: cp210x converter detected
> [101044.012037] usb 1-2: cp210x converter now attached to ttyUSB0
>
> [101098.191960] audit_printk_skb: 258 callbacks suppressed
>
> [101098.191979] audit: type=1400 audit(1473254849.416:69078):
> apparmor="DENIED" operation="open" 
> profile="gateway.sideload_main_IdNRFcRcGPGe"
> name="/dev/ttyUSB0" pid=4875 comm="java" requested_mask="wr"
> denied_mask="wr" fsuid=0 ouid=0
>
>
> Is there anyway to solve this. I am working on a Ubuntu 15.04 platform.
>
> Thanks again.
>
> --
> *Jenny Murphy*
> *EpiSensor, Georges Quay House, Georges Quay, Limerick, Ireland*
> jenny.mur...@episensor.com <jenny.mur...@episensor.com>  t | +353 (0) 61
> 512 511  w | http://www.episensor.com
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>
>


-- 
- Loïc
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Snappy takes long time to boot when no network

2016-09-01 Thread Loïc Minier
Hi Yann,

Following up from our IRC exchange  :-)

What would you expect to be working before network is up? Is it startup of
the snaps' services, or the console, or the Snapweb web UI etc. [1]?

Cheers,
- Loïc

[1] of course, still need to address Snapweb not starting properly with no
network

On Thu, Sep 1, 2016 at 11:30 AM, Yann Sionneau 
wrote:

> Hello,
>
> I've just updated my snappy image and now it takes a very long time to
> boot (140 seconds) because of
>
> [FAILED] Failed to start Wait for Network to be Configured.
> See 'systemctl status systemd-networkd-wait-online.service' for details.
>
> which is :
> https://www.freedesktop.org/software/systemd/man/systemd-
> networkd-wait-online.service.html
>
> Is there a way to configure Snappy to not wait for network to go up at
> bootup?
>
> Lots of embedded devices don't have a 24/24 network connection.
>
> Thanks!
>
> PS : I already tried systemctl disable systemctl status
> systemd-networkd-wait-online.service without success.
>
> Regards,
>
> --
>
> Yann
>
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>



-- 
- Loïc
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: New ubuntu-device-flash cannot use own gadget snap?

2016-08-31 Thread Loïc Minier
Hi,

I wanted to capture one of the issues that was encountered.

ubuntu-device-flash snap can not work from an Ubuntu Core system; this is
because it calls kpartx with the -s flag which relies on libdevmapper
coordinating with its udev counterpart. Because dmsetup isn't installed in
the core image, the udev signaling never comes back.

To sum up:
- Ubuntu classic + kpartx -avs: works
- Ubuntu Core + kpartx -avs: hangs
- Ubuntu Core + kpartx -av: works

I wanted to mention this for people who try running ubuntu-device-flash
from an Ubuntu Core system.

(Various workarounds would be possible but because ubuntu-device-flash
ought to be replaced by ubuntu-image soon it's probably not worth
addressing right now.)

Cheers,
- Loïc Minier


On Wed, Aug 31, 2016 at 8:27 PM, Loïc Minier <loic.min...@ubuntu.com> wrote:

> Yep; but the failure in kpartx didn't seem specific to local vs remote
> snaps.
>
> For people on the list, I followed up on IRC and Yann was running into
> weird issues with kpartx and ext4 in his environments, but from a clean
> Ubuntu vm things worked and that's a viable solution for now.
>
> Cheers,
> - Loïc
>
> On Wed, Aug 31, 2016 at 12:26 PM, Simon Fels <simon.f...@canonical.com>
> wrote:
>
>> On 31.08.2016 12:16, Loïc Minier wrote:
>> > Works for me:
>> >
>> > $ sudo -E UBUNTU_DEVICE_FLASH_IGNORE_UNSTABLE_GADGET_DEFINITION=1
>> > /snap/bin/ubuntu-device-flash --verbose core 16 -o snappy.img --channel
>> > edge  --gadget pc --kernel pc-kernel --os ubuntu-core
>>
>> Yann is trying to use a gadget snap which isn't in the store but placed
>> on the local disk. So I suspect he is running something like
>>
>> $ sudo -E UBUNTU_DEVICE_FLASH_IGNORE_UNSTABLE_GADGET_DEFINITION=1
>> /snap/bin/ubuntu-device-flash ... --gadget /home/user/my-gadget.snap ...
>>
>> regards,
>> Simon
>>
>> > Determining gadget configuration
>> >
>> >  836.00 KB / 836.00 KB [==] 100.00%
>> > 12.77 MB/s 0
>> >
>> > Partitioning...
>> >
>> > Formatting...
>> >
>> > Mounting...
>> >
>> > Provisioning...
>> >
>> >  74.40 MB / 74.40 MB [===] 100.00%
>> 24.02
>> > MB/s 3s
>> >
>> >  74.40 MB / 74.40 MB [===] 100.00%
>> 59.46
>> > MB/s 1s
>> >
>> >  110.54 MB / 110.54 MB [=] 100.00%
>> 23.19
>> > MB/s 4s
>> >
>> >  836.00 KB / 836.00 KB [==] 100.00%
>> > 68.23 MB/s 0
>> >
>> > Unmounting...
>> >
>> > New image complete
>> >
>> > Summary:
>> >
>> >  Output: snappy.img
>> >
>> >  Architecture: amd64
>> >
>> >  Channel: edge
>> >
>> >  Version: 0
>> >
>> >
>> > On Wed, Aug 31, 2016 at 11:11 AM, Yann Sionneau
>> > <yann.sionn...@parrot.com <mailto:yann.sionn...@parrot.com>> wrote:
>> >
>> >
>> >
>> > Le 08/31/2016 à 10:56 AM, Simon Fels a écrit :
>> > > On 31.08.2016 10:49, Yann Sionneau wrote:
>> > >> Hello,
>> > >>
>> > >> It seems the new (snapp'ed) ubuntu-device-flash cannot use my
>> own gadget
>> > >> snap anymore.
>> > >>
>> > >> yann@imperium$ sudo -E /snap/bin/ubuntu-device-flash --verbose
>> core 16
>> > >> -o snappy.img --channel edge  --gadget
>> $PWD/../../../xxx_2.0_all.snap
>> > >> --kernel ../../../xxx_kernel/xxx-kernel_3.10.97_armhf.snap --os
>> > >> ubuntu-core --developer-mode --enable-ssh
>> > >> cannot use
>> > >> "/home/yann/dev/snappy_xxx/tools/snappy/xxx_image/../../../
>> xxx_2.0_all.snap",
>> > >> must be one of: ["canonical-i386" "canonical-pc" "pc"
>> "canonical-pi2"
>> > >> "pi2" "pi3" "canonical-dragon" "dragonboard" "beagleblack"
>> "plano-amd64"]
>> > >>
>> > >> Is porting Snappy on non official devices not supported anymore?
>> > > No, that is not the case.
>> > >
>> > >> How is it supposed to work now? I must confess that I am blocked
>> in my
>> > >> work because of this change, I cannot generate nor flash images
>> anymore
&

Re: New ubuntu-device-flash cannot use own gadget snap?

2016-08-31 Thread Loïc Minier
Works for me:

$ sudo -E UBUNTU_DEVICE_FLASH_IGNORE_UNSTABLE_GADGET_DEFINITION=1
/snap/bin/ubuntu-device-flash --verbose core 16 -o snappy.img --channel
edge  --gadget pc --kernel pc-kernel --os ubuntu-core

Determining gadget configuration

 836.00 KB / 836.00 KB [==] 100.00% 12.77
MB/s 0

Partitioning...

Formatting...

Mounting...

Provisioning...

 74.40 MB / 74.40 MB [===] 100.00% 24.02
MB/s 3s

 74.40 MB / 74.40 MB [===] 100.00% 59.46
MB/s 1s

 110.54 MB / 110.54 MB [=] 100.00% 23.19
MB/s 4s

 836.00 KB / 836.00 KB [==] 100.00% 68.23
MB/s 0

Unmounting...

New image complete

Summary:

 Output: snappy.img

 Architecture: amd64

 Channel: edge

 Version: 0

On Wed, Aug 31, 2016 at 11:11 AM, Yann Sionneau 
wrote:

>
>
> Le 08/31/2016 à 10:56 AM, Simon Fels a écrit :
> > On 31.08.2016 10:49, Yann Sionneau wrote:
> >> Hello,
> >>
> >> It seems the new (snapp'ed) ubuntu-device-flash cannot use my own gadget
> >> snap anymore.
> >>
> >> yann@imperium$ sudo -E /snap/bin/ubuntu-device-flash --verbose core 16
> >> -o snappy.img --channel edge  --gadget $PWD/../../../xxx_2.0_all.snap
> >> --kernel ../../../xxx_kernel/xxx-kernel_3.10.97_armhf.snap --os
> >> ubuntu-core --developer-mode --enable-ssh
> >> cannot use
> >> "/home/yann/dev/snappy_xxx/tools/snappy/xxx_image/../../.
> ./xxx_2.0_all.snap",
> >> must be one of: ["canonical-i386" "canonical-pc" "pc" "canonical-pi2"
> >> "pi2" "pi3" "canonical-dragon" "dragonboard" "beagleblack"
> "plano-amd64"]
> >>
> >> Is porting Snappy on non official devices not supported anymore?
> > No, that is not the case.
> >
> >> How is it supposed to work now? I must confess that I am blocked in my
> >> work because of this change, I cannot generate nor flash images anymore
> >> and my project is thus stalled :/
> > We're currently in a phase where ubuntu-device-flash is still being used
> > but the future will be a new tool called ubuntu-image which will allow
> > you to create images in a much better way.
> Yes I've heard of the new ubuntu-image tool. It's a good idea to make
> this new tool!
> It's just important I think that the old tools stay functional until the
> new ones are ready.
> >
> > From what I got from Michael a lot things are currently hard coded
> > inside ubuntu-device-flash. See [1] for the relevant code bits.
> >
> > You can override the sanity check for the gadget names with setting
> > UBUNTU_DEVICE_FLASH_IGNORE_UNSTABLE_GADGET_DEFINITION=1 in the command
> > line you're executing. Didn't tested this but maybe Michael can comment
> > how this should work.
> Ok, the environment variable works, thanks a lot!
> Now I get this:
>
> error while executing external command mkfs.ext4 -F -L writable
> /dev/mapper/loop3p2: mke2fs 1.42.13 (17-May-2015)
> Invalid filesystem option set:
> has_journal,extent,huge_file,flex_bg,metadata_csum,64bit,
> dir_nlink,extra_isize
>
> any idea?
>
> >
> > regards,
> > Simon
> >
> > [1]:
> > https://bazaar.launchpad.net/~mvo/goget-ubuntu-touch/
> minimal-first-boot-no-prepare-image/view/head:/ubuntu-
> device-flash/snappy.go#L116
> >
>
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>



-- 
- Loïc
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Build snaps in container

2016-08-23 Thread Loïc Minier
Hi,

On Tue, Aug 16, 2016 at 3:39 PM, Matt Bruzek <matthew.bru...@canonical.com>
wrote:

> It is also available on docker hub: https://hub.docker.com/r/jujus
> olutions/snapbox/
>

Thanks for sharing! Didier and Sergio had already published Docker images
with snapcraft:
https://hub.docker.com/r/didrocks/snapcraft/
https://hub.docker.com/r/sergiusens/snapcraft/
I guess we should consolidate these and have some kind of official Ubuntu
namespace and images.

Cheers,
- Loïc Minier
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft