All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/3] package/netdata: new package
@ 2019-10-28 16:14 Marcin Niestroj
  2019-10-28 16:14 ` [Buildroot] [PATCH 2/3] support/testing: add netdata test Marcin Niestroj
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Marcin Niestroj @ 2019-10-28 16:14 UTC (permalink / raw)
  To: buildroot

Always provide --disable-dbengine configuration option, because we do
not support libjudy dependency that is required otherwise.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
---
 package/Config.in            |  1 +
 package/netdata/Config.in    | 24 ++++++++++++++++++++++++
 package/netdata/netdata.hash |  3 +++
 package/netdata/netdata.mk   | 15 +++++++++++++++
 4 files changed, 43 insertions(+)
 create mode 100644 package/netdata/Config.in
 create mode 100644 package/netdata/netdata.hash
 create mode 100644 package/netdata/netdata.mk

diff --git a/package/Config.in b/package/Config.in
index a1ac5069aa..e1e72beb2e 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1875,6 +1875,7 @@ menu "Miscellaneous"
 	source "package/linux-syscall-support/Config.in"
 	source "package/mcrypt/Config.in"
 	source "package/mobile-broadband-provider-info/Config.in"
+	source "package/netdata/Config.in"
 	source "package/proj/Config.in"
 	source "package/qemu/Config.in"
 	source "package/qpdf/Config.in"
diff --git a/package/netdata/Config.in b/package/netdata/Config.in
new file mode 100644
index 0000000000..622f63e84a
--- /dev/null
+++ b/package/netdata/Config.in
@@ -0,0 +1,24 @@
+config BR2_PACKAGE_NETDATA
+	bool "netdata"
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # json-c and libuv
+	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # libuv -> pthread_barrier_*
+	depends on BR2_USE_MMU # libuv -> fork()
+	depends on !BR2_STATIC_LIBS # libuv
+	select BR2_PACKAGE_JSON_C
+	select BR2_PACKAGE_LIBUV
+	select BR2_PACKAGE_LZ4
+	select BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_UTIL_LINUX
+	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
+	help
+	  Netdata is distributed, real-time, performance and health
+	  monitoring for systems and applications. It is a highly
+	  optimized monitoring agent you install on all your systems and
+	  containers.
+
+	  https://github.com/netdata/netdata
+
+comment "netdata needs a toolchain w/ NPTL, dynamic library"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS
+	depends on BR2_USE_MMU
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4
diff --git a/package/netdata/netdata.hash b/package/netdata/netdata.hash
new file mode 100644
index 0000000000..e3147a4af5
--- /dev/null
+++ b/package/netdata/netdata.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 c788ec01f5228768cbf5032324e041defbac3aaa57a074b98038444fc46ba2d4  netdata-1.18.1.tar.gz
+sha256 0e5fd9d833efe9b79f784d1903281554af82d1b4261af67d35455728e5572aa6  LICENSE
diff --git a/package/netdata/netdata.mk b/package/netdata/netdata.mk
new file mode 100644
index 0000000000..ddef56c74d
--- /dev/null
+++ b/package/netdata/netdata.mk
@@ -0,0 +1,15 @@
+################################################################################
+#
+# netdata
+#
+################################################################################
+
+NETDATA_VERSION = 1.18.1
+NETDATA_SITE = $(call github,netdata,netdata,v$(NETDATA_VERSION))
+NETDATA_LICENSE = GPL-3.0
+NETDATA_LICENSE_FILES = LICENSE
+NETDATA_DEPENDENCIES = json-c libuv lz4 util-linux
+NETDATA_AUTORECONF = YES
+NETDATA_CONF_OPTS = --disable-dbengine
+
+$(eval $(autotools-package))
-- 
2.23.0

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH 2/3] support/testing: add netdata test
  2019-10-28 16:14 [Buildroot] [PATCH 1/3] package/netdata: new package Marcin Niestroj
@ 2019-10-28 16:14 ` Marcin Niestroj
  2019-10-28 22:21   ` Matthew Weber
  2019-10-28 16:14 ` [Buildroot] [PATCH 3/3] DEVELOPERS: add Marcin Niestroj for netdata Marcin Niestroj
  2019-10-28 22:39 ` [Buildroot] [PATCH 1/3] package/netdata: new package Matthew Weber
  2 siblings, 1 reply; 11+ messages in thread
From: Marcin Niestroj @ 2019-10-28 16:14 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
---
 .gitlab-ci.yml                                |  1 +
 support/testing/tests/package/test_netdata.py | 35 +++++++++++++++++++
 2 files changed, 36 insertions(+)
 create mode 100644 support/testing/tests/package/test_netdata.py

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1d71257a20..2e164d8800 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -411,6 +411,7 @@ tests.package.test_luasyslog.TestLuaLuasyslog: { extends: .runtime_test }
 tests.package.test_luasyslog.TestLuajitLuasyslog: { extends: .runtime_test }
 tests.package.test_luvi.TestLuvi: { extends: .runtime_test }
 tests.package.test_lzlib.TestLuaLzlib: { extends: .runtime_test }
+tests.package.test_netdata.TestNetdata: { extends: .runtime_test }
 tests.package.test_openjdk.TestOpenJdk: { extends: .runtime_test }
 tests.package.test_perl.TestPerl: { extends: .runtime_test }
 tests.package.test_perl_class_load.TestPerlClassLoad: { extends: .runtime_test }
diff --git a/support/testing/tests/package/test_netdata.py b/support/testing/tests/package/test_netdata.py
new file mode 100644
index 0000000000..b5437ba3fe
--- /dev/null
+++ b/support/testing/tests/package/test_netdata.py
@@ -0,0 +1,35 @@
+import os
+
+import infra.basetest
+
+
+class TestNetdata(infra.basetest.BRTest):
+    config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+        """
+        BR2_PACKAGE_NETDATA=y
+        BR2_TARGET_ROOTFS_CPIO=y
+        # BR2_TARGET_ROOTFS_TAR is not set
+        """
+
+    def test_run(self):
+        cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio")
+        self.emulator.boot(arch="armv5",
+                           kernel="builtin",
+                           options=["-initrd", cpio_file])
+        self.emulator.login()
+
+        cmd = "mkdir -p /var/cache/netdata"
+        _, exit_code = self.emulator.run(cmd)
+        self.assertEqual(exit_code, 0)
+
+        cmd = "netdata -u root -p 80"
+        _, exit_code = self.emulator.run(cmd)
+        self.assertEqual(exit_code, 0)
+
+        cmd = "sleep 1"
+        _, exit_code = self.emulator.run(cmd)
+        self.assertEqual(exit_code, 0)
+
+        cmd = "wget localhost -O - | grep '<title>netdata dashboard</title>'"
+        _, exit_code = self.emulator.run(cmd)
+        self.assertEqual(exit_code, 0)
-- 
2.23.0

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH 3/3] DEVELOPERS: add Marcin Niestroj for netdata
  2019-10-28 16:14 [Buildroot] [PATCH 1/3] package/netdata: new package Marcin Niestroj
  2019-10-28 16:14 ` [Buildroot] [PATCH 2/3] support/testing: add netdata test Marcin Niestroj
@ 2019-10-28 16:14 ` Marcin Niestroj
  2019-10-28 22:57   ` Arnout Vandecappelle
  2019-10-28 22:39 ` [Buildroot] [PATCH 1/3] package/netdata: new package Matthew Weber
  2 siblings, 1 reply; 11+ messages in thread
From: Marcin Niestroj @ 2019-10-28 16:14 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
---
 DEVELOPERS | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/DEVELOPERS b/DEVELOPERS
index f41ac5f096..8658686023 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1457,8 +1457,10 @@ F:	package/lua-flu/
 F:	package/lua-stdlib/
 F:	package/luaossl/
 F:	package/murata-cyw-fw/
+F:	package/netdata/
 F:	package/rs485conf/
 F:	package/turbolua/
+F:	support/testing/tests/package/test_netdata.py
 
 N:	Marcus Folkesson <marcus.folkesson@gmail.com>
 F:	package/libostree/
-- 
2.23.0

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH 2/3] support/testing: add netdata test
  2019-10-28 16:14 ` [Buildroot] [PATCH 2/3] support/testing: add netdata test Marcin Niestroj
@ 2019-10-28 22:21   ` Matthew Weber
  2019-10-30  9:31     ` Marcin Niestrój
  0 siblings, 1 reply; 11+ messages in thread
From: Matthew Weber @ 2019-10-28 22:21 UTC (permalink / raw)
  To: buildroot

Marcin,

On Mon, Oct 28, 2019 at 11:14 AM Marcin Niestroj
<m.niestroj@grinn-global.com> wrote:
>
> Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>

$ ./support/testing/run-tests -d dl -k -o test_build_runtest
tests.package.test_netdata.TestNetdata
17:11:55 TestNetdata                              Starting
17:11:57 TestNetdata                              Building
E
======================================================================
ERROR: test_run (tests.package.test_netdata.TestNetdata)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/user/tmp.X4roUERz2n-buildroot/support/testing/infra/basetest.py",
line 77, in setUp
    self.b.build()
  File "/home/user/tmp.X4roUERz2n-buildroot/support/testing/infra/builder.py",
line 75, in build
    raise SystemError("Build failed")
SystemError: Build failed

----------------------------------------------------------------------
Ran 1 test in 250.961s

FAILED (errors=1)

When I look at the build log, here's the last 20 lines.

 /usr/bin/install -c -m 644 packaging/installer/.keep
'/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/target/var/lib/netdata/registry'
 /usr/bin/install -c -m 644 packaging/installer/.keep
'/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/target/var/cache/netdata'
 /usr/bin/install -c -m 644 packaging/installer/.keep
'/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/target/var/lib/netdata'
  /usr/bin/install -c netdata
'/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/target/usr/sbin'
/usr/bin/install: cannot create regular file
'/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/target/var/log/netdata/.keep':
File exists
  /usr/bin/install -c apps.plugin cgroup-network perf.plugin
slabinfo.plugin
'/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/target/usr/libexec/netdata/plugins.d'
Makefile:3319: recipe for target 'install-dist_logDATA' failed
make[5]: *** [install-dist_logDATA] Error 1
make[5]: *** Waiting for unfinished jobs....
Makefile:3864: recipe for target 'install-am' failed
make[4]: *** [install-am] Error 2
Makefile:3389: recipe for target 'install-recursive' failed
make[3]: *** [install-recursive] Error 1
Makefile:3858: recipe for target 'install' failed
make[2]: *** [install] Error 2
package/pkg-generic.mk:331: recipe for target
'/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/build/netdata-1.18.1/.stamp_target_installed'
failed
make[1]: *** [/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/build/netdata-1.18.1/.stamp_target_installed]
Error 2
Makefile:23: recipe for target '_all' failed
make: *** [_all] Error 2
make: Leaving directory
'/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata'

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH 1/3] package/netdata: new package
  2019-10-28 16:14 [Buildroot] [PATCH 1/3] package/netdata: new package Marcin Niestroj
  2019-10-28 16:14 ` [Buildroot] [PATCH 2/3] support/testing: add netdata test Marcin Niestroj
  2019-10-28 16:14 ` [Buildroot] [PATCH 3/3] DEVELOPERS: add Marcin Niestroj for netdata Marcin Niestroj
@ 2019-10-28 22:39 ` Matthew Weber
  2 siblings, 0 replies; 11+ messages in thread
From: Matthew Weber @ 2019-10-28 22:39 UTC (permalink / raw)
  To: buildroot

Marcin,

On Mon, Oct 28, 2019 at 11:14 AM Marcin Niestroj
<m.niestroj@grinn-global.com> wrote:
>
> Always provide --disable-dbengine configuration option, because we do
> not support libjudy dependency that is required otherwise.
>
> Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
> ---
>  package/Config.in            |  1 +
>  package/netdata/Config.in    | 24 ++++++++++++++++++++++++
>  package/netdata/netdata.hash |  3 +++
>  package/netdata/netdata.mk   | 15 +++++++++++++++
>  4 files changed, 43 insertions(+)
>  create mode 100644 package/netdata/Config.in
>  create mode 100644 package/netdata/netdata.hash
>  create mode 100644 package/netdata/netdata.mk
>
> diff --git a/package/Config.in b/package/Config.in
> index a1ac5069aa..e1e72beb2e 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -1875,6 +1875,7 @@ menu "Miscellaneous"
>         source "package/linux-syscall-support/Config.in"
>         source "package/mcrypt/Config.in"
>         source "package/mobile-broadband-provider-info/Config.in"
> +       source "package/netdata/Config.in"
>         source "package/proj/Config.in"
>         source "package/qemu/Config.in"
>         source "package/qpdf/Config.in"
> diff --git a/package/netdata/Config.in b/package/netdata/Config.in
> new file mode 100644
> index 0000000000..622f63e84a
> --- /dev/null
> +++ b/package/netdata/Config.in
> @@ -0,0 +1,24 @@
> +config BR2_PACKAGE_NETDATA
> +       bool "netdata"
> +       depends on BR2_TOOLCHAIN_HAS_SYNC_4 # json-c and libuv
> +       depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # libuv -> pthread_barrier_*
> +       depends on BR2_USE_MMU # libuv -> fork()
> +       depends on !BR2_STATIC_LIBS # libuv
> +       select BR2_PACKAGE_JSON_C
> +       select BR2_PACKAGE_LIBUV
> +       select BR2_PACKAGE_LZ4
> +       select BR2_PACKAGE_OPENSSL
> +       select BR2_PACKAGE_UTIL_LINUX
> +       select BR2_PACKAGE_UTIL_LINUX_LIBUUID
> +       help
> +         Netdata is distributed, real-time, performance and health
> +         monitoring for systems and applications. It is a highly
> +         optimized monitoring agent you install on all your systems and
> +         containers.
> +
> +         https://github.com/netdata/netdata
> +
> +comment "netdata needs a toolchain w/ NPTL, dynamic library"
> +       depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS
> +       depends on BR2_USE_MMU
> +       depends on BR2_TOOLCHAIN_HAS_SYNC_4
> diff --git a/package/netdata/netdata.hash b/package/netdata/netdata.hash
> new file mode 100644
> index 0000000000..e3147a4af5
> --- /dev/null
> +++ b/package/netdata/netdata.hash
> @@ -0,0 +1,3 @@
> +# Locally calculated
> +sha256 c788ec01f5228768cbf5032324e041defbac3aaa57a074b98038444fc46ba2d4  netdata-1.18.1.tar.gz
> +sha256 0e5fd9d833efe9b79f784d1903281554af82d1b4261af67d35455728e5572aa6  LICENSE
> diff --git a/package/netdata/netdata.mk b/package/netdata/netdata.mk
> new file mode 100644
> index 0000000000..ddef56c74d
> --- /dev/null
> +++ b/package/netdata/netdata.mk
> @@ -0,0 +1,15 @@
> +################################################################################
> +#
> +# netdata
> +#
> +################################################################################
> +
> +NETDATA_VERSION = 1.18.1
> +NETDATA_SITE = $(call github,netdata,netdata,v$(NETDATA_VERSION))
> +NETDATA_LICENSE = GPL-3.0
> +NETDATA_LICENSE_FILES = LICENSE
> +NETDATA_DEPENDENCIES = json-c libuv lz4 util-linux

With the select of openssl in the Config.in a matching openssl should
be in the make dependencies list.

> +NETDATA_AUTORECONF = YES

Suggest adding a comment above this autoreconf stating why.  Something like
# netdata's source code is released without a generated configure script

> +NETDATA_CONF_OPTS = --disable-dbengine

 $ ./utils/test-pkg -p netdata -k -d  testbuild
                             br-arm-full [1/6]: OK
                  br-arm-cortex-a9-glibc [2/6]: OK
                   br-arm-cortex-m4-full [3/6]: SKIPPED
                          br-x86-64-musl [4/6]: OK
                      br-arm-full-static [5/6]: SKIPPED
                            sourcery-arm [6/6]: OK
6 builds, 2 skipped, 0 build failed, 0 legal-info failed

Regards,
Matt

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH 3/3] DEVELOPERS: add Marcin Niestroj for netdata
  2019-10-28 16:14 ` [Buildroot] [PATCH 3/3] DEVELOPERS: add Marcin Niestroj for netdata Marcin Niestroj
@ 2019-10-28 22:57   ` Arnout Vandecappelle
  2019-10-29 20:25     ` Marcin Niestrój
  0 siblings, 1 reply; 11+ messages in thread
From: Arnout Vandecappelle @ 2019-10-28 22:57 UTC (permalink / raw)
  To: buildroot



On 28/10/2019 17:14, Marcin Niestroj wrote:
> Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
> ---
>  DEVELOPERS | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/DEVELOPERS b/DEVELOPERS
> index f41ac5f096..8658686023 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -1457,8 +1457,10 @@ F:	package/lua-flu/
>  F:	package/lua-stdlib/
>  F:	package/luaossl/
>  F:	package/murata-cyw-fw/
> +F:	package/netdata/
>  F:	package/rs485conf/
>  F:	package/turbolua/
> +F:	support/testing/tests/package/test_netdata.py

 These DEVELOPERS changes should be together with the patches adding the
respective files.

 Only when you add yourself as a developer for an already existing package it
should be a separate patch, because in that case the addition to DEVELOPERS will
be backported to the stable branches. For new packages (or tests), they don't
exist on the stable branches, so backporting makes no sense.

 I normally would have fixed that up while applying, but since Matt asked for
changes, I thought you could include that as well.

 Regards,
 Arnout

>  
>  N:	Marcus Folkesson <marcus.folkesson@gmail.com>
>  F:	package/libostree/
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH 3/3] DEVELOPERS: add Marcin Niestroj for netdata
  2019-10-28 22:57   ` Arnout Vandecappelle
@ 2019-10-29 20:25     ` Marcin Niestrój
  0 siblings, 0 replies; 11+ messages in thread
From: Marcin Niestrój @ 2019-10-29 20:25 UTC (permalink / raw)
  To: buildroot


Arnout Vandecappelle <arnout@mind.be> writes:

>
>  These DEVELOPERS changes should be together with the patches adding the
> respective files.
>
>  Only when you add yourself as a developer for an already existing package it
> should be a separate patch, because in that case the addition to DEVELOPERS will
> be backported to the stable branches. For new packages (or tests), they don't
> exist on the stable branches, so backporting makes no sense.
>
>  I normally would have fixed that up while applying, but since Matt asked for
> changes, I thought you could include that as well.

This information will be helpful in future contribution, so thanks for
explaining!

-- 
Regards,
Marcin Niestr?j

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH 2/3] support/testing: add netdata test
  2019-10-28 22:21   ` Matthew Weber
@ 2019-10-30  9:31     ` Marcin Niestrój
  2019-10-30  9:54       ` [Buildroot] [External] " Matthew Weber
  0 siblings, 1 reply; 11+ messages in thread
From: Marcin Niestrój @ 2019-10-30  9:31 UTC (permalink / raw)
  To: buildroot

Hi Matt,

Matthew Weber <matthew.weber@collins.com> writes:

> Marcin,
>
> On Mon, Oct 28, 2019 at 11:14 AM Marcin Niestroj
> <m.niestroj@grinn-global.com> wrote:
>>
>> Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
>
> $ ./support/testing/run-tests -d dl -k -o test_build_runtest
> tests.package.test_netdata.TestNetdata
> 17:11:55 TestNetdata                              Starting
> 17:11:57 TestNetdata                              Building
> E
> ======================================================================
> ERROR: test_run (tests.package.test_netdata.TestNetdata)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/home/user/tmp.X4roUERz2n-buildroot/support/testing/infra/basetest.py",
> line 77, in setUp
>     self.b.build()
>   File "/home/user/tmp.X4roUERz2n-buildroot/support/testing/infra/builder.py",
> line 75, in build
>     raise SystemError("Build failed")
> SystemError: Build failed
>
> ----------------------------------------------------------------------
> Ran 1 test in 250.961s
>
> FAILED (errors=1)
>
> When I look at the build log, here's the last 20 lines.
>
>  /usr/bin/install -c -m 644 packaging/installer/.keep
> '/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/target/var/lib/netdata/registry'
>  /usr/bin/install -c -m 644 packaging/installer/.keep
> '/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/target/var/cache/netdata'
>  /usr/bin/install -c -m 644 packaging/installer/.keep
> '/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/target/var/lib/netdata'
>   /usr/bin/install -c netdata
> '/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/target/usr/sbin'
> /usr/bin/install: cannot create regular file
> '/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/target/var/log/netdata/.keep':
> File exists
>   /usr/bin/install -c apps.plugin cgroup-network perf.plugin
> slabinfo.plugin
> '/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/target/usr/libexec/netdata/plugins.d'
> Makefile:3319: recipe for target 'install-dist_logDATA' failed
> make[5]: *** [install-dist_logDATA] Error 1
> make[5]: *** Waiting for unfinished jobs....
> Makefile:3864: recipe for target 'install-am' failed
> make[4]: *** [install-am] Error 2
> Makefile:3389: recipe for target 'install-recursive' failed
> make[3]: *** [install-recursive] Error 1
> Makefile:3858: recipe for target 'install' failed
> make[2]: *** [install] Error 2
> package/pkg-generic.mk:331: recipe for target
> '/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/build/netdata-1.18.1/.stamp_target_installed'
> failed
> make[1]: *** [/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/build/netdata-1.18.1/.stamp_target_installed]
> Error 2
> Makefile:23: recipe for target '_all' failed
> make: *** [_all] Error 2
> make: Leaving directory
> '/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata'

First of all thank you for review and testing this package!

Howeve I was not able to reproduce this issue on my PC as well as inside
Docker image for Gitlab CI. What I understand from the logs is that
'cannot create regular file' is the reason for failure. But I still have
no clue why this file could not be created... In the meantime I will
send v2 of this patch series. Do you have some idea what could go wrong
with your test build?

-- 
Marcin Niestr?j

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] [External] Re: [PATCH 2/3] support/testing: add netdata test
  2019-10-30  9:31     ` Marcin Niestrój
@ 2019-10-30  9:54       ` Matthew Weber
  2019-10-30 12:19         ` Matthew Weber
  0 siblings, 1 reply; 11+ messages in thread
From: Matthew Weber @ 2019-10-30  9:54 UTC (permalink / raw)
  To: buildroot

Marcin,

On Wed, Oct 30, 2019 at 4:31 AM Marcin Niestr?j
<m.niestroj@grinn-global.com> wrote:
>
> Hi Matt,
>
> Matthew Weber <matthew.weber@collins.com> writes:
>
> > Marcin,
> >
> > On Mon, Oct 28, 2019 at 11:14 AM Marcin Niestroj
> > <m.niestroj@grinn-global.com> wrote:
> >>
> >> Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
> >
> > $ ./support/testing/run-tests -d dl -k -o test_build_runtest
> > tests.package.test_netdata.TestNetdata
> > 17:11:55 TestNetdata                              Starting
> > 17:11:57 TestNetdata                              Building
> > E
> > ======================================================================
> > ERROR: test_run (tests.package.test_netdata.TestNetdata)
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> >   File "/home/user/tmp.X4roUERz2n-buildroot/support/testing/infra/basetest.py",
> > line 77, in setUp
> >     self.b.build()
> >   File "/home/user/tmp.X4roUERz2n-buildroot/support/testing/infra/builder.py",
> > line 75, in build
> >     raise SystemError("Build failed")
> > SystemError: Build failed
> >
> > ----------------------------------------------------------------------
> > Ran 1 test in 250.961s
> >
> > FAILED (errors=1)
> >
> > When I look at the build log, here's the last 20 lines.
> >
> >  /usr/bin/install -c -m 644 packaging/installer/.keep
> > '/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/target/var/lib/netdata/registry'
> >  /usr/bin/install -c -m 644 packaging/installer/.keep
> > '/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/target/var/cache/netdata'
> >  /usr/bin/install -c -m 644 packaging/installer/.keep
> > '/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/target/var/lib/netdata'
> >   /usr/bin/install -c netdata
> > '/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/target/usr/sbin'
> > /usr/bin/install: cannot create regular file
> > '/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/target/var/log/netdata/.keep':
> > File exists
> >   /usr/bin/install -c apps.plugin cgroup-network perf.plugin
> > slabinfo.plugin
> > '/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/target/usr/libexec/netdata/plugins.d'
> > Makefile:3319: recipe for target 'install-dist_logDATA' failed
> > make[5]: *** [install-dist_logDATA] Error 1
> > make[5]: *** Waiting for unfinished jobs....
> > Makefile:3864: recipe for target 'install-am' failed
> > make[4]: *** [install-am] Error 2
> > Makefile:3389: recipe for target 'install-recursive' failed
> > make[3]: *** [install-recursive] Error 1
> > Makefile:3858: recipe for target 'install' failed
> > make[2]: *** [install] Error 2
> > package/pkg-generic.mk:331: recipe for target
> > '/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/build/netdata-1.18.1/.stamp_target_installed'
> > failed
> > make[1]: *** [/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/build/netdata-1.18.1/.stamp_target_installed]
> > Error 2
> > Makefile:23: recipe for target '_all' failed
> > make: *** [_all] Error 2
> > make: Leaving directory
> > '/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata'
>
> First of all thank you for review and testing this package!

Np, this one had been on my list for awhile to add.  Thanks for sending it!

>
> Howeve I was not able to reproduce this issue on my PC as well as inside
> Docker image for Gitlab CI. What I understand from the logs is that
> 'cannot create regular file' is the reason for failure. But I still have
> no clue why this file could not be created... In the meantime I will
> send v2 of this patch series. Do you have some idea what could go wrong

> with your test build?

I'll kick off a build and see what I can figure out.  My buildmachine info....
gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
GNU Make 4.1

Regards,
Matt

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] [External] Re: [PATCH 2/3] support/testing: add netdata test
  2019-10-30  9:54       ` [Buildroot] [External] " Matthew Weber
@ 2019-10-30 12:19         ` Matthew Weber
  2019-10-30 14:07           ` Matthew Weber
  0 siblings, 1 reply; 11+ messages in thread
From: Matthew Weber @ 2019-10-30 12:19 UTC (permalink / raw)
  To: buildroot

Marcin,

On Wed, Oct 30, 2019 at 4:54 AM Matthew Weber <matthew.weber@collins.com> wrote:
>
> Marcin,
>
> On Wed, Oct 30, 2019 at 4:31 AM Marcin Niestr?j
> <m.niestroj@grinn-global.com> wrote:
> >
> > Hi Matt,
> >
> > Matthew Weber <matthew.weber@collins.com> writes:
> >
> > > Marcin,
> > >
> > > On Mon, Oct 28, 2019 at 11:14 AM Marcin Niestroj
> > > <m.niestroj@grinn-global.com> wrote:
> > >>
> > >> Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
> > >
> > > $ ./support/testing/run-tests -d dl -k -o test_build_runtest
> > > tests.package.test_netdata.TestNetdata
> > > 17:11:55 TestNetdata                              Starting
> > > 17:11:57 TestNetdata                              Building
> > > E
> > > ======================================================================
> > > ERROR: test_run (tests.package.test_netdata.TestNetdata)
> > > ----------------------------------------------------------------------
> > > Traceback (most recent call last):
> > >   File "/home/user/tmp.X4roUERz2n-buildroot/support/testing/infra/basetest.py",
> > > line 77, in setUp
> > >     self.b.build()
> > >   File "/home/user/tmp.X4roUERz2n-buildroot/support/testing/infra/builder.py",
> > > line 75, in build
> > >     raise SystemError("Build failed")
> > > SystemError: Build failed
> > >
> > > ----------------------------------------------------------------------
> > > Ran 1 test in 250.961s
> > >
> > > FAILED (errors=1)
> > >
> > > When I look at the build log, here's the last 20 lines.
> > >
> > >  /usr/bin/install -c -m 644 packaging/installer/.keep
> > > '/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/target/var/lib/netdata/registry'
> > >  /usr/bin/install -c -m 644 packaging/installer/.keep
> > > '/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/target/var/cache/netdata'
> > >  /usr/bin/install -c -m 644 packaging/installer/.keep
> > > '/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/target/var/lib/netdata'
> > >   /usr/bin/install -c netdata
> > > '/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/target/usr/sbin'
> > > /usr/bin/install: cannot create regular file
> > > '/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/target/var/log/netdata/.keep':
> > > File exists
> > >   /usr/bin/install -c apps.plugin cgroup-network perf.plugin
> > > slabinfo.plugin
> > > '/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/target/usr/libexec/netdata/plugins.d'
> > > Makefile:3319: recipe for target 'install-dist_logDATA' failed
> > > make[5]: *** [install-dist_logDATA] Error 1
> > > make[5]: *** Waiting for unfinished jobs....
> > > Makefile:3864: recipe for target 'install-am' failed
> > > make[4]: *** [install-am] Error 2
> > > Makefile:3389: recipe for target 'install-recursive' failed
> > > make[3]: *** [install-recursive] Error 1
> > > Makefile:3858: recipe for target 'install' failed
> > > make[2]: *** [install] Error 2
> > > package/pkg-generic.mk:331: recipe for target
> > > '/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/build/netdata-1.18.1/.stamp_target_installed'
> > > failed
> > > make[1]: *** [/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/build/netdata-1.18.1/.stamp_target_installed]
> > > Error 2
> > > Makefile:23: recipe for target '_all' failed
> > > make: *** [_all] Error 2
> > > make: Leaving directory
> > > '/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata'
> >
> > First of all thank you for review and testing this package!
>
> Np, this one had been on my list for awhile to add.  Thanks for sending it!
>
> >
> > Howeve I was not able to reproduce this issue on my PC as well as inside
> > Docker image for Gitlab CI. What I understand from the logs is that
> > 'cannot create regular file' is the reason for failure. But I still have
> > no clue why this file could not be created... In the meantime I will
> > send v2 of this patch series. Do you have some idea what could go wrong
>
> > with your test build?
>
> I'll kick off a build and see what I can figure out.  My buildmachine info....
> gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
> GNU Make 4.1
>

It looks to be a race condition, have you ran a series of run tests
one after another removing the build folder between each?

Matt

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] [External] Re: [PATCH 2/3] support/testing: add netdata test
  2019-10-30 12:19         ` Matthew Weber
@ 2019-10-30 14:07           ` Matthew Weber
  0 siblings, 0 replies; 11+ messages in thread
From: Matthew Weber @ 2019-10-30 14:07 UTC (permalink / raw)
  To: buildroot

Marcin,

On Wed, Oct 30, 2019 at 7:19 AM Matthew Weber <matthew.weber@collins.com> wrote:
>
> Marcin,
>
> On Wed, Oct 30, 2019 at 4:54 AM Matthew Weber <matthew.weber@collins.com> wrote:
> >
> > Marcin,
> >
> > On Wed, Oct 30, 2019 at 4:31 AM Marcin Niestr?j
> > <m.niestroj@grinn-global.com> wrote:
> > >
> > > Hi Matt,
> > >
> > > Matthew Weber <matthew.weber@collins.com> writes:
> > >
> > > > Marcin,
> > > >
> > > > On Mon, Oct 28, 2019 at 11:14 AM Marcin Niestroj
> > > > <m.niestroj@grinn-global.com> wrote:
> > > >>
> > > >> Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
> > > >
> > > > $ ./support/testing/run-tests -d dl -k -o test_build_runtest
> > > > tests.package.test_netdata.TestNetdata
> > > > 17:11:55 TestNetdata                              Starting
> > > > 17:11:57 TestNetdata                              Building
> > > > E
> > > > ======================================================================
> > > > ERROR: test_run (tests.package.test_netdata.TestNetdata)
> > > > ----------------------------------------------------------------------
> > > > Traceback (most recent call last):
> > > >   File "/home/user/tmp.X4roUERz2n-buildroot/support/testing/infra/basetest.py",
> > > > line 77, in setUp
> > > >     self.b.build()
> > > >   File "/home/user/tmp.X4roUERz2n-buildroot/support/testing/infra/builder.py",
> > > > line 75, in build
> > > >     raise SystemError("Build failed")
> > > > SystemError: Build failed
> > > >
> > > > ----------------------------------------------------------------------
> > > > Ran 1 test in 250.961s
> > > >
> > > > FAILED (errors=1)
> > > >
> > > > When I look at the build log, here's the last 20 lines.
> > > >
> > > >  /usr/bin/install -c -m 644 packaging/installer/.keep
> > > > '/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/target/var/lib/netdata/registry'
> > > >  /usr/bin/install -c -m 644 packaging/installer/.keep
> > > > '/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/target/var/cache/netdata'
> > > >  /usr/bin/install -c -m 644 packaging/installer/.keep
> > > > '/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/target/var/lib/netdata'
> > > >   /usr/bin/install -c netdata
> > > > '/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/target/usr/sbin'
> > > > /usr/bin/install: cannot create regular file
> > > > '/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/target/var/log/netdata/.keep':
> > > > File exists
> > > >   /usr/bin/install -c apps.plugin cgroup-network perf.plugin
> > > > slabinfo.plugin
> > > > '/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/target/usr/libexec/netdata/plugins.d'
> > > > Makefile:3319: recipe for target 'install-dist_logDATA' failed
> > > > make[5]: *** [install-dist_logDATA] Error 1
> > > > make[5]: *** Waiting for unfinished jobs....
> > > > Makefile:3864: recipe for target 'install-am' failed
> > > > make[4]: *** [install-am] Error 2
> > > > Makefile:3389: recipe for target 'install-recursive' failed
> > > > make[3]: *** [install-recursive] Error 1
> > > > Makefile:3858: recipe for target 'install' failed
> > > > make[2]: *** [install] Error 2
> > > > package/pkg-generic.mk:331: recipe for target
> > > > '/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/build/netdata-1.18.1/.stamp_target_installed'
> > > > failed
> > > > make[1]: *** [/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata/build/netdata-1.18.1/.stamp_target_installed]
> > > > Error 2
> > > > Makefile:23: recipe for target '_all' failed
> > > > make: *** [_all] Error 2
> > > > make: Leaving directory
> > > > '/home/user/tmp.X4roUERz2n-buildroot/test_build_runtest/TestNetdata'
> > >
> > > First of all thank you for review and testing this package!
> >
> > Np, this one had been on my list for awhile to add.  Thanks for sending it!
> >
> > >
> > > Howeve I was not able to reproduce this issue on my PC as well as inside
> > > Docker image for Gitlab CI. What I understand from the logs is that
> > > 'cannot create regular file' is the reason for failure. But I still have
> > > no clue why this file could not be created... In the meantime I will
> > > send v2 of this patch series. Do you have some idea what could go wrong
> >
> > > with your test build?
> >
> > I'll kick off a build and see what I can figure out.  My buildmachine info....
> > gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
> > GNU Make 4.1
> >
>
> It looks to be a race condition, have you ran a series of run tests
> one after another removing the build folder between each?

Figured it out, the installs are writing .keep files to locations that
are symlinked to /tmp in your target folder so the files would already
exist.  I think the way at this point to handle it would be to set the
cache or log dir to separate locations.  I noticed in configure they
would essentially point to the same spot because of that ../tmp
symlink you'd see if you ls -l $(TARGET_DIR)/var/.

(snippet from netdata's ./configure)
cachedir="${localstatedir}/lib/netdata/cache"
.....
logdir="${localstatedir}/log/netdata"

I'd probably create a patch against the configure.ac that creates a
new localcachedir variable that's set to localstatedir if not set by
the user.  Then we can redirect the cachedir location.  Or we could
remove the installs that are setting these folders up.  I'm not sure
which direction is preferred.  We might want to ask one of the
maintainers(Peter/Thomas/Arnout) for a preference as we'd have to
carry a patch in buildroot to remove the installs vs the additional
variable maybe upstreamable.

Matt

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-10-30 14:07 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-28 16:14 [Buildroot] [PATCH 1/3] package/netdata: new package Marcin Niestroj
2019-10-28 16:14 ` [Buildroot] [PATCH 2/3] support/testing: add netdata test Marcin Niestroj
2019-10-28 22:21   ` Matthew Weber
2019-10-30  9:31     ` Marcin Niestrój
2019-10-30  9:54       ` [Buildroot] [External] " Matthew Weber
2019-10-30 12:19         ` Matthew Weber
2019-10-30 14:07           ` Matthew Weber
2019-10-28 16:14 ` [Buildroot] [PATCH 3/3] DEVELOPERS: add Marcin Niestroj for netdata Marcin Niestroj
2019-10-28 22:57   ` Arnout Vandecappelle
2019-10-29 20:25     ` Marcin Niestrój
2019-10-28 22:39 ` [Buildroot] [PATCH 1/3] package/netdata: new package Matthew Weber

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.