Files
operating-system/buildroot-patches/0001-Docker-AppArmor-support.patch
Stefan Agner a0871be6c0 Bump buildroot to 2020.11-rc1 (#985)
* Update buildroot-patches for 2020.11-rc1 buildroot

* Update buildroot to 2020.11-rc1

Signed-off-by: Stefan Agner <stefan@agner.ch>

* Don't rely on sfdisk --list-free output

The --list-free (-F) argument does not allow machine readable mode. And
it seems that the output format changes over time (different spacing,
using size postfixes instead of raw blocks).

Use sfdisk json output and calculate free partition space ourselfs. This
works for 2.35 and 2.36 and is more robust since we rely on output which
is meant for scripts to parse.

* Migrate defconfigs for Buildroot 2020.11-rc1

In particular, rename BR2_TARGET_UBOOT_BOOT_SCRIPT(_SOURCE) to
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT(_SOURCE).

* Rebase/remove systemd patches for systemd 246

* Drop apparmor/libapparmor from buildroot-external

* hassos-persists: use /run as directory for lockfiles

The U-Boot tools use /var/lock by default which is not created any more
by systemd by default (it is under tmpfiles legacy.conf, which we no
longer install).

* Disable systemd-update-done.service

The service is not suited for pure read-only systems. In particular the
service needs to be able to write a file in /etc and /var. Remove the
service. Note: This is a static service and cannot be removed using
systemd-preset.

* Disable apparmor.service for now

The service loads all default profiles. Some might actually cause
problems. E.g. the profile for ping seems not to match our setup for
/etc/resolv.conf:
[85503.634653] audit: type=1400 audit(1605286002.684:236): apparmor="DENIED" operation="open" profile="ping" name="/run/resolv.conf" pid=27585 comm="ping" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
2020-11-13 18:25:44 +01:00

55 lines
2.0 KiB
Diff

From 8aa12f1835721959d0d1999fceee632404f28366 Mon Sep 17 00:00:00 2001
Message-Id: <8aa12f1835721959d0d1999fceee632404f28366.1605131156.git.stefan@agner.ch>
From: Pascal Vizeli <pvizeli@syshack.ch>
Date: Mon, 13 Jan 2020 12:27:06 +0000
Subject: [PATCH 1/7] Docker: AppArmor support
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
---
package/docker-containerd/docker-containerd.mk | 1 +
package/docker-engine/docker-engine.mk | 2 +-
package/runc/runc.mk | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/package/docker-containerd/docker-containerd.mk b/package/docker-containerd/docker-containerd.mk
index 71f9b4c065..e4a4105018 100644
--- a/package/docker-containerd/docker-containerd.mk
+++ b/package/docker-containerd/docker-containerd.mk
@@ -17,6 +17,7 @@ DOCKER_CONTAINERD_LDFLAGS = \
DOCKER_CONTAINERD_BUILD_TARGETS = cmd/ctr cmd/containerd cmd/containerd-shim
DOCKER_CONTAINERD_INSTALL_BINS = containerd containerd-shim
+DOCKER_CONTAINERD_TAGS = apparmor
ifeq ($(BR2_PACKAGE_LIBSECCOMP),y)
DOCKER_CONTAINERD_DEPENDENCIES += libseccomp host-pkgconf
diff --git a/package/docker-engine/docker-engine.mk b/package/docker-engine/docker-engine.mk
index 8cedf307ba..370cfdbaee 100644
--- a/package/docker-engine/docker-engine.mk
+++ b/package/docker-engine/docker-engine.mk
@@ -17,7 +17,7 @@ DOCKER_ENGINE_LDFLAGS = \
-X main.GitCommit=$(DOCKER_ENGINE_VERSION) \
-X main.Version=$(DOCKER_ENGINE_VERSION)
-DOCKER_ENGINE_TAGS = cgo exclude_graphdriver_zfs autogen
+DOCKER_ENGINE_TAGS = cgo exclude_graphdriver_zfs autogen apparmor
DOCKER_ENGINE_BUILD_TARGETS = cmd/dockerd
ifeq ($(BR2_PACKAGE_LIBSECCOMP),y)
diff --git a/package/runc/runc.mk b/package/runc/runc.mk
index 3d177d23d5..d9e953c640 100644
--- a/package/runc/runc.mk
+++ b/package/runc/runc.mk
@@ -10,7 +10,7 @@ RUNC_LICENSE = Apache-2.0
RUNC_LICENSE_FILES = LICENSE
RUNC_LDFLAGS = -X main.gitCommit=$(RUNC_VERSION)
-RUNC_TAGS = cgo static_build
+RUNC_TAGS = cgo static_build apparmor
ifeq ($(BR2_PACKAGE_LIBSECCOMP),y)
RUNC_TAGS += seccomp
--
2.29.2