Skip to content
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

feat: make search path for BinaryFinder customizable. #43968

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

exi
Copy link
Contributor

@exi exi commented Mar 3, 2024

Summary

This feature is important for nextcloud running on distributions like NixOS, where all the standard
search paths do not exist.

I chose to make the list overridable instead of appendable because having a default list that always gets
applied might cause reproducibility issues on distros like NixOS where we have multiple versions
of the same binary at the same time.

This fixes issue #43922

Checklist

@exi exi force-pushed the custom-binary-search-paths branch 2 times, most recently from 68c348b to 2d5a7fb Compare March 3, 2024 21:53
@exi exi marked this pull request as ready for review March 3, 2024 22:00
@exi exi force-pushed the custom-binary-search-paths branch 2 times, most recently from e18dbbf to a00f68b Compare March 4, 2024 13:47
@exi
Copy link
Contributor Author

exi commented Mar 5, 2024

@kesselb i force pushed a change to address the workflow failures. It seems to need another review/approval now

@joshtrichards joshtrichards added enhancement 3. to review Waiting for reviews labels Mar 5, 2024
@exi exi force-pushed the custom-binary-search-paths branch 8 times, most recently from dee2942 to 30d13cd Compare March 6, 2024 13:30
@exi
Copy link
Contributor Author

exi commented Mar 6, 2024

@kesselb every time, all the tests checking out submodules fail for branches that don't originate from github.com/nextcloud. Is this something I'm doing wrong, or are the CI checks just funky?

I don't know what I did to cause the errors in the failing actions.

@skjnldsv
Copy link
Member

skjnldsv commented Mar 7, 2024

@exi the cypress will fail, it's broken for forks.

@skjnldsv skjnldsv requested review from a team, ArtificialOwl, icewind1991 and nfebe and removed request for a team March 7, 2024 21:31
@skjnldsv skjnldsv added this to the Nextcloud 30 milestone Mar 7, 2024
@kesselb
Copy link
Contributor

kesselb commented Sep 16, 2024

Hi @exi,

I hope you are still with us, I'm sorry it's taking so long 🙈

We migrated to spdx copyright headers meanwhile, and therefore the new test file needs an update.

Example:

/**
 * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */

And then another rebase would be nice to have a recent CI run and the remove the merge commits.
Fyi we pushed to your branch/fork through GitHub.

@exi exi force-pushed the custom-binary-search-paths branch 2 times, most recently from ee24bc5 to 2785c56 Compare September 16, 2024 21:16
@exi
Copy link
Contributor Author

exi commented Sep 16, 2024

@kesselb I applied one suggestion and rebased it. should be good now.

@exi
Copy link
Contributor Author

exi commented Sep 17, 2024

@kesselb fixed the new type error and reverted it to the "$result === null" check as before.

@exi exi force-pushed the custom-binary-search-paths branch 2 times, most recently from d5a074c to af19d53 Compare September 17, 2024 09:07
@kesselb
Copy link
Contributor

kesselb commented Sep 17, 2024

@exi I fear we need another rebase/squash because "Update tests/lib/BinaryFinderTest.php" is not a conventional commit 🙈

@exi
Copy link
Contributor Author

exi commented Sep 17, 2024

@kesselb done

@kesselb
Copy link
Contributor

kesselb commented Sep 18, 2024

I rebased the branch via GitHub to pull a fix for our CI pipeline.

@kesselb
Copy link
Contributor

kesselb commented Sep 18, 2024

The failing CI is wip, nothing needs to be done here for now.

I will rebase the pr again, once our issues with the CI are resolved.

(Please ping me if I haven't done that within one week)

@icewind1991
Copy link
Member

rebased

@kesselb kesselb force-pushed the custom-binary-search-paths branch 2 times, most recently from 96b9dbb to 2b71212 Compare September 20, 2024 14:24
@kesselb
Copy link
Contributor

kesselb commented Sep 20, 2024

I force-pushed to your branch to fix some code style issues.
We updated our coding-style just yesterday.

This feature is important for nextcloud running on
distributions like NixOS, where all the standard
search paths do not exist.

Also added tests.

This fixes issue nextcloud#43922

Co-authored-by: Daniel <mail@danielkesselberg.de>
Signed-off-by: Reno Reckling <e-github@wthack.de>
@AndyScherzinger AndyScherzinger merged commit 3009da3 into nextcloud:master Sep 20, 2024
161 of 164 checks passed
Copy link

welcome bot commented Sep 20, 2024

Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configurable binary path for Mailer/etc
8 participants