summaryrefslogtreecommitdiffstats
path: root/kernel.spec
diff options
context:
space:
mode:
authorChuck Ebbert <cebbert@redhat.com>2011-10-23 00:17:53 -0400
committerChuck Ebbert <cebbert@redhat.com>2011-10-23 00:17:53 -0400
commitc6b36e066de776b9ced57e937de9e6ba4ef887e9 (patch)
tree49a7f2e92e46229fa8e2f094b5166f6396650641 /kernel.spec
parent65b0d9b17d6f4e29af727394aad61b52699bbe54 (diff)
downloadkernel-c6b36e066de776b9ced57e937de9e6ba4ef887e9.tar.gz
kernel-c6b36e066de776b9ced57e937de9e6ba4ef887e9.tar.xz
kernel-c6b36e066de776b9ced57e937de9e6ba4ef887e9.zip
Make rpmbuild option "without_debug" work properly on rawhide.
Diffstat (limited to 'kernel.spec')
-rw-r--r--kernel.spec47
1 files changed, 31 insertions, 16 deletions
diff --git a/kernel.spec b/kernel.spec
index 093f9315a..01ecf55be 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -125,21 +125,7 @@ Summary: The Linux kernel
%define with_omap %{?_without_omap: 0} %{?!_without_omap: 1}
# kernel-tegra (only valid for arm)
%define with_tegra %{?_without_tegra: 0} %{?!_without_tegra: 1}
-
-# Build the kernel-doc package, but don't fail the build if it botches.
-# Here "true" means "continue" and "false" means "fail the build".
-%if 0%{?released_kernel}
-%define doc_build_fail false
-%else
-%define doc_build_fail true
-%endif
-
-%define rawhide_skip_docs 1
-%if 0%{?rawhide_skip_docs}
-%define with_doc 0
-%define doc_build_fail true
-%endif
-
+#
# Additional options for user-friendly one-off kernel building:
#
# Only build the base kernel (--with baseonly):
@@ -150,7 +136,7 @@ Summary: The Linux kernel
%define with_paeonly %{?_with_paeonly: 1} %{?!_with_paeonly: 0}
# Only build the debug kernel (--with dbgonly):
%define with_dbgonly %{?_with_dbgonly: 1} %{?!_with_dbgonly: 0}
-
+#
# should we do C=1 builds with sparse
%define with_sparse %{?_with_sparse: 1} %{?!_with_sparse: 0}
@@ -162,6 +148,23 @@ Summary: The Linux kernel
# Want to build a vanilla kernel build without any non-upstream patches?
%define with_vanilla %{?_with_vanilla: 1} %{?!_with_vanilla: 0}
+# We need to remember if the user has explicitly requested without_debug
+%define requested_nodebug !%{with_debug}
+
+# Build the kernel-doc package, but don't fail the build if it botches.
+# Here "true" means "continue" and "false" means "fail the build".
+%if 0%{?released_kernel}
+%define doc_build_fail false
+%else
+%define doc_build_fail true
+%endif
+
+%define rawhide_skip_docs 1
+%if 0%{?rawhide_skip_docs}
+%define with_doc 0
+%define doc_build_fail true
+%endif
+
# pkg_release is what we'll fill in for the rpm Release: field
%if 0%{?released_kernel}
@@ -559,6 +562,7 @@ Source11: genkey
Source14: find-provides
Source15: merge.pl
+Source19: Makefile.release
Source20: Makefile.config
Source21: config-debug
Source22: config-nodebug
@@ -1183,6 +1187,14 @@ ApplyPatch %{stable_patch_01}
cp $RPM_SOURCE_DIR/config-* .
cp %{SOURCE15} .
+%if !%{debugbuildsenabled}
+%if %{requested_nodebug}
+# The normal build is a really debug build and the user has explicitly requested
+# without_debug. Change the config files into non-debug versions.
+make -f %{SOURCE19} config-release
+%endif
+%endif
+
# Dynamically generate kernel .config files from config-* files
make -f %{SOURCE20} VERSION=%{version} configs
@@ -2084,6 +2096,9 @@ fi
# ||----w |
# || ||
%changelog
+* Sun Oct 23 2011 Chuck Ebbert <cebbert@redhat.com>
+- Make rpmbuild option "without_debug" work properly on rawhide.
+
* Fri Oct 21 2011 Chuck Ebbert <cebbert@redhat.com> 3.1.0-0.rc10.git1.1
- Require grubby >= 8.3-1 like F16 does.
- Update to upstream HEAD (v3.1-rc10-42-g2efd7c0).