Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

meta-refkit-extra testing #135

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion meta-flatpak/conf/distro/include/flatpak.inc
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ REFKIT_DEFAULT_DISTRO_FEATURES += " \
"

# Enable D-Bus session bus support, needed by flatpak.
PACKAGECONFIG_append_pn-dbus_refkit-config = " user-session"
PACKAGECONFIG_append_pn-dbus_df-refkit-config = " user-session"
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

EXTRA_OECMAKE_refkit-computervision = " \
EXTRA_OECMAKE_df-refkit-computervision = " \
-DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_UNIT_TESTS:BOOL=OFF -DBUILD_EXAMPLES:BOOL=ON \
-DBUILD_GRAPHICAL_EXAMPLES:BOOL=${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'ON', 'OFF', d)} \
"

PACKAGES_refkit-computervision = "${PN} ${PN}-dbg ${PN}-dev ${PN}-examples ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', '${PN}-graphical-examples', '', d)}"
PACKAGES_df-refkit-computervision = "${PN} ${PN}-dbg ${PN}-dev ${PN}-examples ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', '${PN}-graphical-examples', '', d)}"

SRC_URI_append_refkit-computervision = " \
SRC_URI_append_df-refkit-computervision = " \
file://0001-scripts-removed-bashisms.patch \
file://0001-examples-control-building-of-the-graphical-examples.patch \
"

RDEPENDS_${PN}_remove_refkit-computervision = "bash"
RDEPENDS_${PN}_remove_df-refkit-computervision = "bash"
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

SRC_URI_append_refkit-computervision = " \
SRC_URI_append_df-refkit-computervision = " \
file://0001-opencv-link-dynamically-against-OpenCL-library.patch \
"

DEPENDS_remove_refkit-computervision = "python"
DEPENDS_append_refkit-computervision = " python3"
DEPENDS_remove_df-refkit-computervision = "python"
DEPENDS_append_df-refkit-computervision = " python3"

python () {
if bb.utils.contains('DISTRO_FEATURES', 'refkit-computervision', True, False, d):
Expand Down
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# remove readline dependency from nftables
DEPENDS_remove_df-refkit-config = "readline"
EXTRA_OECONF_append_df-refkit-config = " --without-cli"

# make nftables require a settings package
VIRTUAL-RUNTIME_nftables-settings ?= "nftables-settings-default"
RDEPENDS_nftables_append_df-refkit-config = " ${VIRTUAL-RUNTIME_nftables-settings}"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# usbutils depends directly on libusb1, not the obsolete compatibility. This removes dependency on libusb-compat.
DEPENDS_remove_df-refkit-config = "virtual/libusb0"
DEPENDS_append_df-refkit-config = " libusb1"
Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Temporary workaround (needs to be fixed in meta-security once the
# necessary patch "net-tools: enable native and nativesdk variant"
# is in OE-core): swtpm_setup.sh needs netstat command.
DEPENDS_append_df-refkit-config = " net-tools-native"
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# The upstream recipe does not start tcsd automatically, but we
# want that because the installer image calls the TPM tools
# without starting tcsd first (it shouldn't have to!), and
# without tcsd already running, the tools just fail. A better
# solution would be socket-activation, but tcsd does not support
# that. Does not matter, tcsd is only installed when needed.
SYSTEMD_AUTO_ENABLE_df-refkit-config = "enable"
Empty file.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
do_compile_append_refkit-config () {
do_compile_append_df-refkit-config () {
oe_runmake linux${SYSTEMD_BOOT_EFI_ARCH}.efi.stub
}

do_deploy_append_refkit-config () {
do_deploy_append_df-refkit-config () {
install ${B}/linux*.efi.stub ${DEPLOYDIR}
}
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

# libnss-mdns is not supported, so remove it from the RRECOMMENDS
RRECOMMENDS_avahi-daemon_remove_libc-glibc_refkit-config = " libnss-mdns"
RRECOMMENDS_${PN}_remove_libc-glibc_refkit-config = " libnss-mdns"
RRECOMMENDS_avahi-daemon_remove_libc-glibc_df-refkit-config = " libnss-mdns"
RRECOMMENDS_${PN}_remove_libc-glibc_df-refkit-config = " libnss-mdns"

# provide libdns_sd.so and dns_sd.h header
EXTRA_OECONF_append_refkit-config = " --enable-compat-libdns_sd"
EXTRA_OECONF_append_df-refkit-config = " --enable-compat-libdns_sd"

FILES_${PN}_append_refkit-config = " \
FILES_${PN}_append_df-refkit-config = " \
${libdir}/libdns_sd.* \
"

# add firewall support
RDEPENDS_${PN}_append_refkit-firewall += " nftables"
RDEPENDS_${PN}_append_df-refkit-firewall += " nftables"

SRC_URI_append_refkit-firewall = "\
SRC_URI_append_df-refkit-firewall = "\
file://avahi.ruleset \
"

do_install_append_refkit-config() {
do_install_append_df-refkit-config() {
install -d ${D}${includedir}/avahi-compat-libdns_sd
install -m 0644 ${S}/avahi-compat-libdns_sd/dns_sd.h ${D}${includedir}/avahi-compat-libdns_sd/

}
do_install_append_refkit-firewall() {

do_install_append_df-refkit-firewall() {
install -d ${D}${libdir}/firewall/services
install -m 0644 ${WORKDIR}/avahi.ruleset ${D}${libdir}/firewall/services/

}

FILES_${PN}_append_refkit-firewall = " \
FILES_${PN}_append_df-refkit-firewall = " \
${libdir}/firewall/services/avahi.ruleset \
"
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# libusb is not required. This removes dependency on libusb-compat.
DEPENDS_remove_refkit-config = "libusb"
DEPENDS_remove_df-refkit-config = "libusb"

# split bluetoothctl into a subpackage
PACKAGES_prepend_refkit-config = "${PN}-client "
PACKAGES_prepend_df-refkit-config = "${PN}-client "
FILES_${PN}-client = "${@bb.utils.contains('PACKAGECONFIG', 'readline', '${bindir}/bluetoothctl', '', d)}"
RRECOMMENDS_${PN}_append_refkit-config = " ${PN}-client"
RRECOMMENDS_${PN}_append_df-refkit-config = " ${PN}-client"
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

# refkit.cfg disables CONFIG_SYSLOGD so the corresponding packaging
# needs to be dropped as well.
SYSTEMD_PACKAGES_df-refkit-config = ""
PACKAGES_remove_df-refkit-config = "${PN}-syslog"
RRECOMMENDS_${PN}_remove_df-refkit-config = "${PN}-syslog"

SRC_URI_append_df-refkit-config = "\
file://refkit.cfg \
"
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
# like BUILD_ID (includes ${DATETIME}) get patched to the current values in
# refkit-image.bbclass.

BUILD_ID_refkit-config = "build-id-to-be-added-during-image-creation"
OS_RELEASE_FIELDS_append_refkit-config = " BUILD_ID"
BUILD_ID_df-refkit-config = "build-id-to-be-added-during-image-creation"
OS_RELEASE_FIELDS_append_df-refkit-config = " BUILD_ID"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

SRC_URI_append_refkit-config = "\
SRC_URI_append_df-refkit-config = "\
file://0001-unit-service-allow-rerunning-reload-tasks.patch \
file://0002-path-add-ReloadOnTrigger-option.patch \
"
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#
# Upstream-Status: Inappropriate [Downstream configuration]

DEPENDS_remove_class-native_refkit-config = "lzo-native"
DEPENDS_remove_class-nativesdk_refkit-config = "lzo-native"
DEPENDS_append_class-native_refkit-config = " lz4-native"
DEPENDS_append_class-nativesdk_refkit-config = " lz4-native"
DEPENDS_remove_class-native_df-refkit-config = "lzo-native"
DEPENDS_remove_class-nativesdk_df-refkit-config = "lzo-native"
DEPENDS_append_class-native_df-refkit-config = " lz4-native"
DEPENDS_append_class-nativesdk_df-refkit-config = " lz4-native"

# nologin can come from two separate sources, shadow and util-linux.
# Normally these do not conflict, the one from shadow goes into /sbin,
Expand All @@ -18,7 +18,7 @@ DEPENDS_append_class-nativesdk_refkit-config = " lz4-native"
# Ideally we probably should make sure first that shadow is enabled to
# ensure we don't end up without any /{usr/,}sbin/nologin.

do_install_append_refkit-config () {
do_install_append_df-refkit-config () {
if [ -n "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'y', '', d)}" ];
then
rm -f ${D}${sbindir}/nologin
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require ${@ oe.utils.any_distro_features(d, "refkit-config", "bmap-tools-deploy.inc")}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ require refkit-python.inc

# This is a temporary solution until OE-core upstream supports alternatives for python
inherit ${@bb.utils.contains('DISTRO_FEATURES', 'refkit-config', 'update-alternatives', '', d)}
ALTERNATIVE_PRIORITY_refkit-config = "80"
ALTERNATIVE_${PN}-core_refkit-config = "python python_config"
ALTERNATIVE_PRIORITY_df-refkit-config = "80"
ALTERNATIVE_${PN}-core_df-refkit-config = "python python_config"

python () {
if bb.utils.contains('DISTRO_FEATURES', 'refkit-config', True, False, d):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ require refkit-python.inc

# This is a temporary solution until OE-core upstream supports alternatives for python
inherit ${@bb.utils.contains('DISTRO_FEATURES', 'refkit-config', 'update-alternatives', '', d)}
ALTERNATIVE_PRIORITY_refkit-config = "100"
ALTERNATIVE_${PN}-core_refkit-config = "python python_config"
ALTERNATIVE_PRIORITY_df-refkit-config = "100"
ALTERNATIVE_${PN}-core_df-refkit-config = "python python_config"

python () {
if bb.utils.contains('DISTRO_FEATURES', 'refkit-config', True, False, d):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Recipe changes not yet upstream which are needed to build images
# with no GPLv3-licenses components. Upstream OE-core changes will
# have this configurable, here it only depends on the "refkit-config"
# distro feature.
DEPENDS_remove_df-refkit-config = "readline gdbm db"
PACKAGES_remove_df-refkit-config = "${PN}-readline ${PN}-gdbm ${PN}-db"
PROVIDES_remove_df-refkit-config = "${PN}-readline ${PN}-gdbm ${PN}-db"
RRECOMMENDS_${PN}-core_remove_df-refkit-config = "${PN}-readline"
RDEPENDS_${PN}-modules_remove_df-refkit-config = "${PN}-readline ${PN}-gdbm ${PN}-db"
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/qemu:"

# Replace CUSE backend with socket backend.
SRC_URI_remove_refkit-config = " \
SRC_URI_remove_df-refkit-config = " \
file://0001-Provide-support-for-the-CUSE-TPM.patch \
file://0002-Introduce-condition-to-notify-waiters-of-completed-c.patch \
file://0003-Introduce-condition-in-TPM-backend-for-notification.patch \
file://0004-Add-support-for-VM-suspend-resume-for-TPM-TIS.patch \
"
SRC_URI_append_refkit-config = " \
SRC_URI_append_df-refkit-config = " \
file://0001-tpm-backend-Remove-unneeded-member-variable-from-bac.patch \
file://0002-tpm-backend-Move-thread-handling-inside-TPMBackend.patch \
file://0003-tpm-backend-Initialize-and-free-data-members-in-it-s.patch \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
EXTRA_OECONF_append_refkit-config = " \
EXTRA_OECONF_append_df-refkit-config = " \
--without-sendmail \
--with-awk=/usr/bin/awk \
"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
do_install_append_refkit-config () {
do_install_append_df-refkit-config () {
# The base recipe sets GROUP=100="users" as shared group for all
# users. In IoT Reference OS Kit, each user gets its own group (more secure default
# because it prevents accidental data sharing when setting something
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
PACKAGECONFIG_remove_df-refkit-config = "glx"
EXTRA_OECONF_append_df-refkit-config = " --disable-egl"
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DEPENDS_remove_df-refkit-config = "gconf"
EXTRA_OECONF_append_df-refkit-config = " --disable-gconf"
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

RDEPENDS_${PN}-sshd_append_refkit-firewall = " nftables"
RDEPENDS_${PN}-sshd_append_df-refkit-firewall = " nftables"

SRC_URI_append_refkit-firewall = "\
SRC_URI_append_df-refkit-firewall = "\
file://openssh-sshd.ruleset \
"

do_install_append_refkit-firewall() {
do_install_append_df-refkit-firewall() {
install -d ${D}${libdir}/firewall/services
install -m 0644 ${WORKDIR}/openssh-sshd.ruleset ${D}${libdir}/firewall/services/
}

FILES_${PN}_append_refkit-firewall = " \
FILES_${PN}_append_df-refkit-firewall = " \
${libdir}/firewall/services/openssh-sshd.ruleset \
"
23 changes: 0 additions & 23 deletions meta-refkit-core/classes/distrooverrides.bbclass

This file was deleted.

2 changes: 2 additions & 0 deletions meta-refkit-core/classes/refkit-sanity.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ REFKIT_QA_IMAGE_SYMLINK_WHITELIST = " \
/proc/mounts \
/run/lock \
/run/resolv.conf \
/run/systemd/resolve/resolv.conf \
/run/connman/resolv.conf \
/var/volatile/log \
/var/volatile/tmp \
"
Expand Down
Loading