Mantis - cswclassutils
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
4118 | regular use | minor | always | 2010-01-07 14:10 | 2010-03-31 22:06 |
|
|||||
Reporter: | skayser | Platform: | |||
Assigned To: | bonivart | OS: | |||
Priority: | normal | OS Version: | |||
Status: | closed | Product Version: | |||
Product Build: | Resolution: | fixed | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | |||
|
|||||
Summary: | 0004118: Alternate root installation (via pkgadd -R): i.cswcpsampleconf throws chown/chmod errors | ||||
Description: |
When one installs a package to an alternate root via -R, i.cswcpsampleconf will throw chown/chmod errors (see additional information). Looks like the following bit in i.cswcpsampleconf needs some tweaking of the "grep" invocation. echo Copying sample config to $confdest [ -x /usr/bin/pkgadm ] && /usr/bin/pkgadm sync > /dev/null 2>&1 contents=`grep "^$dest" /var/sadm/install/contents` mode=`echo $contents | awk '{print $4}'` user=`echo $contents | awk '{print $5}'` group=`echo $contents | awk '{print $6}'` cp $dest $confdest chmod $mode $confdest chown $user:$group $confdest The "grep" needs to be given a $dest with a potential $PKG_INSTALL_ROOT stripped while /var/sadm/install/contents needs to be prepended with $PKG_INSTALL_ROOT. Example which works in my case: file=`echo $dest | sed -e "s,$PKG_INSTALL_ROOT,,"` contents=`grep "^$file" $PKG_INSTALL_ROOT/var/sadm/install/contents` Additionally i suppose, the call to pkgadm also needs to be prefixed with $PKG_INSTALL_ROOT (but that would need be cross-checked by someone who is familiar with pkgadm). Another interesting thing I noticed is that the CAS invoked during an alternate-root installation are NOT the ones from the alternate root, but the ones from the system where the alternate root is mounted. Does this mean that our CAS are worthless for someone who does a Jumpstart installation and installs our packages during the phase where the installed system is still mounted at /a? |
||||
Steps To Reproduce: | |||||
Additional Information: |
# pkgparam CSWcswclassutils VERSION 1.30,REV=2009.11.21 /a is a pre-populated root environment. # pkgadd -R /a -d /var/opt/csw/pkgutil/packages/sudo.sparc.5.9.pkg CSWsudosh2 [ verifying class <none> ] Copying sample config to /a/etc/opt/csw/sudosh.conf usage: chmod [-fR] <absolute-mode> file ... chmod [-fR] <symbolic-mode-list> file ... where <symbolic-mode-list> is a comma-separated list of [ugoa]{+|-|=}[rwxXlstugo] [ verifying class <cswcpsampleconf> ] ## Executing postinstall script. ADDED /opt/csw/bin/sudosh to /a/etc/shells. Installation of <CSWsudosh2> was successful. |
||||
Relationships | |||||
Attached Files: | |||||
|
|||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2010-01-07 14:10 | skayser | New Issue | |||
2010-01-07 17:40 | bonivart | Status | new => assigned | ||
2010-01-07 17:40 | bonivart | Assigned To | => bonivart | ||
2010-02-09 10:22 | bonivart | Note Added: 0007419 | |||
2010-02-11 13:55 | bonivart | Note Added: 0007421 | |||
2010-02-11 14:55 | skayser | Note Added: 0007422 | |||
2010-02-11 15:11 | skayser | Note Added: 0007423 | |||
2010-02-11 16:01 | bonivart | Note Added: 0007424 | |||
2010-03-31 22:06 | bonivart | Note Added: 0007785 | |||
2010-03-31 22:06 | bonivart | Status | assigned => closed | ||
2010-03-31 22:06 | bonivart | Resolution | open => fixed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|