On Tue, Mar 14, 2023 at 1:31 AM Sandro <lists@xxxxxxxxxxxxx> wrote: > > On 27-01-2023 00:15, Sandro wrote: > >> I'm not sure I can commit to maintaining these myself, though. Let me > >> know if you're interested in helping out. > > Yes, orjson has been mentioned by @atim and @thunderbirdtr, the > > co-maintainers, in the PR. If that becomes available there might be some > > progress to be made in keeping up with upstream. > > > > Albeit, working with upstream appears to have been a mixed bag (reading > > between the lines in the comments). But since I have not been > > experiencing this first hand, I'd prefer the co-maintainers to elaborate. > > > <snip> > > > > I'll ponder my options a little longer and hope the co-maintainers will > > shed their light on the state of affairs. > > There has been some development regarding Bottles, which I would like to > share. > > First of all, with orjson coming closer to being included in Fedora > (many thanks to @gotmax23 and @decathorpe), we decided to give it > another go and try to get an up to date Bottles shipped in Fedora 38. > Currently it builds in Copr[1], but I haven't found the time to test it > and scrutinize the build. > > I also announced our intentions upstream[2]. Upstream has responded with > discouragement[3,4]. I'm still relatively new to packaging and don't > have a lot of experience dealing with upstream. So, I'm asking for some > input on how to react to upstream's response in a productive, > collaborative manner. > > I get the feeling there's a fundamental misunderstanding of the open > source paradigm in upstream's arguments. I'm hoping that we can convince > them by showing off an up to date and working Bottles package. It sounds like there's also some misconceptions about how Fedora works as a distro? Unpredictable release cycles are not a problem, adding new dependencies is neither, since packages can be updated and added in all Fedora releases at basically any point in time. Fedora is more like a rolling release in that regard, unlike debian or ubuntu, where AFAIK no new packages can be added (or updates other than bugfixes pushed) after a certain point of the release cycle. I also find it rather interesting that they think orjson is a "Fedora problem". The issues we have that currently prevent packaging it are *upstream bugs*. I have recently managed to find the source of the segfaults on s390x. Apparently the nice Rust bindings for CPython provided by "PyO3" are too high-level for orjson, so the project uses the low-level pyo3-ffi (i.e. unsafe Rust-to-C FFI) to interact with libpython. And the way orjson does this is partially unsound: https://github.com/ijl/orjson/issues/338 (Yes, this issue has been closed as "Fixed", but the "fix" actually changed nothing regarding big-endian compatibility, and the same segfault is still present.) The equivalent to the broken-on-big-endian interfaces have been *disabled* in the high-level PyO3 APIs on BE arches (because I reported that they were broken and unsafe one and a half years ago, which I also discovered when packaging pyo3 for Fedora): https://github.com/PyO3/pyo3/issues/1824 Yes, this exact problem only affects big-endian architectures, so I assume that neither Bottles (flathub does not ship stuff for s390x) nor orjson (yeet a """fix""" and then apparently ignore the issue) care about it, but the same code that "works" in x86_64 relies on undefined behaviour and / or things that are "implementation defined" in C compilers, so the fact that they currently work is more or less just a happy coincidence (i.e. GCC and LLVM agreeing on bitfield memory layout across different architectures). I'm currently trying to submit a change to PyO3 to make these APIs work on big-endian architectures as well: https://github.com/PyO3/pyo3/pull/3015 Once this change is available, orjson could drop its bundled copy of unsafe code from pyo3-ffi (which it apparently does to use APIs that are marked as private ...) and use the new APIs directly. I have already verified that this works as expected across all Fedora architectures in COPR. Again, Bottles developers might not care, but this is the reason why linux distributions exist. Because *we need to care* about these nitty-gritty low-level things to *make things work*, even if upstream developers don't (or cannot). (And since more projects than just Bottles are starting to depend on orjson, having it work correctly on all our architectures is more important than just making Bottles work on x86_64, which seems to be the only thing the project cares about - maybe rightfully so, given that they depend on Wine.) Fabio _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue