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

mariadb: fix mytop script #64646

Merged
merged 1 commit into from Aug 1, 2019
Merged

mariadb: fix mytop script #64646

merged 1 commit into from Aug 1, 2019

Conversation

aanderse
Copy link
Member

Motivation for this change
~/nixpkgs> nix-shell -p mysql.client --run mytop
/tmp/nix-shell-632-0/rc: /nix/store/fzfx1sr6pfrqhqy7n7jh89sbxr4v7da5-mariadb-client-10.2.17-bin/bin/mytop: /usr/bin/perl: bad interpreter: No such file or directory

@volth Is this an acceptable way to fix this? Do I need propagatedBuildInputs here?

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@aanderse
Copy link
Member Author

@GrahamcOfBorg build perlPackages.DBDmysql

@aanderse
Copy link
Member Author

Any darwin folks who could take a look at perlPackages.DBDmysql possibly? @matthewbauer Am I mistaken in thinking you're a darwin person?

@aanderse
Copy link
Member Author

@lilyball As somone who has expressed interest on making things better on the darwin side (https://discourse.nixos.org/t/suggestion-github-label-for-prs-for-darwin-packages/3458) is there any chance I could get you to take a look at the failure here? ❤️

@lilyball
Copy link
Member

I don't know exactly what's going on, but the error is coming from mysql.connector-c. Specifically, the mysql_config tool it vends has two issues:

  1. The perl package tries to pass the --embedded flag to it but it doesn't support this flag, and
  2. The mysql_config --libs output has that stray /nix/store/9mf51m54d2hmj78h43n9pi31wnzdn3v5-libiconv-osx-10.12.6/lib/libiconv.dylib argument with no flag prefix.

For contrast, the mysql_config vended from the root mysql package supports --embedded and does not have that stray argument.

The first error may be ignorable, but the second is obviously a problem, and I don't know what's going on there. libiconv is one of the buildInputs to the mysql.connector-c derivation, but aside from its presence there, I don't know why it's showing up in the --libs output in this fashion. Maybe the maintainer @globin might have an idea.

@aanderse
Copy link
Member Author

@lilyball Thanks for taking a look, I really appreciate it!

I have no access to a mac so I can't do anything about this. I really hate to make this a platforms.linux only fix, but I just don't know how else to proceed... As we get closer to 19.09 freeze the number of available options decreases.

@lilyball
Copy link
Member

lilyball commented Jul 22, 2019

I do not think "Cylance incorrectly flags this as a problem" is justification for "make this a linux-only fix". Anyone affected by this should be complaining to Cylance about their false positives. Antivirus false positives can happen on any platform.

@aanderse
Copy link
Member Author

@lilyball Well this error isn't related to the Cylance problem. As far as anyone else reporting the issue I assume either mytop isn't used but anyone using nixpkgs, or this problem is/was a regression on all platforms. Given the nature of the fix I assume the former.

My fix works on platforms.linux but as mentioned I would rather not make the fix conditional on platforms.

@nixos-discourse
Copy link

This pull request has been mentioned on Nix community. There might be relevant details there:

https://discourse.nixos.org/t/mytop-mysql-and-darwin/3524/1

@lilyball
Copy link
Member

Oh I'm terribly sorry, I thought I was in a different tab. I retract my comment entirely.

@aanderse
Copy link
Member Author

@lilyball No problem 😄

@aanderse aanderse force-pushed the mytop branch 3 times, most recently from 16a636f to 8989e63 Compare July 25, 2019 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants