Re: [PATCH V2 1/9] docker-distribution: fix the inehrit and systemd settings

Bruce Ashfield


This series looks better.

I'm working through some other integration issues, but will get this
staged and tested shortly.


On Sun, Jun 12, 2022 at 4:00 AM Chen Qi <Qi.Chen@...> wrote:

In order for systemd variables such as SYSTEMD_AUTO_ENABLE to have
effect, we need to inherit the systemd class. We also need to specify
the package which contains the service.

As go.bbclass already inherits goarch.bbclass, we only need to inehrit

Signed-off-by: Chen Qi <Qi.Chen@...>
.../docker-distribution/ | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/recipes-containers/docker-distribution/ b/recipes-containers/docker-distribution/
index 0dbdc49..395694a 100644
--- a/recipes-containers/docker-distribution/
+++ b/recipes-containers/docker-distribution/
@@ -16,8 +16,7 @@ S = "${WORKDIR}/git/src/"

GO_IMPORT = "import"

-inherit goarch
-inherit go
+inherit goarch go systemd

# This disables seccomp and apparmor, which are on by default in the
# go package.
@@ -66,6 +65,7 @@ FILES:docker-registry += "${systemd_unitdir}/system/docker-registry.service"
FILES:docker-registry += "${sysconfdir}/docker-distribution/*"
FILES:docker-registry += "${localstatedir}/lib/registry/"

+SYSTEMD_PACKAGES = "docker-registry"
SYSTEMD_SERVICE:docker-registry = "${@bb.utils.contains('DISTRO_FEATURES','systemd','docker-registry.service','',d)}"
SYSTEMD_AUTO_ENABLE:docker-registry = "enable"


- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

Join { to automatically receive all group messages.