Add AUR helper option in Applications menu#4447
Add AUR helper option in Applications menu#4447unkver wants to merge 1 commit intoarchlinux:masterfrom
Conversation
Adds yay and paru as installable AUR helpers via the Applications menu
|
Few technical concerns:
|
|
Got it, I guess I'm not good at writing services - will try to fix as soon as possible. |
|
I would probably argue that this os not essential to get a system up and running and can be considered a post installation step altogether. Especially as this goes very much into the user space by installing go or rust systemwide. At this point it doesn't fit the "installing a working system" but rather a "setup an installed system". |
|
I mean, all stuff under Applications are "not essential to get a system up and running" such as print service Bluetooth etc. and are all made to reduce the time for the post install setup. |
|
Yes it is a thin line that's why it is sometimes blurry to decide what would be a good system installation component versus a nice to have. The current list contains setups for peripheral support and base services. Whereas AUR is a tool that is used by users to manage software that doesn't per se have anything to do with a system setup. That's why is better to have an issue raised first to discuss instead of raising a PR right away |
I was also thinking about creating a PR to add yay/paru to the app menu. I think this would be a great improvement, since many people install yay/paru immediately after installation. We already have a PR for this. Maybe we can discuss it here? If @Torxed doesn't mind this topic. :) |
|
Happy to discuss it here, also this was a well formulated explanation of why AUR doesn't fit the picture, for different reasons #3043 |
|
Yay and paru are just tools, no different philosophically from installing a firewall or a print service, which are already in the menu. The concern about AUR security makes sense, but we're not adding AUR support - just the helper tool itself, which the user explicitly opts into. As for the fix, should I wait to hear whether the feature direction is agreed upon first, or do I start regardless? |
|
Re-read the wiki page on AUR helpers (https://wiki.archlinux.org/title/AUR_helpers). The very first thing on it is this:
So the wiki's stance isn't "don't mention them" - it's "here they are, here's how they work, here's why you need to be careful". archinstall can take exactly the same stance: show the option, put that warning in the preview word for word, never on by default. If the wiki can do that without officially recommending anything, so can we. And yay is just a binary, it doesn't pull in any AUR package on its own. That's still entirely the user's call after install. git is a fair analogy - nobody blames archinstall for the repos people clone later. One thing that changes the calculus on the technical side: there's no need to compile from source. Both yay and paru have -bin PKGBUILDs in AUR maintained by the authors themselves - they download prebuilt tarballs from the project's GitHub releases and just install -Dm755 them, no actual compilation. So archinstall can run makepkg -si yay-bin as the newly-created user inside the chroot (not on first boot) with a sudoers rule that lives and dies in the chroot session. No go/rust toolchain, no first-boot service, no persistent state on the target system. base-devel + git is the only build-time overhead. git stays as a runtime dependency of yay-bin, but base-devel can be removed automatically right after the build (skip the removal if the user explicitly added base-devel via Additional packages). pacman tracking is preserved. That removes the "installing a toolchain systemwide goes into user space" concern and also massively simplifies @unkver's current implementation. Gating condition: the option should only be available if at least one regular (non-root) user is configured. yay/paru invoke makepkg internally for every AUR package, and makepkg refuses to run as root - without a non-root user the helper is dead weight, plus the install itself needs that user to run makepkg -si yay-bin. So no user = hide/disable the menu entry, and the validator should catch it for --silent/--config flows (same pattern as bootloader layout validation). My take: --advanced only, preview quotes the wiki warning verbatim, default off. Anyone who opts in after reading that warning knows what they're getting. The demand is obviously there (this PR, #3043, and from my own experience it comes up constantly). Mirroring what the wiki already does seems like the cleanest way to give people the option without making it look like archinstall officially recommends it. |
|
Holy, I completely forgot that -bin variants exist! Guess should've RTFM before making this unnecessary service-making stuff... I will start trying to implement that - thx @Softer |
|
#4075 this won't be allowed and it works perfectly fine at least using modified |
|
Thanks @h8d13 - followed the trail to #4075 and #3043, appreciate the context. My earlier comment on this PR laid out the concrete path (yay-bin/paru-bin PKGBUILDs - prebuilt tarballs, no Go/Rust on the target, --advanced only, default off, verbatim wiki warning in the preview, menu entry hidden unless a non-root user is configured). Won't re-argue it here. Didn't know about grimaur before your pointer - took a look and it's a genuinely good fit here. Pure Python, available as grimaur-git, nothing to compile. Arguably the most archinstall-native of the three and a clean third menu option alongside yay-bin / paru-bin. @Torxed - your "not sure that's changed" from #4075 leaves the door cracked. Given the concrete proposal above (and that the two historical objections - toolchain residue, ambiguous endorsement - now have direct answers), would you be open to revisiting? Happy to close this out if the answer is still no, but rather ask with the proposal on the table than leave @unkver mid-redesign uncertain. @unkver - sensible to pause until there's a signal. |
|
My main argument was that yes a lot of hardware needs this regardless and they expect it to work post installation. But building stuff like this is non-trivial, I had to modify |
I'm always open for new ideas, I've therefore sent out a mail to the dev mailing list (to reach a wider audience) asking for feedback on previous decisions regarding this topic: (optional) AUR helper in archinstall It's been a controversial topic in the past, so buckle up, I'm not expecting this to be an easy topic to navigate ^^ |
I've been using this tool starting from 2023, and I saw myself constantly doing the same thing that takes my time - installing an AUR helper like yay or paru. I thought abt it and I guess a lot of people do that anyways, so here I decided to try contributing to an open source project for the first time.
PR Description:
This adds yay and paru as installable options under the Applications menu in archinstall. And yes, it seems to preview correctly too - under the main menu and under the applications menu.
The way I implemented this is kind of tricky - since makepkg can't be ran as root (and we are root during the archinstall), it makes a service that installs the helper the first time the user boots up their new Arch system, then deletes itself (the service). You can read more in the comments that I wrote.
Tests and Checks
I've tested it a lot in a virtual machine under a lot of circumstances (user picks yay/paru, doesn't pick anything, doesn't make a user), and it works great so far!
It took me a while to understand how this tool works (I took heavy inspiration from the audio option in Applications), and I do understand that there might be a safer way to do this, but this is my attempt to learn and do something useful at the same time :-)