Operating System - HP-UX
1748022 Members
4969 Online
108757 Solutions
New Discussion юеВ

Install package (pcd.psf) installs with incorrect ownership of symlink

 
A Mills
New Member

Install package (pcd.psf) installs with incorrect ownership of symlink

I have developed an install package using pcd.psf that has shipped for several releases. I have noticed with HP 11i that the symlinks I have shipped for /usr/lib are no longer being provided the correct account and group ownership. They are owned by 300:300 instead of id1:id1 as my pcd.psf dictates. The 300 is the id the build system is using when we package the code. The snippet from my pcd.psf follows.

file libexample.sl libexample.sl
file_permissions -m 0777 -o id1 -g id1
directory /bld/hp/usr/lib/ = /usr/lib/

Any insight would be appreciated. Thanks.
5 REPLIES 5
Dennis Handly
Acclaimed Contributor

Re: Install package (pcd.psf) installs with incorrect ownership of symlink

HP-UX only knows about numeric IDs. If you want "id1" installed on your end user's systems, you have to edit /etc/passwd.

The proper way to do this is for files in /usr/lib/ to have the ID of bin:bin.
A Mills
New Member

Re: Install package (pcd.psf) installs with incorrect ownership of symlink

Thanks Dennis.

I create id1 in the preinstall script. I am not sure I made this clear in my earlier post, but this worked in the past on HP 11.00. I believe HP supplied a patch at some point to HP 11.00 that caused my installation program to start assigning my symbolic links incorrectly. Note: it does assign my files and directories correctly.
Dennis Handly
Acclaimed Contributor

Re: Install package (pcd.psf) installs with incorrect ownership of symlink

>I create id1 in the preinstall script.

With the number 300? What do you do if it exists?

>I believe HP supplied a patch at some point to HP 11.00 that caused my installation program to start assigning my symbolic links incorrectly.

By incorrectly, you mean as 300? And not the number associated with the new id1?

I'll have to look into an IPD to see what is recorded.

>Note: it does assign my files and directories correctly.

I recently had to work on a problem where symlinks in 11.23 /usr/lib/hpux??/ were the same numbers we used to manufacture it, not bin:bin. I assumed this was a missing chown before we called swpackage. I don't think we use the fancy-smancy file_permissions.
Dennis Handly
Acclaimed Contributor

Re: Install package (pcd.psf) installs with incorrect ownership of symlink

>I'll have to look into an IPD to see what is recorded.

The IPD seems to record both the numeric ID and the string:
uid 2
gid 2
owner bin
group bin

So there is enough info to do what you want. It seems it should:
http://docs.hp.com/en/5992-2146/ch10s04.html#bajbhcdf
-o [owner[,]][uid]
During an installation, the owner attribute is used to set the owner name and uid, unless the owner name is not specified or is not defined in the target system├в s /etc/passwd file. In this case, the uid attribute is used to set the uid.

You could check what's in your depot's fileset's INFO file. This is for ACXX.ACXX-STDLIB:
/var/adm/sw/products/ACXX.2/ACXX-STDLIB/INFO
A Mills
New Member

Re: Install package (pcd.psf) installs with incorrect ownership of symlink

Hi Dennis,

Thanks again for the help.

My INFO file contains the the following:

file
path /usr/bin/pdadmin
type s
size 31
mode 0777
uid 300
gid 300
owner ivmgr
group ivmgr
mtime 1186424697
link_source /opt/PolicyDirector/bin/pdadmin

As you can see it stored the symbolic name for owner and group.

The following is the target definition (file it points to) for the symbolic link. It does correctly set the owner and group.

file
path /opt/PolicyDirector/bin/pdadmin
type f
size 1977508
cksum 3456559458
mode 0555
uid 300
gid 300
owner ivmgr
group ivmgr
mtime 1186423420

Since I first posted this entry in the forum, I had a problem report opened on behalf of our mutual customer.