From a1b80b5bacbfcbd90c547ff684ddd3d67313d1e4 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Thu, 27 May 2021 13:16:38 +0200 Subject: [PATCH] pkg/config: fix systemd compile errors The errors sneaked through CI as we didn't use the systemd build tag for testing. Signed-off-by: Valentin Rothberg --- Makefile | 2 +- pkg/config/systemd.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 92de0e5a5..10edc57a4 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ GO_BUILD=$(GO) build ifeq ($(shell go help mod >/dev/null 2>&1 && echo true), true) GO_BUILD=GO111MODULE=on $(GO) build -mod=vendor endif -BUILDTAGS := containers_image_openpgp +BUILDTAGS := containers_image_openpgp,systemd DESTDIR ?= PREFIX := /usr/local CONFIGDIR := ${PREFIX}/share/containers diff --git a/pkg/config/systemd.go b/pkg/config/systemd.go index fe2be8e2b..ed014126b 100644 --- a/pkg/config/systemd.go +++ b/pkg/config/systemd.go @@ -3,6 +3,8 @@ package config import ( + "io/ioutil" + "strings" "sync" "github.com/containers/common/pkg/cgroupv2" @@ -25,6 +27,7 @@ func defaultCgroupManager() string { return SystemdCgroupsManager } + func defaultEventsLogger() string { if useSystemd() { return "journald"