Subject: Re: pkgsrc bootstrap kit for Solaris 10?
To: Alan Barrett <apb@cequrux.com>
From: Malcolm Herbert <mjch@mjch.net>
List: tech-pkg
Date: 08/25/2006 09:22:45
On Wed, Aug 23, 2006 at 08:55:05AM +0200, Alan Barrett wrote:
|On Tue, 22 Aug 2006, Malcolm Herbert wrote:
|> I'm still having Issues getting pkgsrc to use /usr/xpg4/bin/sh
|> consistently, with su or sudo even when run as root with SHELL set
|> appropriately. Unfortunately I wasn't able to find a version of su which
|> accepts the -m flag (/bin/su, /sbin/su nor /usr/bin/su)
|
|Other people who use pkgsrc on Solaris don't seem to have the same
|problems; perhaps they just do everything as root.

hmmm ... even that was failing to work until I found that if I became
root and then exec'd /usr/xpg4/bin/sh before running any pkgsrc stuff
then things started happening properly ... 

|grep shows that pkgsrc uses several different shell variables,
|including SH, TOOLS_SHELL, WRAPPER_SHELL, CONFIG_SHELL.  Setting
|SH=/usr/xpg4/bin/sh in mk.conf or pkgsrc/mk/platform/SunOS.mk will
|probably help, because most of the others seem to have defaults that are
|derived from ${SH}.

aaaaaaah ... those script shims look promising - good idea ... :)

|> Is there any config-file magic to allow sudo to change the environment
|> for a command run under it that ISN'T dependant on the calling
|> environment (ie, NOT using the -s option on the command-line, which
|> imports the calling SHELL)? That would solve my problems, I think ...
|
|Do any of these work (or variations on these themes)?

I'll try them, but as I said, I'm surprised that the manual entry for
sudo doesn't mention that - I would have thought that setting such 
things in the config file would be a plainly obvious thing to want to
do ... surely it's meant to be the most secure place, as far as sudo is
concerned? ... *shrug*

thanks for the brainstorming, btw - it's really appreciated ... :)

-- 
Malcolm Herbert                                This brain intentionally
mjch@mjch.net                                                left blank