NetBSD Problem Report #41330

From www@NetBSD.org  Sat May  2 03:49:03 2009
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 3DBBD63C220
	for <gnats-bugs@gnats.netbsd.org>; Sat,  2 May 2009 03:49:03 +0000 (UTC)
Message-Id: <20090502034902.EBD7563C131@www.NetBSD.org>
Date: Sat,  2 May 2009 03:49:02 +0000 (UTC)
From: Lloyd.Parkes@ird.govt.nz
Reply-To: Lloyd.Parkes@ird.govt.nz
To: gnats-bugs@NetBSD.org
Subject: pre/post (de)install scripts don't have an SVR4 interface
X-Send-Pr-Version: www-1.0

>Number:         41330
>Category:       pkg
>Synopsis:       pre/post (de)install scripts don't have an SVR4 interface
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat May 02 03:50:00 +0000 2009
>Originator:     Lloyd Parkes
>Release:        pkgsrc 2008Q3
>Organization:
Inland Revenue
>Environment:
SunOS XXX.ird.govt.nz 5.10 Generic_127127-11 sun4u sparc SUNW,Ultra-60

>Description:
The pkg (de)install scripts do some really handy things, such as managing default config files for software such as Apache. They pretty much just do the right thing all the time.

Unfortunately they don't understand being invoked by the SVR4 packaging system. If they did, then some simple changes to gensolpkg would allow the smart pkgsrc scripts to do the right things when being invoked with pkgadd instead of pkg_add.

This really rather useful because it means that you can deploy standard SVR4 format packages throughout your organisation, and still get the default config files being managed appropriately. 
>How-To-Repeat:
Build apache22, convert it to an SVR4 package for your junior staff to install and watch them get very confused at the prospect of having to find and install about a dozen different configuration files by hand.


>Fix:
The following diff makes the scripts re-exec themselves with a pkgsrc style invocation if they have been invoked with an SVR4 style invocation. This saves have to do a whole pile of tests throughout the scripts. 

The package directory creation is also moved from PRE-INSTALL to POST-INSTALL. This is because that's what SVR4 requires, and pkgsrc is fine with that because the directories being created are only used in the POST-INSTALL phases. i.e. the INSTALL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