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

olympionexI really like snapcraft and would like to use it to setup my development environment (automatically fetching and building dependencies and source).  Essentially I want what gets put into the stage directory although I would like everything to be located in standard directories relative to root (/usr/lib, /usr include, etc...).  I'd like to spawn a new computer and use the snapcraft recipe to get everything.  I don't see anyway to do this with snapcraft00:05
olympionex as such.  Am I missing an easier solution than either just copying stage to the root of a container or forking snapcraft and changing the stage directory to root?00:05
olympionex*new computer = new container00:06
=== not_phunyguy is now known as phunyguy
shuduomorning06:08
shuduoquestion: where is $SNAP_APP_DATA_PATH point to in recent image?06:32
=== chihchun_afk is now known as chihchun
popeyshuduo: I don't think that's used06:49
popeySNAP_DATA is06:49
shuduopopey: hmm, i need use a snap which uses SNAP_APP_DATA_PATH to point a file out of snap. sounds like I need rewrite code to use SNAP_DATA to point to that file instead of SNAP_APP_DATA_PATH. then where is SNAP__DATA point to? i see hello-world use /var/snap but i should not have permission to add a new file there, right?06:54
popeyshuduo: SNAP_USER_DATA is probably what you want, which points to $HOME/snap/<snapname>/<revision>06:57
shuduopopey: great. may i know $HOME/snap/<snapname>/<revision> need extra code to generate? right now there is no such directory although the snap be installed and running as a service.06:59
popeyshuduo: i think it gets made when the snap is installed07:13
popeyI don't think I made it07:13
popeyyes, looking at my system, I have lots of directories in $HOME/snap/* which match the snap names, and I didnt make them07:13
shuduopopey: since the original code is against old snappy. i ask Pedro Coca's favor to build by an old version snapcraft. do you think it may lead that not making directory in $HOME/snap?07:17
popeyshuduo: not sure, I'd certainly keep up to date with snapd/snapcraft07:24
popeythings move fast, and you're likely to be fighting to use old versions07:24
shuduopopey: yes. i have to. :(07:30
=== Aria|away is now known as Aria
=== Aria is now known as Aria2
=== Aria2 is now known as Aria22
=== greyback is now known as greyback|away
popeydholbach: have you made any snaps with multiple parts where one depends on the other, like foo needs libfoo?10:16
popeyI have one where i have foo making sure it builds after libfoo, and libfoo builds from source, but when building foo it doesn't see libfoo headers10:16
popeylike the make install bit of libfoo wasn't done, or it needs an ldconfig or something?10:17
qenghopopey: do you define the "after" clause on foo? Suppose you change to parts/foo/build, do you see references to stage/ libfoo stuff ?11:19
popeyi did11:22
popeyhm, no refrerence in the build dir,11:23
popeyis there some way to say that foo needs to pull in libfoo?11:23
popey(i should probably say foo and libbar I guess) :)11:23
popeyi see the build for the library in parts/libfoo/build11:24
popeyah, i guess my qmake plugin isn't doing the right things here, which I'm using for foo11:26
qenghopopey: Yeah, you should be using the stagedir variables to constuct your -I cflags and -L ldflags and such.11:29
=== greyback|away is now known as greyback
popeyahhh11:56
=== iahmad is now known as iahmad_
popeyta11:57
=== chihchun is now known as chihchun_afk
=== chihchun_afk is now known as chihchun
dholbachpopey, I personally haven't, but I've seen the after keyword being used and played around with it a little bit12:34
dholbachgood to see that you got it working12:34
popeyheh, almost :)12:38
jcastrosergiusens: electron 1.0. Soon would be a great time to enable app developers to just ship those apps. :D13:03
=== chihchun is now known as chihchun_afk
jdstrandkgunn, kyrofa: responded in the bug13:13
kgunnta13:15
croephais there a lower level "debootstrap" like utility for creating a ubuntu snappy installation?13:56
croephanvm, I think the ubuntu-device-flash will do what I want, sorry stupid question still learning basics about snappy14:09
noizerzyga: Hi any advice how i can snap my debootstrapped soft float system?14:23
zyganoizer: just copy it using the copy plugin14:27
zyganoizer: still sprinting14:27
noizerzyga sorry14:28
kyrofadidrocks, bug #1576411 was the one we were talking about15:35
ubottubug 1576411 in snapd (Ubuntu) "UTF-8 is not very well supported inside snaps" [High,Triaged] https://launchpad.net/bugs/157641115:35
zygatyhicks: is it possible to constrain connect with apparmor/seccomp today?15:52
zygatyhicks: I'm thinking of cups interface15:52
zygatyhicks: is just having "network" enough to print?15:52
tyhickszyga: /etc/apparmor.d/abstractions/cups-client15:55
zygatyhicks: oooh, you just made my day easy15:56
zygathank you!15:56
tyhicks:)15:57
zygatyhicks: I think we should patch u-c-l to bind-mount /etc/alternatives16:00
zygatyhicks: this will also address bug https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/158001816:00
ubottuLaunchpad bug 1580018 in snapd (Ubuntu) "ubuntu-core image missing awk" [Undecided,Incomplete]16:00
sborovkovHi. Is there something wrong with the command I am using -  sudo /home/ubuntu/ubuntu-device-flash core 16 --channel edge --enable-ssh --developer-mode --gadget canonical-pi3 --kernel canonical-pi2-linux --os ubuntu-core -o snappy-2016-05-11-16-08-pi3.img -> expected a gadget snaps: snap not found16:09
qenghoI get that^ too.16:10
qenghoAnd the "sudo" worries me.  "-o", so why?16:10
josephtis there a cnonical-pi3 gadget?16:11
josepht*canonical-pi316:11
sborovkovjosepht: qengho: it's working with canonical-pi2 gadget. (exact same command, but gadget for pi2)16:12
sborovkovit is existing16:12
sborovkovhttps://uappexplorer.com/app/canonical-pi3.canonical16:12
sborovkovI am not sure where ubuntu-device-flash downloads it from though16:12
tyhickszyga: I haven't looked at that bug until now but that seems like the most reasonable fix16:14
Sweet5harkapt.cache.FetchFailedException: W:The repository 'mirror://mirrors.ubuntu.com/mirrors.txt xenial Release' does not have a Release file., W:Data from such a repository can't be authenticated and is therefore potentially dangerous to use ...16:20
Sweet5hark^^ seeing this with snapcraft on xenial -- any hints?16:21
Sweet5hark"sudo apt update" works fine?16:21
seb128Sweet5hark, that is apt.cache ... is snapcraft doing the caching or is that a local cacher from yours?16:22
qenghoSweet5hark: snapcraft is less forgiving than apt install is. Repos with "W"arnings cause errors.16:22
Sweet5harkseb128: thats the content of the exception that some snapcraft/python command wrapper throws ...16:23
Sweet5harkwell, an "apt-cache search libreoffice" isnt unhappy either.16:24
kyrofadidrocks, https://github.com/kyrofa/qt-example-snaps16:25
qenghoSweet5hark: it's not smart. "apt" exited with nonzero, so you get that failure.16:25
Sweet5harkhmm, "sudo apt update; echo $?" gives a happy 0 ...16:27
seb128Sweet5hark, but with W:?16:27
Sweet5harkseb128: nope16:28
seb128k, dunno then16:28
seb128qengho, do you know where snapcraft is gettings its sources config from?16:28
* Sweet5hark will hack snapcraft to echo what commands it run, I guess.16:29
qenghoseb128: hardcoded internally. Constructed from variables.16:29
qengho/usr/lib/python3/dist-packages/snapcraft/internal/repo.py16:30
=== pat_ is now known as pmcgowan
kyrofaseb128, qengho, only 1.x is hard-coded. 2.x uses the system sources by default16:37
qenghoOh, nice! Sorry.16:38
Sweet5harkNo mirror file '/home/bjoern/checkouts/libreoffice-snap/parts/libreoffice-build/ubuntu/var/lib/apt/mirrors/mirrors.ubuntu.com_mirrors.txt'  <- iinteresting ..16:38
jdstrandtyhicks: hey, can you take a look at: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1580463/comments/517:23
ubottuLaunchpad bug 1580463 in snapd (Ubuntu) "Snap blocks access to system input methods (ibus, fctix, ...)" [Medium,New]17:23
jdstrandtyhicks: I've already added something to the policy updates IV card17:24
jdstrandtyhicks: and by 'take a look at', I mean, 'review the comment'17:25
tyhicksjdstrand: yes, I'll need a little bit17:25
jdstrandtyhicks: it isn't time-sensitive. I just want you to be aware17:25
* tyhicks nods17:25
seb128jdstrand, tyhicks, @{HOME}/.config/ibus/bus/ is the snap home though?17:31
seb128not the system one17:31
seb128e.g it's not going to have the config needed17:31
jdstrandseb128: /home is not mounted over, so @{HOME}/.config/ibus/bus/ is there17:41
jdstrandseb128: note that $HOME is set to something like: /home/jamie/snap/hello-world/2517:42
jdstrandseb128: which is why you copied the stuff into ~/snap/...17:43
jdstrandbut the apparmor policy actually currently allows /home/<user>/.config/ibus/bus/17:43
jdstrandso if you could find it, you could use it17:44
seb128k17:48
zygajdstrand: do you think we should have stuff like REAL_HOME?17:50
jdstrandzyga: for sdoc, possibly to probably. for iot, I don't think so. it really depends on how much we want to expose. I mean, $REAL_HOME/.config/ibus/... means nothing on an iot system since there is no ibus daemon running. this is getting a bit into the area where I'm not super-comfortable with mixing policies of different target systems17:53
jdstrandie, core vs sdoc vs future personal17:54
jdstrandI have concerns on the direction we're going that things are going to be quite muddled17:55
jdstrandI also realize that things are still in flux and we are figuring out, so that isn't a criticism. I just would like to see a clear path for handling the three target system types17:56
zygajdstrand: about core vs iot: https://github.com/ubuntu-core/snappy/pull/1158 (already merged)17:58
jdstrandzyga: awesome! :) yes, that is certainly aprt of it18:06
jdstrandzyga: but I was getting more at target system security policy philosophy18:06
jdstrandie on core/iot it makes a *ton* of sense to set HOME to ~/snap/...18:07
jdstrandbut on Touch we did not do that because we wanted to reuse services like ibus, theme engines, etc and so we set HOME in the normal way with accesses to those directories, and app-specific directories in well-known XDG locations18:08
jdstrandso now with sdoc I'm not clear what we are doing. that will likely affect personal18:08
jdstrandI mean I know we are setting HOME to ~/snap/..., but that has implications like with what seb128 is facing18:09
jdstrandand traditional apps and service don't know know HOME vs REAL_HOME or whatever18:09
jdstrandso then we try to jump through hoops in the launcher to do bind mounts and things18:10
jdstrandTouch is cleaner in some ways in that the services, themes, ibus, etc all work cause there are no bind mounts and HOME is normal. but it has its own issues, like apps having to know they can write to ~/.config/snap.foo but not ~/.config/bar18:12
jdstrandon Touch, the toolkit handles that and apps must be designed for it, but sdoc is traditional apps, which are not18:13
jdstrandwhich circles back, HOME in ~/.snap/... helps the apps in some ways (they can write anywhere in $HOME/...) but then breaks them finding ibus files and the like18:14
jdstrandanyway, I'm just yammering here, but these are some of the things I've been thinking about18:14
* jdstrand goes back to being productive18:14
seb128jdstrand, having a separate home mostly makes sense but maybe be could expose some selected dir in some way (bind mount, symlinks+apparmor access to the target,...)18:35
seb128but yeah, not going to be resolved today18:35
zygajdstrand, tyhicks: https://github.com/ubuntu-core/snappy/pull/116018:55
popeysergiusens: you planning on publishing the yaml for your telegram snap somewhere? I am sure a few of us can learn from it :)18:56
zygaelopio: ^^18:57
elopiopopey, zyga: https://github.com/sergiusens/telegram-snap19:21
popeyelopio: thanks19:30
sergiusenspopey it is in my git hub account20:55
sergiusensSome things still don't work20:55
nealmcbI want to play with snaps, but haven't upgraded to xenial yet.  So I'm trying to run it via docker: (docker run -it ubuntu), where I apt update; apt install -y snapd    But then I get "error: cannot list snaps: cannot communicate with server: Get http://localhost/v2/snaps?sources=local"21:52
popeynealmcb: looks like your docker instance isn't a full install. maybe snap talks to snapd over dbus or something and the service isn't registered inside the docker container23:32
popey... at a guess23:32

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