diff mbox series

[v2,1/2] package/conmon: new package

Message ID 20230512002511.1356447-1-christian@aperture.us
State Superseded, archived
Headers show
Series [v2,1/2] package/conmon: new package | expand

Commit Message

Christian Stewart May 12, 2023, 12:25 a.m. UTC
Conmon is an OCI container runtime monitor.

https://github.com/containers/conmon

Dependency of podman.

Signed-off-by: Christian Stewart <christian@aperture.us>

---

v1 -> v2:

 - requires libglib2, host-pkgconf
 - bump version to 2.1.7

Signed-off-by: Christian Stewart <christian@aperture.us>
---
 DEVELOPERS                 |  1 +
 package/Config.in          |  1 +
 package/conmon/Config.in   | 15 +++++++++++++++
 package/conmon/conmon.hash |  3 +++
 package/conmon/conmon.mk   | 36 ++++++++++++++++++++++++++++++++++++
 5 files changed, 56 insertions(+)
 create mode 100644 package/conmon/Config.in
 create mode 100644 package/conmon/conmon.hash
 create mode 100644 package/conmon/conmon.mk

Comments

Joachim Wiberg May 17, 2023, 5:08 a.m. UTC | #1
Hi!

Here's a very quick review while trying out your patch to get podman
running.  Only a cursory glance, have not run check-package.

On Thu, May 11, 2023 at 17:25, Christian Stewart via buildroot <buildroot@buildroot.org> wrote:
> [snip]
> diff --git a/package/conmon/Config.in b/package/conmon/Config.in
> new file mode 100644
> index 0000000000..c4b428a541
> --- /dev/null
> +++ b/package/conmon/Config.in
> @@ -0,0 +1,15 @@
> +config BR2_PACKAGE_CONMON
> +	bool "conmon"
> +	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
> +	depends on BR2_USE_MMU # libglib2
> +	depends on BR2_USE_WCHAR # libglib2
> +	depends on !BR2_TOOLCHAIN_USES_UCLIBC # no fexecve

Shouldn't there also be a select BR2_PACKAGE_LIBGLIB2 here as well?

> +	help
> +	  Conmon is an OCI container runtime monitor.
> +
> +	  https://github.com/containers/conmon
> +
> +comment "conmon needs a glibc or musl toolchain w/ threads, wchar"
> +	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
> +		BR2_TOOLCHAIN_USES_UCLIBC
> +	depends on BR2_USE_MMU
> diff --git a/package/conmon/conmon.mk b/package/conmon/conmon.mk
> new file mode 100644
> index 0000000000..cda059042a
> --- /dev/null
> +++ b/package/conmon/conmon.mk
> @@ -0,0 +1,36 @@
> +################################################################################
> +#
> +# conmon
> +#
> +################################################################################
> +
> +CONMON_VERSION = 2.1.7
> +CONMON_SITE = $(call github,containers,conmon,v$(CONMON_VERSION))
> +CONMON_LICENSE = Apache-2.0
> +CONMON_LICENSE_FILES = LICENSE
> +
> +CONMON_DEPENDENCIES += host-pkgconf libglib2

The libglib2 dependency is listed here, so Config.in should select it, right?

> +
> +ifeq ($(BR2_PACKAGE_LIBSECCOMP),y)
> +CONMON_ENABLE_SECCOMP = 1
> +CONMON_DEPENDENCIES += libseccomp
> +else
> +CONMON_ENABLE_SECCOMP = 0
> +endif

Should be 0, 1 here, because 'echo 0' below enable LIBSECCOMP in conmon.

> +define CONMON_CONFIGURE_CMDS
> +	printf '#!/bin/bash\necho "$(CONMON_ENABLE_SECCOMP)"\n' > \
> +		$(@D)/hack/seccomp-notify.sh
> +	chmod +x $(@D)/hack/seccomp-notify.sh
> +endef

Best regards
 /Joachim
Yann E. MORIN May 21, 2023, 3:50 p.m. UTC | #2
Christian, All,

On 2023-05-11 17:25 -0700, Christian Stewart via buildroot spake thusly:
> Conmon is an OCI container runtime monitor.
> 
> https://github.com/containers/conmon
> 
> Dependency of podman.
> 
> Signed-off-by: Christian Stewart <christian@aperture.us>

You got comments from Joachin on both patches, so I marked them as
changes-requested.

Regards,
Yann E. MORIN.

> ---
> 
> v1 -> v2:
> 
>  - requires libglib2, host-pkgconf
>  - bump version to 2.1.7
> 
> Signed-off-by: Christian Stewart <christian@aperture.us>
> ---
>  DEVELOPERS                 |  1 +
>  package/Config.in          |  1 +
>  package/conmon/Config.in   | 15 +++++++++++++++
>  package/conmon/conmon.hash |  3 +++
>  package/conmon/conmon.mk   | 36 ++++++++++++++++++++++++++++++++++++
>  5 files changed, 56 insertions(+)
>  create mode 100644 package/conmon/Config.in
>  create mode 100644 package/conmon/conmon.hash
>  create mode 100644 package/conmon/conmon.mk
> 
> diff --git a/DEVELOPERS b/DEVELOPERS
> index 37c1f06ec1..1608317654 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -543,6 +543,7 @@ F:	package/balena-engine/
>  F:	package/batman-adv/
>  F:	package/catatonit/
>  F:	package/cni-plugins/
> +F:	package/conmon/
>  F:	package/containerd/
>  F:	package/crun/
>  F:	package/delve/
> diff --git a/package/Config.in b/package/Config.in
> index 420ebaa370..52bc10b91b 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -2631,6 +2631,7 @@ menu "System tools"
>  	source "package/bubblewrap/Config.in"
>  	source "package/cgroupfs-mount/Config.in"
>  	source "package/circus/Config.in"
> +	source "package/conmon/Config.in"
>  	source "package/containerd/Config.in"
>  	source "package/coreutils/Config.in"
>  	source "package/cpulimit/Config.in"
> diff --git a/package/conmon/Config.in b/package/conmon/Config.in
> new file mode 100644
> index 0000000000..c4b428a541
> --- /dev/null
> +++ b/package/conmon/Config.in
> @@ -0,0 +1,15 @@
> +config BR2_PACKAGE_CONMON
> +	bool "conmon"
> +	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
> +	depends on BR2_USE_MMU # libglib2
> +	depends on BR2_USE_WCHAR # libglib2
> +	depends on !BR2_TOOLCHAIN_USES_UCLIBC # no fexecve
> +	help
> +	  Conmon is an OCI container runtime monitor.
> +
> +	  https://github.com/containers/conmon
> +
> +comment "conmon needs a glibc or musl toolchain w/ threads, wchar"
> +	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
> +		BR2_TOOLCHAIN_USES_UCLIBC
> +	depends on BR2_USE_MMU
> diff --git a/package/conmon/conmon.hash b/package/conmon/conmon.hash
> new file mode 100644
> index 0000000000..82d1d14ba3
> --- /dev/null
> +++ b/package/conmon/conmon.hash
> @@ -0,0 +1,3 @@
> +# Locally computed
> +sha256  7d0f9a2f7cb8a76c51990128ac837aaf0cc89950b6ef9972e94417aa9cf901fe  conmon-2.1.7.tar.gz
> +sha256  9c9d771d4004725237a31ada889fe06c85a24fd0a29e41825181ab4cde54f016  LICENSE
> diff --git a/package/conmon/conmon.mk b/package/conmon/conmon.mk
> new file mode 100644
> index 0000000000..cda059042a
> --- /dev/null
> +++ b/package/conmon/conmon.mk
> @@ -0,0 +1,36 @@
> +################################################################################
> +#
> +# conmon
> +#
> +################################################################################
> +
> +CONMON_VERSION = 2.1.7
> +CONMON_SITE = $(call github,containers,conmon,v$(CONMON_VERSION))
> +CONMON_LICENSE = Apache-2.0
> +CONMON_LICENSE_FILES = LICENSE
> +
> +CONMON_DEPENDENCIES += host-pkgconf libglib2
> +
> +ifeq ($(BR2_PACKAGE_LIBSECCOMP),y)
> +CONMON_ENABLE_SECCOMP = 1
> +CONMON_DEPENDENCIES += libseccomp
> +else
> +CONMON_ENABLE_SECCOMP = 0
> +endif
> +
> +define CONMON_CONFIGURE_CMDS
> +	printf '#!/bin/bash\necho "$(CONMON_ENABLE_SECCOMP)"\n' > \
> +		$(@D)/hack/seccomp-notify.sh
> +	chmod +x $(@D)/hack/seccomp-notify.sh
> +endef
> +
> +define CONMON_BUILD_CMDS
> +	$(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \
> +		LDFLAGS="$(TARGET_LDFLAGS)" -C $(@D) bin/conmon
> +endef
> +
> +define CONMON_INSTALL_TARGET_CMDS
> +	$(INSTALL) -D -m 755 $(@D)/bin/conmon $(TARGET_DIR)/usr/bin/conmon
> +endef
> +
> +$(eval $(generic-package))
> -- 
> 2.40.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
diff mbox series

Patch

diff --git a/DEVELOPERS b/DEVELOPERS
index 37c1f06ec1..1608317654 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -543,6 +543,7 @@  F:	package/balena-engine/
 F:	package/batman-adv/
 F:	package/catatonit/
 F:	package/cni-plugins/
+F:	package/conmon/
 F:	package/containerd/
 F:	package/crun/
 F:	package/delve/
diff --git a/package/Config.in b/package/Config.in
index 420ebaa370..52bc10b91b 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2631,6 +2631,7 @@  menu "System tools"
 	source "package/bubblewrap/Config.in"
 	source "package/cgroupfs-mount/Config.in"
 	source "package/circus/Config.in"
+	source "package/conmon/Config.in"
 	source "package/containerd/Config.in"
 	source "package/coreutils/Config.in"
 	source "package/cpulimit/Config.in"
diff --git a/package/conmon/Config.in b/package/conmon/Config.in
new file mode 100644
index 0000000000..c4b428a541
--- /dev/null
+++ b/package/conmon/Config.in
@@ -0,0 +1,15 @@ 
+config BR2_PACKAGE_CONMON
+	bool "conmon"
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
+	depends on BR2_USE_MMU # libglib2
+	depends on BR2_USE_WCHAR # libglib2
+	depends on !BR2_TOOLCHAIN_USES_UCLIBC # no fexecve
+	help
+	  Conmon is an OCI container runtime monitor.
+
+	  https://github.com/containers/conmon
+
+comment "conmon needs a glibc or musl toolchain w/ threads, wchar"
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
+		BR2_TOOLCHAIN_USES_UCLIBC
+	depends on BR2_USE_MMU
diff --git a/package/conmon/conmon.hash b/package/conmon/conmon.hash
new file mode 100644
index 0000000000..82d1d14ba3
--- /dev/null
+++ b/package/conmon/conmon.hash
@@ -0,0 +1,3 @@ 
+# Locally computed
+sha256  7d0f9a2f7cb8a76c51990128ac837aaf0cc89950b6ef9972e94417aa9cf901fe  conmon-2.1.7.tar.gz
+sha256  9c9d771d4004725237a31ada889fe06c85a24fd0a29e41825181ab4cde54f016  LICENSE
diff --git a/package/conmon/conmon.mk b/package/conmon/conmon.mk
new file mode 100644
index 0000000000..cda059042a
--- /dev/null
+++ b/package/conmon/conmon.mk
@@ -0,0 +1,36 @@ 
+################################################################################
+#
+# conmon
+#
+################################################################################
+
+CONMON_VERSION = 2.1.7
+CONMON_SITE = $(call github,containers,conmon,v$(CONMON_VERSION))
+CONMON_LICENSE = Apache-2.0
+CONMON_LICENSE_FILES = LICENSE
+
+CONMON_DEPENDENCIES += host-pkgconf libglib2
+
+ifeq ($(BR2_PACKAGE_LIBSECCOMP),y)
+CONMON_ENABLE_SECCOMP = 1
+CONMON_DEPENDENCIES += libseccomp
+else
+CONMON_ENABLE_SECCOMP = 0
+endif
+
+define CONMON_CONFIGURE_CMDS
+	printf '#!/bin/bash\necho "$(CONMON_ENABLE_SECCOMP)"\n' > \
+		$(@D)/hack/seccomp-notify.sh
+	chmod +x $(@D)/hack/seccomp-notify.sh
+endef
+
+define CONMON_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \
+		LDFLAGS="$(TARGET_LDFLAGS)" -C $(@D) bin/conmon
+endef
+
+define CONMON_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 755 $(@D)/bin/conmon $(TARGET_DIR)/usr/bin/conmon
+endef
+
+$(eval $(generic-package))