overriding rpmrc options inside mock

Todd Zullinger tmz at pobox.com
Thu Mar 27 16:03:19 UTC 2008


Hans de Goede wrote:
> I've contacted Matt Domsch to ask him to add
> -Werror-implicit-function-declaration to the default optflags with
> his next mass rebuild to get an idea of the amount of packages that
> this will cause to fail (most likely a huge amount, but we will
> see).
>
> Matt is so kind as to give this a try, but, to quote him: "Where do
> I add that option to make sure it's in effect for the mock builds?"
>
> I have no clue, so how do we this?

This needs to be added to the .rpmrc file in the mock root (from what
I've gathered in other threads).  You should be able to use this sort
of thing in your mock config:

config_opts['files']['path/name/no/leading/slash'] = "file contents"

I think you'll want something about like this (untested ;)):

config_opts['files']['builddir/.rpmrc'] = """
optflags: i386 -O2 -g -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -Werror-implicit-function-declaration
optflags: i486 -O2 -g -m32 -march=i486 -fasynchronous-unwind-tables -Werror-implicit-function-declaration
optflags: i586 -O2 -g -m32 -march=i586 -fasynchronous-unwind-tables -Werror-implicit-function-declaration
optflags: i686 -O2 -g -m32 -march=i686 -mtune=generic -fasynchronous-unwind-tables -Werror-implicit-function-declaration
optflags: pentium3 -O2 -g -m32 -march=pentium3 -mtune=generic -fasynchronous-unwind-tables -Werror-implicit-function-declaration
optflags: pentium4 -O2 -g -m32 -march=pentium4 -mtune=generic -fasynchronous-unwind-tables -Werror-implicit-function-declaration
optflags: athlon -O2 -g -m32 -march=athlon -fasynchronous-unwind-tables -Werror-implicit-function-declaration
optflags: ia64 -O2 -g -m64 -mtune=generic -Werror-implicit-function-declaration
optflags: x86_64 -O2 -g -m64 -mtune=generic -Werror-implicit-function-declaration
optflags: amd64 -O2 -g -mtune=generic -Werror-implicit-function-declaration
optflags: ia32e -O2 -g -m64 -mtune=generic -Werror-implicit-function-declaration
...
"""

You'll want to grab the optflags settings from a rawhide box.  The
snippet above is from F8 (though I don't know that any of the values
changed in rawhide).

-- 
Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hard work never killed anybody, but why take a chance?
    -- Charlie McCarthy

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 542 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/devel/attachments/20080327/66f5a736/attachment-0002.bin 


More information about the devel mailing list