abduco: add bug/feature patches, add mirror#286124
Conversation
There was a problem hiding this comment.
Please do not substitute all parts of the URL and just write them literal.
Also fetching from GitHub and SourceHut should use the corrosponding fetcher which also does not need to be substituted.
There was a problem hiding this comment.
This doesn’t make sense to me. Those fetchers do not support mirrors, but the project is mirrored. Both fetchers are just wrappers for the common-denominator of fetchzip anyhow which does support mirrors. I have been in situations where I was wanting to hack on a Nix package, but one of the mirrors was down, but multiple mirrors were not specified.
There was a problem hiding this comment.
I don't think we support that currently but fetching from GitHub should be done via fetchFromGitHub to support possible future, better URLs.
There was a problem hiding this comment.
It’s the same URL & doesn’t support mirroring elsewhere so it’s a bad solution for many applications. The more mirrors we see off Microsoft GitHub, the more resilient the packaging can be from a single source of network failure.
There was a problem hiding this comment.
Well, no. Those are not straight up mirrors and the exact hash can depend on the git version used.
There was a problem hiding this comment.
What do you think happens more… mirrors going down or a Git and NAR hash conflict that would cause wrong code to be shipped? I’ll spoil it & tell you that it will be servers going down. These projects explicitly state that they are using mirrors & shipping the same code to the multiple repos for accessibility & resilience. Microsoft GitHub goes down or times out several times a month in my region of the world (& it’s very annoying). I would not just honoring the maker’s mirror remark but also encouraging others to make sure their code isn’t centralized in one spot for when the server is down, the net is down, or a new sanction is raised.
This eliminates clutter in the user’s $HOME directory
> You can always fetch the current code base from the git repository > located at GitHub or SourceHut. The owner says the source code will be offered in two places so the code fetching should reflect the mirror & it adds resiliance.
|
These patches were quite a surprise to me: |
|
@tilpner https://patch-diff.githubusercontent.com/raw/martanne/abduco/pull/22.patch Code looks like it just adds priority fallbacks to XDG spec. Would you have access to the XDG vars if started as a user process instead of a system process? Where did you expect it to be, |
I don't know if user services have access to I want a system-level service to start a session that I can then later connect to from an interactive ssh session. For that, abduco needs to pick the same socket directory during both the service session and the ssh session. Specifying the default
My workaround is actually setting Agreeing on the other items in the fallback order is more difficult, since it would require either changing the environment on the ssh session to unusual values, or unsetting them entirely to reach a later fallback. Even though I can attach to my session again, I'm not convinced nixpkgs should be carrying this patch, as it might require other users with similar service/ssh splits to rediscover this patch addition upon upgrading a system to 24.05. At least, it should probably come with an edit to the |
|
I’m still not quite getting the ‘why’, just your ‘how’ @tilpner… Whose home directory are you attaching to if you set it to I would like a better understanding of this since I wanted to look into switching a NixOS module to I still feel like XDG is correct behavior as most applications adhere to it with users also expecting it & this seems more like an edge case. But as I also want this in the near-term future for a system service, I would like to understand as my naïve perspective sees this usage of |
First: I'm not saying $HOME is the philosophically correct place for the socket to be, or that it needs to be universal. I'm open to suggestions, this is just my workaround because the patch broke attachment for me.
My service is running as a separate user with a home directory in /var/lib/ for storing its state. Yes, this does not work if you have no $HOME. But since I'm using ssh (mosh) to attach to the abduco session, I need to have a separate user for key management anyway (not required, but easier). And the service has state, so if I automatically create a home directory for it, then I don't need to separately set up its permissions.
I agree that the socket directory shouldn't be persistent (impermanence helps here, but obviously you can't rely on it in nixpkgs). $HOME is used as a convenient place to put it, that has already been created and had its permissions configured.
That works, if you create the Which brings us back to |
|
The issue I see with this is that it seems you want to list sessions from another users which seems a bit weird. In the past, I have written my own new bin scripts for a module that gets added to my ‘real user’ or system environment named like Even still, if XDG vars aren’t set, why would abduco not be falling thru to (Just to reiterate, I’m interested in knowing how this is best done like you for a similar use case I bet, but I have yet to get around to it) |
That's not what I meant. I think
Yes, that would work well, except for discoverability of sessions.
If we decide that uncluttering the home directory is worth having a non-standard socket location, then we should document that decision in the manpage (and possibly release notes).
That's the problem: it does, but only for the service. Let's walk through the fallback in both cases: With the patch, the fallback order is (for some, a user-specific directory will be created inside):
After booting the server, the service starts and launches an abduco session. None of When I attach from an ssh session, The problem here is not the fallback order in isolation, but that the session creation and attachment happen with different environment variables present. |
|
Do you think it should always start in |
|
That would reduce surprise by being more consistent, but what about when there is no The wrapper script must only set |
This eliminates clutter in the user’s $HOME directory
martanne/abduco#22
Exit codes not reported on dead sessions
martanne/abduco#45
Send down pixels for window sizing so terminal emulators like kitty can use it display images
martanne/abduco#62
Project owner explicitly states code is available on both GitHub & SourceHut, so a mirror was added--this also adds resilience.
Description of changes
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.