Skip to content

Commit

Permalink
migrate the override syntax to the new syntax
Browse files Browse the repository at this point in the history
Override syntax changed from Yocto honister 3.4 and have to be adapted
to support recent Yocto versions. The current Yocto version dunfell
support both syntax versions.

Signed-off-by: Mathieu Dupré <[email protected]>
  • Loading branch information
dupremathieu committed Apr 25, 2023
1 parent 6779f33 commit fac98db
Show file tree
Hide file tree
Showing 77 changed files with 325 additions and 325 deletions.
2 changes: 1 addition & 1 deletion classes/overlay.inc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#

VOLATILE_BINDS_pn-volatile-binds ?= "\
VOLATILE_BINDS:pn-volatile-binds ?= "\
/mnt/persistent/home /home\n\
/var/volatile/usr/lib/python3.8/site-packages/__pycache__ /usr/lib/python3.8/site-packages/__pycache__\n\
/mnt/persistent/var/lib /var/lib\n\
Expand Down
6 changes: 3 additions & 3 deletions conf/distro/include/enable-uefi-secureboot.inc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# to implement UEFI SecureBoot.

# Set the UEFI SecureBoot feature
DISTRO_FEATURES_append = " efi-secure-boot"
DISTRO_FEATURES:append = " efi-secure-boot"

# Controls whether the signing is using samples or real keys
SIGNING_MODEL = "user"
Expand Down Expand Up @@ -38,5 +38,5 @@ EFI_BOOT_PATH = "/boot/EFI/BOOT"

# Set correct ESP partition target path for SELoader and
# OVMF DXE drivers
EFI_TARGET_pn-seloader = "${EFI_BOOT_PATH}"
EFI_TARGET_pn-ovmf = "${EFI_BOOT_PATH}"
EFI_TARGET:pn-seloader = "${EFI_BOOT_PATH}"
EFI_TARGET:pn-ovmf = "${EFI_BOOT_PATH}"
40 changes: 20 additions & 20 deletions conf/distro/seapath-common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,32 @@ require conf/distro/poky.conf
MAINTAINER = "[email protected]"

# Use systemd as default
DISTRO_FEATURES_append = " systemd"
DISTRO_FEATURES:append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"

# Use sysvinit for rescue system
DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"

# No need for x11 and wayland
DISTRO_FEATURES_remove = " x11"
DISTRO_FEATURES_remove = " wayland"
DISTRO_FEATURES:remove = " x11"
DISTRO_FEATURES:remove = " wayland"

# Remove unneeded distribution features
DISTRO_FEATURES_remove = " 3g alsa bluetooth nfc nfs opengl pcmcia vulkan wifi zeroconf"
DISTRO_FEATURES:remove = " 3g alsa bluetooth nfc nfs opengl pcmcia vulkan wifi zeroconf"
DISTRO_FEATURES_BACKFILL_CONSIDERED += "pulseaudio gobject-introspection-data"

# Active buildhistory
INHERIT += "buildhistory"
BUILDHISTORY_COMMIT = "1"

# Use virtualization features
DISTRO_FEATURES_append = " virtualization"
DISTRO_FEATURES_append = " kvm"
DISTRO_FEATURES:append = " virtualization"
DISTRO_FEATURES:append = " kvm"

# Enable dpdk for openvswitch
PACKAGECONFIG_append_pn-openvswitch = " dpdk"
COMPATIBLE_MACHINE_pn-dpdk = "(votp)"
PACKAGECONFIG:append:pn-openvswitch = " dpdk"
COMPATIBLE_MACHINE:pn-dpdk = "(votp)"
REQUIRED_VERSION_openvswitch = "2.15%"
REQUIRED_VERSION_dpdk = "20.11.%"

Expand All @@ -48,40 +48,40 @@ VIRTUAL-RUNTIME_login_manager = "shadow-base"
PNBLACKLIST[busybox] = "Don't build this"

# Disable and blacklist cups
PACKAGECONFIG_remove_pn-samba = "cups"
PACKAGECONFIG:remove:pn-samba = "cups"
PNBLACKLIST[cups] = "Don't build this"

# Disable snapper module to remove unneeded dependency on dbus
SAMBA4_MODULES_append_pn-samba = ",!vfs-snapper"
SAMBA4_MODULES:append:pn-samba = ",!vfs-snapper"

# Blacklist dtc
PNBLACKLIST[dtc] = "Don't build this"

# Configure QEMU to:
# * disable audio support
# * only support x86 targets
QEMU_TARGETS_pn-qemu = "i386 x86_64"
PACKAGECONFIG_remove_pn-qemu = "fdt"
EXTRA_OECONF_append_pn-qemu = " --audio-drv-list=''"
QEMU_TARGETS:pn-qemu = "i386 x86_64"
PACKAGECONFIG:remove:pn-qemu = "fdt"
EXTRA_OECONF:append:pn-qemu = " --audio-drv-list=''"

# Enable ptest
DISTRO_FEATURES_append = " ptest"
DISTRO_FEATURES:append = " ptest"

# Enable pam
DISTRO_FEATURES_append = " pam"
DISTRO_FEATURES:append = " pam"

# Enable security hardening
DISTRO_FEATURES_append = " seapath-security"
DISTRO_FEATURES:append = " seapath-security"

# Enable Ansible SSH key copy
DISTRO_FEATURES_append = " ansible"
DISTRO_FEATURES:append = " ansible"

# Enable readonly
DISTRO_FEATURES_append = " seapath-readonly"
DISTRO_FEATURES_append = " seapath-overlay"
DISTRO_FEATURES:append = " seapath-readonly"
DISTRO_FEATURES:append = " seapath-overlay"

# Enable clustering
DISTRO_FEATURES_append = " seapath-clustering"
DISTRO_FEATURES:append = " seapath-clustering"

# Set version of Libvirt to 6.3.0 (solves GH issue #22)
REQUIRED_VERSION_libvirt = "6.3.0"
Expand Down
4 changes: 2 additions & 2 deletions conf/distro/seapath-flash.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ INHERIT += "buildhistory"
BUILDHISTORY_COMMIT = "1"

# Enable Ansible SSH key copy
DISTRO_FEATURES_append = " ansible"
DISTRO_FEATURES:append = " ansible"

COMPATIBLE_MACHINE_pn-dpdk = "votp"
COMPATIBLE_MACHINE:pn-dpdk = "votp"
10 changes: 5 additions & 5 deletions conf/distro/seapath-guest.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ DISTRO_NAME = "Seapath guest Yocto distribution"
DISTRO_VERSION = "1.0"

#Remove uneeded features
DISTRO_FEATURES_remove = "seapath-clustering"
DISTRO_FEATURES_remove = "seapath-readonly"
DISTRO_FEATURES_remove = "seapath-overlay"
DISTRO_FEATURES_remove = "kvm"
DISTRO_FEATURES_remove = "virtualization"
DISTRO_FEATURES:remove = "seapath-clustering"
DISTRO_FEATURES:remove = "seapath-readonly"
DISTRO_FEATURES:remove = "seapath-overlay"
DISTRO_FEATURES:remove = "kvm"
DISTRO_FEATURES:remove = "virtualization"
4 changes: 2 additions & 2 deletions conf/distro/seapath-host-cluster-minimal.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ DISTRO_NAME = "Seapath Host Cluster Minimal Yocto distribution"
DISTRO_VERSION = "1.0"

#Remove uneeded features
DISTRO_FEATURES_remove = "seapath-readonly"
DISTRO_FEATURES_remove = "seapath-security"
DISTRO_FEATURES:remove = "seapath-readonly"
DISTRO_FEATURES:remove = "seapath-security"
8 changes: 4 additions & 4 deletions conf/distro/seapath-host-minimal.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ DISTRO_NAME = "Seapath Host Minimal Yocto distribution"
DISTRO_VERSION = "1.0"

#Remove uneeded features
DISTRO_FEATURES_remove = "seapath-clustering"
DISTRO_FEATURES_remove = "seapath-readonly"
DISTRO_FEATURES_remove = "seapath-security"
DISTRO_FEATURES:remove = "seapath-clustering"
DISTRO_FEATURES:remove = "seapath-readonly"
DISTRO_FEATURES:remove = "seapath-security"

# Remove uneeded package configuration
PACKAGECONFIG_remove_pn-net-snmp = "cluster"
PACKAGECONFIG:remove:pn-net-snmp = "cluster"
2 changes: 1 addition & 1 deletion conf/machine/votp-guest.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
#@DESCRIPTION: Machine configuration for virtual machines compatible with SEAPATH

require conf/machine/votp-machine-common.inc
MACHINE_FEATURES_append = "seapath-guest"
MACHINE_FEATURES:append = "seapath-guest"
2 changes: 1 addition & 1 deletion recipes-bsp/amd-ucode/amd-ucode_20220509.bb
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ do_install() {
}


FILES_${PN} = "${nonarch_base_libdir}/firmware/*"
FILES:${PN} = "${nonarch_base_libdir}/firmware/*"

18 changes: 9 additions & 9 deletions recipes-bsp/grub/grub-efi_%.bbappend
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Copyright (C) 2021, RTE (http://www.rte-france.com)
# SPDX-License-Identifier: Apache-2.0

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

SRC_URI += " \
file://0001-probe-Support-probing-for-partition-UUID-with-part-u.patch \
"

SRC_URI_append_class-target = " \
SRC_URI:append:class-target = " \
file://grub-efi.cfg.in \
"

do_compile_append_class-target() {
do_compile:append:class-target() {
grub_timeout=0
grub_password='grub.pbkdf2.sha512.65536.93A962261977428CADFAF1C7EAD6339B40F422991C7F86FECC8E44411686C9E36FE7B5E7352DE3F2E29042CD7A95FDFFF9998C6A6EF80F98F05C763D754AFF2F6B9A321C8FB452F93DE72457B8E89C0DD46ACDE0C7598DD67E9D730931624CD29F972EE568248DC4734A42E127316CAB87C2EC05C538BFC65B7BF6A3581582BEFD596551B383567BE95DF1B498F93867FF074E4FBF09C5BCA266E484EC22A0BD6AD2EA9E1D8DAF67FDCCEEFA4614A65BC8EB857903A012DA4FFBC0161E8F775FF173031913437567AC42E7C015A851DABD0BAF2ECBF01F3A4C38F024A74ABC3E07ABD697E5AB63EFCC0C7A91725FBB86D71A1CBE84893A876B8BD225F928581F.4E8A15EEAFD2AEFC1338A1F31B26D1B7C2ABA9C5FCE0858A05C8456D24EF994974883825900241959B8B35B73AC913437FC24AF80B6DBFF1FBD32770CF118DDD'
if [ -n "${SEAPATH_GRUB_TIMEOUT}" ] ; then
Expand Down Expand Up @@ -41,7 +41,7 @@ do_compile_append_class-target() {
cat "${WORKDIR}/grub-efi.cfg.in" >> "${B}/grub-efi.cfg"
}

do_install_prepend_class-target_votp-host() {
do_install:prepend:class-target_votp-host() {
extra_append=""
if [ -n "${SEAPATH_RT_CORES}" ] ; then
extra_append="isolcpus=${SEAPATH_RT_CORES} nohz_full=${SEAPATH_RT_CORES} rcu_nocbs=${SEAPATH_RT_CORES}"
Expand All @@ -51,7 +51,7 @@ do_install_prepend_class-target_votp-host() {

}

do_install_append_class-target() {
do_install:append:class-target() {
if [ "${UEFI_SB}" != "1" ]; then
install -D -m 0600 "${B}/grub-efi.cfg" "${D}${EFI_FILES_PATH}/grub.cfg"
fi
Expand All @@ -63,15 +63,15 @@ do_install_append_class-target() {
# also enabled.
# "grub-efi" actually depends on MOK2Verify protocol being installed by
# SELoader before its execution.
RDEPENDS_${PN}_class-target_append = "${@' seloader' if (d.getVar('UEFI_SELOADER') == '1' and d.getVar('UEFI_SB') == '1') else ''}"
RDEPENDS:${PN}:class-target:append = "${@' seloader' if (d.getVar('UEFI_SELOADER') == '1' and d.getVar('UEFI_SB') == '1') else ''}"

# Remove dependency to grub-bootconf as the configuration is installed
# in grub-efi
RDEPENDS_${PN}_class-target_remove = "virtual/grub-bootconf"
RDEPENDS:${PN}:class-target:remove = "virtual/grub-bootconf"

FILES_${PN}_remove = "${libdir}/grub"
FILES:${PN}:remove = "${libdir}/grub"

FILES_${PN}_append = " ${EFI_FILES_PATH}"
FILES:${PN}:append = " ${EFI_FILES_PATH}"

GRUB_BUILDIN += " password_pbkdf2 probe regexp chain"

Expand Down
2 changes: 1 addition & 1 deletion recipes-bsp/keymaps/keymaps_%.bbappend
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (C) 2021, RTE (http://www.rte-france.com)
# SPDX-License-Identifier: Apache-2.0

do_configure_prepend () {
do_configure:prepend () {
if [ -z "${SEAPATH_KEYMAP}" ] ; then
SEAPATH_KEYMAP=us
fi
Expand Down
6 changes: 3 additions & 3 deletions recipes-cgl/cluster-glue/cluster-glue_%.bbappend
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# SPDX-License-Identifier: Apache-2.0

#to add hacluster to the msmtp group, so that it can write to msmtp log file
RDEPENDS_${PN} += "msmtp"
RDEPENDS:${PN} += "msmtp"
DEPENDS += "msmtp"
USERADD_PARAM_${PN}:prepend = " -G msmtp "
USERADD_PARAM:${PN}:prepend = " -G msmtp "

do_install_append() {
do_install:append() {
for file in $(find ${D}${libdir}/stonith/plugins/external -type f); do
sed -i "s%${HOSTTOOLS_DIR}/%%g" "${file}"
done
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Copyright (C) 2021, RTE (http://www.rte-france.com)
# SPDX-License-Identifier: Apache-2.0

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

SRC_URI += "file://VirtualDomain"
SRC_URI_remove = "git://github.com/ClusterLabs/resource-agents"
SRC_URI:remove = "git://github.com/ClusterLabs/resource-agents"
SRC_URI += "git://github.com/ClusterLabs/resource-agents;nobranch=1"

REQUIRED_HEARTBEAT_SCRIPTS = "VirtualDomain"

do_install_append() {
do_install:append() {
# Remove tools and libraries used for NFS filesystem manipulations
#
# Note: resource-agents detects if "svclib_nfslock" is installed
Expand Down Expand Up @@ -59,5 +59,5 @@ do_install_append() {
sed -i "s%${HOSTTOOLS_DIR}/rm%/bin/rm%g" ${D}${base_libdir}/systemd/system/ldirectord.service
}

FILES_${PN} += "${libdir}/ocf/resource.d/seapath/VirtualDomain"
RDEPENDS_${PN}_remove = "lvm2 nfs-utils"
FILES:${PN} += "${libdir}/ocf/resource.d/seapath/VirtualDomain"
RDEPENDS:${PN}:remove = "lvm2 nfs-utils"
6 changes: 3 additions & 3 deletions recipes-cgl/crmsh/crmsh_4.20.bbappend
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (C) 2020, RTE (http://www.rte-france.com)
# SPDX-License-Identifier: Apache-2.0

DEPENDS_remove = "python-setuptools-native"
DEPENDS_append = " python3-setuptools-native"
DEPENDS:remove = "python-setuptools-native"
DEPENDS:append = " python3-setuptools-native"

RDEPENDS_${PN}_append = " python3-pyyaml"
RDEPENDS:${PN}:append = " python3-pyyaml"
8 changes: 4 additions & 4 deletions recipes-cgl/pacemaker/pacemaker_%.bbappend
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ SERVICE_DIRS_LIST = "pacemaker"
SERVICE_DIRS_PREFIX = "{log,lib}"
SERVICE_DIRS_OWNER = "hacluster:haclient"

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

SRC_URI_remove = "git://github.com/ClusterLabs/${BPN}.git"
SRC_URI:remove = "git://github.com/ClusterLabs/${BPN}.git"

SRC_URI += " \
git://github.com/ClusterLabs/${BPN}.git;nobranch=1 \
Expand All @@ -19,7 +19,7 @@ SRC_URI += " \
file://alert_snmp.sh \
"

do_install_append() {
do_install:append() {
install -d ${D}/${systemd_unitdir}/system/
install -m 644 ${WORKDIR}/create-var-run-resource-agents.service \
${D}/${systemd_unitdir}/system/create-var-run-resource-agents.service
Expand All @@ -31,7 +31,7 @@ do_install_append() {
install --mode=0755 ${WORKDIR}/alert_snmp.sh ${D}${localstatedir}/lib/pacemaker/alert_snmp.sh
}

FILES_${PN} += " \
FILES:${PN} += " \
${systemd_unitdir}/system/create-var-run-resource-agents.service \
${systemd_unitdir}/system/pacemaker.service \
"
6 changes: 3 additions & 3 deletions recipes-connectivity/openssh/openssh_%.bbappend
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Copyright (C) 2021, RTE (http://www.rte-france.com)
# SPDX-License-Identifier: Apache-2.0

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

SRC_URI += " \
file://sshd_config_seapath \
file://sshd_config_seapath_flash \
"

do_install_append() {
do_install:append() {
# Use permanent SSH keys
if ${@bb.utils.contains('DISTRO_FEATURES','seapath-readonly','true','false',d)}; then
install -d ${D}${sysconfdir}/ssh
Expand All @@ -23,7 +23,7 @@ do_install_append() {
fi
}

do_install_append_seapath-flash() {
do_install:append_seapath-flash() {
install -d ${D}${sysconfdir}/ssh
install -m 0644 ${WORKDIR}/sshd_config_seapath_flash \
${D}${sysconfdir}/ssh/sshd_config
Expand Down
4 changes: 2 additions & 2 deletions recipes-core/base-files/base-files_%.bbappend
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Copyright (C) 2020, RTE (http://www.rte-france.com)
# SPDX-License-Identifier: Apache-2.0

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

SRC_URI += "file://nsswitch.conf"

do_install_append() {
do_install:append() {
if ${@bb.utils.contains('DISTRO_FEATURES','seapath-security','true','false',d)}; then
install -m 755 -d ${D}/etc/
install -m 644 ${WORKDIR}/nsswitch.conf ${D}/etc/
Expand Down
6 changes: 3 additions & 3 deletions recipes-core/base-passwd/base-passwd_%.bbappend
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI_prepend = " \
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI:prepend = " \
file://passwd.master \
file://group.master \
"

do_configure_prepend () {
do_configure:prepend () {
if ${@bb.utils.contains('DISTRO_FEATURES','seapath-security','true','false',d)}; then
cp -v ${WORKDIR}/passwd.master ${S}/
cp -v ${WORKDIR}/group.master ${S}/
Expand Down
Loading

0 comments on commit fac98db

Please sign in to comment.