Merge pull request #297 from mdmillerii/runtime-update
Update flash update to be useable at runtime.
diff --git a/classes/image-overlay.bbclass b/classes/image-overlay.bbclass
index 71768a6..dbe4daf 100644
--- a/classes/image-overlay.bbclass
+++ b/classes/image-overlay.bbclass
@@ -14,7 +14,7 @@
ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}.${IMAGE_BASETYPE}"
-do_generate_flash[depends] += "${INITRD_IMAGE}:do_rootfs"
-do_generate_flash[depends] += "${PN}:do_rootfs"
+do_generate_flash[depends] += "${INITRD_IMAGE}:do_image_complete"
+do_generate_flash[depends] += "${PN}:do_image_complete"
addtask generate_flash before do_build
diff --git a/classes/obmc-phosphor-image.bbclass b/classes/obmc-phosphor-image.bbclass
index d3960c7..2d97cde 100644
--- a/classes/obmc-phosphor-image.bbclass
+++ b/classes/obmc-phosphor-image.bbclass
@@ -48,9 +48,10 @@
OBMC_IMAGE_EXTRA_INSTALL ?= ""
-def build_overlay(d):
- if bb.utils.contains("IMAGE_FSTYPES", "overlay", "overlay", "0", d) != "0":
- return "image-overlay"
- return ""
+def image_overlay_enabled(d, ifEnabledStr):
+ if d.getVar('OBMC_PHOSPHOR_IMAGE_OVERLAY', True) != "1":
+ return ""
+ return ifEnabledStr
-inherit ${@build_overlay(d)}
+IMAGE_FSTYPES += "${@image_overlay_enabled(d, "overlay")}"
+inherit ${@image_overlay_enabled(d, "image-overlay")}
diff --git a/classes/obmc-phosphor-image_types_uboot.bbclass b/classes/obmc-phosphor-image_types_uboot.bbclass
index dd990bc..23903d8 100644
--- a/classes/obmc-phosphor-image_types_uboot.bbclass
+++ b/classes/obmc-phosphor-image_types_uboot.bbclass
@@ -14,6 +14,7 @@
INITRD_LINK_NAME = "${INITRD_IMAGE}-${MACHINE}${INITRAMFS_FSTYPE}"
FLASH_IMAGE_NAME ?= "flash-${MACHINE}-${DATETIME}"
+FLASH_IMAGE_NAME[vardepsexclude] = "DATETIME"
FLASH_IMAGE_LINK ?= "flash-${MACHINE}"
FLASH_UBOOT_OFFSET ?= "0"
@@ -105,3 +106,4 @@
oe_mkimage "${netimg}" "${INITRD_CTYPE}"
}
+do_generate_flash[vardepsexclude] = "DATETIME"
diff --git a/classes/skeleton-gdbus.bbclass b/classes/skeleton-gdbus.bbclass
new file mode 100644
index 0000000..58df398
--- /dev/null
+++ b/classes/skeleton-gdbus.bbclass
@@ -0,0 +1,7 @@
+inherit skeleton
+
+DEPENDS += "glib-2.0 obmc-libobmc-intf"
+
+do_install_append() {
+ oe_runmake install DESTDIR=${D}
+}
diff --git a/classes/skeleton-python.bbclass b/classes/skeleton-python.bbclass
new file mode 100644
index 0000000..5464e2d
--- /dev/null
+++ b/classes/skeleton-python.bbclass
@@ -0,0 +1,5 @@
+inherit skeleton
+inherit allarch
+inherit setuptools
+
+DEPENDS += "python"
diff --git a/classes/skeleton-sdbus.bbclass b/classes/skeleton-sdbus.bbclass
new file mode 100644
index 0000000..627ce76
--- /dev/null
+++ b/classes/skeleton-sdbus.bbclass
@@ -0,0 +1,7 @@
+inherit skeleton
+
+DEPENDS += "systemd"
+
+do_install_append() {
+ oe_runmake install DESTDIR=${D}
+}
diff --git a/classes/skeleton.bbclass b/classes/skeleton.bbclass
new file mode 100644
index 0000000..72b26fb
--- /dev/null
+++ b/classes/skeleton.bbclass
@@ -0,0 +1,7 @@
+inherit obmc-phosphor-license
+
+HOMEPAGE = "http://github.com/openbmc/skeleton"
+
+SRCREV ??= "a194b9d150b9a8d35f757bae356083cbf0d1dfd8"
+SRC_URI += "git://github.com/openbmc/skeleton"
+S = "${WORKDIR}/git/${SKELETON_DIR}"
diff --git a/common/recipes-bsp/u-boot/u-boot-fw-utils_2013.07.bb b/common/recipes-bsp/u-boot/u-boot-fw-utils_2013.07.bb
deleted file mode 100644
index bfbdcf6..0000000
--- a/common/recipes-bsp/u-boot/u-boot-fw-utils_2013.07.bb
+++ /dev/null
@@ -1,55 +0,0 @@
-#require recipes-bsp/u-boot/u-boot.inc
-
-SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities"
-SECTION = "bootloader"
-DEPENDS = "mtd-utils"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb \
- file://README;beginline=1;endline=22;md5=78b195c11cb6ef63e6985140db7d7bab"
-
-# This revision corresponds to the tag "v2013.07"
-# We use the revision in order to avoid having to fetch it from the
-# repo during parse
-# SRCREV = "62c175fbb8a0f9a926c88294ea9f7e88eb898f6c"
-SRCREV="4b44678c11ac82c7c797bb115e276181752ad54d"
-
-PV = "v2013.07+git${SRCPV}"
-
-UBRANCH = "v2013.07-aspeed-openbmc"
-SRC_URI = "git://git@github.com/openbmc/u-boot.git;branch=${UBRANCH};protocol=https"
-S = "${WORKDIR}/git"
-
-#INSANE_SKIP_${PN} = "already-stripped"
-#EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1'
-#EXTRA_OEMAKE_class-cross = 'ARCH=${TARGET_ARCH} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1'
-EXTRA_OEMAKE = 'HOSTCC="${CC}" CC="${CC}" HOSTSTRIP="true"'
-
-inherit uboot-config
-
-do_compile () {
- oe_runmake ${UBOOT_MACHINE}
- oe_runmake env
-}
-
-do_install () {
- install -d ${D}${base_sbindir}
- install -d ${D}${sysconfdir}
- install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv
- ln -sf fw_printenv ${D}${base_sbindir}/fw_setenv
- install -m 0644 ${S}/tools/env/fw_env.config ${D}${sysconfdir}/fw_env.config
-}
-
-#do_install_class-cross () {
-# install -d ${D}${bindir_cross}
-# install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_printenv
-# install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_setenv
-#}
-
-#SYSROOT_PREPROCESS_FUNCS_class-cross = "uboot_fw_utils_cross"
-#uboot_fw_utils_cross() {
-# sysroot_stage_dir ${D}${bindir_cross} ${SYSROOT_DESTDIR}${bindir_cross}
-#}
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-#BBCLASSEXTEND = "cross native"
diff --git a/common/recipes-bsp/u-boot/u-boot-fw-utils_2016.05.bb b/common/recipes-bsp/u-boot/u-boot-fw-utils_2016.05.bb
index 80d90fa..c240236 100644
--- a/common/recipes-bsp/u-boot/u-boot-fw-utils_2016.05.bb
+++ b/common/recipes-bsp/u-boot/u-boot-fw-utils_2016.05.bb
@@ -4,8 +4,8 @@
SECTION = "bootloader"
DEPENDS = "mtd-utils"
-SRCREV = "47441cc36bb8e919a066837e4d7c5a8a1c475da4"
-UBRANCH = "v2016.05-ast2500"
+SRCREV = "3f04d9fef7bbfec3a536337e7fc1b3492d20e331"
+UBRANCH = "v2016.05-aspeed-openbmc"
SRC_URI = "git://git@github.com/openbmc/u-boot.git;branch=${UBRANCH};protocol=https"
PV = "v2016.05+git${SRCPV}"
diff --git a/common/recipes-bsp/u-boot/u-boot_2013.07.bb b/common/recipes-bsp/u-boot/u-boot_2013.07.bb
deleted file mode 100644
index f2434ad..0000000
--- a/common/recipes-bsp/u-boot/u-boot_2013.07.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-require recipes-bsp/u-boot/u-boot.inc
-
-# To build u-boot for your machine, provide the following lines in your machine
-# config, replacing the assignments as appropriate for your machine.
-# UBOOT_MACHINE = "omap3_beagle_config"
-# UBOOT_ENTRYPOINT = "0x80008000"
-# UBOOT_LOADADDRESS = "0x80008000"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb \
- file://README;beginline=1;endline=22;md5=78b195c11cb6ef63e6985140db7d7bab"
-
-# We use the revision in order to avoid having to fetch it from the repo during parse
-SRCREV = "44f1262bdf39ad93032d39f17a298165372be82e"
-
-PV = "v2013.07+git${SRCPV}"
-
-UBRANCH = "v2013.07-aspeed-openbmc"
-SRC_URI = "git://git@github.com/openbmc/u-boot.git;branch=${UBRANCH};protocol=https"
-
-S = "${WORKDIR}/git"
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/common/recipes-bsp/u-boot/u-boot_2016.05.bb b/common/recipes-bsp/u-boot/u-boot_2016.05.bb
index f1d6318..bb97e8b 100644
--- a/common/recipes-bsp/u-boot/u-boot_2016.05.bb
+++ b/common/recipes-bsp/u-boot/u-boot_2016.05.bb
@@ -3,8 +3,8 @@
LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
DEPENDS += "dtc-native"
-SRCREV = "47441cc36bb8e919a066837e4d7c5a8a1c475da4"
-UBRANCH = "v2016.05-ast2500"
+SRCREV = "3f04d9fef7bbfec3a536337e7fc1b3492d20e331"
+UBRANCH = "v2016.05-aspeed-openbmc"
SRC_URI = "git://git@github.com/openbmc/u-boot.git;branch=${UBRANCH};protocol=https"
PV = "v2016.05+git${SRCPV}"
diff --git a/common/recipes-connectivity/openssl/openssl/Configure.patch b/common/recipes-connectivity/openssl/openssl/Configure.patch
new file mode 100644
index 0000000..690301b
--- /dev/null
+++ b/common/recipes-connectivity/openssl/openssl/Configure.patch
@@ -0,0 +1,15 @@
+diff --git a/Configure.bak b/Configure
+index c98107a..320cf2c 100755
+--- a/Configure.bak
++++ b/Configure
+@@ -1723,8 +1723,8 @@ while (<IN>)
+ s/^CC=.*$/CC= $cc/;
+ s/^AR=\s*ar/AR= $ar/;
+ s/^RANLIB=.*/RANLIB= $ranlib/;
+- s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $cc eq "gcc";
+- s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $ecc eq "gcc" || $ecc eq "clang";
++ s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/; # if $cc eq "gcc";
++ #s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $ecc eq "gcc" || $ecc eq "clang";
+ }
+ s/^CFLAG=.*$/CFLAG= $cflags/;
+ s/^DEPFLAG=.*$/DEPFLAG=$depflags/;
diff --git a/common/recipes-connectivity/openssl/openssl_%.bbappend b/common/recipes-connectivity/openssl/openssl_%.bbappend
index a18a552..5816aef 100644
--- a/common/recipes-connectivity/openssl/openssl_%.bbappend
+++ b/common/recipes-connectivity/openssl/openssl_%.bbappend
@@ -1,3 +1,5 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+SRC_URI_append = "file://Configure.patch"
# General config settings.
EXTRA_OECONF_append = " shared no-hw no-err no-psk no-srp no-engines "
@@ -9,3 +11,7 @@
EXTRA_OECONF_append = " no-idea no-md2 no-mdc2 no-rc5 no-md4 \
no-ripemd160 no-rmd160 no-whirlpool no-sha0 no-camellia \
no-rc2 no-rc4 no-bf no-cast no-seed no-gost "
+
+do_configure_append() {
+ oe_runmake depend
+}
diff --git a/common/recipes-core/glibc/cross-localedef-native/0001-add-support-for-Power8-LE-mode.patch b/common/recipes-core/glibc/cross-localedef-native/0001-add-support-for-Power8-LE-mode.patch
deleted file mode 100644
index 5b8c240..0000000
--- a/common/recipes-core/glibc/cross-localedef-native/0001-add-support-for-Power8-LE-mode.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From bc89a1d5329cf8f8a67a5e8c2b7ed53aa6611183 Mon Sep 17 00:00:00 2001
-From: Chris Austen <austenc@us.ibm.com>
-Date: Thu, 24 Sep 2015 14:49:24 -0500
-Subject: [PATCH 1/1] add support for Power8 LE mode
-
----
- config.guess | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/localedef/config.guess b/localedef/config.guess
-index 61f2e4c..c77ec22 100644
---- a/localedef/config.guess
-+++ b/localedef/config.guess
-@@ -876,6 +876,9 @@ EOF
- ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
- exit 0 ;;
-+ ppc64le:Linux:*:*)
-+ echo powerpc64le-unknown-linux-gnu
-+ exit 0 ;;
- alpha:Linux:*:*)
- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
- EV5) UNAME_MACHINE=alphaev5 ;;
---
-1.9.1
-
diff --git a/common/recipes-core/glibc/cross-localedef-native_2.22.bbappend b/common/recipes-core/glibc/cross-localedef-native_2.22.bbappend
deleted file mode 100644
index f065ed7..0000000
--- a/common/recipes-core/glibc/cross-localedef-native_2.22.bbappend
+++ /dev/null
@@ -1,2 +0,0 @@
-SRC_URI += "file://0001-add-support-for-Power8-LE-mode.patch"
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
diff --git a/common/recipes-core/images/core-image-minimal-initramfs.bbappend b/common/recipes-core/images/core-image-minimal-initramfs.bbappend
index 90a1c3f..5710d22 100644
--- a/common/recipes-core/images/core-image-minimal-initramfs.bbappend
+++ b/common/recipes-core/images/core-image-minimal-initramfs.bbappend
@@ -1,3 +1,4 @@
PACKAGE_INSTALL_remove = "initramfs-live-boot initramfs-live-install initramfs-live-install-efi"
PACKAGE_INSTALL += "obmc-phosphor-initfs"
+INITRAMFS_CTYPE ?= "lzma"
INITRAMFS_FSTYPES = "cpio.${INITRAMFS_CTYPE}"
diff --git a/common/recipes-core/os-release/os-release.bbappend b/common/recipes-core/os-release/os-release.bbappend
index 3dd203b..f9befa6 100644
--- a/common/recipes-core/os-release/os-release.bbappend
+++ b/common/recipes-core/os-release/os-release.bbappend
@@ -17,3 +17,4 @@
OS_RELEASE_FIELDS_append = " BUILD_ID"
do_compile[nostamp] = "1"
+do_compile_remove[vardeps] = "BUILD_ID"
diff --git a/common/recipes-core/systemd/systemd/0100-systemd_networkd_dbus_setaddress.patch b/common/recipes-core/systemd/systemd/0100-systemd_networkd_dbus_setaddress.patch
deleted file mode 100644
index e105ddd..0000000
--- a/common/recipes-core/systemd/systemd/0100-systemd_networkd_dbus_setaddress.patch
+++ /dev/null
@@ -1,1209 +0,0 @@
-From 4bdb01553409269f992cd3ae76f06aeebf498ade Mon Sep 17 00:00:00 2001
-From: Hariharasubramanian R <hramasub@in.ibm.com>
-Date: Thu, 4 Feb 2016 09:52:48 -0600
-Subject: [PATCH] Sprint 5 : DBus API for network address configuration
-
----
- src/network/networkd-link-bus.c | 375 +++++++++++++++++++
- src/network/networkd-network-bus.c | 601 ++++++++++++++++++++++++++++++
- src/network/networkd-network.c | 108 ++++++
- src/network/org.freedesktop.network1.conf | 20 +
- 4 files changed, 1104 insertions(+)
-
-diff --git a/src/network/networkd-link-bus.c b/src/network/networkd-link-bus.c
-index 1a1524d..5af57e1 100644
---- a/src/network/networkd-link-bus.c
-+++ b/src/network/networkd-link-bus.c
-@@ -25,15 +25,69 @@
- #include "networkd.h"
- #include "networkd-link.h"
-
-+#define SYSTEMD_NETWORKD_DBUS 1
-+#define SYSTEMD_NETWORKD_DBUS_SETMAC_NETLINK 1
-+
-+#ifdef SYSTEMD_NETWORKD_DBUS
-+/*
-+#include "hostname-util.h"
-+#include "network-internal.h"
-+#include "networkd-link.h"
-+#include "bus-util.h"
-+*/
-+#include <stdio.h>
-+#include <linux/filter.h>
-+#include <netinet/if_ether.h>
-+
-+#include <linux/sockios.h>
-+#include <sys/socket.h>
-+#include <net/if.h>
-+#include <sys/types.h>
-+#include <sys/wait.h>
-+
-+#if 0
-+#include "util.h" /* bus/util.h */
-+#include "sparse-endian.h" /* bus/util.h */
-+#endif
-+
-+#include "sd-network.h"
-+#include "sd-netlink.h"
-+#include "socket-util.h"
-+#include "ether-addr-util.h"
-+#include "netlink-internal.h"
-+/*
-+#include "local-addresses.h"
-+*/
-+#endif
-+
- static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_operational_state, link_operstate, LinkOperationalState);
- static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_administrative_state, link_state, LinkState);
-
-+#ifdef SYSTEMD_NETWORKD_DBUS
-+static int method_get_address (sd_bus_message *m, void* userdata, sd_bus_error *error);
-+static int method_set_address (sd_bus_message *m, void* userdata, sd_bus_error *error);
-+#endif
-+
-+#if defined (SYSTEMD_NETWORKD_DBUS_SETMAC_IPV4LL)
-+static int link_arp_network_bind_raw_socket(int index, union sockaddr_union *link);
-+static int link_arp_network_send_raw_socket(int fd, const union sockaddr_union *link, const struct ether_arp *arp);
-+#elif defined (SYSTEMD_NETWORKD_DBUS_SETMAC_NETLINK)
-+static int link_if_updown(sd_netlink* rtnl, sd_netlink_message** req, sd_netlink_message** rep, int ifindex, int cmd);
-+static int link_if_setaddr(sd_netlink* rtnl, sd_netlink_message** req, sd_netlink_message** rep, int ifindex, const char* ea);
-+#endif
-+
- const sd_bus_vtable link_vtable[] = {
- SD_BUS_VTABLE_START(0),
-
- SD_BUS_PROPERTY("OperationalState", "s", property_get_operational_state, offsetof(Link, operstate), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
- SD_BUS_PROPERTY("AdministrativeState", "s", property_get_administrative_state, offsetof(Link, state), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
-
-+#ifdef SYSTEMD_NETWORKD_DBUS
-+ /* device name */
-+ SD_BUS_METHOD("GetAddress", "s", "s", method_get_address, SD_BUS_VTABLE_UNPRIVILEGED),
-+ /* device name, mac addr */
-+ SD_BUS_METHOD("SetAddress", "ss", "s", method_set_address, SD_BUS_VTABLE_UNPRIVILEGED),
-+#endif
- SD_BUS_VTABLE_END
- };
-
-@@ -136,3 +190,324 @@ int link_send_changed(Link *link, const char *property, ...) {
- "org.freedesktop.network1.Link",
- l);
- }
-+
-+static int method_set_address (sd_bus_message *m, void* userdata, sd_bus_error *error)
-+{
-+ _cleanup_netlink_unref_ sd_netlink *rtnl = NULL;
-+ _cleanup_netlink_message_unref_ sd_netlink_message *req = NULL;
-+ _cleanup_netlink_message_unref_ sd_netlink_message *reply = NULL;
-+ _cleanup_bus_message_unref_ sd_bus_message *resp = NULL;
-+ Manager *mgr = userdata;
-+
-+ struct udev* udev = NULL;
-+ struct udev_device* udev_eth = NULL;
-+ const char* device = NULL;
-+ const char* ea = NULL;
-+ char devpath [32] = "/sys/class/net/";
-+
-+ int r;
-+ int pid=0;
-+ unsigned char ifindex;
-+
-+#if defined(SYSTEMD_NETWORKD_DBUS_SETMAC_IPV4LL)
-+ bool have_mac;
-+ struct ether_addr e;
-+ struct ether_addr* ep = NULL;
-+ union sockaddr_union link;
-+ uint8_t seed[8];
-+ uint8_t i=0;
-+
-+ struct ifreq dev;
-+ int sock;
-+#endif
-+
-+
-+ assert(m);
-+ assert(mgr);
-+
-+ r = sd_bus_message_read (m, "ss", &device, &ea);
-+ if (r < 0)
-+ return r;
-+
-+/*
-+ if (isempty (device))
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid Device Name.");
-+
-+ if (isempty (ea))
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid MAC Address.");
-+*/
-+
-+ udev = udev_new();
-+ udev_eth = udev_device_new_from_syspath(udev, strcat (devpath, device));
-+ if (!udev_eth)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "Could not find udev device");
-+
-+ ifindex = udev_device_get_ifindex(udev_eth);
-+
-+#if defined (SYSTEMD_NETWORKD_DBUS_SETMAC_IPV4LL)
-+ r = link_arp_network_bind_raw_socket(ifindex, &link);
-+ if (r < 0)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Unable to bind ARP Raw socket.");
-+#elif defined (SYSTEMD_NETWORKD_DBUS_SETMAC_IOCTL)
-+ sock = socket (AF_INET, SOCK_DGRAM, 0);
-+ if (sock < 0)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Unable to bind socket.");
-+
-+ strcpy (dev.ifr_name, device);
-+ if (ioctl(sock, SIOCGIFHWADDR, &dev) < 0)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Unable to bind socket.");
-+#elif defined (SYSTEMD_NETWORKD_DBUS_SETMAC_NETLINK)
-+ r = link_if_updown (rtnl, &req, &reply, ifindex, 0); /* i/f down */
-+ if (r < 0)
-+ /*return sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "Error shutting down interface");*/
-+ sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "Error shutting down interface");
-+
-+ r = link_if_setaddr(rtnl, &req, &reply, ifindex, ea);
-+ if (r < 0)
-+ /*return sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "Error setting MAC addr on interface");*/
-+ sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "Error setting MAC addr on interface");
-+
-+ r = link_if_updown (rtnl, &req, &reply, ifindex, 1); /* i/f up */
-+ if (r < 0)
-+ /*return sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "Error starting up interface");*/
-+ sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "Error starting up interface");
-+
-+ /* Set U-Boot environment variable.*/
-+ pid = fork ();
-+ if (!pid)
-+ {
-+ char* argv [] = {"/sbin/fw_setenv", "ethaddr", ea, NULL};
-+ execv (argv[0], argv);
-+ exit (1);
-+ }
-+ else
-+ {
-+ int childerror = 0;
-+
-+ waitpid (pid, &childerror, 0);
-+ if (childerror)
-+ {
-+ sd_bus_error_setf(error, SD_BUS_ERROR_NO_MEMORY, "Error setting u-boot env");
-+ }
-+ }
-+#endif
-+
-+ r = sd_bus_message_new_method_return(m, &resp);
-+ if (r < 0)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_NO_MEMORY, "Error allocating reply messgage");
-+
-+ r = sd_bus_message_append(resp, "s", ea);
-+ if (r < 0)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "Error appending to reply messgage");
-+
-+ r = sd_bus_send(mgr->bus, resp, NULL);
-+
-+ /*return sd_bus_reply_method_return(m, "s", "Setting IFLA address ...");*/
-+ return sd_bus_reply_method_return(m, "s", ea);
-+
-+}
-+
-+static int method_get_address (sd_bus_message *m, void* userdata, sd_bus_error *error)
-+{
-+ _cleanup_netlink_unref_ sd_netlink *rtnl = NULL;
-+ _cleanup_netlink_message_unref_ sd_netlink_message *req = NULL;
-+ _cleanup_netlink_message_unref_ sd_netlink_message *reply = NULL;
-+ _cleanup_bus_message_unref_ sd_bus_message *resp = NULL;
-+ Manager *mgr = userdata;
-+
-+ struct udev* udev = NULL;
-+ struct udev_device* udev_eth = NULL;
-+ const char* device = NULL;
-+ char devpath [32] = "/sys/class/net/";
-+
-+ int r;
-+ unsigned char ifindex;
-+ bool have_mac;
-+ struct ether_addr e;
-+ char ea[ETHER_ADDR_TO_STRING_MAX];
-+
-+ assert(m);
-+ assert(mgr);
-+
-+ r = sd_bus_message_read (m, "s", &device);
-+ if (r < 0)
-+ return r;
-+
-+ if (isempty (device))
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid Device Name.");
-+
-+ udev = udev_new();
-+ udev_eth = udev_device_new_from_syspath(udev, strcat (devpath, device));
-+ if (!udev_eth)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "Could not find udev device");
-+
-+ ifindex = udev_device_get_ifindex(udev_eth);
-+
-+ r = sd_netlink_open(&rtnl);
-+ if (r < 0)
-+ return log_error_errno(r, "Failed to connect to netlink:"); /* fixme */
-+
-+ r = sd_rtnl_message_new_link(rtnl, &req, RTM_GETLINK, ifindex);
-+ if (r < 0)
-+ return r;
-+
-+ r = sd_netlink_call(rtnl, req, 0, &reply); /* fixme */
-+ if (r < 0)
-+ return r;
-+
-+ have_mac = sd_netlink_message_read_ether_addr(reply, IFLA_ADDRESS, &e) >= 0;
-+ if (!have_mac)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "Error reading IFLA address");
-+
-+ ether_addr_to_string(&e, ea);
-+
-+ r = sd_bus_message_new_method_return(m, &resp);
-+ if (r < 0)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_NO_MEMORY, "Error allocating reply messgage");
-+
-+ r = sd_bus_message_append(resp, "s", ea);
-+ if (r < 0)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "Error appending to reply messgage");
-+
-+ r = sd_bus_send(mgr->bus, resp, NULL);
-+
-+ /*return sd_bus_reply_method_return(m, "s", "Getting IFLA address ...");*/
-+ return sd_bus_reply_method_return(m, "s", ea);
-+}
-+
-+#if defined (SYSTEMD_NETWORKD_DBUS_SETMAC_IPV4LL)
-+/*----------------------------------------------------------------------------*/
-+/* ARP helper routines copied from ipv4ll-network.c */
-+/*----------------------------------------------------------------------------*/
-+static int link_arp_network_bind_raw_socket(int ifindex, union sockaddr_union *link) {
-+
-+ static const struct sock_filter filter[] = {
-+ BPF_STMT(BPF_LD + BPF_W + BPF_LEN, 0), /* A <- packet length */
-+ BPF_JUMP(BPF_JMP + BPF_JGE + BPF_K, sizeof(struct ether_arp), 1, 0), /* packet >= arp packet ? */
-+ BPF_STMT(BPF_RET + BPF_K, 0), /* ignore */
-+ BPF_STMT(BPF_LD + BPF_H + BPF_ABS, offsetof(struct ether_arp, ea_hdr.ar_hrd)), /* A <- header */
-+ BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ARPHRD_ETHER, 1, 0), /* header == ethernet ? */
-+ BPF_STMT(BPF_RET + BPF_K, 0), /* ignore */
-+ BPF_STMT(BPF_LD + BPF_H + BPF_ABS, offsetof(struct ether_arp, ea_hdr.ar_pro)), /* A <- protocol */
-+ BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ETHERTYPE_IP, 1, 0), /* protocol == IP ? */
-+ BPF_STMT(BPF_RET + BPF_K, 0), /* ignore */
-+ BPF_STMT(BPF_LD + BPF_H + BPF_ABS, offsetof(struct ether_arp, ea_hdr.ar_op)), /* A <- operation */
-+ BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ARPOP_REQUEST, 0, 1), /* protocol == request ? */
-+ BPF_STMT(BPF_RET + BPF_K, 65535), /* return all */
-+ BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ARPOP_REPLY, 0, 1), /* protocol == reply ? */
-+ BPF_STMT(BPF_RET + BPF_K, 65535), /* return all */
-+ BPF_STMT(BPF_RET + BPF_K, 0), /* ignore */
-+ };
-+ struct sock_fprog fprog = {
-+ .len = ELEMENTSOF(filter),
-+ .filter = (struct sock_filter*) filter
-+ };
-+ _cleanup_close_ int s = -1;
-+ int r;
-+
-+ assert(ifindex > 0);
-+ assert(link);
-+
-+ s = socket(PF_PACKET, SOCK_DGRAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0);
-+ if (s < 0)
-+ return -errno;
-+
-+ r = setsockopt(s, SOL_SOCKET, SO_ATTACH_FILTER, &fprog, sizeof(fprog));
-+ if (r < 0)
-+ return -errno;
-+
-+ link->ll.sll_family = AF_PACKET;
-+ link->ll.sll_protocol = htons(ETH_P_ARP);
-+ link->ll.sll_ifindex = ifindex;
-+ link->ll.sll_halen = ETH_ALEN;
-+ memset(link->ll.sll_addr, 0xff, ETH_ALEN);
-+
-+ r = bind(s, &link->sa, sizeof(link->ll));
-+ if (r < 0)
-+ return -errno;
-+
-+ r = s;
-+ s = -1;
-+
-+ return r;
-+}
-+static int arp_network_send_raw_socket(int fd, const union sockaddr_union *link,
-+ const struct ether_arp *arp) {
-+ int r;
-+
-+ assert(arp);
-+ assert(link);
-+ assert(fd >= 0);
-+
-+ r = sendto(fd, arp, sizeof(struct ether_arp), 0, &link->sa, sizeof(link->ll));
-+ if (r < 0)
-+ return -errno;
-+
-+ return 0;
-+}
-+#endif
-+
-+#if defined (SYSTEMD_NETWORKD_DBUS_SETMAC_NETLINK)
-+/* */
-+/* Bring interface up/down */
-+int link_if_updown(sd_netlink* rtnl, sd_netlink_message** req, sd_netlink_message** rep, int ifindex, int cmd)
-+{
-+ int r=0;
-+ struct ifinfomsg *ifi;
-+
-+ r = message_new(rtnl, req, RTM_NEWLINK);
-+ if (r < 0)
-+ return r;
-+
-+ (*req)->hdr->nlmsg_len = NLMSG_LENGTH(sizeof (struct ifinfomsg));
-+ (*req)->hdr->nlmsg_flags = NLM_F_REQUEST;
-+ (*req)->hdr->nlmsg_type = RTM_NEWLINK;
-+
-+ ifi = NLMSG_DATA((*req)->hdr);
-+
-+ ifi->ifi_family = AF_UNSPEC;
-+ ifi->ifi_change |= IFF_UP;
-+ ifi->ifi_index = index;
-+
-+ /* when IFF_UP flag is set i/f will be active, otherwise i/f is shut down */
-+ if (cmd)
-+ ifi->ifi_flags |= IFF_UP;
-+
-+ return sd_netlink_call(rtnl, *req, 0, rep);
-+}
-+
-+/* Set interface MAC address */
-+int link_if_setaddr(sd_netlink* rtnl, sd_netlink_message** req, sd_netlink_message** rep, int ifindex, const char* ea)
-+{
-+ int r=0;
-+ int i=0;
-+
-+ struct ifinfomsg *ifi;
-+ struct ether_addr e;
-+ struct ether_addr* ep;
-+
-+ r = message_new(rtnl, req, RTM_NEWLINK);
-+ if (r < 0)
-+ return r;
-+
-+ (*req)->hdr->nlmsg_len = NLMSG_LENGTH(sizeof (struct ifinfomsg));
-+ (*req)->hdr->nlmsg_flags = NLM_F_REQUEST;
-+ (*req)->hdr->nlmsg_type = RTM_NEWLINK;
-+
-+ ifi = NLMSG_DATA((*req)->hdr);
-+
-+ ifi->ifi_family = AF_UNSPEC;
-+ ifi->ifi_index = ifindex;
-+
-+ ep = ether_aton (ea);
-+ if (!ep)
-+ return -1;
-+
-+ for (i=0; i<6; i++)
-+ e.ether_addr_octet[i] = ep->ether_addr_octet[i];
-+
-+ r = sd_netlink_message_append_ether_addr(*req, IFLA_ADDRESS, &e);
-+
-+ return sd_netlink_call(rtnl, *req, 0, rep);
-+}
-+#endif
-diff --git a/src/network/networkd-network-bus.c b/src/network/networkd-network-bus.c
-index 5717a15..0a4cdd6 100644
---- a/src/network/networkd-network-bus.c
-+++ b/src/network/networkd-network-bus.c
-@@ -19,10 +19,39 @@
- along with systemd; If not, see <http://www.gnu.org/licenses/>.
- ***/
-
-+#define SYSTEMD_NETWORKD_DBUS 1
-+
-+#ifdef SYSTEMD_NETWORKD_DBUS
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <errno.h>
-+#include <string.h>
-+#include <netinet/ether.h>
-+#include <linux/if.h>
-+#endif
-+
- #include "strv.h"
-
- #include "networkd.h"
-
-+#ifdef SYSTEMD_NETWORKD_DBUS
-+#include "hostname-util.h"
-+#include "network-internal.h"
-+#include "networkd-link.h"
-+#include "bus-util.h"
-+
-+#include "sd-network.h"
-+#include "sd-netlink.h"
-+#include "local-addresses.h"
-+#endif
-+
-+#ifdef SYSTEMD_NETWORKD_DBUS
-+int network_address_added_handler (sd_netlink* rtnl, sd_netlink_message* m, void* userdata);
-+int network_rtnl_process_address(sd_netlink *rtnl, sd_netlink_message *message, void *userdata, Address* address); /* fixme */
-+static int method_get_address (sd_bus_message *m, void* userdata, sd_bus_error *error); /* fixme */
-+int network_save_static (int cmd, const char* device, const char* ipaddr, int prefixlen, const char* gwaddr);
-+#endif
-+
- static int property_get_ether_addrs(
- sd_bus *bus,
- const char *path,
-@@ -56,6 +85,11 @@ static int property_get_ether_addrs(
- return sd_bus_message_close_container(reply);
- }
-
-+#ifdef SYSTEMD_NETWORKD_DBUS
-+static int method_add_address (sd_bus_message *m, void* userdata, sd_bus_error *error);
-+static int method_del_address (sd_bus_message *m, void* userdata, sd_bus_error *error);
-+#endif
-+
- const sd_bus_vtable network_vtable[] = {
- SD_BUS_VTABLE_START(0),
-
-@@ -67,6 +101,13 @@ const sd_bus_vtable network_vtable[] = {
- SD_BUS_PROPERTY("MatchType", "as", NULL, offsetof(Network, match_type), SD_BUS_VTABLE_PROPERTY_CONST),
- SD_BUS_PROPERTY("MatchName", "as", NULL, offsetof(Network, match_name), SD_BUS_VTABLE_PROPERTY_CONST),
-
-+#ifdef SYSTEMD_NETWORKD_DBUS
-+ /* device, IP, netmask, family, flags, scope, gateway */
-+ SD_BUS_METHOD("AddAddress", "sssyyys", "x", method_add_address, SD_BUS_VTABLE_UNPRIVILEGED),
-+ SD_BUS_METHOD("DelAddress", "sssyyys", "x", method_del_address, SD_BUS_VTABLE_UNPRIVILEGED),
-+ /* (family, prefixlen, flags, scope, IP)+ gateway */
-+ SD_BUS_METHOD("GetAddress", "s", "a(iyyus)s", method_get_address, SD_BUS_VTABLE_UNPRIVILEGED),
-+#endif
- SD_BUS_VTABLE_END
- };
-
-@@ -152,3 +193,563 @@ int network_object_find(sd_bus *bus, const char *path, const char *interface, vo
-
- return 1;
- }
-+
-+#ifdef SYSTEMD_NETWORKD_DBUS
-+
-+static int method_add_address (sd_bus_message *m, void* userdata, sd_bus_error *error)
-+{
-+ _cleanup_bus_message_unref_ sd_bus_message* resp = NULL;
-+ _cleanup_netlink_unref_ sd_netlink* rtnl = NULL;
-+ _cleanup_netlink_message_unref_ sd_netlink_message* req = NULL;
-+ _cleanup_netlink_message_unref_ sd_netlink_message* reply = NULL;
-+ _cleanup_address_free_ Address *addr = NULL;
-+ _cleanup_route_free_ Route *rt = NULL;
-+ Manager *mgr = userdata;
-+ Link* link = NULL;
-+ struct udev* udev = NULL;
-+ struct udev_device* udev_eth = NULL;
-+
-+ const char* device = NULL;
-+ const char* ipaddr = NULL;
-+ const char* netmask = NULL;
-+ const char* gateway = NULL;
-+ char devpath [32] = "/sys/class/net/";
-+
-+ unsigned char family;
-+ unsigned char prefixlen;
-+ unsigned char flags;
-+ unsigned char scope;
-+ unsigned char ifindex;
-+
-+ struct in_addr nm;
-+ struct in_addr ip;
-+ struct in_addr gw;
-+ int r;
-+
-+ assert(m);
-+ assert(mgr);
-+
-+ r = sd_bus_message_read (m, "sssyyys", &device, &ipaddr, &netmask, &family, &flags, &scope, &gateway);
-+ if (r < 0)
-+ return r;
-+
-+ if (isempty (device))
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid Device Name.");
-+
-+ if (isempty (ipaddr))
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid IP Address.");
-+
-+ if (isempty (netmask))
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid IP Netmask.");
-+
-+ assert(family == AF_INET || family == AF_INET6);
-+
-+ udev = udev_new();
-+ udev_eth = udev_device_new_from_syspath(udev, strcat (devpath, device));
-+ if (!udev_eth)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "Could not find udev device");
-+
-+ ifindex = udev_device_get_ifindex(udev_eth);
-+
-+ inet_aton (netmask, &nm);
-+ inet_aton (ipaddr, &ip);
-+ if (!isempty (gateway)) inet_aton (gateway, &gw);
-+
-+ prefixlen = in_addr_netmask_to_prefixlen(&nm);
-+ assert(prefixlen > 0);
-+
-+#if 0
-+ r = network_save_static (1, device, ipaddr, prefixlen, gateway); /* persist config - add */
-+ if (r)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, strerror(r));
-+#endif
-+
-+ r = address_new_dynamic(&addr);
-+ if (r < 0)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_NO_MEMORY, "Error allocating new address");
-+
-+ r = sd_netlink_open(&rtnl);
-+ if (r < 0)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_IO_ERROR, "Failed to connect to netlink");
-+
-+ link = new0(Link, 1);
-+ if (!link)
-+ return -ENOMEM;
-+
-+ link->network = new0(Network, 1);
-+ if (!link->network)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_NO_MEMORY, "Could not alloc memory for Network");
-+
-+ link->n_ref = 1;
-+ link->manager = mgr;
-+ link->manager->rtnl = rtnl;
-+ link->state = LINK_STATE_PENDING;
-+ link->rtnl_extended_attrs = true;
-+ link->ifindex = ifindex;
-+ link->ifname = strdup(device); /*FIXME:*/
-+ if (!link->ifname)
-+ return -ENOMEM;
-+
-+ addr->family = family;
-+ addr->in_addr.in.s_addr = ip.s_addr;
-+ addr->prefixlen = prefixlen;
-+ addr->broadcast.s_addr = ip.s_addr | ~nm.s_addr;
-+
-+ LIST_PREPEND(addresses, link->network->static_addresses, addr);
-+
-+ if (!isempty (gateway))
-+ {
-+ r = route_new_dynamic(&rt, RTPROT_STATIC);
-+ if (r < 0)
-+ return r;
-+
-+ rt->protocol = RTPROT_STATIC;
-+ rt->network = link->network;
-+ rt->family = family;
-+ rt->scope = RT_SCOPE_LINK; /* FIXME: */
-+ rt->dst_prefixlen = prefixlen; /* FIXME: AF_INET assumed */
-+/*
-+ rt->dst_addr.in = gw;
-+ rt->in_addr.in = ip.s_addr & nm.s_addr;
-+*/
-+ rt->dst_addr.in.s_addr = ip.s_addr & nm.s_addr;
-+ rt->in_addr.in = gw;
-+
-+ LIST_PREPEND(routes, link->network->static_routes, rt);
-+ }
-+
-+ /* send an nlmsg (RTM_NEWADDR) and append address to link address list */
-+ r = address_update (addr, link, network_address_added_handler);
-+ if (r < 0)
-+ return r;
-+
-+ r = sd_bus_message_new_method_return(m, &resp);
-+ if (r < 0)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_NO_MEMORY, "Error allocating reply messgage");
-+
-+ r = sd_bus_message_append(resp, "x", 0);
-+ if (r < 0)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "Error appending to reply messgage");
-+
-+ /*r = sd_bus_send(mgr->bus, resp, NULL);*/
-+ r = sd_bus_send(NULL, resp, NULL);
-+ if (r < 0)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "Error sending reply messgage");
-+
-+
-+ return sd_bus_reply_method_return(m, "s", "Adding IP address...");
-+}
-+
-+static int method_del_address (sd_bus_message *m, void* userdata, sd_bus_error *error)
-+{
-+ _cleanup_bus_message_unref_ sd_bus_message* resp = NULL;
-+ _cleanup_netlink_unref_ sd_netlink* rtnl = NULL;
-+ _cleanup_netlink_message_unref_ sd_netlink_message* req = NULL;
-+ _cleanup_netlink_message_unref_ sd_netlink_message* reply = NULL;
-+ _cleanup_address_free_ Address *addr = NULL;
-+ _cleanup_route_free_ Route *rt = NULL;
-+ Manager *mgr = userdata;
-+ Link* link = NULL;
-+ struct udev* udev = NULL;
-+ struct udev_device* udev_eth = NULL;
-+
-+ const char* device = NULL;
-+ const char* ipaddr = NULL;
-+ const char* netmask = NULL;
-+ const char* gateway = NULL;
-+ char devpath [32] = "/sys/class/net/";
-+
-+ unsigned char family;
-+ unsigned char prefixlen;
-+ unsigned char flags;
-+ unsigned char scope;
-+ unsigned char ifindex;
-+
-+ struct in_addr nm;
-+ struct in_addr ip;
-+ struct in_addr gw;
-+ int r;
-+
-+ assert(m);
-+ assert(mgr);
-+
-+ r = sd_bus_message_read (m, "sssyyys", &device, &ipaddr, &netmask, &family, &flags, &scope, &gateway);
-+ if (r < 0)
-+ return r;
-+
-+ if (isempty (device))
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid Device Name.");
-+
-+ if (isempty (ipaddr))
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid IP Address.");
-+
-+ if (isempty (netmask))
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid IP Netmask.");
-+
-+ assert(family == AF_INET || family == AF_INET6);
-+
-+ udev = udev_new();
-+ udev_eth = udev_device_new_from_syspath(udev, strcat (devpath, device));
-+ if (!udev_eth)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "Could not find udev device");
-+
-+ ifindex = udev_device_get_ifindex(udev_eth);
-+
-+ inet_aton (netmask, &nm);
-+ inet_aton (ipaddr, &ip);
-+ if (!isempty (gateway)) inet_aton (gateway, &gw);
-+
-+ prefixlen = in_addr_netmask_to_prefixlen(&nm);
-+ assert(prefixlen > 0);
-+
-+ r = address_new_dynamic(&addr);
-+ if (r < 0)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_NO_MEMORY, "Error allocating new address");
-+
-+ r = sd_netlink_open(&rtnl);
-+ if (r < 0)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_IO_ERROR, "Failed to connect to netlink");
-+
-+ link = new0(Link, 1);
-+ if (!link)
-+ return -ENOMEM;
-+
-+ link->network = new0(Network, 1);
-+ if (!link->network)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_NO_MEMORY, "Could not alloc memory for Network");
-+
-+ link->n_ref = 1;
-+ link->manager = mgr;
-+ link->manager->rtnl = rtnl;
-+ link->state = LINK_STATE_PENDING;
-+ link->rtnl_extended_attrs = true;
-+ link->ifindex = ifindex;
-+ link->ifname = strdup(device);
-+ if (!link->ifname)
-+ return -ENOMEM;
-+
-+ addr->family = family;
-+ addr->in_addr.in.s_addr = ip.s_addr;
-+ addr->prefixlen = prefixlen;
-+ addr->broadcast.s_addr = ip.s_addr | ~nm.s_addr;
-+
-+ if (!isempty (gateway))
-+ {
-+ r = route_new_dynamic(&rt, RTPROT_STATIC);
-+ if (r < 0)
-+ return r;
-+
-+ rt->network = link->network;
-+ rt->family = family;
-+ rt->scope = RT_SCOPE_LINK; /* FIXME: */
-+ rt->dst_prefixlen = 32; /* FIXME: AF_INET assumed */
-+ rt->dst_addr.in = gw;
-+
-+ /*LIST_PREPEND(routes, link->network->static_routes, rt);*/
-+ /* Drop the Gateway */
-+ route_drop (rt, link, link_route_drop_handler);
-+ }
-+
-+ /* send an nlmsg to delete address from address list */
-+ r = address_drop(addr, link, link_address_drop_handler);
-+ if (r < 0)
-+ return r;
-+
-+ r = sd_bus_message_new_method_return(m, &resp);
-+ if (r < 0)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_NO_MEMORY, "Error allocating reply messgage");
-+
-+ r = sd_bus_message_append(resp, "x", 0);
-+ if (r < 0)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "Error appending to reply messgage");
-+
-+ /*r = sd_bus_send(mgr->bus, resp, NULL);*/
-+ r = sd_bus_send(NULL, resp, NULL);
-+ if (r < 0)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "Error sending reply messgage");
-+
-+#if 0
-+ r = network_save_static (0, device, ipaddr, prefixlen, gateway); /* persist config - del */
-+ if (r)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, strerror(r));
-+#endif
-+
-+ return sd_bus_reply_method_return(m, "s", "Deleted IP address...");
-+}
-+
-+static int method_get_address (sd_bus_message *m, void* userdata, sd_bus_error *error)
-+{
-+ _cleanup_netlink_unref_ sd_netlink *rtnl = NULL;
-+ _cleanup_address_free_ Address *addr = NULL;
-+ _cleanup_route_free_ Route *rt = NULL;
-+ Manager *mgr = userdata;
-+ struct udev* udev = NULL;
-+ struct udev_device* udev_eth = NULL;
-+ const char* device = NULL;
-+ char devpath [32] = "/sys/class/net/";
-+ unsigned char ifindex;
-+ int r;
-+
-+ sd_netlink_message* maddr;
-+
-+ _cleanup_netlink_message_unref_ sd_netlink_message *req = NULL;
-+ _cleanup_netlink_message_unref_ sd_netlink_message *reply = NULL;
-+ _cleanup_bus_message_unref_ sd_bus_message *resp = NULL;
-+ _cleanup_address_free_ Address *address = NULL;
-+ _cleanup_free_ struct local_address *local = NULL;
-+ _cleanup_free_ char *ipr = NULL;
-+ _cleanup_free_ char *gwr = NULL;
-+ int n;
-+ int i;
-+
-+ assert(m);
-+ assert(mgr);
-+
-+ r = sd_bus_message_read (m, "s", &device);
-+ if (r < 0)
-+ return r;
-+
-+ if (isempty (device))
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid Device Name.");
-+
-+ udev = udev_new();
-+ udev_eth = udev_device_new_from_syspath(udev, strcat (devpath, device));
-+ if (!udev_eth)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "Could not find udev device");
-+
-+ ifindex = udev_device_get_ifindex(udev_eth);
-+
-+ r = sd_netlink_open(&rtnl);
-+ if (r < 0)
-+ return log_error_errno(r, "Failed to connect to netlink:"); /* fixme */
-+
-+ r = sd_rtnl_message_new_addr(rtnl, &req, RTM_GETADDR, 0, 0);
-+ if (r < 0)
-+ return r;
-+
-+ r = sd_netlink_message_request_dump(req, true);
-+ if (r < 0)
-+ return r;
-+
-+ r = sd_netlink_call(rtnl, req, 0, &reply); /* fixme */
-+ if (r < 0)
-+ return r;
-+
-+ r = sd_bus_message_new_method_return(m, &resp);
-+ if (r < 0)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_NO_MEMORY, "Error allocating reply messgage");
-+
-+ r = sd_bus_message_open_container(resp, 'a', "(iyyus)"); /*family,prefixlen,scope,flags,addr*/
-+ if (r < 0)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_NO_MEMORY, "Error opening a container for reply message");
-+
-+ for (maddr = reply; maddr; maddr = sd_netlink_message_next(maddr)) {
-+ int k;
-+
-+ r = address_new_dynamic(&address);
-+ if (r < 0)
-+ return r;
-+
-+ k = network_rtnl_process_address(rtnl, maddr, mgr, address);
-+ if (k) {
-+ r = in_addr_to_string(address->family, &address->in_addr, &ipr); /* fixme */
-+ if (r < 0)
-+ return r;
-+
-+ r = sd_bus_message_append (resp, "(iyyus)",
-+ address->family,
-+ address->prefixlen,
-+ address->scope,
-+ address->flags,
-+ ipr);
-+ if (r < 0)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "Error appending to reply messgage");
-+#if 0
-+ r = sd_bus_message_open_container(resp, 'r', "iyyus");
-+ if (r < 0)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "Error opening struct in reply messgage");
-+
-+ r = sd_bus_message_append(resp, "i", address->family);
-+ if (r < 0)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "Error appending to reply messgage");
-+
-+ r = sd_bus_message_append(resp, "y", address->prefixlen);
-+ if (r < 0)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "Error appending to reply messgage");
-+
-+ r = sd_bus_message_append(resp, "y", address->scope);
-+ if (r < 0)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "Error appending to reply messgage");
-+
-+ r = sd_bus_message_append(resp, "u", address->flags);
-+ if (r < 0)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "Error appending to reply messgage");
-+
-+ r = in_addr_to_string(address->family, &address->in_addr, &ipr); /* fixme */
-+ if (r < 0)
-+ return r;
-+
-+ r = sd_bus_message_append(resp, "s", ipr);
-+ if (r < 0)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "Error appending to reply messgage");
-+
-+ r = sd_bus_message_close_container(resp);
-+ if (r < 0)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "Error closing struct in reply messgage");
-+#endif
-+ }
-+ }
-+
-+ r = sd_bus_message_close_container(resp);
-+ if (r < 0)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "Error closing reply container");
-+
-+ n = local_gateways(rtnl, ifindex, AF_UNSPEC, &local);
-+ if (n < 0)
-+ return n;
-+
-+ for (i = 0; i < n; i++) {
-+
-+ r = in_addr_to_string(local[i].family, &local[i].address, &gwr);
-+ if (r < 0)
-+ return r;
-+ }
-+
-+ r = sd_bus_message_append(resp, "s", gwr);
-+ if (r < 0)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "Error appending to reply messgage");
-+
-+ /*r = sd_bus_send(mgr->bus, resp, NULL);*/
-+ r = sd_bus_send(NULL, resp, NULL);
-+ if (r < 0)
-+ return sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "Error sending reply messgage");
-+
-+ return sd_bus_reply_method_return(m, "s", "Getting IP configuration...");
-+}
-+
-+
-+int network_rtnl_process_address(sd_netlink *rtnl, sd_netlink_message *message, void *userdata, Address* address) {
-+ Manager* m = (Manager*) userdata; /* fixme */
-+ uint16_t type;
-+ unsigned char flags;
-+ char buf[INET6_ADDRSTRLEN];
-+ int ifindex;
-+ int r;
-+ sd_bus_error err = SD_BUS_ERROR_NULL; /* fixme */
-+ sd_bus_error* error = &err; /* fixme */
-+
-+ assert(rtnl);
-+ assert(message);
-+ assert(m);
-+ assert(address);
-+
-+ if (sd_netlink_message_is_error(message)) {
-+ r = sd_netlink_message_get_errno(message);
-+ if (r < 0)
-+ sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "rtnl: failed to receive address: ");
-+
-+ return 0;
-+ }
-+
-+ r = sd_netlink_message_get_type(message, &type);
-+ if (r < 0) {
-+ sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "rtnl: could not get message type: ");
-+ return 0;
-+ } else if (type != RTM_NEWADDR && type != RTM_DELADDR) {
-+ sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "rtnl: received unexpected message type when processing address");
-+ return 0;
-+ }
-+
-+ r = sd_rtnl_message_addr_get_ifindex(message, &ifindex);
-+ if (r < 0) {
-+ sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "rtnl: could not get ifindex from address: %m");
-+ return 0;
-+ } else if (ifindex <= 0) {
-+ sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "rtnl: received address message with invalid ifindex: %d", ifindex);
-+ return 0;
-+ }
-+
-+ r = sd_rtnl_message_addr_get_family(message, &address->family); /* int : i*/
-+ if (r < 0 || !IN_SET(address->family, AF_INET, AF_INET6)) {
-+ sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "rtnl: received address with invalid family, ignoring.");
-+ return 0;
-+ }
-+
-+ r = sd_rtnl_message_addr_get_prefixlen(message, &address->prefixlen); /* uchar : byte : y */
-+ if (r < 0) {
-+ sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "rtnl: received address with invalid prefixlen, ignoring: ");
-+ return 0;
-+ }
-+
-+ r = sd_rtnl_message_addr_get_scope(message, &address->scope); /* uchar : byte : y*/
-+ if (r < 0) {
-+ sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "rtnl: received address with invalid scope, ignoring: ");
-+ return 0;
-+ }
-+
-+ r = sd_rtnl_message_addr_get_flags(message, &flags); /* uint32 : u*/
-+ if (r < 0) {
-+ sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "rtnl: received address with invalid flags, ignoring: ");
-+ return 0;
-+ }
-+ address->flags = flags;
-+
-+ switch (address->family) {
-+ case AF_INET:
-+ r = sd_netlink_message_read_in_addr(message, IFA_LOCAL, &address->in_addr.in); /* ulong : uint64 : t */
-+ if (r < 0) {
-+ sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "rtnl: received address without valid address, ignoring: ");
-+ return 0;
-+ }
-+
-+ break;
-+
-+ case AF_INET6:
-+ r = sd_netlink_message_read_in6_addr(message, IFA_ADDRESS, &address->in_addr.in6); /* ulong : uint64 : t */
-+ if (r < 0) {
-+ sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "rtnl: received address without valid address, ignoring: ");
-+ return 0;
-+ }
-+
-+ break;
-+
-+ default:
-+ assert_not_reached("invalid address family");
-+ }
-+
-+ if (!inet_ntop(address->family, &address->in_addr, buf, INET6_ADDRSTRLEN)) { /* string : s */
-+ sd_bus_error_setf(error, SD_BUS_ERROR_FAILED, "Could not print address");
-+ return 0;
-+ }
-+
-+ return 1;
-+}
-+
-+int network_save_static (int cmd, const char* device, const char* ipaddr, int prefixlen, const char* gwaddr)
-+{
-+#define NETWORKD_CONFIG_FILE_NAME_LEN_MAX 64
-+ char ncfn [NETWORKD_CONFIG_FILE_NAME_LEN_MAX];
-+ FILE* ncfp = NULL;
-+ int r=0;
-+
-+ /* /usr/lib/systemd/network/10-bmc-ethx-192.168.255.255.32.network */
-+ snprintf (ncfn, NETWORKD_CONFIG_FILE_NAME_LEN_MAX, "/usr/lib/systemd/network/10-bmc-%s-%s.%d.network", device, ipaddr, prefixlen);
-+
-+ if (cmd) /* add */
-+ {
-+ ncfp = fopen (ncfn, "w+");
-+ if (!ncfp) {
-+ r = errno;
-+ }
-+
-+ fprintf (ncfp, "[Match]\nName=%s\n\n[Network]\nAddress=%s/%d\nGateway=%s\n", device, ipaddr, prefixlen, gwaddr);
-+ fclose (ncfp);
-+ }
-+ else /* del */
-+ {
-+ r = remove (ncfn);
-+ }
-+
-+ return r;
-+}
-+#endif
-diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
-index 6587ea9..f773936 100644
---- a/src/network/networkd-network.c
-+++ b/src/network/networkd-network.c
-@@ -20,6 +20,9 @@
- ***/
-
- #include <ctype.h>
-+#include <sys/socket.h>
-+#include <netinet/in.h>
-+#include <arpa/inet.h>
- #include <net/if.h>
-
- #include "conf-files.h"
-@@ -32,6 +35,15 @@
- #include "network-internal.h"
- #include "dns-domain.h"
-
-+#define SYSTEMD_NETWORKD_DBUS 1
-+
-+#ifdef SYSTEMD_NETWORKD_DBUS
-+int network_address_added_handler (sd_netlink* rtnl, sd_netlink_message* m, void* userdata);
-+int network_set_gateway (Link* link);
-+static int route_handler(sd_netlink *rtnl, sd_netlink_message *m, void *userdata);
-+int network_save_static (int cmd, const char* device, const char* ipaddr, int prefixlen, const char* gwaddr);
-+#endif
-+
- static int network_load_one(Manager *manager, const char *filename) {
- _cleanup_network_free_ Network *network = NULL;
- _cleanup_fclose_ FILE *file = NULL;
-@@ -850,3 +862,99 @@ int config_parse_hostname(const char *unit,
-
- return 0;
- }
-+
-+#ifdef SYSTEMD_NETWORKD_DBUS
-+int network_address_added_handler (sd_netlink* rtnl, sd_netlink_message* m, void* userdata)
-+{
-+ _cleanup_link_unref_ Link *link = userdata;
-+ int r;
-+
-+ assert(link);
-+
-+ r = sd_netlink_message_get_errno(m);
-+ if (r < 0 && r != -EEXIST) {
-+ log_debug("Error in set IP address!");
-+ link_enter_failed(link);
-+ return r;
-+ } else if (r >= 0)
-+ link_rtnl_process_address(rtnl, m, link->manager);
-+
-+ network_set_gateway (link);
-+
-+ return 0;
-+}
-+
-+/* link_enter_set_routes */
-+int network_set_gateway (Link* link)
-+{
-+ _cleanup_address_free_ Address* addr = NULL;
-+ const char* device = NULL;
-+ const char* ipaddr = NULL;
-+ const char* gwaddr = NULL;
-+ Route* rt;
-+ unsigned char prefixlen;
-+ int r=0;
-+
-+ assert(link);
-+ assert(link->network);
-+ assert(link->state == LINK_STATE_SETTING_ADDRESSES);
-+
-+ link->state = LINK_STATE_SETTING_ROUTES;
-+
-+ LIST_FOREACH(routes, rt, link->network->static_routes) {
-+ gwaddr = inet_ntoa (rt->dst_addr.in);
-+ r = route_configure(rt, link, &route_handler);
-+ if (r < 0) {
-+ log_debug ("Could not set Gateway!");
-+ link_enter_failed(link);
-+ return r;
-+ }
-+
-+ link->link_messages ++;
-+ }
-+
-+ if (link->link_messages == 0) {
-+ link->static_configured = true;
-+
-+ /*link_enter_configured (link);*/
-+ log_link_info(link, "Configured");
-+ link->state = LINK_STATE_CONFIGURED;
-+ link_save(link);
-+ }
-+ else
-+ {
-+ log_debug("Setting Gateway");
-+ }
-+
-+ LIST_FOREACH(addresses, addr, link->network->static_addresses) {
-+ device = strdup (link->ifname);
-+ ipaddr = inet_ntoa (addr->in_addr.in);
-+ prefixlen = addr->prefixlen;
-+#if 1
-+ r = network_save_static (1, device, ipaddr, prefixlen, gwaddr); /* persist config - add */
-+ if (r)
-+ {
-+ log_debug(strerror(r));
-+ }
-+#endif
-+ }
-+
-+ return r;
-+}
-+
-+static int route_handler(sd_netlink *rtnl, sd_netlink_message *m, void *userdata) {
-+ _cleanup_link_unref_ Link *link = userdata;
-+ int r;
-+
-+ assert(link);
-+
-+ r = sd_netlink_message_get_errno(m);
-+ if (r < 0 && r != -EEXIST) {
-+ log_debug ("Could not set route! ");
-+ link_enter_failed(link);
-+ }
-+
-+ return 1;
-+}
-+
-+#endif
-diff --git a/src/network/org.freedesktop.network1.conf b/src/network/org.freedesktop.network1.conf
-index 52dad33..3db7a90 100644
---- a/src/network/org.freedesktop.network1.conf
-+++ b/src/network/org.freedesktop.network1.conf
-@@ -36,6 +36,26 @@
- send_interface="org.freedesktop.DBus.Properties"
- send_member="GetAll"/>
-
-+ <allow send_destination="org.freedesktop.network1"
-+ send_interface="org.freedesktop.network1.Network"
-+ send_member="AddAddress"/>
-+
-+ <allow send_destination="org.freedesktop.network1"
-+ send_interface="org.freedesktop.network1.Network"
-+ send_member="DelAddress"/>
-+
-+ <allow send_destination="org.freedesktop.network1"
-+ send_interface="org.freedesktop.network1.Network"
-+ send_member="GetAddress"/>
-+
-+ <allow send_destination="org.freedesktop.network1"
-+ send_interface="org.freedesktop.network1.Link"
-+ send_member="GetAddress"/>
-+
-+ <allow send_destination="org.freedesktop.network1"
-+ send_interface="org.freedesktop.network1.Link"
-+ send_member="SetAddress"/>
-+
- <allow receive_sender="org.freedesktop.network1"/>
- </policy>
-
---
-1.8.2.2
-
diff --git a/common/recipes-core/systemd/systemd_%.bbappend b/common/recipes-core/systemd/systemd_%.bbappend
index 222be49..9ad6a40 100644
--- a/common/recipes-core/systemd/systemd_%.bbappend
+++ b/common/recipes-core/systemd/systemd_%.bbappend
@@ -1,7 +1,7 @@
-PACKAGECONFIG += "networkd"
+PACKAGECONFIG_append = " networkd"
+PACKAGECONFIG_remove = "machined hibernate ldconfig binfmt backlight quotacheck localed kdbus ima smack polkit"
FILESEXTRAPATHS_append := "${THISDIR}/${PN}:"
SRC_URI += "file://default.network"
-SRC_URI += "file://0100-systemd_networkd_dbus_setaddress.patch"
FILES_${PN} += "${libdir}/systemd/network/default.network"
diff --git a/common/recipes-devtools/python/python-pexpect_4.0.1.bbappend b/common/recipes-devtools/python/python-pexpect_4.0.1.bbappend
new file mode 100644
index 0000000..25e2809
--- /dev/null
+++ b/common/recipes-devtools/python/python-pexpect_4.0.1.bbappend
@@ -0,0 +1 @@
+RDEPENDS_${PN}_append = "python-ptyprocess"
diff --git a/common/recipes-devtools/python/python-ptyprocess_0.5.1.bb b/common/recipes-devtools/python/python-ptyprocess_0.5.1.bb
new file mode 100644
index 0000000..931e5a7
--- /dev/null
+++ b/common/recipes-devtools/python/python-ptyprocess_0.5.1.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Run a subprocess in a pseudo terminal"
+HOMEPAGE = "http://ptyprocess.readthedocs.io/en/latest/"
+SECTION = "devel/python"
+LICENSE = "ISC"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=cfdcd51fa7d5808da4e74346ee394490"
+
+SRCNAME = "ptyprocess"
+
+SRC_URI = "https://files.pythonhosted.org/packages/source/p/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
+SRC_URI[md5sum] = "94e537122914cc9ec9c1eadcd36e73a1"
+SRC_URI[sha256sum] = "0530ce63a9295bfae7bd06edc02b6aa935619f486f0f1dc0972f516265ee81a6"
+
+UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/ptyprocess"
+
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+inherit setuptools
+
+RDEPENDS_${PN} = "\
+ python-core \
+"
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/common/recipes-devtools/python/python-pygobject/obsolete_automake_macros.patch b/common/recipes-devtools/python/python-pygobject/obsolete_automake_macros.patch
new file mode 100644
index 0000000..c259112
--- /dev/null
+++ b/common/recipes-devtools/python/python-pygobject/obsolete_automake_macros.patch
@@ -0,0 +1,23 @@
+Upstream-Status: Accepted [https://bugzilla.gnome.org/show_bug.cgi?id=691101]
+
+Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
+diff -Nurd pygobject-2.27.91/configure.ac pygobject-2.27.91/configure.ac
+--- pygobject-2.27.91/configure.ac 2011-02-23 22:14:37.000000000 +0200
++++ pygobject-2.27.91/configure.ac 2013-01-03 05:13:44.034949954 +0200
+@@ -35,7 +35,7 @@
+ AC_DEFINE(PYGOBJECT_MICRO_VERSION, pygobject_micro_version, [pygobject micro version])
+ AC_SUBST(PYGOBJECT_MICRO_VERSION, pygobject_micro_version)
+
+-AM_CONFIG_HEADER(config.h)
++AC_CONFIG_HEADERS(config.h)
+ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES(yes)])
+ AM_INIT_AUTOMAKE(foreign)
+ AM_MAINTAINER_MODE
+@@ -82,7 +82,6 @@
+ m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
+ AC_ISC_POSIX
+ AC_PROG_CC
+-AM_PROG_CC_STDC
+ AM_PROG_CC_C_O
+
+ # check that we have the minimum version of python necisary to build
diff --git a/common/recipes-devtools/python/python-pygobject_2.28.3.bb b/common/recipes-devtools/python/python-pygobject_2.28.3.bb
new file mode 100644
index 0000000..81d37b4
--- /dev/null
+++ b/common/recipes-devtools/python/python-pygobject_2.28.3.bb
@@ -0,0 +1,53 @@
+SUMMARY = "Python GObject bindings"
+SECTION = "devel/python"
+LICENSE = "LGPLv2.1"
+
+RECIPE_NO_UPDATE_REASON = "Newer versions of python-pygobject depend on gobject-introspection which doesn't cross-compile"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7"
+DEPENDS = "python python-pygobject-native libffi glib-2.0"
+DEPENDS_class-native = "python-native libffi-native glib-2.0-native"
+RDEPENDS_class-native = ""
+
+MAJ_VER = "${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',1).split('.')[1]}"
+
+SRC_URI = "${GNOME_MIRROR}/pygobject/${MAJ_VER}/pygobject-${PV}.tar.bz2 \
+ file://obsolete_automake_macros.patch \
+"
+
+# libtool-native doesn't have fixinstall.patch applied which means
+# that libs get relinked at installation time. This triggers a
+# relinking along the lines of:
+# gcc -L/tmp/foo/media/build1/poky/build/tmp/sysroots/x86_64-linux/usr/lib -lpyglib-2.0-python -o .libs/_glib.so
+# where /tmp/foo is DESTDIR and pyglib-2.0-python may be installed/reinstalled
+# at the same time as the gcc command runs.
+# If this happens between the handoff between gcc and ld, you can see:
+# /bin/ld: cannot find -lpyglib-2.0-python
+# Adding a dependency rule like install-pyglibLTLIBRARIES: install-libLTLIBRARIES
+# would be ideal but automake can't cope with that without manually
+# defining the whole function. Give up and disable parallel make in native builds.
+PARALLEL_MAKEINST_class-native = ""
+
+SRC_URI[md5sum] = "aa64900b274c4661a5c32e52922977f9"
+SRC_URI[sha256sum] = "7da88c169a56efccc516cebd9237da3fe518a343095a664607b368fe21df95b6"
+S = "${WORKDIR}/pygobject-${PV}"
+
+EXTRA_OECONF += "--disable-introspection"
+
+inherit autotools distutils-base pkgconfig
+
+# necessary to let the call for python-config succeed
+export BUILD_SYS
+export HOST_SYS
+export STAGING_INCDIR
+export STAGING_LIBDIR
+
+PACKAGES += "${PN}-lib"
+
+RDEPENDS_${PN} += "python-textutils"
+
+FILES_${PN} = "${libdir}/python*"
+FILES_${PN}-lib = "${libdir}/lib*.so.*"
+FILES_${PN}-dev += "${bindir} ${datadir}"
+
+BBCLASSEXTEND = "native"
diff --git a/common/recipes-devtools/python/python_2.7.9.bbappend b/common/recipes-devtools/python/python_2.7.11.bbappend
similarity index 100%
rename from common/recipes-devtools/python/python_2.7.9.bbappend
rename to common/recipes-devtools/python/python_2.7.11.bbappend
diff --git a/common/recipes-phosphor/dbus/obmc-mapper.bb b/common/recipes-phosphor/dbus/obmc-mapper.bb
index c53e687..3c3208d 100644
--- a/common/recipes-phosphor/dbus/obmc-mapper.bb
+++ b/common/recipes-phosphor/dbus/obmc-mapper.bb
@@ -18,6 +18,6 @@
"
SRC_URI += "git://github.com/openbmc/phosphor-objmgr"
-SRCREV = "0bdc22a259720ee3a7ca78ee3aa07ab83bb39743"
+SRCREV = "067db7287a647789e7d5d5dbccc514c5c835a944"
S = "${WORKDIR}/git"
diff --git a/common/recipes-phosphor/dbus/obmc-mapper/obmc-mapper.service b/common/recipes-phosphor/dbus/obmc-mapper/obmc-mapper.service
index f57da02..ff863ea 100644
--- a/common/recipes-phosphor/dbus/obmc-mapper/obmc-mapper.service
+++ b/common/recipes-phosphor/dbus/obmc-mapper/obmc-mapper.service
@@ -6,6 +6,8 @@
Type=dbus
ExecStart=/usr/sbin/phosphor-mapper
BusName=org.openbmc.ObjectMapper
+TimeoutStartSec=300
+Environment="PYTHONUNBUFFERED=1"
[Install]
WantedBy=multi-user.target
diff --git a/common/recipes-phosphor/dbus/obmc-rest/obmc-rest.service b/common/recipes-phosphor/dbus/obmc-rest/obmc-rest.service
index a78c86b..8612b98 100644
--- a/common/recipes-phosphor/dbus/obmc-rest/obmc-rest.service
+++ b/common/recipes-phosphor/dbus/obmc-rest/obmc-rest.service
@@ -6,6 +6,7 @@
[Service]
Restart=always
ExecStart=/usr/sbin/obmc-rest
+Environment="PYTHONUNBUFFERED=1"
[Install]
WantedBy=multi-user.target
diff --git a/common/recipes-phosphor/host-ipmid/btbridged.bb b/common/recipes-phosphor/host-ipmid/btbridged.bb
index a1a32d9..f3a7003 100644
--- a/common/recipes-phosphor/host-ipmid/btbridged.bb
+++ b/common/recipes-phosphor/host-ipmid/btbridged.bb
@@ -15,4 +15,4 @@
# This is how linux-libc-headers says to include custom uapi headers
EXTRA_OEMAKE_append = "CFLAGS=-I${STAGING_KERNEL_DIR}/include/uapi"
-DEPENDS += "virtual/kernel"
+do_configure[depends] += "virtual/kernel:do_shared_workdir"
diff --git a/common/recipes-phosphor/host-ipmid/host-ipmi-hw-example.bb b/common/recipes-phosphor/host-ipmid/host-ipmi-hw-example.bb
index 13b07ad..3c4766e 100644
--- a/common/recipes-phosphor/host-ipmid/host-ipmi-hw-example.bb
+++ b/common/recipes-phosphor/host-ipmid/host-ipmi-hw-example.bb
@@ -2,16 +2,11 @@
DESCRIPTION = "Phosphor OpenBMC host IPMI to DBUS example implementation."
PR = "r1"
-RDEPENDS_${PN} += "python-subprocess"
+RDEPENDS_${PN} += "python-subprocess python-dbus python-pygobject"
SYSTEMD_SERVICE_${PN} = "host-ipmi-hw.service"
-inherit obmc-phosphor-pydbus-service
inherit obmc-phosphor-host-ipmi-hw
+inherit skeleton-python
-S = "${WORKDIR}/git"
-SRC_URI += "git://github.com/openbmc/skeleton.git;subpath=bin;destsuffix=git"
-SRCREV="2f9ee83356fba3f6f843bf2584f3e7e95763ec98"
-
-SCRIPT_NAME = "ipmi_debug.py"
-INSTALL_NAME = "host-ipmi-hw"
+SKELETON_DIR = "pyipmitest"
diff --git a/common/recipes-phosphor/host-ipmid/host-ipmid.bb b/common/recipes-phosphor/host-ipmid/host-ipmid.bb
index 23728cb..2a761de 100644
--- a/common/recipes-phosphor/host-ipmid/host-ipmid.bb
+++ b/common/recipes-phosphor/host-ipmid/host-ipmid.bb
@@ -19,7 +19,7 @@
RDEPENDS_${PN} += "network"
SRC_URI += "git://github.com/openbmc/phosphor-host-ipmid"
-SRCREV = "092360e55605c205aedd2ab40044c42e64b7d38c"
+SRCREV = "b7bcda57ee39616e8937194d281e2476e6ea8df2"
S = "${WORKDIR}/git"
INSTALL_NAME = "ipmid"
diff --git a/common/recipes-phosphor/network/network/network.service b/common/recipes-phosphor/network/network/network.service
index 6d0aad7..70df7c5 100644
--- a/common/recipes-phosphor/network/network/network.service
+++ b/common/recipes-phosphor/network/network/network.service
@@ -3,6 +3,7 @@
[Service]
ExecStart=/usr/sbin/netman.py
+Environment="PYTHONUNBUFFERED=1"
[Install]
WantedBy=multi-user.target
diff --git a/common/recipes-phosphor/obmc-phosphor-chassis/obmc-button-power.bb b/common/recipes-phosphor/obmc-phosphor-chassis/obmc-button-power.bb
new file mode 100644
index 0000000..7adda51
--- /dev/null
+++ b/common/recipes-phosphor/obmc-phosphor-chassis/obmc-button-power.bb
@@ -0,0 +1,7 @@
+SUMMARY = "OpenBMC org.openbmc.Button example implementation"
+DESCRIPTION = "A sample implementation for a button controlling a power domain."
+PR = "r1"
+
+inherit skeleton-gdbus
+
+SKELETON_DIR = "pwrbutton"
diff --git a/common/recipes-phosphor/obmc-phosphor-chassis/obmc-button-reset.bb b/common/recipes-phosphor/obmc-phosphor-chassis/obmc-button-reset.bb
new file mode 100644
index 0000000..ba83a26
--- /dev/null
+++ b/common/recipes-phosphor/obmc-phosphor-chassis/obmc-button-reset.bb
@@ -0,0 +1,6 @@
+SUMMARY = "OpenBMC org.openbmc.Button example implementation"
+DESCRIPTION = "A sample implementation for a reset button."
+PR = "r1"
+
+inherit skeleton-gdbus
+SKELETON_DIR = "rstbutton"
diff --git a/common/recipes-phosphor/obmc-phosphor-chassis/obmc-control-chassis.bb b/common/recipes-phosphor/obmc-phosphor-chassis/obmc-control-chassis.bb
new file mode 100644
index 0000000..ca80715
--- /dev/null
+++ b/common/recipes-phosphor/obmc-phosphor-chassis/obmc-control-chassis.bb
@@ -0,0 +1,14 @@
+SUMMARY = "OpenBMC org.openbmc.control.Chassis example implementation"
+DESCRIPTION = "An example implementation of the org.openbmc.control.Chassis DBUS API."
+PR = "r1"
+
+inherit skeleton-python
+
+RDEPENDS_${PN} += "\
+ python-dbus \
+ python-pygobject \
+ python-netclient \
+ pyphosphor \
+ "
+
+SKELETON_DIR = "pychassisctl"
diff --git a/common/recipes-phosphor/obmc-phosphor-chassis/obmc-hostcheckstop.bb b/common/recipes-phosphor/obmc-phosphor-chassis/obmc-hostcheckstop.bb
new file mode 100644
index 0000000..d054694
--- /dev/null
+++ b/common/recipes-phosphor/obmc-phosphor-chassis/obmc-hostcheckstop.bb
@@ -0,0 +1,8 @@
+SUMMARY = "OpenBMC checkstop monitor."
+DESCRIPTION = "The checkstop monitor watches a GPIO for a checkstop signal \
+and reboots a server."
+PR = "r1"
+
+inherit skeleton-gdbus
+
+SKELETON_DIR = "hostcheckstop"
diff --git a/common/recipes-phosphor/obmc-phosphor-chassis/obmc-mgr-inventory.bb b/common/recipes-phosphor/obmc-phosphor-chassis/obmc-mgr-inventory.bb
new file mode 100644
index 0000000..8c1a309
--- /dev/null
+++ b/common/recipes-phosphor/obmc-phosphor-chassis/obmc-mgr-inventory.bb
@@ -0,0 +1,18 @@
+SUMMARY = "OpenBMC inventory manager"
+DESCRIPTION = "OpenBMC inventory manager."
+PR = "r1"
+
+inherit skeleton-python
+
+VIRTUAL-RUNTIME_skeleton_workbook ?= ""
+
+RDEPENDS_${PN} += "\
+ python-dbus \
+ python-json \
+ python-pickle \
+ python-pygobject \
+ pyphosphor \
+ ${VIRTUAL-RUNTIME_skeleton_workbook} \
+ "
+
+SKELETON_DIR = "pyinventorymgr"
diff --git a/common/recipes-phosphor/obmc-phosphor-chassis/obmc-op-control-power.bb b/common/recipes-phosphor/obmc-phosphor-chassis/obmc-op-control-power.bb
new file mode 100644
index 0000000..e724472
--- /dev/null
+++ b/common/recipes-phosphor/obmc-phosphor-chassis/obmc-op-control-power.bb
@@ -0,0 +1,7 @@
+SUMMARY = "org.openbmc.control.Power implemention for OpenPOWER"
+DESCRIPTION = "A power control implementation suitable for OpenPOWER systems."
+PR = "r1"
+
+inherit skeleton-gdbus
+
+SKELETON_DIR = "op-pwrctl"
diff --git a/common/recipes-phosphor/obmc-phosphor-chassis/obmc-pcie-detect.bb b/common/recipes-phosphor/obmc-phosphor-chassis/obmc-pcie-detect.bb
new file mode 100644
index 0000000..e134cf0
--- /dev/null
+++ b/common/recipes-phosphor/obmc-phosphor-chassis/obmc-pcie-detect.bb
@@ -0,0 +1,7 @@
+SUMMARY = "OpenBMC PCIE slot detection utility"
+DESCRIPTION = "OpenBMC PCIE slot detection utility."
+PR = "r1"
+
+inherit skeleton-gdbus
+
+SKELETON_DIR = "pciedetect"
diff --git a/common/recipes-phosphor/obmc-phosphor-chassis/obmc-watchdog.bb b/common/recipes-phosphor/obmc-phosphor-chassis/obmc-watchdog.bb
new file mode 100644
index 0000000..821b7f0
--- /dev/null
+++ b/common/recipes-phosphor/obmc-phosphor-chassis/obmc-watchdog.bb
@@ -0,0 +1,7 @@
+SUMMARY = "OpenBMC org.openbmc.Watchdog example implementation"
+DESCRIPTION = "A sample implementation for the org.openbmc.Watchdog DBUS API."
+PR = "r1"
+
+inherit skeleton-gdbus
+
+SKELETON_DIR = "hostwatchdog"
diff --git a/common/recipes-phosphor/obmc-phosphor-devtools/obmc-pydevtools.bb b/common/recipes-phosphor/obmc-phosphor-devtools/obmc-pydevtools.bb
new file mode 100644
index 0000000..296a399
--- /dev/null
+++ b/common/recipes-phosphor/obmc-phosphor-devtools/obmc-pydevtools.bb
@@ -0,0 +1,17 @@
+SUMMARY = "OpenBMC python devtools"
+DESCRIPTION = "Shortcut scripts for developers."
+PR = "r1"
+
+inherit skeleton-python
+
+VIRTUAL-RUNTIME_skeleton_workbook ?= ""
+
+RDEPENDS_${PN} += "\
+ python-dbus \
+ python-json \
+ python-xml \
+ python-pygobject \
+ ${VIRTUAL-RUNTIME_skeleton_workbook} \
+ "
+
+SKELETON_DIR = "pytools"
diff --git a/common/recipes-phosphor/obmc-phosphor-example-pydbus/files/obmc-phosphor-example-pydbus.service b/common/recipes-phosphor/obmc-phosphor-example-pydbus/files/obmc-phosphor-example-pydbus.service
index fbc50d3..27d9bfe 100644
--- a/common/recipes-phosphor/obmc-phosphor-example-pydbus/files/obmc-phosphor-example-pydbus.service
+++ b/common/recipes-phosphor/obmc-phosphor-example-pydbus/files/obmc-phosphor-example-pydbus.service
@@ -4,6 +4,7 @@
[Service]
Restart=always
ExecStart=/usr/sbin/obmc-phosphor-example-pydbus
+Environment="PYTHONUNBUFFERED=1"
[Install]
WantedBy=multi-user.target
diff --git a/common/recipes-phosphor/obmc-phosphor-fan/obmc-control-fan.bb b/common/recipes-phosphor/obmc-phosphor-fan/obmc-control-fan.bb
new file mode 100644
index 0000000..a4bd005
--- /dev/null
+++ b/common/recipes-phosphor/obmc-phosphor-fan/obmc-control-fan.bb
@@ -0,0 +1,12 @@
+SUMMARY = "OpenBMC fan control"
+DESCRIPTION = "OpenBMC fan control."
+PR = "r1"
+
+inherit skeleton-python
+
+RDEPENDS_${PN} += "\
+ python-dbus \
+ python-pygobject \
+ pyphosphor \
+ "
+SKELETON_DIR = "pyfanctl"
diff --git a/common/recipes-phosphor/obmc-phosphor-flash/obmc-flash-bios.bb b/common/recipes-phosphor/obmc-phosphor-flash/obmc-flash-bios.bb
new file mode 100644
index 0000000..8f7b766
--- /dev/null
+++ b/common/recipes-phosphor/obmc-phosphor-flash/obmc-flash-bios.bb
@@ -0,0 +1,9 @@
+SUMMARY = "OpenBMC org.openbmc.Flash example implementation"
+DESCRIPTION = "A sample implementation for the org.openbmc.Flash DBUS API. \
+org.openbmc.Flash provides APIs for functions like BIOS flash access control \
+and updating."
+PR = "r1"
+
+inherit skeleton-gdbus
+
+SKELETON_DIR = "flashbios"
diff --git a/common/recipes-phosphor/obmc-phosphor-flash/obmc-flash-bmc.bb b/common/recipes-phosphor/obmc-phosphor-flash/obmc-flash-bmc.bb
new file mode 100644
index 0000000..80bd1bf
--- /dev/null
+++ b/common/recipes-phosphor/obmc-phosphor-flash/obmc-flash-bmc.bb
@@ -0,0 +1,15 @@
+SUMMARY = "OpenBMC BMC update utility"
+DESCRIPTION = "OpenBMC BMC update utility."
+PR = "r1"
+
+inherit skeleton-python
+
+RDEPENDS_${PN} += "\
+ python-dbus \
+ python-compression \
+ python-shell \
+ python-pygobject \
+ pyphosphor \
+ "
+
+SKELETON_DIR = "pyflashbmc"
diff --git a/common/recipes-phosphor/obmc-phosphor-flash/obmc-mgr-download.bb b/common/recipes-phosphor/obmc-phosphor-flash/obmc-mgr-download.bb
new file mode 100644
index 0000000..d3a5ecd
--- /dev/null
+++ b/common/recipes-phosphor/obmc-phosphor-flash/obmc-mgr-download.bb
@@ -0,0 +1,17 @@
+SUMMARY = "OpenBMC org.openbmc.managers.Download example implementation"
+DESCRIPTION = "An example implementation for the org.openbmc.managers.Download DBUS API."
+PR = "r1"
+
+inherit skeleton-python
+
+VIRTUAL-RUNTIME_skeleton_workbook ?= ""
+
+RDEPENDS_${PN} += "\
+ python-dbus \
+ python-pygobject \
+ python-subprocess \
+ pyphosphor \
+ ${VIRTUAL-RUNTIME_skeleton_workbook} \
+ "
+
+SKELETON_DIR = "pydownloadmgr"
diff --git a/common/recipes-phosphor/obmc-phosphor-flash/obmc-op-flasher.bb b/common/recipes-phosphor/obmc-phosphor-flash/obmc-op-flasher.bb
new file mode 100644
index 0000000..9908500
--- /dev/null
+++ b/common/recipes-phosphor/obmc-phosphor-flash/obmc-op-flasher.bb
@@ -0,0 +1,11 @@
+SUMMARY = "OpenPOWER flashing utility."
+DESCRIPTION = "A BMC/BIOS flashing utility for use on OpenPOWER system."
+PR = "r1"
+
+inherit skeleton-gdbus
+
+# DEPEND,RDEPEND on pflash if the openpower-pflash machine feature is set.
+PACKAGECONFIG ??= "${@bb.utils.contains('MACHINE_FEATURES', 'openpower-pflash', 'openpower-pflash', '', d)}"
+PACKAGECONFIG[openpower-pflash] = ",,pflash,pflash"
+
+SKELETON_DIR = "op-flasher"
diff --git a/common/recipes-phosphor/obmc-phosphor-host/obmc-op-control-host.bb b/common/recipes-phosphor/obmc-phosphor-host/obmc-op-control-host.bb
new file mode 100644
index 0000000..b301101
--- /dev/null
+++ b/common/recipes-phosphor/obmc-phosphor-host/obmc-op-control-host.bb
@@ -0,0 +1,7 @@
+SUMMARY = "org.openbmc.control.Host implementation for OpenPOWER"
+DESCRIPTION = "A host control implementation suitable for OpenPOWER systems."
+PR = "r1"
+
+inherit skeleton-gdbus
+
+SKELETON_DIR = "op-hostctl"
diff --git a/common/recipes-phosphor/obmc-phosphor-led/obmc-control-led.bb b/common/recipes-phosphor/obmc-phosphor-led/obmc-control-led.bb
new file mode 100644
index 0000000..94fa7cb
--- /dev/null
+++ b/common/recipes-phosphor/obmc-phosphor-led/obmc-control-led.bb
@@ -0,0 +1,10 @@
+SUMMARY = "OpenBMC org.openbmc.Led example implementation"
+DESCRIPTION = "A sample implementation for the org.openbmc.Led DBUS API. \
+The org.openbmc.Led provides APIs for controlling LEDs."
+PR = "r1"
+
+inherit skeleton-sdbus
+
+RDEPENDS_${PN} += "libsystemd"
+
+SKELETON_DIR = "ledctl"
diff --git a/common/recipes-phosphor/obmc-phosphor-libobmc/obmc-libobmc-intf.bb b/common/recipes-phosphor/obmc-phosphor-libobmc/obmc-libobmc-intf.bb
new file mode 100644
index 0000000..a53deba
--- /dev/null
+++ b/common/recipes-phosphor/obmc-phosphor-libobmc/obmc-libobmc-intf.bb
@@ -0,0 +1,16 @@
+SUMMARY = "OpenBMC gdbus library"
+DESCRIPTION = "libopenbmc_intf provides a set of gpio access \
+methods and the GDBUS skeleton code for the org.openbmc DBUS API."
+PR = "r1"
+
+inherit skeleton
+
+DEPENDS += "glib-2.0"
+
+SKELETON_DIR = "libopenbmc_intf"
+
+do_install() {
+ oe_runmake install DESTDIR=${D}
+}
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/common/recipes-phosphor/obmc-phosphor-sensor/obmc-hwmon.bb b/common/recipes-phosphor/obmc-phosphor-sensor/obmc-hwmon.bb
new file mode 100644
index 0000000..78442b8
--- /dev/null
+++ b/common/recipes-phosphor/obmc-phosphor-sensor/obmc-hwmon.bb
@@ -0,0 +1,18 @@
+SUMMARY = "OpenBMC hwmon poller"
+DESCRIPTION = "OpenBMC hwmon poller."
+PR = "r1"
+
+inherit skeleton-python
+
+VIRTUAL-RUNTIME_skeleton_workbook ?= ""
+
+RDEPENDS_${PN} += "\
+ python-dbus \
+ python-json \
+ python-shell \
+ python-pygobject \
+ pyphosphor \
+ ${VIRTUAL-RUNTIME_skeleton_workbook} \
+ "
+
+SKELETON_DIR = "pyhwmon"
diff --git a/common/recipes-phosphor/obmc-phosphor-sensor/obmc-mgr-sensor.bb b/common/recipes-phosphor/obmc-phosphor-sensor/obmc-mgr-sensor.bb
new file mode 100644
index 0000000..ca90c43
--- /dev/null
+++ b/common/recipes-phosphor/obmc-phosphor-sensor/obmc-mgr-sensor.bb
@@ -0,0 +1,17 @@
+SUMMARY = "OpenBMC sensor manager"
+DESCRIPTION = "OpenBMC sensor manager."
+PR = "r1"
+
+inherit skeleton-python
+
+VIRTUAL-RUNTIME_skeleton_workbook ?= ""
+
+RDEPENDS_${PN} += "\
+ python-dbus \
+ python-json \
+ python-pygobject\
+ pyphosphor \
+ ${VIRTUAL-RUNTIME_skeleton_workbook} \
+ "
+
+SKELETON_DIR = "pysensormgr"
diff --git a/common/recipes-phosphor/obmc-phosphor-sys/obmc-control-bmc.bb b/common/recipes-phosphor/obmc-phosphor-sys/obmc-control-bmc.bb
new file mode 100644
index 0000000..bfc3326
--- /dev/null
+++ b/common/recipes-phosphor/obmc-phosphor-sys/obmc-control-bmc.bb
@@ -0,0 +1,8 @@
+SUMMARY = "OpenBMC org.openbmc.control.Bmc example implementation"
+DESCRIPTION = "A sample implementation for the org.openbmc.control.Bmc DBUS API. \
+org.openbmc.control.Bmc provides APIs for functions like resetting the BMC."
+PR = "r1"
+
+inherit skeleton-gdbus
+
+SKELETON_DIR = "bmcctl"
diff --git a/common/recipes-phosphor/obmc-phosphor-sys/obmc-mgr-state.bb b/common/recipes-phosphor/obmc-phosphor-sys/obmc-mgr-state.bb
new file mode 100644
index 0000000..125fd65
--- /dev/null
+++ b/common/recipes-phosphor/obmc-phosphor-sys/obmc-mgr-state.bb
@@ -0,0 +1,16 @@
+SUMMARY = "OpenBMC state manager"
+DESCRIPTION = "OpenBMC state manager."
+PR = "r1"
+
+inherit skeleton-python
+
+VIRTUAL-RUNTIME_skeleton_workbook ?= ""
+
+RDEPENDS_${PN} += "\
+ python-dbus \
+ python-json \
+ python-subprocess \
+ python-pygobject \
+ "
+
+SKELETON_DIR = "pystatemgr"
diff --git a/common/recipes-phosphor/obmc-phosphor-sys/obmc-mgr-system.bb b/common/recipes-phosphor/obmc-phosphor-sys/obmc-mgr-system.bb
new file mode 100644
index 0000000..accd7da
--- /dev/null
+++ b/common/recipes-phosphor/obmc-phosphor-sys/obmc-mgr-system.bb
@@ -0,0 +1,27 @@
+SUMMARY = "OpenBMC system manager"
+DESCRIPTION = "OpenBMC system manager."
+PR = "r1"
+
+inherit skeleton-python
+inherit obmc-phosphor-systemd
+
+VIRTUAL-RUNTIME_skeleton_workbook ?= ""
+
+RDEPENDS_${PN} += "\
+ python-dbus \
+ python-json \
+ python-subprocess \
+ python-pygobject \
+ pyphosphor \
+ ${VIRTUAL-RUNTIME_skeleton_workbook} \
+ "
+
+SKELETON_DIR = "pysystemmgr"
+
+do_compile_append() {
+ oe_runmake -C ../hacks
+}
+
+do_install_append() {
+ oe_runmake -C ../hacks install DESTDIR=${D}
+}
diff --git a/common/recipes-phosphor/obmc-phosphor-sys/obmc-mgr-system/obmc-mgr-system.service b/common/recipes-phosphor/obmc-phosphor-sys/obmc-mgr-system/obmc-mgr-system.service
new file mode 100644
index 0000000..9cb04cf
--- /dev/null
+++ b/common/recipes-phosphor/obmc-phosphor-sys/obmc-mgr-system/obmc-mgr-system.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=OpenBMC system manager
+Requires=obmc-mapper.service
+After=obmc-mapper.service
+
+[Service]
+Restart=always
+ExecStart=/usr/sbin/system_manager.py
+
+[Install]
+WantedBy=multi-user.target
diff --git a/common/recipes-phosphor/obmc-phosphor-user/files/obmc-phosphor-user.service b/common/recipes-phosphor/obmc-phosphor-user/files/obmc-phosphor-user.service
index fecf835..fc436c1 100644
--- a/common/recipes-phosphor/obmc-phosphor-user/files/obmc-phosphor-user.service
+++ b/common/recipes-phosphor/obmc-phosphor-user/files/obmc-phosphor-user.service
@@ -3,6 +3,7 @@
[Service]
ExecStart=/usr/sbin/obmc-phosphor-userd
+Environment="PYTHONUNBUFFERED=1"
[Install]
WantedBy=multi-user.target
diff --git a/common/recipes-phosphor/rest-dbus/files/rest-dbus.service b/common/recipes-phosphor/rest-dbus/files/rest-dbus.service
index 5ad582f..d3bddab 100644
--- a/common/recipes-phosphor/rest-dbus/files/rest-dbus.service
+++ b/common/recipes-phosphor/rest-dbus/files/rest-dbus.service
@@ -4,3 +4,4 @@
[Service]
Restart=always
ExecStart=/usr/sbin/rest-dbus
+Environment="PYTHONUNBUFFERED=1"
diff --git a/common/recipes-phosphor/settings/settings/settings.service b/common/recipes-phosphor/settings/settings/settings.service
index deed98f..816ebea 100755
--- a/common/recipes-phosphor/settings/settings/settings.service
+++ b/common/recipes-phosphor/settings/settings/settings.service
@@ -3,6 +3,7 @@
[Service]
ExecStart=/usr/sbin/settings_manager.py
+Environment="PYTHONUNBUFFERED=1"
[Install]
WantedBy=multi-user.target
diff --git a/common/recipes-phosphor/skeleton/skeleton.bb b/common/recipes-phosphor/skeleton/skeleton.bb
index feb86cb..f5c5fbf 100644
--- a/common/recipes-phosphor/skeleton/skeleton.bb
+++ b/common/recipes-phosphor/skeleton/skeleton.bb
@@ -3,47 +3,36 @@
HOMEPAGE = "http://github.com/openbmc/skeleton"
PR = "r1"
+inherit packagegroup
inherit obmc-phosphor-license
-inherit obmc-phosphor-systemd
+
inherit obmc-phosphor-chassis-mgmt
inherit obmc-phosphor-fan-mgmt
inherit obmc-phosphor-flash-mgmt
inherit obmc-phosphor-policy-mgmt
inherit obmc-phosphor-sensor-mgmt
inherit obmc-phosphor-system-mgmt
-inherit pythonnative
-inherit python-dir
-VIRTUAL-RUNTIME_skeleton_workbook ?= ""
-
-DEPENDS += "glib-2.0 systemd python"
-RDEPENDS_${PN} += "python-json python-subprocess python-compression libsystemd ${VIRTUAL-RUNTIME_skeleton_workbook}"
-SRC_URI += "git://github.com/openbmc/skeleton"
-
-FILES_${PN} += "${PYTHON_SITEPACKAGES_DIR}/*"
-
-# RDEPEND on pflash if the openpower-pflash machine feature is set.
-PACKAGECONFIG ??= "${@bb.utils.contains('MACHINE_FEATURES', 'openpower-pflash', 'openpower-pflash', '', d)}"
-PACKAGECONFIG[openpower-pflash] = ",,,pflash"
-
-SRCREV = "57f67f07c8d5c8bc73dc0cd3440c8a44fafa6941"
-
-S = "${WORKDIR}"
-
-# needed to invoke setuptools
-export STAGING_INCDIR
-export STAGING_LIBDIR
-export BUILD_SYS
-export HOST_SYS
-export PYTHON_SITEPACKAGES_DIR
-
-do_compile() {
- oe_runmake -C git PYTHON=${PYTHON}
-}
-
-do_install() {
- oe_runmake -C git install \
- PYTHON=${PYTHON} \
- DESTDIR=${D} \
- PREFIX=/usr
-}
+RDEPENDS_${PN} += " \
+ obmc-button-power \
+ obmc-button-reset \
+ obmc-control-chassis \
+ obmc-hostcheckstop \
+ obmc-mgr-inventory \
+ obmc-op-control-power \
+ obmc-pcie-detect \
+ obmc-watchdog \
+ obmc-pydevtools \
+ obmc-control-fan \
+ obmc-flash-bios \
+ obmc-flash-bmc \
+ obmc-mgr-download \
+ obmc-op-flasher \
+ obmc-op-control-host \
+ obmc-control-led \
+ obmc-hwmon \
+ obmc-mgr-sensor \
+ obmc-control-bmc \
+ obmc-mgr-state \
+ obmc-mgr-system \
+ "
diff --git a/common/recipes-phosphor/skeleton/skeleton/skeleton.service b/common/recipes-phosphor/skeleton/skeleton/skeleton.service
deleted file mode 100755
index 35b6e6c..0000000
--- a/common/recipes-phosphor/skeleton/skeleton/skeleton.service
+++ /dev/null
@@ -1,9 +0,0 @@
-[Unit]
-Description=Temp placeholder for skeleton function
-
-[Service]
-Restart=always
-ExecStart=/usr/sbin/system_manager.py
-
-[Install]
-WantedBy=multi-user.target
diff --git a/conf/distro/openbmc-phosphor.conf b/conf/distro/openbmc-phosphor.conf
index 4af4a4b..f37e88c 100644
--- a/conf/distro/openbmc-phosphor.conf
+++ b/conf/distro/openbmc-phosphor.conf
@@ -36,3 +36,6 @@
"
DISTRO_EXTRA_RDEPENDS_remove_qemuarm = "packagegroup-core-device-devel"
+
+# TODO: openbmc/openbmc#12345 - Upgrade to pygobject-3.
+PREFERRED_VERSION_python-pygobject = "2.%"
diff --git a/conf/machine/include/obmc-bsp-common.inc b/conf/machine/include/obmc-bsp-common.inc
index 8d1fd7e..2b6a163 100644
--- a/conf/machine/include/obmc-bsp-common.inc
+++ b/conf/machine/include/obmc-bsp-common.inc
@@ -13,7 +13,7 @@
MACHINEOVERRIDES =. "openbmc:"
-IMAGE_FSTYPES += "overlay"
+OBMC_PHOSPHOR_IMAGE_OVERLAY= "1"
IMAGE_FSTYPES += "cpio.${INITRAMFS_CTYPE}.u-boot"
OBMC_IMAGE_EXTRA_INSTALL_append = " u-boot-fw-utils"
diff --git a/conf/machine/include/sample.inc b/conf/machine/include/sample.inc
index e66dc77..e4d70d1 100644
--- a/conf/machine/include/sample.inc
+++ b/conf/machine/include/sample.inc
@@ -24,10 +24,10 @@
"
PREFERRED_PROVIDER_virtual/obmc-phosphor-host-ipmi-hw = "host-ipmi-hw-example"
PREFERRED_PROVIDER_virtual/obmc-phosphor-chassis-mgmt = "obmc-phosphor-chassisd"
-PREFERRED_PROVIDER_virtual/obmc-phosphor-event-mgmt = "obmc-phosphor-eventd"
+PREFERRED_PROVIDER_virtual/obmc-phosphor-event-mgmt = "obmc-phosphor-event"
PREFERRED_PROVIDER_virtual/obmc-phosphor-fan-mgmt = "obmc-phosphor-fand"
PREFERRED_PROVIDER_virtual/obmc-phosphor-flash-mgmt = "obmc-phosphor-flashd"
PREFERRED_PROVIDER_virtual/obmc-phosphor-policy-mgmt = "obmc-phosphor-policyd"
PREFERRED_PROVIDER_virtual/obmc-phosphor-sensor-mgmt = "obmc-phosphor-sensord"
PREFERRED_PROVIDER_virtual/obmc-phosphor-system-mgmt = "obmc-phosphor-sysd"
-PREFERRED_PROVIDER_virtual/obmc-phosphor-user-mgmt = "obmc-phosphor-userd"
+PREFERRED_PROVIDER_virtual/obmc-phosphor-user-mgmt = "obmc-phosphor-user"