From nobody@FreeBSD.org  Sun May  6 21:30:52 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id AE4FC16A403
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  6 May 2007 21:30:52 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id 92ECF13C45A
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  6 May 2007 21:30:52 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l46LUqVL079364
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 6 May 2007 21:30:52 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id l46LPpr4072506;
	Sun, 6 May 2007 21:25:51 GMT
	(envelope-from nobody)
Message-Id: <200705062125.l46LPpr4072506@www.freebsd.org>
Date: Sun, 6 May 2007 21:25:51 GMT
From: John Hermes<John.Hermes@miami.k12.oh.us>
To: freebsd-gnats-submit@FreeBSD.org
Subject: bacula-server 2.0.3 port build fails for sqlite3 backend
X-Send-Pr-Version: www-3.0

>Number:         112468
>Category:       ports
>Synopsis:       sysutils/bacula-server 2.0.3 port build fails for sqlite3 backend
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 06 21:40:02 GMT 2007
>Closed-Date:    Fri Jul 06 18:29:01 GMT 2007
>Last-Modified:  Fri Jul  6 18:30:10 GMT 2007
>Originator:     John Hermes
>Release:        6.2-RELEASE-p4
>Organization:
Miami County ESC
>Environment:
FreeBSD squid.miami.k12.oh.us 6.2-RELEASE-p4 FreeBSD 6.2-RELEASE-p4 #0: Thu May  3 19:55:27 EDT 2007     jhermes@squid.miami.k12.oh.us:/usr/obj/usr/src/sys/SMP_PIII  i386

>Description:
Port fails to build with the following:

Syntax error: redirection unexpected
*** Error code 2

Stop in /usr/ports/sysutils/bacula-server.
*** Error code 1

After installing the sqlite3-threaded port, attempting to build bacula-server 2.0.3 results in a script failure after successful extraction and patching phases.

Suspect shell script follows (obtained using make -dA):

for i in sqlite3-threads>=0:/usr/ports/databases/sqlite3-threads intl:/usr/ports/devel/gettext; do  lib=${i%%:*};  case $lib in  *.*.*)     pattern="`echo $lib | /usr/bin/sed -e 's/\./\\\\./g'`" ;; *.*)  pattern="${lib%%.*}\.${lib#*.}" ;; *)   pattern="$lib" ;; esac;  dir=${i#*:};  target=${i##*:};  if test $dir = $target; then  target="install";  depends_args="";  else  dir=${dir%%:*};  fi;  if [ -z "" ] ; then  echo -n "===>   bacula-server-2.0.3 depends on shared library: $lib";  if /sbin/ldconfig -r | /usr/bin/grep -vwF -e "/usr/local/lib/compat/pkg" | /usr/bin/grep -qwE -e "-l$pattern"; then  echo " - found";  if [ 0 = 1 ]; then  echo "       (but building it anyway)";  notfound=1;  else  notfound=0;  fi;  else  echo " - not found";  notfound=1;  fi;  else  echo -n "===>   bacula-server-2.0.3 depends on shared library in : $lib";  if /usr/sbin/chroot  /sbin/ldconfig -r | /usr/bin/grep -vwF -e "/usr/local/lib/compat/pkg" | /usr/bin/grep -qwE -e "-l$pattern"; then  echo " 
 - found";  if [ 0 = 1 ]; then  echo "       (but building it anyway)";  notfound=1;  else  notfound=0;  fi;  else  echo " - not found";  notfound=1;  fi;  fi;  if [ $notfound != 0 ]; then  echo "===>    Verifying $target for $lib in $dir";  if [ ! -d "$dir" ]; then  echo "     => No directory for $lib.  Skipping..";  else  if [ X != "X" ]; then  subpkgfile=`(cd $dir; make $depends_args -V PKGFILE)`;  if [ -r "${subpkgfile}" -a "$target" = "install" ]; then  if [ -z "" ] ; then  echo "===>   Installing existing package ${subpkgfile}";  /usr/sbin/pkg_add ${subpkgfile};  else  echo "===>   Installing existing package ${subpkgfile} into ";  /usr/sbin/pkg_add -C  ${subpkgfile};  fi;  else  (cd $dir; make -DINSTALLS_DEPENDS $target $depends_args) ;  fi;  else  (cd $dir; make -DINSTALLS_DEPENDS $target $depends_args) ;  fi;  if [ -z "" ] ; then  echo "===>   Returning to build of bacula-server-2.0.3";  else  echo "===>   Returning to build of bacula-server-2.0.3 for ";  fi;  if ! /
 sbin/ldconfig -r | /usr/bin/grep -vwF -e "/usr/local/lib/com!
 pat/pkg"
 | /usr/bin/grep -qwE -e "-l$pattern"; then  echo "Error: shared library \"$lib\" does not exist";  false;  fi;  fi;  fi;  done
Syntax error: redirection unexpected
*** Error code 2

Stop in /usr/ports/sysutils/bacula-server.
*** Error code 1

>How-To-Repeat:
After installing the sqlite3-threaded port, attempting to build bacula-server 2.0.3 results in a script failure after successful extraction and patching phases.

cd /usr/ports/sysutils/bacula-server

make WITH_SQLITE3=YES
>Fix:
Workaround:

Use 'make config' to choose another database backend and rebuild.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Sun May 6 22:22:51 UTC 2007 
State-Changed-Why:  
Awaiting maintainers feedback 

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

From: John Hermes <John.Hermes@miami.k12.oh.us>
To: bug-followup@FreeBSD.org, John.Hermes@miami.k12.oh.us
Cc:  
Subject: Re: ports/112468: sysutils/bacula-server 2.0.3 port build fails for
 sqlite3 backend
Date: Fri, 18 May 2007 14:29:48 -0400

 Here's a diff that fixed compilation for me. It doesn't check for the
 threaded sqlite3 library, though.
 
 --- Makefile.orig       Fri May 18 13:56:41 2007
 +++ Makefile    Fri May 18 14:01:29 2007
 @@ -146,7 +146,7 @@
  SUB_LIST+=             REQ_MYSQL="" REQ_PGSQL=postgresql
  .elif defined(WITH_SQLITE3)
  CONFIGURE_ARGS+=       --with-sqlite3=yes
 -LIB_DEPENDS+=          sqlite3-threads>=0:${PORTSDIR}/databases/sqlite3-threads
 +LIB_DEPENDS+=          sqlite3:${PORTSDIR}/databases/sqlite3-threads
  DBTYPE=                        sqlite3
  .else
  CONFIGURE_ARGS+=       --with-sqlite=yes
State-Changed-From-To: feedback->closed 
State-Changed-By: miwi 
State-Changed-When: Fri Jul 6 18:29:00 UTC 2007 
State-Changed-Why:  
Committed. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/112468: commit references a PR
Date: Fri,  6 Jul 2007 18:28:55 +0000 (UTC)

 miwi        2007-07-06 18:28:48 UTC
 
   FreeBSD ports repository
 
   Modified files:
     sysutils/bacula-server Makefile 
   Log:
   - Fix build with sqlite3
   
   PR:             112468
   Submitted by:   John Hermes<John.Hermes@miami.k12.oh.us>
   Approved by:    maintainer via irc
   
   Revision  Changes    Path
   1.85      +1 -1      ports/sysutils/bacula-server/Makefile
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
