PATCH, RFC: handle debug options for rawhide differently (was: Re: [kernel] Disable debugging options.)

Josh Boyer jwboyer at redhat.com
Tue Nov 20 18:57:44 UTC 2012


On Sun, Oct 21, 2012 at 10:00:23PM +0200, Thorsten Leemhuis wrote:
> 
> How does the patch (against master) look to you guys? Did I miss anything that is needed? Please note that all the changes the patch does to the config-foo files are just those that a "make release" does now. And a lot of stuff is removed from the Makefiles, hence the patch looks big.

So... I think I might have found one thing.  See below.

>  nodebug: release
>  	@perl -pi -e 's/^%define debugbuildsenabled 1/%define debugbuildsenabled 0/' kernel.spec
> -release: config-release
> +release: 
>  	@perl -pi -e 's/^%define debugbuildsenabled 0/%define debugbuildsenabled 1/' kernel.spec
>  	@perl -pi -e 's/^%define rawhide_skip_docs 1/%define rawhide_skip_docs 0/' kernel.spec
>  	@rpmdev-bumpspec -c "Disable debugging options." kernel.spec

Those two targets aren't mutually exclusive.  So the following bit:

>  %if !%{debugbuildsenabled}
> -%if %{with_release}
> -# The normal build is a really debug build and the user has explicitly requested
> -# a release kernel. Change the config files into non-debug versions.
> -make -f %{SOURCE19} config-release
> +%if !%{with_release}
> +# some additional debugging for rawhide builds
> +perl -pi -e 's/# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set/CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y/' config-debug
> +perl -pi -e 's/# CONFIG_PM_TEST_SUSPEND is not set/CONFIG_PM_TEST_SUSPEND=y/' config-generic
> +perl -pi -e 's/# CONFIG_PM_ADVANCED_DEBUG is not set/CONFIG_PM_ADVANCED_DEBUG=y/' config-generic
> +perl -pi -e 's/# CONFIG_B43_DEBUG is not set/CONFIG_B43_DEBUG=y/' config-generic
> +perl -pi -e 's/# CONFIG_B43LEGACY_DEBUG is not set/CONFIG_B43LEGACY_DEBUG=y/' config-generic
> +# Enable Maximum number of SMP Processors and NUMA Nodes
> +perl -pi -e 's/# CONFIG_MAXSMP is not set/CONFIG_MAXSMP=y/' config-x86-generic
> +# Try out UAS in rawhide builds
> +perl -pi -e 's/# CONFIG_USB_UAS is not set/CONFIG_USB_UAS=m/' config-generic
> +
> +# now make the nodebug config file actually a debug config
> +cp config-debug config-nodebug

Basically turns a release kernel that doesn't have the debug flavour
enabled back into a debug kernel.  E.g.  if you're in rawhide (or
really, wherever) and you do:

'make release; make nodebug'

you wind up with litterally no changes in the configs.  However, that
isn't what is expected.  The 'make release' call turns off the debug
options, and the 'make nodebug' call disables the debug flavour (so
there's no kernel-debug) build.

That isn't ever a state that's used for an official build in koji, but
I do think people building locally do that quite often to speed up
kernel builds.

josh


More information about the kernel mailing list