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

--asroot is no longer an option #131

Open
nshp opened this issue Dec 21, 2014 · 13 comments
Open

--asroot is no longer an option #131

nshp opened this issue Dec 21, 2014 · 13 comments

Comments

@nshp
Copy link

nshp commented Dec 21, 2014

As of Pacman 4.2, --asroot is no longer an option. makepkg must be run as a normal user. Perhaps packer should give its own error message when run as root?

@JotaRandom
Copy link

Yeah, if packer s for install packages from AUR and makepkg not support root user, then why packer support it?, yeah I aggre in a silly nbut informative message about not supporting root.

@nubzzz
Copy link

nubzzz commented Dec 29, 2014

This is also a problem that I am encountering.

@pawel-tomkiel
Copy link

Yeah, it emerged to me after todays update. I can't finalize update with all dependencies in AUR

@f3rno
Copy link

f3rno commented Dec 29, 2014

+1, although running as a normal user works just fine.

@mgalgs
Copy link

mgalgs commented Dec 29, 2014

To get around this, just run packer as a normal (non-root) user.

See also: archlinuxfr/yaourt#67

@f3rno
Copy link

f3rno commented Dec 30, 2014

Pull request #132 fixes this, would be good to get it in since many people must be experiencing this problem.

@xmw
Copy link

xmw commented Jan 1, 2015

what about

# diff -Naur /usr/bin/packer*
--- /usr/bin/packer     2014-08-11 10:43:24.000000000 +0200
+++ /usr/bin/packer.xmw 2015-01-01 23:39:05.706239397 +0100
@@ -328,7 +328,9 @@

   # Installation (makepkg and pacman)
   if [[ $UID -eq 0 ]]; then
-    makepkg $MAKEPKGOPTS --asroot -f
+    id pacman >/dev/null 2>/dev/null || useradd -r -d /var/empty pacman
+    chown -R pacman:pacman .
+    su -c "makepkg $MAKEPKGOPTS -f" pacman
   else
     makepkg $MAKEPKGOPTS -f
   fi

@ghost
Copy link

ghost commented Jan 2, 2015

@xmw golly, i wish github had a comment voting option. i'd vote your patch up so hard.

i'd love to see that implemented as well.

@oshazard
Copy link

oshazard commented Jan 2, 2015

EDIT: Added workaround to apacman wrapper
@xmw
Thank you for such an elegant fix!
I was going to implement AUR user in the .install which is less optimal.

@mil
Copy link

mil commented Jan 16, 2015

+1 thanks @xmw

@simon-thorpe
Copy link

+1 @xmw I've now migrated to using apacman instead since the developer implemented this patch.

@despairblue
Copy link

👍

@RaederDev
Copy link

Thank you @xmw that fixed my update problems.

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