Skip to content

Conversation

@GuillaumedeVolpiano
Copy link
Contributor

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.

@GuillaumedeVolpiano GuillaumedeVolpiano changed the title Update lib/Command/Setup.php execute() to add a reference to freebsd Update the SetupWizard to take into account FreeBSD systems. Jun 6, 2023
@GuillaumedeVolpiano
Copy link
Contributor Author

I have now updated both BinaryFinder getArch() and SetupWizard hasBundledBinaries() to reflect the above changes.

Copy link
Contributor

@n-connect n-connect left a 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..

if (strpos($arch, 'aarch64') === 0) {
return 'aarch64';
}
if (strpos($arch, 'amd64') == 0 && strpos($os, 'FreBSD') == 0) {
Copy link
Contributor

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'

Copy link
Contributor Author

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.

Comment on lines 36 to 38
if (strpos($arch, 'amd64') == 0 && strpos($os, 'FreeBSD') == 0) {
return 'fbsd_amd64';
}
Copy link
Member

@icewind1991 icewind1991 Jun 8, 2023

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

Copy link
Contributor Author

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>
@icewind1991 icewind1991 merged commit f6c084b into nextcloud:main Jun 23, 2023
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.

3 participants