*** benschubert has quit IRC | 00:09 | |
*** mohan43u has quit IRC | 02:30 | |
*** mohan43u has joined #buildstream | 02:30 | |
*** tristan_ has quit IRC | 05:20 | |
*** tristan_ has joined #buildstream | 05:38 | |
*** ChanServ sets mode: +o tristan_ | 05:38 | |
*** benschubert has joined #buildstream | 07:22 | |
*** hasebastian has joined #buildstream | 07:58 | |
*** santi has joined #buildstream | 08:42 | |
*** hasebastian has quit IRC | 09:44 | |
tristan_ | juergbi, benschubert ... at this point, I'm only adding documentation to !1901 | 10:19 |
---|---|---|
tristan_ | Implementation and tests all in place | 10:20 |
tristan_ | valentind, I expect I will find time to focus on your include related MRs this weekend, can you remind me which ones those are ? | 10:28 |
valentind | !1951 and !1954 | 10:29 |
valentind | Mmh, we do not have a bot. | 10:29 |
tristan_ | Yeah | 10:36 |
tristan_ | it's on vacation | 10:36 |
tristan_ | furlough | 10:36 |
*** tristan_ is now known as tristan | 11:09 | |
tristan | Ok, https://gitlab.com/BuildStream/buildstream/-/merge_requests/1901/ <-- no longer WIP, ready for review :) | 11:19 |
tristan | juergbi, please when you get a chance | 11:19 |
juergbi | ta, will review | 11:20 |
tristan | gah, looks like I have a crash generating the examples | 11:23 |
tristan | Anyway, that is rather unrelated to the branch, I will fix it, but please don't let that block any review :) | 11:24 |
tristan | unfortunately, it means I cannot link to a preview of the reference manual changes until that is fixed | 11:24 |
tristan | if this is an example about junction coalescing, I would prefer to remove it completely, and re-add other examples in a later commit | 11:25 |
* tristan wants to add a whole chapter to the user manual discussing reconciliation of conflicting junctions in one go | 11:25 | |
tristan | If that's alright | 11:25 |
tristan | juergbi, benschubert... anyone want to do the honors of closing https://gitlab.com/BuildStream/buildstream/-/merge_requests/1613 ? | 11:40 |
tristan | benschubert, from our conversation about pickle jobbers, I think my reading of your statements is that that issue should be closed. | 11:41 |
*** tristan has quit IRC | 11:48 | |
*** tristan has joined #buildstream | 11:52 | |
*** ChanServ sets mode: +o tristan | 11:52 | |
tristan | Hmmm, actually there is no bug in the examples | 11:53 |
tristan | juergbi, we seem to still have casd race conditions, I'm seeing "IsADirectoryError: [Errno 21] Is a directory: 'cas-tmpdir1bvRoF'" | 11:53 |
tristan | in https://gitlab.com/BuildStream/buildstream/-/jobs/602819791 when building docs | 11:54 |
tristan | https://buildstream.gitlab.io/-/buildstream/-/jobs/602869360/artifacts/public/elements/junction.html <-- new Junction docs | 12:15 |
tristan | https://buildstream.gitlab.io/-/buildstream/-/jobs/602869360/artifacts/public/format_project.html#project-junctions <-- New junctions related project.conf docs | 12:15 |
*** benschubert has quit IRC | 12:20 | |
*** hasebastian has joined #buildstream | 12:24 | |
*** hasebastian has quit IRC | 13:54 | |
*** hasebastian has joined #buildstream | 13:55 | |
douglaswinship | in the 1.9x plugin API, is there a method for changing a file's permissions? | 15:43 |
douglaswinship | I'm trying to update a plugin to work in 1.93.4 | 15:43 |
douglaswinship | And there's a line in the original version of the plugin. "os.chmod(filename, 0o755)" | 15:44 |
douglaswinship | It's the only one I can't see how to update. | 15:44 |
douglaswinship | I don't see any directory method that addresses file permissions, in https://docs.buildstream.build/master/buildstream.storage.directory.html | 15:44 |
WSalmon | umm, i think you can only set the exicute bit | 15:46 |
WSalmon | the "underlying filesystem" has effectively changed so im not sure how easy that is going to be todo | 15:47 |
WSalmon | juergbi, ^ | 15:47 |
juergbi | douglaswinship: WSalmon is correct in that currently only the executable bit is stored at all. is it the executable bit you want to set/clear or do you need something else? | 15:48 |
juergbi | based on the chmod line, I assume setting the executable bit is what you need | 15:48 |
juergbi | that's unfortunately indeed not supported yet by the Directory API | 15:49 |
douglaswinship | juergbi: unfortunately, I don't know what the original requirement is. So all i know is that 0o755 would be acceptable. I don't know which bits are actually essential. In the mean time though, if the executable bit(s) are the only ones I can set, then I might as well set those. | 15:50 |
juergbi | the only way would be to use import_single_file() to import an executable from the filesystem (can be a temp file) that has mode 0755 | 15:50 |
douglaswinship | how would I set the executable bit(s) | 15:50 |
douglaswinship | hrmmmm, interesting. | 15:50 |
douglaswinship | How would I create the temp file in the first place. Just use the standard temp-file functions? | 15:51 |
juergbi | yes, NamedTemporaryFile should work | 15:51 |
juergbi | (there are also buildstream utils helpers for temp files but they are not public) | 15:52 |
juergbi | hm, actually, there might be another option | 15:52 |
WSalmon | douglaswinship, do you have a link to the plugin, i would gues that its just the exercute bit thats important, juergbi is it really not part of the API, surely thats a oversite? can we just add it? | 15:52 |
douglaswinship | And then use import_single_file? Interesting. I assumed that import-file would only work for files that were already inside the project directory. Like when using a 'local' source. | 15:52 |
WSalmon | if this fix is easy then lets do that for now, but would like to do this properly sooner rather than later | 15:53 |
juergbi | douglaswinship: you can use os.fchmod(f.fileno(), 0o755), see https://gitlab.com/BuildStream/bst-plugins-experimental/-/blob/master/src/bst_plugins_experimental/elements/dpkg_deploy.py#L274 | 15:53 |
douglaswinship | WSalmon: it's in the collect_initial_scripts plugin | 15:54 |
douglaswinship | https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/blob/master/plugins/elements/collect_initial_scripts.py#L50 | 15:54 |
WSalmon | ah ok so it looks like https://gitlab.com/BuildStream/bst-plugins-experimental/-/blob/master/src/bst_plugins_experimental/elements/dpkg_deploy.py#L272 this patten should be fine for what you want | 15:55 |
WSalmon | but im still curious as to why the plugin api wont let use simple add exicute | 15:55 |
douglaswinship | Well that looks like it'll fix the issue. | 15:57 |
douglaswinship | It's odd though. Isn't that bypassing the whole 'virtual' part of the virtual directory, and reaching down into the underlying system? I'm surprised it works. | 15:57 |
douglaswinship | It does work though. The element builds :) | 15:59 |
WSalmon | douglaswinship, no, debiandir is a virtual dir and when you do debiandir.open_file you are making a speceal thing that is not a file in a realdiretory called debiandir | 15:59 |
douglaswinship | but there's a real file somewhere, right? That must be what os.chmod is operating on? | 16:00 |
juergbi | yes, the files are real, it's just the directory that is virtual | 16:01 |
juergbi | and files can't be modified after creation | 16:01 |
juergbi | (but can be replaced) | 16:01 |
douglaswinship | but by getting the fileno() output, doesn't that mean we're getting information about the underlying file? | 16:01 |
douglaswinship | That's what I meant about undermining the 'virtual' part of the virtual directory api | 16:02 |
juergbi | yes, we probably should think about whether we actually want to keep allowing that | 16:02 |
douglaswinship | good idea | 16:02 |
juergbi | however, as it's only available in a limited context, it should be safe | 16:02 |
WSalmon | juergbi, i presume this work with RE? i presume after the plugin has done its stuff then casd will notice the execution bit? | 16:03 |
juergbi | the newly written file won't actually be in the directory until the end of the context manager is reached | 16:03 |
douglaswinship | but as WSalmon says, I guess we should wait until we've implemented a chmod function of our own, before we close it out. | 16:03 |
juergbi | WSalmon: yes, with buildbox-run we anyway use the same code path for local and remote execution in this regard | 16:03 |
WSalmon | ah yes so you are doing the chmod in side `with debiandir.open_file(script, mode="w") as f:` i see | 16:04 |
WSalmon | :d | 16:04 |
WSalmon | :D | 16:05 |
WSalmon | thanks juergbi | 16:05 |
juergbi | WSalmon: we should still add a function to change the executable bit. have to think about what API makes most sense, keeping in mind that we probably want to support additional permission bits in the future | 16:05 |
WSalmon | `keeping in mind that we probably want to support additional permission bits in the future` you know me too well! hehe | 16:05 |
WSalmon | +1 | 16:05 |
*** santi has quit IRC | 17:45 | |
*** hasebastian has quit IRC | 18:03 | |
tristan | Do we really want plugins to be manipulating file attributes using python code at all ? | 18:04 |
tristan | My thoughts were that, we just want to preserve as much as possible of what happened in a sandbox, and add some requirements APIs (sandbox config extensions) asserting required attributes | 18:05 |
tristan | letting chmod or whatever do the work inside a sandbox | 18:05 |
tristan | While on the one hand, allowing a directory API to go and modify attributes appears to be harmless (at least for permission bits), it's a short stride from attributes to content, and we certainly don't want python code in plugins to modify/create content in artifacts (because the python code itself is not safe and guaranteed deterministic, like a sandbox is protected) | 18:07 |
tristan | But on the other hand, when we get to xattrs, people can be recording meaningful (and parsable) data in those attributes, and that strays into the 'content' territory too | 18:08 |
*** xjuan has joined #buildstream | 20:10 | |
*** xjuan has quit IRC | 22:47 |
Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!