Problem with swinstall ACL (186 Views)
Reply
Advisor
emx
Posts: 14
Registered: ‎03-03-2008
Message 1 of 13 (186 Views)
Accepted Solution

Problem with swinstall ACL

[ Edited ]

Hi,

I am trying to get my head around the swinstall paradigm of HP-UX.
What I want is simple: I want to use 'swinstall' from many hosts, but keep my software depot on a single host. Let's assume hostA is the central depot repository, and I am trying to install from hostB.

here is what happens:
root@hostB:/> swinstall -s hostA:/var/adm/depot/gcc-4.2.2-hppa-11.11.depot gcc
======= 03/03/08 19:47:42 IRN BEGIN swinstall SESSION
(non-interactive) (jobid=hostB-0043)

* Session started for user "root@hostB".

* Beginning Selection
* Target connection succeeded for "hostB:/".
ERROR: The source you have chosen is a tape device which must be
local to the single selected target. Since the hostname of
the tape device "hostA" does not match the hostname of the
single selected target "hostB", this source is not allowed.
* Selection had errors.



======= 03/03/08 19:47:43 IRN END swinstall SESSION (non-interactive)
(jobid=hostB-0043)

It is telling me that my depot is a tape. This is bizarre.

On hostA I have tried to enable correctly the depot with swreg -l depot /var/adm/depot/gcc-4.2.2-hppa-11.11.depot
I tried to "swreg" the whole /var/adm/depot directory, which sounded the right thing to do but it didn't work, so I "swreg" the individual depot file.

I also enabled an ACL by typing swacl -l host -M user:root@hostB:crwit

Therefore I have a few questions:

1. Am I really stupid or is the HP-UX software distribution concept a bit cumbersome, counter-intuitive and convoluted?

2. How do I register a "directory" to be a software depot? Is it possible at all or should every single *.depot file be registered individually?

3. Is my ACL ok for what I am trying to do? (allowing hostB to install software located on hostA).

4. Why is it talking about "being a tape"? This sounds really weird, almost as intelligible as a Windows error message.

5. Why this error about "hostA" not being "hostB"?

Thanks in advance for any hints.

 

 

 

 

P.S. This thread has been moved from HP-UX > System Administration to HP-UX > patches. -HP Forum Moderator

Please use plain text.
Honored Contributor
Tim Nelson
Posts: 3,723
Registered: ‎06-01-2000
Message 2 of 13 (186 Views)

Re: Problem with swinstall ACL

By default swinstall works. Not sure about all the stuff you are having problems with.

So let's start over.

To create a depot on hostA:
copy depot file somewhere on hostA, say /tmp
swcopy -s /tmp/gcc.depot ( pick a destination for the depot, then select the gcc package, then actions, then copy, just follow the prompts )

To install the gcc from a depot on hostA to hostB.
On hostB
swinstall
in the source window type in your hostA then pick from the available depots
select the package, then action, then install, follow the prompts


The above is purely interactive, you can do the install all by the command line via options like you described above, check man pages for syntax.

No ACL changes needed, no registration needed, no nothin.

Please use plain text.
Advisor
Carsten.Cimander
Posts: 14
Registered: ‎09-14-2007
Message 3 of 13 (186 Views)

Re: Problem with swinstall ACL

Hi emx,

to come around this problem quickly you can NFS-export on hostA
/var/adm/depot
with root-access-right for only hostB.
then NFS-mount it on hostB. Then you should be able to swinstall it on hostA.

Another Method may be to copy the Software as a new SW-Depot:
hostA: swcopy -s /var/adm/depot/gcc-4.2.2-hppa-11.11.depot gcc @ /var/spool/sw/gcc

Then you have a new SW depot on hostA. You can list the available depots with:
swlist -l depot

Regards
Carsten
Please use plain text.
Honored Contributor
Rita C Workman
Posts: 3,791
Registered: ‎08-03-2000
Message 4 of 13 (186 Views)

Re: Problem with swinstall ACL

To install using one central depot, where we are not talking about Ignite-UX depots, you need to set up software access lists giving the remote server permissions. It makes so much easier then running around. I load most everything off my CD/DVD using my old workstation under my desk.....

Let's say you put the software DVD on your central server and mount it up as /SD_CDROM

I tend to do the following (just what I do..)

Stop the swagentd on both boxes.

On the server with the CD/DVD (aka Local)
swreg -l depot /SD_CDROM

On both boxes adjust the access control lists
swacl -l depot -M any_other:crwit
swacl -l host -M any_other:crwit
swacl -l root -M any_other:crwit

Restart your swagent

/usr/sbin/swagentd -r

To check that you can read the CD/DVD you could run:
swlist -d @:/SD_CDROM

Hopefully you get a good response and not an error...

To go to the remote server and run to install from there:
swinstall -s :/SD_CDROM

Hope my typing is good....
Rgrds,
Rita
Please use plain text.
Advisor
emx
Posts: 14
Registered: ‎03-03-2008
Message 5 of 13 (186 Views)

Re: Problem with swinstall ACL

Trying again... I'm going to give up and just copy the *.depot files over to the other machines, it's not elegant but it works.

root@twnm1 /var/adm> swreg -l depot /var/adm/depot/

======= 03/05/08 19:47:29 IRN BEGIN swreg SESSION (non-interactive)

* Session started for user "root@twnm1".

* Beginning Selection
* Targets: twnm1
* Objects: /var/adm/depot/
ERROR: There is currently no depot software on host "twnm1" at
location "/var/adm/depot/". Make sure that an absolute
pathname is specified for location (beginning with "/").
ERROR: More information may be found in the daemon logfile on this
target (default location is twnm1:/var/adm/sw/swagentd.log).
* Selection had errors.



======= 03/05/08 19:47:29 IRN END swreg SESSION (non-interactive)

Of course /var/adm/depot contains lots of *.depot files so basically this swinstall thing of HP-UX is brain dead and I will not spend more time trying to learn broken technology. It works fine from the local filesystem, and that's what I'll use from now on.

Thanks for your answers.
Please use plain text.
Honored Contributor
Duncan Edmonstone
Posts: 5,676
Registered: ‎08-05-2000
Message 6 of 13 (186 Views)

Re: Problem with swinstall ACL

>> so basically this swinstall thing of HP-UX is brain dead

Personally I struggle with yum and rpm on Linux, but I'm willing to admit that's cos I don't really know those tools so well, not that the tools are 'brain dead'

Duncan

HTH

Duncan
Please use plain text.
Honored Contributor
Tim Nelson
Posts: 3,723
Registered: ‎06-01-2000
Message 7 of 13 (186 Views)

Re: Problem with swinstall ACL

In the last 10 years of working with software distributor I have never had an issue.

It is not the application that is brain dead.

Please use plain text.
Occasional Visitor
Gerard Moloney
Posts: 3
Registered: ‎03-06-2008
Message 8 of 13 (186 Views)

Re: Problem with swinstall ACL

Hi,
You need to swcopy your depot into a new directory, then you will be able to remotely install on another host.

#cd /var/adm/depot/
#mkdir gcc
#swcopy -s /var/adm/crash/gcc-4.2.2-hppa-11.11.depot \* @ /var/adm/depot/gcc/

Then on your remote host ..
swinstall -s hostA:/var/adm/depot/gcc/

Let me know if this works.

Thanks,
Gerard
Please use plain text.
Occasional Visitor
Gerard Moloney
Posts: 3
Registered: ‎03-06-2008
Message 9 of 13 (186 Views)

Re: Problem with swinstall ACL

Hi,
You need to swcopy your depot into a new directory, then you will be able to remotely install on another host.

#cd /var/adm/depot/
#mkdir gcc
#swcopy -s /var/adm/depot/gcc-4.2.2-hppa-11.11.depot \* @ /var/adm/depot/gcc/

Then on your remote host ..
swinstall -s hostA:/var/adm/depot/gcc/

Let me know if this works.

Thanks,
Gerard
Please use plain text.
Advisor
BW Moll
Posts: 36
Registered: ‎01-23-2008
Message 10 of 13 (186 Views)

Re: Problem with swinstall ACL

I've done this many times by loading software onto an admin server (or partition).. but basically I load the new software onto an exportable directory of the admin server.

Then I NFS mount the exported directory (usually on /mnt, but use whatever directory mount point you like) on the server to be upgraded with the new software.

Swinstall works fine - just use the directory mount point as your source :)

Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,389
Registered: ‎03-06-2006
Message 11 of 13 (186 Views)

Re: Problem with swinstall ACL

>I have tried to enable correctly the depot with
# swreg -l depot /var/adm/depot/gcc-4.2.2-hppa-11.11.depot

That would be my first suggestion.

>2. How do I register a "directory" to be a software depot? Is it possible at all or should every single *.depot file be registered individually?

Yes, you must do each individually. You just have a directory that contains depot thingees.

>Of course /var/adm/depot contains lots of *.depot files

Then you need to register each one.

>Tim: no registration needed,

Because swcopy does it.
Please use plain text.
Advisor
emx
Posts: 14
Registered: ‎03-03-2008
Message 12 of 13 (186 Views)

Re: Problem with swinstall ACL

Thanks, I figured out how to use it.

1. Prepare your depot repository with swcopy

root@twnm1 /var/adm/depot> mkdir gcc
root@twnm1 /var/adm/depot> swcopy -s /var/adm/depot/gcc-4.2.2-hppa-11.11.depot \* @ /var/adm/depot/gcc/

[...]

ERROR: "twnm1:/var/adm/depot/gcc/": The software dependencies for 1 products or filesets cannot be resolved.

root@twnm1 /var/adm/depot> swcopy -s /var/adm/depot/zlib-1.2.3-hppa-11.11.depot \* @ /var/adm/depot/gcc/

[...]

* Analysis and Execution succeeded.

root@twnm1 /var/adm/depot> swcopy -s /var/adm/depot/gcc-4.2.2-hppa-11.11.depot \* @ /var/adm/depot/gcc/

[...]

* Analysis and Execution succeeded.


2. Install from remote host

root@twsmi1 /tmp> swinstall -s twnm1:/var/adm/depot/gcc/ gcc

======= 05/29/08 01:26:07 IRDT BEGIN swinstall SESSION
(non-interactive) (jobid=twsmi1-0053)

* Session started for user "root@twsmi1".

* Beginning Selection
* Target connection succeeded for "twsmi1:/".
* Source connection succeeded for "twnm1:/var/adm/depot/gcc/".
* Source: twnm1:/var/adm/depot/gcc/
* Targets: twsmi1:/
* Software selections:
gcc.gcc-INC,r=4.2.2,a=HP-UX_B./800
gcc.gcc-MAN,r=4.2.2,a=HP-UX_B./800
gcc.gcc-RUN,r=4.2.2,a=HP-UX_B./800
gcc.gcc-SHLIBS,r=4.2.2,a=HP-UX_B./800
+ zlib.zlib-RUN,r=1.2.3,a=HP-UX_B./800
* A "+" indicates an automatic selection due to dependency or
the automatic selection of a patch or reference bundle.
* Selection succeeded.


* Beginning Analysis and Execution
* Session selections have been saved in the file
"/.sw/sessions/swinstall.last".
* The analysis phase succeeded for "twsmi1:/".
* The execution phase succeeded for "twsmi1:/".
* Analysis and Execution succeeded.


NOTE: More information may be found in the agent logfile using the
command "swjob -a log twsmi1-0053 @ twsmi1:/".

======= 05/29/08 01:26:55 IRDT END swinstall SESSION
(non-interactive) (jobid=twsmi1-0053)

root@twsmi1 /tmp> gcc -v
Using built-in specs.
Target: hppa2.0w-hp-hpux11.11
Configured with: ../gcc/configure
Thread model: posix
gcc version 4.2.2

Great! It works.
Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,389
Registered: ‎03-06-2006
Message 13 of 13 (186 Views)

Re: Problem with swinstall ACL

>1. Prepare your depot repository with swcopy

I would skip the mkdir step since swcopy knows what to do.

>ERROR: The software dependencies ..

To prevent this use: -x enforce_dependencies=false

Please use plain text.
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