[kernel] r19288 - dists/sid/linux/debian/patches/debian
Ben Hutchings
benh at alioth.debian.org
Tue Jul 24 00:28:09 UTC 2012
Author: benh
Date: Tue Jul 24 00:28:08 2012
New Revision: 19288
Log:
Move definition of LINUX_PACKAGE_ID to new header <generated/package.h>
Modified:
dists/sid/linux/debian/patches/debian/version.patch
Modified: dists/sid/linux/debian/patches/debian/version.patch
==============================================================================
--- dists/sid/linux/debian/patches/debian/version.patch Mon Jul 23 23:22:18 2012 (r19287)
+++ dists/sid/linux/debian/patches/debian/version.patch Tue Jul 24 00:28:08 2012 (r19288)
@@ -22,7 +22,15 @@
--- a/init/version.c
+++ b/init/version.c
-@@ -37,12 +37,12 @@ struct uts_namespace init_uts_ns = {
+@@ -11,6 +11,7 @@
+ #include <linux/uts.h>
+ #include <linux/utsname.h>
+ #include <generated/utsrelease.h>
++#include <generated/package.h>
+ #include <linux/version.h>
+
+ #ifndef CONFIG_KALLSYMS
+@@ -37,12 +38,12 @@ struct uts_namespace init_uts_ns = {
};
EXPORT_SYMBOL_GPL(init_uts_ns);
@@ -41,7 +49,7 @@
" (" LINUX_COMPILER ") %s\n";
--- a/scripts/mkcompile_h
+++ b/scripts/mkcompile_h
-@@ -73,8 +73,25 @@ UTS_TRUNCATE="cut -b -$UTS_LEN"
+@@ -73,8 +73,18 @@ UTS_TRUNCATE="cut -b -$UTS_LEN"
echo \#define UTS_VERSION \"`echo $UTS_VERSION | $UTS_TRUNCATE`\"
@@ -51,17 +59,10 @@
+ DISTRIBUTION=${DISTRIBUTION:-Debian}
+
+ if [ "$DISTRIBUTION_OFFICIAL_BUILD" ]; then
-+ echo \#define LINUX_PACKAGE_ID \" \($DISTRIBUTION $DISTRIBUTION_VERSION\)\"
+ echo \#define LINUX_COMPILE_BY \"unknown\"
+ echo \#define LINUX_COMPILE_HOST \"$DISTRIBUTION\"
+ echo \#define LINUX_COMPILE_ID \" \($DISTRIBUTION_MAINTAINER\)\"
+ else
-+ if [ -e version.$DISTRIBUTION ]; then
-+ DISTRIBUTION_VERSION=$(cut -d" " -f1 version.$DISTRIBUTION)
-+ else
-+ DISTRIBUTION_VERSION=unknown
-+ fi
-+ echo \#define LINUX_PACKAGE_ID \" \($DISTRIBUTION_VERSION\)\"
+ echo \#define LINUX_COMPILE_BY \"`echo $LINUX_COMPILE_BY | $UTS_TRUNCATE`\"
+ echo \#define LINUX_COMPILE_HOST \"`echo $LINUX_COMPILE_HOST | $UTS_TRUNCATE`\"
+ echo \#define LINUX_COMPILE_ID \" \(\" LINUX_COMPILE_BY \"@\" LINUX_COMPILE_HOST \"\)\"
@@ -69,3 +70,51 @@
echo \#define LINUX_COMPILER \"`$CC -v 2>&1 | tail -n 1`\"
) > .tmpcompile
+--- a/Makefile
++++ b/Makefile
+@@ -976,7 +976,7 @@ endif
+ prepare2: prepare3 outputmakefile asm-generic
+
+ prepare1: prepare2 include/linux/version.h include/generated/utsrelease.h \
+- include/config/auto.conf
++ include/config/auto.conf include/generated/package.h
+ $(cmd_crmodverdir)
+
+ archprepare: archscripts prepare1 scripts_basic
+@@ -1008,12 +1008,36 @@ define filechk_version.h
+ echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';)
+ endef
+
++DISTRIBUTION := $(shell lsb_release -is 2>/dev/null)
++ifeq ($(DISTRIBUTION),)
++DISTRIBUTION := Debian
++endif
++
++ifneq ($(DISTRIBUTION_OFFICIAL_BUILD),)
++define filechk_package.h
++ echo \#define LINUX_PACKAGE_ID \" \($(DISTRIBUTION) $(DISTRIBUTION_VERSION)\)\"
++endef
++else
++ifneq ($(wildcard version.$(DISTRIBUTION)),)
++define filechk_package.h
++ echo \#define LINUX_PACKAGE_ID \" \($$(cut -d" " -f1 version.$(DISTRIBUTION))\)\"
++endef
++else
++define filechk_package.h
++ echo \#define LINUX_PACKAGE_ID \" \(unknown\)\"
++endef
++endif
++endif
++
+ include/linux/version.h: $(srctree)/Makefile FORCE
+ $(call filechk,version.h)
+
+ include/generated/utsrelease.h: include/config/kernel.release FORCE
+ $(call filechk,utsrelease.h)
+
++include/generated/package.h: $(srctree)/Makefile FORCE
++ $(call filechk,package.h)
++
+ PHONY += headerdep
+ headerdep:
+ $(Q)find $(srctree)/include/ -name '*.h' | xargs --max-args 1 \
More information about the Kernel-svn-changes
mailing list