Created attachment 872452 [details] Fixes the issue Description of problem: After building the SRC.RPM on EL6 an copying it to Fedora it results in a bad package when building on Fedora. Solution in Additional info Version-Release number of selected component (if applicable): zabbix20-2.0.11-1.el6.src.rpm How reproducible: 100% Steps to Reproduce: 1. Do rpm -bb on EL6 2. Do rpm -bs on EL6 3. Copy SRC.RPM to Fedora 4. Do rpm -i of SRC.RPM on Fedora 5. Do rpm -bb on Fedora 6. Install new RPM on Fedora 7. Enjoy an email Anacron job 'cron.daily' on <host>. Details below Actual results: Anacron email: /etc/cron.daily/logrotate: error: skipping "/var/log/zabbix/zabbix_agentd.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation. Expected results: Happy logrotate on Fedora Additional info: The issue is caused by the fact that the SPEC file is altering SOURCE5 during build. This can easily be prevented, see attached patch.
I spent a lot of time and neither can I see what's causing the error message nor how your patch would change the resulting logrotate configuration file. Please test the new Fedora version and if the problem still exists, please paste your /etc/logrotate.d/zabbix-* files. However, Fedora's 2.0.11-2 removed the su statement inadvertently.
zabbix-2.0.11-3.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/zabbix-2.0.11-3.fc20
zabbix-2.0.11-3.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/zabbix-2.0.11-3.fc19
Package zabbix-2.0.11-3.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing zabbix-2.0.11-3.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-5540/zabbix-2.0.11-3.fc20 then log in and leave karma (feedback).
Regarding the "su" directive: * Fedora (>= 19) needs it * CentOS doesn't understand it. So entirely removing doesn't seem right. Hence my suggestion to use a spec file that takes Fedora/CentOS differences into account, but without changing any source files. I haven't tested it yet, will do so later. Some more info: https://bugzilla.redhat.com/show_bug.cgi?id=753983 http://www.novell.com/support/kb/doc.php?id=7005219 http://rickfoosusa.blogspot.nl/2011/12/howto-fix-logrotate-complains-about.html
Keep in mind that zabbix20 is not intended to be rebuilt on Fedora. I'm not sure what you mean by "changing source files". It's a Fedora/EPEL-specific source anyway and it doesn't really matter whether I change it in-place or not, if the result is the same. Maintaining Zabbix accross EPEL 5, 6 and various Fedora versions in different versions is a real challenge (zabbix, zabbix20, zabbix22 and the fact that the name won't change in Fedora but the major version will). I tried a unified approach, but it tends to be almost as troublesome to maintain.
The text in the spec file (from zabbix20-2.0.11-1.el6.src.rpm): # Logrotate's su option is currently only available in Fedora %if 0%{?rhel} sed -i '/su zabbix zabbix/d' %{SOURCE5} %endif This suggested to me that Fedora is actually was considered a build Target. By changing the source I mean specifically this line: sed -i '/su zabbix zabbix/d' %{SOURCE5} This changes the file rpmbuild/SOURCES/zabbix-logrotate.in. That's what 'sed -i' does. The source file is changed, and after you do 'rpm -bs' you have a different src.rpm.
Now I finally see what you mean, thanks for noticing.
zabbix-2.0.11-3.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.
zabbix-2.0.11-3.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.