[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Is there a way to disable 'build host' information?
- From: Tim Mooney <mooney dogbert cc ndsu NoDak edu>
- To: rpm-list redhat com
- Subject: Re: Is there a way to disable 'build host' information?
- Date: Fri, 27 Sep 2002 17:10:51 -0500 (CDT)
In regard to: Is there a way to disable 'build host' information?, Philip S...:
>I was wondering if there is a way to not include the
>"Build Host" information in the RPM package.
>
>Maximum RPM recommends that you 'choose your build
>machine names wisely!' as a 'silly or offensive name
>might be embarrassing'. These statements lead me to
>believe that "Build Host" cannot be omitted.
>Does any one have any suggestions or comments?
Philip-
I haven't seen a response to your question, so I'll take a stab.
I've only briefly looked at the sources, but a quick grep shows that build
host is a string returned by the function buildHost() in build/names.c,
and it's essentially
gethostbyname(gethostname());
This leaves you a few options:
1) hack RPM's source code so that buildHost() returns what you want it
to return. It's a trivial change.
2) If you don't want to hack RPM but you want it to get the build host
name wrong, many decent versions of UNIX and Linux support library
preloading, and using that method you can cause any program that is linked
shared (which RPM may not be, depending on your platform) to get a custom
version of whatever function you want to replace. In this case, you could
write a custom `gethostname()' that just returns whatever you want it to
return and then compile that into a shared library and force it to be
loaded before the system libraries, so your version of gethostname() is
the one RPM sees.
3) Take maximum RPM's advice, and just build on a machine that has a name
you're not ashamed of. ;-)
Tim
--
Tim Mooney mooney@dogbert.cc.ndsu.NoDak.edu
Information Technology Services (701) 231-1076 (Voice)
Room 242-J6, IACC Building (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[]