/srv/irclogs.ubuntu.com/2017/09/26/#snappy.txt

=== JanC is now known as Guest73457
=== JanC_ is now known as JanC
=== JoshStrobl|Work is now known as JoshStrobl|zzz
mupPR snapd#3964 opened: many: implement our own ANSI-escape-using progress indicator <Created by chipaca> <https://github.com/snapcore/snapd/pull/3964>01:19
zyga-ubuntuo/07:15
mupBug #1717900 opened: Confined snap fail for user with homedir in /var/lib <Snappy:Triaged> <snapd (Ubuntu):New> <https://launchpad.net/bugs/1717900>08:08
=== JoshStrobl|zzz is now known as JoshStrobl
mupPR snapd#3965 opened: interfaces/mount: add support for parsing x-snapd-{mode,user,group}= <Created by zyga> <https://github.com/snapcore/snapd/pull/3965>12:12
=== King_InuYasha is now known as Son_Goku
kalikiana\o13:39
=== chihchun is now known as chihchun_afk
kyrofaHey ogra_, think you might have any free time today to sit down with Chris to talk about gadget snaps?13:52
ogra_sure13:53
ogra_kyrofa, any time you like13:53
kyrofaogra_, wonderful, thank you, I'll ping you :)13:53
=== d_ed is now known as d__ed
kyrofalool, you around?14:15
kyrofalool, question about your dnsmasq snap14:16
zyga-ubuntuhey kyrofa14:19
zyga-ubuntuhow's the event?14:19
kyrofazyga-ubuntu, going quite well. Nice to just sit down with these folks and get their stuff working14:19
zyga-ubuntukyrofa: what are you working on there?14:21
apolhttps://pastebin.com/neAd9iPU14:22
* zyga-ubuntu wonders why removing unused code makes tests fail14:26
zyga-ubuntuit must have been _slightly_ used :/14:26
zyga-ubuntuah wait, master is broken!?14:28
zyga-ubuntuor artful is broken14:28
Son_Gokueverything is broken, zyga-ubuntu14:29
kyrofazyga-ubuntu, got a few roboticists here working on snapcraft updates and snapping their stuff14:35
zyga-ubuntukyrofa: sounds great, tweet a few pics, that stuff is very interesting to people14:37
mupPR snapd#3966 opened: cmd/snap-seccomp,osutil: make user/group lookup functions public <Created by zyga> <https://github.com/snapcore/snapd/pull/3966>14:42
morphisdavidcalle: is there any target date when docs.ubuntu.com will be refreshed?14:53
davidcallemorphis: afaict, there is a deployment outage since sep 21st, I'm running one now, will ping you when I know more14:57
=== chihchun_afk is now known as chihchun
morphisdavidcalle: ok, thanks15:09
__chip__zyga-ubuntu: how's things?15:11
zyga-ubuntu__chip__: hey15:11
zyga-ubuntu__chip__: climbing out of the rm -rf hole but making progress15:11
__chip__zyga-ubuntu: sergiusens could use some pointers, i hear15:12
zyga-ubuntu__chip__: about?15:13
__chip__zyga-ubuntu: climbing out of the rm -rf hole15:13
__chip__zyga-ubuntu: although in his case i think it's a "do git clone in the wrong place" hole15:13
__chip__or git reset?15:13
__chip__i dunno15:14
__chip__it sounded nasty so i didn't listen, just in case he wanted me to fix it15:14
cratliff@ogra_   Hey,  would you be available to look at making a gadget snap with me?15:16
nothalcratliff: No such command!15:16
zyga-ubuntu__chip__: I killed my data last week15:16
cratliffogra_15:16
ogra_cratliff, sure, where are you ?15:23
cratliffogra_  I'm in the snapcraft room on the conference floor, but it is a little full in here if me coming to you works.15:23
ogra_ah, i'll come down in 20-0min then (need to finish a test )15:24
ogra_*20-3015:24
ogra_and i wanted to see the snapcraft room anyway15:24
cratliffogra_ thanks, cya then.15:24
naccsergiusens: i found another case of plugins on classic not dtrt -- the python pluginn invokes /usr/bin/env in the rewrite: https://github.com/snapcore/snapcraft/blob/master/snapcraft/plugins/python.py#L37015:25
ogra_(if it is to full we can go to the ballroom or some such ... )15:25
naccsergiusens: the whole code needs to be audited for that, IMO15:25
nacc*if* one tries to modify LD_LIBRARY_PATH and that wrapper gets invoked, you get segfaults when mismatchinng host and classic snap distribution :)15:25
naccand no built-in way to avoid it15:26
naccfor a classic app, does snapd setup LD_LIBRARY_PATH for the app? To refer to the core snap? Can I assume that in my own environment (so I can say prepend my snap's library paths)?15:31
ogra_bschaefer, i cant get the card to misbehave :/ so i guess i'll need the one where you are actually seeing the breakage ... were you using it on pi2 or pi3 ?15:32
bschaeferogra_, raspi315:32
ogra_yeah, thats what i'm trying it on15:32
bschaeferyeah i got the things installed i need so you can get this one if you want, ive not had the issue15:33
bschaefersince ive manually mounted the overlay.tar15:33
bschaeferor ... w/e it was15:33
bschaeferbut yeah umm you can take this one as well and i can use that one15:33
bschaeferogra_, what room are you in?15:33
ogra_bschaefer, at the end of the same corridor you are15:34
=== JoshStrobl is now known as JoshStrobl|AFK
mupPR snapd#3967 opened: release: release snapd 2.28 <Created by mvo5> <https://github.com/snapcore/snapd/pull/3967>16:06
jameshnacc: IIRC, snapcraft will set flags to try and link using -rpath to point at the core snap16:07
jameshrather than setting LD_LIBRARY_PATH for you16:08
jameshdepending on your app's build system, that might not take effect though16:08
ogra_cratliff, sorry, will still take a bit up here ... i'm in 1419 though in case you want to come upstairs16:09
naccjamesh: ok, so in theory, do I need to specify LD_LIBRARY_PATH for *classic* snaps to force my app to use only my snap's libs and the core snap's libs?16:14
cratliffogra_, no problem.  Does after lunch work well?16:14
naccjamesh: specifically, since a 16.04-built classic snap with a 16 core could run on artful, it's *really* important not to use libs from the host.16:17
jameshnacc: if your project's build system respects the LDFLAGS environment variable,  it should end up with an rpath that will search common paths in both itself and the core snap16:17
naccjamesh: ok, let me try that16:18
jdstrandkyrofa: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1598309/comments/516:18
mupBug #1598309: The aplay command doesn't work <snapd-interface> <xenial> <snapd (Ubuntu):Fix Released by jdstrand> <https://launchpad.net/bugs/1598309>16:18
jameshnacc: try running "objdump -x /path/to/my/exe | grep RPATH"16:21
naccjamesh: i have had to do stuff in my own wrappers so far, because I will get thinngs like man in my snap not finding the custom-built /usr/lib/man-db in my snap16:22
naccjamesh: will do16:22
jameshnacc: that should show up paths that will be searched before the default library locations16:22
jameshif it doesn't show anything, then you might need to alter your project build system to make use of LDFLAGS16:22
naccjamesh: are you sure what you describe is true for classic snaps?16:22
ogra_cratliff, sure16:23
ogra_popey, moop moop16:23
jameshnacc: yes.  You can see the logic in Snapcraft's build_env() function at /usr/lib/python3/dist-packages/snapcraft/internal/project_loader/_env.py16:23
ogra_popey, oh ... unmoop ...16:24
popeywat wat16:24
naccjamesh: ok, man for instance is installed via stage-packages16:25
naccin any case, i'll try it16:26
naccjamesh: i'm really curious if this is tested with builds on xenial run on artful?16:27
jameshnacc: if the executable isn't being built under control of snapcraft (as would be the case if you're pulling executables from the Ubuntu archive), then you wouldn't see the rpath16:28
jameshnacc: it would be up to you to handle it16:28
jamesheither by trying to patch in an rpath, or use a wrapper shell script that configures LD_LIBRARY_PATH instead16:29
jameshpatchelf can add an rpath to an existing binary, but sometimes fails16:30
naccjamesh: ok, so there are two cases, got it16:30
jamesh(it isn't always possible to modify an already linked executable)16:31
=== ShalokShalom_ is now known as ShalokShalom
naccwell, fwiw, (jamesh is gone), the python3 generated in the classic snap by using the pythonn plugin also does nont have any RPATH set16:44
nacccore snap's ldd references a host path16:51
nacc(/bin/sh)16:51
naccerr, /bin/bash16:52
davidcallemorphis: it will be deployed at some point in the next hours (https://docs.staging.ubuntu.com/core/en/stacks/network/index) , IS is looking into it.16:56
* nacc is super-confused, the bash in the core snap also has no rpath17:23
naccso was jamesh wrong earlier?17:24
naccand if i try to run binaries from the core snap restricting LD_LIBRARY_PATH i get segfaults (Probably implies I'm being too strict)17:24
ogra_nacc, snaps do a pivot_root when running ... how do you check ?17:25
ogra_nacc, http://paste.ubuntu.com/25621829/17:26
naccogra_: classic snaps too?17:26
ogra_nacc, thats a zyga-ubuntu question17:26
naccogra_: ok17:26
nacczyga-ubuntu: --^ :)17:26
nacci assume they *don't* otherwise they couldn't use the host at all17:26
naccbut if they don't, none of the core snap makes much sense17:27
naccdebugging all of this has really not been fun, and makes me thinks classic snaps on artful may just be sort of broken (even if they happen to work some of the time)17:27
naccogra_: your paste makes total sense on core and with confined snaps (to me)17:28
ogra_they could use the host if they pivot and then bind-mount half the host ;)17:29
nacci hope that isn't how it's done :)17:29
naccbut it might be, true17:29
naccand i guess snapd has privilege to do that before running the app17:29
naccogra_: but i still don't see any actual use of rpath in the core snap's binaries17:30
ogra_(which they do via /var/lib/snapd/hostfs/ i think)17:30
ogra_well, the core snap is built from debs ... iirc rpath isnt allowed in debs17:30
naccogra_: ok, so maybe there is snapd voodoo for that on classic, for core snap binaries17:30
naccthe problem is, I have almost no way of knowing if that is true :)17:31
ogra_https://wiki.debian.org/RpathIssue17:31
ogra_"While there's no policy dictating the accepted use of RPATH, it's been a general consensus that RPATH use is discouraged, given the interactions between the above reasons and Debian's way of dealing with libraries and package dependencies. "17:31
=== JoshStrobl|AFK is now known as JoshStrobl
=== JanC_ is now known as JanC
pstolowskijdstrand, hey, what conf room are you in?17:53
zyga-ubuntupstolowski: hey17:53
zyga-ubuntupstolowski: how's the event?17:53
pstolowskizyga-ubuntu, it's good!17:53
=== chihchun is now known as chihchun_afk
ogra_mvo, https://github.com/snapcore/snapd/pull/210517:58
mupPR #2105: snapstate: only import defaults from gadget on install <Created by niemeyer> <Merged by niemeyer> <https://github.com/snapcore/snapd/pull/2105>17:58
ogra_mvo, https://github.com/CanonicalLtd/ubuntu-image/pull/7217:59
mupPR CanonicalLtd/ubuntu-image#72: Make sure <unpack>/image/etc gets into the system-data directory <Created by warsaw> <Merged by warsaw> <https://github.com/CanonicalLtd/ubuntu-image/pull/72>17:59
naccis it possible that while building a snap, one part (e.g., mine that builds xz-utils) gets staged/built, and then a subsequent part that depends on it (dpkg), sees the xz binary in stage, but rpath hasn't been modified on it yet, so it, at runtime, tries to load core libs, instead of libs from my snap?18:08
kyrofanacc, rpath hasn't been modified one... what? xz?18:08
kyrofas/one/on/18:09
nacckyrofa: yeah, on the staged xz18:09
nacci'm wondering about the order here18:09
nacchttp://paste.ubuntu.com/25622009/18:09
naccis the error dpkg's autopoint is spitting out18:09
kyrofanacc, the first bit makes total sense: if part A builds "after" part B, part B will be staged before A is built18:09
naccwhich feels like a mismatch between the just built xz and the libs being loaded18:09
kyrofaAh, this sounds like an LD_LIBRARY_PATH ordering issue18:10
* __chip__ might be having too much fun right now18:10
mupPR snapd#3968 opened: daemon: use client.Snap instead of map[string]interface{} for snaps <Created by chipaca> <https://github.com/snapcore/snapd/pull/3968>18:10
nacckyrofa: maybe? i'm not setting it at all18:10
nacckyrofa: this is during the build18:11
kyrofanacc, yeah but snapcraft does. Checking...18:11
nacckyrofa: yeah :)18:11
kyrofanacc, this is a classic snap, I assume?18:11
nacckyrofa: so i can confirm the core snap's liblzma is XZ_5.0 while my built one is XZ_5.218:11
nacckyrofa: yep18:11
davidcallemorphis: It's live18:16
nacckyrofa: would i need to write my own plugin in the short-term?18:17
kyrofanacc, I suspect something odd is happening in snapcraft itself, particularly in snapcraft/internal/project_loader/_env.py18:18
kyrofaCould the LDFLAGS be going wrong there?18:18
nacckyrofa: it could be (although i don't know how to debug that) -- but also, how is it finding my just built xz? I don't see PATH manipulation there18:19
kyrofanacc, look at runtime_env there18:21
nacckyrofa: but that's for runninng binaries, not building them?18:23
naccor is the xz now a runtime18:23
nacckyrofa: bbiab18:23
kyrofanacc, yeah the name is perhaps a bit misleading: it still gets evaluated for the build env18:24
kyrofasgclark, SNAPCRAFT_CONTAINER_BUILDS=1 snapcraft18:24
sgclarkthanks!18:25
ogra_pstolowski, https://docs.ubuntu.com/core/en/reference/interfaces/index18:30
kyrofaHey ogra_ any idea why we're using /etc/profile to add /snap/bin to the path? Is there no way to do it without a login shell?18:33
__chip__kyrofa: hey, what's that about /etc/profile and login shells?18:44
ogra_kyrofa, the only other way is /etc/environment and that can only be changed for new installs ...18:45
__chip__well, there is environment.d18:46
ogra_kyrofa, we could surely talk to foundations (hey slangasek ) about adding /snap/bin to /etc/environment in new artful installs by default as we do since a while on ubuntu core images18:46
ogra___chip__, is that finally landed ?18:47
kyrofaogra_, yeah it's odd to have different behavior depending on how you're logging in, e.g. we have someone here trying to package mosh18:47
ogra_(i only know thats a lennart plan but havent heard anyone implemented it yet in a stable distro)18:47
ogra_kyrofa, if you're logging in it should always work18:48
__chip__ogra_: I don't think we've got it yet, no, definitely not in x18:48
kyrofaogra_, over ssh18:48
kyrofamosh doesn't run a login shell, so you have to give it an absolute path to the mosh server18:48
__chip__kyrofa: fun fact: fedora (and rhel?) load profile.d from non-login shells as well18:48
ogra_kyrofa, if you're logging in it should always work (and surely does with ssh ... ) if you do *not* log in ssh will strip your path18:48
ogra_kyrofa, but thats an ssh thing ...18:49
ogra_kyrofa, anyway ... what needs to happen to have it globally is to add it to /etc/environment ... and by poloicy we do not touch it on installed systems18:49
__chip__kyrofa: why doesn't mosh run a login shell?18:50
ogra_*policy18:50
ogra_kyrofa, the issue is that when using snapd on other distros we can not control /etc/environment (unless they have environment.d support as __chip__ pointed out) ... so there profile.d is the only way18:51
kyrofaogra_, this is what needs to work in order for e.g. mosh to work: https://pastebin.ubuntu.com/25622245/18:52
kyrofa__chip__, no clue18:52
kyrofa__chip__, https://github.com/mobile-shell/mosh/issues/18218:52
kyrofa__chip__, not a mosh user myself18:53
kyrofaMore of an SSH+screen guy18:53
=== JoshStrobl is now known as JoshStrobl|AFK
jdstrandpstolowski: 141318:58
pstolowskijdstrand, k, will be there in a few minutes19:01
ogra_kyrofa, well, the only way currently is to make mosh use 'ssh sh -l -c "<command>"' instead of 'ssh "<command>"'  ... there is also elopio's bug 1659719 that explains it19:03
mupBug #1659719: ssh can't call a binary from a snap without the full path <isv> <Snappy:Fix Committed by ogra> <livecd-rootfs (Ubuntu):Fix Committed by ogra> <https://launchpad.net/bugs/1659719>19:03
kyrofaogra_, how is that fix-committed for snappy?19:07
kyrofaOr is that just ubuntu core, and it should also apply to snapd?19:08
mupPR snapcraft#1570 closed: Don't fail over empty or faulty lines <Created by aleixpol> <Merged by sergiusens> <https://github.com/snapcore/snapcraft/pull/1570>19:50
mupPR snapcraft#1571 closed: Make sure we don't try to include an empty set <bug> <Created by aleixpol> <Merged by sergiusens> <https://github.com/snapcore/snapcraft/pull/1571>19:50
kyrofajdstrand, your alsa workaround got us further, but now we're getting a denial on /dev/snd/controlC0. snappy-debug suggests the alsa plug, but we're already using it19:50
__chip__niemeyer: https://forum.snapcraft.io/t/2268 <- let me know if that seems reasonable, you20:08
mupPR snapd#3969 opened: hooks: rename refresh hook to post-refresh <Created by stolowski> <https://github.com/snapcore/snapd/pull/3969>20:15
pstolowskimvo, ^20:25
mvopstolowski: hm? could you please paste it again?20:25
pstolowskimvo, sorry, sure - https://github.com/snapcore/snapd/pull/396920:26
mupPR #3969: hooks: rename refresh hook to post-refresh <Created by stolowski> <https://github.com/snapcore/snapd/pull/3969>20:26
mvopstolowski: ta20:26
pstolowskii hope the branch name is accurate ;P20:26
nacckyrofa: i'm here now20:27
kyrofacratliff, https://forum.snapcraft.io/t/expose-a-more-consistent-subset-of-systemds-service-directives20:32
nacckyrofa: did you have any furhter thoughts? this is a relatively big blocker for me right now20:33
nacckyrofa: i'm going to try reordering my build20:38
naccwe don't really care about usinng the new xz in dpkg's build, I do't think20:38
ogra_compression is overrated anyway :P20:40
naccheh20:41
naccwell, SOVERSION'd compression ;)20:41
ogra_kyrofa, the bugy is fix comitted for Ubuntu Core (Snappy) and livecd-rootfs, snapd had at a similar time the fix in profile.d (which was the only sane thing we could do from a cross distro perspective)20:49
ogra_(sorry, only just noticed you answered above)20:50
kyrofacratliff, https://forum.snapcraft.io/t/service-ordering21:01
nacckyrofa: cool, i think orderign (after adding some deps), is letting dpkg build21:02
nacckyrofa: but it does imply a snapcraft bug if the ordering breaks the build inn a non-obvious way21:02
kyrofanacc, yes I'd say so21:03
nacckyrofa: i'll add it to my backlog of bugs to file :)21:03
mupPR snapcraft#1573 opened: WIP project_loader: parse YAML without processing it <Created by kalikiana> <https://github.com/snapcore/snapcraft/pull/1573>21:50
nacckyrofa: any ideas? http://paste.ubuntu.com/25623175/21:57
nacckyrofa: that's pygit2 from a part using the python snap22:09
kyrofanacc, are you using python from the archive?22:09
nacckyrofa: yes22:11
mupBug #1719747 opened: Fedora 26 LXD container: cannot load apparmor profile <Snappy:New> <https://launchpad.net/bugs/1719747>22:13
kyrofanacc, sergiusens will know more, but I seem to remember an issue with that, e.g. it's hard-coded to the wrong libc or something. We had to build our own Python in snapcraft to get around it22:14
=== JoshStrobl|AFK is now known as JoshStrobl|zzz

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