Bug 852732

Summary: Installed but unpackaged query.sql, possible fault in build system?
Product: [Fedora] Fedora Reporter: daniel.s.karlsson
Component: baculaAssignee: Simone Caronni <negativo17>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: andreas, fschwarz, limburgher, lnykryn, negativo17, paul, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-09-07 07:33:05 EDT Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description daniel.s.karlsson 2012-08-29 08:40:40 EDT
Description of problem:

I have tried to build bacula-5.2.10-5.fc17.src.rpm on RHEL6 but it does not work. I file this bug here because I also noticed some build errors in the build log for fc17. Those errors might hide this packaging error. Why is there no sign of build errors at https://apps.fedoraproject.org/packages/bacula/builds/ when there are errors in build.log?

I get this build error:

error: Installed (but unpackaged) file(s) found:
/usr/libexec/bacula/query.sql

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


How reproducible:

Steps to Reproduce:
1. rpmbuild -bb bacula.spec on RHEL6
  
Actual results:
RPM build error as stated above.

Expected results:
No build errors.

Additional info:
Comment 1 Simone Caronni 2012-08-29 08:48:00 EDT
Hello,

I regularly rebuild the package(s) for all the supported RHEL/CentOS/Fedora releases, and I don't have that problem.

The query.sql is installed directly from source and is not put into that directory, so the problem must be related to your setup. Please look here at lines 383 and 384:

http://pkgs.fedoraproject.org/cgit/bacula.git/tree/bacula.spec

Would you please use the already-built packages at my repo on fedorapeople.org? I update it when Bacula gets updated in rawhide and contains binaries built with Koji. I also give help on those packages on the bacula-users mailing list.

http://repos.fedorapeople.org/repos/slaanesh/bacula/README.txt
http://repos.fedorapeople.org/repos/slaanesh/bacula/

Regards,
--Simone
Comment 2 daniel.s.karlsson 2012-08-29 09:06:51 EDT
I will try the already built packages you have mentioned.

You are right about the query.sql file being copied directly from source. The query.sql file causing the error is actually installed by 'make install'.

And I still wonder if errors in http://kojipkgs.fedoraproject.org/packages/bacula/5.2.10/5.fc17/data/logs/x86_64/root.log should be ignored.
Comment 3 Simone Caronni 2012-08-29 09:38:57 EDT
> I will try the already built packages you have mentioned.

If you have any issue please let me know, I will try to address them if they're reasonable. The packages already contain input derived from the bacula-users mailing list.

> You are right about the query.sql file being copied directly from source.
> The query.sql file causing the error is actually installed by 'make install'.

I don't understand here, which make install? make install it is executed at line 374 and does not copy query.sql.

> And I still wonder if errors in
> http://kojipkgs.fedoraproject.org/packages/bacula/5.2.10/5.fc17/data/logs/
> x86_64/root.log should be ignored.

Can you please point to the errors? A quick look does not show any error.
Are you maybe referring to http://kojipkgs.fedoraproject.org/packages/bacula/5.2.10/5.fc17/data/logs/x86_64/build.log? Here some of the warnings (not errors) are due to the default Fedora's GCC flags passed during the rpm build. If you remove them, some of the warnings disappear.
Comment 4 daniel.s.karlsson 2012-08-29 10:45:47 EDT
My fault, it should have been build.log.

The 'make install' really do install a query.sql file. Look at src/dird/Makefile.in. On my machine it gets installed right after bacula-dir.conf. In the Konji build log there is an error instead. I am no automake expert but the install can not be conditional, right?
Comment 5 Paul Howarth 2012-08-29 11:01:04 EDT
It's failing when trying to do a "chgrp bacula", which won't work in a mock build environment (as used by koji) as there's no "bacula" group present. That needs to be fixed in the upstream Makefile in whatever way is done for other files that have have non-root ownership. The "make" in that directory is bailing out and probably not getting to the part where query.sql is installed.

In an rpm build process, all files should be installed into the target buildroot as the user running rpmbuild, and then spec file attributes are used to specify the ownership of the files in the rpm package.
Comment 6 Simone Caronni 2012-08-29 11:35:25 EDT
(In reply to comment #5)
> It's failing when trying to do a "chgrp bacula", which won't work in a mock
> build environment (as used by koji) as there's no "bacula" group present.
> That needs to be fixed in the upstream Makefile in whatever way is done for
> other files that have have non-root ownership. The "make" in that directory
> is bailing out and probably not getting to the part where query.sql is
> installed.

Oops, sorry I never noticed because the end result has been the same. I think I can skip entirely the uid/gid definitions in %configure and just set them at rpm assembly time.

Looking into it right now.
Comment 7 Simone Caronni 2012-08-29 11:59:00 EDT
It has turned out to be a really simple thing:

http://pkgs.fedoraproject.org/cgit/bacula.git/commit/?id=07887b2febbab21e1c657351f6a8171978385022

The configure options for the users/groups are gone from %configure; so chgrp does not run at make install and the query.sql file is installed correctly.

They are not needed at build time since the definitions in the /etc/sysconfig/bacula-* files are used to specify the privileges to drop to during startup.

This also fixes rebuilding for users running rpmbuild instead of mock/koji on systems where the bacula packages are already installed (and so the user/groups are available).

Thanks a lot for pointing that out, I will rebuild the packages in my repo and submit an update for f17/f18.
Comment 8 Simone Caronni 2012-08-29 12:11:07 EDT
Cut & paste error, config files need to be 640 root:root:

http://pkgs.fedoraproject.org/cgit/bacula.git/commit/?id=0462b22387c6352848a76eed07b62d18d3c7b182
Comment 9 Fedora Update System 2012-08-29 12:31:02 EDT
bacula-5.2.10-6.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/bacula-5.2.10-6.fc17
Comment 10 Fedora Update System 2012-08-29 12:31:26 EDT
bacula-5.2.10-6.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/bacula-5.2.10-6.fc18
Comment 11 Fedora Update System 2012-08-29 14:43:21 EDT
Package bacula-5.2.10-6.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing bacula-5.2.10-6.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-12923/bacula-5.2.10-6.fc18
then log in and leave karma (feedback).
Comment 12 Simone Caronni 2012-08-30 03:43:09 EDT
Aside from testing updates, the backport repository has been updated as well:

http://repos.fedorapeople.org/repos/slaanesh/bacula/

Regards,
--Simone
Comment 13 Fedora Update System 2012-09-07 07:33:05 EDT
bacula-5.2.10-6.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 14 Fedora Update System 2012-09-12 08:43:12 EDT
bacula-5.2.11-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/bacula-5.2.11-1.fc17
Comment 15 Fedora Update System 2012-09-12 08:43:49 EDT
bacula-5.2.11-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/bacula-5.2.11-1.fc18
Comment 16 Fedora Update System 2012-09-12 09:26:46 EDT
bacula-5.2.11-1.fc17,bacula-docs-5.2.11-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/bacula-5.2.11-1.fc17,bacula-docs-5.2.11-1.fc17
Comment 17 Fedora Update System 2012-09-12 09:32:25 EDT
bacula-5.2.11-1.fc18,bacula-docs-5.2.11-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/bacula-5.2.11-1.fc18,bacula-docs-5.2.11-1.fc18
Comment 18 Fedora Update System 2012-09-13 03:29:00 EDT
bacula-5.2.11-2.fc17,bacula-docs-5.2.11-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/bacula-5.2.11-2.fc17,bacula-docs-5.2.11-1.fc17
Comment 19 Fedora Update System 2012-09-13 03:29:48 EDT
bacula-5.2.11-2.fc18,bacula-docs-5.2.11-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/bacula-5.2.11-2.fc18,bacula-docs-5.2.11-1.fc18
Comment 20 Fedora Update System 2012-09-13 04:19:21 EDT
bacula-5.2.11-3.fc17,bacula-docs-5.2.11-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/bacula-5.2.11-3.fc17,bacula-docs-5.2.11-1.fc17
Comment 21 Fedora Update System 2012-09-13 04:20:00 EDT
bacula-5.2.11-3.fc18,bacula-docs-5.2.11-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/bacula-5.2.11-3.fc18,bacula-docs-5.2.11-1.fc18
Comment 22 Fedora Update System 2012-09-17 18:53:58 EDT
bacula-5.2.10-6.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 23 Fedora Update System 2012-09-23 23:24:15 EDT
bacula-5.2.11-3.fc18, bacula-docs-5.2.11-1.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 24 Fedora Update System 2012-09-26 04:58:35 EDT
bacula-5.2.11-3.fc17, bacula-docs-5.2.11-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 25 Fedora Update System 2013-01-28 08:14:18 EST
bacula-5.0.3-35.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/bacula-5.0.3-35.fc16
Comment 26 Fedora Update System 2013-02-07 21:32:36 EST
bacula-5.0.3-35.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.