Building optimized and non-optimized versions of the same rpm

Carter Sanders <[email protected]> Mon, 23 Jun 2008 18:08:37 -0700
Newsgroups gmane.linux.redhat.rpm.general
Message-ID <[email protected]>
Hi -

    My company has a need to build both optimized and non-optimized 
flavors of the same RPM. The issue is not about the debug symbols table, 
but rather that various C++ optimizations make it difficult to debug the 
executables, even if you don't strip the symbols.

    Consequently, we want to build and manage both flavors. Is there a 
recommended procedure for distinguishing two rpms that have identical 
source but have been compiled with different flags? I was considering 
altering the "Release:" field to have a suffix "_optimized" or 
"_unoptimized". I also could actually change the name of the rpm to 
reflect the flavor, but I'm concerned that will introduce dependency 
problems.

    I could set up separate yum servers for each flavor, but I'm 
concerned about users being unable to easily tell which flavor an rpm is 
once it's installed.

    Has anybody out there got a good approach for handling this? Thanks 
in advance.

-Carter