package/sysdig: New package
PATCH v8 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 v7 -> v8:
- sysdig now alphabetically ordered in Config.in
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
@@ -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"
package/sysdig/0001-makefile-driver-compile-options.patch new file +23 -0
@@ -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
@@ -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
@@ -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
@@ -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
PATCH v8 1/1 package/sysdig: New package
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.Signed-off-by Angelo Compagnucci <[email protected]>
Quoted 176 lines
---
Changes v7 -> v8:
- sysdig now alphabetically ordered in Config.inChanges v6 -> v7:
- Fixing a nasty mistake in Config.inChanges 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 headerChanges v3 -> v4:
- Changed "depends on" to "select" and fixed selected packages dependencies.
- moved "comment" section to the bottomChanges v2 -> v3:
- Changed "depends on" and "select" to simplify packageChanges 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.99package/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.mkpackage/Config.in +1
-0@@ -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"package/sysdig/0001-makefile-driver-compile-options.patch new file +23
-0@@ -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_installpackage/sysdig/0002-remove-dkms-module-updater.patch new file +32
-0@@ -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@@ -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_SUPPORTSpackage/sysdig/sysdig.mk new file +16
-1@@ -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)) --1.9.1
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH v8 1/1 package/sysdig: New package
In reply to Angelo CompagnucciAngelo,
On Wed, Mar 25, 2015 at 5:53 AM, Angelo Compagnucci <[email protected]> wrote:
[...]
Quoted 7 lines
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
Have you submitted this sysdig patch upstream via a github pull request?
Giving it a quick look at 0001 looks like something that could be upstreamable since
Quoted 120 lines
create mode 100644 package/sysdig/0002-remove-dkms-module-updater.patch create mode 100644 package/sysdig/Config.in create mode 100644 package/sysdig/sysdig.mkpackage/Config.in +1
-0@@ -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"package/sysdig/0001-makefile-driver-compile-options.patch new file +23
-0@@ -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_installpackage/sysdig/0002-remove-dkms-module-updater.patch new file +32
-0@@ -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@@ -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_SUPPORTSpackage/sysdig/sysdig.mk new file +4
-0@@ -0,0 +1,16 @@ +################################################################################ +# +# sysdig +#
package/sysdig/sysdig.mk line 14
Quoted 10 lines
package/sysdig/sysdig.mk new file +10
-0+################################################################################ + +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
In your previous email you gave a link to saying why luajit is required:
[1] http://www.sysdig.org/wiki/how-to-install-sysdig-from-the-source-code/
However, from reading the documentation it says that you can use the bundled luajit. Quoting from the site you provided:
Quoted 8 lines
package/sysdig/sysdig.mk new file +1
-1+$(eval $(cmake-package)) --1.9.1
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 5 lines
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
PATCH v8 1/1 package/sysdig: New package
Angelo,
I apologies as I accidentally pressed a keyboard shortcut that sent the email prematurely.
Quoted 15 lines · Ryan Barnett
Angelo,
On Wed, Mar 25, 2015 at 5:53 AM, Angelo Compagnucci <[email protected]> wrote:
[...]
Quoted 7 lines
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
Quoted 4 lines
Have you submitted this sysdig patch upstream via a github pull request?
Giving it a quick look at 0001 looks like something that could be upstreamable since
So upon further review of your 0001 patch I have some questions which you can see below.
Quoted 30 lines
Quoted 30 lines
create mode 100644 package/sysdig/0002-remove-dkms-module-updater.patch create mode 100644 package/sysdig/Config.in create mode 100644 package/sysdig/sysdig.mkpackage/Config.in +1
-0@@ -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"package/sysdig/0001-makefile-driver-compile-options.patch new file +7
-0@@ -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]> +
Quoted 8 lines
package/sysdig/0001-makefile-driver-compile-options.patch line 15
Quoted 8 lines
package/sysdig/0001-makefile-driver-compile-options.patch new file +8
-0+--- 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
How is LINUX_MAKE_FLAGS available in your environment when you are attempting to run these commands? Buildroot doesn't export this variable to the environment and I don't see how these are available you cmake is executing this makefile.
Quoted 84 lines
Quoted 84 lines
package/sysdig/0001-makefile-driver-compile-options.patch new file +7
-0+ 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_installpackage/sysdig/0002-remove-dkms-module-updater.patch new file +32
-0@@ -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@@ -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_SUPPORTSpackage/sysdig/sysdig.mk new file +6
-0@@ -0,0 +1,16 @@ +################################################################################ +# +# sysdig +# +################################################################################ +
Quoted 9 lines
package/sysdig/sysdig.mk line 14
Quoted 8 lines
package/sysdig/sysdig.mk new file +8
-0+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
In your previous email you gave a link to saying why luajit is required:
[1] http://www.sysdig.org/wiki/how-to-install-sysdig-from-the-source-code/
However, from reading the documentation it says that you can use the bundled luajit. Quoting from the site you provided:
---
By default the bundled version of LuaJIT will be built and linked statically. If you prefer to use the system one, then you can do:
cmake -DUSE_BUNDLED_LUAJIT=OFF ..
---
This would imply that we can make an optional dependency on luajit by doing something like this:
ifeq ($(BR2_PACKAGE_LUAJIT),y)SYSDIG_CONF_OPTS += DUSE_BUNDLED_LUAJIT=OFFSYSDIG_DEPENDENCIES += luajit
endif
I don't think it make sense to have an else case here since it doesn't mention having to define BUNDLED_LUAJIT as on.
It appears that you can the same for zlib and jsoncpp as well. I have not tried this yet but from reading the documentation it appears that this all possible.
Thanks,
-Ryan
Signature · 5 lines
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
PATCH v8 1/1 package/sysdig: New package
Dear Ryan Barnett,
Quoted 22 lines · Ryan Barnett
In your previous email you gave a link to saying why luajit is required:
[1] http://www.sysdig.org/wiki/how-to-install-sysdig-from-the-source-code/
However, from reading the documentation it says that you can use the bundled luajit. Quoting from the site you provided:
---
By default the bundled version of LuaJIT will be built and linked statically. If you prefer to use the system one, then you can do:cmake -DUSE_BUNDLED_LUAJIT=OFF ..
---This would imply that we can make an optional dependency on luajit by doing something like this:
ifeq ($(BR2_PACKAGE_LUAJIT),y)
SYSDIG_CONF_OPTS+= DUSE_BUNDLED_LUAJIT=OFFSYSDIG_DEPENDENCIES+= luajit
endif
Quoted 6 lines
I don't think it make sense to have an else case here since it doesn't mention having to define
BUNDLED_LUAJITas on.It appears that you can the same for zlib and jsoncpp as well. I have not tried this yet but from reading the documentation it appears that this all possible.
Well, it depends. If those dependencies are indeed mandatory (i.e sysdig always needs LuaJIT, be it a bundled version or a system-provided version), I believe we generally prefer to always use the system-generated version. Using bundling version is not really nice to make sure that the latest versions of LuaJit/zlib/jsoncpp are used.
So, in general, I think we prefer to use system-provided versions, unless using the bundled version is absolutely necessary (tight version dependency, specific hacks done, etc.).
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v8 1/1 package/sysdig: New package
Thomas,
Quoted 10 lines · Thomas Petazzoni
Well, it depends. If those dependencies are indeed mandatory (i.e sysdig always needs LuaJIT, be it a bundled version or a system-provided version), I believe we generally prefer to always use the system-generated version. Using bundling version is not really nice to make sure that the latest versions of LuaJit/zlib/jsoncpp are used.
So, in general, I think we prefer to use system-provided versions, unless using the bundled version is absolutely necessary (tight version dependency, specific hacks done, etc.).
Thank you for the clarification! So he is correct in forcing luajit/zlib/jsoncpp to be build in your target.
Thanks,
-Ryan
Signature · 5 lines
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
PATCH v8 1/1 package/sysdig: New package
In reply to Ryan BarnettDear Ryan Barnett,
2015-03-25 19:05 GMT+01:00 Ryan Barnett <[email protected]>:
Quoted 15 lines
Angelo,
On Wed, Mar 25, 2015 at 5:53 AM, Angelo Compagnucci <[email protected]> wrote:
[...]
Quoted 7 lines
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
Quoted 1 line
Have you submitted this sysdig patch upstream via a github pull request?
I don't think they will be interested cause the patch is strictly releated to buildroot, $(LINUX_MAKE_FLAGS) is indeed a buildroot defined variable not applicable in other contexts.
Quoted 136 lines
Giving it a quick look at 0001 looks like something that could be upstreamable since
Quoted 120 lines
create mode 100644 package/sysdig/0002-remove-dkms-module-updater.patch create mode 100644 package/sysdig/Config.in create mode 100644 package/sysdig/sysdig.mkpackage/Config.in +1
-0@@ -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"package/sysdig/0001-makefile-driver-compile-options.patch new file +23
-0@@ -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_installpackage/sysdig/0002-remove-dkms-module-updater.patch new file +32
-0@@ -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@@ -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_SUPPORTSpackage/sysdig/sysdig.mk new file +4
-0@@ -0,0 +1,16 @@ +################################################################################ +# +# sysdig +#package/sysdig/sysdig.mk line 14
Quoted 10 lines
package/sysdig/sysdig.mk new file +10
-0+################################################################################ + +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 = NOIn your previous email you gave a link to saying why luajit is required:
Quoted 4 lines
[1] http://www.sysdig.org/wiki/how-to-install-sysdig-from-the-source-code/
However, from reading the documentation it says that you can use the bundled luajit. Quoting from the site you provided:
I think that deduplication is really important here. Having only a system wide library installed is more appropriated for an embedded system where resources is limited, instead of having several libraries with similar functionality installed.
Sincerely, Angelo
Quoted 19 lines
Quoted 10 lines
package/sysdig/sysdig.mk new file +1
-1+$(eval $(cmake-package)) --1.9.1
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot--
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
Signature · 1 line
Profile: http://it.linkedin.com/in/compagnucciangelo
PATCH v8 1/1 package/sysdig: New package
In reply to Angelo CompagnucciAngelo,
Sorry for the noise before I have now had a change to actually download and try your patch out. Please see the issues that I have had when just doing a build with 'make sysdig'
Quoted 12 lines · Angelo Compagnucci
package/sysdig/0001-makefile-driver-compile-options.patch new file +5
-0@@ -0,0 +1,23 @@ +Updated Makefile compile options + +This patch updates linux kernel module (driver) of sysdig to be +compatible with buildroot compile flags. +
package/sysdig/0001-makefile-driver-compile-options.patch line 15
Quoted 10 lines
package/sysdig/0001-makefile-driver-compile-options.patch new file +10
-0+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
This doesn't work because when I do a build and run file on the .ko I get the following:
$ file build/sysdig-0.1.99/buildroot-build/driver/sysdig-probe.ko build/sysdig-0.1.99/buildroot-build/driver/sysdig-probe.ko: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), BuildID[sha1]=0ea061af98e9fd2b5ba04d2be1c309833a20217a, not stripped
My target was a Cortex-A5 (arm 32-bit LE). So this patch isn't working because I think KERNELDIR is being set by above to /lib/modules$(shell uname -r)/build
So in order to use this patch with buildroot we need to modify the sysdig.mk in order to make this work.
Quoted 8 lines
package/sysdig/0001-makefile-driver-compile-options.patch new file +8
-0+ + 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
[...]
Quoted 8 lines
package/sysdig/sysdig.mk new file +2
-0@@ -0,0 +1,16 @@ +################################################################################ +#
package/sysdig/sysdig.mk line 12
Quoted 10 lines
package/sysdig/sysdig.mk new file +10
-0+# 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
In order to make sure the kernel driver is actually cross compiling with buildroot's kernel I had to add the following:
SYSDIG_MAKE_ENV = KERNELDIR="$(LINUX_SRCDIR)" \
LINUX_MAKE_FLAGS='$(LINUX_MAKE_FLAGS)'(Note: spacing should be a tab).
package/sysdig/sysdig.mk line 13
Quoted 1 line
package/sysdig/sysdig.mk new file +1
-0+SYSDIG_DEPENDENCIES = zlib luajit libjson linux
I think your dependancy should be on 'jsoncpp' instead of libjson. I was unable to detect jsoncpp in the configure step when just running:
'make sysdig'
package/sysdig/sysdig.mk line 16
Quoted 3 lines
package/sysdig/sysdig.mk new file +3
-0+SYSDIG_SUPPORTS_IN_SOURCE_BUILD = NO + +$(eval $(cmake-package))
Thanks,
-Ryan
Signature · 5 lines
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
PATCH v8 1/1 package/sysdig: New package
Dear Ryan Barnett,
2015-03-25 22:56 GMT+01:00 Ryan Barnett <[email protected]>:
Quoted 85 lines
Angelo,
Sorry for the noise before I have now had a change to actually download and try your patch out. Please see the issues that I have had when just doing a build with 'make sysdig'
Quoted 12 lines · Angelo Compagnucci
package/sysdig/0001-makefile-driver-compile-options.patch new file +5
-0@@ -0,0 +1,23 @@ +Updated Makefile compile options + +This patch updates linux kernel module (driver) of sysdig to be +compatible with buildroot compile flags. +package/sysdig/0001-makefile-driver-compile-options.patch line 15
Quoted 10 lines
package/sysdig/0001-makefile-driver-compile-options.patch new file +10
-0+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) modulesThis doesn't work because when I do a build and run file on the .ko I get the following:
$ file build/sysdig-0.1.99/buildroot-build/driver/sysdig-probe.ko build/sysdig-0.1.99/buildroot-build/driver/sysdig-probe.ko: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), BuildID[sha1]=0ea061af98e9fd2b5ba04d2be1c309833a20217a, not strippedMy target was a Cortex-A5 (arm 32-bit LE). So this patch isn't working because I think KERNELDIR is being set by above to /lib/modules$(shell uname -r)/build
So in order to use this patch with buildroot we need to modify the sysdig.mk in order to make this work.
Quoted 8 lines
package/sysdig/0001-makefile-driver-compile-options.patch new file +8
-0+ + 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[...]
Quoted 8 lines
package/sysdig/sysdig.mk new file +2
-0@@ -0,0 +1,16 @@ +################################################################################ +#package/sysdig/sysdig.mk line 12
Quoted 10 lines
package/sysdig/sysdig.mk new file +10
-0+# 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=OFFIn order to make sure the kernel driver is actually cross compiling with buildroot's kernel I had to add the following:
SYSDIG_MAKE_ENV = KERNELDIR="$(LINUX_SRCDIR)" \ LINUX_MAKE_FLAGS='$(LINUX_MAKE_FLAGS)'(Note: spacing should be a tab).
Quoted 6 lines
package/sysdig/sysdig.mk line 13
Quoted 1 line
package/sysdig/sysdig.mk new file +1
-0+SYSDIG_DEPENDENCIES = zlib luajit libjson linuxI think your dependancy should be on 'jsoncpp' instead of libjson. I was unable to detect jsoncpp in the configure step when just running:
'make sysdig'
I submitted and updated patch addressing these issues. I tested the patch several time and now it should work like expected.
Quoted 14 lines
package/sysdig/sysdig.mk line 16
Quoted 4 lines
package/sysdig/sysdig.mk new file +3
-0+SYSDIG_SUPPORTS_IN_SOURCE_BUILD = NO + +$(eval $(cmake-package))Thanks,
-Ryan--
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
Signature · 1 line
Profile: http://it.linkedin.com/in/compagnucciangelo