Yocto 2.3

Move OpenBMC to Yocto 2.3(pyro).

Tested: Built and verified Witherspoon and Palmetto images
Change-Id: I50744030e771f4850afc2a93a10d3507e76d36bc
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Resolves: openbmc/openbmc#2461
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache-mod/apache-websocket_git.bb b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache-mod/apache-websocket_git.bb
index da33115..0beb3ed 100644
--- a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache-mod/apache-websocket_git.bb
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache-mod/apache-websocket_git.bb
@@ -6,7 +6,7 @@
 
 inherit autotools-brokensep pkgconfig
 
-DEPENDS = "apache2 apache2-native"
+DEPENDS = "apache2 apache2-native pbzip2-native"
 RDEPENDS_${PN} += "apache2"
 
 # Original (github.com/disconnect/apache-websocket) is dead since 2012, the
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2-native_2.4.23.bb b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2-native_2.4.25.bb
similarity index 86%
rename from import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2-native_2.4.23.bb
rename to import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2-native_2.4.25.bb
index aa26cc7..99717d2 100644
--- a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2-native_2.4.23.bb
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2-native_2.4.25.bb
@@ -8,15 +8,15 @@
 
 inherit autotools pkgconfig native
 
-SRC_URI = "http://archive.apache.org/dist/httpd/httpd-${PV}.tar.bz2 \
+SRC_URI = "${APACHE_MIRROR}/httpd/httpd-${PV}.tar.bz2 \
            file://0001-configure-use-pkg-config-for-PCRE-detection.patch \
           "
 
 S = "${WORKDIR}/httpd-${PV}"
 
 LIC_FILES_CHKSUM = "file://LICENSE;md5=dbff5a2b542fa58854455bf1a0b94b83"
-SRC_URI[md5sum] = "04f19c60e810c028f5240a062668a688"
-SRC_URI[sha256sum] = "0c1694b2aad7765896faf92843452ee2555b9591ae10d4f19b245f2adfe85e58"
+SRC_URI[md5sum] = "2826f49619112ad5813c0be5afcc7ddb"
+SRC_URI[sha256sum] = "f87ec2df1c9fee3e6bfde3c8b855a3ddb7ca1ab20ca877bd0e2b6bf3f05c80b2"
 
 EXTRA_OECONF = "--with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \
                 --with-apr-util=${STAGING_BINDIR_CROSS}/apu-1-config \
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/fix-libtool-name.patch b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/fix-libtool-name.patch
deleted file mode 100644
index 027af04..0000000
--- a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/fix-libtool-name.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-Fix build scripts to use correct libtool filename
-
-Upstream-Status: Inappropriate [configuration]
-
----
- httpd-2.4.2/build/config_vars.sh.in |    2 +-
- httpd-2.4.2/configure               |    2 +-
- httpd-2.4.2/configure.in            |    2 +-
- httpd-2.4.2/support/apxs.in         |    2 +-
- 4 files changed, 4 insertions(+), 4 deletions(-)
-
---- a/build/config_vars.sh.in
-+++ b/build/config_vars.sh.in
-@@ -35,7 +35,7 @@ else
-    APU_CONFIG=@APU_CONFIG@
- fi
- 
--APR_LIBTOOL="`${APR_CONFIG} --apr-libtool`"
-+APR_LIBTOOL="`${APR_CONFIG} --apr-libtool | sed -e s,libtool,${host_alias}-libtool,`"
- APR_INCLUDEDIR="`${APR_CONFIG} --includedir`"
- test -n "@APU_CONFIG@" && APU_INCLUDEDIR="`${APU_CONFIG} --includedir`"
- 
---- a/configure
-+++ b/configure
-@@ -6205,7 +6205,7 @@ case $host in
-       if test "x$LTFLAGS" = "x"; then
-           LTFLAGS='--silent'
-       fi
--      my_libtool=`$apr_config --apr-libtool`
-+      my_libtool=`$apr_config --apr-libtool | sed -e s,libtool,${host_alias}-libtool,`
-       LIBTOOL="$my_libtool \$(LTFLAGS)"
-       libtoolversion=`$my_libtool --version`
-       case $libtoolversion in
---- a/configure.in
-+++ b/configure.in
-@@ -264,7 +264,7 @@ case $host in
-       if test "x$LTFLAGS" = "x"; then
-           LTFLAGS='--silent'
-       fi
--      my_libtool=`$apr_config --apr-libtool`
-+      my_libtool=`$apr_config --apr-libtool | sed -e s,libtool,${host_alias}-libtool,`
-       LIBTOOL="$my_libtool \$(LTFLAGS)"
-       libtoolversion=`$my_libtool --version`
-       case $libtoolversion in
---- a/support/apxs.in
-+++ b/support/apxs.in
-@@ -352,7 +352,7 @@ if ($apr_major_version < 2) {
-     }
- }
- 
--my $libtool = `$apr_config --apr-libtool`;
-+my $libtool = `$apr_config --apr-libtool| sed -e s,libtool,${host_alias}-libtool,`;
- chomp($libtool);
- 
- my $apr_includedir = `$apr_config --includes`;
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.23.bb b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.25.bb
similarity index 95%
rename from import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.23.bb
rename to import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.25.bb
index 0cd762e..0ba7d3c 100644
--- a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.23.bb
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.25.bb
@@ -6,7 +6,7 @@
 SECTION = "net"
 LICENSE = "Apache-2.0"
 
-SRC_URI = "http://archive.apache.org/dist/httpd/httpd-${PV}.tar.bz2 \
+SRC_URI = "${APACHE_MIRROR}/httpd/httpd-${PV}.tar.bz2 \
            file://server-makefile.patch \
            file://httpd-2.4.1-corelimit.patch \
            file://httpd-2.4.4-export.patch \
@@ -23,8 +23,8 @@
           "
 
 LIC_FILES_CHKSUM = "file://LICENSE;md5=dbff5a2b542fa58854455bf1a0b94b83"
-SRC_URI[md5sum] = "04f19c60e810c028f5240a062668a688"
-SRC_URI[sha256sum] = "0c1694b2aad7765896faf92843452ee2555b9591ae10d4f19b245f2adfe85e58"
+SRC_URI[md5sum] = "2826f49619112ad5813c0be5afcc7ddb"
+SRC_URI[sha256sum] = "f87ec2df1c9fee3e6bfde3c8b855a3ddb7ca1ab20ca877bd0e2b6bf3f05c80b2"
 
 S = "${WORKDIR}/httpd-${PV}"
 
@@ -57,7 +57,7 @@
     --enable-mpms-shared \
     ac_cv_have_threadsafe_pollset=no"
 
-PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}"
+PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}"
 PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,libselinux"
 PACKAGECONFIG[openldap] = "--enable-ldap --enable-authnz-ldap,--disable-ldap --disable-authnz-ldap,openldap"
 
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/cherokee/cherokee_1.2.98.bb b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/cherokee/cherokee_1.2.98.bb
index 82fbb77..ba39f97 100644
--- a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/cherokee/cherokee_1.2.98.bb
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/cherokee/cherokee_1.2.98.bb
@@ -9,7 +9,7 @@
 
 DEPENDS = "libpcre openssl mysql5 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
 
-SRC_URI = "http://www.cherokee-project.de/mirrors/cherokee/1.2/${PV}/cherokee-${PV}.tar.gz \
+SRC_URI = "http://mirror.aarnet.edu.au/pub/${BPN}/1.2/${PV}/${BP}.tar.gz \
            file://cherokee.init \
            file://cherokee.service \
            file://cherokee-install-configured.py-once.patch \
@@ -19,7 +19,7 @@
 
 inherit autotools pkgconfig binconfig update-rc.d systemd
 
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
 PACKAGECONFIG[ffmpeg] = "--with-ffmpeg,--without-ffmpeg,libav"
 PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
 PACKAGECONFIG[geoip] = "--with-geoip,--without-geoip,geoip"
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/monkey/files/0001-configure-Respect-LIBS-variable-from-env.patch b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/monkey/files/0001-configure-Respect-LIBS-variable-from-env.patch
new file mode 100644
index 0000000..7a22951
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/monkey/files/0001-configure-Respect-LIBS-variable-from-env.patch
@@ -0,0 +1,29 @@
+From b0526a9b5325bd4758dad8d14efd85c98ef2ebff Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 14 Jul 2017 18:25:23 -0700
+Subject: [PATCH] configure: Respect LIBS variable from env
+
+For musl we need to pass -lexecinfo from env
+this change accomodates that
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure b/configure
+index 4286c34..f1c65db 100755
+--- a/configure
++++ b/configure
+@@ -620,7 +620,7 @@ LIBDEFS = -DSHAREDLIB -fPIC \$(DEFS)
+ INCDIR  = ./include
+ LDFLAGS = $LDFLAGS
+ DESTDIR = ../bin/monkey
+-LIBS    = -ldl $libs
++LIBS    = -ldl $libs ${LIBS}
+ OBJ     = monkey.o mk_method.o mk_mimetype.o mk_vhost.o mk_request.o \\
+           mk_header.o mk_config.o mk_signals.o \\
+           mk_user.o mk_utils.o mk_epoll.o mk_scheduler.o \\
+-- 
+2.13.3
+
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/monkey/monkey_1.5.6.bb b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/monkey/monkey_1.5.6.bb
index be8ed37..97dc276 100644
--- a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/monkey/monkey_1.5.6.bb
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/monkey/monkey_1.5.6.bb
@@ -7,7 +7,10 @@
 
 SECTION = "net"
 
+DEPENDS_append_libc-musl = " libexecinfo"
+
 SRC_URI = "http://monkey-project.com/releases/1.5/monkey-${PV}.tar.gz \
+           file://0001-configure-Respect-LIBS-variable-from-env.patch \
            file://monkey.service \
            file://monkey.init"
 
@@ -24,7 +27,13 @@
                 --disable-plugins=mbedtls \
                 --debug \
                 --malloc-libc"
+
+do_configure_prepend_libc-musl() {
+	export LIBS="-lexecinfo"
+}
+
 DISABLE_STATIC = ""
+CLEANBROKEN = "1"
 
 inherit autotools-brokensep pkgconfig update-rc.d systemd
 
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/nginx-volatile.conf b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/nginx-volatile.conf
index 93f3c66..472fde1 100644
--- a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/nginx-volatile.conf
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/nginx-volatile.conf
@@ -1,2 +1,2 @@
-d www www-data 0755 /run/nginx none
+d @NGINX_USER@ www-data 0755 /run/nginx none
 d root root 0755 /var/log/nginx none
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/nginx.conf b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/nginx.conf
index fb7e4b6..69d3a2a 100644
--- a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/nginx.conf
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/nginx.conf
@@ -1,5 +1,5 @@
 
-user  www-data;
+user  www;
 worker_processes  1;
 
 error_log  /var/log/nginx/error.log;
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/nginx.init b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/nginx.init
old mode 100755
new mode 100644
index 0f38b9c..1a2bd7d
--- a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/nginx.init
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/files/nginx.init
@@ -3,7 +3,7 @@
 DAEMON=/usr/sbin/nginx
 NAME=nginx
 DESC=nginx
-PID=/var/run/nginx/nginx.pid
+PID=/run/nginx/nginx.pid
 
 test -x $DAEMON || exit 0
 
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx.inc b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx.inc
index 36f2ac6..f98f299 100644
--- a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx.inc
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx.inc
@@ -20,7 +20,9 @@
     file://nginx.service \
 "
 
-inherit update-rc.d useradd
+inherit update-rc.d useradd systemd
+
+SYSTEMD_SERVICE_${PN} = "nginx.service"
 
 CFLAGS_append = " -fPIE -pie"
 CXXFLAGS_append = " -fPIE -pie"
@@ -61,6 +63,11 @@
     --conf-path=${sysconfdir}/nginx/nginx.conf \
     --http-log-path=${localstatedir}/log/nginx/access.log \
     --error-log-path=${localstatedir}/log/nginx/error.log \
+    --http-client-body-temp-path=/run/nginx/client_body_temp \
+    --http-proxy-temp-path=/run/nginx/proxy_temp \
+    --http-fastcgi-temp-path=/run/nginx/fastcgi_temp \
+    --http-uwsgi-temp-path=/run/nginx/uwsgi_temp \
+    --http-scgi-temp-path=/run/nginx/scgi_temp \
     --pid-path=/run/nginx/nginx.pid \
     --prefix=${prefix} \
     --with-http_ssl_module \
@@ -98,6 +105,7 @@
     install -d ${D}${sysconfdir}/default/volatiles
     install -m 0644 ${WORKDIR}/nginx-volatile.conf ${D}${sysconfdir}/default/volatiles/99_nginx
     sed -i 's,/var/,${localstatedir}/,g' ${D}${sysconfdir}/default/volatiles/99_nginx
+    sed -i 's,@NGINX_USER@,${NGINX_USER},g' ${D}${sysconfdir}/default/volatiles/99_nginx
 
     if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then
         install -d ${D}${systemd_unitdir}/system
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.10.1.bb b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.10.1.bb
deleted file mode 100644
index c5392c7..0000000
--- a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.10.1.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require nginx.inc
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=0bb58ed0dfd4f5dbece3b52aba79f023"
-
-SRC_URI[md5sum] = "088292d9caf6059ef328aa7dda332e44"
-SRC_URI[sha256sum] = "1fd35846566485e03c0e318989561c135c598323ff349c503a6c14826487a801"
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.10.3.bb b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.10.3.bb
new file mode 100644
index 0000000..b62fd4c
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.10.3.bb
@@ -0,0 +1,6 @@
+require nginx.inc
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=0bb58ed0dfd4f5dbece3b52aba79f023"
+
+SRC_URI[md5sum] = "204a20cb4f0b0c9db746c630d89ff4ea"
+SRC_URI[sha256sum] = "75020f1364cac459cb733c4e1caed2d00376e40ea05588fb8793076a4c69dd90"
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.11.10.bb b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.11.10.bb
new file mode 100644
index 0000000..37565fc
--- /dev/null
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.11.10.bb
@@ -0,0 +1,10 @@
+require nginx.inc
+
+# 1.10.x branch is the current stable branch, the recommended default
+# 1.11.x is the current mainline branches containing all new features
+DEFAULT_PREFERENCE = "-1"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=903753de5f86a1ee0341fd2f9491b282"
+
+SRC_URI[md5sum] = "6fb10f579055d27a2240d51c7d85c190"
+SRC_URI[sha256sum] = "778b3cabb07633f754cd9dee32fc8e22582bce22bfa407be76a806abd935533d"
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.11.5.bb b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.11.5.bb
deleted file mode 100644
index ae05c96..0000000
--- a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx_1.11.5.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require nginx.inc
-
-# 1.10.x branch is the current stable branch, the recommended default
-# 1.11.x is the current mainline branches containing all new features
-DEFAULT_PREFERENCE = "-1"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=0bb58ed0dfd4f5dbece3b52aba79f023"
-
-SRC_URI[md5sum] = "db43f2b19746f6f47401c3afc3924dc6"
-SRC_URI[sha256sum] = "223f8a2345a75f891098cf26ccdf208b293350388f51ce69083674c9432db6f6"
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nostromo/nostromo_1.9.6.bb b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nostromo/nostromo_1.9.6.bb
index 5493c12..16f45ce 100644
--- a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nostromo/nostromo_1.9.6.bb
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/nostromo/nostromo_1.9.6.bb
@@ -16,7 +16,7 @@
 
 TARGET_CC_ARCH += "${LDFLAGS}"
 
-DEPENDS = "openssl groff-native"
+DEPENDS = "openssl groff-native base-passwd"
 
 inherit update-rc.d
 
diff --git a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/sthttpd/sthttpd_2.27.0.bb b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/sthttpd/sthttpd_2.27.0.bb
index efa533a..2125b24 100644
--- a/import-layers/meta-openembedded/meta-webserver/recipes-httpd/sthttpd/sthttpd_2.27.0.bb
+++ b/import-layers/meta-openembedded/meta-webserver/recipes-httpd/sthttpd/sthttpd_2.27.0.bb
@@ -4,6 +4,8 @@
 LICENSE = "BSD-2-Clause"
 LIC_FILES_CHKSUM = "file://src/thttpd.c;beginline=1;endline=26;md5=0c5762c2c34dcbe9eb18815516502872"
 
+DEPENDS += "base-passwd"
+
 SRC_URI = "http://opensource.dyc.edu/pub/sthttpd/sthttpd-${PV}.tar.gz \
            file://thttpd.service \
            file://thttpd.conf \
@@ -49,4 +51,3 @@
 
 FILES_${PN} += "${SRV_DIR}"
 FILES_${PN}-dbg += "${SRV_DIR}/cgi-bin/.debug"
-