* [Buildroot] [PATCH v10] package/sysdig: New package
@ 2015-03-26 20:41 Angelo Compagnucci
2015-03-27 0:47 ` Ryan Barnett
2015-03-30 20:33 ` Thomas Petazzoni
0 siblings, 2 replies; 5+ messages in thread
From: Angelo Compagnucci @ 2015-03-26 20:41 UTC (permalink / raw)
To: buildroot
Sysdig is open source, system-level exploration:
capture system state and activity from a running Linux
instance, then save, filter and analyze.
Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com>
---
package/Config.in | 1 +
.../0001-makefile-driver-compile-options.patch | 23 ++++++++++++++++
.../sysdig/0002-remove-dkms-module-updater.patch | 31 ++++++++++++++++++++++
package/sysdig/Config.in | 20 ++++++++++++++
package/sysdig/sysdig.mk | 24 +++++++++++++++++
5 files changed, 99 insertions(+)
create mode 100644 package/sysdig/0001-makefile-driver-compile-options.patch
create mode 100644 package/sysdig/0002-remove-dkms-module-updater.patch
create mode 100644 package/sysdig/Config.in
create mode 100644 package/sysdig/sysdig.mk
diff --git a/package/Config.in b/package/Config.in
index e4ee95d..aaf12ec 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -94,6 +94,7 @@ endif
source "package/spidev_test/Config.in"
source "package/strace/Config.in"
source "package/stress/Config.in"
+ source "package/sysdig/Config.in"
source "package/sysprof/Config.in"
source "package/tinymembench/Config.in"
source "package/trace-cmd/Config.in"
diff --git a/package/sysdig/0001-makefile-driver-compile-options.patch b/package/sysdig/0001-makefile-driver-compile-options.patch
new file mode 100644
index 0000000..74c74d8
--- /dev/null
+++ b/package/sysdig/0001-makefile-driver-compile-options.patch
@@ -0,0 +1,23 @@
+Updated Makefile compile options
+
+This patch updates linux kernel module (driver) of sysdig to be
+compatible with buildroot compile flags.
+
+Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
+
+--- a/driver/Makefile.in
++++ b/driver/Makefile.in
+@@ -6,10 +6,10 @@ KERNELDIR ?= /lib/modules/$(shell uname -r)/build
+
+ TOP := $(shell pwd)
+ all:
+- $(MAKE) -C $(KERNELDIR) M=$(TOP) modules
++ $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) M=$(TOP) modules
+
+ clean:
+- $(MAKE) -C $(KERNELDIR) M=$(TOP) clean
++ $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) M=$(TOP) clean
+
+ install: all
+- $(MAKE) -C $(KERNELDIR) M=$(TOP) modules_install
++ $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) M=$(TOP) modules_install
diff --git a/package/sysdig/0002-remove-dkms-module-updater.patch b/package/sysdig/0002-remove-dkms-module-updater.patch
new file mode 100644
index 0000000..8d5c99d
--- /dev/null
+++ b/package/sysdig/0002-remove-dkms-module-updater.patch
@@ -0,0 +1,31 @@
+Remove DKMS module updater
+
+This patch disables the in target installation of DKMS module updater
+mechanism unneeded in buildroot.
+
+Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
+
+--- a/driver/CMakeLists.txt
++++ b/driver/CMakeLists.txt
+@@ -39,21 +39,3 @@ add_custom_target(install_driver
+ WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+ VERBATIM)
+
+-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Makefile.dkms
+- RENAME Makefile
+- DESTINATION "src/sysdig-${SYSDIG_VERSION}")
+-
+-install(FILES
+- ${CMAKE_CURRENT_BINARY_DIR}/dkms.conf
+- dynamic_params_table.c
+- event_table.c
+- flags_table.c
+- main.c
+- ppm.h
+- ppm_events.c
+- ppm_events.h
+- ppm_events_public.h
+- ppm_fillers.c
+- ppm_ringbuffer.h
+- syscall_table.c
+- DESTINATION "src/sysdig-${SYSDIG_VERSION}")
diff --git a/package/sysdig/Config.in b/package/sysdig/Config.in
new file mode 100644
index 0000000..3d7ee67
--- /dev/null
+++ b/package/sysdig/Config.in
@@ -0,0 +1,20 @@
+config BR2_PACKAGE_SYSDIG
+ bool "sysdig"
+ select BR2_PACKAGE_ZLIB
+ select BR2_PACKAGE_LUAJIT
+ select BR2_PACKAGE_JSONCPP
+ depends on BR2_LINUX_KERNEL
+ depends on BR2_INSTALL_LIBSTDCPP # libjson
+ depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS
+ help
+ Sysdig is open source, system-level exploration:
+ capture system state and activity from a running Linux instance,
+ then save, filter and analyze.
+ Think of it as strace + tcpdump + lsof + awesome sauce.
+ With a little Lua cherry on top.
+
+ http://sysdig.org
+
+comment "sysdig needs a toolchain w/ C++ and a Linux kernel to be built"
+ depends on !BR2_LINUX_KERNEL || !BR2_INSTALL_LIBSTDCPP
+ depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS
diff --git a/package/sysdig/sysdig.mk b/package/sysdig/sysdig.mk
new file mode 100644
index 0000000..e05124b
--- /dev/null
+++ b/package/sysdig/sysdig.mk
@@ -0,0 +1,24 @@
+################################################################################
+#
+# sysdig
+#
+################################################################################
+
+SYSDIG_VERSION = 0.1.99
+SYSDIG_SITE = $(call github,draios,sysdig,$(SYSDIG_VERSION))
+SYSDIG_LICENSE = GPLv2
+SYSDIG_LICENSE_FILES = COPYING
+SYSDIG_CONF_OPTS = -DUSE_BUNDLED_LUAJIT=OFF -DUSE_BUNDLED_ZLIB=OFF \
+ -DUSE_BUNDLED_JSONCPP=OFF
+SYSDIG_DEPENDENCIES = zlib luajit jsoncpp linux
+SYSDIG_SUPPORTS_IN_SOURCE_BUILD = NO
+
+SYSDIG_MAKE_ENV = LINUX_DIR='$(LINUX_DIR)' LINUX_MAKE_FLAGS='$(LINUX_MAKE_FLAGS)'
+
+define SYSDIG_INSTALL_DRIVER
+ cd $(@D)/buildroot-build; $(MAKE) $(SYSDIG_MAKE_ENV) install_driver
+endef
+
+SYSDIG_POST_INSTALL_TARGET_HOOKS += SYSDIG_INSTALL_DRIVER
+
+$(eval $(cmake-package))
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v10] package/sysdig: New package
2015-03-26 20:41 [Buildroot] [PATCH v10] package/sysdig: New package Angelo Compagnucci
@ 2015-03-27 0:47 ` Ryan Barnett
2015-03-27 9:16 ` Angelo Compagnucci
2015-03-30 20:33 ` Thomas Petazzoni
1 sibling, 1 reply; 5+ messages in thread
From: Ryan Barnett @ 2015-03-27 0:47 UTC (permalink / raw)
To: buildroot
Angelo,
On Thu, Mar 26, 2015 at 3:41 PM, Angelo Compagnucci
<angelo.compagnucci@gmail.com> wrote:
> Sysdig is open source, system-level exploration:
> capture system state and activity from a running Linux
> instance, then save, filter and analyze.
>
> Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
> Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com>
Reviewed-by: Ryan Barnett <ryan.barnett@rockwellcollins.com>
Tested-by: Ryan Barnett <ryan.barnett@rockwellcollins.com>
--
Ryan Barnett / Sr Software Engineer
Airborne Information Systems / Security Systems and Software
MS 131-100, C Ave NE, Cedar Rapids, IA, 52498, USA
ryan.barnett at rockwellcollins.com
www.rockwellcollins.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v10] package/sysdig: New package
2015-03-27 0:47 ` Ryan Barnett
@ 2015-03-27 9:16 ` Angelo Compagnucci
0 siblings, 0 replies; 5+ messages in thread
From: Angelo Compagnucci @ 2015-03-27 9:16 UTC (permalink / raw)
To: buildroot
Dear Ryan Barnett,
2015-03-27 1:47 GMT+01:00 Ryan Barnett <ryan.barnett@rockwellcollins.com>:
> Angelo,
>
> On Thu, Mar 26, 2015 at 3:41 PM, Angelo Compagnucci
> <angelo.compagnucci@gmail.com> wrote:
>> Sysdig is open source, system-level exploration:
>> capture system state and activity from a running Linux
>> instance, then save, filter and analyze.
>>
>> Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
>> Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com>
>
> Reviewed-by: Ryan Barnett <ryan.barnett@rockwellcollins.com>
> Tested-by: Ryan Barnett <ryan.barnett@rockwellcollins.com>
Thank you very much for the review, really appreciated!
I have other patches in queue if you have some spare time!
Thank you again!
>
> --
> Ryan Barnett / Sr Software Engineer
> Airborne Information Systems / Security Systems and Software
> MS 131-100, C Ave NE, Cedar Rapids, IA, 52498, USA
> ryan.barnett at rockwellcollins.com
> www.rockwellcollins.com
--
Profile: http://it.linkedin.com/in/compagnucciangelo
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v10] package/sysdig: New package
2015-03-26 20:41 [Buildroot] [PATCH v10] package/sysdig: New package Angelo Compagnucci
2015-03-27 0:47 ` Ryan Barnett
@ 2015-03-30 20:33 ` Thomas Petazzoni
2015-03-30 21:45 ` Angelo Compagnucci
1 sibling, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2015-03-30 20:33 UTC (permalink / raw)
To: buildroot
Dear Angelo Compagnucci,
On Thu, 26 Mar 2015 21:41:29 +0100, Angelo Compagnucci wrote:
> Sysdig is open source, system-level exploration:
> capture system state and activity from a running Linux
> instance, then save, filter and analyze.
>
> Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
> Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com>
Thanks, applied. But I did a number of changes before applying:
[Thomas:
- remove unneeded 0001-makefile-driver-compile-options.patch, instead
pass KERNELDIR in the make options when building the driver, and
pass the contents of $(LINUX_MAKE_FLAGS) directly.
- use $(SYSDIG_BUILDDIR) instead of $(@D)/buildroot-build, so that
the package does not depend on the package infra using specifically
buildroot-build as the build subdirectory.
- use $(MAKE) -C <foo> instead of cd <foo>; $(MAKE).
- rename 0002 patch to 0001, since the 0001 patch is removed.]
I think the most annoying part was the over-complicated solution to
build the driver. My solution is simpler in the .mk file, and does not
require patching.
Can you look at submitting upstream a solution for the DKMS patch, like
a new CMake option to enable/disable the DKMS stuff ?
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v10] package/sysdig: New package
2015-03-30 20:33 ` Thomas Petazzoni
@ 2015-03-30 21:45 ` Angelo Compagnucci
0 siblings, 0 replies; 5+ messages in thread
From: Angelo Compagnucci @ 2015-03-30 21:45 UTC (permalink / raw)
To: buildroot
Dear Thomas Petazzoni,
2015-03-30 22:33 GMT+02:00 Thomas Petazzoni
<thomas.petazzoni@free-electrons.com>:
> Dear Angelo Compagnucci,
>
> On Thu, 26 Mar 2015 21:41:29 +0100, Angelo Compagnucci wrote:
>> Sysdig is open source, system-level exploration:
>> capture system state and activity from a running Linux
>> instance, then save, filter and analyze.
>>
>> Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
>> Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com>
>
> Thanks, applied. But I did a number of changes before applying:
>
> [Thomas:
> - remove unneeded 0001-makefile-driver-compile-options.patch, instead
> pass KERNELDIR in the make options when building the driver, and
> pass the contents of $(LINUX_MAKE_FLAGS) directly.
> - use $(SYSDIG_BUILDDIR) instead of $(@D)/buildroot-build, so that
> the package does not depend on the package infra using specifically
> buildroot-build as the build subdirectory.
> - use $(MAKE) -C <foo> instead of cd <foo>; $(MAKE).
> - rename 0002 patch to 0001, since the 0001 patch is removed.]
>
> I think the most annoying part was the over-complicated solution to
> build the driver. My solution is simpler in the .mk file, and does not
> require patching.
>
> Can you look at submitting upstream a solution for the DKMS patch, like
> a new CMake option to enable/disable the DKMS stuff ?
Of course!
Thank you for submitting!
>
> Thanks,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
--
Profile: http://it.linkedin.com/in/compagnucciangelo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-03-30 21:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-26 20:41 [Buildroot] [PATCH v10] package/sysdig: New package Angelo Compagnucci
2015-03-27 0:47 ` Ryan Barnett
2015-03-27 9:16 ` Angelo Compagnucci
2015-03-30 20:33 ` Thomas Petazzoni
2015-03-30 21:45 ` Angelo Compagnucci
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.