/srv/irclogs.ubuntu.com/2015/06/16/#snappy.txt

slangasekogra_: system-image doesn't include shim-signed because you can't have both grub-pc and grub-efi-amd64-signed; we want the latter but it's been an incremental process, requiring changes to udf first.  Has udf efi support landed in all the right ppas?00:44
slangasekonly once it has should we change the grub seeding00:45
=== chihchun_afk is now known as chihchun
=== devil is now known as Guest34774
fgimenezgood morning06:59
=== Guest34774 is now known as devil_
dholbachgood morning07:29
mvolool: I love your snappy shell idea (as you know) and couldn't help stating a simple branch that gives it some life:  lp:~mvo/snappy/snappy-console07:34
ogra_mvo, i love it too, but please not on port 22 :)07:59
mvoogra_: :) I love the idea of snappy console / repl / cli /shell and being able to interact with it this way. I also like the possiblities it opens up. the points raised in the mail thread are indeed good ones, so by default maybe not08:02
loolmvo: awesome  :-)08:05
ogra_well...08:05
ogra_you could have a "shell" command though :)08:05
ogra_that gives you a shell session08:05
loologra_: this is already in the proposal08:14
lool"snappy cli" as a (hidden?) way to start the snappy shell, and "shell" from the cli as a way to start a real shell08:15
ogra_lool, yeah, though pitti's argument still stands, ssh remote scripts would fail08:16
loolI'm not sure about this08:18
loolfirst, it would work with snappy commands, second, we could implement what people feel is important to get from a running snappy system there, third, there might be ways to reach a shell to run real commands08:20
ogra_longsleep, image 0.3 ? not 3.0 ? :)08:23
JamesTaitGood morning all; happy Fresh Veggies Day! 😃08:55
=== vrruiz_ is now known as rvr
Chipacamvo: is it possible you forgot a prereq on the console branch?09:36
mvoChipaca: maybe, let me double check09:41
mvoChipaca: indeed I did, sorry for that09:43
Chipacamvo: apology accepted09:43
Chipacamvo_: the comment i made in your decorator2 is for addressing in a later branch if at all :)09:54
Chipacamvo_: you know what i'd like? 'snappy verify' to run verify hooks for the apps10:01
rsalvetimorning10:04
rsalvetiChipaca: welcome back10:04
Chipacarsalveti: hey :)10:04
rsalvetislangasek: the udf efi branch landed everywhere already10:05
Chipacamvo__: ETOOMANYMVO10:10
Chipacamvo__: commit messages10:19
=== mvo__ is now known as mvo
mvoChipaca: thanks, yeah, adding those now, thanks a bunch for your reviews10:23
Chipacamvo: wrt verify, i'm +1 on most of it, but uncomfortable with growing the already-too-large Part interface10:24
Chipacaoh dear10:24
Chipacamvo: wrt verify, i'm +1 on most of it, but uncomfortable with growing the already-too-large Part interface10:25
mvo_Chipaca: makes sense, let me try to think about alternatives then10:26
Chipacamvo_: installed from a local meta already returns only SnapParts10:26
Chipacamvo_: so a jfdi approach would be to do .(*SnapPart) on the parts returned by instlled10:26
Chipacamvo_: a less jfdi approach would split Part into two interfaces, embed the local in the bigger one, and change Installed to return those10:27
Chipacamvo_: another jfdi approach would be to tell me i'm wrong (or pyrrhically right) and go with the branch as writ10:30
mvo_Chipaca: I dislike option (3) because you are right and ignoring that is bad(tm). the two-interfaces approach sounds like the cleanest, wdyt?10:31
Chipacamvo_: i think you'll find it's a lot more code :)10:32
mvo_Chipaca: heh :) probably I will hate myself for not taking the easy option10:32
* mvo_ will try to fix his dsl before diving into the branch10:33
Chipacamvo_: may i suggest you set a time limit, take a prod on the interfaces, and bail to the jfdi if it snowballs out of time?10:33
mvo_Chipaca: ok, that sounds sensible10:33
Chipacamvo_: and next time i embark on a refactor, remind me to do the same :)10:37
mvo_heh :-D10:37
mvo_promised!10:37
sergiusensChipaca: \o/ thanks for bringing up the Part interface again :-)10:38
Chipacasergiusens: the price of readable code is eternal vigilantism, or something like that10:39
sergiusensChipaca: yup10:39
sergiusensmvo_: so, if you do this, can you add the Ports interface to the local interface?10:40
sergiusensit's not part of Parts today and doing the .(*SnapPart) check10:40
mvo_sergiusens: yes10:41
Chipacasergiusens: Frameworks might also be moved over, although i do envision a future in which remote parts have Frameworks() and thus the installer can be more helpful wrt that10:43
sergiusensChipaca: i say we request the store to add support for it10:46
sergiusensand do nicer things10:46
Chipacasergiusens: yeah, but you know the store guys10:46
rsalvetimvo_: any reason for https://trello.com/c/6n9Q3tVh/109-core ?10:46
Chipacathey're all like "oh no we can't break things because people will get upset"10:46
Chipaca:)10:46
rsalveti:-)10:47
mvo_rsalveti: that looks like trello was playing tricks on me11:00
rsalvetimvo_: :-)11:01
mvo_rsalveti: I removed it11:01
rsalvetimvo_: thanks11:01
sergiusensChipaca: adding stuff doesn't break anything :-P11:02
sergiusensChipaca: unless you add too much and make it unbearable :-)11:03
=== chihchun is now known as chihchun_afk
lord4163How do I list all available snappy packages to install?11:14
sergiusenslord4163: snappy search11:15
lord4163sergiusens: and then after I installed a package?11:18
sergiusenslord4163: snappy list11:19
lord4163sergiusens: what can't I use the package now?11:20
lord4163holy f*, I typed reboot in my kvm instance and it rebooted the host machine!?!?!?!?!?!?11:20
lord4163So this snappy thing is for people missing Windows 95 I guess?11:38
sergiusenslord4163: it cetainly isn't for end users (core at least)11:42
lord4163for who is it then?11:43
rsalvetilord4163: atm it's mainly for builders, which is why sergiusens said core12:20
rsalvetionce we have more applications and so on, end users can simply consume that from the store12:20
Chipacalord4163: typing reboot in your kvm instance can't reboot the host machine, fwiw12:21
Chipacalord4163: if it can, i hear there's good money in selling the exploit12:21
lord4163Chipaca: It did :P12:22
Chipacalord4163: i believe you think it did, but i don't believe it did :)12:22
lord4163Chipaca: Let's try it again then.12:23
Chipacalord4163: how'd it go?13:05
lord4163Chipaca: didn't work this time13:06
lord4163Chipaca: but happened the first time? :P13:06
Chipacasure it did13:07
lord4163Now whole GNOME Boxes died13:07
lord4163Chipaca: According to journalctl Fabian-PC login[1456]: FAILED LOGIN 1 FROM tty1 FOR kvm guest reboots host13:17
mterrymvo_, you mentioned duplicating a i18n.go file in each package.  Does go tolerate sources that are symbolic links?  Cause then you could avoid actual copies of the code at least13:17
Chipacalord4163: i'm not sure what that means13:29
Chipacasergiusens: why isn't setupCloudInit part of first boot?13:33
mvo_mterry: nice idea, I don't know, I guess the package statement in the header is the problem13:33
mterrymvo_, ugh right13:34
mterrymvo_, i18n.G() is better than gettext.Gettext() though13:35
mterrybut not as good as G()13:35
sergiusensChipaca: because when I proposed to do that I was told not to13:35
Chipacasergiusens: by whom, and why?13:35
sergiusensChipaca: I wanted an oem snap entry to say cloud: on/off13:36
sergiusensChipaca: and just disable the cloud-init job13:36
Chipacacloud: very yes13:36
Chipacacloud: extra strawberry13:36
Chipacasergiusens: that seems sensible to me13:36
Chipacasergiusens: what was the problem with it?13:36
mterrymvo_, you could add a i18n package, include a "InjectGettext()" function, then have every package's init() entry point set up a package-wide var for G?13:36
mterrymvo_, still copied code, but just a one-line init() maybe13:37
Chipacamvo_: mterry: why not “. "yadda/yadda/i18n"”?13:38
Chipacaas long as i18n only exposed a single well-known function, that would seem ok to me13:38
mterryChipaca, oh right!  I forgot you could inline a package.  Maybe that's good enough13:38
* Chipaca would suggest using some non-ascii char for i18n's function, to avoid clashes and because it's extra twisted13:39
Chipacamterry: mvo_: a function called Ꝇ would be nice (it's a capital broken l, because localization! :-p)13:43
mterryChipaca, that'll catch on!13:44
Chipacainorite13:45
Chipacamterry: and then we can move tzdata to Ꜩ!13:45
ogra_there are explicit broken letters in utf-8 ?13:46
ogra_wow13:46
Chipacaogra_: 💔13:46
ogra_hah13:47
Chipacaas letters just the L, though13:47
mterryChipaca, there's potential here for a whole programming language, akin to brainfuck13:47
Chipacamterry: dude. APL.13:48
mterryChipaca, hah, yikes13:48
Chipacamterry: on the other hand, finding all primes in APL is: (~R∊R∘.×R)/R←1↓ιR13:50
Chipacamterry: so we might be on to something13:50
* Chipaca adds APL to the list of things to never, never learn13:52
Chipacasergiusens: ...?13:52
mvo_lol@Chipaca and mterry13:53
sergiusensChipaca: the ... means?13:54
Chipaca<Chipaca> sergiusens: what was the problem with it?13:54
seb128sergiusens, hey, I tried again u-d-f, using DEBUG_DISK=1, I get a "(parted) mkpart system-a ext4 147456s 147455s" which errors out because the start is after the end (first number bigger)13:57
seb128sergiusens, that's on i386 if that makes a difference13:57
sergiusensseb128: --size 10?13:58
seb128sergiusens, no, why is that needed? isn't that for the writable partition?13:59
sergiusensseb128: well each of your a/b parts is now 4GiB instead of 114:00
seb128sergiusens, I don't have 10G free space on that machine, trying again on my other box which has more disk but that's on vivid and trying to build goget-u-t fails on undefined logger.Panicf14:01
sergiusensseb128: build as a deb? you need to build on wily14:01
seb128sergiusens, shrug, that box is vivid ... do you know what I need from wily?14:02
seb128I tried to update golang* and ubuntu-snappy-cli but that's not enough14:02
sergiusensseb128: golang-snappy-dev14:03
seb128sergiusens, I've the wily version of that14:03
elopiofgimenez: I'll be with you in a couple of minutes.14:03
seb128sergiusens, I'm trying a clean build14:04
rickspencer3hi all14:05
rickspencer3I'm writing a snap in Go14:05
rickspencer3I am trying to open a yaml file that is at /apps/go-uploader.sideload/0.3/cnf14:06
rickspencer3os.Getenv("SNAP_APP_DATA_PATH") send me to14:06
fgimenezelopio, ack14:06
rickspencer3/var/lib/apps/go-uploader.sideload/0.3/cnf/14:06
rickspencer3any idea what I what I am doing wrong?14:06
sergiusensrickspencer3: you want another envvar14:07
rickspencer3sergiusens, are the envvars documented somewhere?14:07
=== chihchun_afk is now known as chihchun
Chipacarickspencer3: https://developer.ubuntu.com/en/snappy/guides/security-policy/14:09
sergiusensChipaca: thanks, was searching every doc14:10
Chipacarickspencer3: listed, not documented, though14:10
* sergiusens finds developer.ubuntu.com hard to navigate14:10
rickspencer3nice14:10
rickspencer3lol14:10
rickspencer3Chipaca, do I want SNAP_APP_PATH ?14:10
sergiusensrickspencer3: yes14:10
sergiusensthat one14:10
rickspencer3ok14:10
rickspencer3tbhanks14:10
rickspencer3maybe someone could, you know, list out what each is for ;)14:10
sergiusensrickspencer3: or 'snappy install hello-world' and run hello-world.env14:10
sergiusensthat was in one of the guides I can't seem to find14:11
rickspencer3that sounds quite indirect14:11
Chipacarickspencer3: i'll add that to the doc i'm writing :)14:11
sergiusensChipaca: wrt yur question, we need this anyways for backwards compat (setupcloud)14:11
elopioogra_: are you coming to the meeting?14:32
ogra_elopio, yes :)14:33
=== davidcalle_ is now known as davidcalle
slangasekrsalveti: ok, if the udf efi has landed, then we should also make the seed changes to add shim - probably retroactively to 15.04 as well?14:42
* tedg watches carefully14:43
tedgWhich seed exactly?14:43
tedg:-)14:43
sergiusensslangasek: didn't we add all that to 15.04 already a while back?14:56
slangaseksergiusens: 'seed changes to add shim'? no14:56
sergiusensseb128: personal doesn't have cloud-init seeded, right?14:58
plarsrsalveti: do you think https://code.launchpad.net/~zyga/snappy-hub/fix-1464275/+merge/261833 will be merged at some point soon? It sounds like it causes no harm if you are running the typical debian install on your emmc with bbb, but helps enormously if you do not run the default image on emmc15:00
fgimenezelopio, i've pushed the latest changes https://code.launchpad.net/~fgimenez/snappy/go-functional-tests/+merge/261748, ready for review?15:02
elopiofgimenez: I see output :)15:03
fgimenezelopio, at last! :)15:04
elopiofgimenez: yes, ready for review, thanks.15:05
elopiofgimenez: maybe you can add the newline here:15:05
elopio256\ No newline at end of file15:05
fgimenezelopio, ok done15:07
seb128sergiusens, it has, why?15:30
dholbachballoons, elopio, fgimenez, ogra_: mail sent15:32
elopiothanks dholbach15:32
sergiusensseb128: hmm, I am now missing context15:33
seb128sergiusens, <sergiusens> seb128: personal doesn't have cloud-init seeded, right?15:33
seb128sergiusens, https://launchpadlibrarian.net/209185916/buildlog_ubuntu_wily_amd64_ubuntu-desktop-next_BUILDING.txt.gz15:33
seb128it's installed15:33
sergiusensseb128: is it inherited, planned or $reason?15:35
seb128sergiusens, http://bazaar.launchpad.net/~ubuntu-core-dev/ubuntu-seeds/ubuntu-touch.wily/view/head:/desktop#L6815:37
seb128sergiusens, I guess we copied that from the ubuntu-core seed, we started from there15:37
tedgmvo_, Why does apt-cache show have seemingly two sections of data?16:08
mvo_tedg: local and remote maybe?16:09
* mvo_ needs to leave for dinner16:09
tedgHmm, okay. Enjoy!16:09
stgraberok, so I'm working on making a snap for LXD, which for those who haven't heard about it is a container manager based on LXC. That means it's not going to be the simplest snap package in the universe :)16:33
Chipacastgraber: :)16:33
ogra_stgraber, dont look at the docker snap ... i heard people say thats a very bad example :)16:34
Chipacaperhaps the different kvm-launching snaps would be better16:34
stgrabercurrently my main problem is that LXC contains hardcoded paths. I can obviously get it rebuilt to change those, but I just want to make sure I can rely on stuff being at a fixed filesystem location, say /apps/<snap entry>/current/ and use that in my buil process16:35
Chipacastgraber: note you can't write to /apps/<snap entry>/current though16:35
ogra_we have lvm snaps ?16:35
ogra_*kvm16:35
stgraberand if so, it looks like I'll need two builds, one for local dev (sideloaded) and one for the real thing, as one will have the .sideload suffix16:35
stgraberChipaca: yeah, that's fine16:35
Chipacastgraber: it would be a lot better if you used the environ for those16:35
Chipacahow hardcoded are the paths?16:36
stgraberconfigure args which wind up hardcoded in a .so16:36
Chipacaugh16:36
ogra_yeah, just de-hardcode them and allow them too be overridden by the $SNAP_* vars16:36
stgraberyeah, not quite looking forward to have to carry patches against upstream for that though (and having upstream be aware of SNAP_ isn't acceptable)16:37
Chipacathat would be ideal :) or some LXD_* vars, and set those from these16:37
Chipacastgraber: wrt upstream, LXD_ env vars should be ok with them?16:37
ogra_right, just translate them :)16:37
ogra_you need a shell wrapper anyway16:37
Chipacastgraber: i hear they're a friendly bunch :)16:37
stgraberChipaca: "maybe"16:37
kgunnjdstrand: hey i'm trying to modify my seccomp file for mir in place on the vm, but seems to fail on the same syscall...is there a way to update?16:37
stgraberChipaca: the problem is that part of usptream is setuid so we usually wipe our env clean16:38
kgunnor do i have to rebuild/reinstall the snap?16:38
kgunntyhicks: ^16:38
Chipacastgraber: that makes sense16:38
tomconteogra_: what's bad about the docker snap?16:38
ogra_tomconte, it is just a bad example i heard ...16:38
stgraberanyway, will poke around some more, might end up just writting a quick LD_PRELOAD hack for those16:38
ogra_since it has a bunch of exceptions a normal snap wouldnt be allowed to use16:38
Chipacastgraber: do keep us updated if you can16:39
Chipacaand holler if you get stuck16:39
tomconteogra_: ah, I see, but is there a way to package docker in a "clean" way then?16:39
ogra_tomconte, not sure ... i assume the existing docker snap will be updated at some point ... it comes from a time where not much was working in snappy ... nowadays you can get most features you need for a proper docker snap i suspect16:40
Chipacaogra_: it'd still need custom security bits though16:41
ogra_well, but a lot less hacks already i guess :)16:41
* kgunn wonders, isn't it b/c docker is a framework....16:42
tyhickskgunn: you can temporarily update the seccomp whitelist for your snap16:42
ogra_kgunn, that too ... but it actually comes from very early snappy days ... we didnt have any story for hardware access and the like back then16:42
tyhickskgunn: what is the failing syscall?16:43
Chipacakgunn: sc-logresolve might help16:43
Chipacajdstrand: when does sc-logresolve print usage()?16:51
ogra_Chipaca, when your patch landed that enables it ?16:52
Chipacanoted16:52
* Chipaca branches it16:52
Chipacabut if i suddenly disappear it's because somebody found my runaway dog, not because security gremlins took me down16:53
stgraberso if I set security-override, does that also turn off any cgroup config that's going on with snappy or is there some other thing I need to set to turn that off?16:54
stgraber(LXC has code which will escape the cgroup, so even if I can't turn that off, the cgroup stuff won't apply to me, but that may confuse some things when my process moves out of the cgroup ;))16:55
tomconteogra: thanks, asking b/c we were thinking of a snappy+docker image in azure instead of current full_ubuntu+docker17:01
Chipacastgraber: i'd ask jdstrand that one17:01
stgraberjdstrand: heya17:02
stgraberjdstrand: so I'm doing an initial LXD packaging. That's obviously a framework and that's coming with more craziness that docker :)17:02
stgraberjdstrand: so as a first pass, I'm trying to have everything run without any of the security stuff applied to it. So apparmor unconfined, no seccomp policy and no moving stuff into cgroups.17:02
stgraberjdstrand: how do I do that?17:02
stgraberjdstrand: (the client itself just needs networking, so that bit will be confined using default policies + networking)17:03
stgraberjdstrand: eventually the daemon should be running under an apparmor policy, allowing to transition out to any profile we want (same as lxc-start) but still without any seccomp policy.17:04
ogra_tomconte, well, i think you can just go ahead with that ... if docker gets updated it should be transparent to you17:05
tyhicksstgraber: the 'unconfined' security template is what you want for running without apparmor or seccomp confinement17:07
tyhicksstgraber: I don't recall a way to prevent the launcher from setting up the cgroup - let me look at that code17:07
ogra_note that you need to bribe the store people to let your snap into the store then :)17:07
tyhicksI think stgraber is just wanting to get something running locally17:08
tyhicksand then we can decide on what to do for the confinement17:08
tyhicks(prior to uploading to the store)17:08
stgraberyeah and that thing will be a framework anyway, so manual review was kinda always the plan :)17:08
tyhicksstgraber: it looks like the launcher is unconditionally applying the devices cgroup17:11
tyhicksI don't have a good workaround for you there17:12
stgrabertyhicks: ok, well, as long as it doesn't get terribly confused when its cgroup ends up being empty, that should be fine17:13
stgrabertyhicks: LXC has code that will trigger an absolute cgroup move for all controlers, so it'll escape whatever cgroup the launcher creates for it17:13
tyhicksok17:14
jdstrandstgraber: sorry, was in a meeting17:15
jdstrandstgraber: so the launcher decides when it is going to do the cgroup thing17:15
Chipacaogra_: https://code.launchpad.net/~chipaca/ubuntu-core-security/usaaage/+merge/262115 just for you :)17:15
jdstrandtyhicks: are you looking at the code now for that ^17:16
jdstrandtyhicks: my comment, not Chipaca's :)17:16
jdstrandChipaca: oh gosh, sc-logresolve patch. that thing is barely more than back-of-a-napkin as it is :P17:17
Chipacajdstrand: :)17:18
tyhicksjdstrand: I already looked at the code - it sets up the devices cgroup unconditionally17:18
tyhicksjdstrand: st graber says that shouldn't be a problem for him at the moment17:18
jdstrandtyhicks: hmmm, what was I thinking of then... seccomp?17:18
jdstrandI know it is making a choice about something, cause docker was grumpy about said something17:19
jdstrandor at least, it was making a choice17:19
tyhicksI'm not sure about that17:19
tyhickslet me look again17:19
ogra_Chipaca, LOL !17:22
tyhicksstgraber, jdstrand: I guess if ("/var/lib/apparmor/clicks/%s.json.additional", appname) is empty it won't set up the devices cgroup17:22
jdstrandthat's ringing a bell17:22
tyhicksit doesn't have to be empty - it just can't match a hardcoded string in the launcher17:23
jdstrandactually I think I documented that17:23
tyhicksbut creating an empty file is the easiest17:23
jdstrandhttps://wiki.ubuntu.com/SecurityTeam/Specifications/SnappyConfinement#Cgroups17:23
jdstrand"Note: because device names are not always static and due to limitations in AppArmor (1350598, 1444679), the device cgroup mechanism is only used when hardware is assigned to a snap, at which point a general write rule for... Conversely, when no hardware is assigned to the app, then the strict AppArmor rules are in effect and an app-specific cgroup is not used. "17:24
tyhicksah17:25
tyhicksright17:25
tyhicksso just make sure that ("/var/lib/apparmor/clicks/%s.json.additional", appname) doesn't exist17:25
jdstrandI knew there was a reason I wanted to write that down :)17:25
jdstrandtyhicks: right, and it won't by default17:25
jdstrandan oem snap or hw-assign needs to be used17:26
tyhicksgot it17:26
jdstrandI <3 documentation :)17:26
* lborda asks: any idea how do I get python-smbus in snappy ? i didn't find the package in the ports repo.18:03
Chipacalborda: there isn't a python-smbus in ubuntu, even18:16
Chipacalborda: but you could probably use the one from debian as a starting place18:16
ogra_huh ? how can it be in debian but not ubuntu18:16
lbordaChipaca, yes there's only in debian https://packages.debian.org/wheezy/python-smbus18:17
lbordaChipaca, i am trying to get the pyglow working on the snappy image... have any of you tried with the pyglow ?18:18
ogra_http://ports.ubuntu.com/pool/universe/i/i2c-tools/18:18
Chipacaogra_:18:18
Chipacamagic18:18
ogra_there is definitely a python-smbus18:18
Chipacaogra_: but then why isn't there a python-smbus?18:19
ogra_even my phone sees it18:20
Chipacajohn@fogey:~$ apt-cache search python smbus18:21
Chipacajohn@fogey:~$18:21
* Chipaca wonders18:21
ogra_no universe ?18:21
lbordai would thought the the python-smbus package would have to be found inside the universe/p/ folder and not inside pool/universe/i/i2c-tools/18:22
ogra_the folders are sorted by source package name ;)18:22
Chipacadeb http://archive.ubuntu.com/ubuntu vivid universe18:22
ogra_python-smbus is a binary18:23
ogra_http://paste.ubuntu.com/11726399/18:24
ogra_Chipaca, oh, you have an archive.u.c entry on an armhf machine ?18:24
Chipacano, this was on my desktop18:25
Chipacaamd6418:25
ogra_ah18:25
* Chipaca just noticed there is still a debian ia64 port18:25
ogra_well, my amd64 laptop finds it too18:26
ogra_ogra@styx:~$ apt-cache policy python-smbus|grep archive18:26
ogra_        500 http://archive.ubuntu.com/ubuntu/ vivid/universe amd64 Packages18:26
Chipacaok, i'm going to close my computer and go have dinner and pretend weird things are not going on18:27
Chipacabecause the gammon smells very good and i'm not going to let some silly smbus weirdness ruin it :)18:27
kickinz1Just to add to this, I used rmadison against python-smbus:18:27
kickinz1http://pastebin.ubuntu.com/11726413/18:27
ogra_(which is actually the right tool ... yay us ... )18:28
kgunntyhicks: sorry, was out to lunch...yep, so this is what i'm seeing https://www.youtube.com/watch?v=dbl81P2Vae418:40
kgunnand its munmap18:40
kgunnthat's the syscall18:40
mterrymvo__, so I guess with these gettext branches, we need to push a deb package for the gettext module to wily?18:47
* mterry was just looking into adding a debian/ dir for snapcraft18:47
tyhickskgunn: something's not right there - munmap is allowed in the default seccomp template (many things would break if we didn't allow munmap)18:49
tyhickskgunn: the resolution isn't great but it looks like you're modifying a seccomp filter file in /apps/mir/snap1/meta/mir.seccomp - is that right?18:50
kgunntyhicks: correct18:53
kgunnand i see it showing up in that copy as well as the one at18:54
kgunn  /writable/system-data/apps/mir/snap1/meta/mir.seccomp18:54
tyhickskgunn: odd - the launcher looks for seccomp filter files in /var/lib/snappy/seccomp/profiles/18:59
kgunntyhicks: ahha, i see that now...and it's missing, but it's filename is just mir_system-compositor-snap119:01
kgunni was expecting it to be mir.seccomp19:01
kgunntyhicks: so i'm guessing this is the file to modify...19:02
tyhickskgunn: yeah, give that one a shot and let me know if it works19:02
kgunntyhicks: awesome thank you!....got a new syscall failure....perfect19:03
kgunntyhicks: at your earlier statement at it being strange, is it b/c i'm a framwork and having to create my own policy ?19:03
kgunne.g. i lose all the defaults out of the box when i create my own19:04
kgunntyhicks: and should i just start by copying some particular default file (template) of syscalls permitted ?19:04
tyhickskgunn: ah, yes - now it makes sense19:05
tyhickskgunn: this is the default template: http://bazaar.launchpad.net/~ubuntu-security/ubuntu-core-security/trunk/view/head:/data/seccomp/templates/ubuntu-core/15.04/default19:06
jdstrandkgunn: ah, I meant to follow up with you19:06
tyhicksjdstrand: is there any way for a framework to reuse the default template?19:06
tyhicks(for seccomp)19:06
jdstrandwhat I have been recommending is installing hello-world.canonical from the store, then scp'ing /var/lib/snappy/seccomp/profiles/hello-world*env into meta/foo.seccomp then referencing foo.seccomp in "security-policy"19:08
jdstrandkgunn: so, in your case, on the device, do "sudo snappy install hello-world.canonical"19:08
jdstrandkgunn: then do: cd /var/lib/snappy/seccomp/profiles/19:09
jdstrandkgunn: then, sudo cp  hello-world.canonical_env_1.0.17 ./<your mir seccomp profile>19:09
kgunnperfect guys...thanks, but struggling has helped it make sense19:09
jdstrandkgunn: then see if it works. if it doesn't, just add syscalls to the end of ./<your mir seccomp profile> until it does19:10
jdstrandone could also do: sed 's/^deny/# EXPLICITLY DENY/' /usr/share/seccomp/templates/ubuntu-core/15.04/default > your.seccomp19:13
jdstrandthat is harder to remember19:13
jdstrandkgunn: iirc, that was all you needed from me yesterday (sorry I didn't see until you were eod)19:15
ogra_jdstrand, regading rickspencer3's bug i actually wonder what image he runs there ... (might be one of the broken RPi ones for example)19:46
rickspencer3ogra_, if you are talking about my net_admin  denial ... it's an update amd64 image19:47
jdstrandogra_: I confirmed it on amd64 snappy, vivid desktop and precise desktop19:47
jdstrandit is something else19:47
ogra_(including system-image-cli -i should be mandatory for bug reporting on snappy ;) )19:47
ogra_jdstrand, ah, k19:47
ogra_rickspencer3, thanks19:47
jdstrandogra_: note, I advised rickspencer3 on what to put in the bug. This seems to be a golang thing but until we know what is tickling that denial, I didn't know where to put it, so we put it in the snappy project for now19:48
ogra_ah19:48
Chipacaogra_: kickinz1: fwiw, an apt-get update fixed it, whatever it had been20:00
rickspencer3Chipaca, you seem like you would know20:09
rickspencer3when do I use SNAP_APP_USER_DATA_PATH,20:10
rickspencer3vs. SNAP_APP_DATA_PATH20:10
rickspencer3?20:10
Chipacarickspencer3: i'm not particularly clear on the difference myself, *however*20:10
rickspencer3nice20:10
rickspencer3lol20:10
Chipacarickspencer3: i do know that SNAP_APP_USER_DATA_PATH is owned by the user20:10
Chipacarickspencer3: and SNAP_APP_DATA_PATH is owned by not-the-user20:10
rickspencer3Chipaca, ok, if I wrote a program that saved files from sensor data, which envvar would I use for saving the file in?20:11
rickspencer3(and consequently for uploading the file to the cloud service)20:11
Chipacarickspencer3: is that a daemon, or a one-off?20:11
Chipacarickspencer3: daemons will run as root20:11
rickspencer3daemon20:11
rickspencer3Chipaca, oh20:12
rickspencer3well, it is a service20:12
rickspencer3don't know if it is daemon per se20:12
Chipacarickspencer3: so SNAP_APP_DATA_PATH should work20:12
Chipacai meant service, yes20:12
rickspencer3I declare it as a service, and then use for{time.sleep()}20:12
rickspencer3ok20:12
rickspencer3thanks Chipaca20:12
Chipacause a time.Ticker, but yes20:13
rickspencer3?20:13
Chipacarickspencer3: go?20:13
rickspencer3Chipaca, yes, but the samples I saw said for{time.sleep()} ... time.Ticker sounds somewhat more sensible, though20:13
Chipacarickspencer3: for long-lived processes, inside a loop, a time.Ticker is better20:14
rickspencer3ok, I'll do some Googling and fix that up20:14
Chipacatime.Sleep is straightforward, but will incurr a higher gc overhead over time20:14
rickspencer3we should really have an app template20:14
rickspencer3create a stubbed out service for you (or binary if that's what you need)20:14
Chipacarickspencer3: ideally, we'd be exposing systemd timers20:15
rickspencer3oh goodness20:15
Chipacarickspencer3: so you wouldn't need the for loop20:15
rickspencer3that sounds groovy, yeah20:15
Chipacajust tell us how often you want calling, and if you want to wake up the device when the time comes20:15
rickspencer3but hard20:15
Chipacanot at all20:16
* Chipaca is tempted to show *how* not-hard it is by jfdi'ing it, but needs to keep to a sane schedule20:16
ollihow do I unpack a .snap locally?20:18
Chipacaolli: dpkg-deb ?20:18
Chipacaolli: or ar if you're hardcore20:18
Chipacaolli: or renamed it to .deb and use mc to browse it20:18
ogra_olli, dpkg-deb -x foobar_0.1_all.snap extracted20:18
ogra_olli, cd extracted20:19
ogra_... fiddle ... fiddle ... fiddle ...20:19
ogra_cd ..20:19
ollihm20:19
ogra_snappy build extracted20:19
ollithx guys20:19
awojoCan you convert to snappy after the fact? I'm installing 15.04 VM right now, but I'd like to use snappy20:21
ogra_awojo, no, ther are completely different (snappy is assembled from debs, but then all deb functionality is removed)20:22
ogra_s/ther/they/20:22
tedgSo the code using apt-cache and such is getting brittle. Thinking about switching to the python module.20:22
awojoSo I'd have to download the snappy iso, and rebuild my VM?20:22
tedgHaven't used it before, anyone giving warnings? :-)20:22
ogra_rickspencer3, SNAP_APP_DATA_PATH is /var /lib/apps/<app>/<version> ... SNAP_APP_USER_DATA_PATH is ~/apps/<app>/<version>/20:23
rickspencer3ogra_, so, if I am capturing sensor data into files, where would I store it?20:24
rickspencer3i.e. into which dir should I save the file?20:24
ogra_rickspencer3, if it is a service SNAP_APP_DATA_PATH ... if it is an app the enduser runs perhaps in the USER_DATA_PATH20:24
rickspencer3it is a service20:25
rickspencer3interesting distinction20:25
* ogra_ never had the need to use the latter yet20:25
rickspencer3oh, i guess if it is a multi-user system20:25
ogra_well, you need to have $USER for the latter20:25
Chipacaawojo: no20:26
Chipacaawojo: what're you wanting to do?20:26
ogra_awojo, the img is a ready made VM already ... nothing to do ... just download, uncompress and start it with kvm20:27
tedgWe probably named those DATA_PATH variables wrong. We should have made it easier to store in the USER directory than the system one.20:28
ogra_tedg, well, you need a user for that ...20:29
ogra_tedg, most bits we have/had in the store are actually services20:29
ogra_(only pastebinit is an enduser app  i think)20:30
tedgogra_, Sure, so for services they should be the same value, no?20:30
ogra_for services you cant user them20:30
ogra_s/them/SNAP_APP_USER_DATA_PATH/20:30
ogra_there is no user ... where would it point to ?20:30
plarsrsalveti: Not sure if you saw this earlier: do you think https://code.launchpad.net/~zyga/snappy-hub/fix-1464275/+merge/261833 will be merged at some point soon? It sounds like it causes no harm if you are running the typical debian install on your emmc with bbb, but helps enormously if you do not run the default image on emmc20:30
tedgSo perhaps we shouldn't have USER_DATA_PATH at all. If there is a user point to the user's home, otherwise the system dir.20:31
plarsor anyone else that might know? ogra_ I think you were looking at that MP also?20:31
tedgNobody needs both.20:31
Chipacatedg: +1 i think20:31
* sergiusens is back20:31
ogra_well, not sure, someone surely had a usecase in mind when adding it20:31
ogra_(i havent found one where i could make any use of it yet though)20:32
* tedg goes on record: Nobody will ever use more than one directory20:32
rsalvetiplars: sure, I can take a look20:32
ogra_if you have an app that stores config data per user SNAP_APP_USER_DATA_PATH is your place20:32
plarsrsalveti: not a super big rush, just wondering, and it's a one-liner20:32
ogra_plars, i would feel comfortable if elopio could give it a quick shot20:32
rsalvetiyeah, just need further testing20:32
ogra_(after all its a one line change ... quickly done and tested)20:32
rsalvetielopio: care to stamp https://code.launchpad.net/~zyga/snappy-hub/fix-1464275/+merge/261833 ?20:33
ogra_boot, rollback, auto-rollback20:33
rsalvetiotherwise I can take a look earlier tomorrow20:33
sergiusenstedg: USER_DATA_PATH is user accessible while SNAP_APP_DATA_PATH root accessible (initially one was for binaries and the other for services)20:34
sergiusensI didn't come up with it and I didn't read the backlog either :-)20:34
tedgsergiusens, The question is whether there'd ever be an app snap that would do both. It seems services need one while user apps need a different one. Seems like there could be one variable depending on how it is executed.20:36
ogra_but that could be confusing20:38
ogra_for the packager20:38
sergiusenstedg: my camlistore snap (which is currently unpublished) used both20:38
tedgsergiusens, How did it use both?20:38
ogra_sergiusens, yeah, where is it ... fix that !20:38
ogra_:)20:38
tedgIt seems like the service couldn't ever expect to use USER, but I could see an app share with the service through the SYSTEM one.20:39
ogra_the webdm store on armhf makes me cry currently ...20:39
ogra_it used to be so niecely filled already20:39
tedgNot sure if that isn't just bad design though :-)20:39
ogra_tedg, what about a service that serves an app shipped in the same snap20:40
ogra_you'd want one path for the root owned files and the other for user settings20:40
tedgogra_, There's also be multiple users, so it couldn't really use the USER directory.20:40
ogra_why ?20:40
ogra_teh app knows who executed it20:40
ogra_(the service doesnt indeed)20:40
tedgYes, I don't think the service ever needs to know the USER one.20:41
ogra_i.e. i have a service and a management app ...20:41
tedgThough I could see a app accessing the system one. For instance if there was a service that updated a cache.20:41
ogra_no, the service doesnt need to know the user one20:41
ogra_but the app does20:41
ogra_to store per user settings20:41
ogra_so your snap needs to use both20:41
ogra_but that setup comes from a time wheer we didnt have a launcher :)20:42
ogra_might indeed be obbsolete if the launcher can handle it based on $knowledge (whatever $knowledge is)20:42
tedgNot sure exactly what that should be. But yes, it is interesting. Seems that we'd want DATA_PATH to be "where we want you to write your files" where that is contextual.20:47
jdstrandkgunn: hey, ok, based on what you've been experiencing and the questions you've had, I wrote up: https://wiki.ubuntu.com/SecurityTeam/Specifications/SnappyConfinement/DevelopingFrameworkPolicy20:48
=== chihchun is now known as chihchun_afk
kgunncool jdstrand20:56
=== tvoss is now known as tvoss|test
=== tvoss|test is now known as tvoss
sergiusenstedg: right camlistore's binaries were executed by the user20:58
jdstrandkgunn: there may be info in there that you might still find helpful20:59
kgunnwill read20:59
tedgsergiusens, So then what did you use the system directory for? The user wouldn't have access, no?21:01
kgunnjdstrand: perfect the development tips is effectively the workflow i'm in at the moment21:01
jdstrandgreat :)21:03
sergiusenstedg: the client and server communicated over http21:04
sergiusenstedg: server config in /var and user config into /home (the client could talk to other servers and the server could be talked to with other clients, but that is obvious I guess :-P)21:05
tedgsergiusens, I see. So some binaries were executed under the user and then the service was executed under systemd.21:06
sergiusenstedg: yup21:06
* ogra_ can imagine there will be many such snaps in the future21:07
ogra_services and management tools in the same package ...21:07
tedgWonder if we could make that easier. Like setup a socket for them that was also in the environment.21:08
ogra_that wont help if your management app needs to write a config file21:09
tedgHow is that going to work on a mobile device, will we allow services?21:09
ogra_(which it reads on next startup)21:09
ogra_no idea, but surely on a desktop and on appliances21:09
tedgogra_, I was more thinking in addition to.21:09
ogra_i can imagine that we want to allow things like an upnp service on a phone21:10
tedgNot that we'd remove the other mechanisms, just provide an easy way for them to build that app/service architecture.21:10
ogra_or a streaming service21:10
ogra_did you know that the first ubuntu phone hack by some external guys was to run a tomcat server on a nexus4 ? ... so i guess we will see that kind of insanity too :)21:12
tedgWow, I don't even want Java in browser, much less Tomcat :-)21:13
ogra_http://community.bonitasoft.com/blog/bonita-platform-running-smartphone21:13
ogra_oh !21:15
ogra_i was wrong ... they even ran it on a galaxy nexus !21:16
* ogra_ just noticed the uname in the screenshot 21:16
sergiusensogra_: wow, that brings back memories :-P21:17
ogra_yeah :)21:18
rsalvetimaguro, wow21:32
rsalvetithat brings back memories indeed21:32
elopiorsalveti: ogra_: plars: sure, let me check it.22:07
ogra_wow, SUI vs CMR just got interesting .. cameroon leads22:21
rsalvetisergiusens: ogra_: snappy on ppc? http://linuxgizmos.com/powerpc-based-iot-gateway-com-ships-with-linux-bsp/22:28
rsalveti:-)22:28
sergiusensrsalveti: well we do have powerpc support :-)22:28
ogra_no prob :)22:28
rsalvetiyeah22:28
ogra_(though i shouldnt speak to loud, we dont even manage to produce arm64 atm :P )22:29
sergiusensogra_: rsalveti we need to get out of fat packaging :-P22:39
ogra_yeah, who came up with that insanity :)22:39
sergiusenswe can blame Chipaca :-P22:39
Chipacawhy do we need to get out of fat packaging?22:46
Chipacawe're doing a lousy job of it right now, fo sure :)22:46
sergiusensChipaca: i dunno N arches and N gets bigger every day22:47
sergiusensChipaca: we can be smart once we have the store list the files with hashes and tags them with arch (with automagic header reading)22:48
Chipacasergiusens: yes, but on the one hand the app binaries are not what take up most of the disk space in many scenarios22:48
sergiusensChipaca: well camlistore is ~10MB for each arch22:48
Chipacasergiusens: and on the other hand nothing stops the store from stripping the non-arch things out (other than signage maybe?)22:49
Chipacain my mind ideally we support both cases well22:49
Chipacapeople that care package each arch separately22:49
Chipacapeople that don't make a fat one and live simpler lives22:49
sergiusensChipaca: probably22:50
* sergiusens likes to live a simpler life22:50
Chipacathat'd probably make the "store does magic" thing not be necessary22:50
* ogra_ too22:50
Chipacaso the answer is simpler22:50
Chipacamake a fat one22:50
* Chipaca runs22:50
sergiusensChipaca: the WHO would have something to say about that22:51
sergiusens... not the band :-P22:51
* Chipaca moves to the netherlands22:51
Chipacaon a more serious note, if we can agree on some conventions we can have the launcher do LD_PRELOAD and select the right arch binary if multiple are present22:53
Chipacanot LD_PRELOAD22:53
ChipacaLD_LIBRARY_PATH22:53
Chipacai think that'd be a good first step :)22:53
ogra_doesnt it do that already ?22:53
sergiusensChipaca: conventions make things easy, that's how we quickly got things going with click (when moving away from deb)22:53
Chipacaogra_: no22:53
ogra_oh22:54
* sergiusens stole the convention trick from go22:54
Chipacaogra_: yeah22:54
sergiusensogra_: you can't LD_LIBRARY_PATH if you don't define where that will be22:54
ogra_ubuntu-app-launch does it on the phone ... i thought that feature was in the snappy launcher too22:54
sergiusensogra_: no, not there22:54
ogra_sergiusens, yeah, i thought there was a default like on the phone22:54
sergiusenswe can do it for binpath too22:54
sergiusensogra_: that's why the magic script became popular22:55
* sergiusens wonders if the channel will go silent in 40'22:55
ogra_on the phone is is <installpath>lib/<triplet>/22:55
ogra_why in 4022:55
Chipacaogra_: something something copa américa, i'm guessing22:55
ogra_pffft regional stuff22:56
sergiusensogra_: Argentina vs Uruguay :P22:56
* ogra_ watches the *world* cup instead 22:56
sergiusensogra_: is that world as the US defines it? "The world series"22:57
ogra_cameroon switzerland was really great right now22:57
ogra_switzerland actually lost ... completely unexpected and dramatic :)22:57
ogra_sergiusens, nope22:57
Chipacacameroon-switzerland is just as regional as argentina-uruguay22:58
ogra_womens world cup ;)22:58
Chipacaah, ok :)22:58
Chipaca(i was going to make a joke about them both being in the africa-eurasia region/continent, but didn't)23:00
sergiusensChipaca: while you are at it... https://code.launchpad.net/~sergiusens/goget-ubuntu-touch/installYaml/+merge/26186523:00
Chipacaafro-eurasia*23:00
Chipacayeah, bring it on23:00
Chipacagasp! installYaml is ready to go?23:00
sergiusensChipaca: yeah, been ready for a while23:01
Chipacasergiusens: took me a while to realise Boot was not a verb in diskimage23:03
Chipacasergiusens: anything else? otherwise it's a wrap from me23:07
sergiusensChipaca: wrap it up, personal is still downloading here...23:07
Chipacak23:07
sergiusensthanks23:08
ogra_sergiusens, good luck !!23:25

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