Skip to contentSkip to conversation

package/sysdig: New package

PATCH Superseded Angelo Compagnucci 2 participants 3 messages Mar 25, 2015

v7 of 10 Superseded Latest is v10 →

lore
Share & tools
lore
#0 lore raw

PATCH v7 1/1 package/sysdig: New package

Sysdig is open source, system-level exploration:
capture system state and activity from a running Linux instance, then save, filter and analyze.

---
Changes v6 -> v7:
- Fixing a nasty mistake in Config.in

Changes v5 -> v6:
- Patching kernel module makefile to be compatible with buildroot.
- Patching cmakefile to remove unneed installation of DKMS infrastructure.
- Removing of unneeded post installation script.
- Added -DUSE_BUNDLED_JSONCPP = NO
- Package is now at the bare minimum.

Changes v4 -> v5:
- Adjusted to 80 columns for sysdig.mk header

Changes v3 -> v4:
- Changed "depends on" to "select" and fixed selected packages dependencies.
- moved "comment" section to the bottom

Changes v2 -> v3:
- Changed "depends on" and "select" to simplify package

Changes v1 -> v2:
- Changed "depends on" with "select" for dependencies (suggested by Baruch)
- Added comment "sysdig needs a Linux kernel to be built" (suggested by Baruch)
- Upgreded to recently released 0.1.99

 package/Config.in                                  |  1 +
 .../0001-makefile-driver-compile-options.patch     | 23 ++++++++++++++++
 .../sysdig/0002-remove-dkms-module-updater.patch   | 32 ++++++++++++++++++++++
 package/sysdig/Config.in                           | 21 ++++++++++++++
 package/sysdig/sysdig.mk                           | 16 +++++++++++
 5 files changed, 93 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
package/Config.in +1 -0
index e4ee95d..28526c0 100644
@@ -95,6 +95,7 @@ endif
 	source "package/strace/Config.in"
 	source "package/stress/Config.in"
 	source "package/sysprof/Config.in"
+	source "package/sysdig/Config.in"
 	source "package/tinymembench/Config.in"
 	source "package/trace-cmd/Config.in"
 	source "package/trinity/Config.in"
package/sysdig/0001-makefile-driver-compile-options.patch new file +23 -0
new file mode 100644
index 0000000..b3444ad
@@ -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 <[email protected]>
+
+--- 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 $(KERNELDIR) M=$(TOP) modules
+ 
+ clean:
+-	$(MAKE) -C $(KERNELDIR) M=$(TOP) clean
++	$(MAKE) $(LINUX_MAKE_FLAGS) -C $(KERNELDIR) M=$(TOP) clean
+ 
+ install: all
+-	$(MAKE) -C $(KERNELDIR) M=$(TOP) modules_install
++	$(MAKE) $(LINUX_MAKE_FLAGS) -C $(KERNELDIR) M=$(TOP) modules_install
package/sysdig/0002-remove-dkms-module-updater.patch new file +32 -0
new file mode 100644
index 0000000..66fe3dd
@@ -0,0 +1,32 @@
+Remove DKMS module updater
+
+This patch disables the in target installation of DKMS module updater
+mechanism unneeded in buildroot.
+
+Signed-off-by: Angelo Compagnucci <[email protected]>
+
+--- a/driver/CMakeLists.txt
++++ b/driver/CMakeLists.txt
+@@ -38,22 +38,3 @@ add_custom_target(install_driver
+ 	DEPENDS 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}")
package/sysdig/Config.in new file +21 -0
new file mode 100644
index 0000000..caf7ef8
@@ -0,0 +1,21 @@
+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
+	depends on !BR2_INSTALL_LIBSTDCPP
+	depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS
package/sysdig/sysdig.mk new file +16 -0
new file mode 100644
index 0000000..769cfe2
@@ -0,0 +1,16 @@
+################################################################################
+#
+# 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 libjson linux
+SYSDIG_SUPPORTS_IN_SOURCE_BUILD = NO
+
+$(eval $(cmake-package))
Signature · 1 line
1.9.1
#1 lore raw

PATCH v7 1/1 package/sysdig: New package

Hi Angelo,

Quoted 5 lines · Angelo Compagnucci

Sysdig is open source, system-level exploration:
capture system state and activity from a running Linux instance, then save, filter and analyze.

[...]

package/Config.in endif · line 98

Quoted 9 lines
package/Config.in +1 -0
index e4ee95d..28526c0 100644
@@ -95,6 +95,7 @@ endif
 	source "package/strace/Config.in"
 	source "package/stress/Config.in"
 	source "package/sysprof/Config.in"
+	source "package/sysdig/Config.in"

Please keep the list alphabetically ordered. sysdig should be above sysprof.

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#2 lore raw

PATCH v7 1/1 package/sysdig: New package

Dear Baruch Siach,

2015-03-25 11:44 GMT+01:00 Baruch Siach <[email protected]>:

Quoted 11 lines

Hi Angelo,

Quoted 5 lines · Angelo Compagnucci

Sysdig is open source, system-level exploration:
capture system state and activity from a running Linux instance, then save, filter and analyze.

[...]

Quoted 11 lines

package/Config.in endif · line 98

Quoted 9 lines
package/Config.in +1 -0
index e4ee95d..28526c0 100644
@@ -95,6 +95,7 @@ endif
      source "package/strace/Config.in"
      source "package/stress/Config.in"
      source "package/sysprof/Config.in"
+     source "package/sysdig/Config.in"

Please keep the list alphabetically ordered. sysdig should be above sysprof.

You are totally right, my fault ... Submitting a new patch in minutes.

Quoted 7 lines

baruch

--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

Signature · 1 line
Profile: http://it.linkedin.com/in/compagnucciangelo