[pacman-dev] makepkg patch to preserve environment variables (when "-s"ing)

Aaron Griffin aaronmgriffin at gmail.com
Tue Jul 29 11:37:06 EDT 2008

On Tue, Jul 29, 2008 at 2:41 AM, Xavier <shiningxc at gmail.com> wrote:
> On Tue, Jul 29, 2008 at 8:28 AM,  <rob at kingofnerds.net> wrote:
>> it just changes every "sudo" to "sudo -E"
>> (useful when using $http_proxy)
>> version 3.1.4
>> http://rob.kingofnerds.net/makepkg_sudo.patch
> I also need $http_proxy on one box, but I don't need that. I just
> configured sudo accordingly.
> Here are the relevant bits from /etc/sudoers :
> %wheel ALL=(ALL) SETENV: ALL
> The only important part is SETENV: here, which you need to add to the
> line corresponding to your user. (in my case, the user belongs to
> wheel group :P).
> And then this :
> Defaults env_keep += "http_proxy"
> There might be other (better?) ways to deal with this, so if anyone
> knows alternative, I am interested to.
> If you only want to keep the environment when using pacman, it might
> be possible to do just that in the sudo config file as well.
> I never did it but I assume it is possible since I see you can specify
> commands in the config.
> Anyway, I think it would be a better way to deal with this rather than
> having to add this -E argument.

I'd side with Xavier here. -E has the potential to bring in things we
may not want, whereas a properly configured sudoers file only lets
through the envvars explicitly set.

More information about the pacman-dev mailing list