From nobody@FreeBSD.org  Tue Jan 30 21:58:49 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id 8024D37B699
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 30 Jan 2001 21:58:49 -0800 (PST)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.1/8.11.1) id f0V5wng10494;
	Tue, 30 Jan 2001 21:58:49 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200101310558.f0V5wng10494@freefall.freebsd.org>
Date: Tue, 30 Jan 2001 21:58:49 -0800 (PST)
From: pavel@networkphysics.com
To: freebsd-gnats-submit@FreeBSD.org
Subject: mysql323-server pkg-install script doesn't propagate DB_DIR
X-Send-Pr-Version: www-1.0

>Number:         24749
>Category:       ports
>Synopsis:       mysql323-server pkg-install script doesn't propagate DB_DIR
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ale
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 30 22:00:01 PST 2001
>Closed-Date:    Sat Jan 17 04:49:56 PST 2004
>Last-Modified:  Sat Jan 17 04:49:56 PST 2004
>Originator:     Tom Pavel
>Release:        4.2-RELEASE
>Organization:
Network Physics
>Environment:
superbird[84]% uname -a
FreeBSD superbird.networkphysics.com 4.2-RELEASE FreeBSD 4.2-RELEASE #0: Fri Dec  8 11:04:48 PST 2000     root@superbird.networkphysics.com:/usr/src/sys/compile/NPCTL-4.1-SMP  i386

>Description:
The DB_DIR env/make variable allows one to build/installmysql
into a different default database dir.  I expected that if I built
a package using a particular setting of DB_DIR, then the binary 
package would install into that dir on another machine.  This almost 
works, but presently requires that DB_DIR be setenv-ed on the other
machine before pkg_add.  I think that the pkg-install script should 
be editted as part of the package build process to default to the 
specified directory.
>How-To-Repeat:
/usr/ports/databases/mysql323-server 
make DB_DIR=/u1/mysql package

Try to install this on another machine (mkdir /u1 first).
The mysqld will hang up because it lacks permission to /u1/mysql
>Fix:
I think you need to pass pkg-install through sed, just like is done for 
the mysql-server.sh script.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports->dirk 
Responsible-Changed-By: dirk 
Responsible-Changed-When: Wed Jan 31 03:13:17 PST 2001 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=24749 

From: "David W. Chapman Jr." <dwcjr@inethouston.net>
To: <FreeBSD-gnats-submit@freebsd.org>, <pavel@networkphysics.com>
Cc: "Dirk Froemberg" <dirk@FreeBSD.org>
Subject: Re: ports/24749: mysql323-server pkg-install script doesn't propagate DB_DIR
Date: Fri, 8 Jun 2001 15:35:02 -0500

 Does this problem still exist?
 
 

From: Dirk Froemberg <dirk@freebsd.org>
To: FreeBSD-gnats-submit@freebsd.org, pavel@networkphysics.com
Cc: "David W. Chapman Jr." <dwcjr@inethouston.net>
Subject: Re: ports/24749: mysql323-server pkg-install script doesn't propagate DB_DIR
Date: Sat, 9 Jun 2001 10:10:25 +0200

 On Fri, Jun 08, 2001 at 03:35:02PM -0500, David W. Chapman Jr. wrote:
 > Does this problem still exist?
 
 Yes! A real solution isn't that easy though.

From: Tom Pavel <pavel@NetworkPhysics.COM>
To: Dirk Froemberg <dirk@freebsd.org>
Cc: FreeBSD-gnats-submit@freebsd.org,
	"David W. Chapman Jr." <dwcjr@inethouston.net>
Subject: Re: ports/24749: mysql323-server pkg-install script doesn't propagate DB_DIR 
Date: Mon, 11 Jun 2001 01:34:26 -0700

 > > Does this problem still exist?
 > 
 > Yes! A real solution isn't that easy though.
 
 
 I see two things that are a bit murky.  One is what exactly the DB_DIR
 variable is supposed to achieve.  If it is just supposed to be
 settable at install time to override /var/db/mysql, then I should
 retract my PR.  On the other hand, the behavior that seemed obvious to
 me was that the setting of DB_DIR be compiled into the pkg.  This is
 akin to building emacs with WITHOUT_X11=yes, for example.
 
 The other murky area is what is an adequate solution.  My proposal was
 to make pkg-install read something like:
 
     PATH=/bin:/usr/sbin
     if [ -z "${DB_DIR}" ]; then
 	    DB_DIR=%%DB_DIR%%
     fi
 
 and have the Makefile run something like 'sed -e s;%%DB_DIR%%;$(DB_DIR);g'
 to generate the actual pkg-install file used in the binary pkg.  I
 think this meets my objective of having DB_DIR be a build-time
 configurable, while still having it around as an install-time
 override.
 
 That said, I would not be too surprised if the actual situation is
 much more subtle than I am able to recognize offhand.  I'm sure Dirk
 has thought about these issues much more than I have.  If there is no
 good way to do what I asked for, then I would think the variables
 should be a little better documented so that others do not fall into
 the same trap that I did.
 
 
 Tom Pavel
 
 Network Physics
 pavel@networkphysics.com / pavel@alum.mit.edu 
 
 
Responsible-Changed-From-To: dirk->freebsd-ports-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Oct 24 23:47:57 PDT 2003 
Responsible-Changed-Why:  
dirk no longer maintains this port, so set this PR free. 

Reviewed by: marcus. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=24749 
Responsible-Changed-From-To: freebsd-ports-bugs->ale 
Responsible-Changed-By: pav 
Responsible-Changed-When: Fri Jan 16 01:28:49 PST 2004 
Responsible-Changed-Why:  
Over to qualified sorceror. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=24749 
State-Changed-From-To: open->closed 
State-Changed-By: ale 
State-Changed-When: Sat Jan 17 04:49:32 PST 2004 
State-Changed-Why:  
Patch committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=24749 
>Unformatted:
