summaryrefslogtreecommitdiff
path: root/debian/patches/debian/version.patch
diff options
context:
space:
mode:
authorBen Hutchings <benh@debian.org>2012-09-17 02:19:21 +0000
committerBen Hutchings <benh@debian.org>2012-09-17 02:19:21 +0000
commitaf9147122ae0926d46f98d0f53312be9dd847f70 (patch)
treefbb52e4de945bb3665751899eaa3b67b9b858fd8 /debian/patches/debian/version.patch
parent2d03cb93793855584d65b9dcede7868ab16617db (diff)
parent348c9c149b65839a34d42ca910a3dde406e59108 (diff)
Merge changes from sid up to 3.2.29-1
Most of the patches added to sid are already in 3.5 and could be dropped. Some others needed to be re-generated without the backporting changes. Ignore the rt changes as there is no rt featureset for 3.5. svn path=/dists/trunk/linux/; revision=19387
Diffstat (limited to 'debian/patches/debian/version.patch')
-rw-r--r--debian/patches/debian/version.patch322
1 files changed, 241 insertions, 81 deletions
diff --git a/debian/patches/debian/version.patch b/debian/patches/debian/version.patch
index a88e6974c..a9f068f97 100644
--- a/debian/patches/debian/version.patch
+++ b/debian/patches/debian/version.patch
@@ -1,90 +1,250 @@
-From: Bastian Blank <waldi@debian.org>
-Subject: Add debian version information to kernel version string
-Date: Sun, 20 May 2007 11:46:51 +0200
-
-Include the package version in /proc/version and the initial log
-banner.
-
-Determine the target distribution ($DISTRIBUTION) with lsb_release,
-defaulting to Debian.
+From: Ben Hutchings <ben@decadent.org.uk>
+Subject: Include package version along with kernel release in stack traces
+Date: Tue, 24 Jul 2012 03:13:10 +0100
For distribution binary packages we assume
-$DISTRIBUTION_OFFICIAL_BUILD is set. Add $DISTRIBUTION and
-$DISTRIBUTION_VERSION after the kernel version (UTS_RELEASE), and
-replace the account name used to build the package with
-$DISTRIBUTION_UPLOADER.
-
-[bwh: Changed $DISTRIBUTION_UPLOADER to $DISTRIBUTION_MAINTAINER.]
-
-For custom packages built from a linux-source package, read the
-package version from version.$DISTRIBUTION and add that after
-the kernel version string.
+$DISTRIBUTION_OFFICIAL_BUILD, $DISTRIBUTOR and $DISTRIBUTION_VERSION
+are set.
---- a/init/version.c
-+++ b/init/version.c
-@@ -37,12 +37,31 @@
- };
- EXPORT_SYMBOL_GPL(init_uts_ns);
+--- a/Makefile
++++ b/Makefile
+@@ -806,7 +806,7 @@ endif
+ prepare2: prepare3 outputmakefile asm-generic
--/* FIXED STRINGS! Don't touch! */
- const char linux_banner[] =
-- "Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@"
-- LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n";
-+ "Linux version " UTS_RELEASE
-+#ifdef LINUX_COMPILE_DISTRIBUTION_OFFICIAL_BUILD
-+ " (" LINUX_COMPILE_DISTRIBUTION " "
-+ LINUX_COMPILE_DISTRIBUTION_VERSION ")"
-+ " (" LINUX_COMPILE_DISTRIBUTION_MAINTAINER ")"
-+#else
-+# ifdef LINUX_COMPILE_DISTRIBUTION_VERSION
-+ " (" LINUX_COMPILE_DISTRIBUTION_VERSION ")"
-+# endif
-+ " (" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ")"
-+#endif
-+ " (" LINUX_COMPILER ")"
-+ " " UTS_VERSION "\n";
+ prepare1: prepare2 include/linux/version.h include/generated/utsrelease.h \
+- include/config/auto.conf
++ include/config/auto.conf include/generated/package.h
+ $(cmd_crmodverdir)
- const char linux_proc_banner[] =
- "%s version %s"
-+#ifdef LINUX_COMPILE_DISTRIBUTION_OFFICIAL_BUILD
-+ " (" LINUX_COMPILE_DISTRIBUTION " "
-+ LINUX_COMPILE_DISTRIBUTION_VERSION ")"
-+ " (" LINUX_COMPILE_DISTRIBUTION_MAINTAINER ")"
-+#else
-+# ifdef LINUX_COMPILE_DISTRIBUTION_VERSION
-+ " (" LINUX_COMPILE_DISTRIBUTION_VERSION ")"
-+# endif
- " (" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ")"
-+#endif
- " (" LINUX_COMPILER ") %s\n";
---- a/scripts/mkcompile_h
-+++ b/scripts/mkcompile_h
-@@ -73,8 +73,26 @@
+ archprepare: archheaders archscripts prepare1 scripts_basic
+@@ -838,12 +838,25 @@ define filechk_version.h
+ echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';)
+ endef
- echo \#define UTS_VERSION \"`echo $UTS_VERSION | $UTS_TRUNCATE`\"
-
-- echo \#define LINUX_COMPILE_BY \"`echo $LINUX_COMPILE_BY | $UTS_TRUNCATE`\"
-- echo \#define LINUX_COMPILE_HOST \"`echo $LINUX_COMPILE_HOST | $UTS_TRUNCATE`\"
-+ DISTRIBUTION=$(lsb_release -is 2>/dev/null)
-+ DISTRIBUTION=${DISTRIBUTION:-Debian}
-+ echo \#define LINUX_COMPILE_DISTRIBUTION \"$DISTRIBUTION\"
++ifneq ($(DISTRIBUTION_OFFICIAL_BUILD),)
++define filechk_package.h
++ echo \#define LINUX_PACKAGE_ID \" $(DISTRIBUTOR) $(DISTRIBUTION_VERSION)\"
++endef
++else
++define filechk_package.h
++ echo \#define LINUX_PACKAGE_ID \"\"
++endef
++endif
+
-+ if [ "$DISTRIBUTION_OFFICIAL_BUILD" ]; then
-+ echo \#define LINUX_COMPILE_DISTRIBUTION_OFFICIAL_BUILD
-+ echo \#define LINUX_COMPILE_DISTRIBUTION_MAINTAINER \"$DISTRIBUTION_MAINTAINER\"
-+ echo \#define LINUX_COMPILE_DISTRIBUTION_VERSION \"$DISTRIBUTION_VERSION\"
-+ echo \#define LINUX_COMPILE_BY \"unknown\"
-+ echo \#define LINUX_COMPILE_HOST \"$DISTRIBUTION\"
-+ else
-+ if [ -e version.$DISTRIBUTION ]; then
-+ echo \#define LINUX_COMPILE_DISTRIBUTION_VERSION \"$(cut -d" " -f1 version.$DISTRIBUTION)\"
-+ else
-+ echo \#define LINUX_COMPILE_DISTRIBUTION_VERSION \"unknown\"
-+ fi
+ 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)
+
-+ echo \#define LINUX_COMPILE_BY \"`echo $LINUX_COMPILE_BY | $UTS_TRUNCATE`\"
-+ echo \#define LINUX_COMPILE_HOST \"`echo $LINUX_COMPILE_HOST | $UTS_TRUNCATE`\"
-+ fi
+ PHONY += headerdep
+ headerdep:
+ $(Q)find $(srctree)/include/ -name '*.h' | xargs --max-args 1 \
+--- a/arch/s390/kernel/traps.c
++++ b/arch/s390/kernel/traps.c
+@@ -33,6 +33,7 @@
+ #include <linux/kprobes.h>
+ #include <linux/bug.h>
+ #include <linux/utsname.h>
++#include <generated/package.h>
+ #include <asm/uaccess.h>
+ #include <asm/io.h>
+ #include <linux/atomic.h>
+@@ -166,11 +167,12 @@ static void show_last_breaking_event(str
+ */
+ void dump_stack(void)
+ {
+- printk("CPU: %d %s %s %.*s\n",
++ printk("CPU: %d %s %s %.*s%s\n",
+ task_thread_info(current)->cpu, print_tainted(),
+ init_utsname()->release,
+ (int)strcspn(init_utsname()->version, " "),
+- init_utsname()->version);
++ init_utsname()->version,
++ LINUX_PACKAGE_ID);
+ printk("Process %s (pid: %d, task: %p, ksp: %p)\n",
+ current->comm, current->pid, current,
+ (void *) current->thread.ksp);
+@@ -217,11 +219,12 @@ void show_registers(struct pt_regs *regs
+ void show_regs(struct pt_regs *regs)
+ {
+ print_modules();
+- printk("CPU: %d %s %s %.*s\n",
++ printk("CPU: %d %s %s %.*s%s\n",
+ task_thread_info(current)->cpu, print_tainted(),
+ init_utsname()->release,
+ (int)strcspn(init_utsname()->version, " "),
+- init_utsname()->version);
++ init_utsname()->version,
++ LINUX_PACKAGE_ID);
+ printk("Process %s (pid: %d, task: %p, ksp: %p)\n",
+ current->comm, current->pid, current,
+ (void *) current->thread.ksp);
+--- a/arch/x86/um/sysrq_64.c
++++ b/arch/x86/um/sysrq_64.c
+@@ -8,6 +8,7 @@
+ #include <linux/module.h>
+ #include <linux/sched.h>
+ #include <linux/utsname.h>
++#include <generated/package.h>
+ #include <asm/current.h>
+ #include <asm/ptrace.h>
+ #include "sysrq.h"
+@@ -16,8 +17,9 @@ void __show_regs(struct pt_regs *regs)
+ {
+ printk("\n");
+ print_modules();
+- printk(KERN_INFO "Pid: %d, comm: %.20s %s %s\n", task_pid_nr(current),
+- current->comm, print_tainted(), init_utsname()->release);
++ printk(KERN_INFO "Pid: %d, comm: %.20s %s %s%s\n", task_pid_nr(current),
++ current->comm, print_tainted(), init_utsname()->release,
++ LINUX_PACKAGE_ID);
+ printk(KERN_INFO "RIP: %04lx:[<%016lx>]\n", PT_REGS_CS(regs) & 0xffff,
+ PT_REGS_IP(regs));
+ printk(KERN_INFO "RSP: %016lx EFLAGS: %08lx\n", PT_REGS_SP(regs),
+--- a/arch/x86/kernel/process.c
++++ b/arch/x86/kernel/process.c
+@@ -17,6 +17,7 @@
+ #include <linux/cpuidle.h>
+ #include <trace/events/power.h>
+ #include <linux/hw_breakpoint.h>
++#include <generated/package.h>
+ #include <asm/cpu.h>
+ #include <asm/apic.h>
+ #include <asm/syscalls.h>
+@@ -146,11 +147,12 @@ void show_regs_common(void)
+ board = dmi_get_system_info(DMI_BOARD_NAME);
+
+ printk(KERN_CONT "\n");
+- printk(KERN_DEFAULT "Pid: %d, comm: %.20s %s %s %.*s",
++ printk(KERN_DEFAULT "Pid: %d, comm: %.20s %s %s %.*s%s",
+ current->pid, current->comm, print_tainted(),
+ init_utsname()->release,
+ (int)strcspn(init_utsname()->version, " "),
+- init_utsname()->version);
++ init_utsname()->version,
++ LINUX_PACKAGE_ID);
+ printk(KERN_CONT " %s %s", vendor, product);
+ if (board)
+ printk(KERN_CONT "/%s", board);
+--- a/arch/x86/kernel/dumpstack.c
++++ b/arch/x86/kernel/dumpstack.c
+@@ -15,6 +15,7 @@
+ #include <linux/bug.h>
+ #include <linux/nmi.h>
+ #include <linux/sysfs.h>
++#include <generated/package.h>
+
+ #include <asm/stacktrace.h>
+
+@@ -188,11 +189,12 @@ void dump_stack(void)
+ unsigned long stack;
+
+ bp = stack_frame(current, NULL);
+- printk("Pid: %d, comm: %.20s %s %s %.*s\n",
++ printk("Pid: %d, comm: %.20s %s %s %.*s%s\n",
+ current->pid, current->comm, print_tainted(),
+ init_utsname()->release,
+ (int)strcspn(init_utsname()->version, " "),
+- init_utsname()->version);
++ init_utsname()->version,
++ LINUX_PACKAGE_ID);
+ show_trace(NULL, NULL, &stack, bp);
+ }
+ EXPORT_SYMBOL(dump_stack);
+--- a/arch/ia64/kernel/process.c
++++ b/arch/ia64/kernel/process.c
+@@ -29,6 +29,7 @@
+ #include <linux/kdebug.h>
+ #include <linux/utsname.h>
+ #include <linux/tracehook.h>
++#include <generated/package.h>
+
+ #include <asm/cpu.h>
+ #include <asm/delay.h>
+@@ -112,9 +113,9 @@ show_regs (struct pt_regs *regs)
+ print_modules();
+ printk("\nPid: %d, CPU %d, comm: %20s\n", task_pid_nr(current),
+ smp_processor_id(), current->comm);
+- printk("psr : %016lx ifs : %016lx ip : [<%016lx>] %s (%s)\n",
++ printk("psr : %016lx ifs : %016lx ip : [<%016lx>] %s (%s%s)\n",
+ regs->cr_ipsr, regs->cr_ifs, ip, print_tainted(),
+- init_utsname()->release);
++ init_utsname()->release, LINUX_PACKAGE_ID);
+ print_symbol("ip is at %s\n", ip);
+ printk("unat: %016lx pfs : %016lx rsc : %016lx\n",
+ regs->ar_unat, regs->ar_pfs, regs->ar_rsc);
+--- a/arch/arm/kernel/process.c
++++ b/arch/arm/kernel/process.c
+@@ -31,6 +31,7 @@
+ #include <linux/random.h>
+ #include <linux/hw_breakpoint.h>
+ #include <linux/cpuidle.h>
++#include <generated/package.h>
+
+ #include <asm/cacheflush.h>
+ #include <asm/leds.h>
+@@ -278,11 +279,12 @@ void __show_regs(struct pt_regs *regs)
+ unsigned long flags;
+ char buf[64];
+
+- printk("CPU: %d %s (%s %.*s)\n",
++ printk("CPU: %d %s (%s %.*s%s)\n",
+ raw_smp_processor_id(), print_tainted(),
+ init_utsname()->release,
+ (int)strcspn(init_utsname()->version, " "),
+- init_utsname()->version);
++ init_utsname()->version,
++ LINUX_PACKAGE_ID);
+ print_symbol("PC is at %s\n", instruction_pointer(regs));
+ print_symbol("LR is at %s\n", regs->ARM_lr);
+ printk("pc : [<%08lx>] lr : [<%08lx>] psr: %08lx\n"
+--- a/arch/powerpc/kernel/process.c
++++ b/arch/powerpc/kernel/process.c
+@@ -38,6 +38,7 @@
+ #include <linux/personality.h>
+ #include <linux/random.h>
+ #include <linux/hw_breakpoint.h>
++#include <generated/package.h>
+
+ #include <asm/pgtable.h>
+ #include <asm/uaccess.h>
+@@ -644,8 +645,9 @@ void show_regs(struct pt_regs * regs)
+
+ printk("NIP: "REG" LR: "REG" CTR: "REG"\n",
+ regs->nip, regs->link, regs->ctr);
+- printk("REGS: %p TRAP: %04lx %s (%s)\n",
+- regs, regs->trap, print_tainted(), init_utsname()->release);
++ printk("REGS: %p TRAP: %04lx %s (%s%s)\n",
++ regs, regs->trap, print_tainted(), init_utsname()->release,
++ LINUX_PACKAGE_ID);
+ printk("MSR: "REG" ", regs->msr);
+ printbits(regs->msr, msr_bits);
+ printk(" CR: %08lx XER: %08lx\n", regs->ccr, regs->xer);
+--- a/arch/sh/kernel/process_32.c
++++ b/arch/sh/kernel/process_32.c
+@@ -23,6 +23,7 @@
+ #include <linux/hw_breakpoint.h>
+ #include <linux/prefetch.h>
+ #include <linux/stackprotector.h>
++#include <generated/package.h>
+ #include <asm/uaccess.h>
+ #include <asm/mmu_context.h>
+ #include <asm/fpu.h>
+@@ -33,10 +34,11 @@ void show_regs(struct pt_regs * regs)
+ {
+ printk("\n");
+ printk("Pid : %d, Comm: \t\t%s\n", task_pid_nr(current), current->comm);
+- printk("CPU : %d \t\t%s (%s %.*s)\n\n",
++ printk("CPU : %d \t\t%s (%s %.*s%s)\n\n",
+ smp_processor_id(), print_tainted(), init_utsname()->release,
+ (int)strcspn(init_utsname()->version, " "),
+- init_utsname()->version);
++ init_utsname()->version,
++ LINUX_PACKAGE_ID);
- echo \#define LINUX_COMPILER \"`$CC -v 2>&1 | tail -n 1`\"
- ) > .tmpcompile
+ print_symbol("PC is at %s\n", instruction_pointer(regs));
+ print_symbol("PR is at %s\n", regs->pr);