libera/#eudev/ Tuesday, 2021-09-21

bb|hcbFixed, it was private with member only access; not what I wanted00:07
golinuxYes. OK now.  Thanks00:10
bb|hcbI am somehow clumsy with stuff like that, when I mess up, tell me - it is most probably unintentional ;)00:19
LumaroHi13:08
LumaroWill Gentoo accept eudev again?13:09
LumaroSomeone knows ? I didn't like that they accepted out the box, systemd-tmpfiles and systemd-udev, there are already two left over :(13:09
Lumarohttps://archives.gentoo.org/gentoo-user/message/f7089525d3c330b20f11626c19a43b1c13:10
Lumaros6 int, do it your self ... :(13:10
Arsenwell, do it yourself ;)13:10
ArsenI've been running runit on Gentoo for years now13:11
Arsenfor fun, moreso than to escape OpenRC13:11
LumaroOhhh, very interesting13:11
Arsenas for systemd-udevd, and systemd-tmpfiles, neither of these should present much of an issue13:11
LumaroRunit + OpenRC or Runit only?13:11
ArsenI was too lazy to rewrite the boot runlevel so I just use openrc to invoke it13:11
Arsenbut you could very well use runit only13:12
Arsenor s6 only, of course13:12
Arsen... back on udevd, tmpfiles: at the very least, in their current state, they're able to run independently of systemd, for the time being, as for whether gentoo will be updating an eudev package in gentoo, I can't say13:12
Arsenthere isn't any disadvantage to those yet, especially not on glibc systems13:13
LumaroI like s6 with mdev/mdevd, but it´s replacement of  udev really, many problems read in wiki, before begining O_o13:14
Lumaros6 requieres write any service13:14
Lumaroit´s too hard for a simple user.13:14
LumaroYour config with Runit, depends of systemd* ? I I guess so13:15
Arsenyes, I use both the aforeementioned systemd- packages13:16
Arsenthere isn't much reason not to13:16
Lumarosystemd fuck!!!13:16
Arsen(yet)13:16
Arsendo you have any nonpolitical reason for not using them?13:16
LumaroI use kiss linux, in a future chage s6 init, it´s works with mdev/mdevd.13:16
Arsentrust me, I want those political reasons to be enough, too, but with those components, they barely matter13:16
LumaroNo minimal, hard code, don´t like it.13:17
LumaroYou want to become standard by removing the available options.13:17
ArsenI do?13:17
LumaroTo shine it is not necessary to turn off the light of others.13:17
Arsenquite the contrary, I'm working on competing standards13:17
Arsenbut I'm *working* on them, they aren't ready yet13:18
LumaroSorry you not !!!13:18
Lumarosorry my bad english, traductor ...13:18
Arsenah, sure, no worries13:18
Lumarosystemd !13:18
Lumarosorry.13:18
Arsenit isn't minimal, you're right, but those two components won't pull in the rest of systemd, which is why the gentoo maintainers saw fit to keep them13:18
Arsenso you don't have to worry about that really13:18
Arsenas for the code, I absolutely agree13:19
Arsennothing to say about that13:19
Arsenbut it's got many eyes on it, so stuff gets fixed quite quickly13:19
LumaroI like minimal systems, less is more, i like musl, i like see top less than 100 MB on boot :)))13:19
Arsenthat doesn't justify it, naturally, but it helps the case13:19
Arsenuh does systemd-tmpfiles even run any persistent processes13:19
Arsenit does not13:19
Arsenand eudev is the same codebase as udev13:20
LumaroThe love I have for Gentoo is infinite, although I use others like Void Linux and Kiss Linux, only the possibility of adopting components to finally make it the init default ... it terrifies me and at this point I would not be surprised ...13:21
ArsenI'm decently sure Gentoo has no interest in cutting out most of it's userbase just to please systemd ;)13:21
LumaroI am very happy to read that, sorry that it takes a long time to answer, I have to translate. Thanks for those comments.13:23
Lumaro:)))13:23
Arsenno problem13:23
LumaroAre you a Gentoo developer or related?13:24
Arsencontributor13:24
Arsennot maintainer, not full time13:24
LumaroPerfect, You Know Gentoo god level, perfect.13:25
skarnetnote that using mdev(d) or (e)udev is a totally independent choice from your init system13:25
ArsenI'm working with a few others on this channel of keeping eudev alive though13:25
Arsen^ yeah13:25
skarnetyou can use s6 with eudev, you can use mdevd with openrc, etc.13:25
LumaroOh !!! skarnet !!13:25
Arsenyeah he's interested in keeping eudev alive too13:25
Arsenfor the time being13:25
skarnetanything that helps prevent systemd monoculture is a good thing13:26
Arsen+113:26
Lumaro+1000000013:26
LumaroGentoo can use mdev really ?13:27
Lumaroi read a lot of problem13:27
ArsenI mean, really, anything can13:27
Arsenalso mdev is not mdevd13:27
Lumaroyes, the idea is mdev por devices and mdevd for daemon13:27
skarnetdon't use both at once :P13:28
LumaroKiss Linux run whit two mdev / mdevd13:28
Arsenwhat?13:28
Arsenmdevd replaces mdev entirely, with a daemon rather than a hotplug helper13:28
Lumarodont understand, then13:28
skarnetwhat Arsen said13:28
Lumarowhit mdevd only?13:28
skarnetyes13:28
Lumaroahhh13:28
skarnetif you're using mdevd then you don't need mdev at all13:28
Lumaroperfec, i understand13:28
skarnet(and if you're using mdev then you don't need mdevd at all, but there's no benefit to doing that. ;))13:29
Lumarono no :)13:29
Lumaromdevd for ever13:29
LumaroLet's see if I understand, mdevd works autonomously as device manager and daemon13:30
LumaroYou don't use Telegram? It would be nice :) I don't like it too much, but it ends up being useful.13:34
LumaroArsen13:36
Lumaromdevd replaces mdev entirely, with a daemon rather than a hotplug helper13:36
LumaroThanks !!!13:36
LumaroNow read it.13:36
Arsenyeah13:36
LumaroNo mdevd in Gentoo :(  arg !13:37
Lumaroskarnet too, excellent.13:47
Lumaroif you're using mdevd then you don't need mdev at all.13:47
Lumaro(and if you're using mdev then you don't need mdevd at all, but there's no benefit to doing that. ;))13:47
LumaroSaved ! Thx.13:47
LumaroA pleasure to talk, I will return.13:48
skarnetthat was a wild ride13:55
bb|hcbyep14:05
Arsen"I will return" sounds oddly ominous14:14
skarnet"for vengeance"14:15
lu_zeroor tea and cookies ?14:36
lu_zeroskarnet: btw, did you look on how tightly coupled is libudev with udevd ?14:51
skarnetgtg real soon, but very quickly:14:52
skarnetthe problem, as often with systemd parts, is that the APIs and the way the code is structured imposes constraints on the architecture14:53
skarnetso no, it's not "tightly coupled" as in, you can reimplement a server for libudev, but given how libudev is, you will likely end up with a copy of udevd14:54
skarnetfortunately, it's possible to cheat and kinda sorta implement libudev without relying on a server maintaining the state that libudev needs14:54
skarnetand that's what libudev-zero does14:54
skarnetso libudev-zero can be associated with any device manager daemon (example: mdevd) because the daemon doesn't have to implement the server for libudev14:55
skarnetif I haven't answered your question, I'll do so later, gtg!14:56
lu_zeroI'll look into libudev-zero, I wasn't aware it exists ^^15:19
rburtonso gentoo is dropping eudev but gentoo developers are going to keep it maintained.  is there a splinter group who want to keep with eudev, or will it be likely that eudev remains in gentoo?15:49
rburtonOE contributor here, who recoiled when seeing that gentoo was dropping eudev as they can just use the musl patches for systemd from OE.  which when used, print a big "don't use these patches unless you're sure" warning at build time15:49
Arsenah that's fun15:50
rburtonthey were very nearly deleted last month or so, but someone said that upstream systemd is a bit more open to musl so we're seeing how that goes for six months before maybe deleting them15:50
ArsenI think I'm alone in the endevour to keep eudev maintainer when it comes to people connected to gentoo15:50
Arsenmaintained*15:51
Arsenand I'm just a contributor, not a gentoo dev15:51
Arsenwhy do you print that for the patches?15:52
rburtonbecause at least one of them is actively bad, security wise16:36
lu_zerohow so?16:37
lu_zerorburton: I guess somewhere should be written what part of the OE patchset is concerning16:38
lu_zerosystemd upstream is quite happy to use any gnuism they find useful16:38
rburtonyeah16:39
rburtongnu extensions were threadsafe or memory safe or something, and the portable form isn't16:39
rburtoncan't remember the details, sorry16:39
lu_zerono problem16:39
bb|hcbrburton: I'd be interested to have a look at these patches; at least to search for problematic parts relevant to eudev too17:32
sam_rburton: I don't think that's is completely aligned with what we're doing in gentoo17:32
bb|hcbAnd in case you are aware of the details, a pointer or two would be helpful :)17:32
sam_rburton: they're only applied for musl and while we now apply the whole lot, we did have a minimised set for a release or two, but ended up just using the whole lot for ease w/ systemd-tmpfiles too17:33
sam_the actual set of patches needed isn't that big17:33
sam_(for udev, anyway)17:33
sam_rburton: but no, gentoo developers are not the people who are going to keep eudev maintained, I suspect, unless it ends up following a rebase-often approach17:33
bb|hcbI will give an example: https://github.com/eudev-project/eudev/pull/198 - this (the original code) clearly works well on recent glibc, but as per the definition that is not guaranteed elsewhere. We don't know how many skeletons like that will pop-up out of the systemd code...17:38
bb|hcbWhat I mean is that rebasing without thorough review is not guaranteed to work well out of Linux/glibc17:39
Arsenit is18:31
Arsenall it takes is a good test suite18:32
sam_and runtime testing18:32
Arsenright18:32
ArsenI suspect I'll be able to use some existing testing tools to run a test suite across a matrix of environments on pushes or locally18:32
Arsens/or/and/18:32
bb|hcbI don't think that testing is OK in this case - in the example above (x)libc may implement the API with different code paths - one conforming to what is in glibc and one not; and the test may just not catch it18:37
bb|hcbThe proper way to do that is with some static analyzer that knows what is guaranteed in the API18:37
bb|hcbUnfortuantely clang's one can't do that18:38
Arsenthere's three cases: 1) the function is present in a standard, if there's a bug in (x)libc, it's a bug in (x)libc  2) the function exists solely in glibc, it can be reimplemented exactly and 3) the other libcs disagree with glibc behavior18:39
Arsenbasename() is the third case, and it's a *very* well known case18:40
Arsencheck the notes section of basename(3) in glibc18:40
Ariadnerburton: yes, i saw that about the OE patches, which is why alpine is trying to make this eudev continuation work18:42
rburton:)18:42
bb|hcbArsen: The bad thing is that glibc implements that in a safe way, but that does not make it guaranteed with other libc18:44
ArsenPOSIX has MT-Safety definitions, and in a large part, glibc complies with them18:46
Arsenwhat are you specifically referring to18:47
bb|hcbI mean that glibc behaves differently from what is guaranteed by POSIX. Also note that by define magic and including different set of headers one may get another basename, so this is a good candidate to always implement locally. Nothing bad with that, but the code relies on the non-guaranteed behaviour; and catching this by tests can not be accurate at best18:55
ArsenI have a way to catch it, one sec18:56
Arsenit's a technique I initially used to discover properties of udevd and it's relation to libsystemd18:56
Arsenhttps://paste.sr.ht/~arsen/bd2ccdf30540234d3926ea50e6df640ef7500b4618:59
Arsenthe posix one is __xpg_basename19:00
Arsenhttps://paste.sr.ht/~arsen/7c5f53ea5a8afba4b81793e76f74b10f86183709 there's a few of these19:01
Arsenbut yeah, analyzing symbols and dynamiccs is quite useful19:02
Arsens/cc/c/19:03
bb|hcbYep, that is a good approach, as long as we know the list of what is used improperly; see my comment on GH PR #19819:14
bb|hcbThat is an intentional violation of the standard, based on assumptions :(19:14
ArsenGNU is known to have those19:15
Arsensome more criminal than others19:15
bb|hcbNo, its OK for GNU to have extensions with deviating behaviour, the problem is that the code replies on the unknown19:16
* bb|hcb .oO( Who will possibly run my prog on a non-glibc?! )19:16
Arsenyeah, this one is more criminal than others19:18
bb|hcbI just did: grep basename `find . -name \*.[hc]`19:21
bb|hcbIf we had a list ok known problematic calls, we could egrep '\<(bla1|bla2|...)\>' instead19:22
bb|hcbs/ok/of19:26
Arsenwell, those __xpgs I posted above certainly are19:26
Arsendunno about others19:27
bb|hcbBTW. Do we need external runners to setup CI? Or the GH provided ones will suffice?19:31
bb|hcbFor Devuan it is OK to use a Debian build, no idea if Apline is in the built-in options19:32
Arsenany runner should be able to cross-compile it?19:32
ArsenAriadne: what process do you guys undergo?19:32
Arsen(fwiw by the end of this, we should all be able to just plug in our cross files and get the desired result)19:33
bb|hcbX-compile is too hard; I think that native compile on different platforms should be OK as a start19:44
bb|hcbOTOH using a X-compile build reveals lots of problems, that a native on does not19:46
bb|hcbSo focus on native builds initially and after we are at some point, we can also look into cross compiling; I didn;t try, but if it works out of the box, it can only help19:47
Ariadnealpine doesnt cross-compile udev19:49
bb|hcbIn the meantime I got stuck at cdrom_id.c - current code uses static flags and sets them to known capabilities/properties, the SD one reimplemented it with dynamic memory :(19:56
bb|hcbAriadne: does it have something like clean, isolated build in a sandboxes chroot?20:08
bb|hcbsandboxed20:08
Ariadnesomething like pbuilder?20:09
Ariadneyes, abuild rootbld20:09
bb|hcbYes, pbuilder/sbuilder...20:09
Ariadnebuilds in bubble wrap20:09
bb|hcbDoes it have net access?20:09
Ariadnesome alpine devs still use sbuild!20:09
Ariadneno, not usually20:09
bb|hcb:)20:10
Ariadnethe actual buildservers do due to … reasons20:10
bb|hcbOK, sbuild can be set to get the deps and disable net before the build, so whatever is there, stays there20:11
Ariadneyes i’m aware20:11
bb|hcbWhat do we need to make that run?20:12
Ariadnealpine was largely started by (at the time) young debian people who wanted to build something better, we know all about sbuild and stuff :p20:13
Ariadnehmm20:13
Ariadnewhat do you mean20:13
Ariadnegenerally we don’t create packages using CI20:13
Arsenneither does debian afaiu20:13
Arsengentoo definitely doesn't :^)20:14
Arsenmanagarm does but rn all builds are nightlies anyway20:14
bb|hcbFor eudev we need some CI to check the builds in different envs; Shall we run travis or is there something simpler? How many and what type of runners are needed?20:15
Arsengh actions will do20:16
bb|hcbThey do not have alpine20:16
Arsenthey also don't have managarm, yet I'm not complaining20:16
bb|hcbI mean the internal runners20:16
ArsenI'm decently sure they can run a docker container20:16
ArsenI know20:16
bb|hcbI just briefly skimmed on what they have and how they do it, I am more inclined to setup a couple of VMs with whatever is needed and connect that via actions; but I never did that and I prefer not to reinvent the wheel20:18
Arsenwhy not just run a script in an alpine and debian container each20:18
Arsenthat covers mlibc and glibc20:19
Arsens/mlibc/musl/  sorry, reflex20:19
bb|hcbThe internal runner will create whatever it is asked to, then perform xxx, then discard and only keep the artifacts. If the first step is to create a docker then that's going out of question ;)20:20
ArsenI'm pretty sure one can do that on gh-a (since we build docker containers on gh-a and that involves running containers), and lets us further control network access or such20:20
sam_yep20:20
Arsendocker run -v artifact_dir:/out -v "$(pwd):/srcdir:ro" --net=none alpine sh -x /srcdir/.github/workflows/build_and_test.sh  or something close to that20:21
bb|hcbGot it, but that is going to be slow, no?20:22
Arsenwhat makes it slower?20:22
Arsena docker container is a ram fs overlayed over squashfs or whatever, in a namespace20:23
Arsenwe can save time on container setup if we add an action that daily builds and pushes a build and test env on ghcr.io or whatever20:23
bb|hcbYep, but the GH runner does not preserve state, so all that needs to be downloaded, unpacked, populated with the checkout to test, etc.20:24
Arsenand if we run it externally, it needs to run the same steps, plus installing extra packages before all that20:24
Arsenoh, wait, if we bring our own machines they can be preloaded20:25
ArsenI'm not sure how fast gh's intranet is20:25
bb|hcbThat is what I mean... Preloaded :)20:25
bb|hcbAnd if we assume that the build deps would not change on a daily basis, running the build and tests in a clone of the docker/bubble/chroot/whatever should not be slower than the build20:27
bb|hcbAFAIK a amd64 host can run an i386 container, so two VMs for the runners - one Alpine and one Devuan... But there should be something on top to safely manage them - I do not want to do custom stuff and track security problems afterwards20:29
Arsenyou could hack together any solution for the time being20:31
ArsenI'm not sure when I return, when I do I'll be measuring how fast or slow using gh runners is and will set up better infra if there is some20:32
bb|hcbI have only enjoyed the results of CI, never set one up, that is why I prefer to get advice from someone who already did...20:33
bb|hcbAnd amd64 VMs are avail, so the question is what to do on top20:34
lu_zeroskarnet: libudev-zero is really cool22:11

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!