meta-openembedded: subtree update:01d539b324..fd1a0c9210

Adrian Bunk (1):
      xmlrpc-c: Remove the RDEPENDS on perl

Denys Dmytriyenko (1):
      mariadb: update SRC_URI to use archive.mariadb.org

Khem Raj (7):
      xorg-fonts-100dpi: Change License Custom -> MIT
      fio: Depend on coreutils-native for fmt utility
      fio: Fix build when march is armv7ve
      pmdk: Update to 1.7
      README: Document need for 32bit compiler
      mongodb: Turn system libpcre support into packageconfig
      grpc: Update to 1.24.1

Otavio Salvador (1):
      modemmanager: Upgrade 1.10.2 -> 1.10.6

Palmer Dabbelt (1):
      Add zeus compatibility to all layer.conf files

Peiran Hong (1):
      tcpdump: upgrade 4.9.2 -> 4.9.3

Stefan Agner (1):
      zram: properly implement systemd service

Stefan Wiehler (1):
      nvme-cli: upgrade 1.6 -> 1.9

Trevor Gamblin (2):
      gnome-desktop3: upgrade from 3.32.0 to 3.34.0
      freeradius: add -latomic for armv5

William A. Kennington III via Openembedded-devel (1):
      log4cpp: Stop using RC as a variable

Change-Id: I9b3bd69a061da11a59d38bce42543cb090b24601
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/meta-openembedded/meta-oe/recipes-extended/pmdk/files/0001-os_posix-Use-__FreeBSD__-to-control-secure_getenv-de.patch b/meta-openembedded/meta-oe/recipes-extended/pmdk/files/0001-os_posix-Use-__FreeBSD__-to-control-secure_getenv-de.patch
new file mode 100644
index 0000000..33f25b6
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-extended/pmdk/files/0001-os_posix-Use-__FreeBSD__-to-control-secure_getenv-de.patch
@@ -0,0 +1,33 @@
+From 7d0732d69a774e28bc46b8b487d9f61bdd8afbff Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 6 Oct 2019 18:15:44 -0700
+Subject: [PATCH] os_posix: Use __FreeBSD__ to control secure_getenv definition
+
+__USE_GNU does not cover all Linux platforms, e.g. when using musl as C
+library, __USE_GNU may not be defined but it does provide secure_getenv
+so instead of narrowing the else condition, lets speicifically check for
+FreeBSD being the platform, since that seems to be the intention here
+anyway
+
+Upstream-Status: Submitted [https://github.com/pmem/pmdk/pull/3999]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/common/os_posix.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/common/os_posix.c b/src/common/os_posix.c
+index a9a37ef84..052db2383 100644
+--- a/src/common/os_posix.c
++++ b/src/common/os_posix.c
+@@ -346,7 +346,7 @@ os_setenv(const char *name, const char *value, int overwrite)
+ /*
+  * secure_getenv -- provide GNU secure_getenv for FreeBSD
+  */
+-#ifndef __USE_GNU
++#if defined(__FreeBSD__)
+ static char *
+ secure_getenv(const char *name)
+ {
+-- 
+2.23.0
+
diff --git a/meta-openembedded/meta-oe/recipes-extended/pmdk/files/0003-Makefile-Don-t-build-the-examples.patch b/meta-openembedded/meta-oe/recipes-extended/pmdk/files/0003-Makefile-Don-t-build-the-examples.patch
deleted file mode 100644
index dbe9c45..0000000
--- a/meta-openembedded/meta-oe/recipes-extended/pmdk/files/0003-Makefile-Don-t-build-the-examples.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From ac24c78f5aa62ba43bb87b74301b659bcc506f11 Mon Sep 17 00:00:00 2001
-From: Alistair Francis <alistair.francis@wdc.com>
-Date: Thu, 18 Jul 2019 15:40:22 +0800
-Subject: [PATCH] Makefile: Don't build the examples
-
-Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
-Upstream-Status: Inappropriate [disable feature]
----
- src/Makefile | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/Makefile b/src/Makefile
-index 773ab1387..58912f0ab 100644
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -37,13 +37,13 @@ include $(TOP)/src/common.inc
- 
- TARGETS = libpmem libvmem libpmemblk libpmemlog libpmemobj libpmempool\
- 		  libvmmalloc tools
--ALL_TARGETS = $(TARGETS) common librpmem examples benchmarks
-+ALL_TARGETS = $(TARGETS) common librpmem benchmarks
- 
- SCOPE_DIRS = $(TARGETS) common librpmem rpmem_common
- 
- DEBUG_RELEASE_TARGETS = common libpmem libvmem libpmemblk libpmemlog libpmemobj\
- 	libpmempool libvmmalloc librpmem
--RELEASE_TARGETS = tools examples benchmarks
-+RELEASE_TARGETS = tools benchmarks
- 
- CLEAN_NO_JE_TARGETS = $(ALL_TARGETS) rpmem_common test
- CLEAN_TARGETS = $(CLEAN_NO_JE_TARGETS) jemalloc
--- 
-2.14.4
-
diff --git a/meta-openembedded/meta-oe/recipes-extended/pmdk/pmdk_1.6.bb b/meta-openembedded/meta-oe/recipes-extended/pmdk/pmdk_1.7.bb
similarity index 84%
rename from meta-openembedded/meta-oe/recipes-extended/pmdk/pmdk_1.6.bb
rename to meta-openembedded/meta-oe/recipes-extended/pmdk/pmdk_1.7.bb
index c8688b2..96da266 100644
--- a/meta-openembedded/meta-oe/recipes-extended/pmdk/pmdk_1.6.bb
+++ b/meta-openembedded/meta-oe/recipes-extended/pmdk/pmdk_1.7.bb
@@ -14,10 +14,10 @@
 SRC_URI = "git://github.com/pmem/pmdk.git \
            file://0001-jemalloc-jemalloc.cfg-Specify-the-host-when-building.patch \
            file://0002-Makefile-Don-t-install-the-docs.patch \
-           file://0003-Makefile-Don-t-build-the-examples.patch \
+           file://0001-os_posix-Use-__FreeBSD__-to-control-secure_getenv-de.patch \
           "
 
-SRCREV = "695e6eba28c53a69a0ef7bad3cc0f45c21ef3e00"
+SRCREV = "bc5e309485df61c452d08367e4b13ba9dfed5071"
 
 inherit autotools-brokensep pkgconfig
 
@@ -26,7 +26,7 @@
 # | If you meant to cross compile, use `--host'.
 #
 # Also fix #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]
-EXTRA_OEMAKE = "HOST_SYS='${HOST_SYS}' EXTRA_CFLAGS='${SELECTED_OPTIMIZATION}' LIB_PREFIX=${baselib}"
+EXTRA_OEMAKE = "BUILD_EXAMPLES='n' HOST_SYS='${HOST_SYS}' EXTRA_CFLAGS='${SELECTED_OPTIMIZATION}' LIB_PREFIX=${baselib}"
 
 # Fix the missing fts libs when using musl
 EXTRA_OEMAKE_append_libc-musl = " EXTRA_LIBS='-lfts'"
diff --git a/meta-openembedded/meta-oe/recipes-extended/zram/zram/dev-zram0.swap b/meta-openembedded/meta-oe/recipes-extended/zram/zram/dev-zram0.swap
new file mode 100644
index 0000000..05eae7e
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-extended/zram/zram/dev-zram0.swap
@@ -0,0 +1,10 @@
+[Unit]
+Description=Enable compressed swap in memory using zram
+Requires=zram-swap.service
+After=zram-swap.service
+
+[Swap]
+What=/dev/zram0
+
+[Install]
+WantedBy=swap.target
diff --git a/meta-openembedded/meta-oe/recipes-extended/zram/zram/zram-swap-deinit b/meta-openembedded/meta-oe/recipes-extended/zram/zram/zram-swap-deinit
new file mode 100755
index 0000000..46248c4
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-extended/zram/zram/zram-swap-deinit
@@ -0,0 +1,19 @@
+#!/bin/sh
+set -e
+
+device=$1
+if [ "$device" = "" ]; then
+    echo "Usage: zram-swap-deinit <device>"
+    exit 1
+fi
+
+sysblockdev=/sys/block/$(basename $device)
+if [ ! -d $sysblockdev ]; then
+    echo "Block device not found in sysfs"
+    exit 1
+fi
+
+# zramctl -r is not suitable as it also removes the actual device. Recreating
+# it is non-trivial, especially if not /dev/zram0 is used...
+echo 1 > ${sysblockdev}/reset
+
diff --git a/meta-openembedded/meta-oe/recipes-extended/zram/zram/zram-swap-init b/meta-openembedded/meta-oe/recipes-extended/zram/zram/zram-swap-init
new file mode 100755
index 0000000..0643dbc
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-extended/zram/zram/zram-swap-init
@@ -0,0 +1,26 @@
+#!/bin/sh
+set -e
+
+device=$1
+if [ "$device" = "" ]; then
+    echo "Usage: zram-swap-init <device>"
+    exit 1
+fi
+
+# Allocate zram to be size of actual system memory
+# Note: zram is only allocated when used. When swapped pages compress with a
+# a 2:1 ratio zram will require 50% of system memory (while allowing to use
+# 150% memory).
+ZRAM_SIZE_PERCENT=100
+ZRAM_ALGORITHM=lz4
+
+[ -f /etc/default/zram ] && ./etc/default/zram || true
+
+memtotal=$(grep MemTotal /proc/meminfo | awk ' { print $2 } ')
+memzram=$(($memtotal*${ZRAM_SIZE_PERCENT}/100))
+
+# Try loading zram module
+modprobe -q zram || true
+
+zramctl -a ${ZRAM_ALGORITHM} -s ${memzram}KB $device
+mkswap -L "zram-swap" $device
diff --git a/meta-openembedded/meta-oe/recipes-extended/zram/zram/zram-swap.service b/meta-openembedded/meta-oe/recipes-extended/zram/zram/zram-swap.service
new file mode 100644
index 0000000..a4dc951
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-extended/zram/zram/zram-swap.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Create compressed swap in memory using zram
+DefaultDependencies=no
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+TimeoutStartSec=30sec
+ExecStart=@LIBEXECDIR@/zram-swap-init /dev/zram0
+ExecStop=@LIBEXECDIR@/zram-swap-deinit /dev/zram0
diff --git a/meta-openembedded/meta-oe/recipes-extended/zram/zram/zram.service b/meta-openembedded/meta-oe/recipes-extended/zram/zram/zram.service
deleted file mode 100644
index 4a19367..0000000
--- a/meta-openembedded/meta-oe/recipes-extended/zram/zram/zram.service
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
-Description=Enable zram compressed in-memory swap.
-After=multi-user.target
-
-[Service]
-RemainAfterExit=yes
-ExecStart=/usr/bin/zram-load.sh --load
-ExecStop=/usr/bin/zram-load.sh --unload
-Type=oneshot
-
-[Install]
-WantedBy=multi-user.target
diff --git a/meta-openembedded/meta-oe/recipes-extended/zram/zram/zramstop b/meta-openembedded/meta-oe/recipes-extended/zram/zram/zramstop
new file mode 100644
index 0000000..0777797
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-extended/zram/zram/zramstop
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+for i in $(grep '^/dev/zram' /proc/swaps | awk '{ print $1 }'); do
+	swapoff "$i" && zramctl --reset "$i"
+done
diff --git a/meta-openembedded/meta-oe/recipes-extended/zram/zram_0.1.bb b/meta-openembedded/meta-oe/recipes-extended/zram/zram_0.1.bb
deleted file mode 100644
index dfd75e71..0000000
--- a/meta-openembedded/meta-oe/recipes-extended/zram/zram_0.1.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-SUMMARY = "Linux zram compressed in-memory swap"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
-
-inherit update-rc.d systemd
-
-RDEPENDS_${PN} = "util-linux-swaponoff kmod"
-RRECOMMENDS_${PN} = "kernel-module-zram"
-
-PR = "r3"
-
-SRC_URI = " \
-           file://init \
-           file://zram.service \
-"
-
-do_install () {
-    # Sysvinit
-    install -d ${D}${sysconfdir}/init.d
-    install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/zram
-
-    install -d ${D}${systemd_unitdir}/system
-    install -m 0644 ${WORKDIR}/zram.service ${D}${systemd_unitdir}/system
-}
-
-FILES_${PN} = "${sysconfdir}"
-INITSCRIPT_NAME = "zram"
-INITSCRIPT_PARAMS = "start 05 2 3 4 5 . stop 22 0 1 6 ."
-
-RPROVIDES_${PN} += "${PN}-systemd"
-RREPLACES_${PN} += "${PN}-systemd"
-RCONFLICTS_${PN} += "${PN}-systemd"
-SYSTEMD_SERVICE_${PN} = "zram.service"
diff --git a/meta-openembedded/meta-oe/recipes-extended/zram/zram_0.2.bb b/meta-openembedded/meta-oe/recipes-extended/zram/zram_0.2.bb
new file mode 100644
index 0000000..98c47af
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-extended/zram/zram_0.2.bb
@@ -0,0 +1,50 @@
+SUMMARY = "Linux zram compressed in-memory swap"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+inherit update-rc.d systemd
+
+RDEPENDS_${PN} = "kmod \
+    ${@bb.utils.contains('DISTRO_FEATURES','systemd','util-linux','util-linux-swaponoff',d)}"
+RRECOMMENDS_${PN} = "kernel-module-zram"
+
+PR = "r3"
+
+SRC_URI = " \
+           file://init \
+           file://zram-swap-init \
+           file://zram-swap-deinit \
+           file://zram-swap.service \
+           file://dev-zram0.swap \
+"
+
+do_install () {
+    # Install systemd related configuration file
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
+        install -d ${D}${sysconfdir}/init.d
+        install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/zram
+    fi
+
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -d ${D}${libexecdir}
+        install -m 0755 ${WORKDIR}/zram-swap-init ${D}${libexecdir}
+        install -m 0755 ${WORKDIR}/zram-swap-deinit ${D}${libexecdir}
+        install -d ${D}${systemd_unitdir}/system
+        install -m 0644 ${WORKDIR}/zram-swap.service ${D}${systemd_unitdir}/system/zram-swap.service
+        sed -i -e "s,@LIBEXECDIR@,${libexecdir},g" ${D}${systemd_unitdir}/system/zram-swap.service
+        install -m 0644 ${WORKDIR}/dev-zram0.swap ${D}${systemd_unitdir}/system/dev-zram0.swap
+    fi
+}
+
+FILES_${PN} = " \
+    ${sysconfdir} \
+    ${systemd_unitdir} \
+    ${libexecdir} \
+"
+INITSCRIPT_NAME = "zram"
+INITSCRIPT_PARAMS = "start 05 2 3 4 5 . stop 22 0 1 6 ."
+
+RPROVIDES_${PN} += "${PN}-systemd"
+RREPLACES_${PN} += "${PN}-systemd"
+RCONFLICTS_${PN} += "${PN}-systemd"
+SYSTEMD_SERVICE_${PN} = "dev-zram0.swap"