/srv/irclogs.ubuntu.com/2016/06/11/#snappy.txt

mhall119d_ed: they aren't completely blocked, but access to them is mediated so apps can be given what they need and nothing more00:00
d_edmediated by apparmor in the dbus server?00:00
mhall119access is determined by what "interface" they have a plug for, and that plug being connected (either automatically or with user concent, depending on the interface) to the appropriate slot00:01
mhall119d_ed: I believe it's apparmor, yes, but jdstrand or mdeslaur can probably confirm00:01
mhall119on distros without apparmor, snaps will have to run without confinement until an alternative can be integrated00:02
d_edoh that's another topic I want clarifying:00:02
d_eddo you intent for snaps to be a thing on non Ubuntu platforms?00:02
mhall119absolutely00:03
d_edmost the snaps are linking against libs from the system aren't they?00:03
mhall119at the very least, other Linux platforms00:03
d_edrather than all being in the snap layers00:03
mhall119no, they link against the "core" snap, which is a stripped down Ubuntu00:03
mhall119and soon they will be able to link to libs in a common shared snap00:04
mhall119so the snappy system should be insulated from the host system00:05
mhall119which would allow snaps to run on Fedora, for example, without knowing or caring that they're on Fedora00:05
mhall119d_ed: importantly, snappy as a project is welcoming to any changes/patches that are needed to make it work on other distros00:06
d_edok, and when buidling with snapcraft we can link .deb depencies, that'll always be Ubuntu ones because it's all from that core snap00:07
sgclarkmm I don't think so00:07
sgclarkI am using Neon debs atm00:08
mhall119I don't think the deb dependencies are necessarily related to the core snap, that was just a shortcut to getting pre-build binaries into the snap filesystem00:08
sgclarkand I am going to be so overwehlmingly busy next week, I don't know that anything can help me lol. I also have to get all these things on my kde ci00:09
sgclarkbut hey, can't complain, I will be busy in the comfort of the Swiss alps.00:11
mhall119yeah, that's a pretty sweet sprint location00:12
d_edRE DBus: It is restricted in the apparmor profile of the relevant snap00:14
d_edwith a lovely whitelist for gtk things00:14
sgclarkhah00:14
d_edbut we can ship our own apparmor profiles, so that's quite good00:15
sgclarkok cool00:15
mhall119d_ed: ideally for KDE apps we would minimize most of the .deb dependencies, and build frameworks and qt00:15
sgclarkI think we might go the opposite00:15
sgclarkactually. to reduce repeat work00:16
d_edwe're building our for flat-pak00:16
mhall119d_ed: it's in the profile, yes, the snap's meta-data is used to generate a custom profile from a pre-defined template00:16
sgclarkI am getting the latest and greatest using neons debs00:16
sgclarkanyway, i am trying it, sitter asked me too and I have a hard time saying no to him lol00:17
d_edallows us to tweak a few things to be better suited for running containerised (KDE_FORK_SLAVES for example, as we can't reach klauncher)00:17
d_ed:D00:17
* mhall119 is in over his head with that00:17
mhall119d_ed: you're building apparmor profiles for flatpak?00:19
d_edno, no, we build our own frameworks and Qt00:20
mhall119oh, ok00:20
mhall119then yes, that can be reused to build snaps00:20
d_edflatpak doesn't use apparmor for DBus filtering, instead you have a proxy process (per "pak") that acts as a gateway between two busses00:20
d_edit's a bit over complex00:20
mhall119do apps need to target that proxy specifically, or is it like a transparent proxy that looks like dbus?00:22
d_edin theory or in practice?00:22
mhall119you mean they're not the same? :)00:22
sgclarklol00:22
d_edthe difference between theory and in practice, is that in theory, they're both the same00:23
* mhall119 loves that saying00:23
sgclarklol00:23
sgclarkok I have to finish packing, leave tomorrow, see you Sunday d_ed!00:23
d_edsee you00:24
d_edmhall119: I assume adding custom plugs/slots would be changes to snappy?00:24
mhall119d_ed: so snapd defined "interfaces", on one side of which is a plug and the other side is a slot00:25
mhall119interfaces for now are built into snapd itself00:26
mhall119but any snap can provide a plug or a slot for one of those interfaces00:26
d_edah! that's quite nice00:26
mhall119an example I'm looking at currently is Elementary's Contractor dbus service. That we would add to snapd as an interface, then they would provide a pantheon slot for that interface, and geary would provide a plug for it, and then snappy would connect the two together00:27
mhall119interfaces are fairly new, and I don't think anybody knows yet how we're going to scale that out, but having more use-cases like Contractor will help us figure that out00:29
mhall119sgclark: have a safe trip00:30
mhall119and you too d_ed :)00:30
d_edmore questions: My Ubuntu box runs snaps with "ubuntu-core-launcher" is this replaced by "smap-confine" ?00:32
mhall119sgclark: d_ed: I will be off work on Monday, though probably online, you can ping me if you need more information. Or just ask in here, which should be more active during Randa's daytime :)00:33
mhall119d_ed: that I don't know, several things are being renamed to be less "ubuntu-" and more distro-agnostic, so it could be00:33
d_ededit, git logs says it is00:34
d_edshould have done that first00:34
mhall119snappy is evolving rapidly right now, which is part of the reason we want to have as many examples and use-cases from outside of Ubuntu and our apps as we can, so they can help direct that evolution00:35
mhall119d_ed: sgclark: something else you might be interested in, the snap store has beta-testing channels now, and snapcraft can push updates there from the command-line, so it's possible to use your CI infrastructure to publish the very latest updates to people who want to subscribe to that channel00:38
d_edfyi, snapd doesn't appear on the repo listings of https://github.com/ubuntu-core00:39
sgclarkmhall119: oh cool!00:39
d_edbut typing it manually works00:39
mhall119d_ed: It's on https://github.com/snapcore00:40
d_eds/snapd/snappy00:40
mhall119again, moving away from ubuntu-* naming for this00:40
d_edah ok00:40
d_edmakes sense00:43
d_edthen I'm finally out of questions00:43
mhall119I'm sure that will chance come Monday :)00:43
sgclarkyes00:44
mhall119as I said, folks in here on Monday will be able to answer any other questions you have, and I will be off-and-on around on Monday and then back fully on Tuesday00:45
mhall119I hope you both enjoy the Alps00:46
sgclarkty00:46
=== JanC is now known as Guest3405
tsimonq2so when I try to execute snaps, I get the following error thrown at me: failed to create user data directory. errmsg: Permission denied07:09
tsimonq2anyone know what's going on here?07:09
zygao/08:41
* zyga gets to work08:41
=== Aria|away is now known as Aria22
lundmarhi, is it possible in a snap .yaml to somehow reuse eg. the version as a value in eg. source?  For example: source: https://github.com/tio/tio/releases/download/v$version/tio-$version.tar.xz ?10:52
lundmar*variable10:53
lundmarhmm, why does a 1.20 version collapse into 1.2? Does snapcraft really force this type of version scheme?10:56
lundmarhmm, version: "1.20" did the trick so it does not collapse to 1.211:01
lundmaryaml magic aye11:02
zygalundmar: not today. but recall that snapcraft generates snap.yaml12:27
zygalundmar: so there's a lot of room for variables and other stuff12:28
zygalundmar: but the proper layer is above snap.yaml,12:28
zygalundmar: so that complexity on snapd is not increased12:28
lundmarzyga: it's one of those convenience things. Would be nice not having to change the .yaml in multiple places just to bump version.12:29
zygalundmar: and it is possible, just do it in snapcraft12:49
lundmarzyga: I'm not sure what you mean, I'm already using snapcraft - here is my snap: http://pastebin.com/zPZ62zyE12:51
lundmarI don't know of any way to reuse version in eg. source but I'm not yaml expert either.12:52
zygalundmar: sorry, I meant that this is something that snapcraft could support13:47
zygalundmar: then the variable could be used in snapcraft.yaml13:47
lundmarzyga: got it.13:47
zygalundmar: and then snapcraft would replace the variable and generate the same snap.yaml we support today13:47
zygalundmar: putting the complexity where it hurts less13:48
lundmarit would probably be a good feture for select key variables like version, name etc.13:48
lundmarfeature*13:48
=== oparoz_ is now known as oparoz
zygajdstrand: do we have to support ~/.config/pulse/cookie?15:03
=== oparoz_ is now known as oparoz
tsimonq2sorry for the repeat, but when I try to execute snaps, I get the following error thrown at me: failed to create user data directory. errmsg: Permission denied17:53
tsimonq2anyone know what's going on here?17:54
tsimonq2that's for multiple snaps17:54
tsimonq2I even have a snap *I* created in devmode that doesn't work because of that error17:55
tsimonq2I'll fire up a clean VM and try, but it's just really...annoying17:55
qenghotsimonq2: $ apt policy snapd; dmesg     # to pastebin18:16
tsimonq2qengho: http://paste.ubuntu.com/17222462/18:18
tsimonq2that's apt policy snapd18:19
tsimonq2http://paste.ubuntu.com/17222480/ - and this is dmesg18:19
qenghotsimonq2: You should have 2.0.5 if you're on 16.04.18:20
tsimonq2qengho: I'm on Yakkety18:20
tsimonq2qengho: do I have to install a PPA then?18:20
qenghoOh, then you should have 2.0.8 or something!  :)18:20
qenghoActually, I don't know that^. I'll verify.18:21
tsimonq2!info snapd yakkety18:21
ubottusnapd (source: snapd): Tool to interact with Ubuntu Core Snappy.. In component main, is optional. Version 2.0.2 (yakkety), package size 2745 kB, installed size 14700 kB18:21
tsimonq2!info snapd xenial18:21
ubottusnapd (source: snapd): Tool to interact with Ubuntu Core Snappy.. In component main, is optional. Version 2.0.5 (xenial), package size 2693 kB, installed size 14624 kB18:21
tsimonq2qengho: ^ :)18:21
tsimonq2O_O huh?18:21
qenghoUgh.18:21
tsimonq2well how does that work? :P18:21
tsimonq2I'll manually install the Xenial packages for now18:22
qenghoIt's technically possible, but weird because updating stable released (especially LTS!) is really hard, but updating the devel line is dead easy.18:22
tsimonq2yeah18:23
tsimonq2in fact, it probably should have went to Yakkety first18:23
tsimonq2because wouldn't it require an SRU?18:23
qenghoYes, unless it has an exception, and this might have one because it's new and not "released" yet. I don't know, here.18:24
qenghotsimonq2: Anyway, after .5, let us know if it still happens.18:25
tsimonq2I'm getting .8 from Launchpad :D18:25
tsimonq2:/ still18:26
tsimonq2[54353.152981] audit: type=1400 audit(1465669563.399:43): apparmor="DENIED" operation="open" profile="/usr/bin/ubuntu-core-launcher" name="/home/.ecryptfs/simon/.Private/" pid=9481 comm="ubuntu-core-lau" requested_mask="r" denied_mask="r" fsuid=1000 ouid=100018:27
tsimonq2[54353.152986] ecryptfs_dir_open: Error attempting to initialize the lower file for the dentry with name [/]; rc = [-13]18:27
qengho$ systemctl restart snapd.service   # try this18:27
tsimonq2nope still18:27
tsimonq2does it help to know that I have an encrypted home directory?18:27
qenghotsimonq2: That second message is really weird.18:27
qenghoI can tell you have one, silly.18:28
tsimonq2[54445.418517] audit: type=1400 audit(1465669655.670:44): apparmor="DENIED" operation="open" profile="/usr/bin/ubuntu-core-launcher" name="/home/.ecryptfs/simon/.Private/" pid=9549 comm="ubuntu-core-lau" requested_mask="r" denied_mask="r" fsuid=1000 ouid=100018:28
tsimonq2[54445.418521] ecryptfs_dir_open: Error attempting to initialize the lower file for the dentry with name [/]; rc = [-13]18:28
tsimonq2again... :P18:28
qengho"r" attempt, fail, that's fine.18:28
qenghoread18:28
tsimonq2so apparmor can't read anythong off of my home directory?18:29
qenghotsimonq2: $ mkdir ~/snap/YOURSNAPPACKAGENAME18:29
tsimonq2*anything18:29
tsimonq2oh okay18:29
tsimonq2$ mkdir ~/snap/liferea18:29
tsimonq2mkdir: cannot create directory '/home/simon/snap/liferea': File exists18:29
qenghoOh, good.18:30
qenghoHuh!18:30
qengho"ls" to make sure that's a dir, not a regular file.18:30
tsimonq2yup18:30
tsimonq2FWIW: drwxrwxr-x 3 simon simon 4.0K Jun 11 02:06 liferea18:30
tsimonq2and drwxrwxr-x 2 simon simon 4.0K Jun 11 02:06 100001 inside of that18:31
qenghotsimonq2: I have no idea, offhand. Time to look at source code, or "strace" it.18:31
tsimonq2qengho: I'll try getting off of an encrypted home directory18:31
qenghotsimonq2: er, okay, but I have one too, and it works for me.18:32
tsimonq2if that magically fixes it, I'll file a bug18:32
qengho(I do get ugly dmesg about that^.)18:32
tsimonq2weird18:32
tsimonq2okay18:32
tsimonq2thanks :)18:32
qenghotsimonq2: I don't know if it'll work.18:32
tsimonq2well i'll try18:33
tsimonq2I'll also Google around18:33
qengho$ strace -f -o snaptrace -e trace=file -p $(pidof snapd)18:33
qenghoDo as root, probably.18:33
qenghoIt it install time, or run time?18:34
qengho"execute". hmm18:34
qenghoOkay, that's harder.18:34
qenghoAnd I have some things to do in Real Life. Back later.18:34
tsimonq2o/18:35

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!