As far as I know, nobody actually uses buildid to differentiate between
kernel builds.  It's possible to simply append something to baserelease
to mark it as a "non-official" build, and that's really all buildid is
doing anway.  Drop it and remove some macro clutter.
---
 kernel.spec | 40 +++++++---------------------------------
 1 file changed, 7 insertions(+), 33 deletions(-)

diff --git a/kernel.spec b/kernel.spec
index fb65acb..d9e90c9 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -16,36 +16,6 @@ Summary: The Linux kernel
 %global signmodules 0
 %endif
 
-# Save original buildid for later if it's defined
-%if 0%{?buildid:1}
-%global orig_buildid %{buildid}
-%undefine buildid
-%endif
-
-###################################################################
-# Polite request for people who spin their own kernel rpms:
-# please modify the "buildid" define in a way that identifies
-# that the kernel isn't the stock distribution kernel, for example,
-# by setting the define to ".local" or ".bz123456". This will be
-# appended to the full kernel version.
-#
-# (Uncomment the '#' and both spaces below to set the buildid.)
-#
-# % define buildid .local
-###################################################################
-
-# The buildid can also be specified on the rpmbuild command line
-# by adding --define="buildid .whatever". If both the specfile and
-# the environment define a buildid they will be concatenated together.
-%if 0%{?orig_buildid:1}
-%if 0%{?buildid:1}
-%global srpm_buildid %{buildid}
-%define buildid %{srpm_buildid}%{orig_buildid}
-%else
-%define buildid %{orig_buildid}
-%endif
-%endif
-
 # baserelease defines which build revision of this kernel version we're
 # building.  We used to call this fedora_build, but the magical name
 # baserelease is matched by the rpmdev-bumpspec tool, which you should use.
@@ -62,6 +32,10 @@ Summary: The Linux kernel
 # For non-released -rc kernels, this will be appended after the rcX and
 # gitX tags, so a 3 here would become part of release "0.rcX.gitX.3"
 #
+# If you are building your own kernel RPM outside of an official koji
+# build (non-scratch build), then please append something to the baserelease
+# value below.  For example, set it to "300.bz1234567" or "300.local".
+#
 %global baserelease 1
 %global fedora_build %{baserelease}
 
@@ -166,9 +140,9 @@ Summary: The Linux kernel
 
 %if 0%{?stable_rc}
 %define stable_rctag .rc%{stable_rc}
-%define pkg_release 0%{stable_rctag}.%{fedora_build}%{?buildid}%{?dist}
+%define pkg_release 0%{stable_rctag}.%{fedora_build}%{?dist}
 %else
-%define pkg_release %{fedora_build}%{?buildid}%{?dist}
+%define pkg_release %{fedora_build}%{?dist}
 %endif
 
 %else
@@ -184,7 +158,7 @@ Summary: The Linux kernel
 %else
 %define gittag .git0
 %endif
-%define pkg_release 0%{?rctag}%{?gittag}.%{fedora_build}%{?buildid}%{?dist}
+%define pkg_release 0%{?rctag}%{?gittag}.%{fedora_build}%{?dist}
 
 %endif
 
-- 
1.8.4.2

_______________________________________________
kernel mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/kernel

Reply via email to