/srv/irclogs.ubuntu.com/2021/11/18/#snappy.txt

mborzeckimorning06:47
mardymborzecki: hi!07:10
mborzeckihey07:11
mupPR snapd#11075 closed: tests: use --snap instead of --extra-snaps to create the core image <Simple 😃> <Created by sergiocazzolato> <Closed by bboozzoo> <https://github.com/snapcore/snapd/pull/11075>08:03
pstolowskimorning08:07
zyga-mbpgood morning08:10
mupPR snapd#11076 closed: snapcraft.yaml: fix advanced grammar & 20.04 packaging <Created by xnox> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/11076>08:18
mborzeckineed 2nd review in https://github.com/snapcore/snapd/pull/11071 🙂 should be very easy to test locally too08:27
mupPR #11071: data/env: provide profile setup for fish shell <Simple 😃> <Created by bboozzoo> <https://github.com/snapcore/snapd/pull/11071>08:27
mborzeckimardy: maybe you can take a look ^^ 09:02
mupPR snapd#11077 closed: tests: use ubuntu-image 1.11 from stable channel  <Created by sergiocazzolato> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/11077>09:43
mupPR snapd#11071 closed: data/env: provide profile setup for fish shell <Simple 😃> <Created by bboozzoo> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/11071>09:48
mupPR snapd#11078 opened: tests: disable flaky uc18 tests until systemd is fixed <Flaky Test> <Created by mvo5> <https://github.com/snapcore/snapd/pull/11078>09:58
mupPR snapd#11079 opened: packaging: sync with downstream packaging in Fedora and openSUSE <Simple 😃> <Created by bboozzoo> <https://github.com/snapcore/snapd/pull/11079>11:44
mborzeckia simple PR ^^11:50
mupPR snapd#11080 opened: builtin/interfaces: add shared memory interface <Created by mardy> <https://github.com/snapcore/snapd/pull/11080>12:54
zyga-mbpmardy NICE13:24
zyga-mbp mardy left one comment13:25
mardyzyga-mbp: thanks :-)13:37
mardyzyga-mbp: what about "allows two snaps to use a named shared memory object"?13:39
zyga-mbpI was mainly going back to original issues with /dev/shm13:39
zyga-mbplike chrome using random files there13:39
zyga-mbpthis interface doesn't help there right?13:39
zyga-mbpI'm only looking at docs / usability and not tech here13:39
zyga-mbpsince the interface allows /dev/shm/$stuff13:40
mardyzyga-mbp: at the moment wildcards are not allowed, so you need to specify a precise name (or list of names)13:42
zyga-mbpright13:43
zyga-mbpI'm just trying convey that the summary doesn't convey that the interface is not automatically g related to /dev/shm 13:43
zyga-mbp*handling everthing13:44
mardyzyga-mbp: true. And if I add "redefined"? Like: "allows two snaps to use a predefined shared memory object"13:49
zyga-mbpyeah, that's good13:49
mardy*predefined13:49
* zyga-mbp I think it's just about setting expectations, as I said I know why this is like that13:49
zyga-mbpand it's also nothing I disagree with technically13:50
mardyok, I'll change it then13:50
mupPR snapd#11078 closed: tests: disable flaky uc18 tests until systemd is fixed <Flaky Test> <Created by mvo5> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/11078>14:29
mupPR snapd#11081 opened: tests: Revert "tests: disable flaky uc18 tests until systemd is fixed" <â›” Blocked> <Created by mvo5> <https://github.com/snapcore/snapd/pull/11081>14:29
pstolowskimborzecki: need any reviews?14:49
mvopstolowski: https://github.com/snapcore/snapd/pull/11053 is something I would love to see landing soon if you want a review to prioritize :)14:51
mupPR #11053: daemon: write formdata file parts to snaps dir <Created by MiguelPires> <https://github.com/snapcore/snapd/pull/11053>14:51
pstolowskimvo: sure14:57
* zyga-mbp slowly eods and looks at the pile of todos left over :)16:14
zyga-mbpoh well16:14
zyga-mbpI wish you all friends some rest 16:14
pstolowskizyga-mbp: take care!16:21
arseniquezyga: are here in the chat?18:10
zyga-mbparsenique yes I'm around18:12
arseniqueGreat18:12
arseniqueregarding the issue https://bugs.launchpad.net/snapd/+bug/183002418:12
mupBug #1830024: snapd mountinfo parser doesn't handle the special "\040(deleted)" suffix <snapd:Triaged by arsenique> <https://launchpad.net/bugs/1830024>18:12
zyga-mbpnice to meet you btw18:12
arseniquethank you, me too18:12
arseniquei am trying to understand why we are avoiding using the linux mount package API? Isn't it something that is always there?18:13
zyga-mbpyes it is18:13
zyga-mbpI shared the thoughts we had at the time18:13
zyga-mbpyou may note that snap-confine is not using most commonly libs either, we only used udev because that was mandatory (and it came from super ancient ubuntu-app-launch from click world)18:14
arseniqueIs it still a limitation.18:14
arsenique?18:14
zyga-mbpbut mainly, IIRC, and my memory could be rusty now, we didn't want additional moving parts18:14
zyga-mbpwhere they move from one distro to another18:14
zyga-mbpand we didn't want the extra permissions libmount required18:15
zyga-mbpwell, that's not a question to me18:15
zyga-mbpI retired as a snapd maintainer18:15
arseniqueOh. Yeap, I understand.18:15
zyga-mbpI think the cross distro aspect is very true still18:15
zyga-mbplibmount may have a stable api18:15
zyga-mbpbut I would argue that for parsing mountinfo without having one more moving element it is worth paying that price for18:16
arseniqueAre you implying that this API is not accessible in some distros?18:16
zyga-mbpno not that18:16
zyga-mbpit's just the version skew18:16
arsenique(Sorry for stupid questions, by the way)18:16
zyga-mbplook at snapd from ubuntu 14.04+ to today18:16
zyga-mbpthere are no stupid questions :)18:16
zyga-mbpthose are good questions18:16
zyga-mbpsnapd tries to be source compatible with a wide range of distros 18:16
zyga-mbpand runtime compatible with even pretty old kernels 18:17
zyga-mbpthere were lots of compromises and gray hair involved to make things work18:17
zyga-mbpthere are some things that also don't quite make sense 18:17
zyga-mbplibmount has extras that are somewhat meaningless for containers like snap-confine is setting up18:17
arseniquesounds scary and disturbing18:17
zyga-mbplike the extra mount options that are persisted in a file in run somewhere (my memory is rusty now)18:18
zyga-mbpI suspect using libmount surgically to replace some of the mount craze snap-confine has to do _might_ work well but it would be a nice project for someone with ample time on their hands18:18
zyga-mbpthe advantage might be access to new mount APIs from the kernel (beyond the plain mount(2)18:19
zyga-mbpI think nowadays mborzecki would know who is maintaining that part, when I stopped working he took over but many people joined since18:19
zyga-mbpanyway, I hope this makes sense18:20
zyga-mbpwe tried to be reasonable 18:20
arseniqueI am not sure I fully understand. So, if I understand correctly libmount comes with price at runtime? Is it true if we only use this API to link with?18:20
zyga-mbpand all mistakes if I misremember are mine18:20
zyga-mbpI don't know, we didn't try to use it, we resorted to naked mount 18:20
zyga-mbpwe did look at using it for parsing18:20
zyga-mbpand bailed out early at the time18:20
arsenique(Returning a favour. These are not mistakes, but decisions that where mandatory back then)18:21
arseniqueexactly my point, if we use it for parsing only, is it okay?18:21
zyga-mbpmaybe not18:21
zyga-mbpagain18:21
zyga-mbplibmount assumes a normal system18:21
zyga-mbpyou'd have to look at what it does18:21
zyga-mbpthe extra file for persisting mount flags is referenced 18:22
zyga-mbpit may not be appropriate18:22
zyga-mbpyou'd have to try it for real to know18:22
zyga-mbpI don't know libmount inside out to tell with authority18:22
zyga-mbpand my personal opinion on this is that kernel developers just don't understand how to make proper interfaces for userspace18:24
zyga-mbpI mean, how many crazy broken non standard custom text formats one has to parse to work there18:24
arseniqueLook I still feel like I don't get it. Let's say I isolate the call to the parsing function in a dedicated source. I don't use anything else, just the plain parsing function. Isn't it resolved on the linkage level?18:24
zyga-mbpthis is so basic yet entirely broken18:24
zyga-mbpthen you have to link to libmount18:24
arseniqueHi mvo. You are right on time.18:25
zyga-mbpone sec18:25
zyga-mbpso18:25
zyga-mbp 0x0000000000000001 (NEEDED)             Shared library: [libblkid.so.1]18:25
zyga-mbp 0x0000000000000001 (NEEDED)             Shared library: [libselinux.so.1]18:25
zyga-mbp 0x0000000000000001 (NEEDED)             Shared library: [libdl.so.2]18:25
zyga-mbp 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]18:25
zyga-mbp 0x0000000000000001 (NEEDED)             Shared library: [ld-linux-x86-64.so.2]18:25
zyga-mbp 0x000000000000000e (SONAME)             Library soname: [libmount.so.1]18:25
arseniqueI am making full of myself in front of zyga18:25
zyga-mbpthis is from my sid system18:25
zyga-mbplibmount links with libblkid18:25
zyga-mbpso now you have one more dependency18:26
zyga-mbpand this has to be captured in selinux and apparmor profiles18:26
zyga-mbpthose libs may have init functions18:26
zyga-mbpand indeed they all do18:26
arseniqueBut if I use a specific function only in link with it only, why would linker bring all other "friends" to the party?18:26
zyga-mbpso before you run any code at all18:26
zyga-mbpjust linking to them requires permissions and runs code18:26
zyga-mbpwell, that's shared libraries 1-0-118:27
zyga-mbpthat's how linking works18:27
zyga-mbpelf standard and all that fun18:27
zyga-mbpdon't get me wrong18:27
zyga-mbpit may be well all doable18:27
zyga-mbpbut 18:27
zyga-mbp1) you have to try 18:27
zyga-mbp2) you have to evaluate what the init code does in both 18:27
zyga-mbpyou have to take into account if you want to link them statically or dynamically from the host18:27
zyga-mbpand if they link dynamically, the analysis you do is only valid for that one host you did it for18:28
arseniqueI thought of static link, not dynamic.18:28
zyga-mbpin the future they may decide to read a new file18:28
zyga-mbpand then your SOL18:28
zyga-mbpokay18:28
arseniqueI understand the unwanted perks of dynamic linking18:28
zyga-mbpstatic linking works the same way for startup functions in practice, no _init elf callback but the static linker will do the equivalent 18:29
arseniqueTherefore, I assumed that static linking will be the best.18:29
zyga-mbpyou should also check if those are supported as static libraries18:29
zyga-mbpmore and more parts of the stack refuse to allow static linking18:29
zyga-mbpI'm not saying they do, just that it's another part of the problem18:29
zyga-mbpthen, having checked their init functions18:30
zyga-mbpand the source of the particular parse function18:30
zyga-mbpyou want to see what happens on errors18:30
zyga-mbpand which files it references18:30
zyga-mbp_anywhere_18:30
zyga-mbpand then make the call18:30
zyga-mbpI think that's all I can think of as factors right now18:30
arseniqueThere is a great saying in russian for that: life is like in fairy tail - the further you get, the scarier it becomes.18:30
zyga-mbphehe18:30
zyga-mbpespecially old fairy tales ;)18:30
arseniqueWell, I think I will have to take it to the discussion of the elder wolfs here in the tribe. To see what they think of this.18:32
arseniqueMany thank.18:32
zyga-mbpgood luck18:32
arsenique*thanks18:32
zyga-mbpI think in general it's a good trend though18:32
zyga-mbpas old systems become less and less supported18:32
zyga-mbpbut it's very tricky18:32
zyga-mbpfor snap-confine in particular sadly18:32
arseniqueI understand. Thank you.18:33
zyga-mbpthough I still think mount interfaces are broken18:33
zyga-mbpthe new syscalls are good18:33
zyga-mbpbut so much of the old interface is "well just do what others do"18:33
zyga-mbpwhich is why using \r in mount name explodes software still18:33
arseniqueWould you suggest me something in particular?18:33
zyga-mbphmm?18:34
arseniqueI have to say my engineering senses are really hard on digesting code duplications.18:34
arseniqueI am a child on modern trends, like SOLID and clean coding.18:34
zyga-mbplinking is not the only solution 18:34
arseniqueWhat would you suggest?18:35
zyga-mbpI'll just say: the fewer deps the better18:35
zyga-mbpreviewing the other implementation 18:35
zyga-mbpcopying the code 18:35
zyga-mbplinking is like marriage18:35
zyga-mbpI know libmount is not left-pad18:36
arseniqueBut copying the code, will bring us to the same pitfall. We are loosing the ability to get fixes and even are running out of sync.18:36
zyga-mbpbut dependencies are quite evil18:36
zyga-mbparsenique but you get that anyway!18:36
zyga-mbpwhen you static link18:36
zyga-mbpyou link to libmount from xenial18:36
zyga-mbpthere's no good solution here IMO18:36
zyga-mbpand the custom impl is not worse than other two (linking statically or dynamically)18:37
arseniqueWhat is xenial (sorry again for a stupid question)?18:37
zyga-mbpubuntu 16.0418:37
zyga-mbpwhen snapd is built it's not built with latest and greatest 18:37
arseniqueOh. :-) Ooopsi. Made full of myself again.18:37
zyga-mbpit's built on xenial 18:37
zyga-mbpAFAIK 18:37
zyga-mbpit could have changed18:37
zyga-mbpbut you get *that* version18:37
zyga-mbpassuming it's fixed is good18:38
zyga-mbpbut is it?18:38
zyga-mbpit's all a hard problem sadly18:38
zyga-mbpmaybe the function you really want to use is later18:38
arseniqueI believe that today it's not 16.4, but 18.4 instead. But I need to check it.18:38
zyga-mbpI love deps but here, snap-confine, it's so special I would not recommend it18:38
zyga-mbp(when I say I love deps I mean I love good dependencies when that's the reasonable thing to do)18:39
arseniqueThe wonders and perks of open source. :-|18:39
zyga-mbpI still think we as a industry have a left-pad problem18:39
zyga-mbpalso if you link statically, you get quite a bit of extra size 18:40
zyga-mbpunless you start to play tricks and recompile those deps with section-per-function18:40
zyga-mbpand do gc18:40
zyga-mbpbut that's not default18:40
arseniqueI am not sure this is correct. 18:40
arseniqueIt depends on how you link.18:40
zyga-mbpI'm quite sure but I'm happy to be proven wrong18:40
zyga-mbpI know but this is what you will get without jumping through hoops of fire18:40
arseniquePer my experience linker drops unused pieces of code and data.18:41
arseniqueAt least I've seen it as my background is embedded18:41
zyga-mbpnope, not by default18:41
zyga-mbpyes18:41
zyga-mbpit's possible to do 18:42
zyga-mbpbut it's certainly not the default18:42
zyga-mbpI just had a look on my debian sid system and there's no libmoun.a in libmount-dev18:42
arseniqueJust a second, for standalone products like snapd?????18:42
zyga-mbpso you may want to check if the static library is offered across the distros at all18:42
zyga-mbppardon?18:42
zyga-mbpanyway, no libmount.a in Debian18:43
zyga-mbp so also not in Ubuntu18:43
arseniqueI mean that it's not a package, where you keep code in binary for linkages in future.18:43
zyga-mbpmost likely not in SUSE and Fedora18:43
arseniqueI mean that when I compile something like snapd I would link it with flags that throw away everything not needed.18:43
zyga-mbphttps://elinux.org/images/2/2d/ELC2010-gc-sections_Denys_Vlasenko.pdf18:44
zyga-mbphave a look at this18:44
zyga-mbpthis is basically as much as I know about this topic18:44
zyga-mbpthis is quite old so maybe there's new development around18:44
arseniqueI surely will.18:44
zyga-mbpanyway, your first problem is you don't have libmount.a18:45
arseniqueWow. Thank you so much. 18:45
zyga-mbpand good luck trying to convince Debian to add it back18:45
zyga-mbpat some point18:45
zyga-mbpyou will cherish the fact you can just fix that bug in snap-confine18:45
zyga-mbpwith one patch18:45
zyga-mbpand one build18:45
zyga-mbpand that's it18:45
arsenique:-D18:45
arseniqueBack to the metaphor about old fairy tails.18:46
zyga-mbpI should get out of my office 18:46
arseniqueLook. You already helped me a lot. I hate to tell it, but I have to drop off.18:46
zyga-mbpgood luck18:46
zyga-mbpbtw, are you a snapd maintainer?18:46
arseniqueNO.18:46
zyga-mbpokay18:46
arseniqueI wish.18:46
zyga-mbpgood luck :)18:46
zyga-mbpI'm sure the doors are open18:47
arseniqueI a total newbie in Canonical.18:47
arseniqueThank you.18:47
zyga-mbpI'll be around if you want to chat some other day18:47
zyga-mbpcool, cheers!18:47
arseniqueSure.18:47
arseniqueCheers.18:47
mupPR snapd#11082 opened: gadget: tweaks to DiskStructureDeviceTraits + expand test cases <Simple 😃> <Skip spread> <Created by anonymouse64> <https://github.com/snapcore/snapd/pull/11082>20:31

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