Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Feb 2006 18:32:00 GMT
From:      Trix Farrar <trix@basement.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/93304: [PATCH] bacula-server port to no longer link llibxpg4
Message-ID:  <200602131832.k1DIW0Yl010074@www.freebsd.org>
Resent-Message-ID: <200602131840.k1DIe6OJ006993@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         93304
>Category:       ports
>Synopsis:       [PATCH] bacula-server port to no longer link llibxpg4
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 13 18:40:06 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Trix Farrar
>Release:        6.0-RELEASE-p4
>Organization:
>Environment:
FreeBSD willow.basement.net 6.0-RELEASE-p4 FreeBSD 6.0-RELEASE-p4 #0: Mon Jan 30 22:59:12 CST 2006     root@willow.basement.net:/usr/obj/usr/src/sys/BASEMENT  i386              
>Description:
The autoconf/configure.in file from the Bacula 1.38.5 distfile contains a FreeBSD specific stanza at line 2130 that attempts to explicitly link libxpg4.  The functions from this library have been incorporated into libc since 4.0-STABLE, so  this is not strictly necessary any more.
              
>How-To-Repeat:
1. Install 5.4-RELEASE on host A.
1. Install 6.0-RELEASE on host B.
3. Upgrade host A to 6.0 release using procedure from /usr/src/UPDATING.
 (libxpg4.so.3 will still be present in /usr/lib after the upgrade)
4. On host A, cd /usr/ports/sysutils/bacula-server ; make package
5. Transfer (or mount) /usr/ports/packages/All/bacula-server-1.38.5_1.tbz from host A to host B.
6. Install bacula-server package on host B with pkg_add -R or portupgrade.
7.  attempt to run /usr/local/sbin/bacula-sd or /usr/local/sbin/bacula-dir.  ld will fail because libxpg4.so.3 is not present.

>Fix:
--- bacula-1.38.5_2.patch begins here ---
diff -ru bacula-server-old/Makefile bacula-server/Makefile
--- bacula-server-old/Makefile  Mon Feb 13 11:02:57 2006
+++ bacula-server/Makefile      Mon Feb 13 12:09:05 2006
@@ -7,7 +7,7 @@

 PORTNAME=      bacula
 PORTVERSION=   1.38.5
-PORTREVISION=  1
+PORTREVISION=  2
 CATEGORIES=    sysutils
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=    bacula
diff -ru bacula-server-old/files/patch-configure bacula-server/files/patch-configure
--- bacula-server-old/files/patch-configure     Mon Feb 13 11:02:57 2006
+++ bacula-server/files/patch-configure Mon Feb 13 12:21:49 2006
@@ -1,21 +1,88 @@
-*** configure.org      Sun Mar  6 16:46:54 2005
---- configure  Sun Mar  6 16:49:20 2005
-***************
-*** 29490,29497 ****
-       DISTVER=`uname -a |awk '{print $3}'`
-       VER=`echo $DISTVER | cut -c 1`
-       if test x$VER = x4 ; then
-!         PTHREAD_LIB="-pthread"
-!         CFLAGS="${CFLAGS} -pthread"
-       fi
-       lld="qd"
-       llu="qu"
---- 21037,21044 ----
-       DISTVER=`uname -a |awk '{print $3}'`
-       VER=`echo $DISTVER | cut -c 1`
-       if test x$VER = x4 ; then
-!         PTHREAD_LIB="${PTHREAD_LIBS}"
-!         CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}"
-       fi
-       lld="qd"
-       llu="qu"
+--- configure-old      Mon Feb 13 12:19:35 2006
++++ configure  Mon Feb 13 12:21:14 2006
+@@ -28330,74 +28330,6 @@
+                     # AC_FUNC_FNMATCH    dnl use local version
+
+
+-echo "$as_me:$LINENO: checking for setlocale in -lxpg4" >&5
+-echo $ECHO_N "checking for setlocale in -lxpg4... $ECHO_C" >&6
+-if test "${ac_cv_lib_xpg4_setlocale+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lxpg4  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-
+-/* Override any gcc2 internal prototype to avoid an error.  */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+-char setlocale ();
+-int
+-main ()
+-{
+-setlocale ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+-  (eval $ac_link) 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-       { ac_try='test -z "$ac_c_werror_flag"
+-                       || test ! -s conftest.err'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; } &&
+-       { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-  ac_cv_lib_xpg4_setlocale=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_xpg4_setlocale=no
+-fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
+-LIBS=$ac_check_lib_save_LIBS
+-fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_xpg4_setlocale" >&5
+-echo "${ECHO_T}$ac_cv_lib_xpg4_setlocale" >&6
+-if test $ac_cv_lib_xpg4_setlocale = yes; then
+-  LIBS="$LIBS -lxpg4"
+-fi
+-
+ echo "$as_me:$LINENO: checking for gettext in -lintl" >&5
+ echo $ECHO_N "checking for gettext in -lintl... $ECHO_C" >&6
+ if test "${ac_cv_lib_intl_gettext+set}" = set; then
+@@ -29566,8 +29498,8 @@
+       DISTVER=`uname -a |awk '{print $3}'`
+       VER=`echo $DISTVER | cut -c 1`
+       if test x$VER = x4 ; then
+-         PTHREAD_LIB="-pthread"
+-         CFLAGS="${CFLAGS} -pthread"
++         PTHREAD_LIB="${PTHREAD_LIBS}"
++         CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}"
+       fi
+       lld="qd"
+       llu="qu"
--- bacula-1.38.5_2.patch ends here ---
              
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200602131832.k1DIW0Yl010074>