Skip to contentSkip to conversation

upm: Upgrade to latest and fix build with musl

PATCH New Khem Raj 1 participant 5 messages Jun 22, 2018

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/5 upm: Upgrade to latest and fix build with musl

---
 ...lude-sys-types.h-for-uint-definition.patch | 33 +++++++++++++++++++
 meta-oe/recipes-extended/upm/upm_git.bb       | 11 +++----
 2 files changed, 38 insertions(+), 6 deletions(-)
 create mode 100644 meta-oe/recipes-extended/upm/upm/0001-include-sys-types.h-for-uint-definition.patch
meta-oe/recipes-extended/upm/upm/0001-include-sys-types.h-for-uint-definition.patch new file +33 -0
new file mode 100644
index 0000000000..a0a47411d7
@@ -0,0 +1,33 @@
+From 48a580bd402cf6a3ee9e42013653219bfeb3caf6 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 21 Jun 2018 18:39:16 -0700
+Subject: [PATCH] include sys/types.h for uint definition
+
+uint is defined in sys/types.h, therefore this
+header needs to be included, it gets exposed with
+musl where this header is not getting included indirectly
+as it is happening when building on glibc
+
+Fixes build errors on musl e.g.
+upm/src/kx122/kx122.hpp:456:31: error: 'uint' has not been declared
+|        void setBufferThreshold(uint samples);
+|                                ^~~~
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Submitted [https://github.com/intel-iot-devkit/upm/pull/656]
+ src/kx122/kx122.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/kx122/kx122.h b/src/kx122/kx122.h
+index 1622ed50..56e5215e 100644
+--- a/src/kx122/kx122.h
++++ b/src/kx122/kx122.h
+@@ -31,6 +31,7 @@ extern "C"{
+ #include <assert.h>
+ #include <unistd.h>
+ #include <math.h>
++#include <sys/types.h>
+ 
+ #include <mraa/i2c.h>
+ #include <mraa/spi.h>
meta-oe/recipes-extended/upm/upm_git.bb +5 -6
index 478aa0db1d..babe5f4893 100644
@@ -7,13 +7,13 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=66493d54e65bfc12c7983ff2e884f37f"
 
 DEPENDS = "libjpeg-turbo mraa"
 
-SRCREV = "37642f3b0194f6ddd63f1e6b5d49b8cb689d5c81"
+SRCREV = "dc45cd78595c7c24c8a8574c63bb48b5bb99c5aa"
 PV = "1.6.0-git${SRCPV}"
 
-SRC_URI = " \
-    git://github.com/intel-iot-devkit/${BPN}.git;protocol=http \
-    file://0001-Replace-strncpy-with-memcpy.patch \
-"
+SRC_URI = "git://github.com/intel-iot-devkit/${BPN}.git;protocol=http \
+           file://0001-Replace-strncpy-with-memcpy.patch \
+           file://0001-include-sys-types.h-for-uint-definition.patch \
+           "
 
 S = "${WORKDIR}/git"
 
@@ -22,7 +22,6 @@ COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux"
 
 inherit distutils3-base cmake
 
-
 # override this in local.conf to get needed bindings.
 # BINDINGS_pn-upm="python"
 # will result in only the python bindings being built/packaged.
Signature · 1 line
2.18.0
author
#1 lore raw

PATCH 2/5 libhugetlbfs: Fix build on musl

needs more runtime testing

---
 .../0001-include-stddef.h-for-ptrdiff_t.patch | 25 ++++++++++
 .../0002-Mark-glibc-specific-code-so.patch    | 39 +++++++++++++++
 ...sconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch | 49 +++++++++++++++++++
 ...shm.c-Mark-glibc-specific-changes-so.patch | 30 ++++++++++++
 .../0005-Include-dirent.h-for-ino_t.patch     | 28 +++++++++++
 .../0006-include-limits.h-for-PATH_MAX.patch  | 42 ++++++++++++++++
 .../libhugetlbfs/libhugetlbfs_git.bb          |  6 +++
 7 files changed, 219 insertions(+)
 create mode 100644 meta-oe/recipes-benchmark/libhugetlbfs/files/0001-include-stddef.h-for-ptrdiff_t.patch
 create mode 100644 meta-oe/recipes-benchmark/libhugetlbfs/files/0002-Mark-glibc-specific-code-so.patch
 create mode 100644 meta-oe/recipes-benchmark/libhugetlbfs/files/0003-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch
 create mode 100644 meta-oe/recipes-benchmark/libhugetlbfs/files/0004-shm.c-Mark-glibc-specific-changes-so.patch
 create mode 100644 meta-oe/recipes-benchmark/libhugetlbfs/files/0005-Include-dirent.h-for-ino_t.patch
 create mode 100644 meta-oe/recipes-benchmark/libhugetlbfs/files/0006-include-limits.h-for-PATH_MAX.patch
meta-oe/recipes-benchmark/libhugetlbfs/files/0001-include-stddef.h-for-ptrdiff_t.patch new file +25 -0
new file mode 100644
index 0000000000..bae90b4edc
@@ -0,0 +1,25 @@
+From d3c2187716a0a1f9359a869ca383c129603554d9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 21 Jun 2018 19:25:57 -0700
+Subject: [PATCH 1/6] include stddef.h for ptrdiff_t
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ morecore.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/morecore.c b/morecore.c
+index 62ad252..c5981d2 100644
+--- a/morecore.c
++++ b/morecore.c
+@@ -19,6 +19,7 @@
+ 
+ #define _GNU_SOURCE
+ 
++#include <stddef.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <malloc.h>
+-- 
+2.17.1
+
meta-oe/recipes-benchmark/libhugetlbfs/files/0002-Mark-glibc-specific-code-so.patch new file +39 -0
new file mode 100644
index 0000000000..4354d78615
@@ -0,0 +1,39 @@
+From b72bf6a81fa879f32a074fe53776fc8291c83b6f Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 21 Jun 2018 19:32:59 -0700
+Subject: [PATCH 2/6] Mark glibc specific code so
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ morecore.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/morecore.c b/morecore.c
+index c5981d2..ec9fafa 100644
+--- a/morecore.c
++++ b/morecore.c
+@@ -347,6 +347,7 @@ void hugetlbfs_setup_morecore(void)
+ 
+ 	INFO("setup_morecore(): heapaddr = 0x%lx\n", heapaddr);
+ 
++#ifdef __GLIBC__
+ 	heaptop = heapbase = (void *)heapaddr;
+ 	if (__hugetlb_opts.thp_morecore)
+ 		__morecore = &thp_morecore;
+@@ -354,7 +355,6 @@ void hugetlbfs_setup_morecore(void)
+ 		__morecore = &hugetlbfs_morecore;
+ 
+ 	/* Set some allocator options more appropriate for hugepages */
+-
+ 	if (__hugetlb_opts.shrink_ok)
+ 		mallopt(M_TRIM_THRESHOLD, hpage_size / 2);
+ 	else
+@@ -364,4 +364,5 @@ void hugetlbfs_setup_morecore(void)
+ 	 * This doesn't appear to prohibit malloc() from falling back
+ 	 * to mmap() if we run out of hugepages. */
+ 	mallopt(M_MMAP_MAX, 0);
++#endif
+ }
+-- 
+2.17.1
+
meta-oe/recipes-benchmark/libhugetlbfs/files/0003-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch new file +49 -0

49 lines not on this page · raw message

meta-oe/recipes-benchmark/libhugetlbfs/files/0004-shm.c-Mark-glibc-specific-changes-so.patch new file +30 -0
new file mode 100644
index 0000000000..960e152939
@@ -0,0 +1,30 @@
+From 7002dec46dae375e8aa1aa8577a5b274c02fc697 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 21 Jun 2018 19:48:04 -0700
+Subject: [PATCH 4/6] shm.c: Mark glibc specific changes so
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ shm.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/shm.c b/shm.c
+index 1f82cab..9447b63 100644
+--- a/shm.c
++++ b/shm.c
+@@ -48,10 +48,11 @@
+  * system shmget() may be performed without worry as there is no dynamic
+  * call chain.
+  */
++#ifdef __GLIBC__
+ extern void *dlsym (void *__restrict __handle, __const char *__restrict __name)
+ 		__attribute__((weak)) __THROW __nonnull ((2));
+ extern char *dlerror (void) __attribute__((weak)) __THROW;
+-
++#endif
+ 
+ /* call syscall shmget through the generic syscall mechanism */
+ static int syscall_shmget(key_t key, size_t size, int shmflg)
+-- 
+2.17.1
+
meta-oe/recipes-benchmark/libhugetlbfs/files/0005-Include-dirent.h-for-ino_t.patch new file +28 -0
new file mode 100644
index 0000000000..543302b135
@@ -0,0 +1,28 @@
+From 87ed1706f426ed27fc4eeca7c3b09a4086c9a2a9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 21 Jun 2018 19:51:02 -0700
+Subject: [PATCH 5/6] Include dirent.h for ino_t
+
+Fixes
+error: unknown type name 'ino_t'; did you mean 'int'?
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ tests/hugetests.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tests/hugetests.h b/tests/hugetests.h
+index 8b1d8d9..056042c 100644
+--- a/tests/hugetests.h
++++ b/tests/hugetests.h
+@@ -22,6 +22,7 @@
+ 
+ #include <errno.h>
+ #include <string.h>
++#include <dirent.h>
+ 
+ #include "libhugetlbfs_privutils.h"
+ #include "libhugetlbfs_testprobes.h"
+-- 
+2.17.1
+
meta-oe/recipes-benchmark/libhugetlbfs/files/0006-include-limits.h-for-PATH_MAX.patch new file +42 -0

42 lines not on this page · raw message

meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb +6 -0
index ee1b9d0507..14c909e758 100644
@@ -19,6 +19,12 @@ SRC_URI = " \
     file://0001-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch \
     file://libhugetlbfs-elf_i386-avoid-search-host-library-path.patch \
     file://Force-text-segment-alignment-to-0x08000000-for-i386-.patch \
+    file://0001-include-stddef.h-for-ptrdiff_t.patch \
+    file://0002-Mark-glibc-specific-code-so.patch \
+    file://0003-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch \
+    file://0004-shm.c-Mark-glibc-specific-changes-so.patch \
+    file://0005-Include-dirent.h-for-ino_t.patch \
+    file://0006-include-limits.h-for-PATH_MAX.patch \
 "
 
 UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
Signature · 1 line
2.18.0
author
#2 lore raw

PATCH 3/5 libdc1394: libglu needs both openGL and X11 but not tvirtual/libgl

In reply to Khem Raj

Epxress this dependency accurately

---
 meta-multimedia/recipes-multimedia/libdc1394/libdc1394_git.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta-multimedia/recipes-multimedia/libdc1394/libdc1394_git.bb +2 -1
index 8a9e9a1d7d..b6bb447bc2 100755
@@ -7,7 +7,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c848e78d9a4a5cc69906178e4d6fbd64"
 # libsdl to provide sdl.m4 with AM_PATH_SDL
 DEPENDS += "libusb1 libraw1394 libsdl \
             ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'libxv virtual/libx11', '', d)} \
-            ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virtual/libgl libglu', '', d)} \
+            ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virtual/libgl', '', d)} \
+            ${@bb.utils.contains('DISTRO_FEATURES', 'opengl x11', 'libglu', '', d)} \
 "
 
 PV = "2.2.5+gitr${SRCPV}"
Signature · 1 line
2.18.0
author
#3 lore raw

PATCH 4/5 python-pywbem: update to version 0.11.0 and add a python3 recipe

In reply to Khem Raj

From: Derek Straka <[email protected]>

---
 .../openlmi/openlmi-tools_0.10.5.bb           |  2 +-
 .../{pywbem_0.8.0.bb => python-pywbem.inc}    | 36 ++++++++++++-------
 .../pywbem/python-pywbem_0.11.0.bb            | 13 +++++++
 .../pywbem/python3-pywbem_0.11.0.bb           |  2 ++
 4 files changed, 40 insertions(+), 13 deletions(-)
 rename meta-python/recipes-extended/pywbem/{pywbem_0.8.0.bb => python-pywbem.inc} (59%)
 create mode 100644 meta-python/recipes-extended/pywbem/python-pywbem_0.11.0.bb
 create mode 100644 meta-python/recipes-extended/pywbem/python3-pywbem_0.11.0.bb
meta-oe/recipes-extended/openlmi/openlmi-tools_0.10.5.bb +1 -1
index 13e67cba12..05dc854fca 100644
@@ -7,7 +7,7 @@ SECTION = "System/Management"
 
 inherit setuptools
 
-DEPENDS = "python-native pywbem-native python-m2crypto pywbem"
+DEPENDS = "python-native python-pywbem-native python-m2crypto python-pywbem"
 
 SRC_URI = "http://fedorahosted.org/released/${BPN}/${BP}.tar.gz \
           "
meta-python/recipes-extended/pywbem/python-pywbem.inc renamed from meta-python/recipes-extended/pywbem/pywbem_0.8.0.bb +24 -12
similarity index 59%
rename from meta-python/recipes-extended/pywbem/pywbem_0.8.0.bb
rename to meta-python/recipes-extended/pywbem/python-pywbem.inc
index 7f1986e516..5151c33ea9 100644
@@ -12,25 +12,37 @@ at http://www.dmtf.org/standards/wbem. \
 \
 It also provides a Python provider interface, and is the fastest and easiest \
 way to write providers on the planet."
-HOMEPAGE = "http://pywbem.sf.net/"
-LICENSE = "LGPLv2"
+HOMEPAGE = "http://pywbem.github.io"
+LICENSE = "LGPLv2.1"
 LIC_FILES_CHKSUM = "file://pywbem/LICENSE.txt;md5=fbc093901857fcd118f065f900982c24"
-SECTION = "Development/Libraries"
-DEPENDS = "python-m2crypto-native python-typing-native"
-SRC_URI = "http://jaist.dl.sourceforge.net/project/${BPN}/${BPN}/${BP}/${BP}-dev.r704.zip"
-SRC_URI[md5sum] = "84072451dcdd1aa9ee82363848faf7ad"
-SRC_URI[sha256sum] = "898035866d3cc741bbcd62c4ac26e633ad07b7c11d89db2472b9f923f3fd3ed8"
+SRC_URI[md5sum] = "1465dfa92e4cbe558c773838b9b00711"
+SRC_URI[sha256sum] = "2a05f2c1a6ab4b08560a6da55fdaabd0f52f4d1e6df6e288b9ed927bf5c289ed"
 
-S = "${WORKDIR}/${BP}-dev"
+inherit pypi 
 
-inherit setuptools python-dir
+DEPENDS += " \
+    ${PYTHON_PN}-ply-native \
+    ${PYTHON_PN}-pyyaml-native \
+    ${PYTHON_PN}-six-native \
+"
 
 do_install_append() {
     mv ${D}${bindir}/wbemcli.py ${D}${bindir}/pywbemcli
-    mv ${D}${bindir}/mof_compiler.py ${D}${bindir}/mofcomp
 
-    rm ${D}${libdir}/python2.7/site-packages/${BPN}/wbemcli.py*
-    rm ${D}${libdir}/python2.7/site-packages/${BPN}/mof_compiler.py*
+    rm -f ${D}${bindir}/*.bat
 }
 
+RDEPENDS_${PN}_class-target += "\
+    ${PYTHON_PN}-datetime \
+    ${PYTHON_PN}-io \
+    ${PYTHON_PN}-netclient \
+    ${PYTHON_PN}-ply \
+    ${PYTHON_PN}-pyyaml \
+    ${PYTHON_PN}-six \
+    ${PYTHON_PN}-stringold \
+    ${PYTHON_PN}-threading \
+    ${PYTHON_PN}-unixadmin \
+    ${PYTHON_PN}-xml \
+"
+
 BBCLASSEXTEND = "native"
meta-python/recipes-extended/pywbem/python-pywbem_0.11.0.bb new file +13 -0
new file mode 100644
index 0000000000..7410749071
@@ -0,0 +1,13 @@
+require python-pywbem.inc
+inherit setuptools
+
+DEPENDS += " \
+    ${PYTHON_PN}-m2crypto-native \
+    ${PYTHON_PN}-typing-native \
+"
+
+RDEPENDS_${PN}_class-target += "\
+    ${PYTHON_PN}-argparse \
+    ${PYTHON_PN}-m2crypto \
+    ${PYTHON_PN}-subprocess \
+"
meta-python/recipes-extended/pywbem/python3-pywbem_0.11.0.bb new file +2 -0
new file mode 100644
index 0000000000..6a35a87442
@@ -0,0 +1,2 @@
+require python-pywbem.inc
+inherit setuptools3
Signature · 1 line
2.18.0
author
#4 lore raw

PATCH 5/5 kpatch: Upgrade to 0.6.1 release

In reply to Khem Raj
---
 meta-oe/recipes-kernel/kpatch/kpatch_git.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta-oe/recipes-kernel/kpatch/kpatch_git.bb +2 -2
index e495e2882c..024cca6553 100644
@@ -2,9 +2,9 @@ require kpatch.inc
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
-SRCREV = "db6efbb8c7e90d2b761272cf563047119072768f"
+SRCREV = "7f550f01bd308cf058ae782327d29c8916cc5602"
 
-PV = "0.5.0+git${SRCPV}"
+PV = "0.6.1+git${SRCPV}"
 
 S = "${WORKDIR}/git"
 
Signature · 1 line
2.18.0