Bug 833632 - bacula-5.2.8-1.fc17.src.rpm will not build on fedora 17
Summary: bacula-5.2.8-1.fc17.src.rpm will not build on fedora 17
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: bacula
Version: 17
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Simone Caronni
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-20 00:10 UTC by Steven A. Falco
Modified: 2012-07-02 12:11 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-20 10:18:20 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Patch to spec file (807 bytes, patch)
2012-06-20 00:10 UTC, Steven A. Falco
no flags Details | Diff

Description Steven A. Falco 2012-06-20 00:10:48 UTC
Created attachment 593100 [details]
Patch to spec file

Description of problem: Try to rpmbuild -ba bacula-5.2.8-1.fc17.src.rpm on a Fedora 17 x86_64 machine, and get an error:

+ install -p -m 755 -D src/qt-console/tray-monitor/.libs/bacula-tray-monitor /home/sfalco/rpmbuild/BUILDROOT/bacula-5.2.8-1.fc17.x86_64/usr/sbin/bacula-tray-monitor
install: cannot stat `src/qt-console/tray-monitor/.libs/bacula-tray-monitor': No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.C2ff8G (%install)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.C2ff8G (%install)


Version-Release number of selected component (if applicable):

5.2.8-1.fc17


How reproducible: always


Steps to Reproduce:
1. rpmbuild -ba bacula-5.2.8-1.fc17.src.rpm
2.
3.
  
Actual results: error as shown above


Expected results: no error


Additional info: This error is caused by the following line in the .spec file:

install -p -m 755 -D src/qt-console/tray-monitor/.libs/bacula-tray-monitor %{buildroot}%{_sbindir}/bacula-tray-monitor

The problem is that the source path is wrong - the tray monitor binary is not located in the .libs directory; rather, it is located in the tray-monitor directory.  CSimply changing that one line to:

install -p -m 755 -D src/qt-console/tray-monitor/bacula-tray-monitor %{buildroot}%{_sbindir}/bacula-tray-monitor

allows the package to build properly.  I.e., just remove the .libs part of the source path.  Please see the attached patch to the spec file.

Comment 1 Simone Caronni 2012-06-20 08:33:42 UTC
Hello,

the spec file and installation have been used exactly like this for a very long time, in particular regarding QT Tray Monitor; the first version that shipped it was 5.2.2-11 built Sun Dec 11 2011.

I build regularly with mock on all architectures / releases (RHEL 4+ / Fedora 15+) and never had a single problem, in fact you can find the build you're trying to reproduce already available at:

http://koji.fedoraproject.org/koji/buildinfo?buildID=323770

This means the build is correct otherwise koji and mock would have caught the issue.

Can you check your build environment?

Regards,
--Simone

Comment 2 Simone Caronni 2012-06-20 08:38:19 UTC
Might I ask you why you are rebuilding the package? It is already available as an update for Fedora 17:

https://admin.fedoraproject.org/updates/FEDORA-2012-9284

There's also 5.2.9-2 if you need, it is not pushed into the updates-testing because it doesn not contain any fix or change needed for Fedora 17:

http://koji.fedoraproject.org/koji/buildinfo?buildID=326292

Comment 3 Lukáš Nykrýn 2012-06-20 10:14:20 UTC
I also don't have any problem with rebuilding bacula on my fresh f17. Only rebuild of f17 package on f15 fails with:
/home/lukas/rpmbuild/BUILD/bacula-5.2.8/src/qt-console/tray-monitor/tray-monitor.cpp:152: undefined reference to `lmgr_init_thread()'

Comment 4 Simone Caronni 2012-06-20 10:18:20 UTC
Here it builds fine... Also 5.2.9 which has only a termlib patch reverted builds fine in koji:

http://repos.fedorapeople.org/repos/slaanesh/bacula/fedora-15/x86_64/

Comment 5 Simone Caronni 2012-06-20 10:20:45 UTC
Anyway in 6 days F15 will be EOL and it has 5.0.3, so I would not care much if it does not build on it.

Comment 6 Steven A. Falco 2012-06-20 12:04:22 UTC
I can only report what happens on my machine.  I am not using mock.  When I build directly on my machine I see the error.  I agree that you are not seeing the error, because clearly you were able to make the packages.  I have no idea why there is a difference - perhaps it also has something to do with x86_64 versus i686?

As to why I'm building, I recently found an error in dbcheck, which was fixed upstream:

http://bugs.bacula.org/view.php?id=1893

Bug 1893 causes backups of the catalog to fail.  I am told that when 5.2.10 is released, it will have the catalog fix.  Until that time, I'll use my private build.

Comment 7 Simone Caronni 2012-06-20 12:12:01 UTC
I don't know, it's probably something related to the libraries and pieces you have installed in the system. If you only need to integrate patches and such my suggestion is to use mock as it leaves your system free of all the development packages and builds everything in a tight controlled environment.

If you need that bug fixed, you can open a bug for that reason and I will import the patch into an official 5.2.9 update in f17/rawhide; so you can get an "official" package instead.

Regards,
--Simone

Comment 8 Gwyn Ciesla 2012-06-20 12:37:05 UTC
I found my catalog backups failing after a recent update, and correcting my catalog db information in bacula-dir.conf helped.  It assumed PG, I use sqlite3.

Comment 9 Steven A. Falco 2012-06-21 01:32:45 UTC
Re comment 7: I agree with your theory - libtool would normally place the executable in the .libs directory, and place a wrapper script in the tray-monitor directory, in which case the .spec file is fine as is.  Perhaps because I have the .so files installed, libtool skips the .libs directory and wrapper.

I tried building with mock, and that works perfectly on my system, so thank you very much for that suggestion.

It is unfortunate that the direct build doesn't work, but you have given me a workaround, and that is fine.  And at the pace things are going, I imagine a 5.2.10 package will not be very far away. :-)

Sorry for the bogus bug report, but I learned something, so I guess it is not all bad.

Comment 10 Simone Caronni 2012-06-21 06:32:26 UTC
No problem, if you still have the need for the patch just open a new bug and I will backport it!

Regards,
--Simone

Comment 11 Simone Caronni 2012-07-02 08:13:39 UTC
Hi Steven,

5.2.10 has come out which includes your fix. I created an update for Fedora 17:

https://admin.fedoraproject.org/updates/bacula-5.2.10-1.fc17,bacula-docs-5.2.10-1.fc17

If you find it useful, please leave karma.

Regards,
--Simone

Comment 12 Steven A. Falco 2012-07-02 12:11:50 UTC
Thanks!  It does fix the bug I had reported upstream, so I left karma.  It should now move to stable.


Note You need to log in before you can comment on or make changes to this bug.