From nobody@FreeBSD.org  Mon Aug  8 17:30:48 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6F7021065679
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  8 Aug 2011 17:30:48 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 5F3778FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  8 Aug 2011 17:30:48 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p78HUmvU095915
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 8 Aug 2011 17:30:48 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p78HUmRw095914;
	Mon, 8 Aug 2011 17:30:48 GMT
	(envelope-from nobody)
Message-Id: <201108081730.p78HUmRw095914@red.freebsd.org>
Date: Mon, 8 Aug 2011 17:30:48 GMT
From: Jo Rhett <jrhett@netconsonance.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: apache WITH_BDB_BASE settings described in UPDATING do not work
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         159608
>Category:       ports
>Synopsis:       www/apache22: apache WITH_BDB_BASE settings described in UPDATING do not work
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 08 17:40:11 UTC 2011
>Closed-Date:    Sat Aug 25 19:47:19 UTC 2012
>Last-Modified:  Mon Aug 27 17:40:01 UTC 2012
>Originator:     Jo Rhett
>Release:        8.2
>Organization:
>Environment:
FreeBSD triceratops.netconsonance.com 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Fri Feb 18 02:24:46 UTC 2011     root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
There are settings described in ports UPDATING file and implemented in Makefile.modules to build apache with the base bdb 1.85 libraries.  Using these settings produces an apache which cannot authenticate against bdb 1.85 files.

dbmmanage /path/to/file view/adduser/delete/etc works fine
file /path/to/file
		/path/to/file: Berkeley DB 1.85 (Hash, version 2, native byte-order)

Accessing from the web server always returns a 500 error with the following in the error log:
	(2)No such file or directory: could not open dbm (type default) auth file: /path/to/passwd.dat

I've recompiled apr and apache with a variety of different options, and nothing works.  apr without any databases doesn't work. apr with BDB doesn't work, etc.  My options for apache have remained the same:
	APACHE_PORT=www/apache22
	WITH_DBM=bdb
	WITH_BDB_BASE=yes

Running a ktrace shows that even though it is built this way, it continues to search for a DBM file.

# kdump |grep /passwd
  724 httpd    NAMI  "/path/to/passwd.dat.dir"

>How-To-Repeat:
/etc/make.conf: 
        APACHE_PORT=www/apache22
	WITH_DBM=bdb
	WITH_BDB_BASE=yes

cd /usr/ports/www/apache22
make
make install

Create a DB 1.85 authentication file like so:
  jrhett:$1$JJueifadJ$jjp1FrHQ1OLnGwpYc3Egr1:admin

file /path/to/passwd.dat
		/path/to/passwd.dat: Berkeley DB 1.85 (Hash, version 2, native byte-order)

Edit the httpd.conf like so:
<Directory />
AuthBasicProvider       dbm
AuthDBMType             default
AuthDBMUserFile         /path/to/passwd.dat
AuthDBMGroupFile        /pathto/passwd.dat
</Directory>

>Fix:
No clue.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-i386->freebsd-ports-bugs 
Responsible-Changed-By: remko 
Responsible-Changed-When: Thu Aug 11 06:45:01 UTC 2011 
Responsible-Changed-Why:  
Reassign to the ports team for investigation. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=159608 
Responsible-Changed-From-To: freebsd-ports-bugs->apache 
Responsible-Changed-By: pgollucci 
Responsible-Changed-When: Tue Aug 16 00:29:39 UTC 2011 
Responsible-Changed-Why:  
over to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=159608 
State-Changed-From-To: open->analyzed 
State-Changed-By: ohauer 
State-Changed-When: Sat Aug 25 19:33:44 UTC 2012 
State-Changed-Why:  
During the rewrite / cleanup of the www/apache22 port 
I removed all parts which where needed to build apr/apr-util, 
since they are not apache httpd related. 

The lines do no longer exist (they where a leftover from 
years ago where the apachex port was repocopied to apache22. 

The bundled apr-util and the port devel/apr? does not support 
building db support against the db185 version which is included 
in the FreeBSD libc, so there is no way to have support for db 
files which are created with apache13. 

Even this answer is not the one you expect I have to say sorry. 
I will close the pr. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=159608 
State-Changed-From-To: analyzed->closed 
State-Changed-By: ohauer 
State-Changed-When: Sat Aug 25 19:43:37 UTC 2012 
State-Changed-Why:  
devel/apr1 can not build d185 support against libc. 
apache22 takes the db information from apu-util so the 
options WITH_DBM=bdb, WITH_BDB_BASE=yes where useless 
and a false suggestion. 



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

From: Jo Rhett <jrhett@netconsonance.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/159608: www/apache22: apache WITH_BDB_BASE settings described in UPDATING do not work
Date: Mon, 27 Aug 2012 10:14:04 -0700

 --Apple-Mail=_1390C092-11FC-4BF0-9B9A-25EA06E29CAA
 Content-Transfer-Encoding: quoted-printable
 Content-Type: text/plain;
 	charset=us-ascii
 
 When did this change? It absolutely wasn't broken since apache 1.3.  I =
 was happily using the WITH_BDB_BASE settings with apache 2.0 and then =
 2.2 right up until I tried to recompile for 2.2.21. So it was broken =
 between 2.2.17 and 2.2.21.
 
 Finally, the dbmmanage which ships with apache only works with the built =
 in db, so clearly it is intended to work. Something was broken in the =
 port.
 
 --=20
 Jo Rhett
 Net Consonance : net philanthropy to improve open source and internet =
 projects.
 
 
 
 
 --Apple-Mail=_1390C092-11FC-4BF0-9B9A-25EA06E29CAA
 Content-Transfer-Encoding: quoted-printable
 Content-Type: text/html;
 	charset=us-ascii
 
 <html><head></head><body style=3D"word-wrap: break-word; =
 -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">When =
 did this change? It absolutely wasn't broken since apache 1.3. &nbsp;I =
 was happily using the WITH_BDB_BASE settings with apache 2.0 and then =
 2.2 right up until I tried to recompile for 2.2.21. So it was broken =
 between 2.2.17 and 2.2.21.<div><br></div><div>Finally, the dbmmanage =
 which ships with apache only works with the built in db, so clearly it =
 is intended to work. Something was broken in the =
 port.<br><div><div><br><div>
 <span class=3D"Apple-style-span" style=3D"border-collapse: separate; =
 color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; =
 font-variant: normal; font-weight: normal; letter-spacing: normal; =
 line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: =
 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: =
 0px; -webkit-border-horizontal-spacing: 0px; =
 -webkit-border-vertical-spacing: 0px; =
 -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: =
 auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span =
 class=3D"Apple-style-span" style=3D"font-size: 12px; "><div =
 style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
 margin-left: 0px; "><font face=3D"Helvetica" size=3D"3" style=3D"font: =
 normal normal normal 12px/normal Helvetica; ">--&nbsp;</font></div><div =
 style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
 margin-left: 0px; "><font face=3D"Helvetica" size=3D"3" style=3D"font: =
 normal normal normal 12px/normal Helvetica; ">Jo =
 Rhett</font></div></span><span class=3D"Apple-style-span" =
 style=3D"font-size: 12px; ">Net Consonance :&nbsp;</span><span =
 class=3D"Apple-style-span" style=3D"font-size: 12px; ">net philanthropy =
 to improve open source and internet projects.</span><br><span =
 class=3D"Apple-style-span" style=3D"border-collapse: separate; color: =
 rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: =
 normal; font-variant: normal; font-weight: normal; letter-spacing: =
 normal; line-height: normal; orphans: 2; text-indent: 0px; =
 text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; =
 -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: =
 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: =
 auto; -webkit-text-stroke-width: 0px; "><div style=3D"word-wrap: =
 break-word; -webkit-nbsp-mode: space; -webkit-line-break: =
 after-white-space; "><div><div><span class=3D"Apple-style-span" =
 style=3D"font-size: 12px; "><div style=3D"margin-top: 0px; margin-right: =
 0px; margin-bottom: 0px; margin-left: 0px; =
 "><br></div></span></div></div></div></span></span><br =
 class=3D"Apple-interchange-newline">
 </div>
 <br></div></div></div></body></html>=
 
 --Apple-Mail=_1390C092-11FC-4BF0-9B9A-25EA06E29CAA--
>Unformatted:
