-
-
Notifications
You must be signed in to change notification settings - Fork 17.5k
percona-server_8_0: fix compiling on darwin #401322
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
percona-server_8_0: fix compiling on darwin #401322
Conversation
|
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'm not sure why the patch includes a license. How about using fetchpatch instead?
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.
sorry it took me a while to get back to this!
this patch is adapted from a patch to mysql80 in nixpkgs[1] which a change in mysql 9.2 backported to 8.0[2][3], hence the license. there's an extra bit in there to apply the changes to range_optimizer/index_range_scan_plan.cc. i could split this up so i instead reference the patch out of mysql80 and then only add the range_optimizer/index_range_scan_plan.cc bit as a separate patch to percona. i just couldn't find any other examples of packages using patches from other packages and it felt better to keep things together since it's one logical change. no strong preference on my end though.
[1] https://github.com/NixOS/nixpkgs/blob/33949e56e5d67374ca143da77bcc8ab994c4a2e6/pkgs/servers/sql/mysql/libcpp-fixes.patch
[2] #374591 (comment)
[3] mysql/mysql-server@3a51d7f
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 do not think we have to split up the patch into the smallest possible parts just by principle, this can also affect readability. So I think your approach is feasible.
Another reason for splitting the patch into the base patch you adapted, and the changes you made yourself on top, could be making it easier to pull in future changes from mysql as well. But instead you can just optionally reference the base patch by URI in the comment on top of the patch that currently only holds the license.
One minor license nitpick is that, when distributing modified cersions of GPL source code, you need to clearly state that you've modified the source (2.a), adding your own copyright notice there.
Currently percona-server_8_0 fails to compile on Darwin for a few reasons. First it hits an error due to adding multiple copies of OpenSSL[1] which Homebrew has fixed and attempted to upstream[2][3]. After addressing that, it fails to compile due to the removal of std::char_traits<uchar> in LLVM 19. This has already been patched in mysql80[4], but I couldn't find a precedent for grabbing patches from another package, so I opted to adapt the patch instead. The Percona-specific changes are minimal and could be extracted into a separate patch if that's desirable. [1] https://perconadev.atlassian.net/jira/software/c/projects/PS/issues/PS-9641 [2] percona/percona-server#5537 [3] Homebrew/homebrew-core#204799 [4] NixOS#374591
8faa4e3 to
321d3db
Compare
|
Successfully created backport PR for |
|
Git push to origin failed for release-25.05 with exitcode 1 |
Currently percona-server_8_0 fails to compile on Darwin for a few reasons. First it hits an error due to adding multiple copies of OpenSSL[1] which Homebrew has fixed and attempted to upstream[2][3]. After addressing that, it fails to compile due to the removal of
std::char_traits<uchar>in LLVM 19. This has already been patched in mysql80[4], but I couldn't find a precedent for grabbing patches from another package, so I opted to adapt the patch instead. The Percona-specific changes are minimal and could be extracted into a separate patch if that's desirable.[1] https://perconadev.atlassian.net/jira/software/c/projects/PS/issues/PS-9641
[2] percona/percona-server#5537
[3] Homebrew/homebrew-core#204799
[4] #374591
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.