SUMMARY: pkgadd & package organization question/changing target

Marc S. Gibian (gibian@stars1.hanscom.af.mil)
Tue, 29 Apr 1997 10:35:09 -0400

--Boundary_(ID_/cot+WpkYql3/ndzOfFCbQ)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7bit
Content-MD5: +Qq6hkaCKtaRr6+5dA6R4g==
X-Sun-Data-type: text

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

--Boundary_(ID_/cot+WpkYql3/ndzOfFCbQ)
Content-type: MESSAGE/RFC822
Content-description: Mailbox
Content-MD5: vI+1HKrYOcW8Pxpy+N10PA==
X-Sun-Data-type: mail-message

Return-path: <sun-managers-relay@ra.mcs.anl.gov>
Received: from stars1.hanscom.af.mil by drizzle.tfs.com (SMI-8.6/SMI-SVR4)
id OAA01081; Thu, 10 Apr 1997 14:56:25 -0400
Received: from hpux2.hanscom.af.mil by stars1.hanscom.af.mil (SMI-8.6/SMI-SVR4)
id OAA10358; Thu, 10 Apr 1997 14:44:25 -0400
Received: from ra.mcs.anl.gov (ra.mcs.anl.gov [140.221.9.21])
by hpux2.hanscom.af.mil (8.6.12/8.6.12) with ESMTP id OAA07659; Thu,
10 Apr 1997 14:51:02 -0400
Received: from localhost (daemon@localhost) by ra.mcs.anl.gov (8.8.3/8.8.3)
with SMTP id NAA25900; Thu, 10 Apr 1997 13:48:41 -0500 (CDT)
Received: by ra.mcs.anl.gov (bulk_mailer v1.5); Thu, 10 Apr 1997 13:46:37 -0500
Received: (from daemon@localhost) by ra.mcs.anl.gov (8.8.3/8.8.3)
id NAA25525 for sun-managers-outbound; Thu, 10 Apr 1997 13:00:54 -0500 (CDT)
Received: from hpux2.hanscom.af.mil (gw1.hanscom.af.mil [129.53.1.101])
by ra.mcs.anl.gov (8.8.3/8.8.3) with SMTP id NAA25518 for
<sun-managers@ra.mcs.anl.gov>; Thu, 10 Apr 1997 13:00:42 -0500 (CDT)
Received: from stars1.hanscom.af.mil (stars1.hanscom.af.mil [129.53.46.10])
by hpux2.hanscom.af.mil (8.6.12/8.6.12) with ESMTP id NAA03905 for
<sun-managers@ra.mcs.anl.gov>; Thu, 10 Apr 1997 13:57:51 -0400
Received: from drizzle.tfs.com by stars1.hanscom.af.mil (SMI-8.6/SMI-SVR4)
id NAA09737; Thu, 10 Apr 1997 13:51:08 -0400
Received: from hail.tfs.com by drizzle.tfs.com (SMI-8.6/SMI-SVR4)
id OAA29555; Thu, 10 Apr 1997 14:03:06 -0400
Received: by hail.tfs.com (SMI-8.6/SMI-SVR4) id OAA27691; Thu,
10 Apr 1997 14:02:56 -0400
Date: Thu, 10 Apr 1997 14:02:56 -0400
From: gibian@stars1.hanscom.af.mil (Marc S. Gibian)
Subject: pkgadd & package organization question/changing target directory
Sender: sun-managers-relay@ra.mcs.anl.gov
To: sun-managers@ra.mcs.anl.gov
Reply-to: gibian@stars1.hanscom.af.mil (Marc S. Gibian)
Message-id: <199704101802.OAA27691@hail.tfs.com>
MIME-version: 1.0
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7bit
Content-MD5: fG/U2ojq/SOySZZDjsr0dQ==
Precedence: bulk
Content-length: 1936
>From gibian@stars1.hanscom.af.mil Thu Apr 10 14:56:26 1997
Followup-to: gibian@stars1.hanscom.af.mil (Marc S. Gibian)
Status: RO

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

--Boundary_(ID_/cot+WpkYql3/ndzOfFCbQ)
Content-type: MESSAGE/RFC822
Content-description: Mailbox
Content-MD5: bk7oWrI8i6fLqXMQLFT2yQ==
X-Sun-Data-type: mail-message

Return-path: <davidp@jsbach.njit.edu>
Received: from stars1.hanscom.af.mil by drizzle.tfs.com (SMI-8.6/SMI-SVR4)
id HAA28143; Fri, 11 Apr 1997 07:39:19 -0400
Received: from hpux2.hanscom.af.mil by stars1.hanscom.af.mil (SMI-8.6/SMI-SVR4)
id HAA19223; Fri, 11 Apr 1997 07:27:17 -0400
Received: from jsbach.njit.edu (jsbach.njit.edu [128.235.50.26])
by hpux2.hanscom.af.mil (8.6.12/8.6.12) with ESMTP id HAA08418 for
<gibian@stars1.hanscom.af.mil>; Fri, 11 Apr 1997 07:33:54 -0400
Received: (from davidp@localhost) by jsbach.njit.edu (8.7.5/8.7.3)
id HAA00876 for gibian@stars1.hanscom.af.mil; Fri,
11 Apr 1997 07:36:31 -0400 (EDT)
Date: Fri, 11 Apr 1997 07:36:31 -0400 (EDT)
From: David Perel <davidp@jsbach.njit.edu>
Subject: Re: pkgadd & package organization question/changing target directory
To: gibian@stars1.hanscom.af.mil
Message-id: <199704111136.HAA00876@jsbach.njit.edu>
MIME-version: 1.0
Content-type: TEXT/PLAIN; CHARSET=US-ASCII
Content-length: 2542
>From davidp@jsbach.njit.edu Fri Apr 11 07:39:20 1997
Status: RO

} 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

--Boundary_(ID_/cot+WpkYql3/ndzOfFCbQ)
Content-type: MESSAGE/RFC822
Content-description: Mailbox
Content-MD5: V8JTWop2Y/jvc3U8fPFhRw==
X-Sun-Data-type: mail-message

Return-path: <gmp@adc.com>
Received: from stars1.hanscom.af.mil by drizzle.tfs.com (SMI-8.6/SMI-SVR4)
id KAA03111; Fri, 11 Apr 1997 10:37:02 -0400
Received: from hpux2.hanscom.af.mil by stars1.hanscom.af.mil (SMI-8.6/SMI-SVR4)
id KAA20986; Fri, 11 Apr 1997 10:24:59 -0400
Received: from ingate.adc.com (ingate.adc.com [155.226.10.200])
by hpux2.hanscom.af.mil (8.6.12/8.6.12) with SMTP id KAA21436 for
<gibian@stars1.hanscom.af.mil>; Fri, 11 Apr 1997 10:31:37 -0400
Received: by ingate.adc.com (5.x/SMI-SVR4) id AA14351; Fri,
11 Apr 1997 09:37:04 -0500
Received: from ghandi.YP.sun386i by ohtar (4.1/SMI-4.1) id AA09565; Fri,
11 Apr 97 09:35:19 CDT
Received: by ghandi.YP.sun386i (SMI-8.6/SMI-SVR4) id JAA05405; Fri,
11 Apr 1997 09:35:36 -0500
Date: Fri, 11 Apr 1997 09:35:36 -0500
From: gmp@adc.com (Gregory M Polanski)
Subject: Re: pkgadd & package organization question/changing target directory
To: gibian@stars1.hanscom.af.mil
Message-id: <199704111435.JAA05405@ghandi.YP.sun386i>
MIME-version: 1.0
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7bit
Content-MD5: 04AMZaLhZqClTs+vs9+gsw==
Content-length: 759
>From gmp@adc.com Fri Apr 11 10:37:02 1997
Status: RO

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
_______________________________________________________________

--Boundary_(ID_/cot+WpkYql3/ndzOfFCbQ)--