-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
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
msmtp: need ping from inetutils on darwin #202277
base: master
Are you sure you want to change the base?
Conversation
@dbaynard , do you mind trying this out on darwin? |
I'll do it this weekend — thanks |
Build failure for @nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/rfiax9m3dkj3hiicf2rw9yb2mlw8cc96-msmtp-scripts-unresholved-1.8.22
source root is msmtp-scripts-unresholved-1.8.22
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "installPhase" }
installing
@nix { "action": "setPhase", "phase": "fixupPhase" }
post-installation fixup
[resholve context] : invoking resholve with PWD=/nix/store/lb9gw3xpjgdx85kr75wgxcn75n13iv3y-msmtp-scripts-1.8.22
[resholve context] RESHOLVE_LORE=/nix/store/7a6896z5881d5652igdya8ccgamn3v1y-more-binlore
[resholve context] RESHOLVE_EXECER=cannot:/nix/store/lb9gw3xpjgdx85kr75wgxcn75n13iv3y-msmtp-scripts-1.8.22/bin/msmtpq
[resholve context] RESHOLVE_INPUTS=/nix/store/lb9gw3xpjgdx85kr75wgxcn75n13iv3y-msmtp-scripts-1.8.22/bin
[resholve context] RESHOLVE_INTERPRETER=/nix/store/49wn01k9yikhjlxc1ym5b6civ29zz3gv-bash-5.1-p16/bin/bash
[resholve context] /nix/store/v2bax5kvfvzcc1lddsdqn0fa1al0zf16-resholve-0.8.1/bin/resholve --overwrite bin/msmtp-queue
Overwrote '/nix/store/lb9gw3xpjgdx85kr75wgxcn75n13iv3y-msmtp-scripts-1.8.22/bin/msmtp-queue'
[resholve context] RESHOLVE_LORE=/nix/store/66zzqry5h6i6qsxq1mbblxvdyfqx8lsa-more-binlore
[resholve context] RESHOLVE_EXECER='cannot:/nix/store/8fzckwvpd2nhsnw4fza2kfw90h3vn1il-msmtp-binaries-1.8.22/bin/msmtp cannot:/nix/store/ywm8r5lkhf7di5y59afpfbmd9ly7lgim-netcat-gnu-0.7.1/bin/nc cannot:/nix/store/px7jn0sr110w7m2wk5iqrpzhd8zhjw9a-inetutils-2.4/bin/ping'
[resholve context] RESHOLVE_FAKE='external:'\''systemd-cat'\'''
[resholve context] RESHOLVE_FIX='$MSMTP:'\''msmtp'\'''
[resholve context] RESHOLVE_INPUTS=/nix/store/8fzckwvpd2nhsnw4fza2kfw90h3vn1il-msmtp-binaries-1.8.22/bin:/nix/store/v8y9sd43ygc27x4808asaymbk5nn4ild-coreutils-9.1/bin:/nix/store/nran2s5ihfjmpvhf832dqz3msr73hbhc-gnugrep-3.7/bin:/nix/store/ywm8r5lkhf7di5y59afpfbmd9ly7lgim-netcat-gnu-0.7.1/bin:/nix/store/3y79k8g2khvjaq68ljds2ff8d32rq7zb-which-2.21/bin:/nix/store/px7jn0sr110w7m2wk5iqrpzhd8zhjw9a-inetutils-2.4/bin
[resholve context] RESHOLVE_INTERPRETER=/nix/store/49wn01k9yikhjlxc1ym5b6civ29zz3gv-bash-5.1-p16/bin/bash
[resholve context] /nix/store/v2bax5kvfvzcc1lddsdqn0fa1al0zf16-resholve-0.8.1/bin/resholve --overwrite bin/msmtpq
ping -qnc2 -w10 debian.org >/dev/null 2>&1 || return 1
^~~~
/nix/store/lb9gw3xpjgdx85kr75wgxcn75n13iv3y-msmtp-scripts-1.8.22/bin/msmtpq:215: There is not yet a good way to resolve 'ping' in Nix builds.
Next steps:
- Your feedback will help clarify the best course of action.
- See the workaround in the issue.
https://github.com/abathur/resholve/issues/29 (Also: your instructions in the issue were clear, but you got to the changes before I did!). For context, I ran this: nix build -L 'github:peterhoeg/nixpkgs/msmtp_darwin#msmtp-scripts' Again, I can take a look at this over the weekend and try to get a version that works. |
Turns out I strongly recommend using the fix that works for me: switching to use I'm extremely annoyed with the situaiton here, and I appreciate this is a) not your fault, and b) an inevitability of a complex distributed system, like maintaining nixpkgs, so I don't blame anybody (including the resholve maintainer) either. Please bear with me (or just skip the next paragraph). RantI've spent more time than I would have liked trying to figure out resholve, and as someone new to it, I must say it is a nightmare. I had to spelunk multiple repositories to try to figure out what it was doing, (going three deep, through resholve, then to binlore, and then to yallback, only to land with what could perhaps have been recursive sql queries into a bundled sqlite database). In addition to intransigent code, the documentation itself admits it is not suitable; it's also not visible! I eventually found nixpkgs/pkgs/development/misc/resholve at master · NixOS/nixpkgs and it doesn't help — the examples are less than useless (broken nix syntax). I see that resholve allows nix-naive packages to be integrated into nixpkgs, and we all benefit (I really like that it moves runtime failures to build time); however in its While I'm not willing to spend any more time trying to figure out the resholve API, I am willing to help get this merged. So if you want me to persist with enabling ping, you (or someone else) will have to spend a while explaining it, to me. Thanks for your time, and patience. |
Sorry you had a rough weekend. I wish you'd dropped by the issue for help earlier--it was linked at the end of the error message you quoted two days ago. I managed to pull something together tonight to get you unblocked. I've cut a release and opened a PR for the update. For reference, this is what you'll need to take advantage of it once the update is in: abathur@44fb86b @dbaynard I'd like to circle back with you in private about the rant, though I'll also follow up to address a bit of this in public for later travellers. |
The issue here both isn't strictly that resholve can't handle ping. It's that some executables need setuid security wrappers which are handled outside of the normal function of basic Nix. Nix will give resholve an apparently-fine path to the executable, but it won't actually be runnable because it isn't wrapped. It's a trap no matter how we slice it. I'll be overjoyed to throw this Nix-specific stumbling block out of resholve once there's a solution on the Nix/nixpkgs side. For now, it's there to keep people from making broken packages, raise awareness about the problem, help me gather information about where it crops up, and hopefully shake a creative solution loose. |
As mentioned privately, I didn't have a rough weekend! Thanks for the concern. I'm happy to pick up the testing, if necessary, once the update to resholve has been merged. |
@peterhoeg resholve update is merged, so you should be able to use I noticed while discussing with David that (AFAICT) the ~regression here happened in peterhoeg@70220e7, which undid the hard-set Since I've been able to use the Nix-built ping commands without the setuid wrapper, I suspect that only some flags in ping require setuid. Both of the ping commands in |
@ofborg build msmtp msmtp.passthru.tests |
Description of changes
Further to #195532.
This is untested but was faster than explaining what I meant.
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes