[csw-users] Running pkgutil and OpenCSW as non-root?

Victor Hooi victorhooi at yahoo.com
Sat Jul 23 05:48:31 CEST 2011


Thanks for the quick reply.

Hmm, the issue is it's an incredibly locked down environment, unfortunately.
Even getting the sysadmins to install specified packages from say OpenCSW
would be a bureacratic nightmare. We're still stuck on GCC 3.x, vi (not
vim), Python 2.3 etc. Hence why we're looking at using something like
OpenCSW or Blastwave, or compiling ourselves.

So pkgutil ultimately runs pkgadd/pkgrm, which we can't run as non-root.

Would it be possible to perhaps install Solaris on our own machine, setup
OpenCSW and install the packages, then transplant those installed packages
onto the box? As in, we'd copy the /opt/csw directory to our own prefix, and
edit our PATH/LD_LIBRARY_PATH to run from there?

It's an ugly hack, and I guess we lose things like easy upgrades,
centralised package management, and easy removes, but it's probably a whole
lot better than compiling ourselves from scratch.

Failing that, are the compile flag, patches, and procedures for building the
packages perhaps documented anywhere? We might be able to replicate it on
our boxes in our own prefix.


On Fri, Jul 22, 2011 at 19:16, Peter Bonivart <bonivart at opencsw.org> wrote:

> On Fri, Jul 22, 2011 at 8:40 AM, Victor Hooi <victorhooi at yahoo.com> wrote:
> > Hi,
> > I'm hoping to use pkgutil and OpenCSW is a rather locked-down
> environment,
> > where we do not have root access to the boxes.
> I'm sorry to say but I think you will have little success with this.
> :( Is there really no other option like having the sysadmin do
> installs for you, have your own zone or something? Or get specific
> sudo access?
> > Basically, I need to run pkgutil as a normal user, and have it install
> all
> > packages/libraries into it's own prefix (we do have a common directory
> which
> > we have ownership of).
> > Are there any notes or tricks we could use to achieve this? I couldn't
> seem
> > to find anything on the wiki, and the nearest thing I could find was an
> old
> > blog post from 2009, which involves simply extracting Solaris SVR4
> packages,
> > not quite what I wanted:
> >
> http://blogs.oracle.com/LetTheSunShineIn/entry/non_root_install_of_blastwave
> > 1. Getting pkg-util
> > The first step is to get pkgutil. I have version 2.4 downloaded from
> here:
> >
> http://buildfarm.opencsw.org/experimental/bonivart/pkgutil-2.4,REV=2011.06.29-SunOS5.9-all-CSW.pkg
> > Since I don't have root access, I simply ran pkgtrans to get the actual
> > files. I can run the pkgutil perl script itself, however I'm not sure
> what
> > to do with the other required files in the archive (e.g. admin, etc,
> > wget-i386/sparc etc.).
> > How should I install properly pkg-util to run as non-root under a
> specific
> > prefix (e.g. /my_prefix/)?
> Take a look here how the files are laid out:
> http://www.opencsw.org/search/pkgutil/. But it's only the admin file
> that is important. By default if you're running pkgutil as non-root it
> will create a ~/.pkgutil directory for the catalog, admin file and so
> on. If you already have wget somewhere you don't need the included
> one, it's just a last resort. Most options can be set on the command
> line (every option with the --param option) but if you want a config
> file you can put it anywhere and call it with --config.
> > 2. Running pkg-util
> >
> > I saw it mentioned here, for version 2.0 of pkgutil that it has non-root
> > abilities, but I'm not sure how to trigger this:
> > http://pkgutil.wikidot.com/release-history#toc4
> > What's the best way of running pkg-util as non-root, and having it
> install
> > into our own prefix?
> The problem is not pkgutil itself, it's that the Solaris pkg tools
> (pkgadd/pkgrm and so on) are root-only when they modify stuff. So the
> only things pkgutil can do as non-root are catalog related (like
> pkgutil -a) and pure info commands like the ones calling pkginfo.
> The other problem is that the packages themselves usually are not
> relocatable.
> > 3. Local OpenCSW Mirror
> > The other issue is that we don't have direct access from these machines
> to
> > the internet (due to firewalling).
> > What steps would I take to setup our own local OpenCSW mirror within our
> > network (we probably can guess root access to this machine, assuming it
> > doesn't have to be Solaris, and setup a webserver of our choice), and how
> > should we go about pointing our pkg-util utility at this instance?
> First you need to rsync from an official mirror, it's described on
> www.opencsw.org/mirrors, then you just set your mirror options in
> pkgutil.conf to point to your web server. You can also use the file://
> protocol if it's an NFS share.
> mirror=http://yourwebserver/csw
> mirror=file:///cswshare
> /peter
> _______________________________________________
> users mailing list
> users at lists.opencsw.org
> https://lists.opencsw.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opencsw.org/pipermail/users/attachments/20110723/2b54f135/attachment.html>

More information about the users mailing list