/srv/irclogs.ubuntu.com/2018/07/11/#snappy.txt

RoninHii there, so im using crux00:12
Roninanyway for me to install snap from source ?00:12
Pharaoh_Atemniemeyer: you there?01:03
Pharaoh_AtemRonin: no01:03
Pharaoh_AtemRonin: unless you're referring to snapd?01:03
RoninPharaoh_Atem: yee i was referring to snapd01:04
Pharaoh_AtemRonin: crux would be difficult due to missing systemd01:05
Ronini wouldnt call it missing , but thats unlucky i guess01:06
Roninmy search for a way to get discord continues lol01:06
Pharaoh_AtemRonin: does CRUX provide flatpak?01:07
Pharaoh_Atemhmm guess not01:09
Pharaoh_AtemRonin: Discord is available as a snap and a flatpak01:09
RoninPharaoh_Atem: yupp i know01:10
Roninits the one package im missing01:10
Pharaoh_Atemheh01:10
Pharaoh_Atemit's the first time in a while I've heard of anyone using CRUX01:10
Roninim using void linux on my main system01:19
Ronininstalled crux on my laptop to try it out, gotta say i quite like it so far01:19
Roninjust that im missing some packages01:19
mupBug #1781120 opened: 18.04 kernel 4.15.0-24 snappy can't start <Snappy:New> <https://launchpad.net/bugs/1781120>04:25
zygagood morning06:47
=== pstolowski|afk is now known as pstolowski
pstolowskimornings, hey zyga06:54
zygacześć!07:13
zygapedronis: hey08:01
zygapedronis: around?08:01
zygapstolowski: I'll move json serialization of various repo types to the daemon08:10
pstolowskizyga: makes sense08:12
zygaI think we agreed to do this long time ago08:12
zygaor something similar08:12
zygawow08:19
zygaI found a file with copyright 201408:20
zygawow08:22
zygawe have copies of repo json code in daemon :)08:22
* zyga is happy to clean this up08:22
oSoMoNcan someone in the know confirm that when a snap is unpublished from the store, it doesn't get uninstalled from user's devices?08:27
zygaoSoMoN: that's correct08:28
zygawe don't have any code that could uninstall a snap08:28
zygathis way that is08:28
oSoMoNzyga, thanks08:33
zygapstolowski: can you please look at https://github.com/snapcore/snapd/pull/549608:47
mupPR #5496: interfaces,daemon: move JSON types to the daemon <Created by zyga> <https://github.com/snapcore/snapd/pull/5496>08:47
pstolowskizyga: sure08:47
mupPR snapd#5496 opened: interfaces,daemon: move JSON types to the daemon <Created by zyga> <https://github.com/snapcore/snapd/pull/5496>08:48
zygaI'll keep hacking in that direction, there is clearly some more cruft there08:48
zygaChipaca: hey08:49
zygaaround?08:49
Chipacazyga: no08:50
zyga:D08:50
Chipacazyga: asquare08:50
zygaperfect08:51
zygadaemon api question08:51
zygahow would you feel if I moved all the jsonization types to api_json.go08:51
zygaI added some there because I'm cleaning up the interface repository json story08:51
zygaand I noticed we have a few types scattered around the api.go file08:51
Chipacazyga: including the stuff in snap.go?08:51
zygawhile you think please look at 5496 api_json.go to see what that would look like08:52
zygano, only stuff unique to the api layer08:52
zygathat is currently in random places in api.go08:52
Chipacazyga: daemon/snap.go08:52
zygaah, this one08:52
zygano, I don't think so08:52
Chipacazyga: it's the only snap.go :-)08:53
zyganothing there uses json tags08:53
zygaI though of snap/*.go08:53
Chipacazyga: correct, code there just builds map[string]stuff08:53
zygathat is fine08:53
zygaI just noticed we have some duplication in the types08:53
zygabecause they were in separate packages08:54
zygaand also some types were super-alike08:54
zygaand just defined few pages away from each other08:54
Chipacazyga: if it's duplication between daemon and client, that was intentional08:54
zygano no08:54
Chipaca(which isn't to say i agree with it)08:54
zygathis is all in the daemon/* area08:55
zygaI know about the purpuseful duplication with the client package08:55
Chipacak08:55
Chipacazyga: I'm not sure I understand 549608:57
Chipacazyga: in general I think it's better to have the marshaller next to the type it's  marhsalling08:57
zygayes, but:08:57
Chipacazyga: were the slotJSON etc in daemon even used?08:58
zyga1) we never intended to return snap.{Plug,Slot}Info this way08:58
zyga2) we had duplicates between repo and daemon08:58
zyga(yes, both were used /o\)08:58
zyga3) we want to introduce code that changes some of the info's just before they are sent and pedronis opposed doing that to the original types08:59
zygaso I want to do that to the json types instead08:59
zygahence the clenaup08:59
zyga*cleanup08:59
zygaboth types were used because we have legacy/non-legacy interface APIs08:59
Chipacafair08:59
zygaand they used both by accident08:59
zygaa bit silly08:59
pedroniszyga: seems my worry is introducing lots of complications, otoh that remapping by taking an info and just changing name inside looks very strange/fragile at face value09:03
zygapedronis: not complications, cleanups09:03
zygapedronis: there were clearly copy/pasted types around09:04
zygapedronis: not that I didn't change the info that was handed in, I returned a modified copy09:04
Chipacasome day I'll have time to rewrite daemon09:04
pedronisI know09:04
Chipacathere's so much stuff i'd do better today09:04
pedronisstill strange09:04
pedronisI'm also not sure did those infos had implicit slots in them, does it matter ?09:05
zygapedronis: they had slots, both implicit and not09:06
zygapedronis: they were added at a much earlier stage09:07
zygain the request/response timeline, not in our git log  timeline)09:07
pedronisso were basically taking a snapd  snap info (with implicit slots) and calling it core ?  or the other way around09:07
pedronisthat's admittedly strange09:07
zygayes09:07
zygain reality it was just a way to return a snap name and slot name09:08
pstolowskizyga: thanks for that cleanup.. i remember cleaning some of that (the legacy connections) but missed the second part09:09
zygapstolowski: I pushed the second patch to the PR so that there is no duplication inside the daemon either now09:10
zygaok, with this the re-mapping code should no longer have to touch snap.Info09:12
* zyga cannot wait for tests to finish09:23
* Chipaca afk for a while09:42
zygapstolowski, pedronis: https://github.com/snapcore/snapd/pull/5496 is green and blocking me10:42
mupPR #5496: interfaces,daemon: move JSON types to the daemon <Created by zyga> <https://github.com/snapcore/snapd/pull/5496>10:42
zygacan we land it10:42
mupPR core18#44 closed: hooks: fix 030-fix-timedatectl.chroot to DTRT when running on non-core devices <Created by mvo5> <Merged by sil2100> <https://github.com/snapcore/core18/pull/44>10:45
zygaguys?10:49
zygajdstrand: hey, around?10:50
pstolowskizyga: i need to give it proper looked, only skimmed through it; will review before/after standup11:04
pstolowski*look11:04
zygathanks11:05
pstolowskizyga: sorry about that11:05
mupPR snapd#5497 opened: overlord/patch: patch for static plug/slot attributes <Created by stolowski> <https://github.com/snapcore/snapd/pull/5497>11:09
=== pstolowski is now known as pstolowski|lunch
zygapedronis: hmm is this expected:11:12
zygahttps://www.irccloud.com/pastebin/8R1R97lR/11:12
zygapedronis: I cannot abort change 5411:12
Son_Gokukyrofa, when snapcraft can finally build Fedora based snaps, it should forbid excluding `/usr/share/licenses`: https://forum.snapcraft.io/t/legal-issues-when-excluding-usr-share-doc/634111:13
pedroniszyga: no idea11:13
zygaah, it timed out now11:13
pedronisit has an undo11:13
pedronisbut systemctl as well11:13
Son_Gokuniemeyer: hey, you there?11:13
* zyga iterates on the signal test11:40
zygaChipaca: around?11:43
zygaChipaca: can you please review https://github.com/snapcore/snapd/pull/549611:43
mupPR #5496: interfaces,daemon: move JSON types to the daemon <Created by zyga> <https://github.com/snapcore/snapd/pull/5496>11:44
Chipacazyga: knee deep in spread tests11:44
zygaack11:44
zyganext step: waist deep? :)11:44
Chipacazyga: I daren't venture more into the miasma, as it sucks you in11:51
Chipacaalso, I daren't postpone lunch11:51
* Chipaca goes to sort that out11:51
=== apw_ is now known as ap
=== ap is now known as Guest79801
=== Guest79801 is now known as apw
* zyga prepares for lunch12:00
zygaeh eh eh12:11
zygaChipaca: would it make sense to have a way to install a snap without starting the services12:11
zygabecause the services require connection to an interface12:12
zygathat is not denied but also not auto-connected12:12
zygaChipaca: the particular use-case is daemon-notify12:12
zygait is a bit silly but it is not auto-connected12:12
zygaand this prevents daemon: notify services12:13
zygathis prevents the snap from being installed12:13
zygacatch 2212:13
zygain effect nobody can develop a daemon: notify service ever12:13
zygajdstrand: ^ FYI daemon: notify requires connected daemon-notify plug (not auto-connected) but this can never be done because failing services prevent the snap from being installed12:14
zygajdstrand: I'm not sure if a snap-declaration assertion can override this (auto-connection of a slot that can be connected manually) but this is not useful for developers as far as experience is concerned12:16
zygaI think something has to go12:16
pedroniszyga: yes, snap-declaration can set auto-connect per snap12:23
zygapedronis: thanks12:24
jdstrandzyga: it isn't silly that it isn't auto-connected. there have been vulnerabities on the notify socket. there is a card (still) to investigate that further, but the decision was to manually connect for now.12:31
jdstrandzyga: this sounds like a problem with the application. why is it crashing so hard?12:32
=== pstolowski|lunch is now known as pstolowski
Chipacajdstrand: systemd kills a notify daemon if  it doesn't notify within a timeout12:34
jdstrandI see12:34
jdstrandwell, yes, auto-connection is available for now12:34
Chipacabut I thought you could just use snapctl to disable the service from the instlal hook12:35
zygajdstrand: it is not crashing, it is not starting according to systemd as Chipaca explained12:37
zygahmm, I wonder what to do, this is really about me fixing a flaky test12:38
zygajdstrand: so it _should_ auto connect in when installed locally with --dangerous?12:38
* zyga removed it for now, trying to see if this helps12:39
zygait's quite annoying trying to develop a snap that keeps failing to install :)12:40
zygaI should break12:40
zygasee you at the startup12:40
newbeehi guys,  I have a java web application, now i want to create a snap for this app. when I tried to create a snap it shows "[Redirection detected from https to http. Protocol switch unsafe, not allowed.]" in the build part. please someone guide me to solve this problem.12:42
zyganewbee: not a snapcraft expert but this seems like the URL was specified as HTTPS but something (perhaps a proxy) redirected that to a HTTP, thus nullifying the encryption of the connection.12:43
zygawhat is the URL you are hitting?12:43
newbee@zyga, I am not using any URL for this, in my snap I call tomcat in the part. In the building part it shows this error.12:46
newbee@zyga : the snap access the URL in the build.xml file to buils the tomcat12:48
newbee@zyga :Can you please give me some examples to create the tomcat snap.12:50
zygano12:50
zygaI don't know anything about tomcat12:50
zygalet me look if we have any stock examples though12:50
newbeeOkay thank you...12:51
zyganewbee: looking at https://wiki.ubuntu.com/snapcraft/parts I see some tomcat parts, maybe that will be of some help12:51
newbeeIs there any other way to create the web snap in ubuntu core?12:52
Chipacanewbee: I think you'd be best starting a topic on the forum12:55
zyganewbee: I think you can create a web-talking snap using the typical suspects: python, java, go; it's just that I'm not the best person to share examples with you as I work on the other side of snappy (the service)12:59
zyganewbee: perhaps kyrofa or popey have some tomcat-based snaps they can point you to12:59
zyganewbee: though Chipaca's advice stands: this is a perfect topic for the forum where people will see it outside of the 15minute focus window of your question here13:00
newbee@zyga : Thanks for your help... I will start this topic on the forum...13:03
Chipacahmm, standup13:04
newbee@Chipaca : Okay....13:05
popeyzyga: i have no tomcat snaps13:14
zygajdstrand: hey, about sd-notify, did we consider having snapd be the proxy for the socket13:44
zygajdstrand: so it could read the requests, inspect them and forward/ignore13:44
zygajdstrand: is this something that is doable or is systemd going to ignore the messages relayed by another process?13:45
jdstrandzyga: we didn't afaik. I suspect that systemd would then monitor snapd in that case13:46
zygammm, interesting,13:46
zygaif this is something that would need systemd patches then we cannot rely on it13:46
zygaso no notification by default, no proxying possible,13:46
zygajdstrand: although systemd-notify has a --pid argument so _perhaps_ we could13:47
jdstrandzyga: as mentioned, this isn't a feature I'm super familiar with. there is a card to investigate further to see if we can make it auto-connect. that card continues to have several things in front of it13:48
zygajdstrand: sure, no worries, this is not a priority bump of any kind13:49
pedroniszyga: I triple-checked,  with --dangerous auto-connect are based on the base declaration, so you get the things that are allowed there13:50
zygapedronis: thank you!13:50
zygapedronis: this makes sense now13:50
jdstrandzyga: I can say that if snapd could somehow proxy it, it could probably be made auto-connectable (just need to make sure that a snap couldn't interfere with other snaps via the proxy13:50
zygapedronis: because base declaration connections vs no connections at all makes the difference13:50
zygajdstrand: right13:50
zygathank you both13:50
pedroniszyga: notice that if we made  non-installable vs not auto-connectable, it would also solve the issue13:51
pedronisgiven that it seems installing doesn't work anyway13:51
zygahmm, what do you mean by non-installable?13:51
pedronissay you annot install a snap with interface, unless the snap-declaration says so13:52
zygaah, right13:52
zygayes13:52
zygathough I'm not sure if we would dump the plug/slot and carry on as today or refuse outright13:52
pedronis?13:52
pedronisit refuses outright13:53
zygare14:06
jdstrandzyga: that said, writing up a proxy just because an analysis isn't done isn't great. someone could write up an in depth analysis and provide it to me, justifying auto-connecction (ie, that the code is safe from root attacks and the mechanism can't be used to influence other snaps)14:34
* jdstrand -> errand14:35
zygajdstrand: I won't write the proxy anytime soon, though the analysis seems like more complex (given the extent of systemd and the numerous versions we'd have to inspect)14:45
zygaChipaca, pstolowski: gentle ping about https://github.com/snapcore/snapd/pull/549614:45
mupPR #5496: interfaces,daemon: move JSON types to the daemon <Created by zyga> <https://github.com/snapcore/snapd/pull/5496>14:45
Chipacazyga: reviewing is happening as we speak14:45
Chipacazyga: or rather, it would be, but instead we're speaking14:46
pstolowskizyga: you got my +1 an hour ago14:46
zygaoh14:50
zygadrat, github stale page :)14:50
Chipacazyga: what happened to the tests14:51
zygaI would love to use github on a text mode interface with mouse clicks support if it at least reliably worked14:51
zygaChipaca: the tests for MarshalJSON, gone with the method, this is already tested by the api tests14:51
zygaspecifically for the code that runs getInterfaces or getLegacyConnections (AFAIR, the typing names from memory)14:52
zygathe single call was inlined and that is tested as before, note that this patch didn't change any outcomes anywhere14:52
zygajust removed redundancy14:52
zygaChipaca: thank you :)15:04
mupPR snapd#5496 closed: interfaces,daemon: move JSON types to the daemon <Created by zyga> <Merged by zyga> <https://github.com/snapcore/snapd/pull/5496>15:04
Chipacazyga: that's not a thumbs up, that's a "if the nuclear explosion is bigger than my thumb i need to evacuate"15:04
zygahaha :)15:04
zygaaka the "nuclear painter's algoritm"15:04
zygaalgoritm15:04
zygaman15:04
zygaalgorithm15:04
Chipacazyga: al juarismi15:06
Chipacazyga: so we can get into a gif vs jif fight about that as well15:06
zygagiajef?15:06
zygapoles often enumerate the letters in abbreviations15:07
zygaso things are more like G-I-F than jif or gif15:07
Chipacazyga: it depends on whether you can read it or not i guess; Spanish does that for jpg but not for gif15:07
zygaheta-i-efa15:08
zygaor something15:08
zygaefe15:08
* zyga needs to run an errand15:08
Chipacazyga: is it very obvious that we're waiting for spread here15:08
* Chipaca looks into tea15:09
Chipacazyga: niemeyer: what we should do i snapd is not try to start a service if it's type:notify and it's not connected15:18
Chipacathat's enough15:18
Chipacain a world with warnings, we'd issue a warning at the same time15:18
ogra_Chipaca, found anything interesting in your tea ?15:21
Chipacaogra_: enlightenment15:21
ogra_!15:21
Chipacaogra_: a very narrow enlightenment, but still15:22
mupPR snapd#5490 closed: store: make snap blobs be 0600 <Created by chipaca> <Merged by chipaca> <https://github.com/snapcore/snapd/pull/5490>15:28
=== matteo| is now known as matteo
=== twobitsp1ite is now known as twobitsprite
pstolowskiniemeyer, zyga good news, the libudev internal data header for udev events is the same in 14.04 and 18.0415:44
* zyga is in Łukta now15:46
Chipacazyga: is that pronounced "wukta"?15:49
pstolowskiChipaca: wookta15:57
Chipacapstolowski: tks15:58
=== pstolowski is now known as pstolowski|afk
mupPR snapcraft#2178 closed: lifecycle: pass commands to containerbuild, not steps <Created by kyrofa> <Merged by kyrofa> <https://github.com/snapcore/snapcraft/pull/2178>17:13
smoserhi. if i try to register a name (pdftk) and it is coming up as "reserved". does that mean it has been reserved by someone else ? or possibly just that it is reserved due to there being a package name ?17:39
smoseror per https://forum.snapcraft.io/t/pending-review-on-flock-reserved-name/5442 maybe all binaries in ubuntu got reserved names automatically ?17:43
kyrofasmoser, indeed, just submit a claim for it18:09
* zyga returns for some evening hacking :)19:21
zygahey kyrofa19:21
zygahow have you been?19:21
kyrofaHey zyga, not bad, how about you?20:54
jdstrandmatiasb_: hi! with the full epoch syntax, is this true: read and write must be lists of positive integers, with no transition specified (ie, no '*') and '0' not allowed?20:57
jdstrandmatiasb_: ie, this is ok epoch: {'read': [1, 2]}20:58
jdstrandmatiasb_: but this is not: epoch: {'write': [0, 1]}20:58
jdstrandmatiasb_: and neither is this: epoch: {'write': [1, 2*]}20:58
jdstrandmatiasb_: from the examples, it seems clear [1, 2*] is not allowed, but nowhere does it say n>0, so not sure about [0, 1]20:59
jdstrandmatiasb_: (n>0 is only specified with the simple syntax)21:00
matiasb_jdstrand, o/ right, I think 0 is allowed in the lists; the only case where 0 is not allowed is when using the * syntax, which is not allowed inside a list21:00
jdstrandah, 0 is ok, just not with *21:01
jdstrandgotcha21:01
matiasb_exactly21:01
jdstrandmatiasb_: thanks!21:01
matiasb_np!21:01
mupPR snapd#5498 opened: snap: support hook environment <Created by kyrofa> <https://github.com/snapcore/snapd/pull/5498>22:19
kyrofaniemeyer, that's ^ for you23:02
niemeyer<323:02
niemeyerkyrofa: Thanks!23:02
kyrofaniemeyer, I just learned that the `command` of an app doesn't take the PATH in the `environment` key into account. Is that on purpose, or a bug?23:20
kyrofaIt always just appends it to the snap mountdir23:21
niemeyerkyrofa: Yeah, it's on purpose.. what would be the use case for looking at an arbitrary path?23:23
kyrofaniemeyer, for binaries in bin, for example23:24
kyrofaSnapcraft supports this by placing wrappers in the root with the PATH defined, if snapd doesn't support it migration will be somewhat rough23:24
niemeyerkyrofa: Sure, but what's the use case for not defining that explicitly?23:24
kyrofaA nicety, I suppose. You can put a dir in the PATH and then not have to include the entire path in the command23:26
kyrofaThe real issue is that people are doing it today, so getting rid of wrappers either means rewriting folks `command`, or adding support to snapd to check the PATH23:26
niemeyerkyrofa: They need to touch the command either way23:27
niemeyerRight?23:27
niemeyerSorry, perhaps not the command.. the yaml I mean23:27
niemeyerSince we need to support the current files untouched23:27
kyrofaNo, snapcraft does. Today it generates the wrapper and rewrites the command. Tomorrow it (ideally) stops generating the wrapper and only touches the `environment` of the command. But that can't happen if the command isn't found23:28
kyrofaThe user should notice no difference23:28
kyrofaAgain, ideally23:28
niemeyerkyrofa: Yeah.. it's a bit of a bummer..23:29
kyrofaSnapcraft can rewrite the app to be absolute, but that kinda sucks23:30
kyrofaErr, relative to the root of the snap I mean23:30
niemeyerkyrofa: I guess snapcraft could resolve the PATH itself in those cases23:30
kyrofaIndeed23:30
kyrofaStill probably better than a wrapper, but I was hoping we wouldn't have to touch what the user provided anymore23:30
niemeyerkyrofa: and then ideally stop doing it when we detect a new format yaml23:30
niemeyer(with base, etc)23:30
kyrofaniemeyer, it also means that command chain items need paths to them. That doesn't seem overly verbose?23:31
niemeyerkyrofa: No, seems okay.. the PATH in general is something the user sets up for their environment.. for a snap, we are explicitly defining what the command means.. it shouldn't change if things fiddle with the path23:32
kyrofaOkay. Caught me by surprise, it may catch others23:33
niemeyerkyrofa: I'm surprised in the opposite direction :D23:33
kyrofaHeh23:33
kyrofaSnapcraft can help with the messaging23:34
kyrofaHmm... that still won't solve all the cases though, e.g. where people actually use shell commands as a command23:58
kyrofa`command: echo "hello"` works today. It can never work in that world23:59

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