linux:
- expand 'uname -r' to have release and dist tag: 4.4.35-2.ph1
- compress modules
- syscall tracing support
- check for build IDs matching at build time
linux-esx:
- expand 'uname -r' to have release and dist tag
- compress most of modules
Change-Id: Ibf7e875a156a6804f94be8e60f866d84b058d6b5
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/1790
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Vinay Kulkarni <kulkarniv@vmware.com>
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
Summary: The Behavioral Activity Monitor With Container Support |
3 | 3 |
Name: falco |
4 | 4 |
Version: 0.2.0 |
5 |
-Release: 3%{?kernelsubrelease}%{?dist} |
|
5 |
+Release: 4%{?kernelsubrelease}%{?dist} |
|
6 | 6 |
License: GPLv2 |
7 | 7 |
URL: http://www.sysdig.org/falco/ |
8 | 8 |
Group: Applications/System |
... | ... |
@@ -52,10 +52,10 @@ tar xf %{SOURCE3} --no-same-owner |
52 | 52 |
%build |
53 | 53 |
mv sysdig-0.10.1 ../sysdig |
54 | 54 |
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} CMakeLists.txt |
55 |
-make KERNELDIR="/lib/modules/%{KERNEL_VERSION}/build" |
|
55 |
+make KERNELDIR="/lib/modules/%{KERNEL_VERSION}-%{KERNEL_RELEASE}/build" |
|
56 | 56 |
|
57 | 57 |
%install |
58 |
-make install KERNELDIR="/lib/modules/%{KERNEL_VERSION}/build" DESTDIR=%{buildroot} |
|
58 |
+make install KERNELDIR="/lib/modules/%{KERNEL_VERSION}-%{KERNEL_RELEASE}/build" DESTDIR=%{buildroot} |
|
59 | 59 |
|
60 | 60 |
%check |
61 | 61 |
easy_install pip |
... | ... |
@@ -70,14 +70,17 @@ rm -rf %{buildroot}/* |
70 | 70 |
%files |
71 | 71 |
%defattr(-,root,root) |
72 | 72 |
%{_bindir}/* |
73 |
-%{_usrsrc}/* |
|
74 |
-/etc/* |
|
73 |
+%exclude %{_usrsrc} |
|
74 |
+%{_sysconfdir}/* |
|
75 | 75 |
%{_datadir}/* |
76 | 76 |
|
77 | 77 |
%changelog |
78 |
-* Fri Sep 2 2016 Alexey Makhalov <amakhalov@vmware.com> 0.2.0-3 |
|
79 |
-- Use KERNEL_VERSION macro |
|
80 |
-* Wed Jul 27 2016 Divya Thaluru <dthaluru@vmware.com> 0.2.0-2 |
|
81 |
-- Removed packaging of debug files |
|
82 |
-* Tue Jun 28 2016 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 0.2.0-1 |
|
83 |
-- Initial build. First version |
|
78 |
+* Wed Nov 30 2016 Alexey Makhalov <amakhalov@vmware.com> 0.2.0-4 |
|
79 |
+- Expand uname -r to have release number |
|
80 |
+- Exclude /usr/src |
|
81 |
+* Fri Sep 2 2016 Alexey Makhalov <amakhalov@vmware.com> 0.2.0-3 |
|
82 |
+- Use KERNEL_VERSION macro |
|
83 |
+* Wed Jul 27 2016 Divya Thaluru <dthaluru@vmware.com> 0.2.0-2 |
|
84 |
+- Removed packaging of debug files |
|
85 |
+* Tue Jun 28 2016 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 0.2.0-1 |
|
86 |
+- Initial build. First version |
... | ... |
@@ -1,7 +1,7 @@ |
1 | 1 |
Summary: initramfs |
2 | 2 |
Name: initramfs |
3 | 3 |
Version: 1.0 |
4 |
-Release: 6%{?kernelsubrelease}%{?dist} |
|
4 |
+Release: 7%{?kernelsubrelease}%{?dist} |
|
5 | 5 |
License: Apache License |
6 | 6 |
Group: System Environment/Base |
7 | 7 |
Vendor: VMware, Inc. |
... | ... |
@@ -29,7 +29,7 @@ echo 'add_drivers+="tmem xen-acpi-processor xen-evtchn xen-gntalloc xen-gntdev x |
29 | 29 |
echo 'add_dracutmodules+=" ostree systemd "' > /etc/dracut.conf.d/ostree.conf |
30 | 30 |
|
31 | 31 |
%build |
32 |
-dracut --force --kver %{KERNEL_VERSION} --fscks "e2fsck fsck fsck.ext2 fsck.ext3 fsck.ext4" initrd.img-%{KERNEL_VERSION}-%{KERNEL_RELEASE} |
|
32 |
+dracut --force --kver %{KERNEL_VERSION}-%{KERNEL_RELEASE} --fscks "e2fsck fsck fsck.ext2 fsck.ext3 fsck.ext4" initrd.img-%{KERNEL_VERSION}-%{KERNEL_RELEASE} |
|
33 | 33 |
%install |
34 | 34 |
rm -rf $RPM_BUILD_ROOT |
35 | 35 |
install -d $RPM_BUILD_ROOT/boot |
... | ... |
@@ -44,6 +44,8 @@ rm -rf $RPM_BUILD_ROOT |
44 | 44 |
/boot/initrd.img-%{KERNEL_VERSION}-%{KERNEL_RELEASE} |
45 | 45 |
|
46 | 46 |
%changelog |
47 |
+* Wed Nov 30 2016 Alexey Makhalov <amakhalov@vmware.com> 1.0-7 |
|
48 |
+- Expand uname -r to have release number |
|
47 | 49 |
* Wed Nov 23 2016 Anish Swaminathan <anishs@vmware.com> 1.0-6 |
48 | 50 |
- Dracut module change to include systemd initrd target |
49 | 51 |
* Tue Sep 20 2016 Alexey Makhalov <amakhalov@vmware.com> 1.0-5 |
... | ... |
@@ -1,7 +1,7 @@ |
1 | 1 |
Summary: A New Scripting Dynamic Tracing Tool For Linux |
2 | 2 |
Name: ktap |
3 | 3 |
Version: 0.4 |
4 |
-Release: 4%{?kernelsubrelease}%{?dist} |
|
4 |
+Release: 5%{?kernelsubrelease}%{?dist} |
|
5 | 5 |
License: GPLv2 |
6 | 6 |
URL: https://github.com/ktap/ktap |
7 | 7 |
Source: %{name}-master.zip |
... | ... |
@@ -29,11 +29,11 @@ make ktap |
29 | 29 |
# ugly hack: disable security hardening to build kernel module |
30 | 30 |
# we need to remove sec hard specs file for that. |
31 | 31 |
rm -f `dirname $(gcc --print-libgcc-file-name)`/../specs |
32 |
-make KVERSION=%{KERNEL_VERSION} mod |
|
32 |
+make KVERSION=%{KERNEL_VERSION}-%{KERNEL_RELEASE} mod |
|
33 | 33 |
|
34 | 34 |
%install |
35 | 35 |
mkdir -p %{buildroot}%{_bindir} |
36 |
-make install DESTDIR=%{buildroot} KVERSION=%{KERNEL_VERSION} |
|
36 |
+make install DESTDIR=%{buildroot} KVERSION=%{KERNEL_VERSION}-%{KERNEL_RELEASE} |
|
37 | 37 |
|
38 | 38 |
%check |
39 | 39 |
export PERL_MM_USE_DEFAULT=1 |
... | ... |
@@ -50,15 +50,17 @@ make %{?_smp_mflags} test |
50 | 50 |
%defattr(-, root, root, 0755) |
51 | 51 |
%doc README.md |
52 | 52 |
%{_bindir}/ktap |
53 |
-/lib/modules/%{KERNEL_VERSION}/extra/ktapvm.ko |
|
53 |
+/lib/modules/%{KERNEL_VERSION}-%{KERNEL_RELEASE}/extra/ktapvm.ko |
|
54 | 54 |
|
55 | 55 |
%changelog |
56 |
-* Thu Oct 06 2016 ChangLee <changlee@vmware.com> 0.4-4 |
|
57 |
-- Modified %check |
|
58 |
-* Mon Aug 1 2016 Divya Thaluru <dthaluru@vmware.com> 0.4-3 |
|
59 |
-- Added kernel macros |
|
60 |
-* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 0.4-3 |
|
61 |
-- GA - Bump release of all rpms |
|
56 |
+* Wed Nov 30 2016 Alexey Makhalov <amakhalov@vmware.com> 0.4-5 |
|
57 |
+- Expand uname -r to have release number |
|
58 |
+* Thu Oct 06 2016 ChangLee <changlee@vmware.com> 0.4-4 |
|
59 |
+- Modified %check |
|
60 |
+* Mon Aug 1 2016 Divya Thaluru <dthaluru@vmware.com> 0.4-3 |
|
61 |
+- Added kernel macros |
|
62 |
+* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 0.4-3 |
|
63 |
+- GA - Bump release of all rpms |
|
62 | 64 |
* Thu Apr 28 2016 Alexey Makhalov <amakhalov@vmware.com> 0.4-2 |
63 | 65 |
- Update to linux-4.4.8 |
64 | 66 |
* Fri Dec 04 2015 Xiaolin Li <xiaolinl@vmware.com> 0.4-1 |
... | ... |
@@ -4082,7 +4082,7 @@ CONFIG_FTRACE=y |
4082 | 4082 |
# CONFIG_FUNCTION_TRACER is not set |
4083 | 4083 |
# CONFIG_IRQSOFF_TRACER is not set |
4084 | 4084 |
# CONFIG_SCHED_TRACER is not set |
4085 |
-# CONFIG_FTRACE_SYSCALLS is not set |
|
4085 |
+CONFIG_FTRACE_SYSCALLS=y |
|
4086 | 4086 |
# CONFIG_TRACER_SNAPSHOT is not set |
4087 | 4087 |
CONFIG_BRANCH_PROFILE_NONE=y |
4088 | 4088 |
# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set |
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
Summary: Kernel |
3 | 3 |
Name: linux-esx |
4 | 4 |
Version: 4.4.35 |
5 |
-Release: 2%{?dist} |
|
5 |
+Release: 3%{?dist} |
|
6 | 6 |
License: GPLv2 |
7 | 7 |
URL: http://www.kernel.org/ |
8 | 8 |
Group: System Environment/Kernel |
... | ... |
@@ -47,6 +47,7 @@ BuildRequires: Linux-PAM |
47 | 47 |
BuildRequires: openssl-devel |
48 | 48 |
BuildRequires: procps-ng-devel |
49 | 49 |
Requires: filesystem kmod coreutils |
50 |
+%define uname_r %{version}-%{release}-esx |
|
50 | 51 |
|
51 | 52 |
%description |
52 | 53 |
The Linux kernel build for GOS for VMware hypervisor. |
... | ... |
@@ -99,70 +100,90 @@ sed -i 's/module_init/late_initcall/' drivers/misc/vmw_balloon.c |
99 | 99 |
|
100 | 100 |
make mrproper |
101 | 101 |
cp %{SOURCE1} .config |
102 |
+sed -i 's/CONFIG_LOCALVERSION="-esx"/CONFIG_LOCALVERSION="-%{release}-esx"/' .config |
|
102 | 103 |
make LC_ALL= oldconfig |
103 | 104 |
make VERBOSE=1 KBUILD_BUILD_VERSION="1-photon" KBUILD_BUILD_HOST="photon" ARCH="x86_64" %{?_smp_mflags} |
104 | 105 |
|
106 |
+# Do not compress modules which will be loaded at boot time |
|
107 |
+# to speed up boot process |
|
108 |
+%define __modules_install_post \ |
|
109 |
+ find %{buildroot}/lib/modules/%{uname_r} -name *.ko | \ |
|
110 |
+ grep -v "evdev\|mousedev\|sr_mod\|cdrom\|vmwgfx\|drm_kms_helper\|ttm\|psmouse\|drm\|apa_piix\|vmxnet3\|i2c_core\|libata\|processor\|ipv6" | xargs xz \ |
|
111 |
+%{nil} |
|
112 |
+ |
|
113 |
+# We want to compress modules after stripping. Extra step is added to |
|
114 |
+# the default __spec_install_post. |
|
115 |
+%define __spec_install_post\ |
|
116 |
+ %{?__debug_package:%{__debug_install_post}}\ |
|
117 |
+ %{__arch_install_post}\ |
|
118 |
+ %{__os_install_post}\ |
|
119 |
+ %{__modules_install_post}\ |
|
120 |
+%{nil} |
|
121 |
+ |
|
105 | 122 |
%install |
106 | 123 |
install -vdm 755 %{buildroot}/etc |
107 | 124 |
install -vdm 755 %{buildroot}/boot |
108 |
-install -vdm 755 %{buildroot}%{_defaultdocdir}/linux-esx-%{version} |
|
125 |
+install -vdm 755 %{buildroot}%{_defaultdocdir}/linux-%{uname_r} |
|
109 | 126 |
install -vdm 755 %{buildroot}/etc/modprobe.d |
110 |
-install -vdm 755 %{buildroot}/usr/src/%{name}-headers-%{version}-%{release} |
|
127 |
+install -vdm 755 %{buildroot}/usr/src/linux-headers-%{uname_r} |
|
111 | 128 |
make INSTALL_MOD_PATH=%{buildroot} modules_install |
112 |
-cp -v arch/x86/boot/bzImage %{buildroot}/boot/vmlinuz-esx-%{version}-%{release} |
|
113 |
-cp -v System.map %{buildroot}/boot/system.map-esx-%{version}-%{release} |
|
114 |
-cp -v .config %{buildroot}/boot/config-esx-%{version}-%{release} |
|
115 |
-cp -r Documentation/* %{buildroot}%{_defaultdocdir}/linux-esx-%{version} |
|
116 |
-install -vdm 755 %{buildroot}/usr/lib/debug/lib/modules/%{version}-esx |
|
117 |
-cp -v vmlinux %{buildroot}/usr/lib/debug/lib/modules/%{version}-esx/vmlinux-esx-%{version}-%{release} |
|
129 |
+cp -v arch/x86/boot/bzImage %{buildroot}/boot/vmlinuz-%{uname_r} |
|
130 |
+cp -v System.map %{buildroot}/boot/System.map-%{uname_r} |
|
131 |
+cp -v .config %{buildroot}/boot/config-%{uname_r} |
|
132 |
+cp -r Documentation/* %{buildroot}%{_defaultdocdir}/linux-%{uname_r} |
|
133 |
+install -vdm 755 %{buildroot}/usr/lib/debug/lib/modules/%{uname_r} |
|
134 |
+cp -v vmlinux %{buildroot}/usr/lib/debug/lib/modules/%{uname_r}/vmlinux-%{uname_r} |
|
118 | 135 |
|
119 | 136 |
# TODO: noacpi acpi=off noapic pci=conf1,nodomains pcie_acpm=off pnpacpi=off |
120 |
-cat > %{buildroot}/boot/%{name}-%{version}-%{release}.cfg << "EOF" |
|
137 |
+cat > %{buildroot}/boot/linux-%{uname_r}.cfg << "EOF" |
|
121 | 138 |
# GRUB Environment Block |
122 | 139 |
photon_cmdline=init=/lib/systemd/systemd rcupdate.rcu_expedited=1 rw systemd.show_status=0 quiet noreplace-smp cpu_init_udelay=0 plymouth.enable=0 |
123 |
-photon_linux=vmlinuz-esx-%{version}-%{release} |
|
140 |
+photon_linux=vmlinuz-%{uname_r} |
|
124 | 141 |
EOF |
125 | 142 |
|
126 | 143 |
# cleanup dangling symlinks |
127 |
-rm -f %{buildroot}/lib/modules/%{version}-esx/source |
|
128 |
-rm -f %{buildroot}/lib/modules/%{version}-esx/build |
|
144 |
+rm -f %{buildroot}/lib/modules/%{uname_r}/source |
|
145 |
+rm -f %{buildroot}/lib/modules/%{uname_r}/build |
|
129 | 146 |
|
130 |
-# create /use/src/linux-esx-headers-*/ content |
|
131 |
-find . -name Makefile* -o -name Kconfig* -o -name *.pl | xargs sh -c 'cp --parents "$@" %{buildroot}/usr/src/%{name}-headers-%{version}-%{release}' copy |
|
132 |
-find arch/x86/include include scripts -type f | xargs sh -c 'cp --parents "$@" %{buildroot}/usr/src/%{name}-headers-%{version}-%{release}' copy |
|
133 |
-find $(find arch/x86 -name include -o -name scripts -type d) -type f | xargs sh -c 'cp --parents "$@" %{buildroot}/usr/src/%{name}-headers-%{version}-%{release}' copy |
|
134 |
-find arch/x86/include Module.symvers include scripts -type f | xargs sh -c 'cp --parents "$@" %{buildroot}/usr/src/%{name}-headers-%{version}-%{release}' copy |
|
147 |
+# create /use/src/linux-headers-*/ content |
|
148 |
+find . -name Makefile* -o -name Kconfig* -o -name *.pl | xargs sh -c 'cp --parents "$@" %{buildroot}/usr/src/linux-headers-%{uname_r}' copy |
|
149 |
+find arch/x86/include include scripts -type f | xargs sh -c 'cp --parents "$@" %{buildroot}/usr/src/linux-headers-%{uname_r}' copy |
|
150 |
+find $(find arch/x86 -name include -o -name scripts -type d) -type f | xargs sh -c 'cp --parents "$@" %{buildroot}/usr/src/linux-headers-%{uname_r}' copy |
|
151 |
+find arch/x86/include Module.symvers include scripts -type f | xargs sh -c 'cp --parents "$@" %{buildroot}/usr/src/linux-headers-%{uname_r}' copy |
|
135 | 152 |
|
136 | 153 |
# copy .config manually to be where it's expected to be |
137 |
-cp .config %{buildroot}/usr/src/%{name}-headers-%{version}-%{release} |
|
154 |
+cp .config %{buildroot}/usr/src/linux-headers-%{uname_r} |
|
138 | 155 |
# symling to the build folder |
139 |
-ln -sf /usr/src/%{name}-headers-%{version}-%{release} %{buildroot}/lib/modules/%{version}-esx/build |
|
156 |
+ln -sf /usr/src/linux-headers-%{uname_r} %{buildroot}/lib/modules/%{uname_r}/build |
|
140 | 157 |
find %{buildroot}/lib/modules -name '*.ko' -print0 | xargs -0 chmod u+x |
141 | 158 |
|
142 | 159 |
%post |
143 |
-/sbin/depmod -aq %{version}-esx |
|
144 |
-ln -sf %{name}-%{version}-%{release}.cfg /boot/photon.cfg |
|
160 |
+/sbin/depmod -aq %{uname_r} |
|
161 |
+ln -sf linux-%{uname_r}.cfg /boot/photon.cfg |
|
145 | 162 |
|
146 | 163 |
%files |
147 | 164 |
%defattr(-,root,root) |
148 |
-/boot/system.map-esx-%{version}-%{release} |
|
149 |
-/boot/config-esx-%{version}-%{release} |
|
150 |
-/boot/vmlinuz-esx-%{version}-%{release} |
|
151 |
-%config(noreplace) /boot/%{name}-%{version}-%{release}.cfg |
|
165 |
+/boot/System.map-%{uname_r} |
|
166 |
+/boot/config-%{uname_r} |
|
167 |
+/boot/vmlinuz-%{uname_r} |
|
168 |
+%config(noreplace) /boot/linux-%{uname_r}.cfg |
|
152 | 169 |
/lib/modules/* |
153 |
-%exclude /lib/modules/%{version}-esx/build |
|
170 |
+%exclude /lib/modules/%{uname_r}/build |
|
154 | 171 |
%exclude /usr/src |
155 | 172 |
|
156 | 173 |
%files docs |
157 | 174 |
%defattr(-,root,root) |
158 |
-%{_defaultdocdir}/linux-esx-%{version}/* |
|
175 |
+%{_defaultdocdir}/linux-%{uname_r}/* |
|
159 | 176 |
|
160 | 177 |
%files devel |
161 | 178 |
%defattr(-,root,root) |
162 |
-/lib/modules/%{version}-esx/build |
|
163 |
-/usr/src/%{name}-headers-%{version}-%{release} |
|
179 |
+/lib/modules/%{uname_r}/build |
|
180 |
+/usr/src/linux-headers-%{uname_r} |
|
164 | 181 |
|
165 | 182 |
%changelog |
183 |
+* Wed Nov 30 2016 Alexey Makhalov <amakhalov@vmware.com> 4.4.35-3 |
|
184 |
+- Expand `uname -r` with release number |
|
185 |
+- Compress modules |
|
166 | 186 |
* Tue Nov 29 2016 Alexey Makhalov <amakhalov@vmware.com> 4.4.35-2 |
167 | 187 |
- Added btrfs module |
168 | 188 |
* Mon Nov 28 2016 Alexey Makhalov <amakhalov@vmware.com> 4.4.35-1 |
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
Summary: Kernel |
3 | 3 |
Name: linux |
4 | 4 |
Version: 4.4.35 |
5 |
-Release: 1%{?dist} |
|
5 |
+Release: 2%{?dist} |
|
6 | 6 |
License: GPLv2 |
7 | 7 |
URL: http://www.kernel.org/ |
8 | 8 |
Group: System Environment/Kernel |
... | ... |
@@ -42,6 +42,7 @@ BuildRequires: Linux-PAM |
42 | 42 |
BuildRequires: openssl-devel |
43 | 43 |
BuildRequires: procps-ng-devel |
44 | 44 |
Requires: filesystem kmod coreutils |
45 |
+%define uname_r %{version}-%{release} |
|
45 | 46 |
|
46 | 47 |
%description |
47 | 48 |
The Linux package contains the Linux kernel. |
... | ... |
@@ -106,101 +107,127 @@ Kernel driver for oprofile, a statistical profiler for Linux systems |
106 | 106 |
%build |
107 | 107 |
make mrproper |
108 | 108 |
cp %{SOURCE1} .config |
109 |
+sed -i 's/CONFIG_LOCALVERSION=""/CONFIG_LOCALVERSION="-%{release}"/' .config |
|
109 | 110 |
make LC_ALL= oldconfig |
110 | 111 |
make VERBOSE=1 KBUILD_BUILD_VERSION="1-photon" KBUILD_BUILD_HOST="photon" ARCH="x86_64" %{?_smp_mflags} |
111 | 112 |
|
113 |
+%define __modules_install_post \ |
|
114 |
+ find %{buildroot}/lib/modules/%{uname_r} -name *.ko | xargs xz \ |
|
115 |
+%{nil} |
|
116 |
+ |
|
117 |
+# We want to compress modules after stripping. Extra step is added to |
|
118 |
+# the default __spec_install_post. |
|
119 |
+%define __spec_install_post\ |
|
120 |
+ %{?__debug_package:%{__debug_install_post}}\ |
|
121 |
+ %{__arch_install_post}\ |
|
122 |
+ %{__os_install_post}\ |
|
123 |
+ %{__modules_install_post}\ |
|
124 |
+%{nil} |
|
125 |
+ |
|
112 | 126 |
%install |
113 | 127 |
install -vdm 755 %{buildroot}/etc |
114 | 128 |
install -vdm 755 %{buildroot}/boot |
115 |
-install -vdm 755 %{buildroot}%{_defaultdocdir}/%{name}-%{version} |
|
129 |
+install -vdm 755 %{buildroot}%{_defaultdocdir}/%{name}-%{uname_r} |
|
116 | 130 |
install -vdm 755 %{buildroot}/etc/modprobe.d |
117 |
-install -vdm 755 %{buildroot}/usr/src/%{name}-headers-%{version}-%{release} |
|
131 |
+install -vdm 755 %{buildroot}/usr/src/%{name}-headers-%{uname_r} |
|
132 |
+install -vdm 755 %{buildroot}/usr/lib/debug/lib/modules/%{uname_r} |
|
118 | 133 |
make INSTALL_MOD_PATH=%{buildroot} modules_install |
119 | 134 |
|
120 |
-cp -v arch/x86/boot/bzImage %{buildroot}/boot/vmlinuz-%{version}-%{release} |
|
121 |
-cp -v System.map %{buildroot}/boot/System.map-%{version}-%{release} |
|
122 |
-cp -v .config %{buildroot}/boot/config-%{version}-%{release} |
|
123 |
-cp -r Documentation/* %{buildroot}%{_defaultdocdir}/%{name}-%{version} |
|
124 |
-install -vdm 755 %{buildroot}/usr/lib/debug/lib/modules/%{version} |
|
125 |
-cp -v vmlinux %{buildroot}/usr/lib/debug/lib/modules/%{version}/vmlinux-%{version}-%{release} |
|
126 |
-# `perf test 1` needs it |
|
127 |
-ln -s vmlinux-%{version}-%{release} %{buildroot}/usr/lib/debug/lib/modules/%{version}/vmlinux |
|
135 |
+# Verify for build-id match |
|
136 |
+# We observe different IDs sometimes |
|
137 |
+# TODO: debug it |
|
138 |
+ID1=`readelf -n vmlinux | grep "Build ID"` |
|
139 |
+./scripts/extract-vmlinux arch/x86/boot/bzImage > extracted-vmlinux |
|
140 |
+ID2=`readelf -n extracted-vmlinux | grep "Build ID"` |
|
141 |
+if [ "$ID1" != "$ID2" ] ; then |
|
142 |
+ echo "Build IDs do not match" |
|
143 |
+ echo $ID1 |
|
144 |
+ echo $ID2 |
|
145 |
+ exit 1 |
|
146 |
+fi |
|
147 |
+install -vm 644 arch/x86/boot/bzImage %{buildroot}/boot/vmlinuz-%{uname_r} |
|
148 |
+# Restrict the permission on System.map-X file |
|
149 |
+install -vm 400 System.map %{buildroot}/boot/System.map-%{uname_r} |
|
150 |
+install -vm 644 .config %{buildroot}/boot/config-%{uname_r} |
|
151 |
+cp -r Documentation/* %{buildroot}%{_defaultdocdir}/%{name}-%{uname_r} |
|
152 |
+install -vm 644 vmlinux %{buildroot}/usr/lib/debug/lib/modules/%{uname_r}/vmlinux-%{uname_r} |
|
153 |
+# `perf test vmlinux` needs it |
|
154 |
+ln -s vmlinux-%{uname_r} %{buildroot}/usr/lib/debug/lib/modules/%{uname_r}/vmlinux |
|
128 | 155 |
|
129 |
-cat > %{buildroot}/boot/%{name}-%{version}-%{release}.cfg << "EOF" |
|
156 |
+cat > %{buildroot}/boot/%{name}-%{uname_r}.cfg << "EOF" |
|
130 | 157 |
# GRUB Environment Block |
131 | 158 |
photon_cmdline=init=/lib/systemd/systemd ro loglevel=3 quiet plymouth.enable=0 |
132 |
-photon_linux=vmlinuz-%{version}-%{release} |
|
133 |
-photon_initrd=initrd.img-%{version}-%{release} |
|
159 |
+photon_linux=vmlinuz-%{uname_r} |
|
160 |
+photon_initrd=initrd.img-%{uname_r} |
|
134 | 161 |
EOF |
135 | 162 |
|
136 |
-# Restrict the permission on System.map-X file |
|
137 |
-chmod -v 400 %{buildroot}/boot/System.map-%{version}-%{release} |
|
138 |
- |
|
139 | 163 |
# Cleanup dangling symlinks |
140 |
-rm -rf %{buildroot}/lib/modules/%{version}/source |
|
141 |
-rm -rf %{buildroot}/lib/modules/%{version}/build |
|
164 |
+rm -rf %{buildroot}/lib/modules/%{uname_r}/source |
|
165 |
+rm -rf %{buildroot}/lib/modules/%{uname_r}/build |
|
142 | 166 |
|
143 |
-find . -name Makefile* -o -name Kconfig* -o -name *.pl | xargs sh -c 'cp --parents "$@" %{buildroot}/usr/src/%{name}-headers-%{version}-%{release}' copy |
|
144 |
-find arch/x86/include include scripts -type f | xargs sh -c 'cp --parents "$@" %{buildroot}/usr/src/%{name}-headers-%{version}-%{release}' copy |
|
145 |
-find $(find arch/x86 -name include -o -name scripts -type d) -type f | xargs sh -c 'cp --parents "$@" %{buildroot}/usr/src/%{name}-headers-%{version}-%{release}' copy |
|
146 |
-find arch/x86/include Module.symvers include scripts -type f | xargs sh -c 'cp --parents "$@" %{buildroot}/usr/src/%{name}-headers-%{version}-%{release}' copy |
|
167 |
+find . -name Makefile* -o -name Kconfig* -o -name *.pl | xargs sh -c 'cp --parents "$@" %{buildroot}/usr/src/%{name}-headers-%{uname_r}' copy |
|
168 |
+find arch/x86/include include scripts -type f | xargs sh -c 'cp --parents "$@" %{buildroot}/usr/src/%{name}-headers-%{uname_r}' copy |
|
169 |
+find $(find arch/x86 -name include -o -name scripts -type d) -type f | xargs sh -c 'cp --parents "$@" %{buildroot}/usr/src/%{name}-headers-%{uname_r}' copy |
|
170 |
+find arch/x86/include Module.symvers include scripts -type f | xargs sh -c 'cp --parents "$@" %{buildroot}/usr/src/%{name}-headers-%{uname_r}' copy |
|
147 | 171 |
|
148 |
-cp .config %{buildroot}/usr/src/%{name}-headers-%{version}-%{release} # copy .config manually to be where it's expected to be |
|
149 |
-ln -sf "/usr/src/%{name}-headers-%{version}-%{release}" "%{buildroot}/lib/modules/%{version}/build" |
|
172 |
+cp .config %{buildroot}/usr/src/%{name}-headers-%{uname_r} # copy .config manually to be where it's expected to be |
|
173 |
+ln -sf "/usr/src/%{name}-headers-%{uname_r}" "%{buildroot}/lib/modules/%{uname_r}/build" |
|
150 | 174 |
find %{buildroot}/lib/modules -name '*.ko' -print0 | xargs -0 chmod u+x |
151 | 175 |
%post |
152 |
-/sbin/depmod -aq %{version} |
|
153 |
-ln -sf %{name}-%{version}-%{release}.cfg /boot/photon.cfg |
|
176 |
+/sbin/depmod -aq %{uname_r} |
|
177 |
+ln -sf %{name}-%{uname_r}.cfg /boot/photon.cfg |
|
154 | 178 |
|
155 | 179 |
%post drivers-gpu |
156 |
-/sbin/depmod -aq %{version} |
|
180 |
+/sbin/depmod -aq %{uname_r} |
|
157 | 181 |
|
158 | 182 |
%post sound |
159 |
-/sbin/depmod -aq %{version} |
|
183 |
+/sbin/depmod -aq %{uname_r} |
|
160 | 184 |
|
161 | 185 |
%post oprofile |
162 |
-/sbin/depmod -aq %{version} |
|
163 |
- |
|
164 |
-%post debuginfo |
|
165 |
-ln -s /usr/lib/debug/lib/modules/%{version}/vmlinux-%{version}-%{release}.debug /boot/vmlinux-%{version}-%{release}.debug |
|
186 |
+/sbin/depmod -aq %{uname_r} |
|
166 | 187 |
|
167 | 188 |
%files |
168 | 189 |
%defattr(-,root,root) |
169 |
-/boot/System.map-%{version}-%{release} |
|
170 |
-/boot/config-%{version}-%{release} |
|
171 |
-/boot/vmlinuz-%{version}-%{release} |
|
172 |
-%config(noreplace) /boot/%{name}-%{version}-%{release}.cfg |
|
190 |
+/boot/System.map-%{uname_r} |
|
191 |
+/boot/config-%{uname_r} |
|
192 |
+/boot/vmlinuz-%{uname_r} |
|
193 |
+%config(noreplace) /boot/%{name}-%{uname_r}.cfg |
|
173 | 194 |
/lib/firmware/* |
174 | 195 |
%defattr(0644,root,root) |
175 |
-/lib/modules/%{version}/* |
|
176 |
-%exclude /lib/modules/%{version}/build |
|
177 |
-%exclude /lib/modules/%{version}/kernel/drivers/gpu |
|
178 |
-%exclude /lib/modules/%{version}/kernel/sound |
|
179 |
-%exclude /lib/modules/%{version}/kernel/arch/x86/oprofile/ |
|
196 |
+/lib/modules/%{uname_r}/* |
|
197 |
+%exclude /lib/modules/%{uname_r}/build |
|
198 |
+%exclude /lib/modules/%{uname_r}/kernel/drivers/gpu |
|
199 |
+%exclude /lib/modules/%{uname_r}/kernel/sound |
|
200 |
+%exclude /lib/modules/%{uname_r}/kernel/arch/x86/oprofile/ |
|
180 | 201 |
|
181 | 202 |
%files docs |
182 | 203 |
%defattr(-,root,root) |
183 |
-%{_defaultdocdir}/%{name}-%{version}/* |
|
204 |
+%{_defaultdocdir}/%{name}-%{uname_r}/* |
|
184 | 205 |
|
185 | 206 |
%files devel |
186 | 207 |
%defattr(-,root,root) |
187 |
-/lib/modules/%{version}/build |
|
188 |
-/usr/src/%{name}-headers-%{version}-%{release} |
|
208 |
+/lib/modules/%{uname_r}/build |
|
209 |
+/usr/src/%{name}-headers-%{uname_r} |
|
189 | 210 |
|
190 | 211 |
%files drivers-gpu |
191 | 212 |
%defattr(-,root,root) |
192 |
-%exclude /lib/modules/%{version}/kernel/drivers/gpu/drm/cirrus/ |
|
193 |
-/lib/modules/%{version}/kernel/drivers/gpu |
|
213 |
+%exclude /lib/modules/%{uname_r}/kernel/drivers/gpu/drm/cirrus/ |
|
214 |
+/lib/modules/%{uname_r}/kernel/drivers/gpu |
|
194 | 215 |
|
195 | 216 |
%files sound |
196 | 217 |
%defattr(-,root,root) |
197 |
-/lib/modules/%{version}/kernel/sound |
|
218 |
+/lib/modules/%{uname_r}/kernel/sound |
|
198 | 219 |
|
199 | 220 |
%files oprofile |
200 | 221 |
%defattr(-,root,root) |
201 |
-/lib/modules/%{version}/kernel/arch/x86/oprofile/ |
|
222 |
+/lib/modules/%{uname_r}/kernel/arch/x86/oprofile/ |
|
202 | 223 |
|
203 | 224 |
%changelog |
225 |
+* Wed Nov 30 2016 Alexey Makhalov <amakhalov@vmware.com> 4.4.35-2 |
|
226 |
+- Expand `uname -r` with release number |
|
227 |
+- Check for build-id matching |
|
228 |
+- Added syscalls tracing support |
|
229 |
+- Compress modules |
|
204 | 230 |
* Mon Nov 28 2016 Alexey Makhalov <amakhalov@vmware.com> 4.4.35-1 |
205 | 231 |
- Update to linux-4.4.35 |
206 | 232 |
- vfio-pci-fix-integer-overflows-bitmask-check.patch |
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
Summary: Sysdig is a universal system visibility tool with native support for containers. |
3 | 3 |
Name: sysdig |
4 | 4 |
Version: 0.10.1 |
5 |
-Release: 2%{?kernelsubrelease}%{?dist} |
|
5 |
+Release: 3%{?kernelsubrelease}%{?dist} |
|
6 | 6 |
License: GPLv2 |
7 | 7 |
URL: http://www.sysdig.org/ |
8 | 8 |
Group: Applications/System |
... | ... |
@@ -39,17 +39,17 @@ cmake \ |
39 | 39 |
-DUSE_BUNDLED_ZLIB=OFF \ |
40 | 40 |
-DUSE_BUNDLED_NCURSES=OFF .. |
41 | 41 |
|
42 |
-make KERNELDIR="/lib/modules/%{KERNEL_VERSION}/build" |
|
42 |
+make KERNELDIR="/lib/modules/%{KERNEL_VERSION}-%{KERNEL_RELEASE}/build" |
|
43 | 43 |
|
44 | 44 |
%install |
45 | 45 |
cd build |
46 |
-make install DESTDIR=%{buildroot} KERNELDIR="/lib/modules/%{KERNEL_VERSION}/build" |
|
46 |
+make install DESTDIR=%{buildroot} KERNELDIR="/lib/modules/%{KERNEL_VERSION}-%{KERNEL_RELEASE}/build" |
|
47 | 47 |
mv %{buildroot}/usr/src/sysdig* %{buildroot}/usr/src/sysdig-%{version} |
48 | 48 |
mkdir -p %{buildroot}/etc/ |
49 | 49 |
mv %{buildroot}/usr/etc/bash_completion.d %{buildroot}/etc/ |
50 | 50 |
rm -rf %{buildroot}/usr/share/zsh/ |
51 |
-mkdir -p %{buildroot}/lib/modules/%{KERNEL_VERSION}/extra |
|
52 |
-mv driver/sysdig-probe.ko %{buildroot}/lib/modules/%{KERNEL_VERSION}/extra |
|
51 |
+mkdir -p %{buildroot}/lib/modules/%{KERNEL_VERSION}-%{KERNEL_RELEASE}/extra |
|
52 |
+mv driver/sysdig-probe.ko %{buildroot}/lib/modules/%{KERNEL_VERSION}-%{KERNEL_RELEASE}/extra |
|
53 | 53 |
|
54 | 54 |
%clean |
55 | 55 |
rm -rf %{buildroot}/* |
... | ... |
@@ -64,26 +64,29 @@ rm -rf %{buildroot}/* |
64 | 64 |
%defattr(-,root,root) |
65 | 65 |
/etc/bash_completion.d/* |
66 | 66 |
%{_bindir} |
67 |
-/usr/src |
|
67 |
+%exclude %{_usrsrc} |
|
68 | 68 |
%{_datadir} |
69 |
-/lib/modules/%{KERNEL_VERSION}/extra/sysdig-probe.ko |
|
69 |
+/lib/modules/%{KERNEL_VERSION}-%{KERNEL_RELEASE}/extra/sysdig-probe.ko |
|
70 | 70 |
|
71 | 71 |
%changelog |
72 |
+* Wed Nov 30 2016 Alexey Makhalov <amakhalov@vmware.com> 0.10.1-3 |
|
73 |
+- Expand uname -r to have release number |
|
74 |
+- Exclude /usr/src |
|
72 | 75 |
* Mon Aug 1 2016 Divya Thaluru <dthaluru@vmware.com> 0.10.1-2 |
73 | 76 |
- Added kernel macros |
74 |
-* Thu Jul 14 2016 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 0.10.1-2 |
|
75 |
-- Updated sysdig to build the kernel module |
|
76 |
-* Tue Jun 28 2016 Anish Swaminathan <anishs@vmware.com> 0.10.1-1 |
|
77 |
-- Upgrade sysdig to 0.10.1 |
|
78 |
-* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 0.8.0-4 |
|
79 |
-- GA - Bump release of all rpms |
|
80 |
-* Fri May 20 2016 Divya Thaluru <dthaluru@vmware.com> 0.8.0-3 |
|
81 |
-- Removing usage of bundled packages to build sysdig package |
|
82 |
-* Wed Mar 16 2016 Anish Swaminathan <anishs@vmware.com> 0.8.0-2 |
|
83 |
-- Add openssl to buildrequires. |
|
84 |
-* Tue Feb 23 2016 Kumar Kaushik <kaushikk@vmware.com> 0.8.0-1 |
|
85 |
-- Upgraded to new version. |
|
86 |
-* Wed Jan 20 2016 Anish Swaminathan <anishs@vmware.com> 0.6.0-1 |
|
87 |
-- Upgrade version. |
|
88 |
-* Mon Nov 30 2015 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 0.1.101-1 |
|
89 |
-- Initial build. First version |
|
77 |
+* Thu Jul 14 2016 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 0.10.1-2 |
|
78 |
+- Updated sysdig to build the kernel module |
|
79 |
+* Tue Jun 28 2016 Anish Swaminathan <anishs@vmware.com> 0.10.1-1 |
|
80 |
+- Upgrade sysdig to 0.10.1 |
|
81 |
+* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 0.8.0-4 |
|
82 |
+- GA - Bump release of all rpms |
|
83 |
+* Fri May 20 2016 Divya Thaluru <dthaluru@vmware.com> 0.8.0-3 |
|
84 |
+- Removing usage of bundled packages to build sysdig package |
|
85 |
+* Wed Mar 16 2016 Anish Swaminathan <anishs@vmware.com> 0.8.0-2 |
|
86 |
+- Add openssl to buildrequires. |
|
87 |
+* Tue Feb 23 2016 Kumar Kaushik <kaushikk@vmware.com> 0.8.0-1 |
|
88 |
+- Upgraded to new version. |
|
89 |
+* Wed Jan 20 2016 Anish Swaminathan <anishs@vmware.com> 0.6.0-1 |
|
90 |
+- Upgrade version. |
|
91 |
+* Mon Nov 30 2015 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 0.1.101-1 |
|
92 |
+- Initial build. First version |