File lttng-modules.spec of Package lttng-modules
109
1
#
2
# spec file for package lttng-modules
3
#
4
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
5
#
6
# All modifications and additions to the file contributed by third parties
7
# remain the property of their copyright owners, unless otherwise agreed
8
# upon. The license for this file, and modifications and additions to the
9
# file, is the same license as for the pristine package itself (unless the
10
# license for the pristine package is not an Open Source License, in which
11
# case the license is the MIT License). An "Open Source License" is a
12
# license that conforms to the Open Source Definition (Version 1.9)
13
# published by the Open Source Initiative.
14
15
# Please submit bugfixes or comments via http://bugs.opensuse.org/
16
#
17
# needssslcertforbuild
18
19
20
%if ! 0%{?is_opensuse}
21
%ifarch x86_64
22
%define buildrt 0
23
%endif
24
%endif
25
26
Summary: Licensing information for package lttng-modules
27
License: GPL-2.0 and LGPL-2.1 and MIT
28
Group: System/Kernel
29
30
Name: lttng-modules
31
Version: 2.10.0
32
Release: 0
33
Source: http://lttng.org/files/lttng-modules/%{name}-%{version}.tar.bz2
34
Source1: %{name}-preamble
35
Source2: Module.supported
36
BuildRoot: %{_tmppath}/%{name}-%{version}-build
37
BuildRequires: kernel-devel
38
BuildRequires: kernel-source
39
BuildRequires: kernel-syms
40
BuildRequires: module-init-tools
41
%if 0%{?buildrt} == 1
42
BuildRequires: kernel-syms-rt
43
%endif
44
ExclusiveArch: x86_64
45
Patch1: btrfs-constify-tracepoint-arguments.patch
46
Patch2: mm_remove_cold_parameter_from_free_hot_cold_page.patch
47
Patch3: fix-update-block-instrumentation-for-4.14-kernel.patch
48
Patch4: update-kvm-instrumentation-for-4.15.patch
49
Patch5: fix-kvm-instrumentation-for-4.15.patch
50
51
%suse_kernel_module_package -p %{name}-preamble ec2 xen xenpae vmi um
52
53
%description
54
This package provides licensing documentation for the lttng kmp packages.
55
56
57
58
%package KMP
59
Summary: LTTng 2.0 Kernel Tracing Modules
60
Group: System/Kernel
61
62
%description KMP
63
This package contains the LTTng 2.0 Kernel Modules necessary for
64
instrumenting kernel subsystems.
65
66
67
68
%prep
69
%setup -q
70
%patch1 -p1
71
%patch2 -p1
72
%patch3 -p1
73
%patch4 -p1
74
%patch5 -p1
75
76
set -- *
77
mkdir source
78
mkdir obj
79
80
for i in "$@"; do
81
case $i in
82
LICENSE|*.txt) ;;
83
*) mv $i source ;;
84
esac
85
done
86
87
%build
88
export EXTRA_CFLAGS='-DVERSION=\"%version\"'
89
for flavor in %flavors_to_build; do
90
rm -rf obj/$flavor
91
cp -r source obj/$flavor
92
cp %{S:2} obj/$flavor
93
make -C /usr/src/linux-obj/%_target_cpu/$flavor modules M=$PWD/obj/$flavor CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m
94
done
95
96
%install
97
export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
98
export INSTALL_MOD_DIR=updates
99
export BRP_PESIGN_FILES="*.ko /lib/firmware"
100
for flavor in %flavors_to_build; do
101
make -C /usr/src/linux-obj/%_target_cpu/$flavor modules_install M=$PWD/obj/$flavor CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m
102
done
103
104
%files
105
%defattr(-,root,root)
106
%doc LICENSE lgpl-2.1.txt gpl-2.0.txt mit-license.txt
107
108
%changelog
109