Conversation
|
Draft as untested and possibly a lot of nonsense... :-) |
|
Actually, fusepy has been removed from debian too. Not sure what to do to get it into debian now :-). |
|
closing in favour of #5 |
3523fb4 to
9e986c3
Compare
|
@brgl I have an initial implementation, can you review and test ? It may be a lot of nonsense too ;-) |
|
How did you test it? The following command-line |
I didn't test it. Oops.
Yeah, I added a commit to fix that. I guess we can squash them eventually once all the problems are ironed out. |
fuse-python depends on libfuse2 which is being phased out from most distros because FUSE 3 has been the stable upstream for nearly a decade and distros don't want to ship two major versions of the same library indefinitely. Because of this fuse-python is no longer packaged in Debian. Replace the usage of fuse-python with pyfuse3 which uses an inode-based async API backed by trio. Fixes: brgl#5 Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
- Accept and ignore -f/--foreground: pyfuse3 always runs in the
foreground since the event loop is managed by the caller via trio
- Silently drop 'nonempty': FUSE 3 removed this option; mounting over
a non-empty directory is unconditionally allowed
- Intercept entry_timeout=N and attr_timeout=N: these are no longer
FUSE mount options in FUSE 3; they are per-entry fields in
EntryAttributes, so parse them into globals used at entry creation
time instead of forwarding them to pyfuse3.init()
This makes the existing systemd ExecStart line work unchanged:
gpiod-sysfs-proxy /sys/class/gpio -f -o nonempty -o allow_other \
-o default_permissions -o entry_timeout=0 -o attr_timeout=0
Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
71b307d to
4ecf1f9
Compare
|
Most tests pass, there are a couple issues: |
|
sidenote, how do you run these tests ? I wonder if it would be possible for us to add them into GitHub actions CI. |
|
With yocto ptests. Use current meta-openembedded master and the following options: And the following layers: Run with runqemu and call |
Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
|
@brgl I added a quick fix for the tests. Can you retry the test suite please and report back ? I haven't had the time to run it yet. I will do if there are many more issues. |
|
Some of them got fixed: |
Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
|
@brgl I pushed another change. I didn't get the test setup created yet. I'll have another go at that shortly. |
Something's still missing. :/ Sorry I can't assist you more than that but I'm really swamped with work ATM. I probably won't make time for debugging it anytime soon. It would be best if you could create a VM with the options I posted above, that makes testing super easy. The results are in |
|
I tried to get claude to fix the problem and it says that pyfuse3 does not implement the poll notify mechanism fuse-python has. Is this correct? FWIW you call |
Yes, I think that is correct :/. I didn't really check this code much, it's untested from my side since I couldn't yet run the test suite (see #7) fuse-python exposes that through I think we need add this functionality to pyfuse3 upstream. I will try to open a PR/issue upstream: https://github.com/libfuse/pyfuse3 |
| self._event = True | ||
| self.parent.parent.notify_poll(self._pollhandle) | ||
| self._pollhandle = None | ||
| pyfuse3.notify_poll(self._poll_handle) |
There was a problem hiding this comment.
This function doesn't exist in pyfuse3. See #4 (comment)
There was a problem hiding this comment.
@brgl I opened libfuse/pyfuse3#139 to discuss it upstream.
|
FYI Claude offered to implement this as a solution to the above, does pyfuse3 accept AI-assisted contributions? I can't really spend time doing it myself but if it can do a good enough job, I can send it for review. |
I am happy to implement this as long as you can review the changes here and don;t mind waiting for me to have some "free time" :-) |
Sounds good! |
fuse-python depends on libfuse2 which is being phased out from most
distros because FUSE 3 has been the stable upstream for nearly a decade
and distros don't want to ship two major versions of the same library
indefinitely. Because of this fuse-python is no longer packaged in
Debian.
Replace the usage of fuse-python with pyfuse3 which uses an inode-based
async API backed by trio.
Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1125204