diff options
Diffstat (limited to 'meta/recipes-core/libcgroup')
-rw-r--r-- | meta/recipes-core/libcgroup/libcgroup/0001-include-Makefile-install-systemd.h-by-default.patch | 37 | ||||
-rw-r--r-- | meta/recipes-core/libcgroup/libcgroup/module.patch | 36 | ||||
-rw-r--r-- | meta/recipes-core/libcgroup/libcgroup/musl-decls-compat.patch | 284 | ||||
-rw-r--r-- | meta/recipes-core/libcgroup/libcgroup_3.1.0.bb (renamed from meta/recipes-core/libcgroup/libcgroup_2.0.bb) | 23 |
4 files changed, 48 insertions, 332 deletions
diff --git a/meta/recipes-core/libcgroup/libcgroup/0001-include-Makefile-install-systemd.h-by-default.patch b/meta/recipes-core/libcgroup/libcgroup/0001-include-Makefile-install-systemd.h-by-default.patch new file mode 100644 index 0000000000..4b743f9b33 --- /dev/null +++ b/meta/recipes-core/libcgroup/libcgroup/0001-include-Makefile-install-systemd.h-by-default.patch @@ -0,0 +1,37 @@ +From 592dcdcf243576bd2517d3da9bc18990de08e37e Mon Sep 17 00:00:00 2001 +From: Kamalesh Babulal <kamalesh.babulal@oracle.com> +Date: Mon, 27 Nov 2023 20:07:33 +0530 +Subject: [PATCH 1/1] include/Makefile: install systemd.h by default + +Install systemd.h header file by default, as we have stub and defined +versions of the systemd functions for both non-systemd and systemd +enabled configurations. This will help packagers to ship package +without systemd support (--enable-systemd=no). + +Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com> +Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> + +Upstream-Status: Backport [https://github.com/libcgroup/libcgroup/commit/592dcdcf243576bd2517d3da9bc18990de08e37e] + +Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com> +--- + include/Makefile.am | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/include/Makefile.am b/include/Makefile.am +index 23cebaac..4cb05529 100644 +--- a/include/Makefile.am ++++ b/include/Makefile.am +@@ -2,8 +2,4 @@ + nobase_include_HEADERS = libcgroup.h libcgroup/error.h libcgroup/init.h \ + libcgroup/groups.h libcgroup/tasks.h \ + libcgroup/iterators.h libcgroup/config.h \ +- libcgroup/log.h libcgroup/tools.h +- +-if WITH_SYSTEMD +-nobase_include_HEADERS += libcgroup/systemd.h +-endif ++ libcgroup/log.h libcgroup/tools.h libcgroup/systemd.h +-- +2.39.2 + diff --git a/meta/recipes-core/libcgroup/libcgroup/module.patch b/meta/recipes-core/libcgroup/libcgroup/module.patch deleted file mode 100644 index d8ff9b1479..0000000000 --- a/meta/recipes-core/libcgroup/libcgroup/module.patch +++ /dev/null @@ -1,36 +0,0 @@ -Upstream-Status: Backport -Signed-off-by: Ross Burton <ross.burton@arm.com> - -From 76f0879056ce7e3f0123c277f2303954d0b6cead Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Tomasz=20K=C5=82oczko?= <kloczek@github.com> -Date: Wed, 12 May 2021 20:36:02 +0000 -Subject: [PATCH 2/2] automake: build PAM module as unversioned DSO -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -PAM modules should be build as unversioned DSO. -Add -avoid-version to pam_cgroup_la_LDFLAGS - -Signed-off-by: Tomasz Kłoczko <kloczek@github.com> -Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> ---- - src/pam/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/pam/Makefile.am b/src/pam/Makefile.am -index bd5a91d..4b0b2a9 100644 ---- a/src/pam/Makefile.am -+++ b/src/pam/Makefile.am -@@ -4,7 +4,7 @@ if WITH_PAM - - pamlib_LTLIBRARIES = pam_cgroup.la - pam_cgroup_la_SOURCES = pam_cgroup.c --pam_cgroup_la_LDFLAGS = -module -+pam_cgroup_la_LDFLAGS = -module -avoid-version - pam_cgroup_la_LIBADD = $(top_builddir)/src/libcgroup.la -lpam - - endif --- -2.32.0 - diff --git a/meta/recipes-core/libcgroup/libcgroup/musl-decls-compat.patch b/meta/recipes-core/libcgroup/libcgroup/musl-decls-compat.patch deleted file mode 100644 index 531a562967..0000000000 --- a/meta/recipes-core/libcgroup/libcgroup/musl-decls-compat.patch +++ /dev/null @@ -1,284 +0,0 @@ -Upstream-Status: Backport -Signed-off-by: Ross Burton <ross.burton@arm.com> - -From 26f2889113789c176273bd24fcd1592a8064c346 Mon Sep 17 00:00:00 2001 -From: "Anthony G. Basile" <blueness@gentoo.org> -Date: Tue, 6 Jul 2021 07:54:47 -0600 -Subject: [PATCH 1/2] Replace __BEGIN_DECLS and __END_DECLS with extern "C". - -The macros __BEGIN_DECLS and __END_DECLS are a GNU-ism found in -glibc and uClibc, but not musl. We replace them by the more general -extern "C" { ... } block exposed only if we have __cplusplus. - -Forward ported from a patch by Anthony G. Basile <blueness@gentoo.org>. - -Signed-off-by: Alex Xu (Hello71) <alex_y_xu@yahoo.ca> -Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> ---- - include/libcgroup/config.h | 8 ++++++-- - include/libcgroup/error.h | 8 ++++++-- - include/libcgroup/groups.h | 8 ++++++-- - include/libcgroup/init.h | 8 ++++++-- - include/libcgroup/iterators.h | 8 ++++++-- - include/libcgroup/log.h | 8 ++++++-- - include/libcgroup/tasks.h | 8 ++++++-- - src/bindings/libcgroup.p | 8 -------- - src/daemon/cgrulesengd.h | 8 ++++++-- - src/libcgroup-internal.h | 8 ++++++-- - src/tools/tools-common.h | 8 ++++++-- - 11 files changed, 60 insertions(+), 28 deletions(-) - -diff --git a/include/libcgroup/config.h b/include/libcgroup/config.h -index 9aaa390..f835009 100644 ---- a/include/libcgroup/config.h -+++ b/include/libcgroup/config.h -@@ -9,7 +9,9 @@ - #include <features.h> - #endif - --__BEGIN_DECLS -+#ifdef __cplusplus -+extern "C" { -+#endif - - /** - * @defgroup group_config 5. Configuration -@@ -128,6 +130,8 @@ int cgroup_config_create_template_group( - * @} - * @} - */ --__END_DECLS -+#ifdef __cplusplus -+} /* extern "C" */ -+#endif - - #endif /*_LIBCGROUP_CONFIG_H*/ -diff --git a/include/libcgroup/error.h b/include/libcgroup/error.h -index 1dfdde9..14a6e16 100644 ---- a/include/libcgroup/error.h -+++ b/include/libcgroup/error.h -@@ -9,7 +9,9 @@ - #include <features.h> - #endif - --__BEGIN_DECLS -+#ifdef __cplusplus -+extern "C" { -+#endif - - /** - * @defgroup group_errors 6. Error handling -@@ -99,6 +101,8 @@ int cgroup_get_last_errno(void); - * @} - * @} - */ --__END_DECLS -+#ifdef __cplusplus -+} /* extern "C" */ -+#endif - - #endif /* _LIBCGROUP_INIT_H */ -diff --git a/include/libcgroup/groups.h b/include/libcgroup/groups.h -index 201558f..39ec3cd 100644 ---- a/include/libcgroup/groups.h -+++ b/include/libcgroup/groups.h -@@ -11,7 +11,9 @@ - #include <stdbool.h> - #endif - --__BEGIN_DECLS -+#ifdef __cplusplus -+extern "C" { -+#endif - - /** - * Flags for cgroup_delete_cgroup_ext(). -@@ -587,6 +589,8 @@ char *cgroup_get_cgroup_name(struct cgroup *cgroup); - */ - - --__END_DECLS -+#ifdef __cplusplus -+} /* extern "C" */ -+#endif - - #endif /* _LIBCGROUP_GROUPS_H */ -diff --git a/include/libcgroup/init.h b/include/libcgroup/init.h -index 5150f2f..ea2dcc9 100644 ---- a/include/libcgroup/init.h -+++ b/include/libcgroup/init.h -@@ -9,7 +9,9 @@ - #include <features.h> - #endif - --__BEGIN_DECLS -+#ifdef __cplusplus -+extern "C" { -+#endif - - /** - * @defgroup group_init 1. Initialization -@@ -58,6 +60,8 @@ int cgroup_get_subsys_mount_point(const char *controller, char **mount_point); - * @} - * @} - */ --__END_DECLS -+#ifdef __cplusplus -+} /* extern "C" */ -+#endif - - #endif /* _LIBCGROUP_INIT_H */ -diff --git a/include/libcgroup/iterators.h b/include/libcgroup/iterators.h -index c6d453d..b3ba3af 100644 ---- a/include/libcgroup/iterators.h -+++ b/include/libcgroup/iterators.h -@@ -11,7 +11,9 @@ - #include <features.h> - #endif - --__BEGIN_DECLS -+#ifdef __cplusplus -+extern "C" { -+#endif - - /** - * @defgroup group_iterators 3. Iterators -@@ -423,6 +425,8 @@ int cgroup_get_subsys_mount_point_end(void **handle); - * @} - */ - --__END_DECLS -+#ifdef __cplusplus -+} /* extern "C" */ -+#endif - - #endif /* _LIBCGROUP_ITERATORS_H */ -diff --git a/include/libcgroup/log.h b/include/libcgroup/log.h -index 0dd03b4..f693473 100644 ---- a/include/libcgroup/log.h -+++ b/include/libcgroup/log.h -@@ -11,7 +11,9 @@ - - #include <stdarg.h> - --__BEGIN_DECLS -+#ifdef __cplusplus -+extern "C" { -+#endif - - /** - * @defgroup group_log 7. Logging -@@ -142,6 +144,8 @@ extern int cgroup_parse_log_level_str(const char *levelstr); - * @} - * @} - */ --__END_DECLS -+#ifdef __cplusplus -+} /* extern "C" */ -+#endif - - #endif /* _LIBCGROUP_LOG_H */ -diff --git a/include/libcgroup/tasks.h b/include/libcgroup/tasks.h -index aad438a..8553c30 100644 ---- a/include/libcgroup/tasks.h -+++ b/include/libcgroup/tasks.h -@@ -12,7 +12,9 @@ - #include <stdbool.h> - #endif - --__BEGIN_DECLS -+#ifdef __cplusplus -+extern "C" { -+#endif - - /** Flags for cgroup_change_cgroup_uid_gid(). */ - enum cgflags { -@@ -204,6 +206,8 @@ int cgroup_register_unchanged_process(pid_t pid, int flags); - * @} - * @} - */ --__END_DECLS -+#ifdef __cplusplus -+} /* extern "C" */ -+#endif - - #endif /* _LIBCGROUP_TASKS_H */ -diff --git a/src/daemon/cgrulesengd.h b/src/daemon/cgrulesengd.h -index e273b4b..0b12076 100644 ---- a/src/daemon/cgrulesengd.h -+++ b/src/daemon/cgrulesengd.h -@@ -17,7 +17,9 @@ - - #include <features.h> - --__BEGIN_DECLS -+#ifdef __cplusplus -+extern "C" { -+#endif - - #include "config.h" - #include "libcgroup.h" -@@ -119,7 +121,9 @@ void cgre_flash_templates(int signum); - */ - void cgre_catch_term(int signum); - --__END_DECLS -+#ifdef __cplusplus -+} /* extern "C" */ -+#endif - - #endif /* _CGRULESENGD_H */ - -diff --git a/src/libcgroup-internal.h b/src/libcgroup-internal.h -index 1dfc92b..edc5abb 100644 ---- a/src/libcgroup-internal.h -+++ b/src/libcgroup-internal.h -@@ -16,7 +16,9 @@ - - #define __LIBCG_INTERNAL - --__BEGIN_DECLS -+#ifdef __cplusplus -+extern "C" { -+#endif - - #include "config.h" - #include <dirent.h> -@@ -407,6 +409,8 @@ int cgroupv2_controller_enabled(const char * const cg_name, - - #endif /* UNIT_TEST */ - --__END_DECLS -+#ifdef __cplusplus -+} /* extern "C" */ -+#endif - - #endif -diff --git a/src/tools/tools-common.h b/src/tools/tools-common.h -index 292c408..e3541b1 100644 ---- a/src/tools/tools-common.h -+++ b/src/tools/tools-common.h -@@ -18,7 +18,9 @@ - - #define __TOOLS_COMMON - --__BEGIN_DECLS -+#ifdef __cplusplus -+extern "C" { -+#endif - #include "config.h" - #include <libcgroup.h> - #include "../libcgroup-internal.h" -@@ -136,6 +138,8 @@ int parse_r_flag(const char * const program_name, - - #endif /* UNIT_TEST */ - --__END_DECLS -+#ifdef __cplusplus -+} /* extern "C" */ -+#endif - - #endif /* TOOLS_COMMON */ --- -2.32.0 - diff --git a/meta/recipes-core/libcgroup/libcgroup_2.0.bb b/meta/recipes-core/libcgroup/libcgroup_3.1.0.bb index a58dd88ea5..a1d27c7e7f 100644 --- a/meta/recipes-core/libcgroup/libcgroup_2.0.bb +++ b/meta/recipes-core/libcgroup/libcgroup_3.1.0.bb @@ -4,25 +4,24 @@ DESCRIPTION = "libcgroup is a library that abstracts the control group file syst in Linux. Control groups allow you to limit, account and isolate resource usage \ (CPU, memory, disk I/O, etc.) of groups of processes." SECTION = "libs" -LICENSE = "LGPLv2.1" -LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1" +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=4d794c5d710e5b3547a6cc6a6609a641" -inherit autotools pkgconfig +inherit autotools pkgconfig github-releases DEPENDS = "bison-native flex-native" +DEPENDS:append:libc-musl = " fts" -SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BP}.tar.bz2 \ - file://musl-decls-compat.patch \ - file://module.patch" +SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${BP}.tar.gz \ + file://0001-include-Makefile-install-systemd.h-by-default.patch \ +" +UPSTREAM_CHECK_URI = "https://github.com/libcgroup/libcgroup/tags" -SRC_URI[sha256sum] = "11a2fbf0e42f46089f406b8b0dca7fef04aec2f21600b70e402c5db3661305d7" -UPSTREAM_CHECK_URI = "https://github.com/libcgroup/libcgroup/releases/" +SRC_URI[sha256sum] = "976ec4b1e03c0498308cfd28f1b256b40858f636abc8d1f9db24f0a7ea9e1258" -DEPENDS:append:libc-musl = " fts " -EXTRA_OEMAKE:append:libc-musl = " LIBS=-lfts" - -PACKAGECONFIG = "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" +PACKAGECONFIG = "${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd', d)}" PACKAGECONFIG[pam] = "--enable-pam-module-dir=${base_libdir}/security --enable-pam=yes,--enable-pam=no,libpam" +PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd" PACKAGES =+ "cgroups-pam-plugin" FILES:cgroups-pam-plugin = "${base_libdir}/security/pam_cgroup.so*" |