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

qqX scripts are not relocatable #1

Closed
flexiondotorg opened this issue Oct 19, 2023 · 14 comments
Closed

qqX scripts are not relocatable #1

flexiondotorg opened this issue Oct 19, 2023 · 14 comments

Comments

@flexiondotorg
Copy link

flexiondotorg commented Oct 19, 2023

I run NixOS and there is no /bin/bash.

Please update the qqX scripts to use #!/usr/bin/env bash so they are portable.

@TuxVinyards
Copy link
Owner

@flexiondotorg very pleased to see you putting qqX through its paces. 😺

I have always remained a little sceptical about the env hashbang argument. Same with eval. Changing to env could upset some of the bash exec calls but I will have another look at this.

Probably putting notes in the main readme may be useful here. 👍

Notes on NixOS & non FHS distros were in the setup file, at the start:


#  Differences may be present in non FHS distros & may need manual installation  (in similar way to manually installing quickemu itself)

#  eg NixOS https://discourse.nixos.org/t/install-executable-at-usr-bin/21756   

#  See:  https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard   (default, next to quickemu: qqX_Std_Bin_Dir="/usr/bin") ```

@TuxVinyards
Copy link
Owner

I have tested #!/usr/bin/env bash & this seems to be running satisfactorily and I have changed the scripts. But I have also reversed the notes in the setup file, to show that this might need to be edited. We'll see how this goes.

@flexiondotorg if you would kindly try again in NixOS, this would be appreciated. If you could also adjust what should be line 74 in the qqX script to read ModVersion="0.1.01" instead of ModVersion="1.1.01" then this will also test the updater.

TuxVinyards added a commit that referenced this issue Oct 20, 2023
@TuxVinyards
Copy link
Owner

TuxVinyards commented Oct 20, 2023

I have partly reverted this change & added further notes to the installer.

There was something that didn't sit right:

Unless absolute references are used, we lose the ability to run process controls ....

I wish portability was an easier problem to solve but passing calls to bash through "/usr/bin/env" is not a full working solution. I am aware that this method is used on quickemu and appears not to have hit problems, yet. It may do later. There are restrictions that it imposes & I am not seeing this solution as a silver bullet.

There are some quite vocal comments from other people in this discussion on stackexchange:

https://unix.stackexchange.com/questions/29608/why-is-it-better-to-use-usr-bin-env-name-instead-of-path-to-name-as-my#29620

However, thank you again (@flexiondotorg) for testing and for pointing this out:

Only the main qqX script now needs to be tweaked. I am leaving the non-main scripts set to env which means the installer will run quite happily. Users of non-standard hierarchy systems are normally be well prepared to make minor tweaks and add shims.

I have also added an extra check for non-standard bash installs & will issue a point release shortly.

@TuxVinyards
Copy link
Owner

As an UPDATE to this:

I have now installed NixOS as a VM using Gnome Boxes. For me, I couldn't get the .iso to work using quickemu as the installer wouldn't even show, let alone run, unless I placed boot="legacy" in the .conf file (something to solve later).

The qqX installer will successfully run in Nix and alert users to the issues.

However, I note that a custom installer is actually needed to get quickemu itself to run on Nix:

https://github.com/NixOS/nixpkgs/blob/nixos-23.05/pkgs/development/quickemu/default.nix#L93

I think help will be needed from these package contributors if we want to get qqX running on Nix as it it not possible to install to /bin without a unique store ref first being established. From this side, I have now made changes to the installer that should enable a possible qqX package to theoretically update itself quite happily, so maintenance should (:crossed_fingers:) be quite easy:

👋 @ryantm @ianmjones @0x4A6F @heyimnova et al Please see commit 57dc28a

@alexschomb
Copy link

alexschomb commented Jun 26, 2024

I'm not fully sure if I understand the issue correctly. I just want to note that quickemu itselfs works perfectly fine and can be installed as a nixpkg on NixOS. Wouldn't it be sufficient to mention for NixOS users to install quickemu through nixpkg?

BTW there is also a nixpkg for quickgui. But I couldn't find a nixpkg for qqX? A possible nixpkg for qqX could mark quickemu as a dependency to automatically install it as well.

environment.systemPackages = with pkgs; [
    qemu
    quickemu
];

@TuxVinyards
Copy link
Owner

TuxVinyards commented Jun 26, 2024

Hi Alex.

If you think that you have time and the ability to put a qqX package together for the NixOS community, let me know and will be happy to help with any small changes.

Something to remember is that qqX now has 'builtins' so there is a certain independence that is possible too. Qemu and the other quickemu dependencies are needed only. Quickemu is already supplied. Changing the main qqX hashbang to where NixOS has located bash should make things start to work.

Have a look at the new 1.9 beta branch. I needed to make some changes to the .desktop file location, moved it from .local into /usr/share If you need a few lines there, let me know.

Caution

It's currently a bit of a delicate situation with the Quickemu project at the moment:

@flexiondotorg can be absent for months on end without so much as word, then suddenly without warning, in some kind of manic flurry, he starts making all kinds of snap decisions and changes to everything. And we are all left to pick up the pieces.

He has recently taken offence at my attempts at help with what I thought was a community project and accused me of being both critical of him and of being self-promoting.

He has decided yesterday, without a word, that I am now direct competition to quickgui and decided to remove qqX from the official alternatives list.

He now seems to be doing things only for the money too. He has recently taken down his catch line of ' for Linux with ❤️ ' and changed it to ' Please sponsor me ' .

Other people have written hundreds of commits and poured hours into this as a community project. People have become disappointed and annoyed with his current attitude and are now walking away ...

I was hoping that @flexiondotorg would add qqX to his recent NixOS work and provide qqX as well, especially considering the contributions that I have made to 'his' repo. And to make NixOS better ....

I don't think that hiding the idea of further choice from users is very productive, for anyone.

@alexschomb
Copy link

alexschomb commented Jun 26, 2024

Hi @TuxVinyards (Alex ☺️),

thanks for the honest and detailed explanation. I honestly just started using NixOS coming from Qubes and am still evaluating what distro to finally use. Turns out that after all those years Linux is still very complicated as a desktop environment - at least for my usecases. I really like both the concepts of Qubes (security by default) and NixOS (reproducible builds), but with both solutions I'm hitting very big roadblocks for crucial work requirements that I'm growing desperate of going back to privacy hell. I'm quite experienced with all sorts of *nix / BSD systems for servers, but apparently on the Desktop many things take much longer and hours of research/try&error which is too bad.

Back to topic, I wasn't aware of the project state of quickemu which sounds awful indeed. From what I understand qqX is highly dependent on quickemu and wouldn't work with virt-manager / qemu alone? I personally just chose quickemu because of major issues with installing Windows 11 with virt-manager that I can't solve on NixOS (tpm2 not supported, pcie-root not working). On the other hand spice is not working with NixOS and quickemu for me as well, so I can't even copy & paste - which is perfectly solved in Qubes OS. I really would love to see a merge of all those solutions that "just works" - something that qqX and quickemu propose. Seems like the Linux community is still not on the same page after all those years, one might call it it's strength, others wouldn't even try because of that. I really want it to work, but right now I'm hitting roadblocks everywhere.

Sorry for all the off topic and depressed words. I'm very glad that people like you exist, contribute to OpenSource and at least try to make things easier. I'll look if I can provide a nixpkg for qqX, but honestly right now I'm thinking about buying a MacBook which I stopped using 10 years ago just because I hate their product politics. (Not that MS would be any better..)

@TuxVinyards
Copy link
Owner

Sorry for all the off topic and depressed words.

Not at all. Sorry if I am not offering cheery solutions and you have ended up down that road ....

I feel sure things will sort themselves out in one way or another.

I'm very glad that people like you exist, contribute to OpenSource and at least try to make things easier.

Much thanks. 👍

@flexiondotorg
Copy link
Author

I unlisted qqX because of your repeated slurs about me, just as these comments demonstrate.

He now seems to be doing things only for the money too. He has recently taken down his catch line of ' for Linux with ❤️ ' and changed it to ' Please sponsor me ' .

I absolutely have not!

image

@TuxVinyards
Copy link
Owner

@ People

It's time to draw a line under all of this

He has recently taken down his catch line of ' for Linux with ❤️ '

Okay, the catch line was recently moved, several times in fact when looking at the commit history, so it appeared to disappear. My bad. But the rest still stands ...

It hasn't all been a waste of time though

It's only been people like me pointing out faults in the quickemu code that have needled enough to get things into a better shape for everyone.

The Quickemu code now has consistent indentation and improved readability. Over a thousand Shellcheck warnings and errors have now been sorted, which was no mean task. And it now has a pre-launch checker for disk errors too.

Much of Quickget has been improved as well. Lots more distros have been added to the database and you can now browse the distro home page without having to do a web search.

@flexiondotorg
Copy link
Author

Okay, the catch line was recently moved, several times in fact when looking at the commit history, so it appeared to disappear. My bad. But the rest still stands ...

That is not true.

@TuxVinyards
Copy link
Owner

so it appeared to disappear. My bad. But the rest still stands ...

@flexiondotorg
Copy link
Author

If that were true, which it is not, you'd be able to reference commits. You can't do that because it never happened.

@alexschomb
Copy link

Sorry for opening Pandora's box. Honestly, it's not worth the effort to discuss those details on who did what. What matters is the result / product. Just agree to disagree and keep going with both your projects. Thank you for both your amazing work! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants