[csw-users] FWD : CSW install into /opt/csw/sparc & /opt/csw/i386 instead of /opt/csw

Cory Omand comand at blastwave.org
Wed Jan 4 20:07:20 CET 2006


Dennis Clarke wrote:
> ---------- Forwarded message ----------
> From: LOEWENTHAL Simon <sloewenthal at gemini.edu>
> To: CSW Users List <users-bounces at lists.blastwave.org>
> Date: Wed, 04 Jan 2006 11:07:06 -0300
> Subject: CSW install into /opt/csw/sparc & /opt/csw/i386 instead of /opt/csw
> 
> Dear all,
> 
> I have to create a single server that has to provide each CSW dist for
> sparc and x86.
> 
> I intend to export two filesystems : /opt/csw/i386 and /opt/csw/sparc,
> and have an auto_direct entry like /opt/csw cswserver:&/$CPU
> 
> Question is, how can I trick CSW into installing the binaries into i) a
> differnt directory to  /opt/csw, and ii) a different binary (in this
> case the server is SPARC and the intended binaries are i386.  I suspect
> more arcitechures if or when others are available).
> 
> Is this possible - Has anyone done this before?

It is possible.  However, if you intend to update the packages once they 
are installed, you could slightly adjust your scheme.  All packages can 
be relocated using the -R flag to pkgadd.  If I were to specify -R /foo, 
then everything would install into /foo/opt/csw.  So, if you were to 
adjust your scheme to something that would allow -R /export/csw/$CPU, 
you would end up with /export/csw/i386/opt/csw, and 
/export/csw/sparc/opt/csw.

Getting software to install into these paths using pkg-get is another 
story.  You can set PKGADDFLAGS in your pkg-get.conf file to something like:

PKGADDFLAGS="-R /export/csw/`uname -p`"

This would need to be done on one machine of each architecture type, 
with at least pkg-get installed to that system's /opt directory.  Then, 
create directories and shares on your server, and fix up the auto_direct 
maps on your clients.  You can then pkg-get on both machines (sparc & 
i386), and they should write the software out to the NFS shared directory.

There are some enhancements to this procedure, which I'm sure others 
have used.  If you go with the above, you'll find that a lot of disk 
space on your NFS server is consumed by duplicate files.  Everything in 
/opt/csw/share can be safely shared between architectures.  Setting up a 
common directory might be a good option here, but expect to see file 
conflicts when adding or updating files (e.g. adding sparc package adds 
share files to a common location, so they exist when adding the i386 
package, so pkgadd will complain about existing files belonging to some 
other package).

HTH,
Cory.


-- 
Cory Omand <comand at blastwave.org>



More information about the users mailing list