dorothy icon indicating copy to clipboard operation
dorothy copied to clipboard

Hermetic Installation

Open autolyticus opened this issue 2 years ago • 9 comments

Forgive me if this is already mentioned somewhere, but is it possible to install and use dorothy in a hermetic way (similar to how xxh works?

The reason I am asking this is because there are some machines where I cannot install packages or get sudo privileges, but looks like the installation process of dorothy for example setup-util-* implicitly depends on the package manager of the host. It would be nice if it could install it onto the .local/bin or whatever.

Thanks!

autolyticus avatar May 03 '22 12:05 autolyticus

Most setup-util-* commands will provide a GITHUB or DOWNLOAD option, which will install to the XDG bin directory, if preferred by the utility installer or if the others failed.

Which dependency are you having an issue with?

Support could be added to setup-util to allow for non-root installs if support is detected (such as sudo being rejected, or explicit support for say a --user flag by the package manager), however that would have to be done via a PR because all Dorothy users so far are on machines where sudo is required/preferred for the package manager.

One thing I am considering is having it so that any sudo command that is executed is outputted by Dororhy before it is run, such that the user is aware of specifically what they are being prompted for. Many commands do this already, but not all.

If you could provide more context around the exact hiccup in the installation flow, that'll be useful.

balupton avatar May 03 '22 14:05 balupton

Well, one of the first things I saw after installing dorothy was the message which told me to install setup-util-bash and that's what I tried to do. I did notice that the other ones which were required for the dorothy installation itself (like sd, jq were installed successfully)

autolyticus avatar May 03 '22 17:05 autolyticus

Well, one of the first things I saw after installing dorothy was the message which told me to install setup-util-bash and that's what I tried to do. I did notice that the other ones which were required for the dorothy installation itself (like sd, jq were installed successfully)

Ah okay. I'm actually revising the bash installer this week. The problem is that on the latest macOS, bash v3 is the system version, which has several peculiarities. I did some experimentation last week and have determined its possible to have the latest bash installed without homebrew, so that is what will occur once I get these changes out.

balupton avatar May 03 '22 17:05 balupton

The changes are now pushed that will ensure bash is the latest version, even on macOS installations without brew. Majority of the magic is here:

https://github.com/bevry/dorothy/commit/8123332b96346a580e75193d21f262df1b625f48#diff-d573874fa5a55cc4f0142a321778c784dc5bed295c016d66ea73512e0a3dd79f

balupton avatar May 03 '22 18:05 balupton

That said, if you still do not have brew, the installation of bash-completions there will cause brew to be installed. I'll work on that later.

Edit: done https://github.com/bevry/dorothy/commit/a88df67347db6e5b27417ac4c4fa300d31583a36

balupton avatar May 03 '22 18:05 balupton

Which OS are you on? As the bash completions will likely still prompt you for sudo if you are on non-macos.

If you can send a PR for setup-util that will avoid sudo in your environment, then that will be great.

balupton avatar May 03 '22 19:05 balupton

Sorry for not mentioning the platform details: this was on a typical Linux server (Debian 10 x86_64) where I have the inability to use sudo.

I do have a macOS laptop as well which these fixes will anyway be useful for so thanks a lot!

On a side note: I really like the idea and vision of Dorothy, but most of the times I've tried to install dorothy, something or the other has been broken :(

I know it's a lot of moving parts and please excuse the unsolicited suggestion but maybe consider moving active development to another branch? Or perhaps the official install instructions should point at something like https://github.com/bevry/dorothy/archive/refs/tags/0.5.0.tar.gz so that the installation experience would be consistent and not a surprise.

autolyticus avatar May 03 '22 20:05 autolyticus

Regarding the PR, I will definitely try to see what I can do if I get some time this week.

autolyticus avatar May 03 '22 20:05 autolyticus

I really like the idea and vision of Dorothy, but most of the times I've tried to install dorothy, something or the other has been broken :(

I know it's a lot of moving parts and please excuse the unsolicited suggestion but maybe consider moving active development to another branch? Or perhaps the official install instructions should point at something like https://github.com/bevry/dorothy/archive/refs/tags/0.5.0.tar.gz so that the installation experience would be consistent and not a surprise.

Completely agree. Right now I'm 100% focused on getting the public launch milestone completed once that is done this week or next, these rough and volatile aspects of Dorothy will be sorted.

In the meantime, feel free to add my on Signal +14084186557 and ping me if you have any issues and I'll help out immediately.

balupton avatar May 03 '22 22:05 balupton

@reisub0 besides #142 and outdated documentation, Dorothy should now be stable and reliable enough for wider adoption.

balupton avatar Sep 03 '22 18:09 balupton

Going to close this issue as I believe the trial, install, and xdg modes support this request.

balupton avatar Sep 07 '22 00:09 balupton