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

Allow makepkg on sudo via nobody to fix AURA root limitations #776

Open
ghost opened this issue Jun 26, 2022 · 14 comments
Open

Allow makepkg on sudo via nobody to fix AURA root limitations #776

ghost opened this issue Jun 26, 2022 · 14 comments

Comments

@ghost
Copy link

ghost commented Jun 26, 2022

I can still able to install AUR packages manually under root...

git clone <repo>
chown -R nobody <package-dir>
cd <package-dir>
sudo -u nobody makepkg
pacman -U *.zst

Note: On missing dependencies, I could able to fix that by installing missing dependencies
pacman -S --asdeps <missing-dep-list>
And then trying makepkg process again with success.

This method will overcome makepkg root limitations. And I would love to see this incorporating into aura.

@fosskers
Copy link
Owner

Aura 4 no longer has limitations involving root, so this should be an auto-fix as soon as it's released.

@ghost
Copy link
Author

ghost commented Sep 5, 2022

So... Is there any reason you're holding up 4.0 release mate?

@fosskers
Copy link
Owner

fosskers commented Sep 5, 2022

Because I moved across the world and just started a new job. It will come as soon as I'm able.

@ghost
Copy link
Author

ghost commented Sep 6, 2022

Because I moved across the world and just started a new job. It will come as soon as I'm able.

Amazing. Offtopic, but congrats. Hope you enjoy your new job mate.

@fosskers
Copy link
Owner

fosskers commented Sep 6, 2022

Thanks for your patience 🙏 Getting this out as soon as possible is obvious still big in my mind.

@fosskers
Copy link
Owner

Give it a shot!

cargo install aura-pm --version 4.0.0-alpha3

@ghost
Copy link
Author

ghost commented Sep 24, 2022

#[/home/mpk/.cargo/bin]# ./aura -A extension-manager
aura :: Resolving dependencies...
aura :: AUR packages:
 extension-manager
aura :: Proceed? [Y/n] 
aura :: Preparing build directories...
aura :: Building extension-manager...
==> ERROR: Running makepkg as root is not allowed as it can cause permanent,
catastrophic damage to your system.
aura :: Package failed to build, citing:

  makepkg failed.

aura :: Action cancelled.

Works fine outside root btw. But it still has recurring missing dependency installation issue. I still had to install missing deps myself.

(1/1) Arming ConditionNeedsUpdate...
aura :: Preparing build directories...
aura :: Building extension-manager...
==> Making package: extension-manager 0.3.2-2 (Sat 24 Sep 2022 01:18:03 AM)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Missing dependencies:
  -> appstream-glib
==> ERROR: Could not resolve all dependencies.
aura :: Package failed to build, citing:

  makepkg failed.

aura :: Continue building other packages? [Y/n] 
aura :: Done.
$[~/.cargo/bin]$

@fosskers
Copy link
Owner

Yup, -A is not expected to be ran with root.

@ghost
Copy link
Author

ghost commented Sep 26, 2022

Yup, -A is not expected to be ran with root.

You can actually de-elivate privilege escalations through -u nobody. It should then work as it is not on root.

@fosskers
Copy link
Owner

I still need to as some "true" root detection in general.

@ghost
Copy link
Author

ghost commented Sep 26, 2022

I still need to as some "true" root detection in general.

Welp, for pushing compiled binaries or shared libraries, ofc I can understand. But to compile from source via AUR pkgbuilds, programs like makepkg won't function, is what I'm saying.
Atleast they need de-escalation of privilege.

@fosskers
Copy link
Owner

fosskers commented Sep 26, 2022

You mean when managing a system with only a root user on it, yeah?

@ghost
Copy link
Author

ghost commented Sep 26, 2022

You mean when managing a system with only a root user on it, yeah?

Yep. My ultimate scenario / goal is to build & install AUR packages even on chrooted Arch ISO. pacstrap can install from pac repos. So why not an AUR wrapper can...✌️
Currently, I can do that manually (1st comment) & it works, but can't automate it for multiple AUR packages, unless I maintain a script.

@fosskers
Copy link
Owner

Understood, I'll make sure this is possible.

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

No branches or pull requests

1 participant