-
Notifications
You must be signed in to change notification settings - Fork 53
Update the SetupWizard to take into account FreeBSD systems. #273
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
Conversation
|
I have now updated both BinaryFinder getArch() and SetupWizard hasBundledBinaries() to reflect the above changes. |
n-connect
left a comment
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.
Thanks, coming back the the original question could you test your code in the PR? I'm just reading them as of now..
lib/BinaryFinder.php
Outdated
| if (strpos($arch, 'aarch64') === 0) { | ||
| return 'aarch64'; | ||
| } | ||
| if (strpos($arch, 'amd64') == 0 && strpos($os, 'FreBSD') == 0) { |
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.
Please fix it to 'FreeBSD'
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 have indeed tested it. And just retested it ;) It works, at least on my machine.
lib/BinaryFinder.php
Outdated
| if (strpos($arch, 'amd64') == 0 && strpos($os, 'FreeBSD') == 0) { | ||
| return 'fbsd_amd64'; | ||
| } |
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.
Should be more generic to replace this with
if (str_starts_with($os, 'FreeBSD')) {
$arch = 'fbsd_' . $arch;
}and replace the returns above with $arch = ....
that way the freebsd logic also works with other architectures
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.
Done (and tested, at least on FreeBSD/amd64).
…built freebsd binary Signed-off-by: GuillaumedeVolpiano <xavier.dectot@gmail.com>
…tems and hasBundledBinaries() to check into the folder corresponding to the reported architecture rather than just in x86_64. Wizard still fails afterwards on non-systemd systems. Signed-off-by: GuillaumedeVolpiano <xavier.dectot@gmail.com>
Signed-off-by: GuillaumedeVolpiano <xavier.dectot@gmail.com>
…eeBSD as per icewind911's suggestion. Signed-off-by: GuillaumedeVolpiano <xavier.dectot@gmail.com>
4036214 to
7e7588e
Compare
This only solves the first issue of using the setup wizard on freebsd, by clarifying the message about the presence of pre-built binaries.
To make the wizard run fully in FreeBSD, PR#256 needs to be merged, and then hasSystemd() will need to be amended to cover the FreeBSD rc system.