Thursday, December 2, 2010

vchanger, Bacula, and "ERR=Unknown error during program execvp"

 After upgrading Bacula to 5.0.3, I started getting an error message when attempting to load a tape:


ERR=Unknown error during program execvp


I suspected it was a problem with vchanger, as it couldn't load/unload tapes, either. After looking in the disk that vchanger happened to be using, I discovered that drive0 obviously had a tape in it, but the file loaded0 was empty. I determined which "tape slot" was empty, added the name of the slot to the file loaded0, and unloaded it. Everything worked after that.


Wednesday, December 1, 2010

Problems Building RPMs for Bacula 5.0.3

So, after starting to build the RPMs from source for Bacula 5.0.3, I discovered several errors.


1. File /home/user1/rpm/SOURCES/bacula-5.0.2.tar.gz: No such file or directory

 Easily fixed, but I ran into additional errors:

2. error: Installed (but unpackaged) file(s) found:
   /usr/lib/bacula/btraceback.mdb

 Also easily fixed... Alas! More problems:

3. RPM build errors:
    Bad exit status from /home/user/rpm/tmp/rpm-tmp.26291 (%doc)
    File listed twice: /usr/lib/libbaccfg-5.0.3.so
    File listed twice: /usr/lib/libbaccfg.la
    File listed twice: /usr/lib/libbaccfg.so
    File listed twice: /usr/lib/libbacfind-5.0.3.so
    File listed twice: /usr/lib/libbacfind.la
    File listed twice: /usr/lib/libbacfind.so
    File listed twice: /usr/lib/libbacpy-5.0.3.so
    File listed twice: /usr/lib/libbacpy.la
    File listed twice: /usr/lib/libbacpy.so

Around line 1422 or so in the bacula.spec file, you'll see:

%files libs
%defattr(-,root,root)
%{_libdir}/libbac*
%{_libdir}/libbaccfg*
%{_libdir}/libbacfind*
%{_libdir}/libbacpy*


It appears that we don't need all those wildcards... the first wildcard encompasses the remainder - so I removed every line except for the line ending in /libbac*.

4. One final error: the spec file needs for there to be a Release_Notes-5.0.3-1.tar.gz with the file Release_Notes-5.0.3-1.txt in the SOURCES directory. After adding that, the Bacula RPMs built correctly.

Here's the diff of the bacula.spec file:

--- bacula.spec 2010-12-01 10:47:37.000000000 -0500
+++ rpm/SPECS/bacula.spec       2010-12-01 10:57:20.000000000 -0500
@@ -6,7 +6,7 @@

 # basic defines for every build
 %define _release           1
-%define _version           5.0.2
+%define _version           5.0.3
 %define _packager D. Scott Barninger
 %define depkgs_version 18Dec09

@@ -1356,6 +1356,7 @@

 %{_sbindir}/bacula-fd
 %{_sbindir}/btraceback
+%attr(-, root, %{daemon_group}) %{script_dir}/btraceback.mdb
 %attr(-, root, %{daemon_group}) %{script_dir}/btraceback.gdb
 %attr(-, root, %{daemon_group}) %{script_dir}/btraceback.dbx
 %{_sbindir}/bconsole
@@ -1422,9 +1423,6 @@
 %files libs
 %defattr(-,root,root)
 %{_libdir}/libbac*
-%{_libdir}/libbaccfg*
-%{_libdir}/libbacfind*
-%{_libdir}/libbacpy*

 %post libs
 /sbin/ldconfig