Good morning!
I have just finished successfully building binary RPMs of Bacula 5.0.0
on CentOS 5.4, x86_64 architecture, and wanted to share some notes and a
couple of possible bugs (and workarounds).
I'm relatively new to Bacula and to building custom RPMs (I'm from a
Debian background mostly), so the following is not intended as gospel. I
just wanted to share what I've learned in the process and hopefully
offer some debugging contribs that can be refined by the experts.
I began with the source RPM from SourceForge, which installed with no
trouble once I met the prerequisites using yum.
I'd like to suggest that the spec file created during this process
should be renamed from bacula.spec to bacula-5.0.0.spec, because in my
case I was trying to keep an existing Bacula 3.0.3 build intact.
Luckily, I anticipated this file might be overwritten and had renamed it
manually first. But 3.0.3 and 5.0.0 both name the file "bacula.spec".
The client-only version failed to build because of the following error:
error: Installed (but unpackaged) file(s) found
After some digging on Google, I made the following change to the spec
file to resolve the error ("diff -u" format):
--- bacula-5.0.0.spec.original 2010-02-03 05:57:36.000000000 -0500
+++ bacula-5.0.0.spec 2010-02-03 06:05:57.000000000 -0500
@@ -837,6 +837,7 @@
rm -f $RPM_BUILD_ROOT%{_mandir}/man8/btape.8.%{manpage_ext}
rm -f $RPM_BUILD_ROOT%{_mandir}/man8/dbcheck.8.%{manpage_ext}
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bsmtp.1.%{manpage_ext}
+rm -f $RPM_BUILD_ROOT%{script_dir}/bacula_config
%endif
# Docs for programs that are depreciated
rm -f $RPM_BUILD_ROOT
%{_mandir}/man1/bacula-bgnome-console.1.%{manpage_ext}
The client then built successfully using the following command:
rpmbuild --target=$(uname -m) --define build_centos5=1 \
--define build_client_only=1 \
-bb /usr/src/redhat/SPECS/bacula-5.0.0.spec
The server (with MySQL back-end) built successfully with this:
rpmbuild --target=$(uname -m) --define build_centos5=1 \
--define build_mysql=1 \
-bb /usr/src/redhat/SPECS/bacula-version.spec
However, in our situation we plan to run the database server on a
different host than the Bacula director. The binary RPM from above will
not install unless mysql-server is installed on the local host. I found
that commenting out the line "Requires: mysql-server" in the spec file
worked around this, though that is probably not a generalized solution
for all distributions.
Kind regards,
Scott
--
------------------------------------------------------------------------
Scott D. COURTNEY, Principal Engineer Sine Nomine Associates
scourtney AT sinenomine DOT net http://www.sinenomine.net/
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
|