{"action":"created","issue":{"url":"https://api.github.com/repos/xenserver/planex/issues/194","labels_url":"https://api.github.com/repos/xenserver/planex/issues/194/labels{/name}","comments_url":"https://api.github.com/repos/xenserver/planex/issues/194/comments","events_url":"https://api.github.com/repos/xenserver/planex/issues/194/events","html_url":"https://github.com/xenserver/planex/issues/194","id":67079750,"number":194,"title":"Do we still need to include dist (e.g. el6) in the names of our intermediate srpms?","user":{"login":"euanh","id":789066,"avatar_url":"https://avatars.githubusercontent.com/u/789066?v=3","gravatar_id":"","url":"https://api.github.com/users/euanh","html_url":"https://github.com/euanh","followers_url":"https://api.github.com/users/euanh/followers","following_url":"https://api.github.com/users/euanh/following{/other_user}","gists_url":"https://api.github.com/users/euanh/gists{/gist_id}","starred_url":"https://api.github.com/users/euanh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/euanh/subscriptions","organizations_url":"https://api.github.com/users/euanh/orgs","repos_url":"https://api.github.com/users/euanh/repos","events_url":"https://api.github.com/users/euanh/events{/privacy}","received_events_url":"https://api.github.com/users/euanh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/xenserver/planex/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/xenserver/planex/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-08T08:45:31Z","updated_at":"2015-04-08T13:55:28Z","closed_at":null,"body":"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.   \r\n\r\nIf `%{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.\r\n\r\nThe 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."},"comment":{"url":"https://api.github.com/repos/xenserver/planex/issues/comments/90924024","html_url":"https://github.com/xenserver/planex/issues/194#issuecomment-90924024","issue_url":"https://api.github.com/repos/xenserver/planex/issues/194","id":90924024,"user":{"login":"euanh","id":789066,"avatar_url":"https://avatars.githubusercontent.com/u/789066?v=3","gravatar_id":"","url":"https://api.github.com/users/euanh","html_url":"https://github.com/euanh","followers_url":"https://api.github.com/users/euanh/followers","following_url":"https://api.github.com/users/euanh/following{/other_user}","gists_url":"https://api.github.com/users/euanh/gists{/gist_id}","starred_url":"https://api.github.com/users/euanh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/euanh/subscriptions","organizations_url":"https://api.github.com/users/euanh/orgs","repos_url":"https://api.github.com/users/euanh/repos","events_url":"https://api.github.com/users/euanh/events{/privacy}","received_events_url":"https://api.github.com/users/euanh/received_events","type":"User","site_admin":false},"created_at":"2015-04-08T13:55:28Z","updated_at":"2015-04-08T13:55:28Z","body":"We can remove dist from the names of the intermediate SRPMs.   The following changes are needed:\r\n * pass `--undefine dist` to rpmbuild in Makefile.rules\r\n * 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.\r\nWe 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."}}