At present one can define (a.o.) 'Packager' and 'Vendor' when one builds an rpm but not the 'Buildhost'. 'Buildhost' will equal the 'hostname'. There seem to be valid reasons for that, but I still thought a 'buildhost' macro would be nice. Therefore, too much work let to this (trivial?) patch (against build/names.c of rpm 4.2 as distributed with Red Hat Linux 9): --- build/names.c 2002-07-02 21:07:03.000000000 +0200 +++ build/names.c 2003-06-15 01:39:57.000000000 +0200 @@ -198,7 +198,17 @@ static char hostname[1024]; static int gotit = 0; struct hostent *hbn; + char *rpmbh; + if (gotit) return hostname; + rpmbh=rpmExpand("%{?buildhost}", NULL); + if (*rpmbh!='\0' && strlen(rpmbh)<sizeof hostname) { + gotit=1; + strcpy (hostname, rpmbh); + rpmMessage(RPMMESS_NORMAL, "Buildhost set to '%s' for this build\n", rpmbh); + } + _free(rpmbh); + if (! gotit) { (void) gethostname(hostname, sizeof(hostname)); /*@-unrecog -multithreaded @*/ Do as you please with this patch.