-
Problem report
-
Resolution: Fixed
-
Trivial
-
5.0.0
-
None
-
Centos 7.8.2003 AltArch, armv7hl
-
Sprint 64 (May 2020), Sprint 65 (Jun 2020), Sprint 66 (Jul 2020)
-
0.125
Probably, affects other rpm-based platform/distro combinations too.
This particular part is defined in following sections in spec:
build definitions:
%ifarch x86_64
%if 0%{?rhel} >= 6
%define build_agent2 1
%endif
%endif
result: build_agent2 not defined, because of arch)
install:
%if 0%{?build_agent2} %if 0%{?rhel} >= 7 install -Dm 0644 -p %{SOURCE19} $RPM_BUILD_ROOT%{_unitdir}/zabbix-agent2.service %else install -Dm 0755 -p %{SOURCE21} $RPM_BUILD_ROOT%{_sysconfdir}/init.d/zabbix-agent2 install -Dm 0644 -p %{SOURCE22} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/zabbix-agent2 %endif %endif
result: agent2 files not installed, because build_agent2 was not defined previously, but:
%if 0%{?rhel} >= 7 install -Dm 0644 -p %{SOURCE15} $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d/zabbix-agent.conf install -Dm 0644 -p %{SOURCE15} $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d/zabbix_agent2.conf install -Dm 0644 -p %{SOURCE15} $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d/zabbix-server.conf install -Dm 0644 -p %{SOURCE15} $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d/zabbix-proxy.conf install -Dm 0644 -p %{SOURCE15} $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d/zabbix-java-gateway.conf %endif
result: zabbix_agent2.conf file will be installed, despite we've decided not to build agent2
files section:
%if 0%{?build_agent2} %files agent2 %defattr(-,root,root,-) %doc AUTHORS ChangeLog COPYING NEWS README %config(noreplace) %{_sysconfdir}/zabbix/zabbix_agent2.conf %config(noreplace) %{_sysconfdir}/logrotate.d/zabbix-agent2 %dir %{_sysconfdir}/zabbix/zabbix_agent2.d %attr(0755,zabbix,zabbix) %dir %{_localstatedir}/log/zabbix %attr(0755,zabbix,zabbix) %dir %{_localstatedir}/run/zabbix %{_sbindir}/zabbix_agent2 %{_mandir}/man8/zabbix_agent2.8* %if 0%{?rhel} >= 7 %{_unitdir}/zabbix-agent2.service %{_prefix}/lib/tmpfiles.d/zabbix_agent2.conf %else /usr/lib/tmpfiles.d/zabbix_agent2.conf %{_sysconfdir}/init.d/zabbix-agent2 %config(noreplace) %{_sysconfdir}/sysconfig/zabbix-agent2 %endif %endif
result: files are not installed from this section, therefore, they are leftovers from latest part of install section
I think this particular part should be moved to the previous section.
zabbix2 agent can be build on this platform, it's compatible, but that might be a bit another story.
Steps to reproduce:
- Use specified platform (Centos 7.8.2003 AltArch, armv7hl)
- Build binary packages with zabbix-5.0.0-1.el7.src.rpm
Result:
Checking for unpackaged file(s): /usr/lib/rpm/check-files /root/rpmbuild/BUILDROOT/zabbix-5.0.0-1.el7.arm
error: Installed (but unpackaged) file(s) found:
/usr/lib/tmpfiles.d/zabbix_agent2.conf
RPM build errors:
Installed (but unpackaged) file(s) found:
/usr/lib/tmpfiles.d/zabbix_agent2.conf
Expected:
RPM's should be built