/srv/irclogs.ubuntu.com/2016/08/17/#snappy.txt

mupPR snapcraft#733 opened: Add the go-buildtags property to the go plugin <Created by elopio> <https://github.com/snapcore/snapcraft/pull/733>00:16
mupPR snapcraft#724 closed: In travis, install the static checkers with pip <Created by elopio> <Merged by sergiusens> <https://github.com/snapcore/snapcraft/pull/724>01:59
mupPR snapcraft#729 closed: Dump plugin: Don't remove install directory <Created by kyrofa> <Merged by sergiusens> <https://github.com/snapcore/snapcraft/pull/729>02:50
mupPR snapcraft#732 closed: Remove store dispute logic <Created by sergiusens> <Merged by sergiusens> <https://github.com/snapcore/snapcraft/pull/732>02:53
lpotter:( Service has Restart= setting other than no, which isn't allowed for Type=oneshot services. Refusing.03:19
=== JanC is now known as Guest33791
=== JanC_ is now known as JanC
=== chihchun_afk is now known as chihchun
=== PatrizioQON is now known as pbek
=== chihchun is now known as chihchun_afk
=== chihchun_afk is now known as chihchun
liuxghas anyone used "snapcraft cleanbuild" to build a snap project? I tried to build a simple project. However, I got many errors like http://paste.ubuntu.com/23063560/, what could be the root cause of it? Should I set up LXD seperately?06:23
wimzeiHello are snappy avaliable for rpi3?06:30
liuxgdoes anyone know how to invoke the "stop command" in a snap application? thanks06:50
liuxgI have a daemon app in my snap, I can use the app's name to launch the app. I also define a "stop-command" to stop the daemon. The problem is what is the correct syntax to invoke the "stop-command" to stop the deamon. thanks06:54
didrocksliuxg: you need to use systemctl for this07:03
didrocksliuxg: I don't think snap reimplemented an easy way to start/stop command yet07:03
liuxgdidrocks, yes, that is currently what I am doing. still I want to try the stop command to get it working07:04
liuxgdidrocks, I think it is more direct from user point of view.07:04
didrocksliuxg: on the cleanbuild issue, it seems to me that your lxd apt database didn't apt update recently. I thought snapcraft cleanbuild would do that on each build, sergiusens ^07:04
liuxgdidrocks, what is the correct syntax to invoke a stop command.07:04
didrocksliuxg: use the "systemctl stop" command (as you are currently doing, right?)07:05
liuxgdidrocks, do you mean that "systemctrl stop" will invoke the "stop" command?07:05
didrocksliuxg: hum, it seems you don't know this command, what did you mean with "that is currently what I am doing"?07:06
liuxgdidrocks, what I found was that I could use that to stop the daemon even if I did not specify the "stop-command". if that is the case, what is use of the definition of "stop-command"?07:06
didrocksliuxg: it's to enable having systemd stopping your daemon using that command07:07
didrocksinstead of just killing it07:07
didrocksliuxg: ok, so to use systemctl, you need to have the name of the generated .service file07:08
didrocksfor this, ls /etc/systemd/system/*<yoursnapname>*07:08
liuxgdidrocks, I could use the "systemctrl stop snap.xxxx.xxx" to stop a daemon app in any case without defining the "stop-command". I am wondering what is the purpose of "stop-command" defined in the snapcraft.yaml.07:08
didrocks-> you will get a .service filename07:08
didrocksthen, systemctl stop <thisservicefilename>07:08
didrocksright, so:07:08
didrocksif you don't mention a stop-command, systemd will just kill your process07:08
didrocksto "stop" it07:08
didrockssometimes, some services needs to do better cleanup07:09
didrockslike closing a database and such07:09
didrocksand they have a different command to stop itself07:09
didrocksin that case, use stop-command to point to this command07:09
didrocksand systemctl stop <…> will just invoke this command to stop the daemon07:09
liuxgdidrocks, my question is whether it will invoke my defined stop command "stop-command: bin/wrapper stop" if I use "systemctrl stop xxx"07:09
didrocks(and kill it after a timeout)07:09
didrocks(if it didn't get kill)07:09
didrocksliuxg: that's what I just answered above $07:09
liuxgdidrocks, OK. so, if we do not define a "stop command", the daemon will be forcefully shut down. if it is defined, it will just call "stop command" to gracefully shut down by using the command "systemctrl stop".07:11
didrocksliuxg: exactly! However, in the second case, if the daemon isn't shutdown by the "stop" command your provided after a $timeout time, it will force-kill it07:12
didrocksyou*07:12
liuxgdidrocks, got it. thanks!07:12
didrocksyw :)07:12
liuxgdidrocks, did you successfully build a snap project using "snapcraft cleanbuild" command? I did not succeed it.07:15
didrocksliuxg: it works for me07:20
didrocksliuxg: see my answer above about your issue07:20
liuxgdidrocks, I am wondering whether it works out of the box, or I need to set sth up first before to get it working.07:21
didrocksliuxg: apart from lxd init, nothing, and the container starts for you, so it's not this07:34
* kalikiana <3 snapcraft cleanbuild08:51
kalikianabtw cleanbuild is also good for cases where a build system is "smart" and pulls in dependencies you didn't expect, my nvim suprisingly doubles in size with a 'regular' build because it pulls in libxml which drags icu in - if anyone is wondering about that, it's worth considering that causality09:16
=== chihchun is now known as chihchun_afk
zygaicu aka "I grok unicode"09:17
zygasadly the alternative is "I live in the 80s"09:17
kalikianait's not meaingful for the use case - universal-ctags is pulling it in and I'm pretty sure I don't require unicode there09:18
kalikianathe "good old" exuberant ctags in the archives isn't using it either09:19
zygaperhaps, my comment was generic, icu is just large but we have to live with it09:19
kalikianayeah, for cases where it is more or less the only option it's unfortunate09:19
=== chihchun_afk is now known as chihchun
ogra_reading /kernel.img09:51
ogra_** Unable to read file /kernel.img **09:51
ogra_reading /initrd.img09:51
ogra_** Unable to read file /initrd.img **09:51
ogra_Bad Linux ARM zImage magic!09:51
ogra_:(09:52
* zyga hugs ogra09:53
ogra_no mvo :(09:53
ogra_seems tonights auto-upgrade did completely unset snap_kernel in my bootloaders09:54
ogra_zyga, do you know if he is off today ?10:01
zygaogra_: he's around, he's away for a few hours now10:01
stokachuzyga: awesome thanks man10:11
zygastokachu: I talked to mvo about this and we're going to SRU this ASAP, we're also re-considering the chroot approach now, this is not a simple thing so don't expect a decision overnight (like the patch :)10:12
zygastokachu: I will do 1.0.40 release in a moment and work on the SRU with mvo10:12
stokachuzyga: understood10:13
zygastokachu: if you want you can try to build it now and test that it fixes the issue10:14
zygastokachu: take master and packaging from https://code.launchpad.net/~snappy-dev/snap-confine/+git/snap-confine/+ref/16.0410:14
stokachuzyga: ok, ill do a local build and give it a run10:15
zyga(packaging will change a little when mvo is back, we want to integrate his packaging work that was never committed)10:15
zygaI'll keep you posted :)10:15
mvozyga: hey10:16
stokachuzyga: great, thanks!10:16
zygamvo: hey, welcome back :-)10:16
zygamvo: FYI, I've modelled packaging after fedora-scm a little, I think the approach is great (branch per distro series) and simple to work with, the content is entirely up to us10:17
ogra_mvo, all my boards fell apart today with no snap_kernel set at all after reboot10:17
* zyga is working on fedora now10:17
ogra_(seems they did their auto-upgrade ... when i rebooted them all _kernel vars were completely unset)10:18
ogra_mvo, i suspect there is some quoting issue10:18
mvoogra_: yeah, same bug, I do new image10:19
mvos10:19
mvoogra_: let me do that rightnow10:19
zygamvo: ping me on telegram when you have a moment to help me with the SRU process for snap-confine10:19
zyga(in private so that I get notified please)10:19
ogra_mvo, seems when i change the script like: http://paste.ubuntu.com/23064119/ it doesnt fall over10:19
zygaSon_Goku: hey, still no selinux support, spent last night fire-fighting, I'm doing package builds and uploads now10:19
ogra_(using test -n and no quoting for teh vars, the hush shell in uboot is very picky about such stuff IIRC)10:20
zygaSon_Goku: when I'm dong with snap-confine uploads I will try to integrate fedora into upstream CI10:20
ogra_hmm, no, i take that back10:20
ogra_it works exactly for one boot10:21
ogra_so there is something else10:21
ogra_(nontheless that script variant is cleaner :) )10:21
=== chihchun is now known as chihchun_afk
* zyga uploads snap-confine to rawhide :)10:23
mvoogra_: hm, ok10:25
mvoogra_: can you dump the environment when it fails?10:25
zygaSon_Goku: I'd like to get a neutered version of snapd reviewed, without active systemd units10:26
ogra_mvo, well, the change is that snap_kernel is completely nonexistant then10:26
zygaSon_Goku: and initially just for f23 where systemd is not confined with selinux10:26
zygaSon_Goku: then work on making initial selinux changes for snapd.socket10:26
mvoogra_: snap_kernel="" or not there at all?10:26
zygaSon_Goku: that should unblock f24 and f2510:26
ogra_not there at all10:26
zygaSon_Goku: and then apply for the remaining permissions10:26
zygaSon_Goku: let me know if this makes sense to you10:27
mvoogra_: interessting, let me check the code10:27
Son_Gokuzyga, you should apply for all of the branches anyway10:27
Son_Gokukeep in mind you can build for all of the targets without actually submitting something as an update10:28
zygaSon_Goku: ack, I meant that initially just f23 will work10:28
zygaoh, that's true!10:28
Son_Gokuthose are two separate actions for a reason10:28
ogra_mvo, if only one of snap_try_kernel or snap_try_core is set it seems the other one completely vanishes ... i just manually did set snap_mode try and snap_try_kernel and got:10:28
ogra_ubuntu@dragonboard:~$ fw_printenv |grep ^snap_10:28
ogra_snap_kernel=dragonboard-kernel_1.snap10:28
ogra_ubuntu@dragonboard:~$10:28
Son_Gokuzyga, adding branches later requires you to go through re-reviews, which are annoying :P10:29
mvoogra_: meh, indeed, I think I found the issue10:29
Son_Gokuso just add them now, and once you're happy, you can submit an update for F2410:29
zygaok10:29
mvoogra_: I will work on a fix and see what can be done about automatic tests, we currently have no reboot spread test but maybe I can find something else10:30
ogra_mvo, didnt leos setup have reboot tests ? perhaps we can use that for the moment10:30
Son_Gokuzyga, I would just submit to all branches and everything, and just not do fedpkg update until you're ready10:31
mvoogra_: yeah, I explore that a bit10:32
zygaSon_Goku: yep, I'll do that, just doing the macaroon and snap-confine work now10:33
ogra_seb128, hmmm ...10:34
seb128ogra_, hey, issues with my livecd-rootfs upload?10:34
ogra_seb128, only that they wont affect any ubuntu-core builds :) ... we a) only build xenial and b) the livecd-rootfs we use lives in a build PPA10:35
ogra_(it is good that you land it in yakkety for completeness though)10:35
seb128ogra_, well, trunk first ... but thanks for pointing it out, who do I bribe to get that ppa updated?10:35
ogra_me or mvo10:36
ogra_i'll take a look in a moment10:36
seb128who wants beer in octobre? ;-)10:36
seb128danke!10:36
ogra_haha10:36
ogra_seb128, hmm, i think your "no-apt" change is wrong (looking at http://launchpadlibrarian.net/279413400/livecd-rootfs_2.424_2.425.diff.gz)10:39
ogra_seb128, if you remove the "cat <<EOF" then you need to at least add an echo or some such ...10:40
RoninDev_Hello! Please, tell me, can I run script before autotools plugin run? e.g. ./bootstrap.sh?10:40
ogra_ubuntu@dragonboard:~$ apt10:40
ogra_Ubuntu Core does not use apt-get, see 'snappy --help'!10:40
ogra_ubuntu@dragonboard:~$ cat /usr/local/bin/no-apt10:40
ogra_#!/bin/sh10:40
ogra_cat <<EOF10:40
ogra_Ubuntu Core does not use apt-get, see 'snappy --help'!10:40
seb128ogra_, that was a dupliucate EOF10:41
seb128code now is10:41
seb128 cat >$PREFIX/usr/local/bin/no-apt <<EOF10:41
seb128 #!/bin/sh10:41
seb128 Ubuntu Core does not use apt-get, see 'snappy --help'!10:41
seb128 EOF10:41
seb128oh10:41
ogra_:)10:41
seb128you are right10:41
seb128shrug10:41
seb128sorry about that ;-)10:41
seb128if you want to fix it feel free10:42
ogra_there is definitely a bug that the EOF is missing in the resulting script10:42
seb128I can fix for trunk after lunch10:42
seb128just add the echo10:42
ogra_but apparnely cat doesnt really care at runtime :)10:42
ogra_the xdg-open has a similar prob ... though there i dont understand the logic at all ... i wonder why it wants the cat in the script there10:43
seb128the xdg one is fine10:44
seb128the goal is to generate a file on disk10:44
seb128cat >$PREFIX/usr/local/bin/xdg-open <<EOF10:45
seb128#!/bin/sh10:45
seb128dbus-send --print-reply --session --dest=com.canonical.SafeLauncher / com.canonical.SafeLauncher.OpenURL string:"\$1"10:45
seb128EOF10:45
ogra_right, i just wonder how it got like that10:45
seb128if you sh that you get the 3 lines writen to $PREFIX/usr/local/bin/xdg-open10:45
ogra_seems it was just a blind copy of the no-apt one10:45
seb128right10:45
seb128well the new version works I tested it10:45
seb128dbus-send is a cmd10:45
seb128but you are right about the other one missing the echo10:46
seb128lunch now, bbiab10:46
Son_Gokuzyga, uhh what did you do?!10:49
Son_Gokupatches aren't supposed to be recorded in sources10:50
Son_Gokuthey go into git itself10:50
Son_Gokuno one can read anything in the binary repo10:50
Son_Gokuzyga, did you approve my co-maintainer request for snap-confine?10:52
Son_Gokuhttps://admin.fedoraproject.org/pkgdb/package/rpms/snap-confine/10:52
zygaoooh10:53
zygaSon_Goku: I didn't see the request yet, looking now10:54
zygaSon_Goku: how should I record the patch?10:54
Son_Gokugit add?10:54
zygaSon_Goku: I see, let me correct that quickly10:54
zygadone (commit access)10:55
Son_Gokuzyga, also, delete from "sources" the entry for the patch file10:56
Son_Gokuyou don't want that there10:56
mupPR snapd#1690 opened: partition: ensure that snap_{kernel,core} is not overriden with an empty value <Created by mvo5> <https://github.com/snapcore/snapd/pull/1690>10:56
Son_Gokuand you'll want to bump the changelog for the spec too10:56
Son_Gokusince you can't rebuild in koji without doing that10:56
zygaSon_Goku: yep, should I bump the spec file for that?10:56
zygaah10:56
zygaok10:56
Son_Gokuoh, and in the changelog10:57
Son_Gokudo "%%license" instead of "%license"10:57
Son_Gokubecause otherwise, it'll process it and weird things happen10:57
Son_Gokulike this: "- Use GPLv3 instead of %doc for COPYING"10:57
zygaFixed10:57
zygaooh10:58
zyga%%license but %doc? why?10:58
zygaSon_Goku: like this?10:59
zyga-%license COPYING10:59
zyga+%%license COPYING10:59
Son_Gokuyes10:59
Son_Gokuno10:59
zyga:D10:59
Son_Gokunot in the actual %files list10:59
Son_Gokuin the changelog, it's actually processing the %license macro (which evaluates to the License field in the preamble)10:59
zygaahh10:59
Son_Gokuthe files list is fine11:00
zygaso the changelog entry can look like11:00
Son_Gokubut the changelog isn't11:00
zyga- Use %%license instead of %%doc11:00
Son_Gokuyep11:01
zygak, thanks for spotting that!11:01
zygaSon_Goku: pushed to master, let me know if this is good for fedpkg build11:02
Son_Gokuzyga, no prob11:02
Son_Gokulooks good to me11:03
Son_Gokumerge it into all your other branches and go forth and build :)11:04
mvoogra_: fwiw, branch pushed with fix for your bug11:05
zygayep, do I need to fedpkg update again?11:05
zygaSon_Goku: I need a break, I'll do subsequent updates depending on your answer when I'm back from a walk11:08
Son_Gokuok11:08
mupPR snapd#1598 closed: interfaces: implement a fuse interface <Blocked> <Reviewed> <Created by stgraber> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/1598>11:10
Son_Gokuzyga, I'm going to just modify your existing update to use snap-confine-1.0.30-2.fc2311:16
Son_Gokuzyga, you should submit snap-confine to F24 and F25 as updates, too11:20
Son_Gokuthere's no reason not to11:20
kalikianaQuestion: Is there a known fix for "/usr/bin/env bad interpreter: Permission denied"? I don't know if I should be changing my shebangs to work within confined snaps or file a bug11:32
kalikianaThose same scripts work perfectly if I "sh foobar" them11:32
Chipacakalikiana, you want to change the interpreter11:43
Chipacai mean, the shebang11:43
Chipacajdstrand, is there a reason not to allow /usr/bin/env in the default profile?11:43
Chipacakalikiana, just for the record with very few exceptions you should be shipping the interpreter also11:44
Chipacakalikiana, the exceptions might begin and end with "sh"11:44
Chipacakalikiana, I do ship something that abuses things a little by using system's python3, but that's because I'm ok with it breaking11:44
kalikianaIn this instance I'm indeed using "!/usr/bin/env sh"11:45
kalikianapython also appears to be functional - I haven't decided yet what to do with that wrt bundling, it would blow up the snap incredibly so I didn't upload a version with it enabled11:46
kalikianaalso optional modules - I'm thinking a way to pull in modules to $HOME would be nice, but there's no obvious way to do that11:47
kalikianaby nature nvim is extensible so I have to ultimately find something that allows on demand installing11:48
Chipacakalikiana, using env (which isn't guarnateed to be in /usr/bin, in fact only debian-derived have it there afaik) to find something that is guaranteed to be in /bin is a little twisted, just ftr11:51
Chipacakalikiana, the question of why it isn't executable in the default apparmor profile is for jdstrand (i assume it's apparmor blocking this)11:52
Chipacakalikiana, optional modules sounds like something for the content interface11:52
kalikianaChipaca: fwiw "!/bin/sh" doesn't work either. I at one point got the impression that env would allow me to stop hard-coding executable paths - but then, if I don't know where env is, how can I possibly do that?11:53
Chipacakalikiana, wat11:56
Chipacakalikiana, #!, right?11:56
kalikianaYes, sorry, I typed it here by hand11:57
Chipacakalikiana, #!/bin/sh certainly should work11:57
kalikianaIt doesn't11:57
Chipacai mean, hello-world uses that11:57
kalikianalemme copy a script in there and try11:57
kalikianaHmmm it does indeed11:59
kalikianaIs hello-world unconfined?11:59
kalikianaHmm no it's not according to "snap list"12:00
=== chihchun_afk is now known as chihchun
ogra_kalikiana, any denials in syslog ?12:03
stokachujdstrand: re: the custom network bridge, normally I have a person install my debian package that sets up a systemd service with my bridge scripts, https://github.com/Ubuntu-Solutions-Engineering/openstack-deb, with the network-control interface am I able to do the same thing inside my snap?12:07
stokachuminus the deb package of course12:08
kalikianaogra_: http://paste.ubuntu.com/23064305/ Several of the second one with different /proc/*/cmdline12:08
ogra_mvo, do you mind if i switch it to "test -n" instead of '!= ""' ?12:09
argesmvo: whats the status on verifying bug 1612362 ? I think the postrm purge issue was fixed in teh latest upload, but it just hasn't been verified yet?12:09
mupBug #1612362: [SRU] 2.12 <verification-needed> <snapd (Ubuntu):Fix Released> <snapd (Ubuntu Xenial):Fix Committed> <https://launchpad.net/bugs/1612362>12:09
kalikianaogra_: Chipaca Aha! It works if the script is in $SNAP_USER_DATA but not if it's in $HOME12:10
kalikianaDespite having the 'home' interface12:10
ogra_kalikiana, the first one tries to exec something outside of the snap without having an interface for it ... and for the second one there is an interface iirc12:11
ogra_system-observe or some such12:11
ogra_or process-observe ... i forgot the exact mname12:11
stokachuis it possible to install a systemd service during snap install?12:12
ogra_stokachu, snapd does that, based oon the info you give it in snapcraft.yaml12:13
ogra_you cant randomly copy unit files in place though12:13
stokachuogra_: i basically want to convert https://github.com/Ubuntu-Solutions-Engineering/openstack-deb12:13
kalikianaogra_: the first one is 'home' isn't it? the same script can be opened and run by hand with "sh ./able"12:14
stokachuogra_: and have that bridge setup during install12:14
mvoogra_: sure, thats fine12:14
ogra_stokachu, so creat bridge start and stop scripts and add app entries (with daemon line) into your snapcraft.yaml that points to them12:14
ogra_kalikiana, home only allows file access ... not execution of random binaries ;)12:15
stokachuogra_: ok, will the bridge be uninstalled on snap remove?12:15
stokachuas long as i have the stop app in there?12:15
mvoarges: yeah, we just need to verify this one, the postrm changed got backed out again they will be properly fixed in the next upload12:15
mvoarges: I will ask our QA team to do the verification12:15
kalikianaogra_: Hrm. Well, I could copy and run the same file - so I'm not sure I see the effective difference.12:15
ogra_stokachu, not sure, thats a question for Chipaca i guess ... iirc we stop all services on removal though12:15
stokachuok12:16
ogra_kalikiana, run ? how ?12:16
kalikianaogra_: As I said prepending "sh" or "python3" in case of Python works perfectly12:16
kalikianaogra_: Or copy and run as-is12:17
ogra_that actually sounds like a slight security hole12:17
kalikianaogra_: How would executing the script only after copying it into $SNAP_USER_DATA be more secure?12:17
kalikianaIt certainly is inconsistent12:17
ogra_well, the home interface only gives you access ... allowing the exec is a general thing when it happens inside the confined space12:18
ogra_which home doesnt belong to12:18
kalikianaI guess I should be symlinking my script folder into the snap?12:19
ogra_i guess the home interface should block "sh $HOME/myscript.sh"12:19
ogra_which is why i think there is a bug12:19
ogra_jdstrand, ^^12:20
stokachuhow can i clear snapcrafts apt cache?12:23
ogra_snapcraft clean12:23
stokachudoesnt work :(12:23
ogra_huh ?12:23
ogra_that definitely wipes it12:24
stokachuhttps://www.irccloud.com/pastebin/5eZy8hNO/12:24
stokachuogra_: ^12:24
zygaSon_Goku: thanks for bumping bodhi tasks12:24
Son_Gokuzyga, you still need to make the updates for F24 and F2512:25
Son_GokuI could do it, but I figured you'd want to12:25
Chipacastokachu, yes, systemd services are stopped on snap removal12:25
ogra_stokachu, i see it running apt-get update there12:25
stokachuChipaca: cool thanks12:25
Chipacastokachu, asked to stop, then made to stop12:25
ogra_stokachu, looks more like a server side issue12:25
stokachuChipaca: how will it know to run bridgestop on removal? https://www.irccloud.com/pastebin/saEdO7ro/12:26
ogra_i.e. like the server is just regenerating its Packages file12:26
stokachuogra_: ok ill give it a few12:26
Son_Gokuzyga, by the way, you can change the positive karma number to be lower12:26
Son_GokuI usually set positive karma to be "1" rather than "3" for new packages12:27
zygaSon_Goku: ack, noted12:27
zygaSon_Goku: I'll do that for subsequent updates12:27
ogra_stokachu, i guess it will run both ... "bridge.start stop" and "bridge.stop stop"12:27
Chipacastokachu, stop-command and stop-timeout12:27
Son_Gokuzyga, you can edit the update in bodhi: https://bodhi.fedoraproject.org/updates/FEDORA-2016-939c94b72e12:27
stokachuChipaca: do i need to set that somewhere?12:27
ogra_stokachu, you should work it into a single script that understandds the systems start/stop events12:27
ogra_*systemd's12:27
Son_Gokuzyga: https://bodhi.fedoraproject.org/updates/FEDORA-2016-c5556c3bef12:28
stokachuogra_: ah12:28
Son_Gokuthere should be an edit button if you're logged in12:28
Chipacastokachu, without looking i don't remember; what happens if you try to stop without having that there?12:28
zygatrying12:28
Chipacastokachu, in any case, you *can* set those, next to "command", you add "stop-command"12:28
Son_Gokuand you can modify the conditions of the update :)12:28
stokachuChipaca: actually haven't ran it yet :) waiting for apt packages to work again12:28
Son_Gokuas well as the update description and other things12:28
ogra_Chipaca, well, he has one start service and one stop service ... and both will receive a stop event on uninstall12:28
Son_Gokuit's also possible to create updates from the bodhi web UI, which makes it easier to bundle a bunch of updates together in one update12:29
zygaI see it, changed to stable karma: 112:29
Chipacastokachu, having a stop service seems weird12:29
ogra_Chipaca, so i guess he wants a single script that simply can handle start and stop so on uninstall only stop is called (and on install or reboot start is called)12:29
Chipacastokachu, i suspect it's not what you want12:29
ogra_Chipaca, he wants the firewall settings the script applies system wide reverted on uninstall12:30
stokachuChipaca: ok, i was trying to port over https://github.com/Ubuntu-Solutions-Engineering/openstack-deb/blob/master/debian/openstack.service12:30
Chipacastokachu, that is, i suspect you want a single bridge: \n  command: bridge.start \n  stop-command: bridge.stop12:30
ogra_yeah12:30
stokachuohhh12:30
zygaSon_Goku: thanks :)12:30
Son_Gokuonce you have snapd in Fedora, in the future when you update snapd and snap-confine at the same time, you can do it as a single update12:31
stokachuChipaca: this look correct? https://www.irccloud.com/pastebin/4PAbzoN3/12:31
zygaSon_Goku: I'd like to merge those packages whenever we have a moment12:31
Chipacastokachu, maybe. Is "bridge.start" really a "simple", and not a "oneshot"?12:34
Chipacastokachu, if it does something and exits, and says it's a "simple", it'll get run again and again and again and again and again12:34
Chipacaand again and again and12:34
stokachuChipaca: ah ok12:34
Son_Gokuzyga, so what do you need to get snapd in good shape?12:34
Chipacastokachu, and again :-op12:35
stokachuChipaca: :D12:35
zygaSon_Goku: I need to figure out how to build against the macaroon before it ships in stable12:35
Son_Gokubuild against rawhide for now12:35
zygaSon_Goku: I'd like to simplify the package to strip the services that need permissions to be in fedora12:35
Son_Gokueverything is just there12:35
Son_Gokuwhen doing mock builds, just attach "-r fedora-rawhide-x86_64"12:36
Son_Gokubefore the name of the SRPM12:36
zygaSon_Goku: I need to fix systemd selinux as we talked about, that will eat most of my time I suspect12:36
zygaSon_Goku: ok12:36
zygaSon_Goku: thanks, I'll try that12:36
zygaSon_Goku: I'll update COPR first so that I have a feeling for everything mostly working12:36
Son_Gokuonce rawhide resyncs and the mirrors have your new builds, that should work12:36
zygaSon_Goku: just having lunch now :) (mushrooms all week)12:37
Son_Gokuas for your copr, you can probably get away with deleting all the golang packages now12:38
Son_Gokusince they've all shipped to stable12:38
Son_Gokuso the only thing in your copr you'll need is the new golang package (macaroon), snap-confine, and snapd12:39
zygaSon_Goku: yep, I was planning on doing that12:39
Son_Gokuthough, if I give snap-confine karma, it'll just go through, probably :P12:39
zygaSon_Goku: copr can stay for snap* packages but I doubt it will need much more12:39
zygaheh :)12:40
zyga(just do it ;)12:40
Son_Gokutechnically, I need to wait for it to sync to updates-testing first12:40
Son_Gokuotherwise it won't get marked for stable when I give it karma12:41
stokachuChipaca, ogra_: this is the error im getting when attempting to install https://www.irccloud.com/pastebin/WbQ5M6Ke/12:41
Son_Gokuthough, I think that might be fixed now...12:41
Son_GokuI'll wait a few hours before doing it12:41
zygaSon_Goku: sounds good12:42
zygaSon_Goku: we can try the same for macaroon12:42
stokachuChipaca: do i need an actual systemd service file?12:43
Son_Gokudid you edit the macroon updates to require lower karma?12:43
zygamvo: quick question, are you busy now? I would like to do the snap-confine SRU with you to learn the process12:43
zygadSodoing that now12:43
mvozyga: probably best we wait for the currently pending sru first, or we need to go back to the 7 day wait time12:43
zygaSon_Goku: done12:44
zygamvo: noted12:44
mvozyga: but happy to do it once we have the next slot12:45
zygamvo: thank you!12:47
Chipacastokachu, no, you don't need a systemd service file12:48
stokachuok12:48
stokachui think i know whats wrong, i dont have /sbin/ip or /sbin/iptables in my snap12:48
ogra_err12:49
ogra_how would that work12:49
ogra_you cant exec either of them12:49
Chipacastokachu, journalctl should tell you what to do12:49
Chipacastokachu, i mean, it should have a log12:49
Chipacastokachu, journalctl -u snap.conjure-up.bridge.service12:49
ogra_stokachu, i assume thats the first install of the package ... where nnone of the interfaces are connected12:49
ogra_so you cant have any access to /sbin/ip or /sbin/iptables12:50
ogra_only after you connected the firewall interface that will work12:50
stokachuAug 17 12:40:21 riddick systemd[1]: snap.conjure-up.bridge.service: Service has Restart= setting other than no, which isn't allowed for Type=oneshot services. Refusing.12:50
ogra_what you should do is to make the script exit gracefully here12:50
Chipacaahh, that also: if your services need interfaces to work, you need to make them handle not having the interface yet12:50
Chipacathat is: if they need interfaces that don't auto-connect12:51
stokachuyea im creating a custom bridge in the bridge.start script12:51
ogra_(not sure if we allow snapd to show a message you can print from the script or some such)12:51
stokachuso do i just need to add the firewall-control plug?12:54
zygastokachu: there's also network-control or something like that12:55
zygaAFAIR12:55
stokachuso far ive got network-control, network-bind, firewall-control12:55
ogra_yeah, ip needs network-control, iptables needs firewall-control i guess12:55
ogra_and i think neither of them is auto-connecting12:55
stokachudo i still need to include those binaries directly?12:55
ogra_i dont think so12:56
stokachuand how do i handle the interfaces that aren't auto-connecting ?12:56
ogra_but you need to use snap connect to connect them after install12:56
stokachuis that left up to the user or can i do that in my snap installation?12:56
ogra_and your script should check if it can exec the binaries and if not print a message and exit gracefuly12:56
ogra_thats up to the user12:56
stokachuso once the user does a 'snap connect' those oneshot scripts will be run again?12:57
ogra_all dangerous interfaces are manual connect thingies12:57
ogra_not sure, i think you might need to start it with systemctl12:57
stokachuso this brings me back to is it possible to create and start a custom network bridge via snap install?12:58
ogra_not without the user allowing access to the interfaces, no12:58
stokachuugh12:58
mupPR snapd#1691 opened: many: add `snap download` command that downloads into /var/lib/snapd/download <Created by mvo5> <https://github.com/snapcore/snapd/pull/1691>12:58
ogra_they need snap install ; snap connct ... and restart the services12:58
ogra_*connect12:59
ogra_s/restart/start/ ?12:59
ogra_(not sure abot that one)12:59
stokachuso that defeats my user experience12:59
stokachuof just doing 'snap install conjure-up' and having everything work12:59
ogra_yeah, not if you use interfaces that could potentially be harmful12:59
ogra_we want the user to have full control here13:00
stokachubut i define those plugs in my snapcraft.yaml13:00
ogra_so such stuff will never auto apply13:00
stokachushouldnt that tell the user we want access to those interfaces?13:00
ogra_sure, but they are not auto-connect interfaces13:00
ogra_how would he know without looking at your source13:00
ogra_i guess eventually there will be UI that asks13:00
ogra_but thats not there atm13:00
stokachuthis is a huge blocker for me then13:01
* ogra_ imagines at some point snapd will do something like "the snap you install wants to access firewall control, do you want to allow it [Y/N]" during the install process13:03
ogra_but thats further down the rodamap13:03
ogra_so for now you need to tell your users to use snap connect to connect the interfaces13:03
stokachuso where is this defined on the roadmap?13:08
stokachulike when could i expect that to be implemented13:08
jdstrandChipaca: re env> no, in fact it is already allowed: /{,usr/}bin/env ixr,13:09
jdstrandkalikiana: ^13:09
ogra_stokachu, i'm pretty sure it isnt in the very near term roadmap ... there are to many other things to solve first13:10
stokachuogra_: can you reply to my email on snapcraft list then stating that?13:11
stokachub/c im going to be asked why i can't implement this software as a snap13:11
ogra_stokachu, there is surely a way to ship your own apparmor profile and having your snap go through manual review for every upload though ...13:11
ogra_for "trusted snaps" thats definitely a possibility13:11
stokachuogra_: but then im back to having to wait on someone else to approve it13:12
ogra_yes13:12
stokachuogra_: might as well just do it the regular way13:12
ogra_well, but the regular way is to tell your users to use snap connact $plug $interface13:12
stokachuno the regular way i mean going through the debian process13:13
ogra_and to restart the services that use them13:13
stokachuone of the major points of doing a snap was so I didnt have to go through all those processing tasks13:13
stokachuthat's how it was told to us13:13
ogra_well, the major point should still be that you are completely independent from the host system version :)13:14
stokachuogra_: that's fine but i dont remember you being at the sprint and hearing how it was told to us13:14
ogra_well, i wasnt invited to the CDO sprint :)13:15
ogra_perhaps you guys have worked out a way to allow "trusted snaps" to go through the store without manual approval13:15
ogra_no idea about that one13:15
stokachuev ^13:15
jdstrandstokachu: network-control allows you to set up the bridge. it does not allow you to add systemd units13:15
stokachuis this something that you can flag so i don't have to go through a review process everytime?13:16
ogra_i'm just telling you what every normal snap packager needs to go through ... there are surely special cases possible  for canonical maintained snaps13:16
jdstrandstokachu: but, snappy gives you a systemd unit for every 'daemon: ...' command. so you can do that yourself13:16
ogra_jdstrand, thats not the issue ... on first install the manual-connect interfaces wont be there13:16
stokachuogra_: right, well thats the issue of telling me im not a normal target case13:16
evstokachu: you can absolutely have a snap in devmode13:16
ogra_so the systemd usints the snap creates wont run13:16
stokachuev: this doesn't work in devmode either13:17
stokachujdstrand: i responded to your email about where im at13:17
stokachujdstrand: there doesn't seem to be a way to allow a bridge to be started during a snap install13:17
morphisjdstrand, zyga: I am wondering if we're doing anything to avoid apps in the same snap talking to each other over abstract unix sockets when I've installed the snap in devmode13:17
jdstrandstokachu: (basically what ogra already said. /me is reading backscroll and just catching up)13:17
ogra_jdstrand, stokachu is bothered about the manual connecting13:17
ogra_(and having to manually start/restart the units then)13:18
zygamorphis: no, in devmode apparmor won't be in the way13:18
zygamorphis: do  you see anything odd?13:18
morphiszyga: yes13:18
ogra_i.e. there are two more steps after snap install13:18
morphiszyga: but I am wondering if there is anything else but I saw snap-confine is just doing a clone(CLONE_NEWNS) and nothing else13:19
ogra_stokachu, it doesnt work in devmode ? that would be a bug13:19
zygamorphis: oh, interesting, i wonder if that affects abstract sockets13:19
stokachuogra_: no i still have to do those additional steps13:19
ogra_in devmode interfaces shouldnt matter much13:19
morphiszyga: I would say it doesn't as that is what CLONE_NEWIPC is for13:19
ogra_right, file a bug about that13:19
zygamorphis: that's good to know, thanks13:19
ogra_devmode should make it behave not different from a deb in that regard13:19
jdstrandkalikiana: 'home' interface gives you 'rwk', not 'i' (inherited exec) to non-hidden files in your home directory. this is by design13:20
morphiszyga: if I am right CLONE_NEWNS is just the mount namespace13:20
zygamorphis: and what do you observe in practice? no connection?13:20
jdstrandkalikiana: but with an interpreted script, yes you get to run it, sure13:20
stokachuogra_: ok13:20
stokachuogra_: eventually i do need this to work in strict mode13:20
jdstrandkalikiana: the home interface is transitional13:21
morphiszyga: yes13:21
ogra_stokachu, well, only after there is some UI then i guess13:21
morphiszyga: https://paste.ubuntu.com/23064472/13:21
stokachuogra_: k thats fine, i can wait on that as long as devmode will work13:21
morphiszyga: basically I am running an lxc container and trying to attach to it with lxc-attach13:21
ogra_right ... you didnt talk about devmode above :)13:21
morphiszyga: but the lxc_monitor process doesn't get connected to the abstract socket the container creates13:22
zygamorphis: is that reproducible in a simpler test case?13:22
morphiszyga: can create one13:22
stokachuogra_: i absolutely did talk about it, https://www.irccloud.com/pastebin/WbQ5M6Ke/13:22
zygamorphis: if you can that would help, we could run in in snap-confine regression Ci13:22
morphiszyga: sounds good13:23
jdstrandmorphis: we don't do CLONE_NEWIPC so abstract sockets should be ok13:23
=== chihchun is now known as chihchun_afk
morphisjdstrand: good to know13:23
ogra_stokachu, so the first one is clear there (the unit isnt there before installing so it can not be stopped) ... the second one says "invalid argument" ... perhaps an issue in the script ?13:23
stokachuthe error is from systemd unit13:23
kalikianajdstrand: Right, I see now how this works. In the long run I wouldn't even plan to use it, it was just the best I could think of - what I really need is the ability to execute other snaps that contain those scripts and toolchains13:23
stokachuogra_: Aug 17 12:40:21 riddick systemd[1]: snap.conjure-up.bridge.service: Service has Restart= setting other than no, which isn't allowed for Type=oneshot services. Refusing.13:24
stokachuthat is the error13:24
ogra_stokachu, did you paste the "systemctl status snap.conjure-up.bridge.service" output above already ?13:24
morphisjdstrand, zyga: maybe stgraber can help me, as they may ran into the same problem already with the lxd snap13:24
jdstrandkalikiana: you might be interested in the content interface13:24
zygamorphis: yep, try it13:24
seb128ogra_, new livecd-rootfs uploaded to yakkety, I also changed the message to not recommend "snappy --help" but "snap --help" ;-)13:24
ogra_stokachu, hmm, iirc that was a bug in old snapd ...13:24
stokachuogra_: https://www.irccloud.com/pastebin/PuwB6zeQ/13:24
ogra_seb128, cool, sorry didnt get to push it to the PPA yet ... next on my list13:25
stokachuogra_: running snapd 2.0.1013:25
seb128ogra_, no hurry, thanks!13:25
ogra_stokachu, uuh13:25
ogra_update :)13:25
jdstrandmorphis: I'd be interested in what you find out from stgraber13:25
morphisjdstrand: will share with you :-)13:25
stokachuogra_: same error13:27
stokachurunning snapd 2.11+0.16.0413:27
stokachuthat service file is left behind do i need to manually remove it?13:28
ogra_stokachu, well, it was fixed in 2.1113:28
ogra_ - wrappers: map "never" restart condition to "no."13:28
kalikianajdstrand: Are there any docs I could check?13:28
ogra_https://launchpad.net/ubuntu/+source/snapd/2.11+0.16.0413:28
stokachuogra_: so do i need to do anything special once upgrading snapd?13:28
ogra_not that i know of13:29
morphisstgraber: ping13:30
stokachuogra_: yea it's still failing13:32
jdstrandkalikiana: all I know of it https://github.com/snapcore/snapd/blob/master/docs/interfaces.md, but you can also read tests/main/interfaces-content13:32
jdstrands/it/is/13:32
stokachuogra_ https://www.irccloud.com/pastebin/4KYGeCzl/13:32
jdstrandkalikiana: basically one side exports a directory (or more) and the other side can import it if from the same publisher13:35
ogra_stokachu, well, i dont know then13:40
ogra_stokachu, perhaps Chipaca knows more ... (or someone else from the core team)13:40
stokachuk13:41
stokachujdstrand: https://github.com/conjure-up/conjure-up/tree/patch-add-bridge-to-snap/snapcraft should this work in --devmode? or am I missing something?13:41
morphisjdstrand, zyga: hm, looks like its not such a problem but more a relocation one13:48
mupBug #1610292 changed: Snap installed with --devmode can't use sudo <amd64> <apport-bug> <yakkety> <Snappy:Invalid> <snapd (Ubuntu):Invalid> <https://launchpad.net/bugs/1610292>13:56
jdstrandstokachu: you need to use 'confinement: devmode' to install in devmode I think13:56
stokachujdstrand: even if i pass --devmode?13:57
jdstrandie, you need both sides-- the yaml to say it and to specify --devmode13:57
ogra_jdstrand, if he uses --devmode on cmdline ?13:57
ogra_i thought the commandline was mandatoory13:57
jdstrandI thought that was what the design was. it wasn't always the case, but maybe it changed?13:57
jdstrandthe command line is mandatory13:57
jdstrandwhat I'm saying is that I thought we changed to the yaml also being mandatory. maybe I'm misremembering13:58
jdstrandstokachu: it is easy to see if you are in devmode. what does 'sudo aa-status' say about the apparmor profile? if in devmode, it should show the apparmor profile in complain mode13:59
stokachujdstrand https://www.irccloud.com/pastebin/nPRjExPU/14:00
jdstrandstokachu: but to answer your question-- I would expect that yaml ('confinement' notwithstanding) to work once the snap is installed in devmode, yes14:00
stokachuit's still giving me the same systemd error about Restart=14:00
jdstrandso yes, you are in devmode14:00
stokachuAug 17 13:53:25 riddick systemd[1]: snap.conjure-up.bridge.service: Service has Restart= setting other than no, which isn't allowed for Type=oneshot services. Refusing14:00
stokachuhow can i see what that service file looks like?14:01
jdstrandI don't know what that error is, but I'm also not the one who implemented the systemd part14:01
jdstrandstokachu: /etc/systemd/system14:01
stokachuhttps://www.irccloud.com/pastebin/kfc74oFx/14:02
stokachuogra_ ^14:02
jdstrandstokachu: see my email to the list. I think you want to leverage the hooks work. aiui, that will restart the service after interface connect14:03
stokachujdstrand: ah ok14:04
jdstrandI've not used it or even looked at it yet though14:04
jdstrandlet me see if I can fine the PR14:04
stokachuthe very least oneshot shouldn't have restart=on-failure i would think14:05
stokachushould just run and fail or succeed14:06
jdstrandit seems like there are many PRs in this area and that kyrofa is involved in many of them14:06
* kyrofa jerks awake14:06
jdstrandstokachu: that sounds like a very reasonable request14:06
jdstrandkyleN: context is stokachu has a systemd unit that he wants to run when interfaces are connected14:07
stokachuhttps://github.com/snapcore/snapd/blob/da9fa3774fcf56464dc3d8446f47b2c1eb3943e0/tests/lib/snaps/data-writer/meta/snap.yaml can i set that restart-condition in snapcraft.yaml?14:07
jdstrandand I thought that work has been done in this area14:07
kyrofajdstrand, stokachu ah interesting, we were just discussing interface hooks14:07
sergiusenskyrofa indeed I am14:08
* zyga plays with snapd 2.11 on fedora :)14:08
jdstrandstokachu: yes, see docs/meta.md. specifically: `restart-condition`: (optional) if specified, use the given restart condition. Can be one of `on-failure` (default), `never`, `on-success`, `on-abnormal`, `on-abort`, and `always`. See `systemd.service(5)` (search for `Restart=`) for details.14:08
ogra_zyga, and who wins ?14:08
stokachujdstrand: lemme try that14:09
argeszyga: bugs 1612120 1612291 1612684 : are these fixed in yakkety?14:09
mupBug #1612120: $SNAP_USER_DATA is no longer created by snap-confine but is not yet created by snapd <verification-done> <Snappy Launcher:Fix Committed by zyga> <snap-confine (Ubuntu):Confirmed> <snap-confine (Ubuntu Xenial):Fix Committed> <https://launchpad.net/bugs/1612120>14:09
jdstrandkyleN: sorry, that was for kyrofa14:09
kyleNack14:09
stokachujdstrand: so the interface hooks can be run after a snap connect?14:09
stokachukyrofa: ^14:10
* jdstrand defers to kyrofa 14:10
zygaogra_: everyone!14:10
zygaarges: let me check14:10
ogra_hah14:10
kyrofastokachu, that's the idea, but they're still in the design phase14:11
stokachuok14:12
jdstrandkyrofa: curious if you might do 'restart-condition: on-interface-connect' which would (perhaps) set 'never' and then on connect something else (though people still might want to set what that something else is, so not this exactly)14:12
kyrofastokachu, all of the hook work so far has been the underlying machinery for hooks, not the hooks themselves14:12
zygaarges: no, although all of them are fixed in master; I will release snap-confine soon and ask mwhudson and slangasek to upload that14:12
stokachuso I got my snap to install now with restart-condition: never14:12
stokachuwhat are the steps to manually bring up the bridge now?14:12
stokachusnap connect conjure-up:firewall-control?14:12
jdstrandsnap connect conjure-up:firewall-control ubuntu-core:firewall-control14:13
ogra_snap connect conjure-up:firewall-control ubuntu-core:firewall-control14:13
jdstrand(do that for each manually connected interface14:13
ogra_*snap*14:13
argeszyga: ok great, once that's done we cna get that released then start processing the next snap-confine in teh queue14:13
ogra_:)14:13
jdstrandthen restart the unit14:13
kyrofastokachu, can you explain your use-case a little? What is the service you want to fire up upon interface connection?14:13
ogra_jdstrand, zyga, we should really not require the ubuntu-core: by default imho14:13
jdstrandstokachu: some day simply: s/ubuntu-core:firewall-control/:firewall-control/14:14
jdstrandit's know14:14
stokachukyrofa: https://github.com/conjure-up/conjure-up/tree/patch-add-bridge-to-snap/snapcraft14:14
jdstrandknown14:14
ogra_"snap connect conjure-up:firewall-control firewall-control" should understand that i mean the system level interface14:14
stokachujdstrand: ok14:14
ogra_ah14:14
stokachukyrofa: i have a custom lxd bridge i want to start when someone runs snap install conjure-up14:14
stokachuor snap connect i guess in this case14:15
zygaarges: yep, I'll release upstream in a moment14:15
kyrofastokachu, is that actually a long-running service though?14:15
zygaarges: I just wanted to test it on fedora14:15
stokachukyrofa: nah it just a oneshot to setup the bridge14:15
kyrofaOr just "something that needs to happen upon connection"14:15
jdstrandogra_: aiui, the design is :firewall-control such that if the snap is not specified, use an implied core snap interface14:15
stokachuyea just on connection i think14:15
kyrofastokachu, ah, then we can ignore the systemd side completely and you can just implement a normal interface hook as soon as we have them14:15
argeszyga: cool14:15
stokachukyrofa: ok cool, that still in design phase though?14:16
ogra_jdstrand, fine as well i guess14:16
kyrofastokachu, just so you have it in the back of your mind: hooks go in meta/hooks/ (snapcraft will expose this soon). They are named according to their purpose, in your case, perhaps something like <interface>-connect and <interface>-disconnect14:16
jdstrandogra_: zyga may even have a branch floating around. I don't know if there is a bug14:16
kyrofastokachu, they'll be called by snapd just by being named correctly14:17
stokachukyrofa: ah nice14:17
jdstrandkyrofa: curious, how does that work if you need two interfaces connected to work?14:17
kyrofastokachu, you can just put your scripts in there14:17
jdstrandkyrofa: or does your script logic need to account for that14:17
jdstrand?14:17
kyrofajdstrand, the logic will likely have to account for that, interfaces aren't all connected up at one time anyway14:18
stokachuwould it also be possible to turn on ip forwarding in those scripts?14:19
stokachuor is that left up to the user14:19
kyrofastokachu, if the scripts need plug, then you can declare them in the YAML requesting them14:19
kyrofastokachu, so assuming you have a plug that lets you do that14:19
stokachuok14:19
stokachukyrofa: is there a plug that will let me do that? :)14:19
kyrofastokachu, heh, I must bounce you back to the venerable jdstrand14:20
kyrofajdstrand, I'd like to hear about the use-case you had in mind about the multiple interfaces thing though14:21
jdstrandkyrofa: I don't see documentation on these hooks in meta.md or anywhere else in docs/. Can we add that there? is this documented somewhere else?14:21
sergiusenskyrofa can you quickly check my comment on snapcraft/73314:21
sergiusens?14:21
kyrofajdstrand, not yet-- everything that has landed so far is all machinery that is completely transparent to the end users14:21
jdstrandkyrofa: well, it is actually stokachu's. he plugs both network-control and firewall-control. that would be common for a router too.14:21
kyrofajdstrand, and the same thing needs to happen upon connection/disconnection for both interfaces?14:22
jdstrandstokachu: firewall-control lets you set ip forwarding14:22
jdstrandkyrofa: well, it is more that "there is no point starting anything until both these things are connected" kind of thing14:22
stokachujdstrand: ok cool14:23
kyrofasergiusens, sure, if you'd learn to ref them right so I can click on a link: snapcraft#733 maybe14:24
mupPR snapcraft#733: Add the go-buildtags property to the go plugin <Created by elopio> <https://github.com/snapcore/snapcraft/pull/733>14:24
kyrofajdstrand, stokachu so does a service need to be started as a result of the interface connection, then?14:24
kyrofaI thought we determined no14:24
stokachufor me its just a oneshot type of thing14:25
stokachuruns a couple of commands to create a network bridge14:25
stokachuthen removes it on uninstall14:25
kyrofastokachu, no coordination needed between interfaces?14:26
jdstrandkyrofa: I can imagine a scenario for this, yes14:26
stokachukyrofa: just as long as I have access to `ip` and `iptables` commands14:26
stokachuso they can be connected in any order14:26
kyrofajdstrand, yeah, running a service based in hooks isn't something I had considered14:27
ogra_seb128, livecd-rootfs uploaded ... i'll trigger a new ubuntu-core for the edge channel once it built14:27
seb128ogra_, thanks!14:27
kyrofastokachu, good deal, you should be set as soon as this stuff lands. Keep an eye on pstolowski, he's starting to work on those14:27
stokachukyrofa: ok sweet!14:27
jdstrandkyrofa: as implemented, how I would probably do thing is in the <interface>-connect commands I would create a config file. eg, foo-connect creates SNAP_DATA/config FOO_CONNECTED=yes. bar-connect add BAR_CONNECTED=yes. then my daemon: oneshot script looks at SNAP_DATA/config and chooses to run or not14:27
stokachukyrofa, jdstrand: this is how i would get this to work today https://www.irccloud.com/pastebin/XyWnLsQi/14:28
jdstrandkyrofa: but that requires a lot of work on my end14:28
jdstrandkyrofa: something in the yaml that say 'just don't run if all the interfaces aren't connected' would be great for this sort of thing14:29
kyrofajdstrand, right now the oneshot would run upon install, probably fail dramatically, and then your hooks would run when the interfaces were connected. We need some logic to ask the service to fire back up14:29
kyrofajdstrand, yeah that seems fair14:29
jdstrandstokachu: fyi, network-bind is autoconnected14:29
kyrofajdstrand, and doable, I think. Even today, ignoring hooks14:29
stokachujdstrand: ah ok14:29
kyrofajdstrand, might be worth a bug or a ML thread about that, if we can get it designed in the YAML I don't think the implementation would be that difficult.14:30
jdstrandI think setting ip forwarding also makes sense for network-control. /me adds a todo14:31
kyrofajdstrand, but I don't think it involves hooks14:31
jdstrandif it was in the yaml, right-- wouldn't need an hooks14:31
jdstrandthe hooks is just a way to get there today14:32
kyrofajdstrand, snapd keeps internal track of what plugs are connected. It just needs to know to fire the service up if they're all green14:32
kyrofajdstrand, yeah, hooks are not there today I'm afraid14:32
kyrofajdstrand, lots of things have landed, as you noted, but they're not usable just yet14:32
jdstrandkyrofa: oh, do you mean meta/hooks/firewall-control-connect doesn't work today?14:33
kyrofajdstrand, indeed14:33
jdstrandI thought I heard you say it did14:33
jdstrandah14:33
jdstrandok14:33
kyrofajdstrand, ah, I'm sorry for misleading you! No: the machinery behind hooks is very nearly complete. But the hooks themselves are a different story14:34
kyrofajdstrand, it's like the machinery behind interfaces versus the interfaces themselves14:34
stokachuah i can't just run systemctl restart snap.conjure-up.bridge.service since those $snap vars aren't set14:34
stokachudo i need to execute that with snap run?14:34
kyrofastokachu, hmm... they should be14:35
kyrofastokachu, check the unit file, they should all be defined right thre14:35
jdstrandkyrofa: gotcha, no worries14:36
ogra_yeah, in the environment14:36
stokachuah ok they are14:36
ogra_(i think theyx had them in the paste you showed me)14:36
stokachuah ok it's just not configuring my interface14:37
kyrofastokachu, note that you should never need to use `snap run`. Soon it will be used instead of all that environment in the unit file, but it'll just be run by the unit (or by the files in /snap/bin)14:37
stokachui need to include both sbin/ip and sbin/iptables into my snap?14:37
stokachukyrofa: ack14:37
bergkatten_Just read: "Your first snap" :)14:39
bergkatten_Is there any way for a newby to create own snap repo on localhost?14:39
=== j is now known as Guest92652
ogra_bergkatten_, wekll you can just "snap install /path/to/snap"  ... why waste effort and time for a repo14:41
ogra_(there are ways to run local snap stores, but that will lack features vs the real store (unless you implement them))14:42
ogra_see https://uappexplorer.com/app/snapstore-example.noise for a snapstore snap :)14:43
bergkatten_would like create an internal store with not so public inhouse packages14:43
mreednessita, ping14:47
ogra_noise][, you should link a howto from the description ^^^ iirc there is an env var needed to make snapd use your store ?14:47
noise][https://github.com/noise/snapstore14:49
nessitamreed, hi14:49
ogra_bergkatten_, ^^14:49
mreednessita, hi :-)  by chance can you review my snap? https://myapps.developer.ubuntu.com/dev/click-apps/5726/rev/1/14:49
zygaPharaoh_Atem: https://bugzilla.redhat.com/show_bug.cgi?id=136782514:50
zygaPharaoh_Atem: feel free to request dropping of systemd units14:50
zygaPharaoh_Atem: or for the presets at least14:50
Pharaoh_Atemthe units are fine14:51
zygaPharaoh_Atem: I figured it is better to have you do a review first before I go around and strip everything14:51
Pharaoh_Atemit's the presets that are an issue14:51
Pharaoh_Atemone sec14:51
zygaPharaoh_Atem: sure, I'm happy to remove those14:51
nessitamreed, looking. So your snap does not provide any binary at all?14:52
mreednessita, it should generate a dbench binary14:52
mreednessita, I am not sure if I have that set up correctly14:52
nessitamreed, seems like is not? the review failed with14:52
nessitaCould not find compiled binaries for architecture 'amd64' lint-snap-v2_architecture_specified_needed (amd64)14:52
nessitaelopio, do we have any documentation on the above, or who would be the best person to assist mreed?14:53
kyrofanessita, I got it. mreed, can I see your YAML?14:56
mupBug #1613971 opened: using oneshot results in failed service <Snapcraft:New> <Snappy:New> <https://launchpad.net/bugs/1613971>14:56
mreedkyrofa, sure14:57
bergkatten_ogra_: tnx, testing it on my machine14:57
nessitakyrofa, oh thank you! kyle to the rescue14:58
kyrofamreed, feel free to ping me directly if it's not public, by the way14:59
mupBug #1612909 changed: Unable to install snappy in Fedora <Snappy:Fix Released by zyga> <https://launchpad.net/bugs/1612909>14:59
mupBug #1614134 opened: need a way to start daemon only if all interfaces are connected <Snappy:New> <https://launchpad.net/bugs/1614134>15:02
ogra_mvo, so wheer is that branch you talked about above (to not make snap_kernel/_core being unset if only one is upgraded) was that a snapd change ?15:03
ogra_i dont see any change in snappy-hub15:04
ogra_mvo, also, you probably want the fixes from seb128 for xdg-open and friends that i just pushed to the PPA in your promoted ubuntu-core15:05
ogra_since they affect classic directly15:05
Pharaoh_Atemzyga: I left a comment on the snapd review15:05
* ogra_ is waiting for the PPA publisher to actually release the change before triggering a new ubuntu-core15:06
zygaPharaoh_Atem: thanks, looking15:06
mvoogra_: its a snapd fix15:06
ogra_ah, k15:06
mvoogra_: cool, yeah, once the other fix lands I can do new images15:06
ogra_ok, publisher done, building a new ubuntu-core15:09
=== JanC is now known as Guest40946
=== JanC_ is now known as JanC
jdstrandkyrofa: ok, fyi bug 161413415:09
mupBug #1614134: optionally start daemon only if all interfaces are connected <Snappy:New> <https://launchpad.net/bugs/1614134>15:09
jdstrandthat took longer than I expected to capture15:09
kyrofajdstrand, that's lovely, thank you for taking the time!15:11
jdstrandnp15:11
jdstrandmvo: hi! https://github.com/snapcore/snapd/pull/1598 should no longer have the Blocked tag. I think Reviewed should be reviewed too so a snappy team member can review it (I +1'd it)15:14
mupPR snapd#1598: interfaces: implement a fuse interface <Reviewed> <Created by stgraber> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/1598>15:14
jdstrandmvo: oh15:14
jdstrandnm15:14
mvojdstrand: :)15:15
jdstrandmvo: but that actually brings up the question on these labels15:15
jdstrandmvo: are how they are used by the team documented somewhere?15:16
jdstrandmvo: (I can't change them, which is ok, but I don't know when to ask for them to be removed)15:16
mvojdstrand: not sure if they are documented. can you add/remove them? if so, feel free to adjust as needed, i.e. when you are done and its no longer blocked, jus trmeove it15:16
jdstrand(or added)15:16
mvojdstrand: yeah, I think niemeyer needs to add you so that you can edit the labels, I think you should definitely be able to do that15:16
niemeyerHuh.. I'd expect that to be the case already15:17
niemeyerjdstrand: Try now..15:18
niemeyerjdstrand: You were not in the committers team, which is an error on my end15:18
jdstrandniemeyer: I have a gear icon now15:19
jdstrandthanks!15:19
niemeyerIt's a bit funny that this is the case..15:20
niemeyerWhy would people need write access to the repository just to be able to change a label on an issue?15:20
jdstrandyeah, those seem quite different things indeed15:20
niemeyerjdstrand: I mean, you should have write access regardless, but I can see many other cases where simply having the person as part of the project should be enough15:21
* jdstrand nods15:21
jdstrandI also find it curious that some things in the githug interface update without a reload, but others do not15:22
jdstrandhaha, githug15:22
jdstrandgithub*15:22
jdstrandeg, Open -> Merged. why does that need a reload?15:23
* jdstrand shrugs15:23
sergiusensjdstrand I see your are now showing the love for git ;-)15:23
jdstrandapparently :)15:24
jdstrandseriously though-- I really like git's branching15:24
=== mup_ is now known as mup
=== mup_ is now known as mup
* zyga is stuck on %patch015:52
zygaPharaoh_Atem: want to help me figure out why a patch (which works perfectly fine) doesn't apply with %patch0 -p115:55
mupPR snapd#1691 closed: many: add `snap download` command that downloads into /var/lib/snapd/download <Created by mvo5> <Closed by mvo5> <https://github.com/snapcore/snapd/pull/1691>15:55
Pharaoh_Atemzyga: fuzz is zero by default15:55
Pharaoh_Atemif you need a different fuzz value, you'll need to override it15:56
zygano, the patch should apply perfectly15:56
zygaI have no idea why it behaves this way15:56
mupPR snapcraft#718 closed: Fix bug lp:1586546 allowing setup.py to work on some projects <Created by blakerouse> <Merged by sergiusens> <https://github.com/snapcore/snapcraft/pull/718>15:56
zygaI unpacked the tarabll, git added everyting15:56
zygatweaked one line and exported the commit15:56
zygathe same tatics worked with snap-confine15:56
zygawhy does pastebin doesn't work on fedora15:57
bergkatten_noise, I have snapstore on my localhost:5000 :) is there a builtin way to control who can access it?16:00
noise][bergkatten_: nope!16:00
noise][it's super dumb and simple :)16:00
noise][no batteries included16:00
bergkatten_true :)16:01
mupPR snapcraft#682 closed: Extending the created yaml from `snapcraft init` <Created by wandrewkeech> <Closed by sergiusens> <https://github.com/snapcore/snapcraft/pull/682>16:02
mupPR snapcraft#727 closed: Add a new build plugin 'shell' that runs arbitrary shell commands <Created by Magical-Chicken> <https://github.com/snapcore/snapcraft/pull/727>16:02
zygaPharaoh_Atem: http://paste.ubuntu.com/23064997/16:07
zygaPharaoh_Atem: the actual patch is http://paste.ubuntu.com/23065021/16:08
Pharaoh_Atemyou really should move those service files and stuff16:08
zygaPharaoh_Atem: snap-confine is done, snapd is next16:09
zygaPharaoh_Atem: perhaps I should just ship them separately for now16:09
zygaPharaoh_Atem: this is how the build fails http://paste.ubuntu.com/23065052/16:10
Pharaoh_Atemwhat happens when you run patch with fuzz=0 by hand?16:10
Pharaoh_Atemdoes it work?16:10
Pharaoh_Atemit should fail16:10
* zyga checks16:11
zygait works okay16:11
zygaI suspect there's something in how I run %setup that makes it broken16:11
zygabut I cannot guess what, catting the file just before %patch showed expected content16:12
qenghoWhat's the state of snappy on a rasp pi 3 these days? I'd like to have snappy on classic, if possible.16:27
ogra_not sure there are classic pi3 images beyond the mate ones (which arent really official)16:28
qenghohttp://cdimage.ubuntu.com/ubuntu/releases/16.04/release/ubuntu-16.04-preinstalled-server-armhf+raspi2.img.xz16:28
ogra_we have pi3 all-snap images in the works though ... just follow mvo's instructions from the ML and use the ubuntu-device-flash snap16:29
ogra_qengho, i doubt that has a pi3 uboot16:29
ogra_(kernel and rootfs should work though )16:29
zygaPharaoh_Atem: I'll ignore the patch, I have no idea why it fails16:32
zygaPharaoh_Atem: I'll just copy the service file into the package16:32
Pharaoh_Atemyeah, you could have distro specific service files as extra sources and just copy them in that way16:33
zygaPharaoh_Atem: I'll use a patch for now (hopefully a patch to a new file will work ok)16:34
zygaPharaoh_Atem: I'll work on fixing this upstream next16:35
zygaPharaoh_Atem: and perhaps they will be required for selinux later on16:35
Pharaoh_Atemyeah16:36
Pharaoh_Atemby the way, if you want to shortcut on patch application, you can use %autopatch -p116:36
Pharaoh_Atemor use %autosetup -p1 in place of %setup16:36
Pharaoh_Atemif you'd rather have git apply the patches, you can use -S git instead of "-p1" and add "BuildRequires: /usr/bin/git"16:37
zygayep, that worked16:38
zygayeah, I know about autosetup :-) I remember hrw blogging about it16:38
Pharaoh_Atem%autosetup / %autopatch will apply the patches in the order listed in PatchXX16:38
Pharaoh_Atemhrw blogged about it after I asked about because I didn't know about it :P16:39
zygamy goal as both upstream and pacakger is to have less patches :)16:39
* zyga is so cold today16:39
zygait's raining *again*16:39
Pharaoh_Atemit's 81F/27C here and partly cloudy with no rain16:39
zygait's probably around 10C now16:40
zygaand windy16:40
zyga*holidays* :D16:40
zygaPharaoh_Atem: one more fix and I will ask you for a re-review16:42
Pharaoh_Atemokay16:42
Pharaoh_Atemby the way, don't forget to file a bug against fedora-release: https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=fedora-release16:44
zygayep, I'll do that shortly16:44
zygawhere should I upload patches that go along my spec files?16:44
Pharaoh_Atemthat's why you make SRPMs :)16:44
Pharaoh_Atemso that people can download everything and look at it16:44
Odd_BlokeI'm trying to switch from the copy plugin to the dump plugin, and I'm getting: "[Errno 39] Directory not empty: '/root/parts/git-deps/install'" just after Building starts.  What does this mean?16:45
zygaPharaoh_Atem: ah16:45
zygaright :)16:45
zygauploading -5 srpm now16:45
Odd_Blokesergiusens: (Perhaps you can help with my above question?)16:46
=== nacc_ is now known as nacc
Odd_BlokeOK, I've shelved fixing that, now I'm just trying to release what I have.17:09
qenghoogra_: What's with the "sudo" in every ubuntu-device-flash execution I've ever seen?17:09
Odd_BlokeI've done a `snapcraft push --release edge <file>` but I'm now getting "- Download snap "git-deps" (1) from channel "edge" (received an unexpected http response code (401) when trying to download https://public.apps.ubuntu.com/download-snap/MlfzKnSBHbOsx7wuOxnTsflAEQEU3mjA_1.snap)" when I run `snap install --edge git-deps`.17:10
Odd_BlokeIs there a step I'm missing to make this publicly available?17:10
Odd_Bloke(And, also, I think I'm logged-in, so shouldn't I be able to install it regardless?)17:10
mupPR snapcraft#695 closed: Add process-dependency-links option to Python plugins <Created by OddBloke> <Closed by sergiusens> <https://github.com/snapcore/snapcraft/pull/695>17:17
mupPR snapcraft#734 opened: python plugins: add process-dependency-links option <Created by sergiusens> <https://github.com/snapcore/snapcraft/pull/734>17:17
mhall119zyga: where are the docs for defining a plug using an interface with parameters?17:17
sergiusensOdd_Bloke hey, speaking of the devil, was just refactoring to get your constraints stuff in17:19
* sergiusens reads17:19
sergiusensOdd_Bloke means you want to wait for 2.15 (or use master) wrt dump/copy17:20
sergiusensOdd_Bloke 401 probably means you need to `sudo snap install` or to login17:21
zygamhall119: I don't think there are any17:23
zygamhall119: I'm looking at updating the docs as we discussed but I didn't get around to do it yet17:24
dobeyhow can i found if an installed snap package is removable or not?17:24
sergiusensqengho sudo ubuntu-device-flash because kpartx17:24
dobeyerr, s/found/find out/17:25
dobeyalso, where does the value for "series" come from exactly?17:29
dobeysince it doesn't appear to match what's in /etc/lsb-release exactly17:29
mhall119zyga: can you give me a quick example of how to define a plug for my arduino snap that passes a path to the "serial-port" interface?17:31
zygamhall119: serial port has no attribute on the plug side, only on the slot side17:32
zygamhall119: currently there is no way to use the serial-port on classic distributions17:33
zygamhall119: technicaly the syntax requires the extended form of slot definition, you can see how it looks like here:17:33
zygahttps://github.com/snapcore/snapd/blob/master/interfaces/builtin/serial_port_test.go#L5317:35
mhall119zyga: ok, so I want to help fix serial-port on classic desktops, where does that work need to be done, in snapd or in ubuntu-core snap?17:35
zygamhall119: it's not broken, there's no definition on how it would work on classic today; that's definitely snapd but also udev and other parts, definitely would require major features to support17:37
zygamhall119: sorry :/17:37
zygamhall119: this is the dynamic slot problem, we have no solution for that, either in snapd or in a 3rd party snap today17:37
mhall119so, not as simple as just adding /dev/ttyS* to a snap's apparmor profile?17:37
zygano17:38
zygathat's not a solution, that's equivalent to --devmode17:38
zygajust use devmode for now17:38
mhall119but devmode makes it harder to get from the store17:38
sergiusensdobey maybe this can help https://github.com/snapcore/snapd/blob/master/docs/rest.md#v2system-info17:39
mhall119at least with an interface the user could just connect it manually after install17:39
zygamhall119: there's no such interface today17:39
mhall119how is serial-port used today then? Only with gadget snaps?17:40
dobeysergiusens: ah thanks. what about determining if a package is removable or not? getting the details for ubuntu-core doesn't seem to show any value which would relate to being removable17:40
zygamhall119: you could define a "all-serial-ports" interface or something but please discuss this with jdstrand, the problem is really dynamic plug/slot that has no support in snapd today, then you have to bridge this with monitoring hardware events (perhaps in snapd, perhaps in something that talks to it) and connect/disconnect, etc17:40
zygamhall119: nobody is using it today in classic17:40
zygamhall119: it was designed for all-snap systems17:40
zygamhall119: and there it only supports static devices17:41
mhall119jdstrand: ping, see above, I'd like to help make serial ports available to confined snaps17:41
mhall119popey: ^^ might be more complicated than we though17:41
zygamhall119: jdstrand won't change the facts I menitoned above, this is not even designed yet17:41
mhall119s/might/definitely/17:41
zygamhall119: security side is easy (you got it right actually) but it's not the security that is the problem17:41
sergiusensdobey that is a more complicated question; the only thing I can think of is checking the model assertion, I would delegate this question to mvo17:41
popeyaww17:42
mhall119zyga: what specifically is the problem?17:42
sergiusensdobey my plain gut reaction is, if type == app then it is removable (unless stated by the model that it shouldn't)17:42
sergiusenspopey why?17:42
zygamhall119: as i said above, snapd doesn't have any support for dynamic slots or plugs yet17:43
mhall119zyga: btw, this is me dogfooding community contributions to interfaces, so please forgive all the questions17:43
zygamhall119: so nothing can monitor the hardware17:43
jdstrandmhall119 (cc zyga): fyi, there is some work in this area with https://github.com/snapcore/snapd/pull/166917:43
mupPR snapd#1669: interface: add usb device support to serial-port <Created by jocave> <https://github.com/snapcore/snapd/pull/1669>17:43
zygamhall119: so nothing can react to serial port hardware being pulugged and unplugged17:43
zygamhall119: etc etc etc17:43
popeysergiusens: my awww was @ mhall11917:43
jdstrandI haven't reviewed it all yet and it hasn't gone through the interfaces team yet, so, just fyi17:43
jdstrandI plan on looking that this afternoon17:44
sergiusenspopey ah :-)17:44
zygajdstrand: that's just a hack IMHO, I don't see any serious attempt at fixing this yet17:44
sergiusenskyrofa or josepht mind looking at https://github.com/snapcore/snapcraft/pull/734 ?17:44
mupPR snapcraft#734: python plugins: add process-dependency-links option <Created by sergiusens> <https://github.com/snapcore/snapcraft/pull/734>17:44
zygajdstrand: it is equivalent to just doing "gimme all /dev/ttyUSB* + a few others"17:44
zygajdstrand: at least IMHO, I always assumed snapd will do device discovery like udev17:45
sergiusenskyrofa josepht the commit made by myself only if tight on time ;-)17:45
dobeysergiusens: hmm, i'm looking for something approximately equal to the "_removable" field in the click manifest of an installed package17:45
mhall119zyga: if it's not auto-connected, is it so bad?17:45
zygajdstrand: if snapd had an api for dynamic plugs and slots one could write a snap that exposes serial ports by looking at netlink17:46
jdstrandzyga: re discovery, sure. when we hung out I said mentioned this shouldn't conflict with that17:46
jdstrandbut I've not looked at the implementation yet17:46
zygamhall119: I'm not sure this is related17:46
zygamhall119: what is needed is design decision17:47
zygamhall119: there are many ways to get it to "work"17:47
zygamhall119: depending on how you want to evolve snapd and how plugs and slots and interfaces are expected to work17:47
* jdstrand -> food17:48
dobeysergiusens: hmm, should i file a bug maybe? it seems like for a fully snap based system we'll want to be able to flag certain snaps as not removable, beyond the base os snap, including some apps/scopes perhaps17:52
ogra_i thought thats a feature of the seed.yaml17:52
ogra_(though thats just an assumption)17:53
sergiusensdobey yes, that would be controlled by the model assertion, but an api to query would be good17:53
dobeyok17:58
mupPR snapcraft#733 closed: Add the go-buildtags property to the go plugin <Created by elopio> <Merged by sergiusens> <https://github.com/snapcore/snapcraft/pull/733>18:20
mupBug #1614212 opened: Invalid character in ubuntu-core mount name breaks etckeeper <Snappy:New> <https://launchpad.net/bugs/1614212>18:22
mhall119zyga: jdstrand: if I'm reading this diff right, it will allow snap apps to connect to pre-defined paths like /dev/ttyS0 if the core snap provides a slot for it, or it lets the snap connect to a device by vendor/product id without it having to be defined in the core snap, both of which seem like good approaches to me at least, and would allow for my use case18:24
zygamhall119: the core snap will never provide this slot18:25
mhall119zyga: then I can use the vendor/product id for arduino boards18:25
mhall119which doesn't require a pre-defined slot, if I understand this patch18:26
sergiusensjosepht this needs updating https://github.com/snapcore/snapcraft/pull/70518:35
mupPR snapcraft#705: parser - Remove namespacing and subparts <Created by josepht> <Conflict> <https://github.com/snapcore/snapcraft/pull/705>18:36
josephtsergiusens: yeah, I'm working on improving the coverage, should be ready soon.18:36
sergiusensjosepht sounds good :-)18:38
mupPR snapd#1692 opened: asserts: add serial-proof device assertion <Created by matiasb> <https://github.com/snapcore/snapd/pull/1692>18:48
dobeyelopio: are you "Leo Test" ?18:48
flyingHordeHey all18:50
flyingHordeis there anyone here ?18:50
flyingHordeI wanted to ask about deduplication18:50
flyingHordeWe can use hash algorithms for all binaries, store them in central folder with the hash as their file name and use hard link from that folder to the isolated folder of the application18:51
mupPR snapcraft#664 closed: New plugin: Script (runs bash scripts) <Created by monsterjamp> <Closed by sergiusens> <https://github.com/snapcore/snapcraft/pull/664>19:02
ssweenyzyga, you left a comment in my udisks PR that /media is bind-mounted with snap-confine. How can I be sure I'm using snap-confine with my snaps? I have ubuntu-core 16.-4.1 rev 230 on my raspberry pi right now and I'm still getting "read-only filesystem" errors19:16
stgraberjdstrand: I posted a generic-ish response to the bug. Would be good to have him confirm that he's in devmode (so no blocked syscalls or sendmsg being denied by confinement) and ideally get an strace to confirm that he did manage to grab a handle to the right netns19:19
stgraberjdstrand: in theory, so long as you can open /proc/PID/ns/net, you should be able to setns into the network namespace of the task (you need to be root or also attach to the user namespace first) and the netlink interface to move devices between network namespaces is supposed to use the same check in kernel19:21
stgraberjdstrand: what typically gets in the way is: being able to actually see and open the handle, being allowed to call the right syscalls and having the right capabilities (at least net_admin but I suspect sys_admin too)19:22
zygassweeny: do you have /usr/lib/snap-confine?19:27
zygassweeny: snap-confine aka ubuntu-core-launcher is used by all snaps19:28
ssweenyzyga, nope19:28
ssweenythough I do have /usr/share/doc/snap-confine19:28
ssweenyso some version of it should be installed19:28
zygassweeny: I bet you have snap-confine or ubuntu-core-launcher (u-c-l is the old name)19:28
zygassweeny: I don't know which version you have though, sorry19:29
ssweenyzyga, is there some other way I can test with snap-confine?19:31
zygassweeny: ion classic systems you can have reasonably up-to-date snap-confine19:32
zygassweeny: the core snap is built automatically too but probably in the non-stable channel19:32
ssweenyzyga, the core snap I'm using id from the edge channel19:32
zygassweeny: on an all-snap system /media is always read only19:33
zygassweeny: my remark was for classic19:33
qenghoWhat means "all-snap"?19:33
ssweenyah19:33
zygassweeny: I'm sorry19:33
zygaqengho: a distribution that is meade entirely from snaps19:34
ssweenyzyga, is that a deliberate choice or just that no one's come up with a compelling reason to do otherwise yet? :)19:35
jdstrandstgraber: thanks for the feedback. I'm going to play with it a bit and may have some other questions19:38
zygassweeny: on an all-snap image everyting is comprised of snaps, there are very few writable "holes", /media is not one of them;19:40
sergiusenselopio is this bad news https://github.com/snapcore/snapcraft/pull/734 ?19:41
mupPR snapcraft#734: python plugins: add process-dependency-links option <Created by sergiusens> <https://github.com/snapcore/snapcraft/pull/734>19:41
sergiusenselopio the immediate fail?19:41
ssweenyzyga, fair enough19:42
sergiusenskyrofa mind adding your resulting discussion to https://bugs.launchpad.net/ubuntu/+source/snapcraft/+bug/1607459 and mark the bug appropriately?19:44
mupBug #1607459: type:os should prevent adding "confinement" to the snap.yaml <Snapcraft:Triaged by kyrofa> <snapcraft (Ubuntu):New> <https://launchpad.net/bugs/1607459>19:44
ssweenyzyga, related question: I recently noticed that trying to mount a directory (in /run/media/...) silently fails when doing so from inside a snap. No errors in any logs that I can see, and udisks seems to think that it worked but the "mounted" directory is empty and nothing shows up for it in /proc/mounts19:44
kyrofasergiusens, right yes of course, thanks for the reminder19:44
ssweenyzyga, just running mount from the command line works19:44
ssweenybut the snap is calling the system mount AFAICT. there's no mount command inside the snap19:45
=== ljp is now known as lpotter
zygassweeny: because snaps run in a mount namespace19:47
ssweenyah, crap19:48
zygassweeny: those mounts are visible only to the process that performed them19:48
zygassweeny: you could use a specially designed bind mount to overcome this19:48
zygassweeny: because of shared subtrees and a little bit of magic19:48
zygassweeny: http://www.zygoon.pl/2016/08/snap-execution-environment.html19:49
ssweenyzyga, thanks! I'll look into it19:53
jdstrandsergiusens: how do I use the dump plugin to replace copy? I have something in ./bin, do I did:19:54
jdstrandparts:19:54
jdstrand  wrapper:19:54
jdstrand    plugin: dump19:54
jdstrand    source: bin/19:54
jdstrandsergiusens: that didn't seem to work: [Errno 2] No such file or directory: '/home/jamie/bzr-pulls/snap-netns-test/prime/bin/sh'19:54
zygajdstrand: question, how would you feel if interfaces had a way to drop symlinks into hostfs (derived from what interface code says and $SNAP_NAME)19:56
zygajdstrand: use case is to have snaps integrate into classic distros19:56
jdstrandzyga: can you give an example?19:57
jdstrandsergiusens: I guess a tar file is the only way?19:57
sergiusensjdstrand did the stuff in bin get dumped into the prime directory (sans bin)?19:57
zygajdstrand: dropping a symlink to an .xml file in /usr/share/gnome-something-something/ for wallpapers19:57
jdstrandsergiusens: it did19:58
qenghojdstrand: I've seen similar error when not snapping from scratch. I think the dependency tree is broken.19:58
jdstrandI guess bin/bin?19:58
sergiusensjdstrand yes, or maybe use organize as give it some miles :-)19:58
sergiusensorganize:\n    sh: bin/sh\n19:58
sergiusensiirc that should work19:58
jdstrandzyga: so /usr/share/gnome-something-something/snap.some.wallpaper -> /snap/some/current/wallpaper (or similar)?19:59
elopiosergiusens: is this the same problem as the one in telegram?19:59
sergiusenselopio yes19:59
jdstrandsergiusens: ok, thanks!19:59
zygajdstrand: yes, (with .xml extension)19:59
sergiusenselopio seems to be running now after enought retries19:59
zygajdstrand: (that would be in interface code)19:59
zygajdstrand: it would be something that the core snap would have a slot for on classic, the interface would auto-connect20:00
zygajdstrand: in all snap systems the interface could do something else that is still meaningful20:00
jdstrandzyga: I'm not opposed to the concept. iirc relying on symlinks is somewhat frowned upon within snappy, but if niemeyer is signs off on it, that's fine. the only thing wrt security is that snaps are providing data that is being fed to unconfined processes20:02
jdstrandzyga: and that can be scary. but that can be disussed on an interface by interface basis20:02
zygajdstrand: the interface here is wallpapers, I agree this is tricky20:03
zygajdstrand: symlinks because the location is hardcoded20:03
zygajdstrand: and because there's no apps there, just content20:03
jdstrandthis gets to the heart of the classic desktop is not designed for untrusted apps/data20:04
jdstrand(from a security standpoint)20:04
zygajdstrand: yes but this is something that people do already, there's nothing new here20:04
jdstrandI suspect wallpapers is 'ok'. if there are flaws in image libraries we would want to fix them in USNs20:05
jdstrandzyga: sure but we want to be better not 'nothing new' :)20:05
zygajdstrand: get better by getting adoption, people already google for wallpapers and get them from random websites;20:06
jdstrandI understand that. that is why I made my comment about USNs20:06
zygajdstrand: get them on snaps first :)20:06
zygajdstrand: USN is CVE for ubuntu?20:06
jdstrandUbuntu Security Notice. it is a *fix* for a CVE in Ubuntu20:07
zygaah, I see20:07
zyga+1 on that :)20:07
jdstrandif a snap provides a crafted file that does bad stuff, we want to fix that image library in a USN20:07
jdstrandcause that bad stuff could happen in libreoffice, the browser, etc20:08
sergiusenselopio or here, are you happy with https://github.com/snapcore/snapcraft/pull/734 ?20:32
mupPR snapcraft#734: python plugins: add process-dependency-links option <Created by sergiusens> <https://github.com/snapcore/snapcraft/pull/734>20:32
elopiosergiusens: yes20:36
sergiusensthanks20:37
mupPR snapcraft#734 closed: python plugins: add process-dependency-links option <Created by sergiusens> <Merged by sergiusens> <https://github.com/snapcore/snapcraft/pull/734>20:38
mhall119zyga: sergiusens: are we still waiting for snapd to support snaps defining runtime environment variables?20:49
zygamhall119: yes21:02
sergiusensrobert_ancell hi there, do you think you will have time to look into https://github.com/snapcore/snapcraft/pull/67021:04
mupPR snapcraft#670: Remove .la files generated by autotools <Created by robert-ancell> <https://github.com/snapcore/snapcraft/pull/670>21:04
sergiusensmhall119 I am glad zyga responded, I am waiting still but also have bigger plans for this21:05
robert_ancellsergiusens, ok21:05
qenghoWhat's the bug tag to report a problem with seccomp filter? "snappy-interface"?21:12
kyrofaqengho, snapd-interface, I believe21:13
mupBug #1614269 opened: tor package on ARMHF crashes on filtered syscall "personality" <snapd-interface> <Snappy:New> <https://launchpad.net/bugs/1614269>21:14
mupPR snapd#1689 closed: spread: disable re-exec to always test development tree <Created by kyrofa> <Merged by pedronis> <https://github.com/snapcore/snapd/pull/1689>21:17
zygaPharaoh_Atem: done :)21:19
zygamhall119: though it is much closer now, I believe we can switch to snap-exec within the next release21:20
mupPR snapcraft#735 opened: Load the remote parts only when needed <Created by elopio> <https://github.com/snapcore/snapcraft/pull/735>21:20
Pharaoh_Atemzyga: btw, you probably should ship in /etc/sysconfig/snapd the environment config value to turn off the self-update/re-exec thing that snapd can do21:20
zygaPharaoh_Atem: is there something special I need to do with files in /etc?21:21
la_juyis`anyone awake? :)21:21
zygaPharaoh_Atem: I can make that change easily, will that file be read by systemd and passed to snapd environment?21:21
zygala_juyis`: always21:21
Pharaoh_Atemyes21:21
la_juyis`zyga, yes!21:21
zygaPharaoh_Atem: let me try that :)21:22
Pharaoh_Atem%config(noreplace) %{_sysconfdir}/sysconfig/snapd21:22
Pharaoh_Atemthat goes in %files21:22
zygaPharaoh_Atem: thanks!21:22
la_juyis`anyone knows if there's problems with the snap store? Download snap "snappy-debug" (22) from channel "stable" (received an unexpected http response code (401) when trying to download https://public.apps.ubuntu.com/download-snap/DVAzG29Avl1Cn5s1nLXGzyQ0vi9v87Jw_22.snap)21:22
zygawhat does noreplace mean?21:22
Pharaoh_Atemit means that the default behavior switches from backing up the existing config to .rpmsave files and writing a new one to installing the new config as .rpmnew21:23
stgraberjdstrand: ok, so I think I figured out what's going on in https://bugs.launchpad.net/snappy/+bug/161144421:23
mupBug #1611444: Cannot share a namespace between apps in a SNAP <Snappy:New> <https://launchpad.net/bugs/1611444>21:23
Pharaoh_Atemthen when someone runs a tool like rpmconf, it'll give people the option of handling it21:23
Pharaoh_Atemthis only matters if the user/admin modifies the config21:23
Pharaoh_Atemotherwise, it works like any other file21:23
stgraberjdstrand: it's the same issue we ran into with lxcfs & lxd, the separate mntns prevents openvswitch from seeing the other network namespaces as those are referenced through bind-mounts under /run/netns.21:24
stgraberjdstrand: so the first app creates the path in /run/netns and sets up the bind-mount. Second app can see /run/netns/<name> but it sees it as an empty file rather than as the magic netns reference that should be mounted over it.21:24
zygaPharaoh_Atem: I see, thanks21:25
zygaPharaoh_Atem: modified locally, testing to see that it ends up where I expect21:29
mupPR snapcraft#736 opened: Disable internet access during unit tests <Created by elopio> <https://github.com/snapcore/snapcraft/pull/736>21:35
zygaPharaoh_Atem: disabled21:36
Pharaoh_Atemzyga: we're having an interesting argument about /snap on #fedora-devel21:37
Pharaoh_Atemcare to pop in?21:37
Pharaoh_Atemthe /snap path is a problem, and figuring out a resolution is tough21:38
zygaPharaoh_Atem: sure21:38
la_juyis`zyga, care to take a look at http://pastebin.ubuntu.com/23065630/ and maybesuggest something?:)21:39
zygala_juyis`: in a moment21:39
la_juyis`zyga, sure21:39
jdstrandstgraber: interesting21:46
jdstrandstgraber: how did you fix it with lxd and lxcfs?21:46
stgraberjdstrand: instead of using multiple daemons, we just define one which is a long ugly shell script that starts everything21:47
jdstrandhrmm21:48
stgraberjdstrand: sucks in that we can't have proper monitoring and restart of the different bits we care about, but we could always solve that by bundling our own copy of systemd and spawning that from the wrapper script21:48
jdstrandstgraber: another way to fix it would be to enter the same mount namespace21:48
jdstrand(for snapd)21:49
stgraberjdstrand: right, but you'll run into some problems then21:49
jdstrandstgraber: talking about commands within the same snap21:49
jdstrandstgraber: there was a request for that with a shared /tmp21:49
jdstrandstgraber: what kind of problems?21:49
stgraberjdstrand: my understanding was that interfaces could define bind-mounts and so that was why you wouldn't just have the launcher recycle the same mntns for all apps within the snap21:50
* jdstrand notes he never liked the private mount and preferred everyone set TMPDIR21:50
jdstrandstgraber: we do have the content sharing interface. that makes it so one snap can export a dir read or rw and have it bind mounted into another snap's app-specific area (actually, rw is broken last I heard)21:51
jdstrandwe also do other bind mounts into the snap on classic21:52
jdstrandbut that is different21:52
jdstrandstgraber: I'm not sure how I see the problem21:52
jdstrandthat was phrased weird21:53
jdstrandstgraber: I still don't see what the problem is. can you elaborate?21:53
stgraberso the problem is if you have multiple apps defined within your snap, some using such interfaces (leading to bind-mounts being setup by the launcher) and some which aren't21:56
stgraberright now, they all get to see a view of the filesystem which matches what's declared. If they're using such an interface, the content is there, if they're not, then it's not21:56
stgraberif you have the launcher share the mntns between all apps within a snap, you'll get the same result (as far as mount structure) as if all the apps were using all the interfaces21:57
jdstrandif we got rid of the private mount they'd have access to the imported dir even if it didn't declare it21:58
jdstrandright21:58
jdstrandthat's interesting, and may not be a big deal with 'content' but might be with others21:58
stgraberoh yeah, I'm absolutely not advocating for removing the private mount21:58
stgrabermy initial thought was to allow for ns reuse in the launcher and setup some kind of ordering so I could say that lxd is to be started after lxcfs. In that case the launcher would re-use the lxcfs mount namespace, unshare it, undo anything that's specific to lxcfs and then apply the lxd-specific mounts. Allowing lxd to see the lxcfs mounts.22:01
stgraberbut that design wouldn't work for openvswitch since the daemons will keep creating mounts after startup22:01
stgraberwhich then wouldn't be visible to the second daemon since you unshared22:02
stgraberso in their case, they do need to use the exact same mount namespace for both (can't use a descendant). They can either do that by just running everything as one "app" or by having the launcher have some way to reuse existing mntns.22:03
* jdstrand nods22:04
jdstrandstgraber: so I guess one option would be to add an argument to snapcraft.yaml to share the mmntns.22:04
jdstrandstgraber: and then document what that means for the snap. perhaps conflicting with any interfaces that use .fstab mounts (eg, content)22:05
stgraberjdstrand: yep, ideally with a way to tell it which should be using a shared mntns. No need for the client tool to be using the shared mntns, but the daemons should have a way to opt into that.22:05
jdstrandstgraber: why wouldn't we extend that to non-daemon commands?22:06
stgraberjdstrand: not saying that we should restrict it to daemons, but that if this is going to conflict with some interfaces, we shouldn't make it a snap level knob, but an app level one.22:07
jdstrandoh I see what you're saying, yes, that makes sense22:07
stgraberjdstrand: so I could say that daemon1, daemon2 and command1 in my snap are using a share mntns, but daemon3 and command2 aren't (meaning that I could then use .fstab mounts stuff for those two)22:08
jdstrandstgraber: ok, I'll capture all this in the bug22:08
jdstrandstgraber: thanks for your help on this22:08
stgraberjdstrand: would be simple enough to even allow for things like: daemon1 and daemon2 use a shared mntns, daemon3 and command1 use a different shared mntns and daemon4 and command2 don't use shared mntns. But use cases for such a setup are likely not that common so a plain boolean knob may be enough :)22:09
* jdstrand nods22:09
zygala_juyis`: it seems that mono is not aware of where it is running and wants to load files from /usr/lib/mono, try configuring mono for a different prefix (say, /sanp/$SNAP_NAME/current/usr) or teach it about $SNAP (the location of the snap)22:16
zygala_juyis`: I'm sorry it's too late for me to give you more advice today22:16
la_juyis`zyga, thanks! yeah, i'm going to sleep too :)22:16
qenghoOn a all-snaps machine, there's no way to alter syslog rules, right?22:25
dannfhey - i created a snap for a sprinkler control app i run on my beaglebone black, but i just realized there are no 16.04 bbb images. can i expect that snap to work on the 15.04 bbb image, or have things evolved too much since then?22:39
qenghodannf: It won't work on 15.04. 15.everything isn't even supported any more, anywhere.22:40
qenghodannf: I have the same trouble. I have a pandaboard.22:41
dannfqengho: ah, ok. hm.. i wonder if should bother trying an elinux 16.04 image, installing snapd, and giving it a go22:44
qenghodannf: Worth a try, but not worth a lot of effort. I think I could foresee that elinux kernel lacking some security facility that snap depends on to be safe.22:46
qenghodannf: and, that rasp pi is pretty darned cheap.22:46
dannfyep - agreed22:47
dannfyeah, but i *have* the bbb + the control kit for it, and it works fine :) don't see throwing that out22:47
jdstrandniemeyer: fyi, for tomorrow, can you take look at bug 1611444?22:59
mupBug #1611444: Cannot share a namespace between apps in a SNAP <Snappy:Confirmed> <https://launchpad.net/bugs/1611444>22:59
jdstrandniemeyer: it is going to need architect input. Please see all the comments-- the reporter is requesting even more than the initial report and that detail might influence the design/implementation23:00
niemeyerjdstrand: Heya23:01
niemeyerjdstrand: Can you ping me about it tomorrow for us to discuss it, or schedule a call?23:01
jdstrandok23:02
qenghodannf: There's a beagleblack package, I see. I bet your hardware is supported.23:04
niemeyerjdstrand: Thanks.. the backlog is a bit wild at the moment, so that's the best chance of it not being delayed further23:05
qenghodannf: It's not new. Has a weird version number and owner.23:05
dannfqengho: cool, i'll take a look. right now i'm just trying a newer kernel/upgrade to xenial userspace to see if i can get it working in place23:06
niemeyerjdstrand: btw,23:07
dannf(which i hope means i can run snaps in devmode on ubuntu classic w/o the gadget layer)23:07
niemeyerhttps://www.irccloud.com/pastebin/x1y6Nkq7/23:07
marcoceppitrying to use the scons plugin23:14
mupPR snapcraft#735 closed: Load the remote parts only when needed <Created by elopio> <Merged by sergiusens> <https://github.com/snapcore/snapcraft/pull/735>23:14
marcoceppiI've got everything building but nothing is going into stage or prime23:15
qenghomarcoceppi: Do you have any "stage" or "organize" sections in your YAML?23:15
marcoceppino23:16
marcoceppiwell, yes23:16
marcoceppiI added a stage, to no avail23:16
marcoceppihttp://paste.ubuntu.com/23065874/23:16
qenghomarcoceppi: paste the output of building?23:16
marcoceppieverything get's built into parts/fceux/build/usr/23:16
marcoceppiit23:16
marcoceppiit's pretty long, one second23:16
qenghoI mean the stdout.23:17
marcoceppiqengho: running again to capture stdout23:17
qenghomarcoceppi: that "--prefix=usr" worries me.23:18
marcoceppiqengho: without it, it tries to install to /usr/local23:18
marcoceppiand the snapcraft command fails23:19
marcoceppiso that puts allthe contents in usr under parts/fceux/build23:19
qenghoWith it, does it try to install to the install dir?23:19
marcoceppiqengho: http://paste.ubuntu.com/23065876/23:19
marcoceppiqengho: nothing is in the install directory23:19
qenghomarcoceppi: I don't know exactly what to put there, but I suspect it will be something like  ../install23:20
marcoceppiqengho: really? there isn't like a magic $SNAP or something I should use?23:20
qenghomarcoceppi: It's not magic, and I don't know scons.23:21
marcoceppiapparently no on does, since there's not scons in playpen23:21
marcoceppiI'm trying ../install23:21
qenghomarcoceppi: Where it puts it isn't where it will eventually access it. If the build makes the assumption that writing-location == access location at run time, then bad things will happen.23:22
marcoceppiI'm guessing bad things will happen regardless at this point, butttt figured I would try23:22
marcoceppiwelp, I got a snap this time23:22
qenghocool.23:23
marcoceppifonts aren't loading, butt I think most of ti worked23:24
qenghoRock!23:24
marcoceppiit's a gtk app, will that mess things up in a anspa?23:24
qenghoNope. In fact, there may be a helper for fonts because of that.23:24
marcoceppihaha, sweet, I can load roms23:25
marcoceppiwhere would I find out about font helpers?23:25
marcoceppiqengho: I found this, https://bugs.launchpad.net/ubuntu/+source/snapcraft/+bug/1584357 which is the error I got as well. I'll start there23:27
mupBug #1584357: Snappy GTK applications <snapcraft (Ubuntu):Confirmed> <https://launchpad.net/bugs/1584357>23:27
qenghomarcoceppi: In your YAML, in fceux: add a line   after: [ desktop/gtk ]23:27
qenghomarcoceppi: and change your command line to  command: desktop-launcher $SNAP/bin/fceux23:28
qengho...I think.23:28
marcoceppiIssue detected while analyzing snapcraft.yaml: Cannot find definition for part 'desktop/gtk'. It may be a remote part, run `snapcraft update` to refresh the remote parts cache23:28
marcoceppiafter a refresh it still fails23:28
qenghomarcoceppi: Start fresh. snapcraft clean; sudo snap remove fceux-nes; ...23:30
marcoceppiqengho: all snapcraft commands against the yaml fail23:30
marcoceppiwith the above error message23:30
qenghoOh, I missed that.23:30
marcoceppiis there a way to list parts?23:30
marcoceppimaybe desktop/gtk2 ?23:32
naccmarcoceppi: https://wiki.ubuntu.com/snapcraft/parts23:32
nacc?23:32
naccmarcoceppi: looks to be gtk2, yeah23:33
=== JanC_ is now known as JanC
marcoceppiqengho nacc much success, thanks!23:40
qenghomarcoceppi: Awesome. Thanks for making a package!23:41
marcoceppiqengho: sadly the upstream doesn't seem to interested in it atm, but I'll publish it regardless23:42
naccmarcoceppi: nice!23:57
marcoceppilogically, for snaps that ship GTK applications, how do I present a .desktop file for users?23:57

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