-
Notifications
You must be signed in to change notification settings - Fork 555
Add GNU/Hurd support #1931
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GNU/Hurd support #1931
Conversation
netif_linux now uses linux specifics which do not work on GNU.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works on the guix i686 and x86_64 hurd. Thanks.
Probably would be good to squash some of my commits into 1 and adjust the commit message for the rest.
@@ -84,6 +84,20 @@ const char* ffDetectInitSystem(FFInitSystemResult* result) | |||
ffStrbufSubstrAfterLastC(&result->version, ' '); | |||
} | |||
} | |||
else if (ffStrbufEqualS(&result->name, "guile")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not add this as it is just misleading and wrong
Instead it would be better to try to support shepherd instead but this can be done in a followup at a later time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't use guix. Google said that guile is a programing language. Is guile here the name of guile interpreter process?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the main shepherd program is a guile script that starts with
#!/path/to/guile --no-autocompile
....
Right now the guile version is being detected which is not the version of the initsystem.
The correct path to the shepherd executable is in /proc/1/cmdline
but it is the string after the first 2 null bytes.
There is also a minor problem that on non-linux systems shepherd --version
has an additional extra line in the output:
Linux:
shepherd --version
shepherd (GNU Shepherd) 1.0.6
Hurd:
shepherd --version
System lacks support for 'signalfd'; using fallback mechanism.
shepherd (GNU Shepherd) 1.0.6
I guess this can be detected by checking if the line starts with shepherd
and skipping the first \n
if it does not.
I'll see if I can make this work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We did similar special handling for python. Perhaps we can use the same logic.
…and related fields ... by accurately handling process names with spaces or special characters.
Based on work of https://codeberg.org/Yelninei/fastfetch
Fixes #1895
@yelninei @osalbahr Please test!