In regard to: Changing the Build Host field?, Bart Whiteley said (at...:
Is there a way to change the Build Host data in an RPM? I would like an environment variable or something in .rpmmacros to specify the Build Host field instead of having rpmbuild use the real hostname.
I tried %_buildhost in .rpmmacros (just guessing), but no luck.
Is there a way to specify a Build Host instead of rpmbuild determining the real hostname?
This question was asked a while back on the list. Last I looked, there was no easy "%_lie_about_the_build_host" macro (but that doesn't mean it's not possible).
Take a look at the code for the version of RPM you're using to verify, but I believe RPM is just calling uname or hostname to get the hostname. If the path to that binary is hardcoded in the source, your only option is to modify the source and rebuild.
If it's using the PATH, you can always trick it by installing a `uname' or `hostname' (or whatever RPM is exec'ing) that lies about the hostname, and modifying the PATH to use your version rather than the system version.
Alternately, if it's not exec'ing a program and is instead making C calls, you could use library replacement to insert your own relevant calls that lie about what the host name is.
Tim -- Tim Mooney mooney@xxxxxxxxxxxxxxxxxxxxxxxxx Information Technology Services (701) 231-1076 (Voice) Room 242-J6, IACC Building (701) 231-8541 (Fax) North Dakota State University, Fargo, ND 58105-5164
_______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list