A while back I asked about the proper technique for relocating the target of a 
pkgadd install without relocating where the pkgadd status information is 
recorded. I got only two replies, neither of which really resolved my problem. 
The workaround I am using is to setup a symbolic link from the "hardwired" 
target base directory in my packages that points to the actual install target 
base. While these packages are built as relocatable, the full solution appears 
to be to rework the packages to use an install time "macro" (I forget the proper 
term within the package context) set by a request script, and use my install 
wrapper script to supply a response file to the pkgadd(s) to avoid repetitive, 
unnecessary, interactions with the installer. It is unlikely that I will 
implement this as it appears the package based install of the product is shortly 
to be replaced by an alternate mechanism, specific to the U.S. Defense/Air Force 
who represent the only customers of this product.
I have attached the full text of my original question along with the two replies 
I did receive. My thanks to:
David Perel <davidp@jsbach.njit.edu>
gmp@adc.com (Gregory M Polanski)
-Marc
Marc S. Gibian
Telos Comsys                  phone: (617) 377-6350
PRISM/TFS                     email: gibian@stars1.hanscom.af.mil
attached mail follows:
I have generated standard packages for my customer's product that are installing 
fine on the initially targeted platform. The only special thing I had to do was 
include a product install script as a wrapper around pkgadd to do media 
handling, as pkgadd wanted to first copy the tape to either / or /tmp, I don't 
remember, and neither is big enough. So, my base xyzinstall script tars the 
packages off the distribution tape, and then runs pkgadd using a package 
administration file that avoids all installer interactions, and then deletes the 
on disk package spool after the install has finished.
My customer now has a new requirement, as if that's a surprise. The install must 
be able to place the files being installed into a selectable location. For a 
variety of reasons, I am placing the user interaction in my xyzinstall wrapper 
script. It is properly interacting with the user to determine the proper install 
location given a number of constraints, and then finds a place to hold the on 
disk package spool during the install process. So far, so good.
The problem is that I can't find the right technique for telling pkgadd the 
proper "base path" for the files it is installing. I tried changing basedir in 
my package administration file, but that is essentially chrooting the install. 
This has all kinds of bad effects, for example causing the useradd in the 
preinstall script for the first package to fail since it is not operating on the 
system's true /etc/passwd & related files, as well as storing the package 
install information in the wrong place.
All I want to do is tell package add that all relocatable files should be 
installed with a base directory of /foo/base while the default base directory 
has been /export/base to this time.
Can anyone help me?
TIA,
Marc
Marc S. Gibian
Telos Comsys                  phone: (617) 377-6350
PRISM/TFS                     email: gibian@stars1.hanscom.af.mil
attached mail follows:
} From sun-managers-relay@ra.mcs.anl.gov Fri Apr 11 07:11 EDT 1997
} To: sun-managers@ra.mcs.anl.gov
} Subject: pkgadd & package organization question/changing target directory
} Mime-Version: 1.0
} Content-Transfer-Encoding: 7bit
} Content-MD5: fG/U2ojq/SOySZZDjsr0dQ==
} 
} I have generated standard packages for my customer's product that are installing 
} fine on the initially targeted platform. The only special thing I had to do was 
} include a product install script as a wrapper around pkgadd to do media 
} handling, as pkgadd wanted to first copy the tape to either / or /tmp, I don't 
} remember, and neither is big enough. So, my base xyzinstall script tars the 
} packages off the distribution tape, and then runs pkgadd using a package 
} administration file that avoids all installer interactions, and then deletes the 
} on disk package spool after the install has finished.
} 
} My customer now has a new requirement, as if that's a surprise. The install must 
} be able to place the files being installed into a selectable location. For a 
} variety of reasons, I am placing the user interaction in my xyzinstall wrapper 
} script. It is properly interacting with the user to determine the proper install 
} location given a number of constraints, and then finds a place to hold the on 
} disk package spool during the install process. So far, so good.
} 
} The problem is that I can't find the right technique for telling pkgadd the 
} proper "base path" for the files it is installing. I tried changing basedir in 
} my package administration file, but that is essentially chrooting the install. 
} This has all kinds of bad effects, for example causing the useradd in the 
} preinstall script for the first package to fail since it is not operating on the 
} system's true /etc/passwd & related files, as well as storing the package 
} install information in the wrong place.
} 
} All I want to do is tell package add that all relocatable files should be 
} installed with a base directory of /foo/base while the default base directory 
} has been /export/base to this time.
} 
} Can anyone help me?
} 
} TIA,
} Marc
} 
} Marc S. Gibian
} Telos Comsys                  phone: (617) 377-6350
} PRISM/TFS                     email: gibian@stars1.hanscom.af.mil
} 
If you use the "-R" option for pkgadd, the package will be installed
in the "opt" sub-directory (created by pkgadd) of the directory path
you specify -- e.g., pkgadd -d foo-1.23 -R /dir/1/dir2/foo will
install foo-1.23 in /dir/1/dir2/foo/{opt, var}
-david
attached mail follows:
BASEDIR=`ckpath -y -t -w -d ${BASEDIR} \
        -p "Specify the root directory For Logix Installation: ~"`  || exit $?
echo BASEDIR=${BASEDIR} >> $1
echo LOGIXHOME=${BASEDIR}/${PRODUCT} >> $1
In the request script
BASEDIR=`ckpath -y -t -w -d ${BASEDIR} \
        -p "Specify the root directory For Installation: ~"`  || exit $?
echo BASEDIR=${BASEDIR} >> $1
echo XXXHOME=${BASEDIR}/${PRODUCT} >> $1
greg
_______________________________________________________________
Greg Polanski                      greg_polanski@adc.com
ADC Telecommunications
MS 254                             612-946-2270
4900 West 78-th St                 612-946-3910 FAX
Bloomington, MN  55435             612-580-6873 Pager
_______________________________________________________________
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:51 CDT