* 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
96 lines
2.8 KiB
Makefile
96 lines
2.8 KiB
Makefile
################################################################################
|
|
#
|
|
# apparmor
|
|
#
|
|
################################################################################
|
|
|
|
# When updating the version here, please also update the libapparmor package
|
|
APPARMOR_VERSION_MAJOR = 3.0
|
|
APPARMOR_VERSION = $(APPARMOR_VERSION_MAJOR).0
|
|
APPARMOR_SITE = https://launchpad.net/apparmor/$(APPARMOR_VERSION_MAJOR)/$(APPARMOR_VERSION_MAJOR)/+download
|
|
APPARMOR_DL_SUBDIR = libapparmor
|
|
APPARMOR_LICENSE = GPL-2.0
|
|
APPARMOR_LICENSE_FILES = LICENSE parser/COPYING.GPL
|
|
|
|
APPARMOR_DEPENDENCIES = libapparmor
|
|
|
|
APPARMOR_TOOLS = parser
|
|
APPARMOR_MAKE_OPTS = USE_SYSTEM=1 DISTRO=unknown POD2MAN=true POD2HTML=true
|
|
|
|
ifeq ($(BR2_PACKAGE_GETTEXT_PROVIDES_LIBINTL),y)
|
|
APPARMOR_DEPENDENCIES += gettext
|
|
APPARMOR_MAKE_OPTS += WITH_LIBINTL=1
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_APPARMOR_BINUTILS),y)
|
|
APPARMOR_TOOLS += binutils
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_APPARMOR_UTILS),y)
|
|
APPARMOR_DEPENDENCIES += host-python3 python3
|
|
APPARMOR_TOOLS += utils
|
|
APPARMOR_MAKE_OPTS += PYTHON=$(HOST_DIR)/bin/python3
|
|
|
|
ifeq ($(BR2_PACKAGE_APPARMOR_UTILS_EXTRA),)
|
|
define APPARMOR_UTILS_NO_EXTRA
|
|
$(Q)rm -f $(addprefix $(TARGET_DIR)/usr/sbin/,aa-decode aa-notify aa-remove-unknown)
|
|
endef
|
|
APPARMOR_POST_INSTALL_TARGET_HOOKS += APPARMOR_UTILS_NO_EXTRA
|
|
endif # BR2_PACKAGE_APPARMOR_UTILS_EXTRA
|
|
|
|
endif # BR2_PACKAGE_APPARMOR_UTILS
|
|
|
|
ifeq ($(BR2_PACKAGE_APPARMOR_PROFILES),y)
|
|
APPARMOR_TOOLS += profiles
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
|
|
APPARMOR_DEPENDENCIES += linux-pam
|
|
APPARMOR_TOOLS += changehat/pam_apparmor
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_APACHE),y)
|
|
APPARMOR_DEPENDENCIES += apache
|
|
APPARMOR_TOOLS += changehat/mod_apparmor
|
|
APPARMOR_MAKE_OPTS += APXS=$(STAGING_DIR)/usr/bin/apxs
|
|
|
|
ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
|
|
define APPARMOR_FIXUP_APXS
|
|
$(SED) "s@$(PER_PACKAGE_DIR)/[^/]\+/@$(PER_PACKAGE_DIR)/apparmor/@g" \
|
|
$(STAGING_DIR)/usr/bin/apxs \
|
|
$(STAGING_DIR)/usr/build/config_vars.mk
|
|
endef
|
|
APPARMOR_POST_CONFIGURE_HOOKS += APPARMOR_FIXUP_APXS
|
|
endif
|
|
endif
|
|
|
|
define APPARMOR_BUILD_CMDS
|
|
$(foreach tool,$(APPARMOR_TOOLS),\
|
|
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) \
|
|
$(MAKE) -C $(@D)/$(tool) $(APPARMOR_MAKE_OPTS)
|
|
)
|
|
endef
|
|
|
|
define APPARMOR_INSTALL_TARGET_CMDS
|
|
$(foreach tool,$(APPARMOR_TOOLS),\
|
|
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) \
|
|
$(MAKE) -C $(@D)/$(tool) $(APPARMOR_MAKE_OPTS) \
|
|
DESTDIR=$(TARGET_DIR) install
|
|
)
|
|
endef
|
|
|
|
# Despite its name, apparmor.systemd is a sysv-init compatible startup script
|
|
define APPARMOR_INSTALL_INIT_SYSV
|
|
$(INSTALL) -D -m 0755 $(@D)/parser/apparmor.systemd \
|
|
$(TARGET_DIR)/etc/init.d/S00apparmor
|
|
endef
|
|
|
|
define APPARMOR_INSTALL_INIT_SYSTEMD
|
|
$(INSTALL) -D -m 0755 $(@D)/parser/apparmor.systemd \
|
|
$(TARGET_DIR)/lib/apparmor/apparmor.systemd
|
|
$(INSTALL) -D -m 0755 $(@D)/parser/apparmor.service \
|
|
$(TARGET_DIR)/usr/lib/systemd/system/apparmor.service
|
|
endef
|
|
|
|
$(eval $(generic-package))
|