From dbac22e31503d8dfa9edcc0dea9caa357744fef6 Mon Sep 17 00:00:00 2001 From: Justin Bronder Date: Mon, 30 Oct 2023 13:32:11 -0400 Subject: [PATCH 1/4] github: always prune and save sstate-cache Signed-off-by: Justin Bronder --- .github/workflows/ci.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dbce8f2..fafd449 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,11 +39,10 @@ jobs: uses: actions/checkout@v3 with: path: meta-openrc - - name: Shared-State Cache - uses: actions/cache@v3 + - name: Restore Shared-State Cache + uses: actions/cache/restore@v3 with: - path: | - build/sstate-cache + path: build/sstate-cache key: sstate-openrc-${{ env.OE_BRANCH }}-${{ github.sha }} restore-keys: | sstate-openrc-${{ env.OE_BRANCH }} @@ -70,13 +69,21 @@ jobs: run: | source poky/oe-init-build-env build bitbake openrc-image - - name: Prune Shared-State Cache + - name: Prune Shared-State Cache and tmpdir + if: always() run: | source poky/oe-init-build-env build du -sh sstate-cache sstate-cache-management.sh --yes --cache-dir=sstate-cache --remove-duplicated sstate-cache-management.sh --yes --cache-dir=sstate-cache --stamps-dir=tmp/stamps du -sh sstate-cache + rm -r tmp/ + - name: Save Shared-State Cache + if: always() + uses: actions/cache/save@v3 + with: + path: build/sstate-cache + key: sstate-openrc-${{ env.OE_BRANCH }}-${{ github.sha }} yocto-check-layer: name: yocto-check-layer From deaa59ec727ceb41c1a725fdaab213735cf6ffa1 Mon Sep 17 00:00:00 2001 From: Justin Bronder Date: Mon, 30 Oct 2023 14:13:09 -0400 Subject: [PATCH 2/4] openrc: update 0.48 -> 0.51 - OpenRC 0.51 The default RC_CGROUP_MODE has been updated to unified. This benefits users since it will assign each service to its own cgroup, making resource nanagement better over all. OUTPUT_LOGGER and ERROR_LOGGER have been implemented for supervise-daemon. For mor einformation on these settings, please check the man page. - OpenRC 0.50 This is a bug fix release which fixes a significant performance issue on musl libc systems. - OpenRC 0.49 This release adds support for glibc's builtin strlcpy, strlcat etc functions, which will be in posix next. Also, it fixes completions. Signed-off-by: Justin Bronder --- ...fine-strlcpy-strlcat-with-glibc-2.38.patch | 79 ------------------- .../openrc/{openrc_0.48.bb => openrc_0.51.bb} | 3 +- 2 files changed, 1 insertion(+), 81 deletions(-) delete mode 100644 recipes-init/openrc/openrc/0001-Don-t-re-define-strlcpy-strlcat-with-glibc-2.38.patch rename recipes-init/openrc/{openrc_0.48.bb => openrc_0.51.bb} (97%) diff --git a/recipes-init/openrc/openrc/0001-Don-t-re-define-strlcpy-strlcat-with-glibc-2.38.patch b/recipes-init/openrc/openrc/0001-Don-t-re-define-strlcpy-strlcat-with-glibc-2.38.patch deleted file mode 100644 index 8b53044..0000000 --- a/recipes-init/openrc/openrc/0001-Don-t-re-define-strlcpy-strlcat-with-glibc-2.38.patch +++ /dev/null @@ -1,79 +0,0 @@ -From c1cd3c9830ce2c68dcf65342688e11a220723619 Mon Sep 17 00:00:00 2001 -From: Sam James -Date: Wed, 30 Aug 2023 02:32:13 +0100 -Subject: [PATCH] Don't re-define strlcpy/strlcat with >=glibc-2.38 - -`>=glibc-2.38` implements strlcpy, strlcat, etc so check for those functions -with Meson and don't provide conflicting prototypes. - -Technically, it doesn't need _GNU_SOURCE, but it's easier because it's not -clear right now what glibc wants to guard it with. Note that these are in -POSIX next anyway. - -Fixes: https://github.com/OpenRC/openrc/issues/643 -Signed-off-by: Sam James - -Upstream-Status: Backport https://github.com/OpenRC/openrc/commit/c1cd3c9830ce2c68dcf65342688e11a220723619 ---- - meson.build | 4 ++++ - src/libeinfo/libeinfo.c | 5 +---- - src/shared/helpers.h | 4 +--- - 3 files changed, 6 insertions(+), 7 deletions(-) - -diff --git a/meson.build b/meson.build -index 3e94ce5d..73cb9778 100644 ---- a/meson.build -+++ b/meson.build -@@ -203,6 +203,10 @@ if cc.has_function('close_range', prefix: '#define _GNU_SOURCE\n#include ') -+ add_project_arguments('-DHAVE_STRLCPY', language: 'c') -+endif -+ - incdir = include_directories('src/shared') - einfo_incdir = include_directories('src/libeinfo') - rc_incdir = include_directories('src/librc') -diff --git a/src/libeinfo/libeinfo.c b/src/libeinfo/libeinfo.c -index fb8b6e3d..840233bd 100644 ---- a/src/libeinfo/libeinfo.c -+++ b/src/libeinfo/libeinfo.c -@@ -146,9 +146,7 @@ static const char *const color_terms[] = { - }; - #endif - --/* strlcat and strlcpy are nice, shame glibc does not define them */ --#ifdef __GLIBC__ --# if !defined (__UCLIBC__) && !defined (__dietlibc__) -+#ifndef HAVE_STRLCPY - static size_t - strlcat(char *dst, const char *src, size_t size) - { -@@ -176,7 +174,6 @@ strlcat(char *dst, const char *src, size_t size) - - return dst_n + (s - src); - } --# endif - #endif - - static bool -diff --git a/src/shared/helpers.h b/src/shared/helpers.h -index 9cf263be..dee41b75 100644 ---- a/src/shared/helpers.h -+++ b/src/shared/helpers.h -@@ -37,10 +37,8 @@ - - #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) - --#ifdef __GLIBC__ --# if !defined (__UCLIBC__) && !defined (__dietlibc__) -+#ifndef HAVE_STRLCPY - # define strlcpy(dst, src, size) snprintf(dst, size, "%s", src) --# endif - #endif - - #ifndef timespecsub --- -2.41.0 - diff --git a/recipes-init/openrc/openrc_0.48.bb b/recipes-init/openrc/openrc_0.51.bb similarity index 97% rename from recipes-init/openrc/openrc_0.48.bb rename to recipes-init/openrc/openrc_0.51.bb index 38679cd..b741f17 100644 --- a/recipes-init/openrc/openrc_0.48.bb +++ b/recipes-init/openrc/openrc_0.51.bb @@ -1,14 +1,13 @@ LICENSE = "BSD-2-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=18590035fb3f5120d3a5e4b781f9ae25" -SRCREV = "92662ddc44f6091e8085fcd4637d13f04e90c5ac" +SRCREV = "a2f002f1a87bb7e13a214721717f5e2fec5f3571" SRC_URI = " \ git://github.com/openrc/openrc.git;nobranch=1;protocol=https \ file://volatiles.initd \ file://getty.confd \ file://getty.initd \ - file://0001-Don-t-re-define-strlcpy-strlcat-with-glibc-2.38.patch \ " S = "${WORKDIR}/git" From bfcac73e7205f3c7586cb7d01e627d7ed78fa1fa Mon Sep 17 00:00:00 2001 From: Justin Bronder Date: Mon, 30 Oct 2023 16:58:21 -0400 Subject: [PATCH 3/4] github: use https when cloning poky Signed-off-by: Justin Bronder --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fafd449..babbce8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,7 +49,7 @@ jobs: sstate-openrc- sstate- - name: Clone Poky - run: git clone -b ${{ env.OE_BRANCH }} git://git.yoctoproject.org/poky + run: git clone -b ${{ env.OE_BRANCH }} https://git.yoctoproject.org/poky - name: Initialize build directory run: | source poky/oe-init-build-env build From 385684a65e3686b7a8b8195d9b65d1a92069c938 Mon Sep 17 00:00:00 2001 From: Justin Bronder Date: Mon, 30 Oct 2023 17:30:58 -0400 Subject: [PATCH 4/4] github: lower BB_DISKMON_DIRS limits Signed-off-by: Justin Bronder --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index babbce8..23db127 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,6 +60,7 @@ jobs: echo 'SSTATE_MIRRORS += "file://.* http://sstate.yoctoproject.org/all/PATH;downloadfilename=PATH"' >> conf/local.conf echo 'BB_HASHSERVE = "auto"' >> conf/local.conf echo 'BB_HASHSERVE_UPSTREAM = "hashserv.yocto.io:8687"' >> conf/local.conf + echo 'BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},100M,10K HALT,${TMPDIR},50M,5k"' >> conf/local.conf if [ ${{ env.OE_BRANCH }} != "kirkstone" ]; then echo 'INIT_MANAGER = "openrc"' >> conf/local.conf else