Subject: Re: pkgsrc bootstrap kit for Solaris 10?
To: None <>
From: Alan Barrett <>
List: tech-pkg
Date: 08/17/2006 18:57:30
On Thu, 17 Aug 2006, Malcolm Herbert wrote:
> I've unpacked the 2006Q2 pkgsrc snapshot and am trying to get it working
> on this machine.  For some reason I can't yet fathom, running
>   su - root sh -c "blah"
> doesn't actually run blah, but brings up an interactive shell.

The extra "sh" shouldn't be there.  Try this:

   su - root -c "blah"

> In order to get around that I've gotten sudo working on this machine
> and that seems to do the trick by using
>   SU_CMD="sudo sh -c"

That's supposed to work, except if it's in a Makefile or mk.conf
or similar then omit the quotation marks.

> Unfortunately I now get a baffling shell error which I'm trying to track
> down:
> |bosko[...pkgsrc/pkgtools/pkg_install] 476v>: bmake -e install
> |===> Skipping vulnerability checks.
> |WARNING: No /home/pkgsrc/usr/pkgsrc/distfiles/pkg-vulnerabilities file found.
> |WARNING: To fix, install the pkgsrc/security/audit-packages
> |WARNING: package and run: ``/usr/pkg/sbin/download-vulnerability-list''.
> |===> Installing for pkg_install-20060701
> |/bin/sh: syntax error at line 1: `)' unexpected
> |*** Error code 2

Wait, this is Solaris, so /bin/sh is not a working POSIX shell.
I don't know whether bootstrap deals with it properly, but I suggest:

  * Check that you followed all the advice in
  * Set SHELL=/usr/xpg4/bin/sh in the environment.
  * Use SU_CMD=su -m root -c (where the "-m" insuead of "-" is intended
    to make su invoke your $SHELL insteasd of the shell mentioned in
    root's entry in /etc/passwd), or SU_CMD=sudo /usr/xpg4/bin/sh -c.

--apb (Alan Barrett)