Bug 1309367
Summary: | RFE: option to pass BUILDHOST to rpmbuild | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Miroslav Suchý <msuchy> | ||||||
Component: | rpm | Assignee: | Packaging Maintenance Team <packaging-team-maint> | ||||||
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | unspecified | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | rawhide | CC: | boklm, dhiru, extras-qa, ffesti, jdisnard, jzeleny, lkardos, matthew, mebrown, msimacek, msuchy, novyjindrich, packaging-team-maint, paul.wouters, pknirsch, praiskup, pterjan, williams | ||||||
Target Milestone: | --- | Keywords: | FutureFeature | ||||||
Target Release: | --- | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | rpm-4.13.0-0.rc1.37.fc25 | Doc Type: | Enhancement | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | 1302040 | Environment: | |||||||
Last Closed: | 2016-06-02 14:19:42 UTC | Type: | Bug | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 1302040 | ||||||||
Attachments: |
|
Description
Miroslav Suchý
2016-02-17 15:51:29 UTC
Main question here is how to pass the name. Possible implementations can use a rpm macro - which has the benefit of being part of some package within the build root - or an environment variable - as in #1288713 . A command line option is possible but least preferred as you can also set macros on the command line. Passing it as macro name is just fine. FYI: I just started a thread on rpm-ecosystem.org about reproducible build in which this change fits into. I have a patch to pass it as a macro: http://lists.rpm.org/pipermail/rpm-maint/2013-September/003611.html Created attachment 1131998 [details]
Use the _buildhost macro as buildhost if defined
Here is a patch to use the _buildhost macro as buildhost if defined.
(In reply to Nicolas Vigier from comment #5) > Created attachment 1131998 [details] > Use the _buildhost macro as buildhost if defined > > Here is a patch to use the _buildhost macro as buildhost if defined. I think it would be better to have an error when it's >= 1024 rather than silently using the hostname of the machine (In reply to Pascal Terjan from comment #6) > I think it would be better to have an error when it's >= 1024 rather than > silently using the hostname of the machine +1 According the http://www.ietf.org/rfc/rfc1035.txt section 2.3.4 - the max length of FQDN is 255 characters. So 1024 is way over this limit and never should be reached. So getting to this point is probably result of some mistake or error and in this case throwing error is just fine. Created attachment 1132230 [details]
Use the _buildhost macro as buildhost if defined v2
Here is a new version of the patch that adds a warning when _buildhost is too long.
Added upstream and to rawhide Note there seems to be a bug in this feature. When using mock --rebuild --rpmbuild-opts='-D_buildhost=f33-deps-2' some.src.rpm, it seems to replace the "-" characters for "_", possibly because it is the same code path as for versions where these are not allowed? ah, it actually works when you use the right syntax: mock --rebuild --rpmbuild-opts '-D "_buildhost f33-deps-2"' some.src.rpm |