You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.
Planex generates SRPMs, which it then feeds into mock. The SRPMs are intermediate files, built using rpmbuild on the host system; the final binaries are built in mock chroots. The mock build also builds new SRPMs.
If %{dist} is included in the package name - it is typically in the release - then the intermediate SRPM's name will not match the name of the binary RPM if the host system is not the same as the mock chroot. For instance, building foo-0.0.1-1.fc21.src.rpm will produce foo-0.0.1-1.el6.x86_64.rpm. This difference means that the target and source side patterns of a naive Make pattern rule won't match. To avoid this, when running rpmbuild we force %{dist} to the same value as it will have in mock, but this adds complexity when building packages for several different distributions on the same host.
The dependency generation and makefile have changed considerably since we made the %{dist} change. We should check whether it is still necessary to set it at all. One possibility is to unset it, producing intermediate SRPMs with names such as foo-0.0.1-1.src.rpm, and change the rule generation to match these to the appropriate binary RPMs.
The text was updated successfully, but these errors were encountered:
We can remove dist from the names of the intermediate SRPMs. The following changes are needed:
pass --undefine dist to rpmbuild in Makefile.rules
modify planex.spec.Spec to generate source package names without dist (this is harder than it seems because %{dist} is interpolated into the source package release field when the spec file is loaded, rather than when we expand the filename macro.
We still need to define DIST in the Makefile and pass it to planex-depend. planex-depend passes this value into planex.spec.Spec, so that it can generate correct binary package names. The correct way to do this would seem to be to parse the spec file twice - once with dist set and once without. This is ugly, but any other approach, such as removing the value of dist from release after the fact, would be more error prone.
euanh
changed the title
Do we still need to include dist (e.g. el6) in the names of our intermediate srpms?
Stop including dist (e.g. el6) in the names of our intermediate srpms
Apr 23, 2015
Planex generates SRPMs, which it then feeds into mock. The SRPMs are intermediate files, built using rpmbuild on the host system; the final binaries are built in mock chroots. The mock build also builds new SRPMs.
If
%{dist}
is included in the package name - it is typically in the release - then the intermediate SRPM's name will not match the name of the binary RPM if the host system is not the same as the mock chroot. For instance, buildingfoo-0.0.1-1.fc21.src.rpm
will producefoo-0.0.1-1.el6.x86_64.rpm
. This difference means that the target and source side patterns of a naive Make pattern rule won't match. To avoid this, when running rpmbuild we force%{dist}
to the same value as it will have in mock, but this adds complexity when building packages for several different distributions on the same host.The dependency generation and makefile have changed considerably since we made the
%{dist}
change. We should check whether it is still necessary to set it at all. One possibility is to unset it, producing intermediate SRPMs with names such asfoo-0.0.1-1.src.rpm
, and change the rule generation to match these to the appropriate binary RPMs.The text was updated successfully, but these errors were encountered: