Andi Kleen
be27425dcc
Add a personality to report 2.6.x version numbers
...
I ran into a couple of programs which broke with the new Linux 3.0
version. Some of those were binary only. I tried to use LD_PRELOAD to
work around it, but it was quite difficult and in one case impossible
because of a mix of 32bit and 64bit executables.
For example, all kind of management software from HP doesnt work, unless
we pretend to run a 2.6 kernel.
$ uname -a
Linux svivoipvnx001 3.0.0-08107-g97cd98f #1062 SMP Fri Aug 12 18:11:45 CEST 2011 i686 i686 i386 GNU/Linux
$ hpacucli ctrl all show
Error: No controllers detected.
$ rpm -qf /usr/sbin/hpacucli
hpacucli-8.75-12.0
Another notable case is that Python now reports "linux3" from
sys.platform(); which in turn can break things that were checking
sys.platform() == "linux2":
https://bugzilla.mozilla.org/show_bug.cgi?id=664564
It seems pretty clear to me though it's a bug in the apps that are using
'==' instead of .startswith(), but this allows us to unbreak broken
programs.
This patch adds a UNAME26 personality that makes the kernel report a
2.6.40+x version number instead. The x is the x in 3.x.
I know this is somewhat ugly, but I didn't find a better workaround, and
compatibility to existing programs is important.
Some programs also read /proc/sys/kernel/osrelease. This can be worked
around in user space with mount --bind (and a mount namespace)
To use:
wget ftp://ftp.kernel.org/pub/linux/kernel/people/ak/uname26/uname26.c
gcc -o uname26 uname26.c
./uname26 program
Signed-off-by: Andi Kleen <ak@linux.intel.com >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2011-08-25 10:17:28 -07:00
..
2011-07-27 20:43:21 +05:30
2011-07-22 09:51:12 -04:00
2011-07-26 13:38:50 -07:00
2011-07-27 17:52:58 -03:00
2011-07-17 21:48:22 +02:00
2011-08-03 14:25:22 -10:00
2011-07-26 16:49:47 -07:00
2011-08-13 14:50:32 -04:00
2011-07-22 13:09:55 -07:00
2011-07-21 12:39:35 -07:00
2011-07-30 08:57:57 -10:00
2011-07-28 11:31:47 +10:00
2011-07-25 13:56:39 -07:00
2011-07-27 13:23:02 -07:00
2011-08-03 21:53:27 -10:00
2011-07-22 08:25:37 -07:00
2011-07-26 16:49:47 -07:00
2011-07-20 20:47:43 -04:00
2011-07-26 16:49:47 -07:00
2011-07-26 16:49:47 -07:00
2011-07-26 16:49:47 -07:00
2011-07-20 01:43:10 -04:00
2011-07-26 16:49:47 -07:00
2011-08-03 11:30:42 -04:00
2011-08-11 10:36:03 +02:00
2011-08-15 21:37:25 +02:00
2011-08-11 10:36:05 +02:00
2011-07-31 22:05:09 +02:00
2011-07-26 16:49:47 -07:00
2011-07-22 17:05:15 -07:00
2011-07-18 21:38:33 +02:00
2011-07-26 16:49:47 -07:00
2011-07-26 16:49:47 -07:00
2011-07-25 20:57:14 -07:00
2011-08-03 19:06:37 -04:00
2011-07-26 16:49:44 -07:00
2011-08-08 11:33:23 -07:00
2011-07-26 16:49:47 -07:00
2011-08-06 22:12:37 -07:00
2011-07-25 20:57:16 -07:00
2011-08-06 22:52:40 -07:00
2011-07-26 16:49:47 -07:00
2011-08-02 12:32:04 +01:00
2011-07-26 16:49:47 -07:00
2011-08-02 12:32:06 +01:00
2011-08-02 12:32:04 +01:00
2011-07-26 16:49:45 -07:00
2011-07-26 16:49:47 -07:00
2011-07-25 20:57:16 -07:00
2011-08-01 13:40:51 -10:00
2011-07-26 11:34:40 -07:00
2011-08-03 14:25:20 -10:00
2011-07-20 20:47:59 -04:00
2011-07-26 16:49:47 -07:00
2011-07-26 16:49:47 -07:00
2011-07-26 16:49:47 -07:00
2011-08-06 22:53:23 -07:00
2011-07-26 16:49:47 -07:00
2011-08-08 16:08:08 +02:00
2011-08-03 11:15:57 -04:00
2011-07-25 14:30:23 -04:00
2011-08-03 14:25:21 -10:00
2011-08-17 13:00:20 -07:00
2011-07-25 20:57:07 -07:00
2011-08-03 14:25:20 -10:00
2011-07-19 16:49:54 -04:00
2011-07-17 12:33:22 -07:00
2011-07-21 13:47:58 -07:00
2011-07-27 22:39:30 -07:00
2011-07-21 13:47:54 -07:00
2011-08-05 14:45:41 -04:00
2011-07-26 16:49:47 -07:00
2011-07-31 14:30:59 -10:00
2011-07-26 16:49:44 -07:00
2011-08-17 10:23:50 -07:00
2011-07-28 11:23:21 +02:00
2011-07-28 01:32:04 -06:00
2011-07-25 17:24:47 +02:00
2011-07-26 16:49:47 -07:00
2011-07-29 21:53:30 +02:00
2011-07-26 16:49:47 -07:00
2011-07-27 13:21:40 -07:00
2011-07-26 16:49:47 -07:00
2011-07-26 16:49:47 -07:00
2011-07-26 16:49:47 -07:00
2011-07-24 11:50:34 +03:00
2011-07-25 20:57:15 -07:00
2011-07-22 14:39:48 +09:30
2011-07-23 17:57:36 -04:00
2011-08-03 11:15:56 -04:00
2011-07-31 22:08:04 +02:00
2011-08-03 14:25:24 -10:00
2011-07-25 20:57:08 -07:00
2011-07-31 22:08:04 +02:00
2011-07-18 15:17:01 +03:00
2011-08-17 13:00:20 -07:00
2011-07-26 16:49:47 -07:00
2011-07-26 16:49:47 -07:00
2011-07-20 20:47:50 -04:00
2011-07-24 22:06:04 +09:30
2011-07-24 22:06:04 +09:30
2011-07-26 16:49:47 -07:00
2011-07-26 16:49:47 -07:00
2011-07-20 01:44:14 -04:00
2011-07-28 05:58:19 -07:00
2011-08-07 22:48:07 -07:00
2011-07-31 12:18:15 -04:00
2011-07-31 14:27:04 -10:00
2011-08-01 13:48:31 -10:00
2011-08-06 22:56:03 -07:00
2011-07-31 12:18:16 -04:00
2011-07-25 13:56:39 -07:00
2011-07-26 16:49:43 -07:00
2011-07-25 20:57:15 -07:00
2011-07-20 01:44:07 -04:00
2011-07-18 16:37:45 -06:00
2011-08-04 11:26:24 +01:00
2011-07-28 16:19:22 -06:00
2011-07-28 01:32:04 -06:00
2011-07-27 09:30:56 +08:00
2011-08-09 11:27:16 -06:00
2011-07-25 20:57:09 -07:00
2011-07-26 16:49:47 -07:00
2011-07-30 08:21:48 -10:00
2011-07-25 20:57:10 -07:00
2011-08-04 16:43:43 -10:00
2011-08-01 11:50:15 -07:00
2011-07-26 16:49:47 -07:00
2011-08-25 10:17:28 -07:00
2011-07-27 09:31:02 +08:00
2011-08-14 13:34:31 +02:00
2011-07-25 20:57:09 -07:00
2011-08-03 00:58:42 -04:00
2011-07-27 12:50:45 -07:00
2011-07-22 16:14:29 -07:00
2011-07-17 20:23:52 +02:00
2011-07-26 16:49:47 -07:00
2011-08-03 14:25:24 -10:00
2011-07-26 16:49:46 -07:00
2011-08-06 18:33:19 -07:00
2011-07-20 14:10:20 -07:00
2011-07-25 20:57:14 -07:00
2011-07-23 07:56:59 +01:00
2011-07-25 14:30:23 -04:00
2011-07-25 20:57:17 -07:00
2011-07-25 14:30:23 -04:00
2011-07-26 14:50:01 -07:00
2011-07-25 13:56:39 -07:00
2011-07-26 16:49:47 -07:00
2011-08-11 11:24:42 -07:00
2011-07-18 11:06:03 -07:00
2011-07-20 01:43:29 -04:00
2011-07-26 16:49:47 -07:00
2011-07-20 20:47:50 -04:00
2011-07-30 08:44:19 -10:00
2011-08-03 14:25:24 -10:00
2011-07-20 20:47:10 -04:00
2011-07-26 16:49:47 -07:00
2011-07-20 20:27:56 +03:00
2011-07-30 08:21:48 -10:00
2011-08-07 22:48:07 -07:00
2011-07-26 16:49:47 -07:00
2011-07-26 16:49:47 -07:00
2011-07-25 20:57:11 -07:00
2011-07-21 15:29:16 -07:00
2011-07-25 13:56:39 -07:00
2011-07-25 20:57:15 -07:00
2011-07-26 16:49:47 -07:00
2011-08-03 14:25:22 -10:00
2011-07-26 16:49:47 -07:00
2011-08-02 14:51:57 -04:00
2011-07-27 17:55:40 -03:00
2011-07-26 16:49:47 -07:00
2011-07-26 16:49:45 -07:00
2011-07-25 20:57:15 -07:00
2011-07-28 08:01:18 +00:00
2011-07-26 16:49:47 -07:00