Learn more about these different git repos.
Other Git URLs
I have two SRPMs which for the purposes of this issue are the same. One builds and the other does not and fails with:
+ cp chroma-agent.service /builddir/build/BUILDROOT/python-iml-agent-4.1.0-61.el7.x86_64/usr/lib/systemd/system/ cp: cannot stat 'chroma-agent.service': No such file or directory
Again, for the purposes of this issue, the two SRPMs (respectively) are the same:
-rw-rw-r-- 1 root root 40 May 22 15:28 10-device-scanner.socket.conf -rw-rw-r-- 1 root root 73 May 22 15:28 10-device-scanner.target.conf -rw-rw-r-- 1 root root 28 May 22 15:28 50-chroma-agent.preset -rw-rw-r-- 1 root root 347 May 22 15:28 chroma-agent.service -rw-rw-r-- 1 root root 202929 May 22 14:06 iml-agent-4.1.0.tar.gz -rw-rw-r-- 1 root root 109 May 22 15:28 iml-storage-server.target -rw-rw-r-- 1 root root 85 May 22 15:28 logrotate.cfg -rw-rw-r-- 1 root root 7080 May 22 15:30 python-iml-agent.spec
-rw-rw-r-- 1 root root 40 May 22 16:24 10-device-scanner.socket.conf -rw-rw-r-- 1 root root 73 May 22 16:24 10-device-scanner.target.conf -rw-rw-r-- 1 root root 28 May 22 16:24 50-chroma-agent.preset -rw-rw-r-- 1 root root 347 May 22 16:24 chroma-agent.service -rw-rw-r-- 1 root root 81272 May 22 16:02 iml-agent-4.1.0.tar.gz -rw-rw-r-- 1 root root 109 May 22 16:24 iml-storage-server.target -rw-rw-r-- 1 root root 85 May 22 16:24 logrotate.cfg -rw-rw-r-- 1 root root 7079 May 22 16:25 python-iml-agent.spec
As you can see, they both have the chroma-agent.service file in them.
chroma-agent.service
Both specfiles also refer to them identically.
So why does one build and the other not?
The two build jobs are 757920 and 757939.
I mentioned this in IRC as well, but the issue here is that when calling cp %{unit_name} %{buildroot}%{_unitdir}/ in the spec file, the current working dir is iml-agent-4.1.0. The working build has the chroma-agent.service file in the tarball. The failing build does not.
cp %{unit_name} %{buildroot}%{_unitdir}/
Using %{SOURCE1} in the cp call should work.
%{SOURCE1}
Indeed. Using %{SOURCE1} instead fully-qualified the path of the file.
Much thanks for giving my head a shake.
Metadata Update from @brianjmurrell: - Issue status updated to: Closed (was: Open)
Log in to comment on this ticket.