https://bugzilla.redhat.com/show_bug.cgi?id=1048621
--- Comment #10 from Orion Poplawski <orion(a)cora.nwra.com> ---
(In reply to Volker Fröhlich from comment #8)
(In reply to Orion Poplawski from comment #5)
> Some general comments:
>
> - Start with a fresh %changelog
> - If this is really EPEL only, why keep all of the Fedora conditionals?
>
So far I tried to keep the version for latest EPEL and Zabbix in sync. My
idea was to introduce the systemd macros on the EPEL7 file, drop the init
script and keep that in sync with Fedora then. It's a bit of a mess, as they
don't share a repository, but it worked for me so far. That's also why the
changelog is still there. I've trimmed it down to 2.0 and up though.
Okay, but let's fix this then:
warning: bogus date in %changelog: Mon Jan 5 2014 Volker Fröhlich
<volker27(a)gmx.at> - 2.2.1-1.1
warning: bogus date in %changelog: Tue Nov 3 2013 Volker Fröhlich
<volker27(a)gmx.at> - 2.0.9-2
> This isn't needed any more:
>
> # Logrotate's su option is currently only available in Fedora
> %if 0%{?rhel}
> sed -i '/su zabbix zabbix/d' %{SOURCE5}
> %endif
Are you sure about the logrotate stanza? Can you point me to where this was
sorted out?
Ah, well I guess it is still needed but needs to be changed:
$ grep su zabbix-logrotate.in
su USER USER
# Install log rotation
sed -e 's|COMPONENT|agentd|g; s|USER|zabbix|g' %{SOURCE5} > \
$RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/zabbix-agent
sed -e 's|COMPONENT|server|g; s|USER|zabbixsrv|g' %{SOURCE5} > \
$RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/zabbix-server
sed -e 's|COMPONENT|proxy|g; s|USER|zabbixsrv|g' %{SOURCE5} > \
$RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/zabbix-proxy
Also, you have no business editng the source file in place.
So, perhaps:
%if 0%{?rhel}
sed -e 's|COMPONENT|agentd|g; /su USER USER/d' %{SOURCE5} > \
$RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/zabbix-agent
sed -e 's|COMPONENT|server|g; /su USER USER/d' %{SOURCE5} > \
$RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/zabbix-server
sed -e 's|COMPONENT|proxy|g; /su USER USER/d' %{SOURCE5} > \
$RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/zabbix-proxy
%else
...
%endif
> - This has long been a bug in zabbix_agentd.conf:
>
> Hostname=Zabbix server
>
> This should be left unset.
Leaving it unset would break active checks, I think but it's one of the
better ideas I've heard so far.
No, setting Server= and ServerActive= is needed for that. Hostname is the
hostname of the machine the agent is running on.
We discussed the Hostname matter on
https://bugzilla.redhat.com/show_bug.cgi?id=825833 and failed to come up
with something useful.
Although the upstream bug basically says packagers should do what they need to
do to make it work.
> - Upgrading to 2.2 from 2.0 triggered a whole slew of
"OK" email messages
I'd need more information on the triggers/events.
Sorry, not much. Perhaps others will see it and report upstream.
> - Seeing:
>
> 8532:20140106:142129.396 /var/lib/zabbixsrv/tmp/zabbix_server_8532.pinger:
> [13] Permission denied
>
> # ls -ld /var/lib/zabbixsrv/tmp
> drwxr-x---. 2 root zabbixsrv 4096 Jan 6 14:01 /var/lib/zabbixsrv/tmp
Good catch; changed.
Hmm:
@@ -761,7 +761,8 @@ fi
%config(noreplace) %{_sysconfdir}/%{srcname}/alertscripts
%config(noreplace) %{_sysconfdir}/logrotate.d/zabbix-server
%ghost %{_sbindir}/zabbix_server
-%attr(0750,root,zabbixsrv) %{_sharedstatedir}/zabbixsrv
+%attr(0755,zabbixsrv,zabbixsrv) %dir %{_sharedstatedir}/zabbixsrv
+%attr(0755,zabbixsrv,zabbixsrv) %dir %{_sharedstatedir}/zabbixsrv/tmp
%if 0%{?fedora}
%ghost %{_unitdir}/zabbix-server.service
%else
@@ -797,7 +798,7 @@ fi
%config(noreplace) %{_sysconfdir}/zabbix_agentd.conf
%config(noreplace) %{_sysconfdir}/%{srcname}/zabbix_agentd.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/zabbix-agent
-%attr(0750,zabbix,zabbix) %dir %{_sharedstatedir}/zabbix
+%attr(750,zabbix,zabbix) %dir %{_sharedstatedir}/zabbix
%if 0%{?fedora}
%{_unitdir}/zabbix-agent.service
%{_unitdir}/zabbix-agentd.service
@@ -823,7 +824,8 @@ fi
%config(noreplace) %{_sysconfdir}/%{srcname}/externalscripts
%config(noreplace) %{_sysconfdir}/logrotate.d/zabbix-proxy
%ghost %{_sbindir}/zabbix_proxy
-%attr(0750,root,zabbixsrv) %{_sharedstatedir}/zabbixsrv
+%attr(0755,zabbixsrv,zabbixsrv) %dir %{_sharedstatedir}/zabbixsrv
+%attr(0755,zabbixsrv,zabbixsrv) %dir %{_sharedstatedir}/zabbixsrv/tmp
%if 0%{?fedora}
%ghost %{_unitdir}/zabbix-proxy.service
%else
I would keep each at 0750, just fix the owner as you did.
The permission on remaining files should be in the domain of the
administrator, I think. There's a note on the matter in the README.
> - Not sure about this:
> # rpm -V zabbix22
> Unsatisfied dependencies for zabbix22-2.2.1-1.1.el6_4.x86_64:
> zabbix conflicts with zabbix22-2.2.1-1.1.el6_4.x86_64
> zabbix conflicts with zabbix22-2.2.1-1.1.el6_4.x86_64
>
> Perhaps a problem with providing and conflicting with zabbix?
I hadn't provided versions!
+Conflicts: %{srcname} < 2.0
+Conflicts: %{srcname}20 < 2.2
Shouldn't this be:
Conflicts: %{srcname} < 2.2
Conflicts: %{srcname}20
?
--
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component