[pacman-dev] [PATCH] Remove --asroot switch from makepkg.
I've found --asroot to be kind of a hand holding hindrance so I decided to remove it. Here's the patch if anyone is interested. Cheers.
Loui wrote:
I've found --asroot to be kind of a hand holding hindrance so I decided to remove it. Here's the patch if anyone is interested. Cheers.
Actually I was thinking the same when I looked at the fakeroot stuff recently. So +1 from me. It looks like there are quite a few other flags that could go as well, at least in my opinion.
Loui wrote:
I've found --asroot to be kind of a hand holding hindrance so I decided to remove it. Here's the patch if anyone is interested. Cheers.
Any chance you can rebase this againt the current git master version? For example, the usesudo option no longer exists there, while it appears in your patch.
On Sun, 15 Jun 2008 23:54:07 +0200 Xavier <shiningxc@gmail.com> wrote:
Loui wrote:
I've found --asroot to be kind of a hand holding hindrance so I decided to remove it. Here's the patch if anyone is interested. Cheers.
Any chance you can rebase this againt the current git master version? For example, the usesudo option no longer exists there, while it appears in your patch.
Here's the patch rebased against master.
Loui wrote:
On Sun, 15 Jun 2008 23:54:07 +0200 Xavier <shiningxc@gmail.com> wrote:
Loui wrote:
I've found --asroot to be kind of a hand holding hindrance so I decided to remove it. Here's the patch if anyone is interested. Cheers.
Any chance you can rebase this againt the current git master version? For example, the usesudo option no longer exists there, while it appears in your patch.
Here's the patch rebased against master.
As a bonus, you also fixed the bug I was going to point out. Can we go back to the "permanent, catastrophic damage" rather than "serious damage". The first one sounds more disastrous and people running makepkg as root should be scared!
On Mon, 16 Jun 2008 14:05:02 +1000 Allan McRae <mcrae_allan@hotmail.com> wrote:
Loui wrote:
On Sun, 15 Jun 2008 23:54:07 +0200 Xavier <shiningxc@gmail.com> wrote:
Loui wrote:
I've found --asroot to be kind of a hand holding hindrance so I decided to remove it. Here's the patch if anyone is interested. Cheers.
Any chance you can rebase this againt the current git master version? For example, the usesudo option no longer exists there, while it appears in your patch.
Here's the patch rebased against master.
As a bonus, you also fixed the bug I was going to point out. Can we go back to the "permanent, catastrophic damage" rather than "serious damage". The first one sounds more disastrous and people running makepkg as root should be scared!
Maybe we could make it even scarier than "permanent, catastrophic" for comic relief. Heheheh. "permanent, catastrophic damage to your system, home, family, pets, the planet, and or universe."
On Sun, Jun 15, 2008 at 11:34 PM, Loui <louipc.ist@gmail.com> wrote:
On Mon, 16 Jun 2008 14:05:02 +1000 Allan McRae <mcrae_allan@hotmail.com> wrote:
Loui wrote:
On Sun, 15 Jun 2008 23:54:07 +0200 Xavier <shiningxc@gmail.com> wrote:
Loui wrote:
I've found --asroot to be kind of a hand holding hindrance so I decided to remove it. Here's the patch if anyone is interested. Cheers.
Any chance you can rebase this againt the current git master version? For example, the usesudo option no longer exists there, while it appears in your patch.
Here's the patch rebased against master.
As a bonus, you also fixed the bug I was going to point out. Can we go back to the "permanent, catastrophic damage" rather than "serious damage". The first one sounds more disastrous and people running makepkg as root should be scared!
Maybe we could make it even scarier than "permanent, catastrophic" for comic relief. Heheheh.
"permanent, catastrophic damage to your system, home, family, pets, the planet, and or universe."
So when this patch first got sent, I saw it as something that was just provided to the list for convenience, not really a candidate for merging. Do you guys think this should make it into makepkg? I'm not against removing options from makepkg, I just hadn't heard too many complaints about this option after we added it and people got used to it. -Dan
Dan McGee wrote:
So when this patch first got sent, I saw it as something that was just provided to the list for convenience, not really a candidate for merging. Do you guys think this should make it into makepkg? I'm not against removing options from makepkg, I just hadn't heard too many complaints about this option after we added it and people got used to it.
Probably not. Using makepkg as root should be inconvenient. I'd say the proportion of (new) users who would not see the warning message would be quite high, especially as it will quickly be replaced by build output.
On Wed, 18 Jun 2008 08:25:14 -0500 "Dan McGee" <dpmcgee@gmail.com> wrote:
So when this patch first got sent, I saw it as something that was just provided to the list for convenience, not really a candidate for merging. Do you guys think this should make it into makepkg? I'm not against removing options from makepkg, I just hadn't heard too many complaints about this option after we added it and people got used to it.
Well, my opinion is that makepkg shouldn't hinder an admin user any more than say `rm -r /*` or other similar wonderfully destructive commands. Besides, --asroot is yet another flag, adds more code and complexity, and can hinder root users from even doing small non-build tasks. I use makepkg as another user most of the time, but I'll use it as root every once in awhile and I found --asroot to be a bit annoying. Warnings are nice, but when you start to block functionality it really becomes a babysitting feature.
On Wed, Jun 18, 2008 at 5:00 PM, Loui <louipc.ist@gmail.com> wrote:
Well, my opinion is that makepkg shouldn't hinder an admin user any more than say `rm -r /*` or other similar wonderfully destructive commands. Besides, --asroot is yet another flag, adds more code and complexity, and can hinder root users from even doing small non-build tasks. I use makepkg as another user most of the time, but I'll use it as root every once in awhile and I found --asroot to be a bit annoying.
Warnings are nice, but when you start to block functionality it really becomes a babysitting feature.
I would never use it as root, and I agree with Allan that just issuing a warning without stopping will probably have a much lower impact on new users. But I also agree with Loui that this is just a babysitting feature that adds code and complexity. This does not really fit with Arch general philosophy and user target. On the other hand, the code and complexity of this option compared to the overall code and complexity of makepkg is minor, and it is an efficient way to educate new users. So I am a bit divided now.. I don't care much either way.
On 18/06/2008, at 11:00 PM, Loui wrote:
Well, my opinion is that makepkg shouldn't hinder an admin user any more than say `rm -r /*` or other similar wonderfully destructive commands. Besides, --asroot is yet another flag, adds more code and complexity, and can hinder root users from even doing small non-build tasks. I use makepkg as another user most of the time, but I'll use it as root every once in awhile and I found --asroot to be a bit annoying.
Warnings are nice, but when you start to block functionality it really becomes a babysitting feature.
+1 I never actually run makepkg as root (ie. logged in as root), but I do use sudo, and "sudo makepkg --asroot" is just stupid.
On Wed, Jun 18, 2008 at 10:29 AM, Sebastian Nowicki <sebnow@gmail.com> wrote:
On 18/06/2008, at 11:00 PM, Loui wrote:
Well, my opinion is that makepkg shouldn't hinder an admin user any more than say `rm -r /*` or other similar wonderfully destructive commands. Besides, --asroot is yet another flag, adds more code and complexity, and can hinder root users from even doing small non-build tasks. I use makepkg as another user most of the time, but I'll use it as root every once in awhile and I found --asroot to be a bit annoying.
Warnings are nice, but when you start to block functionality it really becomes a babysitting feature.
+1
I never actually run makepkg as root (ie. logged in as root), but I do use sudo, and "sudo makepkg --asroot" is just stupid.
You do realize this is the *exact* same thing as running as root, which is what this option was meant to notify you about and scare you away from? -Dan
On Wed, Jun 18, 2008 at 10:40:30AM -0500, Dan McGee <dpmcgee@gmail.com> wrote:
You do realize this is the *exact* same thing as running as root, which is what this option was meant to notify you about and scare you away from?
actually running makepkg as root would be something reasonable in case makepkg would support building in chroot (like pacman-g2's makepkg does). in that case the flow would be: su/sudo -> chroot -> drop privileges -> fakeroot but as long as this is not the case, running makepkg as root or _any other valuable user_ makes no sense. i think this is a point many makepkg user miss: for example if the buildscript has 'rm -rf ~' in build(), then it's possible that the problem will be bigger if you run it as your own user! to sum up: we encourage users to run makepkg as root, because this way it can drop privileges as a separate user where makepkg can't do anything problematic. maybe this is something worth porting from pacman-g2, it's your decision.
On Wed, Jun 18, 2008 at 06:02:37PM +0200, Miklos Vajna wrote:
but as long as this is not the case, running makepkg as root or _any other valuable user_ makes no sense.
i think this is a point many makepkg user miss: for example if the buildscript has 'rm -rf ~' in build(), then it's possible that the problem will be bigger if you run it as your own user!
Yeah I agree there. Losing my user data would be just as catastrophic as losing the entire system, yet makepkg does nothing to protect against that. I still run builds as a regular user occaisionally though.
to sum up: we encourage users to run makepkg as root, because this way it can drop privileges as a separate user where makepkg can't do anything problematic.
This is how aurbuild works, and I think someone patched srcpac to run builds as nobody. I don't think it's something that should be part of makepkg though. I'd try to keep makepkg itself as simple and straight forward as possble.
On Wed, Jun 18, 2008 at 01:29:23PM -0400, Loui <louipc.ist@gmail.com> wrote:
to sum up: we encourage users to run makepkg as root, because this way it can drop privileges as a separate user where makepkg can't do anything problematic.
This is how aurbuild works, and I think someone patched srcpac to run builds as nobody. I don't think it's something that should be part of makepkg though. I'd try to keep makepkg itself as simple and straight forward as possble.
ah, great. though i would suggest allocating a separate user for this purpose, like our fst or gentoo's portage user. i guess Arch uses nobody for webservers as well, so nobody has write access to forum attachements and such. ps: now if you call me paranoid, you are right. i *am* paranoid. :)
On 18/06/2008, at 11:40 PM, Dan McGee wrote:
On Wed, Jun 18, 2008 at 10:29 AM, Sebastian Nowicki <sebnow@gmail.com> wrote:
On 18/06/2008, at 11:00 PM, Loui wrote:
Well, my opinion is that makepkg shouldn't hinder an admin user any more than say `rm -r /*` or other similar wonderfully destructive commands. Besides, --asroot is yet another flag, adds more code and complexity, and can hinder root users from even doing small non- build tasks. I use makepkg as another user most of the time, but I'll use it as root every once in awhile and I found --asroot to be a bit annoying.
Warnings are nice, but when you start to block functionality it really becomes a babysitting feature.
+1
I never actually run makepkg as root (ie. logged in as root), but I do use sudo, and "sudo makepkg --asroot" is just stupid.
You do realize this is the *exact* same thing as running as root, which is what this option was meant to notify you about and scare you away from?
-Dan
Yes, what I meant was that "sudo ... --asroot" is redundant. You are explicitly saying that you want to be root by using sudo, and on top of that you have to explicitly tell makepkg that you want to be root.
participants (7)
-
Allan McRae
-
Allan McRae
-
Dan McGee
-
Loui
-
Miklos Vajna
-
Sebastian Nowicki
-
Xavier