The DB_DIR env/make variable allows one to build/installmysql 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. Fix: I think you need to pass pkg-install through sed, just like is done for the mysql-server.sh script. 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
Responsible Changed From-To: freebsd-ports->dirk Over to maintainer.
Does this problem still exist?
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.
> > 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 dirk no longer maintains this port, so set this PR free. Reviewed by: marcus.
Responsible Changed From-To: freebsd-ports-bugs->ale Over to qualified sorceror.
State Changed From-To: open->closed Patch committed, thanks!