This service will be undergoing maintenance at 20:00 UTC, 2017-04-03. It is expected to last about 30 minutes
Bug 1309367 - RFE: option to pass BUILDHOST to rpmbuild
RFE: option to pass BUILDHOST to rpmbuild
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
: FutureFeature
Depends On:
Blocks: 1302040
  Show dependency treegraph
 
Reported: 2016-02-17 10:51 EST by Miroslav Suchý
Modified: 2016-06-02 10:19 EDT (History)
17 users (show)

See Also:
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 10:19:42 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Use the _buildhost macro as buildhost if defined (1.42 KB, patch)
2016-03-01 11:45 EST, Nicolas Vigier
no flags Details | Diff
Use the _buildhost macro as buildhost if defined v2 (1.55 KB, patch)
2016-03-02 05:02 EST, Nicolas Vigier
no flags Details | Diff

  None (edit)
Description Miroslav Suchý 2016-02-17 10:51:29 EST
+++ This bug was initially created as a clone of Bug #1302040 +++

It will be nice to have option to pass to rpmbuild some argument which will override builhost.
This is useful if you are building inside of container, which have just uuid as host name.
Comment 1 Florian Festi 2016-03-01 03:01:43 EST
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.
Comment 2 Miroslav Suchý 2016-03-01 03:41:21 EST
Passing it as macro name is just fine.
Comment 3 Florian Festi 2016-03-01 11:05:39 EST
FYI: I just started a thread on rpm-ecosystem@lists.rpm.org about reproducible build in which this change fits into.
Comment 4 Nicolas Vigier 2016-03-01 11:42:05 EST
I have a patch to pass it as a macro:
http://lists.rpm.org/pipermail/rpm-maint/2013-September/003611.html
Comment 5 Nicolas Vigier 2016-03-01 11:45 EST
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.
Comment 6 Pascal Terjan 2016-03-01 15:18:36 EST
(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
Comment 7 Miroslav Suchý 2016-03-02 04:16:57 EST
(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.
Comment 8 Nicolas Vigier 2016-03-02 05:02 EST
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.
Comment 9 Florian Festi 2016-06-02 10:19:42 EDT
Added upstream and to rawhide

Note You need to log in before you can comment on or make changes to this bug.