Skip to content

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

Merged
merged 22 commits into from
Aug 25, 2025
Merged

Add GNU/Hurd support #1931

merged 22 commits into from
Aug 25, 2025

Conversation

CarterLi
Copy link
Member

@CarterLi CarterLi commented Aug 24, 2025

@osalbahr
Copy link
Contributor

It works. Thx!

image

@CarterLi CarterLi requested a review from Copilot August 24, 2025 14:30
Copy link
Contributor

@Copilot Copilot AI left a 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.

@CarterLi CarterLi requested a review from Copilot August 24, 2025 15:19
Copy link
Contributor

@Copilot Copilot AI left a 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.

Copy link
Contributor

@yelninei yelninei left a 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"))
Copy link
Contributor

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

Copy link
Member Author

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?

Copy link
Contributor

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 \nif it does not.

I'll see if I can make this work

Copy link
Member Author

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.

@CarterLi CarterLi merged commit 7611d67 into fastfetch-cli:dev Aug 25, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] Add support for Debian GNU/Hurd
3 participants