How to change "build host" in rpm

I need to change the name "Build Host" to another actual host name, fqdn (selected from / etc / hosts)

During rpm generation, we set the rpm properties through the .spec file, but I understand that the values ​​of the “Build Host” cannot be set through the .spec file.

Is there a way to change the "Build Host" value in rpm without actually changing the hostname of the Linux machine.

i.e. No change to / etc / sysconfig / network or

https://www.onyxpoint.com/spoofing-the-build-hostname-in-mock/

+4
source share
3 answers

LD_PRELOAD , , Makefiles, 32-, 64- .

.

+1

rpmbuild -ba something.spec /etc/hosts:
:
127.0.0.1 localhost my.local.domain.com
To:
127.0.0.1 'what-I-want-to-appear-on-build-host' localhost my.local.domain.com

, .spec.

+1
0
source

Source: https://habr.com/ru/post/1649239/


All Articles