[CentOS-devel] still trying to build upstream srpms
Jeff Johnson
n3npq at mac.com
Mon Sep 1 21:09:21 UTC 2008
On Sep 1, 2008, at 4:58 PM, Joe Pruett wrote:
>>> What's implied when people say mock is being used, is that there
>>> are no special '--define', etc. flags passed to rpmbuild from
>>> within mock.
>>
>> Hmmm, and why is passing --define (or not) relevant to anything in
>> the real world?
>>
>> Yes, the CentOS issue is trying to identify a "reproducible
>> build", as defined by the
>> RHEL build system, and rpm macros are often different and
>> continuously changing.
>>
>> If the macros used were the only part of the "reproducible build"
>> problem,
>> then --macrosused (and the RPMTAG_BUILDMACROS header extension)
>> solves the problem by spewing the list of all macros used
>> by rpmbuild (or any other rpm command) at termination,
>> and/or by including the equivalent list of used macros (and
>> definitions) within a *.src.rpm
>> header.
>>
>> But the real problem is that all build systems contain versions of
>> compilers and toolchains
>> that are different. That's a whole different class of problem.
>>
>> So not passing --define is hardly relevant imho, the tool chains
>> used for building
>> are what is very tricky to identify and attempt to "reproduce".
>
> a lot of rpms use --define to control how the package is built,
> what functions to enable in the package. postgresql is a good
> example. it has 47 %if clauses in the spec file that directly or
> indirectly rely on --define switches at rpmbuild time.
>
> this --macrosused/RPMTAG_BUILDMACROS sounds like exactly what i'm
> looking for, but it doesn't appear to be part of the rpm system
> used by rh/centos.
>
Yup. too bad for you & Centos.
FWIW, adding %dump at the very end of spec file, and grep'ping out
the used macros which are marked in the %dump spewage (unused
macros look like "^-14:..." while used macros look like ("-14=..." iirc)
will work with all versions of rpm I've ever touched.
FYI, the "-14" is "the level of macro recursion", and negative
numbers are
global. The value identifies where the macro was defined. Not useful
at all,
but that's what the "-14" is and does.
Porting --macrosused to rpm-4.5.6.7.8.9. ain't rocket science either ...
> but without the newer rpm system, how do the centos builders know
> what flags to use to build an rpm? are they all built without any
> --define flags? do we know that is how rh does it?
I'd guess that all the --with/--without "stuff" is hard wired into a
macro config file (or perhaps done directly by mock), another reason
why "No --define in mock ..." Simply Does Not Matter.
73 de Jeff
More information about the CentOS-devel
mailing list