From 06f50ff1bf066feb6cf6ed512113773f87c884fb Mon Sep 17 00:00:00 2001 From: Christian Stewart Date: Mon, 22 May 2023 13:23:45 -0700 Subject: [PATCH] package/conmon: new package Conmon is an OCI container runtime monitor. https://github.com/containers/conmon Dependency of podman. Signed-off-by: Christian Stewart Signed-off-by: Thomas Petazzoni --- DEVELOPERS | 1 + package/Config.in | 1 + package/conmon/Config.in | 14 ++++++++++++++ package/conmon/conmon.hash | 3 +++ package/conmon/conmon.mk | 36 ++++++++++++++++++++++++++++++++++++ 5 files changed, 55 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 cfaadc47a9..4488364458 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -547,6 +547,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 0e8cdd7c8b..29a7daf6cc 100644 --- a/package/Config.in +++ b/package/Config.in @@ -2642,6 +2642,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..9ba9c215b7 --- /dev/null +++ b/package/conmon/Config.in @@ -0,0 +1,14 @@ +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 + select BR2_PACKAGE_LIBGLIB2 + help + Conmon is an OCI container runtime monitor. + + https://github.com/containers/conmon + +comment "conmon needs a toolchain w/ threads, wchar" + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + 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..f3567a4305 --- /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_DISABLE_SECCOMP = 0 +CONMON_DEPENDENCIES += libseccomp +else +CONMON_DISABLE_SECCOMP = 1 +endif + +define CONMON_CONFIGURE_CMDS + printf '#!/bin/bash\necho "$(CONMON_DISABLE_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))