Bacula-users

Re: [Bacula-users] [Bacula-devel] Heads up -- no Bacula encryption on FreeBSD Release 7

2009-06-22 07:08:21
Subject: Re: [Bacula-users] [Bacula-devel] Heads up -- no Bacula encryption on FreeBSD Release 7
From: Martin Simmons <martin AT lispworks DOT com>
To: dan AT langille DOT org
Date: Mon, 22 Jun 2009 12:03:59 +0100
>>>>> On Sun, 21 Jun 2009 11:55:43 -0400, Dan Langille said:
> 
> Kern Sibbald wrote:
> > Hello Dan,
> > 
> > This is to warn you that Bacula will probably not be able to be compiled 
> > and 
> > run with encryption on Release 7 of FreeBSD.  This is because the version 
> > of 
> > pthreads in that release has pthread_t defined as a structure, which is 
> > incompatible with OpenSSL.
> 
> Initial conversations indicate that pthread_t is a point to a structure.
> 
>  From /usr/include/sys/_pthreadtypes.h
> 
>      typedef struct  pthread                 *pthread_t;
> 
> See http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/sys/_pthreadtypes.h
> 
> Does this help?

I concur.  AFAIK, pthread_t is a pointer in all of the FreeBSD thread
libraries so far.


> > This will not work with the new FreeBSD implementation of pthreads. Perhaps 
> > the FreeBSD pthreads developers have a FreeBSD specific solution for this 
> > problem. If so, could you please let me know.  If not, Bacula encryption 
> > will 
> > unfortunately not be available on the new version of FreeBSD.
> 
> A FreeBSD project
> 
> The FreeBSD port applies these thread related patches to the Bacula source:
> 
> dan@polo:/usr/ports/sysutils/bacula-server/files] $ cat patch-src_lib_jcr.c
> --- src/lib/jcr.c.orig  2009-04-12 11:07:07.079940037 -0400
> +++ src/lib/jcr.c       2009-04-12 11:07:20.116947254 -0400
> @@ -1063,8 +1063,8 @@
>         fprintf(fp, "\tuse_count=%i\n",
>                 jcr->use_count());
>   #else
> -      fprintf(fp, "\tuse_count=%i threadid=0x%x\n",
> -              jcr->use_count(), (int)jcr->my_thread_id);
> +      fprintf(fp, "\tuse_count=%i threadid=0x%lx\n",
> +              jcr->use_count(), (long)jcr->my_thread_id);
>   #endif
>         fprintf(fp, "\tJobType=%c JobLevel=%c\n",
>                 jcr->get_JobType(), jcr->get_JobLevel());
> [dan@polo:/usr/ports/sysutils/bacula-server/files] $
> 
> 
> 
> --- src/cats/sql.c.orig 2009-04-12 11:07:46.218959381 -0400
> +++ src/cats/sql.c      2009-04-12 11:08:15.509974021 -0400
> @@ -759,7 +759,7 @@
>      if (mdb->lock.valid == RWLOCK_VALID) {
>         fprintf(fp, "\tRWLOCK=%p w_active=%i w_wait=%i\n", &mdb->lock, 
> mdb->lock.w_active, mdb->lock.w_wait);
>   #ifndef HAVE_WIN32
> -      fprintf(fp, "\t\tthreadid=0x%x mutex=%p\n", 
> (int)mdb->lock.writer_id, &mdb->lock.mutex);
> +      fprintf(fp, "\t\tthreadid=0x%lx mutex=%p\n", 
> (long)mdb->lock.writer_id, &mdb->lock.mutex);
>   #endif
>      }
>   }

These should be merged into Bacula, right?

__Martin

------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users