Skip to contentSkip to conversation

docker-distribution: fix the inehrit and systemd settings

PATCH New Chen Qi 1 participant 1 message Jun 8, 2022

lore
Share & tools
lore

Chen Qi

author
#0 lore raw

PATCH 1/1 docker-distribution: fix the inehrit and systemd settings

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 go.bbclass.

---
 .../docker-distribution/docker-distribution_git.bb            | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
recipes-containers/docker-distribution/docker-distribution_git.bb +2 -2
index 95e2b66c..1d074bf3 100644
@@ -16,8 +16,7 @@ S = "${WORKDIR}/git/src/github.com/docker/distribution"
 
 GO_IMPORT = "import"
 
-inherit goarch
-inherit go
+inherit 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"
 
Signature · 1 line
2.36.0