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

2016-08-24 Thread knitzsche
I have been able to build armhf snaps on my amd64 host using an armhf 
pbuilder chroot.


Cheers,
Kyle

On 08/24/2016 01:34 AM, XiaoGuo Liu wrote:

Hi,

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?

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: Shared content example - ubuntu-app-platform

2016-11-30 Thread knitzsche


On 11/30/2016 08:39 AM, Stuart Bishop wrote:

I can't even find anything about the plugs: stanza in snapcraft.yaml,
but that might just be a lack of Google juice.


I would have expected "plugs:" to be documented here:

http://snapcraft.io/docs/build-snaps/syntax

In the "Apps and commands" section. But it is not present it seems.

For this I just filed: 
https://github.com/ubuntudesign/snapcraft.io/issues/226


Also, the "apps:" section does not clearly explain the required 
hierarchy of keys. The actual app name key is not clearly explained:


You need something like this:

apps:
  appname1: <-- this is not obvious from docs
command:
plugs:
  appname2: <-- this is not obvious from docs
command:
plugs:

This is not as clear as it could/should be:
"apps (yaml subsection) A map of keys for applications"

For this second point I filed 
https://github.com/ubuntudesign/snapcraft.io/issues/225







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


Re: Shared content example - ubuntu-app-platform

2016-12-07 Thread knitzsche

Great idea!

How do consumers (snap devs) know the lib/API versions contained? On 
touch we had the concept of a "framework", whose version implied a set 
of API commitments. Since this puts QT together with other (Ubuntu &etc) 
 libs, what's the reasonable expectation?


On 11/11/2016 02:46 PM, Timo Jyrinki wrote:

Hi,

I hinted at this earlier but 'ubuntu-app-platform' (name bikeshedded a
few times) is now there offering a huge amount of libraries via
content interface. We're using it for some builds of for example
Calculator, Calendar and other apps, dropping the size of those from
50+MB to even under 1MB.

It's used for the use case of using a same version of Qt (5.6.1) and
certain Ubuntu libraries on disk space constrained devices for several
(sn)apps, but it might also serve you as an example of how you could
share content similarly between your own snaps.

How it works is that there is now a snap in the store and an
associated cloud part 'desktop-ubuntu-app-platform' (see documentation
at the bottom of https://wiki.ubuntu.com/snapcraft/parts) that one can
use to easily plug into the platform offered by ubuntu-app-platform.
The extremely simple example produces 1MB snap
(https://code.launchpad.net/~timo-jyrinki/+snap/uitk-gallery/+build/9676/+files/uitk-gallery_0.1_amd64.snap)
that uses the hundreds of megabytes of shared libraries from the
platform snap.

Since this might be interesting approach to share libraries or other
content between several snap in general, I invite you to look at the
slot side maintained by the Ubuntu SDK team -
https://git.launchpad.net/ubuntu-app-platform/tree/snapcraft.yaml -
and the plug side of the simple(st) example -
http://bazaar.launchpad.net/~timo-jyrinki/+junk/uitk-gallery/view/head:/snapcraft.yaml

I hope this could help people interested in similar content sharing
use cases. Note that it's useful to define the "default-provider"
already even though the functionality of the field (automatic
downloading of the providing snap) is not yet implemented.

-Timo



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


scratch-qt project

2017-01-04 Thread knitzsche
Over the holidays, I scratched an itch to write a Qt/QML/C++ threaded 
app snapped with ubuntu-app-platform.


Goals:
* C++ backend using controller/worker thread approach so QML GUI is 
non-blocking when user taps buttons and backend methods run

* Concurrent execution of backends
* Easy to use custom QML item/C++ plugin supporting the above.

So it's my approximation of a responsive and extensible dashboard style 
QML/C++ demo app based on ubuntu-app-platform libs.


Explained here: 
http://kylenubuntu.blogspot.com/2017/01/scratch-qt-snap-with-ubuntu-app-platform.html


Cheers,
KyleN



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


Re: How to add custom libs to snap?

2017-01-09 Thread knitzsche



On 01/09/2017 05:14 AM, Alan Pope wrote:

Hi Andrey,

On 9 January 2017 at 08:59, Andrey Rogovsky  wrote:

I need add custom precompiled libs (no sources) to my snap.
I have directory with libs. Need put it into snap. How I can do it?


I achieved this with one of my snaps by simply using the copy plugin
to put the libs into lib/ and then having a launch script
which ensures the LD_LIBRARY_PATH is set appropriately.


If memory serves, the copy plugin is deprecated in favor of the dump 
plugin. Here's a small example:


environment:
plugin: dump
source: .
organize:
  run.wrapper: bin/run

It means there's a file in root dir (".") named run.wrapper and it 
should be copied (dumped) to bin/run in the snap, as I understand it.


Cheers,
Kyle



So, (assuming you're only targetting amd64) copy the libs to
lib/x86_64-linux-gnu and in your launcher have something along the
lines.

export LD_LIBRARY_PATH=$SNAP/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH

Cheers,



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


connecting a non-auto interface, automatically

2017-02-07 Thread knitzsche
What is the approach to connect interfaces that are not auto-connecting 
without user intervention?


That is, there's a snap (built into an image) that declares the 
log-observe plug. Log-observe interface does not auto-connect [1]. In 
this product, the user does not have a console, so they cannot connect 
the snap plug/interface.


So, how does one configure the system to connect sthis? Via the gadget 
snap prepare-device hook script perhaps?


Cheers,
kyleN

[1] https://docs.ubuntu.com/core/en/reference/interfaces/index

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


launchpad snap recipe fails with classic confinement

2017-02-09 Thread knitzsche

Is building a snap with *classic* confinement from a recipe supported on lp?

I created a snap recipe for my imported git branch and tried to build, 
and the builds fail with:


Preparing to pull env
classic confinement requires the core snap to be installed. Install it 
by running `snap install core`.

Traceback (most recent call last):
  File "/usr/share/launchpad-buildd/slavebin/buildsnap", line 199, in main
builder.pull()
  File "/usr/share/launchpad-buildd/slavebin/buildsnap", line 136, in pull
env=env)
  File "/usr/share/launchpad-buildd/slavebin/buildsnap", line 92, in 
run_build_command

self.chroot(["/bin/sh", "-c", command], echo=echo)
  File "/usr/share/launchpad-buildd/slavebin/buildsnap", line 66, in chroot
"/usr/bin/sudo", "/usr/sbin/chroot", self.chroot_path] + args)
  File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['/usr/bin/sudo', '/usr/sbin/chroot', 
'/home/buildd/build-SNAPBUILD-21071/chroot-autobuild', 'linux32', 
'/bin/sh', '-c', 'cd /build/make-system-user && env LANG=C.UTF-8 
https_proxy=http://snap-proxy.launchpad.net:3128 
http_proxy=http://snap-proxy.launchpad.net:3128 
SNAPCRAFT_LOCAL_SOURCES=1 snapcraft pull']' returned non-zero exit status 1



cheers,
kyleN

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


Re: Exposing dbus interface and using it inside the same snap

2017-02-13 Thread knitzsche

Hi Jamie,

Can you please point out the error in the below?

I believe he is getting an error like this (perhaps truncated):

Feb 13 19:33:07 ubuntu snap[3207]: GLib.Error: g-dbus-error-quark: 
GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Connection ":1.49" 
is not allowed to own the service "com.screenly.playlist" due to 
security policies in the c
Feb 13 19:33:07 ubuntu snap[3207]: 0, timeout_to_glib(timeout), 
None).unpack()


thanks,
kyleN

On 02/10/2017 12:35 PM, Sergey Borovkov wrote:

Hi, I've been struggling with getting dbus interface exposed. I am
getting this error during runtime:
GLib.Error: g-dbus-error-quark:
GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Connection
":1.1160" is not allowed to own the service "com.screenly.playlist" due
to security policies in the configuration file (9)

jdstrand helped me on IRC, and told me I need to have a slot and a plug
in my snap. I am doing something wrong though, can someone help out with
how it's correctly supposed to be used?

apps:
  playlist:
command: usr/bin/playlist-service.sh
daemon: simple
plugs: [network-bind, network, playlist-dbus]

  websocket:
command: usr/bin/websocket-service.sh
daemon: simple
plugs: [network-bind, network, dbus]
slots: [websocket-dbus]

slots:
  playlist-dbus:
interface: dbus
name: com.screenly
bus: system

plugs:
  websocket-dbus:
interface: dbus
name: com.screenly
bus: system




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


Re: Issue with ubuntu OS snap first time boot.

2017-02-15 Thread knitzsche
probably this bug: 
https://bugs.launchpad.net/ubuntu/+source/linux-raspi2/+bug/1652270



On 02/13/2017 11:04 PM, XiaoGuo Liu wrote:

Today, I had the same problem. I downloaded the Raspberry Pi3 image at:

http://cdimage.ubuntu.com/ubuntu-core/16/stable/

The date is: ubuntu-core-16-pi3.img.xz
2017-01-26
20:29316M


After I flashed it, I had the same issue as described in the above
email. Attached please find the captured picture.

The old image in the Ubuntu Core could not boot, and it stopped at
"booting kernel". I thought it was an old image flashed long time ago. I
decided to take the new one.

Thanks & best regards,
XiaoGuo



On Tue, Jan 10, 2017 at 9:35 PM, Ajay Pandey mailto:ajay.pan...@einfochips.com>> wrote:

Hi All,

__ __

We are facing issue with the Ubuntu OS snap first time boot
console-conf.

__ __

We have generated the id_rsa.pub key and put it in the launchpad.net
 as well as the login.ubuntu.com
 profiles.

__ __

Please find below the error that we are getting:

__ __

/Profile setup

Enter an email address from your account in the store.

 Email address:   *x...@gmail.com
(example)*

If you do not have an account, visit https://login.ubuntu.com
to create one.

  Creating user
failed:
*error: while creating user: cannot communicate with server:
Post
  http://localhost/v2/create-user
: EOF*


   Contacting
store...

   [ Done   ]
   [ Cancel ]



  40 %/


*
eInfochips Business Disclaimer: This e-mail message and all
attachments transmitted with it are intended solely for the use of
the addressee and may contain legally privileged and confidential
information. If the reader of this message is not the intended
recipient, or an employee or agent responsible for delivering this
message to the intended recipient, you are hereby notified that any
dissemination, distribution, copying, or other use of this message
or its attachments is strictly prohibited. If you have received this
message in error, please notify the sender immediately by replying
to this message and please delete it from your computer. Any views
expressed in this message are those of the individual sender unless
otherwise stated. Company has taken enough precautions to prevent
the spread of viruses. However the company accepts no liability for
any damage caused by any virus transmitted by this email.

*


--
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


content interface, DENIED mounting $SNAP/mydir

2017-03-02 Thread knitzsche

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.)


To auto connect the interface (via a store snap declaration), I suppose 
the directory must be present at install time. So  creating the dir at 
run time does not seem sufficient for the auto-connect requirement.


Help appreciated.

== Details when trying to use SNAP dir for content sharing:

snapcraft.yaml snippet:

apps:
  wifi-ap:
command: bin/wifi-ap
plugs: [control, content]

plugs:
  control:
interface: content
content: socket-directory
target: $SNAP/sockets
parts:
  controldir:
plugin: dump
source: .
prime:
  - sockets

I connect my snap to the interface apparently successfully:
$ sudo snap connect serv:control wifi-ap:control

Verify connection:
$ snap interfaces | grep serv | grep "wifi-ap:"
wifi-ap:control   serv

But the bind mount was DENIED:
Mar 02 18:01:02 localhost.localdomain kernel: audit: type=1400 
audit(1488477662.292:350110): apparmor="DENIED" operation="mount" 
info="failed srcname match" error=-13 
profile="/usr/lib/snapd/snap-confine" name="/snap/serv/x3/sockets/" 
pid=11461 comm="snap-confine" srcname="/var/snap/wifi-ap/94/sockets/" 
flags="rw, bind"


Both wifi-ap snap and my snap seem to have the required directories:
$ ls /var/snap/wifi-ap/94/sockets/
control
knitzsche@localhost:~$ ls /snap/serv/x3/
bin  command-run.wrapper  command-scan.wrapper  command-wifi-ap.wrapper 
meta  snap  sockets


Cheers,
kyleN




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


Re: workaround for connect no autoconnect interfaces without login on system

2017-03-07 Thread knitzsche
I don't think the prepare-device script can be used to auto connect, 
probably because it runs confined.


You can request the store to add an auto connection statement to the 
snap declaration assertion.


Cheers
kyleN


On 03/07/2017 05:19 AM, Nicolino Curalli wrote:

Hi all,
I implemented hints from James but it doesn't works.

I create a new gadget snap based on pc gadget for amd64, adding a hook 
directory with a prepare-device hook script.
I make this script executable.
I build  an image containg my gadget (domotz-pc), pc-kernel and nmap snap from 
store.

The layout of my new gadget snap ( named domotz-pc )  just installed is :

./

-rwxr-xr-x 1 root root 753 Mar  7 00:04 meta/gadget.yaml
-rw-r--r-- 1 root root 230 Mar  7 09:11 meta/snap.yaml

meta/gui:

-rwxr-xr-x 1 root root 39908 Nov 30 08:18 icon.png

meta/hooks:

-rwxr-xr-x 1 root root 134 Mar  7 09:09 prepare-device

The prepare-device script content is:

--
#!/bin/sh

# enabling network-control interface slot for nmap network-control plug
snap connect nmap:network-control :network-control
--

After the registration of board by console-conf i find the following I find the 
following situation on interface side:

:network   nmap
:network-bind  nmap
-  nmap:network-control

instead

:network   nmap
:network-bind  nmap
:network-control  nmap

as I wish.

I also  have  the following error from Apparmor:

Mar  7 02:23:10 localhost /usr/lib/snapd/snapd[936]: taskrunner.go:353: DEBUG: 
Running task 77 on Do: Run prepare-device hook
Mar  7 02:23:10 localhost kernel: [11351843419.508357] audit: type=1400 audit(1488853390.962:25): apparmor="DENIED" 
operation="exec" profile="snap.domotz-pc.hook.prepare-device" name="/usr/bin/snap" pid=1428 
comm="prepare-device" requested_mask="x" denied_mask="x" fsuid=0 ouid=0
Mar  7 02:23:10 localhost /usr/lib/snapd/snapd[936]: task.go:303: DEBUG: 
2017-03-07T02:23:10Z ERROR run hook "prepare-device": 
/snap/domotz-pc/x1/meta/hooks/prepare-device: 4: 
/snap/domotz-pc/x1/meta/hooks/prepare-device: snap: Permission denied
Mar  7 02:28:08 localhost systemd[1]: Starting Update resolvconf for networkd 
DNS...
Mar  7 02:28:08 localhost systemd-timesyncd[795]: Network configuration 
changed, trying to establish connection.
Mar  7 02:28:08 localhost systemd[1]: Started Update resolvconf for networkd 
DNS.
Mar  7 02:28:08 localhost systemd-timesyncd[795]: Synchronized to time server 
91.189.94.4:123 (ntp.ubuntu.com).
Mar  7 02:28:10 localhost /usr/lib/snapd/snapd[936]: taskrunner.go:353: DEBUG: 
Running task 80 on Do: Run prepare-device hook
Mar  7 02:28:10 localhost kernel: [11351843719.476882] audit: type=1400 audit(1488853690.938:26): apparmor="DENIED" 
operation="exec" profile="snap.domotz-pc.hook.prepare-device" name="/usr/bin/snap" pid=1455 
comm="prepare-device" requested_mask="x" denied_mask="x" fsuid=0 ouid=0
Mar  7 02:28:10 localhost /usr/lib/snapd/snapd[936]: task.go:303: DEBUG: 
2017-03-07T02:28:10Z ERROR run hook "prepare-device": 
/snap/domotz-pc/x1/meta/hooks/prepare-device: 4: 
/snap/domotz-pc/x1/meta/hooks/prepare-device: snap: Permission denied
Mar  7 02:33:07 localhost systemd[1]: Starting Update resolvconf for networkd 
DNS...
Mar  7 02:33:07 localhost systemd-timesyncd[795]: Network configuration 
changed, trying to establish connection.
Mar  7 02:33:07 localhost systemd[1]: Started Update resolvconf for networkd 
DNS.
Mar  7 02:33:07 localhost systemd-timesyncd[795]: Synchronized to time server 
91.189.94.4:123 (ntp.ubuntu.com).
Mar  7 02:33:10 localhost /usr/lib/snapd/snapd[936]: taskrunner.go:353: DEBUG: 
Running task 83 on Do: Run prepare-device hook
Mar  7 02:33:10 localhost kernel: [11351844019.491749] audit: type=1400 audit(1488853990.964:27): apparmor="DENIED" 
operation="exec" profile="snap.domotz-pc.hook.prepare-device" name="/usr/bin/snap" pid=1475 
comm="prepare-device" requested_mask="x" denied_mask="x" fsuid=0 ouid=0
Mar  7 02:33:10 localhost /usr/lib/snapd/snapd[936]: task.go:303: DEBUG: 
2017-03-07T02:33:10Z ERROR run hook "prepare-device": 
/snap/domotz-pc/x1/meta/hooks/prepare-device: 4: 
/snap/domotz-pc/x1/meta/hooks/prepare-device: snap: Permission denied
Mar  7 02:38:07 localhost systemd[1]: Starting Update resolvconf for networkd 
DNS...
Mar  7 02:38:07 localhost systemd-timesyncd[795]: Network configuration 
changed, trying to establish connection.
Mar  7 02:38:07 localhost systemd[1]: Started Update resolvconf for networkd 
DNS.
Mar  7 02:38:07 localhost systemd-timesyncd[795]: Synchronized to time server 
91.189.94.4:123 (ntp.ubuntu.com).
Mar  7 02:38:10 localhost /usr/lib/snapd/snapd[936]: taskrunner.go:353: DEBUG: 
Running task 86 on Do: Run prepare-device hook
Mar  7 02:38:10 localhost /usr/lib/snapd/snapd[936]: task.go:303: DEBUG: 
2017-03-07T02:38:10Z ERROR run hook "prepare-device": 
/snap/domotz-pc/x1/meta/hooks/prepare-device: 4: 
/snap/domotz-pc/x1/meta/hooks/prepare-device: snap: Permission denied
Mar  7 02:38:10 localhost kernel: [1135

Re: content interface, DENIED mounting $SNAP/mydir

2017-03-09 Thread knitzsche
I'd like to propose adding a way to declare in snapcraft.yaml that a 
folder under SNAP_COMMON (or SNAP_DATA) be created if it does not exist.


Even though interface hooks (future) would seem to support this, it 
seems a common case so a simpler solution seems apt.


The particular issue it would solve is auto connecting to a content 
interface mount. Currently, one needs to create the SNAP_COMMON/dir 
(into which the content is mounted) *before* connecting the interface, 
and it is hard to do that when the interface is auto-connected.


Cheers,
kyleN


On 03/02/2017 01:33 PM, knitzsche 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.)

To auto connect the interface (via a store snap declaration), I suppose
the directory must be present at install time. So  creating the dir at
run time does not seem sufficient for the auto-connect requirement.

Help appreciated.

== Details when trying to use SNAP dir for content sharing:

snapcraft.yaml snippet:

apps:
  wifi-ap:
command: bin/wifi-ap
plugs: [control, content]

plugs:
  control:
interface: content
content: socket-directory
target: $SNAP/sockets
parts:
  controldir:
plugin: dump
source: .
prime:
  - sockets

I connect my snap to the interface apparently successfully:
$ sudo snap connect serv:control wifi-ap:control

Verify connection:
$ snap interfaces | grep serv | grep "wifi-ap:"
wifi-ap:control   serv

But the bind mount was DENIED:
Mar 02 18:01:02 localhost.localdomain kernel: audit: type=1400
audit(1488477662.292:350110): apparmor="DENIED" operation="mount"
info="failed srcname match" error=-13
profile="/usr/lib/snapd/snap-confine" name="/snap/serv/x3/sockets/"
pid=11461 comm="snap-confine" srcname="/var/snap/wifi-ap/94/sockets/"
flags="rw, bind"

Both wifi-ap snap and my snap seem to have the required directories:
$ ls /var/snap/wifi-ap/94/sockets/
control
knitzsche@localhost:~$ ls /snap/serv/x3/
bin  command-run.wrapper  command-scan.wrapper  command-wifi-ap.wrapper
meta  snap  sockets

Cheers,
kyleN






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


Re: Updating a gadget snap

2017-03-09 Thread knitzsche

Hi,

Is there a description/understanding of to expect with a time frame?

This information would help Renat and others who want to be sure that 
products made today have an upgrade path in the field.


Cheers,
kyleN

On 03/08/2017 05:54 AM, Ренат Галимов wrote:

Thanks, Jamie.

The reason we need this feature is to deliver a product to out customers as
soon as possible
and then apply changes made in the rpi3 gadget snap as they become ready.

Best regards,
Renat

On Wed, Mar 8, 2017 at 1:06 PM, Jamie Bennett 
wrote:


Hi Renat,

We are working on making parts of the gadget snap updatable for example, on
RPi, updating config.txt makes sense, but as you say this is a dangerous
area to be playing with as bricking the device is possible. Michael knows
more as he has be directly working on this lately.

Regards,
Jamie.

On Wed, Mar 8, 2017 at 9:43 AM, Ренат Галимов  wrote:


Hi, everyone.

We need a way to make "snap.yaml," hooks and, possibly, other stuff of

our

gadget snap updateable.

The only way now I see is to provide a hook, which will download or get
files from the filesystem and replace files on the image by them, but

such

a solution seem dangerous to me, because of the violation of the snaps
rollback idea.

Is there anything related to the gadget snaps update planned, or, maybe,
somebody already resolved the issue?


Thank you,
Renat
--
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



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


Re: workaround for connect no autoconnect interfaces without login on system

2017-03-10 Thread knitzsche

Hi Jamie

On 03/10/2017 07:20 AM, Jamie Strandboge wrote:

Gadget developers are supposed to have a voice in what is autoconnected on
their
devices and it seems that Nicolino is asking for advice on how to make that
happen. This comes up from time to time so once there is a definitive answer,
this sounds like a great opportunity for some documentation. :)


Do you, or does anyone, know how to auto connect from a gadget snap?

Cheers,
Kyle

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


Re: Issues using dbus in strict

2017-03-31 Thread knitzsche

Hi folks, any tips here to unblock this critical issue? Thanks

On 03/31/2017 10:55 AM, Sergey Borovkov wrote:

Hi. I am running a couple of daemons (daemon: simple) and they interact
between each other using dbus. Unfortunately I've ran into the issue when
porting them from devmode to strict, I am getting this backtrace just
trying to obtain SystemBus in python:

Mar 31 12:44:02 localhost.localdomain snap[1466]: GLib.Error:
g-io-error-quark: Could not connect: Permission denied (14)
Mar 31 12:44:02 localhost.localdomain snap[1466]: return Gio.bus_get_sync(type,
None).pydbus
Mar 31 12:44:02 localhost.localdomain snap[1466]: File "/snap/screenly-
client/165/lib/python3.5/site-packages/pydbus/bus.py", line 19, in bus_get
Mar 31 12:44:02 localhost.localdomain snap[1466]: return bus_get(Bus.Type.
SYSTEM)
Mar 31 12:44:02 localhost.localdomain snap[1466]: File "/snap/screenly-
client/165/lib/python3.5/site-packages/pydbus/bus.py", line 57, in SystemBus
Mar 31 12:44:02 localhost.localdomain snap[1466]: self.bus = SystemBus()
Mar 31 12:44:02 localhost.localdomain kernel: audit: type=1400
audit(1490964242.523:72): apparmor="DENIED" operation="connect" profile=
"snap.screenly-client.websocket" name="/run/dbus/system_bus_socket"
pid=1466 comm="python3" req
Mar 31 12:44:02 localhost.localdomain audit[1466]: AVC apparmor="DENIED"
operation="connect" profile="snap.screenly-client.websocket" name="/
run/dbus/system_bus_socket" pid=1466 comm="python3" requested_mask="wr"
denied_mask="wr"

I am not sure if I need to use some additional interfaces - to get it
working under devmode I've used the following code (And I can't find
anything relevant in wiki):

  playlist:
command: usr/bin/playlist-service.sh
daemon: simple
plugs: [network-bind, network]
slots: [playlist-dbus-server]

  websocket:
command: usr/bin/websocket-service.sh
daemon: simple
plugs: [network-bind, network, playlist-dbus-client]

slots:
  playlist-dbus-server:
interface: dbus
name: com.screenly.playlist
bus: system

plugs:
  playlist-dbus-client:
interface: dbus
name: com.screenly.playlist
bus: system



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


Re: Issues using dbus in strict

2017-04-03 Thread knitzsche

Hi Jamie,

Do you have any input on this issue?

thanks

On 03/31/2017 10:55 AM, Sergey Borovkov wrote:

Hi. I am running a couple of daemons (daemon: simple) and they interact
between each other using dbus. Unfortunately I've ran into the issue when
porting them from devmode to strict, I am getting this backtrace just
trying to obtain SystemBus in python:

Mar 31 12:44:02 localhost.localdomain snap[1466]: GLib.Error:
g-io-error-quark: Could not connect: Permission denied (14)
Mar 31 12:44:02 localhost.localdomain snap[1466]: return Gio.bus_get_sync(type,
None).pydbus
Mar 31 12:44:02 localhost.localdomain snap[1466]: File "/snap/screenly-
client/165/lib/python3.5/site-packages/pydbus/bus.py", line 19, in bus_get
Mar 31 12:44:02 localhost.localdomain snap[1466]: return bus_get(Bus.Type.
SYSTEM)
Mar 31 12:44:02 localhost.localdomain snap[1466]: File "/snap/screenly-
client/165/lib/python3.5/site-packages/pydbus/bus.py", line 57, in SystemBus
Mar 31 12:44:02 localhost.localdomain snap[1466]: self.bus = SystemBus()
Mar 31 12:44:02 localhost.localdomain kernel: audit: type=1400
audit(1490964242.523:72): apparmor="DENIED" operation="connect" profile=
"snap.screenly-client.websocket" name="/run/dbus/system_bus_socket"
pid=1466 comm="python3" req
Mar 31 12:44:02 localhost.localdomain audit[1466]: AVC apparmor="DENIED"
operation="connect" profile="snap.screenly-client.websocket" name="/
run/dbus/system_bus_socket" pid=1466 comm="python3" requested_mask="wr"
denied_mask="wr"

I am not sure if I need to use some additional interfaces - to get it
working under devmode I've used the following code (And I can't find
anything relevant in wiki):

  playlist:
command: usr/bin/playlist-service.sh
daemon: simple
plugs: [network-bind, network]
slots: [playlist-dbus-server]

  websocket:
command: usr/bin/websocket-service.sh
daemon: simple
plugs: [network-bind, network, playlist-dbus-client]

slots:
  playlist-dbus-server:
interface: dbus
name: com.screenly.playlist
bus: system

plugs:
  playlist-dbus-client:
interface: dbus
name: com.screenly.playlist
bus: system



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