Re: How is a depot created? (432 Views)
Reply
Advisor
bill-clayton
Posts: 16
Registered: ‎03-08-2011
Message 1 of 7 (432 Views)
Accepted Solution

How is a depot created?

I have downloaded several xxx.depot.gz files. I am on a 9000 computer running HP-UX 11.00, and everything at present must be done from the command line -- so no SAM answers please. (Should have a graphics card in a couple of months). OK, so I have a xxx.depot.gz file that was transferred to my system via FTP, and everything I try to do with it such as swreg, swcopy, swinstall, etc. fails -- usually with an ERROR stating I have no depot on the system.
I put the xxx.depot.gz files in /usr/temp and give this as the Source location for depot files. I have even unzipped them so they are xxx.depot files and still no joy.
How do I create a depot? It seems to be some sort of magical directory where all sw-commands look for files. I have read and studied a good paper called "Software Depot Package Builder", but it too assumes one already has a depot to begin with. I do not. This is a bare bones recently built HPUX 11.00 system with no new software attached because I cannot find a depot anywhere. I would think that if I FTP'ed a xxx.depot.gz file to the system, I would have a depot file, but they are not recognized as such. Can anyone help answer what I expect is a dumb question once I see an answer?
bc
Honored Contributor
Matti_Kurkela
Posts: 6,271
Registered: ‎12-02-2001
Message 2 of 7 (432 Views)

Re: How is a depot created?

.depot.gz is a _compressed_ depot.

Before using it with swinstall or swcopy, you must uncompress it first:

gunzip your.depot.gz

The result will be a .depot file in uncompressed form, which should be usable with swinstall or swcopy directly.

Note that the sw* tools will want a _full_ pathname of the depot, since they pass the actual work to the swagentd daemon, which does not have the same current working directory as your login session.

So, to list the contents of the depot:

swlist -s /full/path/of/your.depot
(you can add options like "-l product", "-l fileset" or "-l file" to get more detailed listings)

To install software from a depot:

swinstall -s /full/path/of/your.depot

To install *everything* from a depot:

swinstall -s /full/path/of/your.depot \*


You should also know that a depot can have two forms: a file/tape depot, or a directory depot.

Before CD-ROMs, HP-UX software was distributed on magnetic tapes. The .depot file format is essentially a tape image file. A file depot can be used for local installations and swcopy operations only: it cannot be accessed remotely from another HP-UX system.

A file depot can be converted into a directory depot with swcopy:

swcopy -s /full/path/of/your.depot \* @ /full/path/of/directory_depot

If a directory depot does not exist, swcopy will automatically create it.

You can add the contents of multiple depot files to a single directory depot, and then install everything with only one swinstall operation (and with only one reboot, if one is necessary). A directory depot can also be accessed remotely, if its swacl permissions allow remote access (and by default, they usually do).

To install software from a remote directory depot, just add "remote_hostname:" to the source specification:

swinstall -s remote_hostname:/full/path/of/directory_depot

By the way, you don't need a graphics card on your system to use SAM or any X Window System applications: if you have another system that can run X server software (e.g. a Windows workstation with ReflectionX or free Xming), you can use it as your display.

SAM and the swinstall tools also have a text-based menu interface: if your DISPLAY environment variable is not set and your TERM variable correctly specifies the type of your terminal or terminal emulation, the swinstall tools and SAM should automatically switch to using an ASCII-art based user interface.

MK
MK
Acclaimed Contributor
Dennis Handly
Posts: 25,281
Registered: ‎03-06-2006
Message 3 of 7 (432 Views)

Re: How is a depot created?

>so no SAM answers please.

Why would you use SAM when you can use swinstall CLI?

>I have even unzipped them so they are xxx.depot files

What does "file xxx.depot" show? It should show "tar" for depots.

>How do I create a depot?

You don't. They should already be depots.

>paper called "Software Depot Package Builder", but it too assumes one already has a depot to begin with. I do not.

SPB and swpackage create depots. swcopy copies them.
http://www.hp.com/go/spb

>if I FTP'ed a xxx.depot.gz file to the system, I would have a depot file

Yes, or a gzipped one.

>MK: want a _full_ pathname of the depot, since they pass the actual work to the swagentd daemon

I've always assumed that if it wasn't absolute, it was the name of a machine. Not because of swagentd(1m).

>the swinstall tools also have a text-based menu interface

Better to just use the CLI.
Advisor
bill-clayton
Posts: 16
Registered: ‎03-08-2011
Message 4 of 7 (432 Views)

Re: How is a depot created?

Thanks for the detailed reply. I am sorry now for the question. I found my answer approximately ten minutes after posting.
I had no depots on my system. In other words, swlist -d depot returned none. I tried swcopy to no avail. It kept saying there were no depot fils at my source. (I thought swcopy was for copying existing depots files only).
Anyway I used swpackage to cteate a depot and it succeeded. I thank all of you for responding.
bc
Honored Contributor
Bill Hassell
Posts: 14,221
Registered: ‎05-29-2000
Message 5 of 7 (432 Views)

Re: How is a depot created?

Just to clarify, swcopy can be used to create a depot directory which is then visible with swlist -l depot. It works like this:

swcopy -x enforce_dependencies=false -s /tmp/PHXX_1234 \* @ /var/tmp/mydepot

The directory (/var/tmp/mydepot) is created automatically and the depot file is then added. You then repeat for additional depots. This is how you merge many patches together to form a single installation depot. Don't forget the \* (or "*") that specifies use everything in the depot.
Acclaimed Contributor
Dennis Handly
Posts: 25,281
Registered: ‎03-06-2006
Message 6 of 7 (432 Views)

Re: How is a depot created?

>I thought swcopy was for copying existing depots files only.

Yes.

>Anyway I used swpackage to create a depot and it succeeded.

Created from what? You should only use swpackage to create tape depots or depots from raw files.
Advisor
bill-clayton
Posts: 16
Registered: ‎03-08-2011
Message 7 of 7 (432 Views)

Re: How is a depot created?

I created the depot from raw files such as tftp.depot.gz. I uncompressed the file and obtained tftp.depot. I then used swpackage to create a depot from the raw file. I don't have the exact syntax at hand, but it worked and I now have a viable depot. Of course I could create more depots if needed. At any rate all is fine now. Thanks fo everyone's input.
bc
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.