boinc
boinc copied to clipboard
adding a method to patch linux idle check with required libraries.
Fixes # Linux checking being idle, A fix for #1187
Description of the Change
added a method that does the check without really replacing it with the existing poor check to be reviewed and added by a C++ developer. Alternate Designs
Release Notes
Fixing linux idle check by listening for input events in /dev/input/*
.
If this change is not user-facing or notable enough to be included in release notes you may use the string "N/A" here. -->
To this run correctly, the user running the client has to have read and execute permissions on /dev/input/* files, this can be done using setfacl
It seems I added the includes in the wrong place as android is still trying to include them
https://github.com/BOINC/boinc/pull/5354/files#diff-b710fcc072350b8bbb1bc13eb394da5cdbc0b0dfab019a93890ec10eadb41b86R180-R188
@0x0OZ, Client is failed to build as well, you need to include 'libevdev' here to install it on CI: https://github.com/BOINC/boinc/blob/eac3e3a2d9fc74b95290273ebe2e9b0b9b133997/.github/workflows/linux.yml#L53
@AenBleidd client still fails,
I need to add -levdev
flag to the MakeFile, but I am not sure how it's being built
@AenBleidd client still fails,
I need to add
-levdev
flag to the MakeFile, but I am not sure how it's being built
You need to add this linker flags somewhere to this file: https://github.com/BOINC/boinc/blob/master/configure.ac
@AenBleidd client still fails, I need to add
-levdev
flag to the MakeFile, but I am not sure how it's being builtYou need to add this linker flags somewhere to this file: https://github.com/BOINC/boinc/blob/master/configure.ac
Like I understand a single word 😅, I'll try to.
I made it worse with the last change to configure.ac
...
I will try to find out how this thing work.
@AenBleidd Linux client now builds successfully, But other clients still fail because they try to import libevdev when it should be included only in Linux env.
Hey @AenBleidd, I want to remind you of this pull, is there anything I need to do from my side?
@0x0OZ, it would be nice to fix this build for all other OSs...
Snap fails because libevdev is not being installed for it, it's only installed using apt, android fails because it tries to add the linker -levdev
.
I thought adding the weird condition I added should fix it but it didn't, for snap I couldn't yet figure out where the package installation should be added.
@0x0OZ, it would be nice to fix this build for all other OSs...
That's done, everything builds successfully now.
Codecov Report
Merging #5354 (ffc5f0d) into master (eac3e3a) will decrease coverage by
0.01%
. Report is 16 commits behind head on master. The diff coverage isn/a
.
Additional details and impacted files
@@ Coverage Diff @@
## master #5354 +/- ##
============================================
- Coverage 10.87% 10.87% -0.01%
Complexity 1068 1068
============================================
Files 279 279
Lines 36059 36061 +2
Branches 8335 8335
============================================
Hits 3920 3920
- Misses 31745 31747 +2
Partials 394 394
Snap failed, I thought it did not as at first it was skipped and didn't give an error.
@AenBleidd All success but snap, and I know what's wrong but I don't know what could be done because I can't reproduce the error and it's done in a container...
It seems_ that snap doesn't go over the libs path /usr/lib/x86_64-linux-gnu/
, because apt installs the missing lib there.
but I don't know what causes this.
I installed an Ubuntu VM and tried Ubnutu container inside that VM, Both recognized libevdev.so.2
.
I now have more time to work on this, Apart from the dead end for snap that I couldn't reproduce the bug and find a solution but it seems a docker thing? I have seen some issues that the libs installed during init weren't being recognized...
Also it doesn't detect ssh connection and it requires some privileges to access /dev/input/event*
files.
because of this I think it would be better to make a stand-alone tool for an idle timer for every linux system.
This would be a better approach because of the permissions issue.
because of this I think it would be better to make a stand-alone tool for an idle timer for every linux system.
And that is why we have this idea: #5226.
Since you're already have some experience with that, maybe you could work on this tool? IT would be also nice, if before starting a coding you could do an investigation first and present your solution in the ticket I just mentioned and afterwards start doing coding?
because of this I think it would be better to make a stand-alone tool for an idle timer for every linux system.
And that is why we have this idea: #5226.
Since you're already have some experience with that, maybe you could work on this tool? IT would be also nice, if before starting a coding you could do an investigation first and present your solution in the ticket I just mentioned and afterwards start doing coding?
Yes, I was thinking of doing that myself, I saw this ticket which gave me some insight. After doing enough investigation I will share what I will build there which should solve the problem in all mentioned cases and be easily adaptable.
@0x0OZ, nice! Thank you very much! In case you have any questions - feel free to reach out to me here or in BOINC Discord: https://discord.gg/wPRafUq