From 9db2312a50bc961515ec9e93d7992bb0f3758ae8 Mon Sep 17 00:00:00 2001 From: Domen Kožar Date: Tue, 14 Oct 2014 13:48:46 +0200 Subject: lttng-modules: fix on kernel 3.2, 3.16, 3.17 --- pkgs/os-specific/linux/lttng-modules/default.nix | 16 ++++++----- .../lttng-fix-build-error-on-linux-3.2.patch | 33 ---------------------- 2 files changed, 9 insertions(+), 40 deletions(-) delete mode 100644 pkgs/os-specific/linux/lttng-modules/lttng-fix-build-error-on-linux-3.2.patch diff --git a/pkgs/os-specific/linux/lttng-modules/default.nix b/pkgs/os-specific/linux/lttng-modules/default.nix index 68012ac9a64..9fdb5b42bf8 100644 --- a/pkgs/os-specific/linux/lttng-modules/default.nix +++ b/pkgs/os-specific/linux/lttng-modules/default.nix @@ -1,16 +1,18 @@ -{ stdenv, fetchurl, kernel }: +{ stdenv, fetchgit, kernel }: + +assert stdenv.lib.versionAtLeast kernel.version "3.4"; # fails on 3.2 stdenv.mkDerivation rec { - pname = "lttng-modules-2.5.0"; + pname = "lttng-modules-${rev}"; name = "${pname}-${kernel.version}"; + rev = "bf2ba318fff"; - src = fetchurl { - url = "https://lttng.org/files/lttng-modules/${pname}.tar.bz2"; - sha256 = "0ayqi974ibaybzm46nb2ij1avqm1gspd4mnkpfc4ajl34j02dyix"; + src = fetchgit { + url = "https://github.com/lttng/lttng-modules.git"; + sha256 = "0x70xp463g208rdz5b9b0wdwr2v8px1bwa589knvp4j7zi8d2gj9"; + inherit rev; }; - patches = [ ./lttng-fix-build-error-on-linux-3.2.patch ]; - preConfigure = '' export KERNELDIR="${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" export INSTALL_MOD_PATH="$out" diff --git a/pkgs/os-specific/linux/lttng-modules/lttng-fix-build-error-on-linux-3.2.patch b/pkgs/os-specific/linux/lttng-modules/lttng-fix-build-error-on-linux-3.2.patch deleted file mode 100644 index dfe6d21be84..00000000000 --- a/pkgs/os-specific/linux/lttng-modules/lttng-fix-build-error-on-linux-3.2.patch +++ /dev/null @@ -1,33 +0,0 @@ -When building against linux 3.2, we get this build error: - - building /tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/lttng-probe-ext3.o - CC [M] /tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/lttng-probe-ext3.o - In file included from /tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/lttng-events.h:759:0, - from /tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/define_trace.h:148, - from /tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/ext3.h:868, - from /tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/lttng-probe-ext3.c:48: - /tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/ext3.h: In function '__event_probe__ext3__page_op': - /tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/ext3.h:240:1: error: dereferencing pointer to incomplete type - /tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/ext3.h:240:1: error: dereferencing pointer to incomplete type - /tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/ext3.h:240:1: error: dereferencing pointer to incomplete type - /tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/ext3.h: In function '__event_probe__ext3_invalidatepage': - /tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/ext3.h:298:1: error: dereferencing pointer to incomplete type - /tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/ext3.h:298:1: error: dereferencing pointer to incomplete type - /tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/ext3.h:298:1: error: dereferencing pointer to incomplete type - -because a check for existing ext3/*h files in the kernel build tree is skipped -for linux < 3.4. Fix it by extending the ext3_dep_check thing to also be run -when building against linux >= 3.2 (not only linux >= 3.4). - -diff -uNr lttng-modules-2.2.0.orig/probes/Makefile lttng-modules-2.2.0/probes/Makefile ---- lttng-modules-2.2.0.orig/probes/Makefile 2013-06-19 03:22:44.000000000 +0200 -+++ lttng-modules-2.2.0/probes/Makefile 2013-07-06 13:22:15.902957717 +0200 -@@ -59,7 +59,7 @@ - ext3_dep_check = $(wildcard $(ext3_dep)) - ext3 = $(shell \ - if [ $(VERSION) -ge 3 -a $(PATCHLEVEL) -ge 1 ] ; then \ -- if [ $(VERSION) -ge 3 -a $(PATCHLEVEL) -ge 4 -a \ -+ if [ $(VERSION) -ge 3 -a $(PATCHLEVEL) -ge 2 -a \ - -z "$(ext3_dep_check)" ] ; then \ - echo "warn" ; \ - exit ; \ -- cgit 1.4.1