Bug 852732 - Installed but unpackaged query.sql, possible fault in build system?
Summary: Installed but unpackaged query.sql, possible fault in build system?
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: bacula
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Simone Caronni
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-29 12:40 UTC by daniel.s.karlsson
Modified: 2013-02-08 02:32 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-09-07 11:33:05 UTC
Type: Bug


Attachments (Terms of Use)

Description daniel.s.karlsson 2012-08-29 12:40:40 UTC
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 12:48:00 UTC
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 13:06:51 UTC
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 13:38:57 UTC
> 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 14:45:47 UTC
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 15:01:04 UTC
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 15:35:25 UTC
(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 15:59:00 UTC
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 16:11:07 UTC
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 16:31:02 UTC
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 16:31:26 UTC
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 18:43:21 UTC
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 07:43:09 UTC
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 11:33:05 UTC
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 12:43:12 UTC
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 12:43:49 UTC
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 13:26:46 UTC
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 13:32:25 UTC
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 07:29:00 UTC
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 07:29:48 UTC
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 08:19:21 UTC
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 08:20:00 UTC
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 22:53:58 UTC
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-24 03:24:15 UTC
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 08:58:35 UTC
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 13:14:18 UTC
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-08 02:32:36 UTC
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.


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