meta-phosphor: change systemd.bbclass to match upstream override syntax

Upstream bbclasses changed to typically use the `:${PN}` override
syntax, including the SYSTEMD_ variables.  Change our systemd.bbclass
to do the same for consistency and perform a tree-wide variable
replacement.

Spot checked by building bletchley and witherspoon and checking
some of the SYSTEMD_LINK directives on installed packages under qemu.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I20a9dd809bff8af8759488734f80486c7228c6eb
diff --git a/meta-ampere/meta-jade/recipes-phosphor/gpio/fault-monitor.bb b/meta-ampere/meta-jade/recipes-phosphor/gpio/fault-monitor.bb
index 49376ee..4994183 100644
--- a/meta-ampere/meta-jade/recipes-phosphor/gpio/fault-monitor.bb
+++ b/meta-ampere/meta-jade/recipes-phosphor/gpio/fault-monitor.bb
@@ -19,7 +19,7 @@
 
 OBMC_FAULT_MONITOR_INSTANCES = "s0_fault_alert s1_fault_alert"
 
-SYSTEMD_ENVIRONMENT_FILE_${PN} += "obmc/gpio/s0_fault_alert \
+SYSTEMD_ENVIRONMENT_FILE:${PN} += "obmc/gpio/s0_fault_alert \
                                    obmc/gpio/s1_fault_alert \
                                   "
 
@@ -29,5 +29,5 @@
 FMT = "../${TMPL}:${TGT}.requires/${INSTFMT}"
 
 SYSTEMD_SERVICE:${PN} += "ampere_fault_led.service"
-SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT', 'OBMC_FAULT_MONITOR_INSTANCES')}"
+SYSTEMD_LINK:${PN} += "${@compose_list(d, 'FMT', 'OBMC_FAULT_MONITOR_INSTANCES')}"
 
diff --git a/meta-ampere/meta-jade/recipes-phosphor/gpio/host-gpio-handling.bb b/meta-ampere/meta-jade/recipes-phosphor/gpio/host-gpio-handling.bb
index cde625f..79bfb72 100644
--- a/meta-ampere/meta-jade/recipes-phosphor/gpio/host-gpio-handling.bb
+++ b/meta-ampere/meta-jade/recipes-phosphor/gpio/host-gpio-handling.bb
@@ -10,7 +10,7 @@
 
 OBMC_HOST_ACK_MONITOR_INSTANCES = "reboot_ack shutdown_ack"
 
-SYSTEMD_ENVIRONMENT_FILE_${PN} +="obmc/gpio/reboot_ack \
+SYSTEMD_ENVIRONMENT_FILE:${PN} +="obmc/gpio/reboot_ack \
                                   obmc/gpio/shutdown_ack \
                                  "
 
@@ -20,4 +20,4 @@
 FMT = "../${TMPL}:${TGT}.requires/${INSTFMT}"
 
 SYSTEMD_SERVICE:${PN} += "ampere-host-shutdown-ack@.service"
-SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT', 'OBMC_HOST_ACK_MONITOR_INSTANCES')}"
+SYSTEMD_LINK:${PN} += "${@compose_list(d, 'FMT', 'OBMC_HOST_ACK_MONITOR_INSTANCES')}"
diff --git a/meta-ampere/meta-jade/recipes-phosphor/gpio/id-button.bb b/meta-ampere/meta-jade/recipes-phosphor/gpio/id-button.bb
index 8e57c3e..c1a616a 100644
--- a/meta-ampere/meta-jade/recipes-phosphor/gpio/id-button.bb
+++ b/meta-ampere/meta-jade/recipes-phosphor/gpio/id-button.bb
@@ -16,7 +16,7 @@
             ${D}${bindir}/toggle_identify_led.sh
 }
 
-SYSTEMD_ENVIRONMENT_FILE_${PN} +="obmc/gpio/id_button"
+SYSTEMD_ENVIRONMENT_FILE:${PN} +="obmc/gpio/id_button"
 
 ID_BUTTON_SERVICE = "id_button"
 
@@ -26,4 +26,4 @@
 FMT = "../${TMPL}:${TGT}.requires/${INSTFMT}"
 
 SYSTEMD_SERVICE:${PN} += "id-button-pressed.service"
-SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT', 'ID_BUTTON_SERVICE')}"
+SYSTEMD_LINK:${PN} += "${@compose_list(d, 'FMT', 'ID_BUTTON_SERVICE')}"
diff --git a/meta-ampere/meta-jade/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend b/meta-ampere/meta-jade/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend
index c6400c2..527cbbd 100644
--- a/meta-ampere/meta-jade/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend
+++ b/meta-ampere/meta-jade/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend
@@ -5,8 +5,8 @@
 POWERSUPPLY_TGT = "multi-user.target"
 FMT_POWERSUPPLY = "../${TMPL_POWERSUPPLY}:${POWERSUPPLY_TGT}.requires/${INSTFMT_POWERSUPPLY}"
 
-SYSTEMD_LINK_${PN}-presence:append:mtjade = " ${@compose_list(d, 'FMT_POWERSUPPLY', 'OBMC_POWER_SUPPLY_INSTANCES')}"
+SYSTEMD_LINK:${PN}-presence:append:mtjade = " ${@compose_list(d, 'FMT_POWERSUPPLY', 'OBMC_POWER_SUPPLY_INSTANCES')}"
 
 POWERSUPPLY_ENV_FMT  = "obmc/gpio/phosphor-power-supply-{0}.conf"
 
-SYSTEMD_ENVIRONMENT_FILE_${PN}-presence:append:mtjade = " ${@compose_list(d, 'POWERSUPPLY_ENV_FMT', 'OBMC_POWER_SUPPLY_INSTANCES')}"
+SYSTEMD_ENVIRONMENT_FILE:${PN}-presence:append:mtjade = " ${@compose_list(d, 'POWERSUPPLY_ENV_FMT', 'OBMC_POWER_SUPPLY_INSTANCES')}"
diff --git a/meta-ampere/meta-jade/recipes-phosphor/gpio/psu-hotswap-reset.bb b/meta-ampere/meta-jade/recipes-phosphor/gpio/psu-hotswap-reset.bb
index 2ca18a0..839c6d4 100644
--- a/meta-ampere/meta-jade/recipes-phosphor/gpio/psu-hotswap-reset.bb
+++ b/meta-ampere/meta-jade/recipes-phosphor/gpio/psu-hotswap-reset.bb
@@ -13,7 +13,7 @@
 
 # Copies config file having arguments for psu
 # via GPIO assertion
-SYSTEMD_ENVIRONMENT_FILE_${PN} +="obmc/gpio/PSU1_B25 \
+SYSTEMD_ENVIRONMENT_FILE:${PN} +="obmc/gpio/PSU1_B25 \
                                   obmc/gpio/PSU2_B25 \
                                  "
 SYSTEMD_SERVICE:${PN} ?= "psu1_hotswap_reset.service psu2_hotswap_reset.service"
@@ -29,4 +29,4 @@
 GPIO_MONITOR_TGTFMT = "phosphor-gpio-monitor@{0}.service"
 TGT = "multi-user.target"
 PSU_MONITOR_FMT = "../${GPIO_MONITOR_TMPL}:${TGT}.requires/${GPIO_MONITOR_TGTFMT}"
-SYSTEMD_LINK_${PN} += "${@compose_list(d, 'PSU_MONITOR_FMT', 'OBMC_PSU_MONITOR_INSTANCES', 'OBMC_HOST_INSTANCES')}"
+SYSTEMD_LINK:${PN} += "${@compose_list(d, 'PSU_MONITOR_FMT', 'OBMC_PSU_MONITOR_INSTANCES', 'OBMC_HOST_INSTANCES')}"
diff --git a/meta-ampere/meta-jade/recipes-phosphor/ipmi/phosphor-ipmi-fru_%.bbappend b/meta-ampere/meta-jade/recipes-phosphor/ipmi/phosphor-ipmi-fru_%.bbappend
index d7128f4..5150e23 100644
--- a/meta-ampere/meta-jade/recipes-phosphor/ipmi/phosphor-ipmi-fru_%.bbappend
+++ b/meta-ampere/meta-jade/recipes-phosphor/ipmi/phosphor-ipmi-fru_%.bbappend
@@ -16,11 +16,11 @@
 EEPROMS_ESCAPED = "${@compose_list(d, 'EEPROM_ESCAPEDFMT', 'EEPROM_NAMES')}"
 
 ENVFMT = "obmc/eeproms/{0}"
-SYSTEMD_ENVIRONMENT_FILE_${PN}:append:mtjade := "${@compose_list(d, 'ENVFMT', 'EEPROMS')}"
+SYSTEMD_ENVIRONMENT_FILE:${PN}:append:mtjade := "${@compose_list(d, 'ENVFMT', 'EEPROMS')}"
 
 TMPL = "obmc-read-eeprom@.service"
 TGT = "multi-user.target"
 INSTFMT = "obmc-read-eeprom@{0}.service"
 FMT = "../${TMPL}:${TGT}.wants/${INSTFMT}"
 
-SYSTEMD_LINK_${PN}:append:mtjade := "${@compose_list(d, 'FMT', 'EEPROMS_ESCAPED')}"
+SYSTEMD_LINK:${PN}:append:mtjade := "${@compose_list(d, 'FMT', 'EEPROMS_ESCAPED')}"
diff --git a/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon_%.bbappend b/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon_%.bbappend
index 43a6f17..a77a59b 100644
--- a/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon_%.bbappend
+++ b/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon_%.bbappend
@@ -21,7 +21,7 @@
 ITEMS += "iio-hwmon.conf iio-hwmon-adc14.conf iio-hwmon-battery.conf"
 
 ENVS = "obmc/${MACHINE}/hwmon/{0}"
-SYSTEMD_ENVIRONMENT_FILE_${PN}:append:mtjade = " ${@compose_list(d, 'ENVS', 'ITEMS')}"
+SYSTEMD_ENVIRONMENT_FILE:${PN}:append:mtjade = " ${@compose_list(d, 'ENVS', 'ITEMS')}"
 
 do_install:append:mtjade() {
   SOURCEDIR="${WORKDIR}/obmc/${MACHINE}/hwmon"