From 97df11e158d24b663dd169c3189ec044b5af6983 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Wed, 6 Sep 2023 18:56:20 +0200 Subject: libcgroup: update 3.0.0 -> 3.1.0 (From OE-Core rev: 833e8d6fa0b4bdb82baa3dbf0ebd77daaa11efe7) Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- ...001-api-Use-GNU-strerror_r-when-available.patch | 55 ---------------------- meta/recipes-core/libcgroup/libcgroup_3.0.0.bb | 33 ------------- meta/recipes-core/libcgroup/libcgroup_3.1.0.bb | 33 +++++++++++++ 3 files changed, 33 insertions(+), 88 deletions(-) delete mode 100644 meta/recipes-core/libcgroup/libcgroup/0001-api-Use-GNU-strerror_r-when-available.patch delete mode 100644 meta/recipes-core/libcgroup/libcgroup_3.0.0.bb create mode 100644 meta/recipes-core/libcgroup/libcgroup_3.1.0.bb diff --git a/meta/recipes-core/libcgroup/libcgroup/0001-api-Use-GNU-strerror_r-when-available.patch b/meta/recipes-core/libcgroup/libcgroup/0001-api-Use-GNU-strerror_r-when-available.patch deleted file mode 100644 index 96321d2970..0000000000 --- a/meta/recipes-core/libcgroup/libcgroup/0001-api-Use-GNU-strerror_r-when-available.patch +++ /dev/null @@ -1,55 +0,0 @@ -From d190c0c548b3219b75e4c399aa89186e77bbe270 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Tue, 23 Aug 2022 20:03:09 -0700 -Subject: [PATCH] api: Use GNU strerror_r when available - -GNU strerror_r is only available in glibc, musl impelents the XSI -version which is slightly different, therefore check if GNU version is -available before using it, otherwise use the XSI compliant version. - -Upstream-Status: Submitted [https://github.com/libcgroup/libcgroup/pull/236] -Signed-off-by: Khem Raj ---- - configure.ac | 5 +++++ - src/api.c | 8 ++++++-- - 2 files changed, 11 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index b68c655..831866d 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -183,6 +183,11 @@ AC_FUNC_REALLOC - AC_FUNC_STAT - AC_CHECK_FUNCS([getmntent hasmntopt memset mkdir rmdir strdup]) - -+orig_CFLAGS="$CFLAGS" -+CFLAGS="$CFLAGS -D_GNU_SOURCE" -+AC_FUNC_STRERROR_R -+CFLAGS="$orig_CFLAGS" -+ - AC_SEARCH_LIBS( - [fts_open], - [fts], -diff --git a/src/api.c b/src/api.c -index 5c6de11..06aa1d6 100644 ---- a/src/api.c -+++ b/src/api.c -@@ -4571,9 +4571,13 @@ const char *cgroup_strerror(int code) - { - int idx = code % ECGROUPNOTCOMPILED; - -- if (code == ECGOTHER) -+ if (code == ECGOTHER) { -+#ifdef STRERROR_R_CHAR_P - return strerror_r(cgroup_get_last_errno(), errtext, MAXLEN); -- -+#else -+ return strerror_r(cgroup_get_last_errno(), errtext, sizeof (errtext)) ? "unknown error" : errtext; -+#endif -+ } - if (idx >= sizeof(cgroup_strerror_codes)/sizeof(cgroup_strerror_codes[0])) - return "Invalid error code"; - --- -2.37.2 - diff --git a/meta/recipes-core/libcgroup/libcgroup_3.0.0.bb b/meta/recipes-core/libcgroup/libcgroup_3.0.0.bb deleted file mode 100644 index 457b965481..0000000000 --- a/meta/recipes-core/libcgroup/libcgroup_3.0.0.bb +++ /dev/null @@ -1,33 +0,0 @@ -SUMMARY = "Linux control group abstraction library" -HOMEPAGE = "http://libcg.sourceforge.net/" -DESCRIPTION = "libcgroup is a library that abstracts the control group file system \ -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 = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=4d794c5d710e5b3547a6cc6a6609a641" - -inherit autotools pkgconfig github-releases - -DEPENDS = "bison-native flex-native" -DEPENDS:append:libc-musl = " fts" - -SRC_URI = "${GITHUB_BASE_URI}/download/v3.0/${BP}.tar.gz \ - file://0001-api-Use-GNU-strerror_r-when-available.patch \ -" -UPSTREAM_CHECK_URI = "https://github.com/libcgroup/libcgroup/tags" - -SRC_URI[sha256sum] = "8d284d896fca1c981b55850e92acd3ad9648a69227c028dda7ae3402af878edd" - -PACKAGECONFIG = "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" -PACKAGECONFIG[pam] = "--enable-pam-module-dir=${base_libdir}/security --enable-pam=yes,--enable-pam=no,libpam" - -PACKAGES =+ "cgroups-pam-plugin" -FILES:cgroups-pam-plugin = "${base_libdir}/security/pam_cgroup.so*" -FILES:${PN}-dev += "${base_libdir}/security/*.la" -FILES:${PN}-staticdev += "${base_libdir}/security/pam_cgroup.a" - -do_install:append() { - # Until we ship the test suite, this library isn't useful - rm -f ${D}${libdir}/libcgroupfortesting.* -} diff --git a/meta/recipes-core/libcgroup/libcgroup_3.1.0.bb b/meta/recipes-core/libcgroup/libcgroup_3.1.0.bb new file mode 100644 index 0000000000..4b4f19e36f --- /dev/null +++ b/meta/recipes-core/libcgroup/libcgroup_3.1.0.bb @@ -0,0 +1,33 @@ +SUMMARY = "Linux control group abstraction library" +HOMEPAGE = "http://libcg.sourceforge.net/" +DESCRIPTION = "libcgroup is a library that abstracts the control group file system \ +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 = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=4d794c5d710e5b3547a6cc6a6609a641" + +inherit autotools pkgconfig github-releases + +DEPENDS = "bison-native flex-native" +DEPENDS:append:libc-musl = " fts" + +SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${BP}.tar.gz \ +" +UPSTREAM_CHECK_URI = "https://github.com/libcgroup/libcgroup/tags" + +SRC_URI[sha256sum] = "976ec4b1e03c0498308cfd28f1b256b40858f636abc8d1f9db24f0a7ea9e1258" + +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*" +FILES:${PN}-dev += "${base_libdir}/security/*.la" +FILES:${PN}-staticdev += "${base_libdir}/security/pam_cgroup.a" + +do_install:append() { + # Until we ship the test suite, this library isn't useful + rm -f ${D}${libdir}/libcgroupfortesting.* +} -- cgit v1.2.3-54-g00ecf