From nobody@FreeBSD.org  Mon Jun  4 14:36:17 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 5842C37B403
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  4 Jun 2001 14:36:17 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.3/8.11.3) id f54LaHj15213;
	Mon, 4 Jun 2001 14:36:17 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200106042136.f54LaHj15213@freefall.freebsd.org>
Date: Mon, 4 Jun 2001 14:36:17 -0700 (PDT)
From: dwimsey@rtci.com
To: freebsd-gnats-submit@FreeBSD.org
Subject: OpenLDAP port sets wrong localstate dir during configure phase causing complete database loss on every reboot.
X-Send-Pr-Version: www-1.0

>Number:         27879
>Category:       ports
>Synopsis:       OpenLDAP port sets wrong localstate dir during configure phase causing complete database loss on every reboot.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 04 14:40:03 PDT 2001
>Closed-Date:    Mon Jun 4 15:37:45 PDT 2001
>Last-Modified:  Mon Jun 04 15:37:56 PDT 2001
>Originator:     David Wimsey
>Release:        5.0-CURRENT
>Organization:
Research Triangle Commerce, Inc.
>Environment:
FreeBSD illusion.schizo.com 5.0-20010320-CURRENT FreeBSD 5.0-20010320-CURRENT #0: Tue Mar 20 16:16:37 GMT 2001 root@usw2.freebsd.org:/usr/src/sys/compile/GENERIC i386

>Description:
In -CURRENT atleast, during boot /var/run is purged by clean_var (line 326) of 
/etc/rc.  Since the port sets the localstate dir to /var/run, 
OpenLDAP puts its database in /var/run/openldap-ldbm by default.

This change was introduced in version 1.10 of the Makefile
http://www.freebsd.org/cgi/cvsweb.cgi/ports/net/openldap/Makefile.diff?r1=1.9&r2=1.10

But I can't find any reason why it was set to /var/run other then to put the .pid and .args file in /var/run ... however this won't work with the directory being cleared at boot.
>How-To-Repeat:
Reboot. /var/run is cleared, OpenLDAP starts and creates a blank database.
>Fix:
--- Makefile.orig       Mon Jun  4 16:10:42 2001
+++ Makefile    Mon Jun  4 16:09:34 2001
@@ -25,7 +25,7 @@
 
 USE_LIBTOOL=   yes
 
-CONFIGURE_ARGS=        --localstatedir=/var/run \
+CONFIGURE_ARGS=        --localstatedir=/var/db \
                --enable-shared \
                --enable-dns
 

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: roam 
State-Changed-When: Mon Jun 4 15:37:45 PDT 2001 
State-Changed-Why:  
Committed, thanks! 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=27879 
>Unformatted:
