[bug-notifications] [cswclassutils 0004118]: Alternate root installation (via pkgadd -R): i.cswcpsampleconf throws chown/chmod errors
Mantis Bug Tracker
noreply at opencsw.org
Wed Mar 31 22:06:25 CEST 2010
The following issue has been CLOSED
======================================================================
http://www.opencsw.org/mantis/view.php?id=4118
======================================================================
Reported By: skayser
Assigned To: bonivart
======================================================================
Project: cswclassutils
Issue ID: 4118
Category: regular use
Reproducibility: always
Severity: minor
Priority: normal
Status: closed
Resolution: open
Fixed in Version:
======================================================================
Date Submitted: 2010-01-07 14:10 CET
Last Modified: 2010-03-31 22:06 CEST
======================================================================
Summary: 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?
======================================================================
----------------------------------------------------------------------
(0007785) bonivart (manager) - 2010-03-31 22:06
http://www.opencsw.org/mantis/view.php?id=4118#c7785
----------------------------------------------------------------------
Released in 1.34.
More information about the bug-notifications
mailing list