You are not logged in.

#1 2023-11-01 01:12:32

johnca1
Member
Registered: 2023-10-11
Posts: 5

AUR helper for ROOT users (not SUDO) (bash)

Hello everyone, I want to invite the community to try an AUR package manager (AURoot).

was created for ROOT users, it is unlikely that a SUDO user will achieve satisfactory results, do not try it.

Do not run the program as ROOT, you will be prompted for the password when necessary.

With this program you should be able to:
- download, compile and install the package from a link in one step, more or less ;-)
- install packages compiled by the program on one or more computers.
- update AUR packages installed on the device.

If you could send me translations into your language, I would be very grateful, this will be included in the program as soon as possible.

I hope this helps :-)

https://gitlab.com/johnca2/auroot

Offline

#2 2023-11-01 03:21:19

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,201

Re: AUR helper for ROOT users (not SUDO) (bash)

It must me Halloween, because that is frightening. 

Pray tell, why?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2023-11-01 08:53:18

seth
Member
Registered: 2012-09-03
Posts: 58,717

Re: AUR helper for ROOT users (not SUDO) (bash)

It looks like a super-convoluted way to not use PACMAN_AUTH and use su instead of sudo despite sudo being installed - or OP hasn't found the "-i" switch.

@johnca1, do you generate these scripts using some semi-AI generator?

Offline

#4 2023-11-01 10:28:34

johnca1
Member
Registered: 2023-10-11
Posts: 5

Re: AUR helper for ROOT users (not SUDO) (bash)

ewaller wrote:

It must me Halloween, because that is frightening. 

Pray tell, why?

I don't understand the question, but if you're trying to say that this is a joke, no, it's not.

I already understood, it is because of the use of ROOT, it shouldn't be scary because the only lines that use ROOT are the same or similar to this:

su -c "pacman -Syu --needed ${dep_missing[@]} ${header_missing[@]}"
su -c "pacman -U ${install_pkg[@]}"

Last edited by johnca1 (2023-11-01 10:48:18)

Offline

#5 2023-11-01 10:31:41

johnca1
Member
Registered: 2023-10-11
Posts: 5

Re: AUR helper for ROOT users (not SUDO) (bash)

seth wrote:

It looks like a super-convoluted way to not use PACMAN_AUTH and use su instead of sudo despite sudo being installed - or OP hasn't found the "-i" switch.

@johnca1, do you generate these scripts using some semi-AI generator?

every line of command came out of my keyboard. the answer is no.

Offline

#6 2023-11-01 13:16:15

seth
Member
Registered: 2012-09-03
Posts: 58,717

Re: AUR helper for ROOT users (not SUDO) (bash)

I think ewaller misunderstood the subject - i did before briefly looking at the script.
It kunda suggests an approach where you're cinstantly logged in as root and, because makepkg will refuse to operate as UID0, wrap it into a regular-user session.

Did you understand the rest of my post and explicit "su pacman" calls are absolutely not required here and preferring su over sudo is down to a single environment variable?

Offline

#7 2023-11-01 13:39:59

johnca1
Member
Registered: 2023-10-11
Posts: 5

Re: AUR helper for ROOT users (not SUDO) (bash)

seth wrote:

I think ewaller misunderstood the subject - i did before briefly looking at the script.
It kunda suggests an approach where you're cinstantly logged in as root and, because makepkg will refuse to operate as UID0, wrap it into a regular-user session.

Did you understand the rest of my post and explicit "su pacman" calls are absolutely not required here and preferring su over sudo is down to a single environment variable?

It seems that you are trying to demonstrate that the program is useless, in fact what I myself do with my creations before publishing.

First run the program in a virtual machine and then I will be happy to answer any questions.

To observe all the operations use this line:

bash -x auroot.sh --1

Offline

#8 2023-11-01 13:48:49

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: AUR helper for ROOT users (not SUDO) (bash)

Makepkg, when used properly, will already prompt for a password when necessary and it will use sudo or su to escalate privileges as needed based on what is available on the system.  There is no need for *any* command to be explicitly run as root for handling AUR packages.

Though this does lead to an idea for a worthwhile project: a patch to makepkg to also check for `doas` as an alternative to `sudo` before falling back on `su`.  Though I've not searched at all to see if this is already underway somewhere.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#9 2023-11-01 15:10:01

seth
Member
Registered: 2012-09-03
Posts: 58,717

Re: AUR helper for ROOT users (not SUDO) (bash)

The script /is/ useless, at least when it comes to the "use su instead of sudo" part.


@Trilby, you can just export PACMAN_AUTH or set it in your makepkg.conf
(Though obviously could be defaulted upstream)

Offline

#10 2023-11-01 21:30:55

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,472
Website

Re: AUR helper for ROOT users (not SUDO) (bash)

Trilby wrote:

Though this does lead to an idea for a worthwhile project: a patch to makepkg to also check for `doas` as an alternative to `sudo` before falling back on `su`.  Though I've not searched at all to see if this is already underway somewhere.

PACMAN_AUTH was introduced to avoid layer upon layer of checking for an appropriate program.

Offline

Board footer

Powered by FluxBB