Bacula 3.0.1 for Mac OS X

I wont be doing a build of Bacula for Mac OS X again any time soon, if at all, for a number of reasons;

  1. I no longer have access to Mac OS X 10.4 running on an Intel chip
  2. I am actively transitioning to BackupPC

Below youll find the method I have been using to construct all the .pkg installers youll find on this site. If you have any questions about the process please post them in the comments.

You will need at least three installations of Mac OS X – one 10.4 on PPC, one 10.4 on Intel, and one 10.5 on any architecture. On each 10.4 installation, download the bacula source code, decompress it, and run the following command to compile it in a way that plays nice with the rest of Mac OS X

./configure --prefix=/usr/local --sysconfdir=/usr/local/etc \
--mandir=/usr/local/share/man --enable-client-only \
--with-openssl --with-tcp-wrappers --disable-dependency-tracking \

With that done, copy the compiled binaries from each architecture to your Mac OS X 10.5 installation to build the pkg installer. The files in question are;

  • src/filed/bacula-fd
  • src/filed/bacula-fd.conf
  • src/console/bconsole
  • src/console/bconsole.conf

I use the architecture type to give them unique names… bacula-fd-ppc and bacula-fd-intel for example. After thats done, use lipo to combine the two binaries into one fat multi-arch binary

lipo -create bacula-fd-intel bacula-fd-ppc -output bacula-fd

Now do the same for bconsole

lipo -create bconsole-intel bconsole-ppc -output bconsole

Having done that you now need to set up a mock directory structure to place the binaries into. You can then use PackageMaker on Mac OS X to build the pkg installer from that mock directory. My directory looks like this;


You can see where I’ve placed bacula-fd and bconsole as well as their conf files. There are some gzipped man pages in there too, which you can grab out of the compiled source tree and gzip manually. Finally there is a .plist file which is required to make auto startup/shutdown of bacula-fd happen on Mac OS X.

The last important bit to note is that I use some modified .conf files which have special placeholders for host names. I then use pre-inst and post-inst scripts in PackageMaker to look for previous versions of packages, insert the current hostname into the .conf files, etc. I have included my source tree and PackageMaker files and scripts below for the last version I released (2.4.4) for your reference.

After all the above is done and the directory structure is all set up you should be able to just fire up PackageMaker, change a few variables in it (set permissions, set version numbers, make sure proper pre and post-inst scripts are being used, etc.) and then build the pkg installer.

Enjoy :)

5 thoughts on “Bacula 3.0.1 for Mac OS X”

  1. I’m a packaging/bacula noob, but if i’m reading your post right, I need to place bacula-fd.conf, bacula-fd, bconsole.conf, etc. into appropriate dirs (/usr/local/etc, bin, share) that I create on the machine that I’m building the package on. When i take that built package and install it on another mac, does it create the necessary directories for me?

  2. Joon,

    You place the conf files and so forth into the *false root* directory… so ~/src/bacula/usr/local/etc or whatever. Dont put them into the “real” /usr/local/etc/.

    To answer the second part, yes, the installer package will create any missing dirs with whatever permissions you set in Package

  3. Joon,

    Good question :) I honestly don’t remember. I probably based it off some other plist?


  4. I m installating bacula on mac, though i m following procedure carefully still i cannot install it, when i run make command it wont work, it gives error. even i have download and configured depksgs, and depkgs-qt for mac. wt things might be missing, pls guide me throught

    thank you in advance

Leave a Reply

Your email address will not be published. Required fields are marked *