Sophie

Sophie

distrib > Fedora > 16 > i386 > by-pkgid > df754e4e6f7f5fc8ab9d6ed8559f3e3d > files > 293

bacula-docs-5.0.3-19.fc16.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

<!--Converted with LaTeX2HTML 2008 (1.71)
original version by:  Nikos Drakos, CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>Bacula RPM Packaging FAQ</TITLE>
<META NAME="description" CONTENT="Bacula RPM Packaging FAQ">
<META NAME="keywords" CONTENT="utility">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">

<META NAME="Generator" CONTENT="LaTeX2HTML v2008">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="utility.css">

<LINK REL="next" HREF="GNU_Free_Documentation_Lice.html">
<LINK REL="previous" HREF="Volume_Utility_Tools.html">
<LINK REL="up" HREF="Bacula_Utility_Programs.html">
<LINK REL="next" HREF="GNU_Free_Documentation_Lice.html">
</HEAD>

<BODY >
<!--Navigation Panel-->
<A NAME="tex2html155"
  HREF="GNU_Free_Documentation_Lice.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html149"
  HREF="Bacula_Utility_Programs.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html143"
  HREF="Volume_Utility_Tools.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html151"
  HREF="Contents.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html153"
  HREF="GNU_Free_Documentation_Lice.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html156"
  HREF="GNU_Free_Documentation_Lice.html">GNU Free Documentation License</A>
<B> Up:</B> <A NAME="tex2html150"
  HREF="Bacula_Utility_Programs.html">Bacula Utility Programs</A>
<B> Previous:</B> <A NAME="tex2html144"
  HREF="Volume_Utility_Tools.html">Volume Utility Tools</A>
 &nbsp; <B>  <A NAME="tex2html152"
  HREF="Contents.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html154"
  HREF="GNU_Free_Documentation_Lice.html">Index</A></B> 
<BR>
<BR>
<!--End of Navigation Panel-->
<!--Table of Child-Links-->
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>

<UL>
<LI><A NAME="tex2html157"
  HREF="Bacula_RPM_Packaging_FAQ.html#SECTION00310000000000000000">Answers</A>
<LI><A NAME="tex2html158"
  HREF="Bacula_RPM_Packaging_FAQ.html#SECTION00320000000000000000">Build Options</A>
<LI><A NAME="tex2html159"
  HREF="Bacula_RPM_Packaging_FAQ.html#SECTION00330000000000000000">RPM Install Problems</A>
</UL>
<!--End of Table of Child-Links-->
<HR>

<H1><A NAME="SECTION00300000000000000000"></A>
<A NAME="RpmFaqChapter"></A>
<BR>
Bacula RPM Packaging FAQ
</H1>
<A NAME="1565"></A>
<A NAME="1566"></A>

<P>

<OL>
<LI>How do I build Bacula for platform xxx?faq1  
</LI>
<LI>How do I control which database support gets built?faq2 

<P>
</LI>
<LI>What other defines are used?faq3  
</LI>
<LI>I'm getting errors about not having permission when I try to build the
   packages. Do I need to be root?faq4  
</LI>
<LI>I'm building my own rpms but on all platforms and compiles I get an
   unresolved dependency for something called
   /usr/afsws/bin/pagsh.faq5 
</LI>
<LI>I'm building my own rpms because you don't publish for my platform.
    Can I get my packages released to sourceforge for other people to use?faq6 
</LI>
<LI>Is there an easier way than sorting out all these command line options?faq7
</LI>
<LI>I just upgraded from 1.36.x to 1.38.x and now my director daemon won't start. It appears to start but dies silently and I get a "connection refused" error when starting the console. What is wrong?faq8  
</LI>
<LI>There are a lot of rpm packages. Which packages do I need for what?faq9  
</LI>
<LI>What happened to the build switches for gnome console, wxconsole and bat?faq10  
</LI>
</OL>

<P>

<H1><A NAME="SECTION00310000000000000000">
Answers</A>
</H1>
<A NAME="1509"></A>

<P>

<OL>
<LI><A NAME="faq1"></A>   <B>How do I build Bacula for platform xxx?</B>
   The bacula spec file contains defines to build for several platforms: 
<BR>   
<BR>
Red Hat 7.x (rh7), Red Hat 8.0 (rh8), Red Hat 9 (rh9), 
<BR>
Fedora Core (fc1, fc3, fc4, fc5, fc6, fc7, fc8, fc9, fc10), 
<BR>
Whitebox Enterprise Linux 3.0 (wb3), 
<BR>
Red Hat Enterprise Linux (rhel3, rhel4, rhel5), 
<BR>
Mandrake 10.x (mdk), Mandriva 2006.x (mdv), 
<BR>
CentOS (centos3, centos4, centos5) 
<BR>
Scientific Linux (sl3, sl4, sl5) and 
<BR>
SuSE (su9, su10, su102, su103, su110, su111, su112). 
<BR>   
<BR>
The package build is controlled by a mandatory define set at the beginning of the file.  These defines basically just control the dependency information that gets coded into the finished rpm package as well 
   as any special configure options required.  The platform define may be edited 
   in the spec file directly (by default all defines are set to 0 or "not set").  
   For example, to build the Red Hat 7.x package find the line in the spec file
   which reads

<P>
<PRE>
        %define rh7 0
        </PRE>
<P>
and edit it to read  

<P>
<PRE>
        %define rh7 1
        </PRE>
<P>
Alternately you may pass the define on the command line when calling rpmbuild:

<P>
<PRE>
        rpmbuild -ba --define "build_rh7 1" bacula.spec
        rpmbuild --rebuild --define build_rh7 1" bacula-x.x.x-x.src.rpm
</PRE>
<P>
</LI>
<LI><A NAME="faq2"></A>   <B>How do I control which database support gets built?</B>
   Another mandatory build define controls which database support is compiled,
   one of  build_sqlite, build_mysql or build_postgresql. To get the MySQL
   package and support either  set the  

<P>
<PRE>
        %define mysql 0
        </PRE>
<P>
to  

<P>
<PRE>
        %define mysql 1
        </PRE>
<P>
in the spec file directly or pass it to rpmbuild on the command line:  

<P>
<PRE>
        rpmbuild -ba --define "build_rh7 1" --define "build_mysql 1" bacula.spec
</PRE>
<P>
</LI>
<LI><A NAME="faq3"></A>   <B>What other defines are used?</B> 
<BR>
One other building define of note is the depkgs_version. This define is set with each release and must 
   match the version of the source that is being used to build the packages. 
   You would not ordinarily need to edit this.  See also the Build Options section 
   below for other build time options that can be passed on the command line.
</LI>
<LI><A NAME="faq4"></A>   <B>I'm getting errors about not having permission when I try  to build the
   packages. Do I need to be root?</B> 
<BR>
No, you do not need to be root and, in fact, it is better practice to
   build rpm packages as a non-root user.  Bacula packages are designed to
   be built by a regular user but you must make a few changes on your
   system to do this.  If you are building on your own system then the
   simplest method is to add write permissions for all to the build
   directory (/usr/src/redhat/, /usr/src/RPM or /usr/src/packages).  
   To accomplish this, execute the following command as root:

<P>
<PRE>
        chmod -R 777 /usr/src/redhat
        chmod -R 777 /usr/src/RPM
        chmod -R 777 /usr/src/packages
</PRE>
<P>
If you are working on a shared system where you can not use the method
above then you need to recreate the appropriate above directory tree with all
of its subdirectories inside your home directory.  Then create a file named

<P>
<TT>.rpmmacros</TT> 

<P>
in your home directory (or edit  the file if it already exists)
and add the following line:  

<P>
<PRE>
        %_topdir /home/myuser/redhat
        %_tmppath /tmp
        </PRE>
<P>
It should be noted that Fedora from verion 10 and up is configured to build in
the directory&nbsp;/rpmbuild.

<P>
Another handy directive for the .rpmmacros file if you wish to suppress the
creation of debug rpm packages is:

<P>
<PRE>
        %debug_package %{nil}
        </PRE>
<P>

<P>
</LI>
<LI><A NAME="faq5"></A>   <B>I'm building my own rpms but on all platforms and compiles I get an
   unresolved dependency for something called /usr/afsws/bin/pagsh.</B> 
<BR>
This is a shell from the OpenAFS (Andrew File System).  If you are
   seeing this then you chose to include the docs/examples directory in
   your package.  One of the example scripts in this directory is a pagsh
   script.  Rpmbuild, when scanning for dependencies, looks at the shebang
   line of all packaged scripts in addition to checking shared libraries.
   To avoid this do not package the examples directory.  If you are seeing
   this problem you are building a very old bacula package as the examples
   have been removed from the doc packaging.

<P>
</LI>
<LI><A NAME="faq6"></A>   <B>I'm building my own rpms because you don't publish for my platform.
    Can I get my packages released to sourceforge for other people to use?</B>
    
<BR>
Yes, contributions from users are accepted and appreciated.  Please
    examine the directory platforms/contrib-rpm in the source code for
    further information.

<P>
</LI>
<LI><A NAME="faq7"></A>   <B>Is there an easier way than sorting out all these command line options?</B>
   
<BR>
Yes, there is a gui wizard shell script which you can use to rebuild the
   src rpm package.  Look in the source archive for
   platforms/contrib-rpm/rpm_wizard.sh.  This script will allow you to
   specify build options using GNOME dialog screens.  It requires zenity.

<P>
</LI>
<LI><A NAME="faq8"></A>   <B>I just upgraded from 1.36.x to 1.38.x and now my director daemon
won't start.  It appears to start but dies silently and I get a "connection
refused" error when starting the console.  What is wrong?</B> 
<BR>
Beginning with 1.38 the rpm packages are configured to run the director
   and storage daemons as a non-root user.  The file daemon runs as user
   root and group bacula, the storage daemon as user bacula and group disk,
   and the director as user bacula and group bacula.  If you are upgrading
   you will need to change some file permissions for things to work.
   Execute the following commands as root:

<P>
<PRE>
        chown bacula.bacula /var/bacula/*
        chown root.bacula /var/bacula/bacula-fd.9102.state
        chown bacula.disk /var/bacula/bacula-sd.9103.state
</PRE>
<P>
Further, if you are using File storage volumes rather than tapes those
files will also need to have ownership set to user bacula and group bacula.

<P>
</LI>
<LI><A NAME="faq9"></A>   <B>There are a lot of rpm packages.  Which packages do I need for
what?</B> 
<BR>
For a bacula server you need to select the packsge based upon your
preferred catalog database: one of bacula-mysql, bacula-postgresql or
bacula-sqlite.  If your system does not provide an mtx package you also
need bacula-mtx to satisfy that dependancy.  For a client machine you need
only install bacula-client.  Optionally, for either server or client
machines, you may install a graphical console bacula-gconsole and/or
bacula-wxconsole. The Bacula Administration Tool is installed with the 
bacula-bat package.  One last package, bacula-updatedb is required only when
upgrading a server more than one database revision level.

<P>
</LI>
<LI><A NAME="faq10"></A>The gnome console and wxconsole software is deprecated in favor of bat. The 
bat (bacula administrative tool) is now packaged in it's own source RPM. There 
are no command line switches to build it. The SRPM contains the current version 
of QT that bat is developed against. Building the RPM will build QT and then build 
bat against it. It will not install QT on your system. The resulting bat binary 
can then be installed on a system without QT or with a different version of QT as it 
will not use the QT shared objects.

<P>
</LI>
<LI><B>Support for RHEL3/4/5, CentOS 3/4/5, Scientific Linux 3/4/5 and x86_64</B>
   
<BR>
The examples below show
   explicit build support for RHEL4 and CentOS 4. Build support 
   for x86_64 has also been added. 
</LI>
</OL>

<P>
<PRE>
Build with one of these 3 commands:

rpmbuild --rebuild \
        --define "build_rhel4 1" \
        --define "build_sqlite 1" \
        bacula-1.38.3-1.src.rpm

rpmbuild --rebuild \
        --define "build_rhel4 1" \
        --define "build_postgresql 1" \
        bacula-1.38.3-1.src.rpm

rpmbuild --rebuild \
        --define "build_rhel4 1" \
        --define "build_mysql4 1" \
        bacula-1.38.3-1.src.rpm

For CentOS substitute '--define "build_centos4 1"' in place of rhel4. 
For Scientific Linux substitute '--define "build_sl4 1"' in place of rhel4.

For 64 bit support add '--define "build_x86_64 1"'
</PRE>
<P>

<H1><A NAME="SECTION00320000000000000000">
Build Options</A>
</H1>
<A NAME="1556"></A>
The spec file currently supports building on the following platforms:
<PRE>
Red Hat builds
--define "build_rh7 1"
--define "build_rh8 1"
--define "build_rh9 1"

Fedora Core build
--define "build_fc1 1"
--define "build_fc3 1"
--define "build_fc4 1"
--define "build_fc5 1"
--define "build_fc6 1"
--define "build_fc7 1"
--define "build_fc8 1"
--define "build_fc9 1"
--define "build_fc10 1"

Whitebox Enterprise build
--define "build_wb3 1"

Red Hat Enterprise builds
--define "build_rhel3 1"
--define "build_rhel4 1"
--define "build_rhel5 1"

CentOS build
--define "build_centos3 1"
--define "build_centos4 1"
--define "build_centos5 1"

Scientific Linux build
--define "build_sl3 1"
--define "build_sl4 1"
--define "build_sl5 1"

SuSE build
--define "build_su9 1"
--define "build_su10 1"
--define "build_su102 1"
--define "build_su103 1"
--define "build_su110 1"
--define "build_su111 1"
--define "build_su112 1"

Mandrake 10.x build
--define "build_mdk 1"

Mandriva build
--define "build_mdv 1"

MySQL support:
--define "build_mysql 1"

PostgreSQL support:
--define "build_postgresql 1"

Sqlite support:
--define "build_sqlite 1"

Build the client rpm only in place of one of the above database full builds:
--define "build_client_only 1"

X86-64 support:
--define "build_x86_64 1"

Build python scripting support:
--define "build_python 1"

Build tcpwrappers support:
--define "build_tcpwrappers 1"

Modify the Packager tag for third party packages:
--define "contrib_packager Your Name &lt;youremail@site.org&gt;"

Install most files to /opt/bacula directory:
--define "single_dir_install 1"
</PRE>
<P>

<H1><A NAME="SECTION00330000000000000000">
RPM Install Problems</A>
</H1>
<A NAME="1560"></A>
In general the RPMs, once properly built should install correctly.
However, when attempting to run the daemons, a number of problems
can occur:

<UL>
<LI>Wrong /var/bacula Permissions 
<BR>
By default, the Director and Storage daemon do not run with
  root permission. If the /var/bacula is owned by root, then it
  is possible that the Director and the Storage daemon will not
  be able to access this directory, which is used as the Working
  Directory. To fix this, the easiest thing to do is:
<PRE>
  chown bacula:bacula /var/bacula
</PRE>
  Note: as of 1.38.8 /var/bacula is installed root:bacula with
  permissions 770.
</LI>
<LI>The Storage daemon cannot Access the Tape drive 
<BR>
This can happen in some older RPM releases where the Storage
  daemon ran under userid bacula, group bacula.  There are two
  ways of fixing this: the best is to modify the /etc/init.d/bacula-sd
  file so that it starts the Storage daemon with group "disk".
  The second way to fix the problem is to change the permissions
  of your tape drive (usually /dev/nst0) so that Bacula can access it.
  You will probably need to change the permissions of the SCSI control
  device as well, which is usually /dev/sg0.  The exact names depend
  on your configuration, please see the Tape Testing chapter for
  more information on devices.
</LI>
</UL>

<P>

<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html155"
  HREF="GNU_Free_Documentation_Lice.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html149"
  HREF="Bacula_Utility_Programs.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html143"
  HREF="Volume_Utility_Tools.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html151"
  HREF="Contents.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html153"
  HREF="GNU_Free_Documentation_Lice.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html156"
  HREF="GNU_Free_Documentation_Lice.html">GNU Free Documentation License</A>
<B> Up:</B> <A NAME="tex2html150"
  HREF="Bacula_Utility_Programs.html">Bacula Utility Programs</A>
<B> Previous:</B> <A NAME="tex2html144"
  HREF="Volume_Utility_Tools.html">Volume Utility Tools</A>
 &nbsp; <B>  <A NAME="tex2html152"
  HREF="Contents.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html154"
  HREF="GNU_Free_Documentation_Lice.html">Index</A></B> 
<!--End of Navigation Panel-->
<ADDRESS>

2012-01-24
</ADDRESS>
</BODY>
</HTML>